1 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
3 * assembly.c: assemblies in the GAC should never be shadow-copied.
5 2009-04-26 Mark Probst <mark.probst@gmail.com>
7 * domain.c, domain-internals.h: Disable
8 track_resurrection_{objects,handles}_hash in MonoDomain if using
11 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
13 * metadata-verify.c: Verify the param table.
15 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
17 * metadata-verify.c (verify_typedef_table): Range check FieldList and
20 * metadata-verify.c (verify_method_table): Proper check the ParamList
23 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
25 * metadata-verify.c (verify_method_table): Check for runtime
26 implemented functions such as delegate .ctors. Remove spurious
29 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
31 * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
33 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
35 Don't allocate MonoGenericInfo for ownerless generic params.
36 * class-internals.h (MonoGenericParam::info): Move field to ...
37 (MonoGenericParamFull): ... this. New struct.
38 (MonoGenericContainer::type_params): Change type to
40 (MonoGenericParam, MonoGenericContainer): Update accessors.
41 * metadata.c (mono_metadata_parse_generic_param): Don't initialize
42 'info' field for ownerless generic param.
43 (mono_metadata_load_generic_params): Update to changes.
44 * reflection.c (mono_reflection_create_generic_class): Likewise.
45 (reflection_methodbuilder_to_mono_method): Likewise.
46 (mono_reflection_initialize_generic_parameter): Likewise.
48 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
50 Don't use MonoGenericParamInfo for ownerless generic params.
51 * class.c (get_anon_gparam_class, set_anon_gparam_class): New. Don't
52 use ParamInfo class at all.
53 (mono_class_from_generic_parameter): Use them.
54 (make_generic_param_class): Fix a couple of instances where 'pinfo
55 == NULL' wasn't handle.
57 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
59 * class.c (make_generic_param_class): Carve out of ...
60 (mono_class_from_generic_parameter): ... here.
62 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
64 Simplify mono_class_from_generic_parameter
65 * class-internals.h (MonoGenericParamInfo::token): New field.
66 * metadata.c (mono_metadata_load_generic_params): Initialize it
68 * class.c (mono_class_from_generic_parameter): Use it instead of
69 searching through metadata.
71 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
73 * metadata-verify.c: Add verification of the method table.
75 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
77 * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
78 Delegate::Invoke optimization.
80 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
82 * appdomain.c (mono_domain_create_appdomain_internal): Free the
83 string returned by get_shadow_assembly_location_base.
85 * appdomain.c (get_shadow_assembly_location_base): Add a comment
86 about caller's ownership.
88 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
90 * reflection.c: Add mono_reflection_cleanup_domain to cleanup
91 reflection memory on domain unload.
93 * domain.c (mono_domain_free): Don't free refobject_hash, let the
94 reflection cleanup code do it.
96 * domain-internals.h: Add mono_reflection_cleanup_domain.
98 This fixes a memory leak for managed mirrors of reflection objects
101 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
103 * metadata-verify.c: Implement more verification of the field table.
105 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
107 * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
108 doesn't try to parse the input assembly, which can be broken.
110 2009-04-23 Mark Probst <mark.probst@gmail.com>
112 * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
113 sgen-gc.c: Implement track resurrection in weak GC handles in SGen
114 by using the lowest bit in the link to store whether the link is
115 tracked. Move the track_resurrection hashes into boehm-gc.c.
117 2009-04-22 Miguel de Icaza <miguel@novell.com>
119 * Makefile.am: Split the console support in platform specific code
120 and put together a framework for making this easy in the future so
121 that we can start splitting code instead of having a mess of PLATFORM_WIN32
123 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
125 * pedump.c: Fix a warning.
127 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
129 * verify.c (mono_delegate_type_equal): Compare valuetypes using
130 mono_class_from_mono_type to avoid bad interactions with the dual representation
131 of the generic type definition.
133 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
135 * verify.c (do_invoke_method): Use mono_class_from_mono_type to
136 get the MonoClass for the call context type as it might be a generic
141 2009-04-21 Mark Probst <mark.probst@gmail.com>
143 * object-internals.h: The Thread object has no execution_context
146 * threads.c, threadpool.c, threads-types.h: Accessor functions for
147 the execution context.
149 * appdomain.c: Bump corlib version.
151 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
153 * verify.c (do_newobj): Improve error message.
155 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
157 * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
158 is nested in the filter block.
160 * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
161 block is not fully nested.
165 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
167 * verify.c (verify_type_compatibility_full): Compare MonoClass and
168 not MonoType to check for equality of valuetypes as the generic type
169 definition allows for two different encodings: the generic type definition
170 class or a generic instance over the GTD arguments.
174 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
176 * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
178 * verify.c (do_initobj): Improve error message.
180 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
182 * metadata-verify.c: Enable pe verification as the issue with #496453
183 is that the authenticode data directory have a different unspecified
184 format. Ignore it for now.
186 * pedump.c: Run the metadata verifier together with the IL verifier.
190 2009-04-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
192 * metadata-verify.c: Temporarily disable pe verification due to #496453.
194 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
196 * class.c (can_access_type): Check visibility against
197 the element type for pointers and arrays.
201 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
203 * metadata-verify.c: Fix cli and table verification to use information
204 from the MonoImage. A lot of duplicated code got killed.
206 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
209 This patch starts to integrate the metadata verifier with the runtime code.
211 This patch causes major regression in functionality for the metadata verifier
212 as cli and table verification are disabled since they require to be ported to
213 use MonoImage information.
215 * image.c (do_mono_image_load): Split the code in this function
216 into mono_image_load_pe_data and mono_image_load_cli_data.
217 Add care_about_pecoff parameter to not load pecoff data.
218 Call into the metadata verifier for pecoff and cli verification.
220 * image.c (mono_image_open_raw): New function that doesn't perform
221 any parsing of the image contents.
223 The reason for the 3 new functions is to give pedump better control
224 into the interaction with the verifier.
226 * metadata-internals.h: Add new functions from image.c as part of the
229 * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
230 mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
231 to make those functions work together with the runtime.
233 * verify.c: Add mono_verifier_is_enabled_for_image function that returns
234 true if the image needs to be verified.
236 * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
238 * pedump.c: Use new metadata verifier API.
240 2009-04-19 Zoltan Varga <vargaz@gmail.com>
242 * object.c (mono_install_vtable_trampoline): Make this receive a
243 trampoline creation function instead of trampoline, allowing the JIT
244 to use a different trampoline for each vtable.
246 2009-04-18 Mark Probst <mark.probst@gmail.com>
248 * object.c (mono_raise_exception): Don't reset the thread abort
249 exception state here.
251 2009-04-18 Mark Probst <mark.probst@gmail.com>
253 * icall-def.h: New icall for getting the thread abort exception
256 * object.c, thread.c, object-internals.h: A thread's abort
257 exception state is now a GC handle. To get the object it stands
258 for, we must move it into the current app domain, if it's
259 different than the one where it originated from.
261 * appdomain.c: Bump corlib version.
263 * domain.c, domain-internals.h: New function for setting the
264 domain and migrate the thread abort exception or not.
266 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
268 * metadata-verify.c: Add initial verification of the
271 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
273 * metadata-verify.c: Add a macro to conditionally enable
274 dumping of verification information. Add make_coded_token
275 and search_sorted_table to enable search sorted tables
276 by a given coded token.
278 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
280 * metadata-verify.c: Add array mapping from table index
281 to description offset. Add get_col_offset and get_col_size
284 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
286 * metadata-verify.c: Add remaining table descriptions offsets.
287 Add remaining coded index descriptions.
289 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
291 * metadata-verify.c: Fixed constant table description.
292 Fixed calculation of HasCustomAttribute coded index size.
293 Fixed calculation of size for many table indexes.
295 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
297 * pedump.c (dump_metadata): Dump table offset instead
298 of useless pointer in memory.
300 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
302 * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
304 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
306 * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
307 a missing of for interface types.
309 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
311 * metadata-verify.c (verify_pe_optional_header): Add comment of why
312 the code is commented.
314 * metadata-verify.c (verify_resources_table): Remove spurious printf
315 and don't fail if there are unmanaged resources. Gmcs generates a useless
316 one for all assemblies - I bet it's some MS compatibility junk.
318 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
320 * metadata-verify.c (verify_typedef_table): Verify the extends field.
322 * metadata-verify.c (mono_image_verify): Add a is_corlib.
324 * verify-internals.h: Same.
326 * pedump.c: Fix for mono_image_verify new signature.
328 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
330 * metadata-verify.c (verify_typedef_table): Verify for some invalid
333 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
335 * metadata-verify.c (verify_module_table): Ignore the generation field.
337 2009-04-15 Martin Baulig <martin@ximian.com>
339 * debug-mono-symfile.c
340 (mono_debug_symfile_lookup_location): Don't print a warning for
341 unknown extended opcodes if they're within 0x40 and 0x7f.
343 2009-04-15 Zoltan Varga <vargaz@gmail.com>
345 * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
346 invoke signatures returning an enum. Fixes #494847.
348 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
350 * metadata-verify.c: Initial code to verify the typedef table.
352 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
354 * verify.c (mono_method_verify): Don't fail if an unconditional branch
355 with non empty stack happens before the beginning of a try block.
359 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
361 * metadata-verify.c: Verify typename and typenamespace fields of
364 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
366 * metadata-verify.c: Initial code to verify the typeref table.
368 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
370 * verify.c (verify_delegate_compatibility): Fix error message.
372 2009-04-14 Sebastien Pouliot <sebastien@ximian.com>
374 * security-core-clr.c: Fix typo
376 2009-04-14 Zoltan Varga <vargaz@gmail.com>
378 * marshal.c (delegate_hash_table_add): Make delegate_target_locations
379 a MonoGHashTable to keep its values alive.
380 (emit_marshal_boolean): Fix a warning.
382 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
384 * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
385 not have any interface configured for IPv4/IPv6.
387 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
389 * assembly.c: fix typo in error message.
391 2009-04-14 Zoltan Varga <vargaz@gmail.com>
393 * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
394 allocating the location holding the this argument to prevent
395 'too many root sets' errors.
397 * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
398 to mark fields as special static.
399 (mono_field_static_get_value): Handle special static fields.
400 (mono_field_static_set_value): Ditto.
402 * class-internals.h (struct _MonoClassField): Document this.
404 2009-04-13 Bill Holmes <billholmes54@gmail.com>
406 * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
407 the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
408 case. This will handle when managed code returns null to native code.
410 Code is contributed under MIT/X11 license.
412 2009-04-13 Bill Holmes <billholmes54@gmail.com>
414 * object.c (build_imt_slots): Changing a free to a g_free to match
415 the g_malloc0 in add_imt_builder_entry that allocated this memory.
417 Code is contributed under MIT/X11 license.
419 2009-04-13 Bill Holmes <billholmes54@gmail.com>
421 * marshal.c (emit_marshal_boolean): Adding code to ensure that
422 the correct TRUE value is passed through the marshaling layer.
424 Code is contributed under MIT/X11 license.
426 2009-04-13 Zoltan Varga <vargaz@gmail.com>
428 * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
429 correctly. Fixes #492330.
431 * marshal.c: Fix the embedding of object pointers into JITted code in
432 the native-to-managed wrappers by allocating some GC tracked memory, and
433 embedding the address of that.
435 2009-04-11 Zoltan Varga <vargaz@gmail.com>
437 * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
438 pointers into the vtable.
440 2009-04-09 Rodrigo Kumpera <rkumpera@novell.com>
442 * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
444 * verify.c (verify_ldftn_delegate): Improve error message.
446 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
448 * reflection.c (my_mono_class_from_mono_type): Remove.
450 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
452 Prepare to reduce memory usage of owner-less generic parameters (1/n)
453 * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
454 and constraints fields into ...
455 (MonoGenericParamInfo): ... this.
456 (mono_generic_param_info, mono_generic_container_get_param_info):
458 * class.c, debug-helpers.c, icall.c: Update to changes.
459 * metadata.c, reflection.c, verify.c: Likewise.
461 2009-04-09 Zoltan Varga <vargaz@gmail.com>
463 * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
465 * marshal.c (get_runtime_invoke_type): Share enums with their base types.
467 * marshal.c (get_runtime_invoke_type): Share pointers with ints and
468 booleans with sbytes.
470 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
472 * class.c (can_access_instantiation): Verify accesibility of element types
473 for arrays and pointers.
475 * class.c (can_access_type): Return true if the target class is VAR or MVAR.
477 * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
481 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
483 * verify.c (do_invoke_method): Improve error messages.
485 2009-04-08 Bill Holmes <billholmes54@gmail.com>
487 * verify.c: Fixing the MSVC build.
489 Code is contributed under MIT/X11 license.
491 2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
493 * security-core-clr.c: Simplify get_reflection_caller not to call
494 mono_method_get_last_managed (another stack walk) and adjust the
495 callers to handle a (should not happen) NULL return value.
497 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
499 Add accessors to some MonoGenericParam fields
500 * class-internals.h (mono_generic_param_owner): New accessor.
501 (mono_generic_param_num): Likewise.
502 (mono_type_get_generic_param_owner): New helper.
503 (mono_type_get_generic_param_num): New helper.
504 * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
506 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
508 * class-internals.h (mono_generic_container_get_param): New wrapper.
509 * class.c, icall.c, metadata.c, verify.c: Use it.
511 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
514 * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
515 the standard case/loop. In particular, don't complain about
516 references to generic type definitions.
518 2009-04-07 Zoltan Varga <vargaz@gmail.com>
520 * debug-helpers.c (dis_one): Decode string arguments.
522 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
524 * pedump.c (dump_verify_info): Dump type name correctly.
526 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
528 * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
529 are larger than code size.
531 This can happen in valid code if the try/catch block is not followed by any instruction
532 and do a backward branch on the leave instruction.
536 2009-04-06 Sebastien Pouliot <sebastien@ximian.com>
538 * security-core-clr.c: Fix typo while comparing second method names
539 in can_avoid_corlib_reflection_delegate_optimization
541 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
543 * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
547 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
549 * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
550 a MVAR using a class context.
554 2009-04-06 Zoltan Varga <vargaz@gmail.com>
556 * object.c (mono_class_compute_gc_descriptor): Make this non-static.
558 * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
560 * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
561 functions supplied by the JIT for the SGEN GC.
563 * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
565 2009-04-06 Massimiliano Mantione <massi@ximian.com>
567 monitor.c (mono_monitor_try_enter_internal):
568 Added calls to profile monitor contentions.
569 Also duplicated a small piece of code (the "get the monitor" logic)
570 from the fast path to the slow path, and changed the relevant goto
571 statements, so that monitor acquisition events can be emitted from the
572 slow path (this is by Paolo Molaro).
574 2009-04-06 Massimiliano Mantione <massi@ximian.com>
576 * profiler.c, profiler.h, profiler-private.h:
577 Added support for profiling monitor contentions.
579 2009-04-03 Rodrigo Kumpera <rkumpera@novell.com>
581 * metadata-verify.c: Verify the modules table.
583 2009-04-02 Rodrigo Kumpera <rkumpera@novell.com>
585 * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
586 using the context of the method been verifier and not of the method been called.
588 * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
589 safely inflate generic types.
591 2009-04-02 Sebastien Pouliot <sebastien@ximian.com>
593 * security-core-clr.c: Change the strategy for checking the
594 "reflection using delegates optimization" to avoid unneeded
595 attributes in multiple class libraries.
597 2009-04-02 Mark Probst <mark.probst@gmail.com>
599 * sgen-gc.c: Remove object element in the disappearing link struct
600 by storing the object pointer in the link.
602 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
604 * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
606 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
608 * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
610 * verify.c (mono_method_verify): Do proper bounds checking of exception
613 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
615 * loader.c (mono_field_from_token): Don't crash if the field parent could
618 2009-03-31 Mark Probst <mark.probst@gmail.com>
620 * sgen-gc.c: Execute critical finalizers after ordinary
623 * class-internals.h, domain.c: Add CriticalFinalizerObject to
626 2009-03-31 Jb Evain <jbevain@novell.com>
628 * verify.c (do_ldstr): don't check if a string is in the user strings
629 heap if the current image is dynamic.
631 2009-03-31 Mark Probst <mark.probst@gmail.com>
633 * sgen-gc.c: Wait until the last finalizer has executed when
634 returning from WaitForPendingFinalizers.
636 2009-03-31 Martin Baulig <martin@ximian.com>
638 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 2.
640 2009-03-31 Martin Baulig <martin@ximian.com>
642 * mono-debug-debugger.h (MonoDebuggerEvent): Add
643 `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
644 `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
645 (mono_debugger_event_create_appdomain): New function.
646 (mono_debugger_event_unload_appdomain): New function.
648 * appdomain.c (mono_domain_create_appdomain_internal): Call
649 mono_debugger_event_create_appdomain().
651 2009-03-31 Martin Baulig <martin@ximian.com>
653 * mono-debug-debugger.c
654 (mono_debugger_register_class_init_callback): Also register the
655 class init callback if the class is already initialized to make
656 things work with shadow copied assemblies.
658 2009-03-31 Sebastien Pouliot <sebastien@ximian.com>
660 * security-core-clr.c
661 (mono_security_core_clr_ensure_reflection_access_field): Let
662 critical code access the field (just like we do for methods). Use
663 check_field_access helper.
664 (mono_security_core_clr_ensure_reflection_access_method): Use
665 check_field_access helper.
667 2009-03-31 Mark Probst <mark.probst@gmail.com>
669 * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
670 call the run-finalize function directly.
672 * gc.c, gc-internal.h: Make run_finalize() non-static.
674 2009-03-31 Mark Probst <mark.probst@gmail.com>
676 * sgen-gc.c: Use a separate struct for disappearing links.
678 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
680 * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
681 * MaxIOVectorLength enabled, just ignore them.
684 2009-03-30 Rodrigo Kumpera <rkumpera@novell.com>
686 * metadata-verify.c: Fix eglib build.
688 2009-03-30 Zoltan Varga <vargaz@gmail.com>
690 * threads-types.h: Fix the win32 build.
692 2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
694 * class.c: move coreclr inheritance/override checks to
696 * security-core.clr.c|h: add code from class.c with additional
697 documentation. Fix override check when the method is not critical.
699 2009-03-28 Zoltan Varga <vargaz@gmail.com>
701 * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
702 (match_class): Ditto.
704 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
706 * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
708 * metadata-verify.c: Implement table layout row size calculation. Verify
709 the total size of the tables.
711 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
713 * metadata-verify.c: Verify heap sizes and size to decode row counts.
715 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
718 * console-io.[ch]: added new mono_console_init() to make sure that
719 file descriptors 0, 1 and 2 are opened.
722 2009-03-27 Sebastien Pouliot <sebastien@ximian.com>
724 * appdomain.h: Export a new callback type and a new function to
725 set this callback. This allow a mono host to provide it's own
726 definition for "platform code".
727 * metadata-internals.h: Add a core_clr_platform_code flag on
728 _MonoImage to (cache and) know if it is representing platform
730 * image.c (do_mono_image_open): Set core_clr_platform_code flag
731 on platform code images.
732 * security-core-clr.c|h
733 (mono_security_set_core_clr_platform_callback): Allow the host
734 to provide it's own platform check definition.
735 (mono_security_core_clr_determine_platform_image): Detect if an
736 image is platform code (using the specified callback).
737 (mono_security_core_clr_is_platform_image): Return cached value
740 2009-03-27 Zoltan Varga <vargaz@gmail.com>
742 * threads.c (mono_create_thread): New helper function to wrap CreateThread
743 which has different parameter types for the 'tid' argument in windows and
746 * appdomain.c attach.c threads.c: Use the new helper.
748 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
750 * metadata-verify.c: Verify valid table bits.
752 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
754 * metadata-verify.c (verify_metadata_header): Store size in the size field.
756 * metadata-verify.c: Add initial table schema verification.
758 2009-03-26 Zoltan Varga <vargaz@gmail.com>
760 * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
761 obtain the refclass argument needed by mono_param_get_objects (). Fixes
764 * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
766 * appdomain.c (MONO_CORLIB_VERSION): Bump this.
768 2009-03-26 Sebastien Pouliot <sebastien@ximian.com>
770 * security-core-clr.c: Add/update documentation
772 2009-03-26 Zoltan Varga <vargaz@gmail.com>
774 * marshal.c (emit_marshal_object): Generate code to throw an exception
775 instead of throwing it. Fixes #488670.
777 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
779 * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
780 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
781 an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
782 and add a call to mono_security_core_clr_ensure_delegate_creation
783 to do the extra checks required by CoreCLR.
784 * security-core-clr.c|h: Add function to check delegate creation,
785 both in the binding and accessibility, under CoreCLR.
787 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
789 * reflection.c (mono_reflection_create_dynamic_method): when
790 coreclr is enabled make sure that every resolved object are
791 checked (e.g. field and method access).
792 * security-core-clr.c|h: Add function to check objects resolved
793 when a dynamic method is created.
795 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
797 * metadata-verify.c: Cache directory rva translations.
799 * metadata-verify.c: Add cli-header and streams verification.
801 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
803 * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
804 the wrong offset (8 instead of 6).
806 2009-03-23 Zoltan Varga <vargaz@gmail.com>
808 * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
809 methods, return the native function address itself. Fixes
812 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
814 * console-io.c: some of the values for control characters might not be
817 2009-03-21 Sebastien Pouliot <sebastien@ximian.com>
819 * exception.c|h: Add helpers to create [Field|Method]AccessException
820 * icall.c: Add required coreclr check calls for field reflection.
821 Move the existing (method) check logic into security-core-clr.c
822 * security-core-clr.c: Add functions to check if the access of a
823 field or method is allowed when reflecting under coreclr. This is
824 mostly done using a stack walk to find the "real" caller: i.e. the
825 code that is calling the reflection
827 2009-03-20 Zoltan Varga <vargaz@gmail.com>
829 * gc-internal.h: Change location of gc_wrapper.h
831 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
833 * class.c: Simplification to coreclr checks for overrides that
834 makes it easier to set breakpoints.
836 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
838 * security-core-clr.c|h: (mono_security_core_clr_class_level,
839 mono_security_core_clr_method_level): Avoid potential
840 MonoCustomAttrInfo allocation for transparent assemblies (e.g.
841 user/application code) and make it easier to set breakpoints
843 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
845 * metadata-verify.c: Reject cli header tables that mono don't handle.
847 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
849 * pedump.c: Fix CLI header dumping.
851 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
853 * metadata-verify.c: More CLI header verification.
855 2009-03-19 Zoltan Varga <vargaz@gmail.com>
857 * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
859 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
861 * metadata-verify.c: Initial verification of the CLI header.
863 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
865 * metadata-verify.c (verify_resources_table): Fix verification of zero
866 sized resource section and id entries count.
868 2009-03-18 Zoltan Varga <vargaz@gmail.com>
870 * icall.c: Handle user types in many Type icalls. Fixes #486303.
872 2009-03-17 Jb Evain <jbevain@novell.com>
874 * profiler.c: call mono_gc_base_init from mono_profiler_load.
876 2009-03-17 Zoltan Varga <vargaz@gmail.com>
878 * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
879 (mono_gc_make_descr_for_array): Ditto.
881 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
883 * verify.c (mono_verifier_is_class_full_trust): Add support for
884 CoreCLR security mode where trusted assemblies are defined as
887 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
889 * metadata-verify.c: Add minimal PECOFF resource verification.
891 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
893 * metadata-verify.c: Be less restrictive with some coff fields.
895 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
897 * verify.c (init_stack_with_value_at_exception_boundary): Init generic
898 params as boxed values on stack. Fixes #485706.
900 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
902 * console-io.c: the termios values may vary in different flavors of unix.
904 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
906 * console-io.[ch]: return the entire set of control characters when
907 initializing the terminal.
908 * appdomain.c: bump corlib version.
910 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
912 * mono-perfcounters.c: added support for in-process custom
913 performance counters.
915 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
917 * metadata-verify.c: Small cleanup and add comment for IAT directory entry.
919 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
921 * metadata-verify.c: Verify the data pointed by the import table.
923 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
925 * metadata-verify.c (load_data_directories): Store data
928 * metadata-verify.c: Verify the import table.
930 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
932 * metadata-verify.c: Verify data directories.
934 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
936 * metadata-verify.c: Check section header flags.
938 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
940 * appdomain.c: if the assembly name is a shadow-copied file, return
941 TRUE from mono_is_shadow_copy_enabled but don't actually do anything
942 in mono_make_shadow_copy.
943 * icall.c: if the assembly name is a shadow-copied file, replace it
944 with the original assembly path.
946 Bug #484244 fixed. NUnit tests for corlib can be run without
949 2009-03-12 Zoltan Varga <vargaz@gmail.com>
951 * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
952 entries when the table is reallocated.
954 * icall.c: Allocate the memory used by the mono_ptr_array macros using
955 mono_gc_alloc_fixed () since it contains GC refs.
957 2009-03-10 Zoltan Varga <vargaz@gmail.com>
959 * reflection.c (ensure_complete_type): New helper function to call
960 type resolve handlers for unfinished dynamic types.
961 (resolve_object): Call it for MonoClassFields. Fixes #483852.
963 2009-03-09 Zoltan Varga <vargaz@gmail.com>
965 * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
968 2009-03-08 Rodrigo Kumpera <rkumpera@novell.com>
970 * appdomain.c (get_shadow_assembly_location): Fix memleak.
972 2009-03-08 Zoltan Varga <vargaz@gmail.com>
974 * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
975 between GCHandles of type WeakTrackResurrection and the objects they
978 * gc.c: Partly implement the sematics of GCHandles of type
979 WeakTrackResurrection: these handles should only be cleared after the
980 finalizer of the object they are pointing to has ran.
982 2009-03-06 Mark Probst <mark.probst@gmail.com>
984 * icall.c: Partially revert r126631 because using the jump
985 trampolines for generic shared methods makes it superfluous.
987 2009-03-06 Zoltan Varga <vargaz@gmail.com>
989 * threads.c (handle_store): Create the 'threads' hash table with the proper
990 MONO_HASH_VALUE_GC type.
992 2009-03-05 Zoltan Varga <vargaz@gmail.com>
994 * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
997 * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
998 and LAST_GC_TRACKED as a GC root.
1000 * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
1002 * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
1003 the static data even if it consists of 1 reference.
1005 * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
1006 if there is a GC descriptor.
1008 * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
1009 instead of through the GC since they contain no object references.
1011 2009-03-05 Mark Probst <mark.probst@gmail.com>
1013 * generic-sharing.c (instantiate_other_info): Always return a jump
1014 trampoline for method code.
1016 2009-03-05 Marek Habersack <mhabersack@novell.com>
1018 * culture-info-tables.h: generated to include the en-tt culture.
1020 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
1022 * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
1023 capture the thread context.
1025 * object.c (mono_async_result_new): Cache the invoke wrappers to
1026 ExecutionContext::Capture.
1028 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
1030 * marshal.h: Add a prototype for what mono_compile_method returns
1031 for invoke wrappers.
1033 * gc.c: Use the new prototype declaration.
1035 2009-03-04 Geoff Norton <gnorton@novell.com>
1037 * boehm-gc.c: Add some MONO_LOG tracing for the GC
1039 * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
1041 2009-03-04 Martin Baulig <martin@ximian.com>
1044 (mono_debugger_runtime_invoke): Removed.
1046 * mono-debug-debugger.c
1047 (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
1049 2009-03-02 Martin Baulig <martin@ximian.com>
1052 (mono_debugger_unhandled_exception): Removed.
1053 (mono_debugger_handle_exception): Removed.
1054 (mono_debugger_throw_exception): Removed.
1057 (mono_debug_debugger_version): Bump to 5.
1059 * mono-debug-debugger.c: Moved the exception handling code to
1060 ../mini/debug-mini.c
1062 2009-03-03 Zoltan Varga <vargaz@gmail.com>
1064 * domain-internals.h (struct _MonoDomain): Add a separate lock for the
1065 finalize_objects_hash.
1067 * gc.c: Use the separate lock to access the finalize_objects_hash field.
1069 * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
1072 * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
1075 * image.c (mono_image_close): Free it.
1077 * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
1078 allowing a creation of a wrapper which invokes its method using a CALLVIRT
1079 on the this argument.
1081 * gc.c (run_finalize): Optimize the calling of the finalizers.
1083 2009-03-03 Martin Baulig <martin@ximian.com>
1085 * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
1086 of the `MonoGenericInst' changes.
1088 2009-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1090 * icall.c (ves_icall_MonoType_GetGenericArguments): Use
1091 mono_array_class_get_cached to reduce locking contention. Extract
1094 * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
1095 intermediary managed arrays. Use caching version of mono_array_new
1096 to allocate the result array.
1098 * icall.c (ves_icall_Type_GetEvents_internal): Same.
1100 * icall.c (ves_icall_Type_GetNestedTypes): Same.
1102 * locales.c (create_names_array_idx): Use mono_array_new_cached
1103 to reduce locking contention.
1105 2009-03-03 Zoltan Varga <vargaz@gmail.com>
1107 * object.c (mono_method_add_generic_virtual_invocation): Put back the
1108 thunk builder code for the non-interface case.
1110 2009-03-02 Zoltan Varga <vargaz@gmail.com>
1112 * object.c (get_generic_virtual_entries): New helper function to collect
1113 the virtual generic method instances which need to be added to an IMT
1115 (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
1116 Instead of creating a new IMT thunk, reset the vtable slot to the
1117 trampoline, the thunk will be created the next time the trampoline is called.
1118 (build_imt_slots): Add support for virtual generic methods in interfaces by
1119 adding to the IMT thunk all the methods registered using
1120 mono_method_add_generic_virtual_invocation ().
1122 * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
1123 (struct _MonoIMTCheckItem): Ditto.
1125 * object.c (mono_method_add_generic_virtual_invocation): Take a
1126 MonoMethod argument instead of a MonoGenericInst. Fix the construction of
1127 the IMT thunk to include all items.
1129 * object.c (mono_class_create_runtime_vtable): Add a missing
1130 mono_loader_unlock ().
1132 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
1134 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1136 * object-internals.h (MonoReflectionEvent): Add cached_add_event.
1138 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
1140 * object-internals.h: Rename _MonoReflectionEvent to
1141 MonoReflectionMonoEvent so it reflects the right managed type.
1142 Add a MonoReflectionEvent that correctly represents System.EventInfo.
1145 * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
1148 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
1150 * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
1151 intermediary managed arrays. Use caching version of mono_array_new
1152 to allocate the result array.
1154 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
1156 * reflection.c: Use cached version of mono_array_new alongside
1157 the mono_reflection_get_custom_attrs_by_type call path.
1159 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
1161 * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
1162 intermediary managed arrays. Use caching version of mono_array_new
1163 to allocate the result array.
1165 * icall.c (ves_icall_Type_GetConstructors_internal): Same.
1167 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
1169 * icall.c: Add small implementation of a growable stack bound array.
1171 * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
1173 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
1174 intermediary managed arrays. Use caching version of mono_array_new
1175 to allocate the result array.
1177 2009-02-27 Rodrigo Kumpera <rkumpera@novell.com>
1179 * icall.c: New icall ves_icall_System_Enum_compare_value_to that
1180 helps Enum::CompareTo to be implemented without reboxing all enums
1181 to their underlying type.
1182 2009-02-27 Zoltan Varga <vargaz@gmail.com>
1184 * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
1185 since it acquires a global lock leading to scalability problems.
1187 * profiler.c: Make the stat profiler work with multiple appdomains, this
1188 currently only works when no appdomains are unloaded.
1190 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1192 * appdomain.c: make the check to avoid copying when the assembly is
1193 already shadow copied actually work.
1195 2009-02-26 Zoltan Varga <vargaz@gmail.com>
1197 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1199 * object-internals.h (struct _MonoReflectionGenericClass): Sync with
1200 changes to the managed side.
1202 2009-02-25 Zoltan Varga <vargaz@gmail.com>
1204 * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
1205 classes + a separate lock for it, as it is used frequently at runtime, not
1206 just during metadata loading/JIT compilation.
1208 * class.c (mono_bounded_array_class_get): Use the separate cache + lock
1211 * object-internals.h (mono_class_from_name_cached): New macro to cache
1212 the results of the lookup locally without having to declare a static
1213 variable to hold it.
1214 (mono_class_get_field_from_name_cached): Ditto.
1215 (mono_array_class_get_cached): Ditto.
1217 * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
1220 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
1221 slower search in metadata.
1223 * pedump.c: Fix a warning.
1225 2009-02-23 Zoltan Varga <vargaz@gmail.com>
1227 * reflection.c (encode_locals): Add checks for user types.
1228 (method_encode_clauses): Ditto.
1229 (method_encode_code): Ditto.
1230 (mono_image_create_token): Ditto.
1232 * object-internals.h: Change the type of more fields from MonoReflectionType*
1235 2009-02-22 Zoltan Varga <vargaz@gmail.com>
1237 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
1238 the a thread does not suspend within 100ms.
1240 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
1241 in addition to StopRequested as well.
1243 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
1245 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
1246 search the method_hash before inserting a new entry, to avoid crashes when
1247 the same method is inserted multiple times, causing the old
1248 MonoDebugMethodInfo structure to be freed by the value dtor function.
1250 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1252 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
1253 SO_EXLUSIVEADDRUSE where available.
1255 2009-02-21 Zoltan Varga <vargaz@gmail.com>
1257 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
1258 runtime invoke wrappers, this time it is string ctor wrappers, which
1259 pass a dummy string as 'this' instead of their obj argument. Fixes
1262 2009-02-21 Jb Evain <jbevain@novell.com>
1264 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
1265 only get create_culture once.
1267 2009-02-20 Zoltan Varga <vargaz@gmail.com>
1269 * reflection.c (mono_reflection_setup_internal_class): Move the user type
1270 check before the locking.
1272 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
1273 (mono_reflection_create_runtime_class): Ditto.
1274 (mono_reflection_sighelper_get_signature_local): Ditto.
1275 (mono_reflection_sighelper_get_signature_field): Ditto.
1277 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
1278 is a System.MonoType object or similar.
1279 (monotype_cast): New helper function to cast a MonoObject to a
1280 MonoReflectionType object.
1282 * object-internals.h: Change MonoReflectionType* members in structures to
1283 MonoObject* members to force the usage of the monotype_cast () function.
1285 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
1286 structures/arrays. This causes us to assert instead of crashing when
1287 instances of user defined subclasses of System.Type are encountered.
1289 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1293 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
1294 win32 resource loaded from a PE file.
1296 * image.c: fix mono_image_lookup_resource.
1298 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1302 * threads.c: added internal call for WaitHandle.SignalAndWait.
1304 2009-02-19 Bill Holmes <billholmes54@gmail.com>
1306 * cominterop.c : Adding cominterop_type_from_handle and
1307 registering it as an icall. Replacing all references
1308 to type_from_handle.
1310 Code is contributed under MIT/X11 license.
1312 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
1314 * Makefile.am: Add lock-tracer.h and lock-trace.c.
1316 * appdomain.c: Call the tracer init function.
1318 * domain-internals.h: Enable the tracer for the domain locks.
1320 * image.c: Enable the tracer for image locks.
1322 * loader.c: Enable the trace for the loader lock.
1325 * lock-tracer.c: Initial implementation of the lock trace utility.
1326 The tracer requires a compile time define to be enabled and a env var
1327 to be enabled at runtime.
1329 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
1331 * domain.c (mono_domain_code_foreach): Improve documentation.
1333 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
1336 * generic-sharing.c:
1338 * reflection.c: Adjust locking order to the new semantics where the loader lock
1341 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
1343 * domain.c: Add mono_domain_code_* functions that perform locking
1344 around the domain codeman.
1346 * domain-internals.h: Export those functions.
1348 * object.c: Use new functions instead of acquiring the domain lock.
1350 2009-02-19 Zoltan Varga <vargaz@gmail.com>
1352 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
1353 delegate. Fixes #477396.
1355 2009-02-18 Zoltan Varga <vargaz@gmail.com>
1357 * reflection.c (create_custom_attr): Get rid of alloca.
1359 2009-02-18 Bill Holmes <billholmes54@gmail.com>
1361 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
1362 Adding exception handling for all CCW calls.
1364 Code is contributed under MIT/X11 license.
1366 2009-02-18 Zoltan Varga <vargaz@gmail.com>
1368 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
1370 * marshal.c (emit_marshal_boolean): Add null checks to the new
1371 native->managed marshalling code. Fixes #476247.
1373 2009-02-17 Zoltan Varga <vargaz@gmail.com>
1375 * class.c (mono_class_get_vtable_entry): Move the addition of
1376 static rgctx invoke wrappers for vtable methods here, this simplifies
1377 a lot of code and causes fewer rgctx wrappers to be created.
1379 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
1380 name of the statistics to begin with an uppercase.
1382 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
1384 * reflection.c: Revert previous change as it breaks the build.
1386 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
1388 * verify.c: Properly handle SZARRAY element type.
1392 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
1394 * reflection.c (mono_image_create_method_token): Correctly encode
1395 MethodDef MemberRefParent token.
1399 2009-02-17 Zoltan Varga <vargaz@gmail.com>
1401 * image.c (mono_image_close): Delete the critical section before
1402 freeing the memory holding it.
1404 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
1406 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
1409 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
1411 * pedump.c (main): Call mono_marshal_init so pedump
1414 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
1416 * loader.c (method_from_memberref): Properly fix #474271 and
1417 don't break the runtime bad.
1419 2009-02-16 Zoltan Varga <vargaz@gmail.com>
1421 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
1422 (mono_domain_alloc0): Ditto.
1424 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
1426 * loader.c (method_from_memberref): Don't abort if the array
1427 method is not found. A regular loader failure is more informative
1432 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
1434 *loader.c: Guard MonoImage::method_cache/methodref_cache
1435 using the image lock instead of the loader lock.
1437 * metadata.h: Add comments about which fields are protected by
1440 2009-02-16 Zoltan Varga <vargaz@gmail.com>
1442 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
1444 * generic-sharing.c (mono_method_construct_object_context): Remove the
1445 wrapper_type == NONE assert, it is not needed.
1447 2009-02-15 Zoltan Varga <vargaz@gmail.com>
1449 * reflection.c (clear_cached_object): New helper function.
1450 (mono_method_clear_object): New function to clear the cached reflection
1451 objects for a dynamic method.
1453 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
1454 Partly fixes # 463323.
1456 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
1460 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
1462 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
1464 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
1465 take the image lock instead of the loader lock.
1467 * metadata-internals.h: Export new functions.
1469 2009-02-12 Miguel de Icaza <miguel@novell.com>
1471 * domain.c (app_config_parse): Remove another use of stat that is
1472 not necessary as g_file_get_contents already does the presence
1475 2009-02-13 Zoltan Varga <vargaz@gmail.com>
1477 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
1479 * marshal.c: Move the bstr handling code to cominterop.c.
1481 * marshal.c: Remove some COM interop code missed previously.
1483 2009-02-12 Miguel de Icaza <miguel@novell.com>
1485 More Paolo patches from the Wii port:
1487 * security.c: Remove ves_icall_System_Environment_get_UserName
1490 * icall.c: And put ves_icall_System_Environment_get_UserName
1493 * appdomain.c (mono_set_private_bin_path_from_config): Remove
1494 redundant call to stat that was only used to test for the file
1495 existence. Patch from Paolo.
1497 * gc.c (run_finalize): If COM is disabled, do not link in
1498 mono_marshal_free_ccw.
1500 * generic-sharing.c: Use alloca.h here as well.
1502 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
1504 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
1506 2009-02-13 Zoltan Varga <vargaz@gmail.com>
1508 * cominterop.c cominterop.h: New files.
1510 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
1511 function/typedefs which are needed by cominterop.c global.
1513 2009-02-12 Mark Probst <mark.probst@gmail.com>
1515 * generic-sharing.c: Don't take the loader lock to guard image
1518 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
1520 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
1521 called without the loader lock which is required to guard MonoImage:tokens.
1523 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
1529 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
1531 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
1533 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
1534 Rework the code to use regular mono_image_alloc/0.
1536 * loader.c: Rework the code to use regular mono_image_alloc/0.
1538 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
1540 2009-02-12 Bill Holmes <billholmes54@gmail.com>
1542 * object-internals.h : Fixing a typo in the
1543 MonoReflectionComVisibleAttribute struct.
1545 * marshal.c (cominterop_com_visible): Check the implemented
1546 interfaces for ComImport.
1548 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
1549 assume that bools should be treated as VARIANTBOOLs.
1551 * marshal.c (emit_marshal_boolean): Adding cases for
1552 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
1554 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
1555 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
1557 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
1558 should be treated as VARIANTBOOLs.
1560 Code is contributed under MIT/X11 license.
1562 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
1564 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
1565 allocation with the image lock.
1567 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
1569 This patch is the last of a series to remove explicit reference of MonoImage::mempool
1570 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
1572 * object.c: Add mono_string_to_utf8_image.
1574 * object-internals.h: Export mono_string_to_utf8_image.
1576 * reflection.c: Rework all explicit references to the the image mempool to go thought
1577 the mono_image_alloc set of functions.
1579 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
1581 This patch is the third of a series to remove explicit reference of MonoImage::mempool
1582 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
1583 and generics-sharing.c.
1585 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
1586 as first argument. Note that this function remains broken as it doesn't perform locking around the
1589 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
1591 * image.c: Add g_slist_append_image.
1593 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
1594 the supplied image for allocation. Move code into mono_metadata_field_info_full.
1596 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
1597 Fix all related code to do the same.
1599 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
1601 * metadata-internals.h: Fix the signatures.
1603 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
1605 This patch is the second of a series to remove explicit reference of MonoImage::mempool
1606 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
1607 and similar to work using MonoImage.
1609 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
1612 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
1614 * class.c (mono_metadata_signature_deep_dup): Same.
1616 * class.c (inflate_generic_type): Same.
1618 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
1620 * metadata.c (mono_metadata_signature_dup_full): Same.
1622 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
1623 mono_metadata_signature_dup_full.
1625 * metadata.c (mono_metadata_type_dup): Same.
1627 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
1629 * reflection.c: Same.
1631 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
1633 * metadata-internals.h: Fix the signatures.
1635 * class-internals.h: Same.
1637 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
1639 This patch is the first of a series to remove explicit reference of MonoImage::mempool
1640 and use mono_image_alloc set of functions instead.
1642 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
1643 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
1646 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
1648 * class.c (g_list_prepend_mempool): Removed.
1650 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
1652 * image.c: Add g_list_prepend_image.
1654 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
1656 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
1659 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
1661 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
1664 * image.c (mono_image_init): Init the lock field.
1666 * image.c (mono_image_init): Cleanup the lock field.
1668 * image.c: Add mono_image_(un)lock functions.
1670 2009-02-11 Mark Probst <mark.probst@gmail.com>
1672 * class.c, class-internals.h: mono_method_get_context_general()
1673 combines the functionality of mono_method_get_context() and
1674 mini_method_get_context().
1676 * generic-sharing.c, domain-internals.h:
1677 mono_method_construct_object_context() and
1678 mono_domain_lookup_shared_generic() moved from mini.
1680 * icall.c (ves_icall_InternalInvoke): Handle the case where the
1681 method doesn't have the correct instantiation because it's shared
1682 generic code. Fixes #473999.
1684 2009-02-11 Zoltan Varga <vargaz@gmail.com>
1686 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
1688 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
1690 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
1692 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
1694 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
1696 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
1697 and recheck the cache for dups after it.
1699 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
1701 Fixes one of the deadlocks found in #473150.
1703 2009-02-11 Bill Holmes <billholmes54@gmail.com>
1705 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
1706 For Win32, add additional break conditions for accept.
1708 Code is contributed under MIT/X11 license.
1710 2009-02-10 Zoltan Varga <vargaz@gmail.com>
1712 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
1713 lazily initialize the native wrapper cache.
1714 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
1715 cache, since they are different from the normal wrappers.
1717 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
1719 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
1720 AOT compiled native wrappers.
1722 2009-02-09 Geoff Norton <gnorton@novell.com>
1725 * security-core-clr.c: Allow enabling core-clr from the embedding
1728 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1730 * socket-io.c: when requesting all the local ips, if there are no
1731 interfaces up and running, MS returns 127.0.0.1.
1733 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1735 * mono-perfcounters-def.h: processor time is an inverse time.
1738 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1740 * socket-io.c: an empty host name returns the list of local IPs.
1741 Fixes bug #386637 part 1/2.
1743 2009-02-07 Zoltan Varga <vargaz@gmail.com>
1745 * verify.c (mono_class_interface_implements_interface): Call
1746 mono_class_setup_interfaces ().
1747 (merge_stacks): Ditto.
1749 2009-02-06 Zoltan Varga <vargaz@gmail.com>
1751 * class.c (mono_class_setup_interfaces): New function to lazily initalize
1753 (mono_generic_class_get_class): Don't initalize klass->interfaces.
1754 (mono_generic_class_get_class): Ditto.
1756 2009-02-06 U-QUACK\miguel <miguel@quack>
1758 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
1759 they live in security.c
1761 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
1762 another bit from Paolo's code.
1764 2009-02-06 Zoltan Varga <vargaz@gmail.com>
1766 * object.c (build_imt_slots): Add a small optimization to avoid inflating
1767 methods which will be discarded by add_imt_builder_entry ().
1769 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
1772 * loader.c: Add a statistics for the size of the memberref signature cache.
1774 * loader.c (find_cached_memberref_sig): New helper function.
1775 (cache_memberref_sig): Ditto.
1777 * loader.c: Cache the result of parsing memberref signatures, since otherwise
1778 they will be parsed again for every generic instantiation, leading to unbounded
1781 2009-02-05 Zoltan Varga <vargaz@gmail.com>
1783 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
1784 parameters of generic methods.
1786 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
1787 after the original method is copied to the inflated method.
1788 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
1790 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
1791 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
1793 * class.c metadata.c: Update after the changes above.
1795 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
1797 * metadata-verify.c: Simplified error handling and added
1798 section table validation.
1800 2009-02-05 Zoltan Varga <vargaz@gmail.com>
1802 * class-internals.h (MonoClassExt): New structure containing rarely used
1803 fields of MonoClass.
1804 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
1805 through a new 'ext' field.
1807 * class.c (mono_class_alloc_ext): New helper function to allocate
1810 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
1812 2009-02-05 Mark Probst <mark.probst@gmail.com>
1814 * object.c (mono_object_get_virtual_method): Properly inflate
1815 generic methods. Fixes #472692.
1817 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
1819 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
1820 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
1821 for the parent type, the created type must be ready to be used on a generic
1823 We fill this_arg/byval_arg if the parent is a generic instance to make sure
1824 we won't have duplicated entries in generic_inst_cache.
1828 2009-02-05 Miguel De Icaza <miguel@novell.com>
1830 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
1831 replace with plain BSD per the comments on the bug MONO77637.
1833 2009-02-05 Zoltan Varga <vargaz@gmail.com>
1835 * class.c (mono_class_get_generic_class): New accessor function.
1836 (mono_class_get_generic_container): Ditto.
1838 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
1839 fields, similar to the ones in MonoMethod.
1841 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
1842 (mono_class_create_from_typedef): Set klass->is_generic if needed.
1844 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
1846 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
1847 the same information as element_class->byval_arg.
1849 * class.c reflection.c: Remove references to class->byval_arg.
1851 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
1852 klass->enum_basetype directly.
1854 * verify.c metadata.c object.c icall.c reflection.c: Use
1855 mono_class_enum_basetype () instead of accessing klass->enum_basetype
1858 2009-02-04 Miguel de Icaza <miguel@novell.com>
1860 * icall-def.h: Remove internal calls for sockets when
1861 DISABLE_SOCKET is defined, file system writing features when the
1862 OS only support reading and not writing data and Policy support if
1863 the Policy is disabled.
1865 * image.c (do_mono_image_open): Apply Paolo's patches for using
1866 mono_file_map_ APIs here.
1868 * assembly.c: Add support for platforms to avoid prefix
1871 2009-02-04 Zoltan Varga <vargaz@gmail.com>
1873 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
1876 * class.c (mono_class_inflate_generic_class): New helper function.
1878 * class.c: Use mono_class_inflate_generic_class in a few places. Add
1879 statistics for inflated methods/classes.
1881 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
1883 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
1884 the call is made from Delegate.CreateDelegate () for the invoke method of
1887 * loader.c: Add a statistics for the memory occupied by inflated signatures.
1889 * metadata.c (mono_metadata_signature_size): New helper function.
1891 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
1894 * metadata.c (inflated_method_in_image): Avoid calling
1895 mono_method_signature () if the method does not already have a signature.
1897 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
1899 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
1900 valuetype is compatible with target type, check by inheritance as a
1901 VT is not really compatible with System.ValueType, for example.
1903 * verify.c (do_invoke_method): Improve error message.
1905 * verify.c (do_box_value): If boxing a nullable, use the type argument
1908 * verify.c (do_newobj): Improve error message.
1912 2009-02-03 Miguel de Icaza <miguel@novell.com>
1914 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
1916 2009-02-03 Mark Probst <mark.probst@gmail.com>
1918 * generic-sharing.c: Don't hold domain lock when calling
1919 instantiate_other_info(). Fixes #471958.
1921 * domain-internals.h, loader.c: Describe locking policy of domain
1922 lock vs loader lock.
1924 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
1926 * verify.c (mono_delegate_signature_equal): Make it possible to check
1927 first-arg-bound delegates to static method.
1929 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
1930 static methods with the first arg bound.
1934 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
1936 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
1939 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
1940 under strict mode. Any type, when boxed can be seen as a reference type.
1944 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
1946 * object.h: The lower bound of an array is a signed integer value.
1947 Introduce mono_array_lower_bound_t typedef. It should be used instead of
1948 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
1950 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
1951 calculate the upper bound.
1955 2009-02-02 Miguel de Icaza <miguel@novell.com>
1957 From Paolo's work, refactored, cleared up:
1959 * threadpool.c, icall.c: ifdef code that requires a working socket
1962 * metadata.c (mono_metadata_field_info): Do not attempt to return
1963 a value from a function declared as void.
1965 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
1966 from the console stack.
1968 * assembly.c: use strrchr instead of rindex.
1970 * class.c, object.c, marshal.c, icall.c, reflection.c: include
1971 alloca.h on systems that have it.
1973 * environment.c: Avoid code that uses stuff from
1976 * appdomain.c: Include sys/time.h.
1978 * console-io.c: include sys/ioctl.h if it is available.
1980 2009-02-03 Zoltan Varga <vargaz@gmail.com>
1982 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
1984 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
1987 * marshal.c: Set mb->skip_visibility instead of setting it on the method
1988 after it was created and cached, as the later is not thread safe.
1990 2009-02-02 Zoltan Varga <vargaz@gmail.com>
1992 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
1993 called while the debugging module is not initialized. Fixes #471669.
1995 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
1997 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
2001 2009-02-02 Mark Probst <mark.probst@gmail.com>
2003 * generic-sharing.c (lookup_or_register_other_info): Make sure the
2004 loader lock is not taken while the templates lock is held. Fixes
2007 2009-02-02 Mark Probst <mark.probst@gmail.com>
2009 * metadata.c (type_in_image): Added a check to fix a monodis
2012 2009-02-02 Zoltan Varga <vargaz@gmail.com>
2014 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
2017 * object.c (mono_runtime_invoke_array): Ditto.
2019 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
2020 freeing wrappers of dynamic methods.
2022 * loader.c (mono_free_method): Call it. Fixes #463323.
2024 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
2025 methods taking vtype/byref arguments, to fix yet another bug caused by
2026 the sharing of runtime invoke wrappers. Partly fixes #471259.
2028 2009-02-01 Zoltan Varga <vargaz@gmail.com>
2030 * debug-mono-symfile.c (check_line): Return NULL instead of returning
2031 <first file in file table>:1 when the IL offset does not have an associated
2034 2009-01-31 Zoltan Varga <vargaz@gmail.com>
2036 * mono-debug.c (mono_debug_lookup_locals): New function to return local
2037 variable info for a method.
2039 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
2041 2009-01-30 Jb Evain <jbevain@novell.com>
2043 * pedump.c: reuse code from monodis to make sure pedump honors
2044 MONO_PATH, which is needed to verify net_2_1 assemblies.
2046 2009-01-29 Zoltan Varga <vargaz@gmail.com>
2048 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
2049 there is no line number info.
2051 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
2053 Avoid some MonoType allocations
2054 * reflection.c (mono_reflection_initialize_generic_parameter):
2055 Reuse MonoType from param->pklass rather than allocating one.
2056 (mono_dynamic_image_free): Update to changes.
2058 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
2060 Rearrange some code to improve consistency
2061 * reflection.c (mono_reflection_setup_generic_class): Move body ...
2062 (mono_reflection_initialize_generic_parameter): ... here.
2064 2009-01-28 Zoltan Varga <vargaz@gmail.com>
2066 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
2067 with type constraints as an experiment.
2069 * boehm-gc.c (on_gc_notification): Update mono_stats.
2071 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
2073 Avoid some allocations
2074 * class-internals.h (_MonoGenericInst::type_argv): Convert from
2075 pointer to tail array to avoid extra allocation.
2076 * metadata.c (free_generic_inst): Update to changes.
2077 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
2080 2009-01-27 Zoltan Varga <vargaz@gmail.com>
2082 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
2083 return TRUE if the two type objects are the same.
2085 2009-01-26 Zoltan Varga <vargaz@gmail.com>
2087 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
2088 (mono_class_native_size): Use klass->marshal_info->min_align instead of
2089 klass->min_align, since klass->min_align contains the managed alignment,
2090 while the native alignment can be different, like for longs on x86.
2093 * class-internals.h (MonoMarshalType): Add a min_align field.
2095 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
2097 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
2100 2009-01-26 Zoltan Varga <vargaz@gmail.com>
2102 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
2103 some comments about the usage of the used_regs field.
2105 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
2108 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2110 * appdomain.c: return NULL instead of throwing FileNotFoundException
2111 when LoadAssembly() fails.
2113 2009-01-23 Mark Probst <mark.probst@gmail.com>
2115 * metadata.c (mono_metadata_generic_param_equal): Only compare the
2116 image if the owner is NULL. Fixes the AOT failures.
2118 2009-01-23 Zoltan Varga <vargaz@gmail.com>
2120 * metadata.c (mono_metadata_load_generic_params): Initialize the
2121 MonoGenericParam structure using memset so the image field is initialized
2124 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2126 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
2129 2009-01-21 Zoltan Varga <vargaz@gmail.com>
2131 * class.c (mono_class_setup_vtable_general): In the generic instance
2132 optimization, set method->slot for abstract virtual methods. Fixes part of
2135 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2137 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
2138 which signals that the unloading has started but all appdomain services must
2141 * appdomain.c (mono_domain_unload): The initial state for unloading now
2142 is unloading_start and we switch to unloading after the managed call to
2143 AppDomain::DomainUnload has finished.
2145 The new unloading state has to be created because managed code in the
2146 DomainUnload event can depend on things like the threadpool still working.
2147 The domain must remain fully functional while the event executes.
2149 This shown as an issue due to Process::WaitForExit, which waits for
2150 async reads of stdout and stderr to complete. Since those are processed
2151 in the threadpool the code deadlocks because the DomainUnload callback
2152 waits for the async read finished event, which should have been set by a
2153 threadpool job but has been discarded due to the domain been in unload
2156 2009-01-21 Mark Probst <mark.probst@gmail.com>
2158 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
2161 2009-01-21 Mark Probst <mark.probst@gmail.com>
2163 * reflection.c (resolve_object): For fields, inflate the class and
2164 then get the field in the inflated class.
2166 2009-01-20 Mark Probst <mark.probst@gmail.com>
2168 * object-internals.h (struct _MonoException): Added a comment
2169 explaining the new use of trace_ips.
2171 2009-01-20 Mark Probst <mark.probst@gmail.com>
2173 * generic-sharing.c (inflate_other_data): Inflate array methods
2176 * loader.c, class-internals.h: Rename search_in_array_class() to
2177 mono_method_search_in_array_class() and make it non-static.
2179 2009-01-19 Zoltan Varga <vargaz@gmail.com>
2181 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
2182 Hopefully fixes #458168.
2184 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
2186 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
2187 as it is performed elsewhere.
2189 Code is contributed under MIT/X11 license
2191 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
2193 * mono-perfcounters-def.h: Add counters for asp.net requests total and
2195 * object.c (mono_raise_exception): Increment the exceptions total
2196 counter when an exception is thrown.
2197 * class-internals.h: Add a location for storing the total number of
2198 asp.net requests served.
2199 * mono-perfcounters.c: Implement update support for asp.net counters
2200 from the class libraries. Implement read support for asp.net counters
2201 and exceptions total counter.
2203 2009-01-19 Zoltan Varga <vargaz@gmail.com>
2205 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
2206 accessing klass->methods. Fixes #467385.
2208 2009-01-18 Zoltan Varga <vargaz@gmail.com>
2210 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
2211 for byval arguments without an [Out] attribute. Fixes #467212.
2213 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
2214 Fix compilation under android.
2216 * sgen-gc.c: Instead of scanning gray objects after all roots have been
2217 processed, scan them directly after they are copied, to achieve better locality
2220 * socket-io.c: Applied patch from Koushik Dutta
2221 (koush@koushikdutta.com). Disable IPV6 when running under android.
2223 2009-01-18 Zoltan Varga <vargaz@gmail.com>
2225 * icall.c (ves_icall_InternalExecute): Add write barriers.
2227 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
2230 * sgen-gc.c: Implement write barriers in IL code.
2232 2009-01-17 Geoff Norton <gnorton@novell.com>
2234 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
2236 2009-01-17 Geoff Norton <gnorton@novell.com>
2238 * image.c: When unloading the image->references table, there can be gaps
2239 in it. Ensure that we iterate every entry to avoid leaking assembly references
2240 when unloading an appdomain.
2242 2009-01-16 Zoltan Varga <vargaz@gmail.com>
2244 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
2245 speed up ptr-in-nursery checks.
2247 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
2248 threads_lock () to prevent deadlocks.
2250 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
2251 does not need to be scanned during minor collections, since writes to it
2252 must use write barriers.
2254 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
2256 * metadata-verify.c: Add pe nt header verification.
2258 2009-01-15 Zoltan Varga <vargaz@gmail.com>
2260 * gc.c: Fix a few warnings when using SGEN.
2262 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
2264 * metadata-verify.c: Add pe optional header verification.
2266 2009-01-15 Zoltan Varga <vargaz@gmail.com>
2268 * sgen-gc.c: Add support for user defined marker functions, used by
2269 MonoGHashTable to avoid registering a GC root for every hash node.
2271 2009-01-14 Zoltan Varga <vargaz@gmail.com>
2273 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
2274 non-pinned roots into separate hashes to avoid having to traverse them
2275 in functions which are only interested in one kind.
2277 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
2279 * metadata-verify.c: Add pe header machine field verification.
2281 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
2283 * metadata-verify.c: Add pe header size verification.
2285 2009-01-14 Zoltan Varga <vargaz@gmail.com>
2287 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
2288 using the GC, they don't contain references.
2290 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
2292 2009-01-13 Geoff Norton <gnorton@novell.com>
2294 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
2295 AppDomains created on the native side can be cleaned up on the native side.
2297 2009-01-13 Geoff Norton <gnorton@novell.com>
2299 * appdomain.c: Ensure that we call mono_context_init for the embedding api
2300 as well as the managed api.
2302 2009-01-13 Geoff Norton <gnorton@novell.com>
2304 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
2305 with a MonoAppDomain initialized against it.
2307 2009-01-13 Zoltan Varga <vargaz@gmail.com>
2309 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
2311 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
2313 * marshal.c: Avoid setting the exception clauses after a method has been entered
2314 into the wrapper caches. Fixes #465700.
2316 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
2318 (mono_mb_create_method): Set the clauses from the method builder.
2320 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
2322 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
2323 Patch from Makoto Kishimoto.
2325 2009-01-13 Zoltan Varga <vargaz@gmail.com>
2327 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
2328 encoding them as ROOT_DESC_COMPLEX.
2329 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
2331 2009-01-12 Zoltan Varga <vargaz@gmail.com>
2333 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
2334 no longer point to the nursery.
2336 * sgen-gc.c: Add a few comments/FIXMEs.
2338 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
2340 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
2341 initialization of the various _method variables thread safe. Fixes
2344 2009-01-12 Mark Probst <mark.probst@gmail.com>
2346 * domain.c, domain-internals.h: Remove the shared_generics_hash
2347 and its lookup functions.
2349 2009-01-12 Bill Holmes <billholmes54@gmail.com>
2351 * socket-io.c: Fixing the MSVC build.
2353 Code is contributed under MIT/X11 license.
2355 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
2357 * metadata-verify.c: Add pe header watermark verification.
2359 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
2361 * metadata-verify.c: Add lfanew verification.
2363 2009-01-12 Jb Evain <jbevain@novell.com>
2365 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
2366 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
2368 2009-01-10 Zoltan Varga <vargaz@gmail.com>
2370 * socket-io.c: Fix the build.
2372 * environment.c: Fix an #ifdef.
2374 2009-01-09 Zoltan Varga <vargaz@gmail.com>
2376 * threadpool.c (async_invoke_thread): Handle the wait function returning
2377 WAIT_IO_COMPLETION as well.
2378 (async_invoke_io_thread): Ditto.
2380 2009-01-09 Bill Holmes <billholmes54@gmail.com>
2382 * threads.c: Fixing the Windows build.
2384 Code is contributed under MIT/X11 license.
2386 2009-01-09 Zoltan Varga <vargaz@gmail.com>
2388 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
2390 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
2391 the thread to wait again.
2393 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
2395 * metadata-verify.c: Initial skeleton of the metadata verifier.
2397 * pedump.c: Add support for the metadata verifier.
2399 * verify-internal.h: Export the whole assembly metadata verifier function.
2401 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
2403 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
2405 2009-01-09 Zoltan Varga <vargaz@gmail.com>
2407 * Makefile.am: Upgrade dtrace-prelink.sh location.
2409 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
2411 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
2412 well. Otherwise the shutdown deadlock that happens on unix will can happen
2414 If the main thread code finishes too fast it's possible that the finalizer
2415 thread won't have executed yet, won't record itself as the finalizer thread
2416 and the shutdown sequence will wait on it forever.
2418 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
2420 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
2423 2009-01-08 Miguel de Icaza <miguel@novell.com>
2425 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
2426 Robert Jordan for pointing this out.
2428 2009-01-08 Christian Prochnow <cproch@seculogix.de>
2431 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
2432 ves_icall_System_IO_DriveInfo_GetDriveType.
2434 2009-01-07 Miguel de Icaza <miguel@novell.com>
2436 * icall.c: Wrap calls to mono_strtod in CriticalSection
2437 invocations when using eglib, to work around #464316.
2439 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
2441 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
2442 return value of GetCurrentDirectory to never access unitialized memory.
2444 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
2446 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
2447 return value of GetCurrentDirectory and expand the buffer if needed.
2451 2009-10-07 Tom Hindle <tom_hindle@sil.org>
2453 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
2454 Adding a call to mono_init_com_types.
2456 Code is contributed under MIT/X11 license.
2458 2009-01-07 Geoff Norton <gnorton@novell.com>
2460 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
2461 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
2462 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
2463 be the value of the ip buffer.
2465 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
2467 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
2468 interfaces_packed here.
2470 Fixes part of #463294.
2472 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
2474 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
2476 Fixes part of #463294.
2478 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
2480 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
2481 is a boxed complex as well.
2483 Fixes part of #463294.
2485 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
2487 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
2488 control if a methodspec should be created for the generic method definition from external assemblies.
2489 Caching of methodspec is done using the handleref hash table.
2493 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
2495 * loader.c (find_method): When searching the interfaces of a class
2496 check the transitive closure of implemented interfaces.
2500 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
2502 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
2504 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
2506 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
2507 interfaces calculation to fill_valuetype_array_derived_types.
2509 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
2510 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
2513 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
2514 interfaces for valuetypes if needed.
2516 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
2517 for their basetype as well. Types are array expanded if rank is > 0.
2521 2008-12-30 Bill Holmes <billholmes54@gmail.com>
2523 * socket-io.h : Changing the signature of
2524 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
2527 * icall-def.h : Changing the signature of
2528 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
2530 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
2531 For Windows only. Avoid blocking when calling accept by
2532 querying for a connection via select. The loop also queries
2533 the thread state every 1000 micro seconds for the thread
2534 stop state. This will avoid the process hanging on shutdown
2535 when using a TcpChannel that is never connected to.
2537 Code is contributed under MIT/X11 license.
2539 2008-12-30 Marek Safar <marek.safar@gmail.com>
2541 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
2543 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
2545 * class.c (get_implicit_generic_array_interfaces): Extract common
2546 code to a helper function making it a lot easier on the eyes.
2548 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
2550 * class.c (get_implicit_generic_array_interfaces): If the internal
2551 enumerator is an interface inflate System.Object instead of itself.
2555 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
2557 * object.c (mono_runtime_invoke_array): Don't assert with
2558 byref nullable types.
2560 * marshal.c (mono_marshal_get_runtime_invoke): To handle
2561 byref nullables we unbox the object and store it on the
2563 We can't use the boxed object since it is the T of Nullable<T>
2564 and the boxed representation of a nullable it's underlying type
2566 We could cheat and create a boxed nullable and use the same
2567 machinery of other byref VTs but this feels like a hack and
2568 using the stack has the bonus of reducing heap pressure.
2572 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
2574 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
2579 2008-12-19 Bill Holmes <billholmes54@gmail.com>
2581 * icall-def.h : Adding an internal call definition for
2582 System.Environment.internalBroadcastSettingChange.
2584 * icall.c : Adding a Windows only implementation to broadcast a
2585 WM_SETTINGCHANGE when an environment variable has changed.
2587 Code is contributed under MIT/X11 license.
2589 2008-12-19 Mark Probst <mark.probst@gmail.com>
2591 * class.c, class-internals.h: Made
2592 mono_class_has_parent_and_ignore_generics() non-static.
2594 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
2596 * image.c: deal with the mmap failing when loading an image.
2598 2008-12-17 Geoff Norton <gnorton@novell.com>
2600 * threadpool.c: Ensure that the io_queue_lock is initialized
2601 in all circumstances, as we always attempt to cleanup against it.
2603 2008-12-17 Miguel de Icaza <miguel@novell.com>
2605 * icall.c (ves_icall_System_Environment_get_Platform): For
2606 compatibility reasons for existing client code we will keep
2607 returning 4 for a while.
2609 For how long will depend on the documentation being updated, and
2610 for us to give client code a chance to be updated.
2612 This reverts the original decison on #433108 since we did not
2613 catch roughly 33 instances of the broken code in our own source
2614 code base, we did not catch failures on the buildbots, and QA did
2615 not bring this as a problem.
2617 Only today I found some customer's code breaking due to our own
2618 class libraries not being fully updated and tracked it down to
2619 this change. I am reverting it because if we could not even get
2620 our story straight in our own code base, how can we hope that our
2621 end user code be fixed?
2623 As of this morning, our Wiki page that documents how to detect
2624 Unix had not been fixed.
2626 2008-12-16 Zoltan Varga <vargaz@gmail.com>
2628 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
2630 * class.c (mono_class_get_fields): Handle loading errors.
2632 2008-12-12 Mark Mason <mmason@upwardaccess.com>
2634 * metadata.c (mono_type_stack_size_internal): If SIZEOF_REGISTER > SIZEOF_VOID_P then use SIZEOF_REGISTER as the size and alignment of the stack slots.
2636 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
2638 * mono-perfcounters.c: avoid warning.
2640 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
2642 * reflection.c (ensure_runtime_vtable): Work on generic instances and
2643 make sure all interfaces have MonoClass::interface_id set.
2645 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
2646 method table is property set.
2648 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
2650 * class.c: New function mono_class_setup_interface_id that setup
2651 MonoClass::interface_id if needed.
2653 * class-internals.h: Export new function.
2655 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
2657 * class.c: Add code to sanity check the vtable after setup_vtable_general
2660 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
2662 * icall.c: make Assembly.GetExecutingAssembly work properly when
2663 reflection is used to invoke the method.
2666 2008-12-11 Mark Probst <mark.probst@gmail.com>
2668 * metadata/generic-sharing.c: Look for constraints in all type
2669 arguments, not just the first one.
2671 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
2673 * appdomain.c: return the correct CodeBase for an Assembly instance
2674 that was loaded from the shadow-copy directories.
2677 2008-12-10 Zoltan Varga <vargaz@gmail.com>
2679 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
2681 * sgen-gc.c (check_object): New debugging helper function.
2683 * object.c: Fix calls to mono_value_copy_array ().
2685 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
2687 * class.c (mono_class_setup_fields): If working on an inflated class
2688 first check if the generic definition did init with success.
2692 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
2694 pedump.c (main): Fix a warning.
2696 2008-12-10 Bill Holmes <billholmes54@gmail.com>
2698 * object-internals.h : Adding a definition for
2699 MonoReflectionComVisibleAttribute.
2701 * marshal.c (cominterop_com_visible) : Method added to check the
2702 ComVisible attribute of a class.
2704 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
2705 cominterop_raise_hr_exception added to consolidate common code
2706 to raise hr exceptions.
2708 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
2709 if a managed class should support IDispatch.
2712 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
2713 Added additional checks for managed object when getting
2714 an IDispatch interface.
2716 Code is contributed under MIT/X11 license.
2718 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
2720 pedump.c (main): Handle mono_get_method () returning NULL.
2722 2008-12-09 Zoltan Varga <vargaz@gmail.com>
2724 * marshal.h: Fix a warning.
2726 2008-12-09 Bill Holmes <billholmes54@gmail.com>
2728 * marshal.c : Adding cominterop_release_all_rcws to release all
2729 runtime callable wrappers held by the runtime.
2731 * marshal.h : Adding declaration for cominterop_release_all_rcws.
2733 Code is contributed under MIT/X11 license.
2735 2008-12-09 Zoltan Varga <vargaz@gmail.com>
2737 * metadata.c (mono_image_alloc_lock): New helper function.
2738 (mono_image_alloc0_lock): Ditto.
2740 * metadata.c: Use the alloc_lock () helper functions for allocating
2741 memory from the image mempool.
2743 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
2745 * class.c (mono_class_from_generic_parameter): Document it's
2746 locking behavior. Fix double checked locking here, we stored in
2747 param->pklass a partially initialized MonoClass and no membar was used.
2749 2008-12-05 Marek Habersack <mhabersack@novell.com>
2751 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
2752 (3) functions are present in the C library use them to do the
2753 job. If they are absent, make sure that the sum of int_part and
2754 dec_part is rounded before returning. This is necessary due to the
2755 division of dec_part by the power of 10 before the final addition
2756 is performed - if the result is not rounded in some cases it will
2757 yield invalid results.
2759 2008-12-04 Zoltan Varga <vargaz@gmail.com>
2761 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
2762 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
2763 instruction instead of a pointer constant.
2765 2008-12-03 Zoltan Varga <vargaz@gmail.com>
2767 * loader.c (mono_method_get_header): Do most of the work outside the
2768 loader lock, to avoid assembly load hook deadlocks.
2770 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
2771 (mono_metadata_parse_type_full): Ditto.
2773 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
2775 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
2776 Make the stack depth fixed. Ensure proper argument passing to the backtrace
2777 funtions. Finally, use a lock to produce well ordered output.
2779 The lock looks silly, as all calls to the corlib mempool should be guarded
2780 with the loader lock, but for some reason this fact doesn't help.
2782 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
2784 2008-12-02 Mark Probst <mark.probst@gmail.com>
2786 * socket-io.c: 64 bit big-endian fixes.
2788 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2790 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
2791 targets that require strict compatibility between the types.
2793 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
2794 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
2795 Kill the strict argument and create a new one valuetype_must_be_boxed.
2797 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
2798 state that all valuetypes must be boxed.
2802 2008-11-29 Kornél Pál <kornelpal@gmail.com>
2804 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
2805 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
2807 Contributed under MIT/X11 license.
2809 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
2811 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
2812 the inflate_generic_type machinery should handle it.
2814 This avoids a crash when the field's flags is zero and it's type is
2816 What happens is that mono_metadata_parse_type_full will see that opt_attrs
2817 is zero and will return one of the cached built-in primitive types. Since
2818 those types live in read-only memory, the code that copies it crashes.
2820 2008-11-28 Mark Probst <mark.probst@gmail.com>
2822 * object.c: Don't put function descriptors into generalized IMT
2825 2008-11-28 Mark Probst <mark.probst@gmail.com>
2827 * class.c: Enable generic code sharing on PPC64.
2829 2008-11-27 Mark Probst <mark.probst@gmail.com>
2831 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
2834 * generic-sharing.c: Allocate the method template slists from the
2835 image mempool so it doesn't leak.
2837 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
2839 * class.c (generic_array_methods): Release the linked list.
2841 2008-11-27 Mark Probst <mark.probst@gmail.com>
2843 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
2844 invocation to g_utf16_to_utf8().
2846 2008-11-26 Mark Probst <mark.probst@gmail.com>
2848 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
2849 arguments on big endian archs.
2851 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
2853 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
2854 the type name (test added in corlib).
2856 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
2858 * pedump.c: initialize perf. counters. Fixes a segv.
2860 2008-11-25 Martin Baulig <martin@ximian.com>
2862 * mono-debug-debugger.c
2863 (mono_debugger_runtime_invoke): Return the exception object if an
2864 exception was thrown. Visual Studio displays the exception object
2865 in the locals window.
2867 2008-11-24 Mark Probst <mark.probst@gmail.com>
2869 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
2872 2008-11-24 Mark Probst <mark.probst@gmail.com>
2874 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
2875 MONO_TYPE_U are sizeof (gpointer), too.
2877 2008-11-24 Mark Probst <mark.probst@gmail.com>
2879 * marshal.c (mono_type_native_stack_size): Fixed size and
2880 alignment for reference types.
2882 2008-11-23 Mark Probst <mark.probst@gmail.com>
2884 * class.c (mono_class_generic_sharing_enabled): Disable generic
2885 code sharing for PPC64.
2887 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
2889 * icall.c (mono_method_get_equivalent_method): Make sure
2890 method->klass->methods is inited before looping over it.
2892 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
2894 * object.c: when calling ExecuteAssembly in a newly created domain,
2895 the configuration file and application base are already set up.
2896 Bug #446353 take 2 fixed.
2898 2008-11-20 Zoltan Varga <vargaz@gmail.com>
2900 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
2901 Fixes #444715. Fix a warning.
2903 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
2905 * appdomain.c: write the full path of the assembly to the .ini file
2906 created when "shadow-copying"
2909 2008-11-18 Zoltan Varga <vargaz@gmail.com>
2911 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
2912 if signature==FALSE.
2914 2008-11-17 Bill Holmes <billholmes54@gmail.com>
2916 * marshal.h : Fix the cygwin build.
2917 marshal.c:12442: undefined reference to `_IID_IMarshal'
2919 Code is contributed under MIT/X11 license.
2921 2008-11-17 Bill Holmes <billholmes54@gmail.com>
2923 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
2924 free threaded marshaler when QueryInterface is called on a COM callable
2925 wrapper requesting the IMarshal interface.
2927 Code is contributed under MIT/X11 license.
2929 2008-11-14 Zoltan Varga <vargaz@gmail.com>
2931 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
2933 * reflection.c (mono_type_get_object): Special case the very common
2936 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
2939 2008-11-13 Bill Holmes <billholmes54@gmail.com>
2941 * process.h : Adding method declaration for
2942 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
2944 * process.c : Adding implementation for
2945 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
2947 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
2948 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
2950 Code is contributed under MIT/X11 license.
2952 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
2954 * appdomain.c (unload_thread_main): Clean up threadpool by
2955 calling mono_thread_pool_remove_domain_jobs.
2957 * domain-internals.h (struct _MonoDomain): Add new fields to
2958 help coordinate the cleanup of the threadpool.
2960 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
2961 that cleans up the threadpool of all jobs associated with an appdomain.
2962 It does that by cleaning up the queues and making sure all active
2963 threads are accounted.
2965 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
2966 unloaded or in the process of. Take this is such way that there is
2967 no race condition between another thread starting the unload and the
2968 current thread acknowledging it.
2970 * threadpool.c (async_invoke_thread): Same.
2972 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
2973 firing the new thread.
2975 * threadpool.c (start_tpthread): Same.
2977 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
2979 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
2981 2008-11-06 Jonathan Chambers <joncham@gmail.com>
2983 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
2984 Add support for DuplicateHandle.
2986 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
2987 Add support for DuplicateHandle.
2989 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
2990 Add support for DuplicateHandle.
2992 Code is contributed under MIT/X11 license.
2994 2008-11-06 Mark Probst <mark.probst@gmail.com>
2996 * class-internals.h: Make min_align into a whole byte.
2998 * class.c: Set min_align for SIMD types to 16.
3000 2008-11-05 Geoff Norton <gnorton@novell.com>
3002 * attach.c: Default the attacher to enabled for all cases including
3005 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
3007 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
3010 2008-11-04 Mark Probst <mark.probst@gmail.com>
3012 * monitor.c, monitor.h: New function for querying offsets of
3013 members of MonoThreadsSync.
3015 2008-11-04 Zoltan Varga <vargaz@gmail.com>
3017 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
3018 to speed up this function and to avoid the boundless memory growth caused by
3019 the signature_dup () calls.
3021 2008-11-02 Zoltan Varga <vargaz@gmail.com>
3023 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
3026 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
3029 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
3031 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
3034 * domain-internals.h: made mono_set_private_bin_path_from_config()
3036 * object.c: call the above function after setting the configuration
3037 file path for the root domain.
3040 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
3042 * assembly.c: when the assembly is loaded from an absolute path, end
3043 basedir with a directory separator.
3046 2008-10-30 Mark Probst <mark.probst@gmail.com>
3048 * monitor.c (mono_monitor_get_fast_enter_method): If
3049 CompareExchange is not available, don't create the fastpath
3050 instead of asserting. (The method is missing in the 1.1 profile.)
3052 2008-10-30 Mark Probst <mark.probst@gmail.com>
3054 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
3056 * monitor.c, monitor.h: Code for generating Monitor.Enter and
3057 Monitor.Exit IL fastpaths.
3059 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3061 * class.c (mono_class_create_from_typedef): Added Vector2ul.
3063 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
3065 * class.c (mono_class_create_from_typedef): Added Vector2l.
3067 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
3069 * class.c (mono_class_create_from_typedef): Added Vector2d.
3071 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
3073 * appdomain.c: translate \ into / for cache_path.
3074 * domain-internals.h: new mono_is_shadow_copy_enabled().
3075 * icall.c: (fill_reflection_assembly_name) do the same path
3076 manipulations that get_code_base does.
3077 (get_code_base) use mono_is_shadow_copy_enabled.
3079 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
3081 * appdomain.c: shadow-copied assemblies go to CachePath +
3082 ApplicationName when both are set. DynamicBase has nothing to do with
3086 2008-10-26 Zoltan Varga <vargaz@gmail.com>
3088 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
3089 STANDALONESIG table.
3091 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
3092 standalone signatures.
3094 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
3095 comparison code: instead of comparing the signatures using a custom
3096 equals function, transform them to a common signature and compare that. This
3097 works better with AOT.
3099 2008-10-25 Zoltan Varga <vargaz@gmail.com>
3101 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
3103 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
3104 call for generic instances.
3105 (mono_class_setup_properties): Call setup_properties () before accessing
3108 * class.c (mono_class_get_virtual_methods): New helper function to iterate
3109 over the virtual methods of a class using metadata if possible, avoiding the
3110 creation of MonoMethod's for non-virtual methods.
3112 * class.c (mono_class_setup_vtable_general): Rewrite this to use
3113 get_virtual_methods () to iterate over the virtual methods of classes.
3115 2008-10-25 Martin Baulig <martin@ximian.com>
3117 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
3119 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3121 * class.c (mono_class_create_from_typedef): Added Vector4i.
3123 2008-10-24 Mark Probst <mark.probst@gmail.com>
3125 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
3126 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
3127 special-casing applies to eliminate the call completely.
3129 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3131 * class.c (mono_class_create_from_typedef): Added Vector8s.
3133 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
3135 * class.c (mono_class_create_from_typedef): Added Vector16sb.
3137 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
3139 * icall.c: get rid of annoying warning.
3141 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
3143 * threadpool.c: in 1.x, if you change the background status of the
3144 threadpool thread, it's not reset.
3145 Remove unnecessary calls to SetState.
3147 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3149 * threadpool.c: asynchronously create a set of idle threads upon first
3150 use of the threadpool. SetMinThreads will now start the appropriate
3151 number of idle threads if they are not already running. The default is
3152 1 threadpool thread per CPU. Increased the maximum number of threads
3155 2008-10-22 Martin Baulig <martin@ximian.com>
3157 Revert r116521 from Zoltan, it breaks the debugger:
3159 * class.c (mono_class_get_virtual_methods): New helper function to iterate
3160 over the virtual methods of a class using metadata if possible, avoiding the
3161 creation of MonoMethod's for non-virtual methods.
3163 * class.c (mono_class_setup_vtable_general): Rewrite this to use
3164 get_virtual_methods () to iterate over the virtual methods of classes.
3166 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3168 * threads.c: when creating a threadpool thread, set its state to
3170 * threadpool.c: reset the background state of a threadpool thread
3171 after finishing each work item
3174 2008-10-22 Zoltan Varga <vargaz@gmail.com>
3176 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
3178 * class.c (mono_class_setup_vtable_general): Add an optimized version for
3179 generic instances which works by inflating the methods in the container
3182 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
3183 variant which doesn't make a copy if no inflation was done.
3184 (mono_class_setup_fields): Use it.
3186 * metadata.c (mono_metadata_get_shared_type): New helper function to
3187 return a shared instance of a given MonoType.
3189 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
3190 a copy of most non-generic types.
3192 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3194 * threadpool.c: remove one more GetSystemInfo () call.
3196 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
3198 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
3199 use the code in mono-proclib.h to get processor information.
3201 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3203 * appdomain.c: fixed the logic that determines whether assemblies in a
3204 directory are "shadow-copied" or not. Bug #433483 fixed.
3206 2008-10-22 Zoltan Varga <vargaz@gmail.com>
3208 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
3211 2008-10-21 Zoltan Varga <vargaz@gmail.com>
3213 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
3216 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
3217 reflection.c: Use mono_field_get_name () for accessing a field's name.
3219 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
3222 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
3225 * loader.c (find_method_in_class): Reenable the metadata optimization by
3226 not using it for generic instances.
3228 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
3229 data/def_type fields from MonoClassField into a separate structure.
3230 (struct MonoClassField): Remove data/def_type fields.
3231 (struct _MonoClass): Add a 'field_def_values' array to store the default
3232 values/RVA for fields.
3234 * class.c reflection.c: Update after the changes.
3236 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
3237 for accessing field->data.
3239 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
3241 * loader.c (find_method_in_class): Revert the last change for now as
3242 it breaks Mono.C5 unit tests.
3244 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
3245 'field_generic_types' and 'field_objects' which contain the information
3246 previously stored in MonoInflatedField.
3247 (MonoInflatedField): Delete.
3248 (struct _MonoClassField): Delete 'generic_info' field.
3250 * reflection.c: Store the information which was previously in
3251 field->generic_info in MonoDynamicGenericClass instead.
3253 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
3254 MonoClassField changes.
3256 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
3258 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
3259 store the value inside the data array of the MonoMethodWrapper.
3260 This saves memory, is faster and fixes the lifetime issues (methods
3261 were never removed from the hash previously). May also fix bug#436996.
3263 2008-10-21 Zoltan Varga <vargaz@gmail.com>
3265 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
3266 generic instances, compute the type from the generic definition instead of
3267 looking in field->generic_info.
3269 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
3270 for inflated fields, the only user was get_fieldref_token () which no
3273 * class.c (mono_class_init): Revert the last change as it seems to cause
3276 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
3277 bytes on 64 bit platforms.
3279 * object.c (mono_class_create_runtime_vtable): Fix a warning.
3281 * object.c (mono_class_create_runtime_vtable): Don't initalize
3282 field->data/field->def_type here, it is done lazily by
3283 mono_class_get_field_default_value ().
3285 * icall.c (ves_icall_get_enum_info): Call
3286 mono_class_get_field_default_value () instead of directly accessing
3287 field->data and field->def_type.
3289 * object.c (get_default_field_value): Ditto.
3291 * class.c (mono_field_get_data): Ditto.
3293 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
3294 call for generic instances.
3296 * loader.c (find_method_in_class): If klass != from_class, then inflate
3297 the method with the context of from_class, since the caller assumes this.
3299 2008-10-20 Zoltan Varga <vargaz@gmail.com>
3301 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
3302 for accessing method->slot.
3304 2008-10-20 Cedric Vivier <cedricv@neonux.com>
3306 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
3308 2008-10-19 Zoltan Varga <vargaz@gmail.com>
3310 * class.c (mono_method_get_vtable_index): Use
3311 mono_method_get_vtable_slot () for accessing method->slot.
3313 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
3314 accessing klass->methods.
3316 * class.c (mono_method_get_vtable_slot): New helper function.
3317 (mono_class_get_vtable_entry): Ditto.
3318 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
3319 accessing method->slot.
3321 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
3322 method to get_inflated_method ().
3324 * class.c (mono_class_get_inflated_method): New helper method to obtain
3325 a method of an inflated class without calling setup_methods ().
3326 (mono_class_get_cctor): Use get_inflated_method.
3328 * generic-sharing.c (mono_class_get_method_generic): Ditto.
3330 * marshal.c image.c: Lazily create all the marshal caches.
3332 * image.c (mono_image_init): Move initialization of runtime_invoke
3333 caches to marshal.c.
3335 * marshal.c (get_cache): New helper function to lazily initialize a
3337 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
3339 * debug-helpers.c (mono_method_full_name): Include generic arguments.
3341 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
3343 * loader.c: fixed check for interface type.
3345 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3347 * appdomain.c: check for NULL setup before it's referenced.
3350 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3352 * class.c: remove the unused old vtable setup code.
3354 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3356 * class.c: don't depend on interface order in
3357 setup_interface_offsets (bug #435777).
3358 * reflection.c: sort the InterfaceImpl table (patch from
3359 Jb Evain <jbevain@novell.com>).
3361 2008-10-13 Zoltan Varga <vargaz@gmail.com>
3363 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
3364 the low level assemblies lock.
3366 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
3368 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
3369 object.c, reflection.c, socket-io.c, threads.c: introduced
3370 mono_framework_version () to return the major framewrok version,
3371 changed the code that was using more complex patterns to use it.
3372 Return the correct value for PlatformID for OSX.
3374 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
3376 * icall-def.h, process.h, process.c: added an icall to get info about
3377 processes using mono-proclib.
3379 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
3381 * mono-perfcounters.c: use the mono-proclib functions to
3382 access process information.
3384 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3386 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
3387 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
3388 reflection.c: remove rawbuffer usage: mmap support is more sanely
3389 provided by utils/mono-mmap.
3391 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
3393 * gc.c: use posix semaphores when possible so that
3394 mono_gc_finalize_notify() is signal safe.
3396 2008-10-11 Zoltan Varga <vargaz@gmail.com>
3398 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
3399 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
3400 be #ifdef-ed out, the linker will remove the rest.
3402 * marshal.c: Implement DISABLE_COM.
3404 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
3406 2008-10-11 Miguel de Icaza <miguel@novell.com>
3408 * locales.c (string_invariant_compare_char): Optimization: do not
3409 call g_unichar_type unless we actually need the information.
3411 2008-10-10 Mark Probst <mark.probst@gmail.com>
3413 * object.c, class-internals.h: Also create remoting trampolines
3414 for generic methods. Pass the domain to the remoting trampoline
3415 creation function, too.
3417 2008-10-10 Zoltan Varga <vargaz@gmail.com>
3419 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
3421 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3423 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
3426 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3429 * locales.c: remove the use of g_strdown. Fixes bug #322313.
3431 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
3433 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
3434 for the least possible amount of time (extending the fix in r113458).
3436 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3438 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
3440 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
3442 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
3443 as possible simd intrinsic types.
3444 Optimized the test to check for the common prefix first.
3446 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
3448 * class.c: back out part of a broken optimization committed on
3449 May 23th (bug #433908).
3451 2008-10-09 Mark Probst <mark.probst@gmail.com>
3453 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
3454 Win32. Should fix #432388 for most cases until we have the new
3457 2008-10-08 Zoltan Varga <vargaz@gmail.com>
3459 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
3460 instead of using inst->id so the hash is stable for AOT.
3462 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3465 * icall.c: create a .ini file for shadow-copied assemblies that
3466 contains the location of the original assembly. Use this to return the
3467 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
3468 Also fix the number of '/' for windows when returning the CodeBase.
3471 2008-10-07 Bill Holmes <billholmes54@gmail.com>
3473 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
3475 Code is contributed under MIT/X11 license.
3477 2008-10-07 Bill Holmes <billholmes54@gmail.com>
3479 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
3480 if if the class vtable needs initialized.
3482 Code is contributed under MIT/X11 license.
3484 2008-10-07 Bill Holmes <billholmes54@gmail.com>
3486 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
3487 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
3488 STRING->BSTR, and CLASS->INTERFACE.
3490 Code is contributed under MIT/X11 license.
3492 2008-10-07 Marek Habersack <mhabersack@novell.com>
3494 * sysmath.h: changed the declaration of the
3495 ves_icall_System_Math_Round2 icall by adding an extra
3496 away_from_zero parameter.
3498 * sysmath.c (ves_icall_System_Math_Round2): added support for
3499 away from zero rounding. The icall now takes an extra boolean
3500 parameter to signal that away from zero operation is requested.
3502 2008-10-06 Zoltan Varga <vargaz@gmail.com>
3504 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
3505 the delegate klass so it can work with full-aot.
3506 (mono_marshal_get_delegate_end_invoke): Ditto.
3507 (mono_marshal_get_delegate_invoke): Ditto.
3509 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
3511 * gc.c, attach.h, attach.c: remove a bad pattern:
3512 add_finalizer_callback () is not implemented correctly, it can't
3513 without adding more overhead to the finalizer loop and it's not
3514 even needed, since we know exactly what we need to call, so there is
3515 no need to do so through an expensive function pointer.
3517 2008-10-04 Zoltan Varga <vargaz@gmail.com>
3519 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
3521 * attach.c (mono_attach_init): Remove the #ifdef.
3523 2008-10-04 Andreas Färber <andreas.faerber@web.de>
3525 * attach.c (mono_attach_init): Don't use
3526 mono_gc_add_finalizer_thread_callback when compiling without GC.
3529 Code is contributed under MIT/X11 license.
3531 2008-10-03 Zoltan Varga <vargaz@gmail.com>
3533 * class.c (mono_class_create_from_typedef): Remove the
3534 #ifndef DISABLE_SIMD stuff.
3536 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
3538 * class-internals.h (MonoClass): Added simd_type bit field.
3540 * class.c (mono_class_create_from_typedef): Check if type is a simd
3543 2008-10-03 Mark Probst <mark.probst@gmail.com>
3545 * object.c (mono_method_add_generic_virtual_invocation): Only add
3546 instantiations to the thunk whose count is at least as large as
3549 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3551 * icall.c: changed the Type of the exception thrown when trying to
3552 invoke a constructor on an abstract class. Part of the fix for bug
3555 2008-10-02 Mark Probst <mark.probst@gmail.com>
3557 * class.c, class-internals.h (mono_method_get_vtable_index): New
3558 function which returns the index into the vtable and properly
3559 handles inflated virtual generic methods.
3561 2008-10-01 Mark Probst <mark.probst@gmail.com>
3563 * object.c, domain.c, object-internals.h, domain-internals.h:
3564 Generalize IMT thunk machinery to also handle thunks for virtual
3565 generic method invokes. When a virtual generic method is invoked
3566 more than a number of times we insert it into the thunk so that it
3567 can be called without lookup in unmanaged code.
3569 * generic-sharing.c, class-internals.h: Fetching a
3570 MonoGenericInst* for a method from an (M)RGCTX.
3572 2008-10-01 Zoltan Varga <vargaz@gmail.com>
3574 * marshal.c (emit_marshal_string): Applied a variant of a patch by
3575 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
3576 marshalling. Fixes #431304.
3578 2008-10-01 Bill Holmes <billholmes54@gmail.com>
3580 * marshal.c (emit_marshal_variant) : Change the attribute checks to
3581 handle when ref is specified without In or Out.
3583 Code is contributed under MIT/X11 license.
3585 2008-09-30 Mark Probst <mark.probst@gmail.com>
3587 * loader.c (mono_get_method_constrained): Don't expand method with
3588 the class's context, because it's already a method of that class.
3590 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
3592 * attach.c : should be correct build fix.
3594 2008-09-29 Zoltan Varga <vargaz@gmail.com>
3596 * attach.c: Fix the previous change.
3598 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
3600 * attach.c : quick w32 build fix.
3602 2008-09-27 Miguel de Icaza <miguel@novell.com>
3604 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
3605 crashes MonoDevelop: #430455.
3607 2008-09-27 Zoltan Varga <vargaz@gmail.com>
3609 * domain-internals.h (struct _MonoDomain): Move most fields used only by
3610 the JIT do MonoJitDomainInfo in ../mini/mini.h.
3612 * domain.c: Remove initialization/cleanup of the removed fields.
3614 2008-09-27 Mark Probst <mark.probst@gmail.com>
3616 * class.c (mono_class_generic_sharing_enabled): Enable generic
3617 code sharing for PPC.
3619 2008-09-26 Bill Holmes <billholmes54@gmail.com>
3621 * attach.c : Fixing the Windows builds.
3623 Code is contributed under MIT/X11 license.
3625 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3627 * class.c (mono_class_generic_sharing_enabled): Experimentally change
3628 the default generic sharing mode to 'all'.
3630 2008-09-25 Mark Probst <mark.probst@gmail.com>
3632 * generic-sharing.c, class-internals.h: New function for checking
3633 whether a method needs a static RGCTX invoke wrapper. A few
3634 funtions moved from mini/generic-sharing.c.
3636 * icall.c: New function used.
3638 2008-09-25 Mark Probst <mark.probst@gmail.com>
3640 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
3641 Static RGCTX invoke wrapping applies to value type methods, too.
3643 * class.c (mono_class_setup_vtable_general): In generic-shared
3644 value types, wrap methods with a static RGCTX invoke wrapper.
3646 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3648 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
3651 2008-09-24 Zoltan Varga <vargaz@gmail.com>
3653 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
3654 register a callback which is called when the finalizer thread is woken
3656 (finalizer_thread): Call the callback if it exists.
3658 * attach.h attach.c: New files, implementing the attach mechanism.
3660 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
3662 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
3663 by the previous change.
3665 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3667 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
3668 loader.c, marshal.c, metadata-internals.h, metadata.c,
3669 method-builder.c, object.c, reflection.c: introduced specific functions
3670 to allocate from the domain and image mempools and cleaned up most of
3671 the code to use them (still missing a few in reflection.c).
3672 Keep the loader bytes counter updated.
3674 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
3676 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
3677 loader-related counters.
3679 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
3681 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
3682 added more MS-compatible counters.
3684 2008-09-22 Zoltan Varga <vargaz@gmail.com>
3686 * class.c (mono_class_setup_fields): Call setup_fields before accessing
3687 class->blittable. Fixes #428217.
3689 2008-09-21 Zoltan Varga <vargaz@gmail.com>
3691 * reflection.c (mono_image_get_field_on_inst_token): Call
3692 field_encode_signature () since that handles custom modifiers too.
3695 2008-09-20 Zoltan Varga <vargaz@gmail.com>
3697 * reflection.c (add_custom_modifiers): New helper function to merge custom
3698 modifiers stored in objects to a MonoType.
3699 (fieldref_encode_signature): Encode custom modifiers.
3700 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
3701 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
3703 2008-09-19 Kornél Pál <kornelpal@gmail.com>
3705 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
3706 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
3707 64-bit IL only images because imports are not resolved for IL only images.
3708 Special thanks to Bill Holmes for finding this bug and testing the patch.
3709 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
3711 Contributed under MIT/X11 license.
3713 2008-09-19 Miguel de Icaza <miguel@novell.com>
3715 * mono-config.c (dllmap_start): Add support for the bits keyword
3716 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
3718 2008-09-19 Mark Probst <mark.probst@gmail.com>
3720 * reflection.c (inflate_mono_method): When the class the method is
3721 to be inflated for is itself not inflated, just return the method.
3723 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
3725 * mono-perfcounters.c: use more user friendly process instance names.
3727 2008-09-18 Bill Holmes <billholmes54@gmail.com>
3729 * marshal.c (emit_marshal_variant) : Change the attribute checks to
3730 handle "[in] ref" and "[in][out] ref" cases.
3732 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
3733 to mono_mb_create_method. This was causing problems calling native to
3734 managed passing Variants by value.
3736 Code is contributed under MIT/X11 license.
3738 2008-09-18 Zoltan Varga <vargaz@gmail.com>
3740 * class.c (can_access_internals): Call mono_assembly_load_friends ()
3741 before accessing the friend_assembly_names field.
3743 * assembly.c (mono_assembly_load_friends): Make this callable multiple
3745 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
3746 called lazily when it is needed.
3748 * metadata-internals.h (struct _MonoAssembly): Add
3749 'friend_assembly_names_inited' flag.
3751 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
3753 * mono-perfcounters-def.h: fix the types of a few counters.
3754 * mono-perfcounters.c: implemented the instance names getter
3757 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
3759 * culture-info-table.h : regenerated.
3761 2008-09-17 Robert Jordan <robertj@gmx.net>
3763 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
3764 context bound objects. Fixes #415577.
3766 Code is contributed under MIT/X11 license.
3768 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
3770 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
3771 implementation (bug #423582).
3773 2008-09-16 Zoltan Varga <vargaz@gmail.com>
3775 * object.c (mono_object_get_virtual_method): Handle the case method->slot
3776 is not set. Fixes #426309.
3778 2008-09-16 Jb Evain <jbevain@novell.com>
3780 * class.c (mono_class_from_name): fix the exported type look up
3781 when the type is defined in a referenced assembly.
3783 2008-09-16 Jb Evain <jbevain@novell.com>
3785 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
3786 increment the next index counter on each iteration to make that work
3787 for more than one type forwarder. Unmanaged part to fix #422929.
3789 2008-09-15 Mark Probst <mark.probst@gmail.com>
3791 * object-internals.h: enum ComInterfaceType in
3792 MonoInterfaceTypeAttribute is guint32, not guint16.
3794 2008-09-12 Mark Probst <mark.probst@gmail.com>
3796 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
3799 2008-09-11 Mark Probst <mark.probst@gmail.com>
3801 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
3804 2008-09-11 Mark Probst <mark.probst@gmail.com>
3806 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
3807 Endianness fixes for MonoSymbolFileOffsetTable.
3809 2008-09-10 Bill Holmes <billholmes54@gmail.com>
3811 * process.c (complete_path) : Removing quotes from the
3812 input path. The glib file routines do not handle file paths
3813 that have quotes around them.
3815 Code is contributed under MIT/X11 license.
3817 2008-09-10 Bill Holmes <billholmes54@gmail.com>
3819 * socket-io.h : Adding a comment to provide locations where
3820 changes to MonoSocketAsyncResult need to be synced.
3822 Code is contributed under MIT/X11 license.
3824 2008-09-10 Zoltan Varga <vargaz@gmail.com>
3826 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
3827 parameters as well. Fixes #425001.
3829 2008-09-08 Miguel de Icaza <miguel@novell.com>
3831 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
3834 2008-09-07 Miguel de Icaza <miguel@novell.com>
3836 * console-io.c: Add support for tracking the window size if it
3839 The setup is very simple: the TtySetup function will now return a
3840 pointer to a location in memory that tracks the current console
3841 size. The managed code checks its current value every time its
3842 queried against the last value set, and updates accordingly.
3844 With this setup we can work with multiple consoles, and we do not
3845 require to poke into managed code from a signal handler.
3847 Additionally, the environment for COLUMNS and LINES is now handled
3850 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
3852 2008-09-07 Mark Probst <mark.probst@gmail.com>
3854 * marshal.c (mono_type_native_stack_size): Treat
3855 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
3857 2008-09-04 Jb Evain <jbevain@novell.com>
3859 * class.c (mono_class_is_assignable_from): fix assignability of nullables
3862 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
3864 * verify.c (verify_type_compatibility_full): Revert change
3865 to allow converting a native int to unmanaged pointer be verifiable
3866 under non-strict mode.
3867 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
3869 * verify.c: Added some TODOs.
3871 2008-09-02 Bill Holmes <billholmes54@gmail.com>
3873 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
3874 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
3875 Changed to use GlobalAlloc for the memory returned on Windows platforms.
3877 Code is contributed under MIT/X11 license.
3879 2008-09-02 Jb Evain <jbevain@novell.com>
3881 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
3883 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3885 reflection.c (typebuilder_setup_fields): Handle classes with
3888 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3890 class.c (mono_class_setup_events): Add memory barrier due to
3891 double checked locking.
3893 class.c (mono_class_setup_properties): Same.
3895 2008-08-31 Zoltan Varga <vargaz@gmail.com>
3897 * class.c (mono_class_is_assignable_from): Fix the build.
3899 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
3900 before accessing klass->interface_bitmap. Fixes #421744.
3902 2008-08-28 Zoltan Varga <vargaz@gmail.com>
3904 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
3905 the runtime into no-exec mode, useful when running the AOT compiler.
3907 * appdomain.c gc.c object.c: Avoid executing managed code when running
3910 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
3912 * reflection.c (_mono_reflection_get_type_from_info): Handle the
3913 special case when the mono_assembly_loaded () returns NULL because the
3914 search hook is not installed.
3916 2008-08-25 Zoltan Varga <vargaz@gmail.com>
3918 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
3919 crashes in bstr marshalling on linux.
3921 2008-08-24 Zoltan Varga <vargaz@gmail.com>
3923 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
3924 with more than one parameter.
3926 2008-08-24 Miguel de Icaza <miguel@novell.com>
3928 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
3929 start/stop flow control as well when turning off ICANON (allows
3930 C-s and C-q to be read by Console.ReadKey).
3932 2008-08-24 Zoltan Varga <vargaz@gmail.com>
3934 * class.c (mono_class_init): Move the initialization of nested classes
3935 into mono_class_get_nested_types (). Fixes #418433.
3937 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
3940 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
3941 iterating tough the nested classes of a class.
3943 2008-08-23 Zoltan Varga <vargaz@gmail.com>
3945 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
3948 2008-08-22 Miguel de Icaza <miguel@novell.com>
3950 * console-io.c (sigcont_handler): Support signal chaining for
3953 (console_set_signal_handlers): Use best practices with sigaction,
3954 clear the structure before using it.
3956 2008-08-22 Robert Jordan <robertj@gmx.net>
3958 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
3959 Fix the Windows build.
3961 2008-08-22 Zoltan Varga <vargaz@gmail.com>
3963 * class.c (mono_class_generic_sharing_enabled): Make the default
3964 sharing mode 'corlib'.
3966 2008-08-21 Zoltan Varga <vargaz@gmail.com>
3968 * console-io.c (console_set_signal_handlers): Fix a warning.
3970 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
3971 method normally, the JIT will take care of avoiding recursion.
3973 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3975 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
3977 Code is contributed under MIT/X11 license.
3979 2008-08-20 Miguel de Icaza <miguel@novell.com>
3981 * console-io.c (sigcont_handler): We need to restore the entire
3982 termios state, not only the original settings, as things like echo
3983 can be controlled after this (Booish exposes this issue with its
3984 own ReadLine implementation).
3986 Additionally, we need to set the terminal back into keypad_xmit
3989 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
3990 string as a paramter as well. Otherwise we get different
3993 2008-08-20 Zoltan Varga <vargaz@gmail.com>
3995 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
3996 delegates with byref out parameter passing. Fixes #351520.
3998 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
4000 (mono_type_get_desc): Add the type arguments for GENERICINST.
4001 (mono_method_full_name): Stringify the class name using mono_type_full_name
4002 so it picks up generic arguments.
4004 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
4006 * console-io.c: Removed debug output.
4008 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
4010 reflection.c (mono_reflection_create_runtime_class): Alloc
4011 the nested classes linked list using the dynamic image mempool.
4012 Fixes leak in corlib compilation.
4014 2008-08-19 Miguel de Icaza <miguel@novell.com>
4016 * console-io.c: Fix incredibly annoying behavior on the console
4017 after resuming execution after control-z. This affected every
4018 console application.
4020 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
4022 * mempool-internals.h: Header for mono private mempool functions. The first
4023 two function are for allocating glib linked lists using pools.
4025 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
4027 * Makefile.am: Added mempool-internals.h.
4029 2008-08-16 Zoltan Varga <vargaz@gmail.com>
4031 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
4032 (mono_domain_free): Ditto.
4034 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
4035 be used by the JIT to store its domain-specific information, instead of putting
4036 it directly into MonoDomain.
4038 * domain.c (mono_install_create_domain_hook): New helper function to install
4039 a hook which initializes domain->runtime_info.
4041 * domain.c (mono_install_free_domain_hook): Ditto.
4043 2008-08-15 Zoltan Varga <vargaz@gmail.com>
4045 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
4046 asserting if the ares parameter is null.
4048 * mono-perfcounters.c: Fix warnings.
4050 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
4051 is not needed, don't check for interruptions either.
4052 (mono_marshal_get_delegate_end_invoke): Ditto.
4054 2008-08-15 Marek Habersack <mhabersack@novell.com>
4056 * mono-perfcounters.c (predef_readonly_counter): added support for
4057 reading the ASP.NET Requests Queued counter from another process.
4059 2008-08-12 Zoltan Varga <vargaz@gmail.com>
4061 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
4062 MonoImage to simplify the AOT code.
4064 2008-08-10 Zoltan Varga <vargaz@gmail.com>
4066 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
4067 marshalling. Fixes #416078.
4069 2008-08-08 Zoltan Varga <vargaz@gmail.com>
4071 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
4072 it is set, looking up the icall address is deferred to the JIT, since
4073 in embedded scenarios, the icall might not be registered in the runtime
4074 doing the AOT compilation. Backported from the 2.0 branch.
4076 2008-08-08 Zoltan Varga <vargaz@gmail.com>
4078 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
4081 2008-08-05 Marek Habersack <mhabersack@novell.com>
4083 * Makefile.am: added support for cross-compilation.
4085 2008-08-04 Zoltan Varga <vargaz@gmail.com>
4087 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
4089 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
4091 * mono-perfcounters.c: jitted methods and jitted bytes counters.
4093 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
4095 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
4096 mono-perfcounters.c: performance counters implementation.
4098 2008-07-31 Zoltan Varga <vargaz@gmail.com>
4100 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
4101 to gpointer, letting the AOT code decide what to store in it.
4103 2008-07-31 Bill Holmes <billholmes54@gmail.com>
4105 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
4106 mono_class_setup_methods if the methods are not initialized.
4108 Code is contributed under MIT/X11 license.
4110 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
4112 * verify.c: Remove some debug code I commited by accident.
4114 * verify.c (mono_method_is_valid_in_context): Change the return value
4115 to make possible to distinguish between invalid and unverifiable.
4117 * verify.c (verifier_load_method): Don't return NULL for unverifiable
4120 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
4122 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
4123 constraints. Fixes regression in gtest-253.
4125 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
4127 * verify.c (mono_verifier_verify_class): Don't allow generic types
4128 with explicit layout.
4130 * verify.c (mono_method_verify): Check locals and argument types.
4132 2008-07-29 Zoltan Varga <vargaz@gmail.com>
4134 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
4135 wait if the thread is in StopRequested state.
4137 * class.c (mono_class_from_name): Refactor the module searching code into
4138 a separate function so it can be reused in the AOT case too.
4140 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
4142 * verify.c (mono_type_is_valid_in_context): Improve the error message.
4143 Check both the type and it's generic type definition for loader errors.
4145 * verify.c (mono_method_is_valid_in_context): Don't generate another
4146 error when a type errors occur, this leads to the wrong exception been
4149 2008-07-28 Dick Porter <dick@ximian.com>
4153 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
4154 New internal calls to duplicate and close a process handle.
4156 2008-07-27 Andreas Färber <andreas.faerber@web.de>
4158 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
4160 2008-07-27 Zoltan Varga <vargaz@gmail.com>
4162 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
4164 2008-07-27 Robert Jordan <robertj@gmx.net>
4166 * class.c (mono_class_init): Don't compute class.has_finalize for
4167 valuetypes. Fixes #412477.
4169 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
4171 * verify.c: Implement constraint equivalence checking.
4172 This is required when a generic parameter is used as
4173 argument to a constrained one.
4177 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4179 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4181 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
4183 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
4184 synch with managed object layout.
4186 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
4188 * verify.c (do_branch_op): Handle valuetypes and generic
4191 * verify.c (do_cmp_op): Same.
4195 2008-07-24 Mark Probst <mark.probst@gmail.com>
4197 * generic-sharing.c: Fix memory leaks.
4199 * class.c, class-internals.h: Make
4200 mono_class_inflate_generic_type_with_mempool() non-static.
4202 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
4204 * pedump.c (dump_verify_info): Dump full class name.
4206 2008-07-24 Mark Probst <mark.probst@gmail.com>
4208 * generic-sharing.c: Removed some old code that didn't do anything.
4210 2008-07-24 Massimiliano Mantione <massi@ximian.com>
4211 * profiler.c: Added runtime_initialized_event,
4212 mono_profiler_install_runtime_initialized and
4213 mono_profiler_runtime_initialized. This new hook tells the profiler
4214 when the runtime is sufficiently initialized to be able to call
4215 mono_thread_attach on the root appdomain.
4216 * profiler.h, profiler-private.h: Likewise.
4218 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
4220 * verify.c (do_cast): Do boxing for generic arguments as well.
4222 * class.c (is_nesting_type): Drop generic instantiations before
4223 checking for nesting.
4225 * class.c (can_access_instantiation): Allow access to generic
4228 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
4230 * verify.c (verify_class_for_overlapping_reference_fields):
4231 On some cases, the field size might be zero, guard against that.
4232 Fix the explicit layout check to work as expected.
4234 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4236 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
4237 mono_thread_resume () during shutdown, since the thread we want to abort
4240 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4242 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
4245 * debug-mono-symfile.c: Fix a warning.
4247 * mono-perfcounters.c (get_cpu_times): Fix a warning.
4249 * object.c (mono_class_vtable): Check if exception_type is set, and return
4250 NULL as defined by the function comments.
4252 2008-07-22 Mark Probst <mark.probst@gmail.com>
4254 * mempool.c: Use malloc for every single mempool allocation if the
4255 configure option is set. This makes it easier to track mempool
4256 allocations with tools like Valgrind.
4258 2008-07-22 Jb Evain <jbevain@novell.com>
4260 * reflection.c (create_dynamic_mono_image): emit the same
4261 metadata version that SL2 does when creating a SL2 image.
4263 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
4266 * icall.c: New icall System.Enum:get_hashcode. This function
4267 avoids the overhead of boxing the enum to the underlying type.
4269 2008-07-21 Mark Probst <mark.probst@gmail.com>
4271 * reflection.c (mono_method_get_object): Don't let static RGCTX
4272 invoke wrappers get into MonoReflectionMethods.
4274 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
4276 * object-internals.h:
4277 * object.c: New mono_runtime_class_init_full function
4278 that makes throwing the exception optinal.
4280 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
4281 for the case where the exception object is supplied.
4283 2008-07-16 Kornél Pál <kornelpal@gmail.com>
4285 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
4288 Contributed under MIT/X11 license.
4290 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
4292 * string-icalls.c (ves_icall_System_String_InternalSplit):
4293 Optimize array allocation by caching the MonoClass of the
4296 * icall.c (ves_icall_Type_GetMethodsByName): Same.
4298 * reflection.c (mono_param_get_objects): Same.
4300 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
4303 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
4304 It inflates the given type using the class context.
4306 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
4308 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
4309 the vtable if it already exists.
4311 * object-internals.h: Add mono_class_try_get_vtable as part of the
4314 * reflection.c (mono_type_get_object): Use the MonoObject from the
4315 vtable when possible. Reduces locking contention on reflection heavy
4318 2008-07-15 Zoltan Varga <vargaz@gmail.com>
4320 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
4321 g_bit_nth_msf () since that macro is not implemented in eglib.
4323 2008-07-13 Zoltan Varga <vargaz@gmail.com>
4325 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
4326 on platforms which do not support it.
4328 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4330 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
4332 2008-07-11 Martin Baulig <martin@ximian.com>
4334 * mono-debug-debugger.h
4335 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
4337 * mono-debug-debugger.c
4338 (_mono_debugger_interruption_request): New global volatile variable.
4339 (mono_debugger_check_interruption): New public function.
4342 (mono_thread_current_check_pending_interrupt): Call
4343 mono_debugger_check_interruption().
4344 (mono_thread_interruption_checkpoint_request): Likewise.
4346 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
4348 * verify.c: Add more type checks for loaded types. Verify the result
4349 handle from ldtoken.
4351 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
4353 * loader.c (field_from_memberref): Don't crash if the field
4356 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
4358 * verify.c: Verify if type and method instantiations
4359 don't have invalid VAR or MVAR arguments.
4361 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
4363 * verify.c: Fix double free of function pointer list.
4365 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
4367 * object.c (mono_string_to_utf8): Comment the new code as it
4370 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
4372 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
4374 2008-07-07 Bill Holmes <billholmes54@gmail.com>
4376 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
4377 is not throw too many times.
4379 Code is contributed under MIT/X11 license.
4381 2008-07-07 Zoltan Varga <vargaz@gmail.com>
4383 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
4384 debugging is turned off.
4386 2008-07-06 Zoltan Varga <vargaz@gmail.com>
4388 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
4390 2008-07-04 Mark Probst <mark.probst@gmail.com>
4392 * class-internals.h, class.c: Added new generic sharing option:
4393 Share only stuff in System.Collections.Generic, which is now the
4396 2008-07-04 Mark Probst <mark.probst@gmail.com>
4398 * generic-sharing.c, class-internals.h: New function for getting a
4399 generic method in a generic class given the corresponding method
4400 for a different instantiation of the class. Partly refactored
4401 from mini-trampolines.c.
4403 * class.c: Make sure generic methods have a class_inst if they are
4404 part of a generic class.
4406 * metadata.c (mono_type_stack_size_internal): Handle type
4409 2008-07-04 Mark Probst <mark.probst@gmail.com>
4411 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
4412 Signifies whether information on the this/vtable/mrgctx variable
4415 2008-07-04 Mark Probst <mark.probst@gmail.com>
4417 * object.c, object-internals.h, icall.c: New function
4418 mono_delegate_ctor_with_method(), which does the same as
4419 mono_delegate_ctor(), but takes an explicit method argument
4420 instead of taking the method from the jit info.
4422 * marshal.c: When creating a delegate with an inflated method take
4423 the "this" argument as the target class for the castclass.
4425 2008-07-03 Mark Probst <mark.probst@gmail.com>
4427 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
4428 mono_jit_info_table_find() to perform very badly in some cases.
4430 2008-07-02 Zoltan Varga <vargaz@gmail.com>
4432 * icall.c (type_from_typename): Handle 'string'.
4434 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
4435 wrappers into the wrapper_hash, since the key is not a MonoMethod.
4437 2008-07-01 Zoltan Varga <vargaz@gmail.com>
4439 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
4441 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
4442 number of available managed allocator types.
4444 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
4445 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
4447 2008-06-30 Zoltan Varga <vargaz@gmail.com>
4449 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
4450 which is a low level lock protecting just the 'jit_code_hash' hash table.
4452 * domain.c: Initialize+cleanup jit_code_hash_lock.
4454 2008-06-30 Kornél Pál <kornelpal@gmail.com>
4456 * coree.c (mono_load_coree): Set coree_module_handle global variable only
4457 after initialization.
4459 * coree.h: Make MonoFixupExe internal.
4461 Contributed under MIT/X11 license.
4463 2008-06-30 Kornél Pál <kornelpal@gmail.com>
4465 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
4466 because that is platform independent. Check NumberOfRvaAndSizes in PE32
4468 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
4469 image being loaded is a CLI image and _CorValidateImage gets called.
4471 * coree.h: Add MonoLoadImage.
4473 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
4474 instead of LoadLibrary.
4476 Contributed under MIT/X11 license.
4478 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
4480 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
4481 for any primitive type.
4483 2008-06-29 Zoltan Varga <vargaz@gmail.com>
4485 * object.c (mono_array_new_specific): Optimize this and the other allocation
4488 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
4489 domains too if mono_dont_free_domains is set.
4491 * domain-internals.h (mono_dont_free_domains): New internal option controlling
4492 whenever to free appdomain data after it has been unloaded.
4494 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
4496 2008-06-28 Zoltan Varga <vargaz@gmail.com>
4498 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
4499 (mono_method_get_equivalent_method): Fix a warning.
4501 * object.c (mono_message_init): Avoid looking up array types for each call.
4503 2008-06-27 Zoltan Varga <vargaz@gmail.com>
4505 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
4508 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
4511 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
4514 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
4517 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
4519 * object.c (mono_value_box): Fix boxing of nullables.
4521 2008-06-26 Kornél Pál <kornelpal@gmail.com>
4523 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
4524 mono_module_handle that is defined by the linker; no initialization required.
4525 * coree.h: Remove mono_module_handle, add __ImageBase, update
4526 mono_image_open_from_module_handle.
4527 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
4528 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
4529 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
4530 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
4531 to 4 GB away from image base address. IA64 version is not tested but was very
4532 easy to implement and should work if we ever need it.
4533 * domain.c (mono_init_internal): Avoid system error message boxes.
4534 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
4535 with has_entry_point. Handle do_mono_image_load fauilre correctly.
4536 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
4537 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
4538 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
4540 Contributed under MIT/X11 license.
4542 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4544 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
4545 as part of the private mono API.
4547 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
4548 Do proper argument checking for methods that belong to generic classes.
4549 Do proper type resolution for GMFH/2.
4552 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4554 * verify.c (do_switch): Fix a memory corruption bug with
4555 the jump index is out of bound.
4557 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4559 * verify.c: Disable debug code.
4561 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4563 * reflection.c (mono_image_get_methodbuilder_token): Use
4564 mono_image_get_methodspec_token_for_generic_method_definition
4565 instead of mono_image_get_memberref_token. We cache more memberef
4568 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4570 * verify.c: Inflate exception clause types.
4573 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4575 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
4578 * reflection.c (mono_image_get_ctorbuilder_token): Same.
4580 * reflection.c (mono_image_create_method_token): Same.
4582 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4584 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
4585 It does the same as mono_image_get_methodref_token but works on
4588 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
4589 and always generate a methodspec. This follows the old behavior and fixes
4590 the regressions in System.Core.
4592 2008-06-24 Zoltan Varga <vargaz@gmail.com>
4594 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
4595 don't event mono_class_get () succeeds. Fixes #402182.
4597 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
4599 * metadata-internals.h: Added MonoDynamicImage::methodspec
4600 hashtable to store methodspec tokens created for MethodBuilders.
4602 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
4603 MethodBuilders as open instantiations if a methodspec was requested.
4605 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
4607 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
4609 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
4613 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
4615 * loader.c (method_from_methodspec): Avoid crashing if the
4616 method lookup fails.
4618 2008-06-20 Dick Porter <dick@ximian.com>
4620 * socket-io.c (get_socket_assembly): Cope with Moonlight network
4621 classes being in a different assembly. Fixes bug 399184.
4623 2008-06-20 Zoltan Varga <vargaz@gmail.com>
4625 * loader.c (mono_loader_init): Make this callable multiple times.
4626 (mono_dllmap_insert): Call mono_loader_init () so this works even before
4627 the runtime is initialized. Fixes #401755.
4629 2008-06-19 Dick Porter <dick@ximian.com>
4631 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
4634 2008-06-19 Dick Porter <dick@ximian.com>
4637 * icall-def.h: Implement Socket generic Send() and Receive()
4638 methods. Fixes bug 395168.
4640 2008-06-19 Kornél Pál <kornelpal@gmail.com>
4642 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
4644 Contributed under MIT/X11 license.
4646 2008-06-18 Martin Baulig <martin@ximian.com>
4648 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
4649 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
4650 set to 80.0. The debugger <-> runtime interface is now frozen as
4654 (mono_debug_debugger_version): Bump to 4.
4656 2008-06-18 Martin Baulig <martin@ximian.com>
4658 * debug-mono-symfile.c
4659 (load_symfile): Don't check the minor version.
4661 * debug-mono-symfile.h: Bump the version number to 50.0.
4663 2008-06-18 Martin Baulig <martin@ximian.com>
4665 * debug-mono-symfile.c
4666 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
4667 minimum required version.
4669 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
4671 * reflection.c (mono_custom_attrs_from_property): Fix support for
4672 retriveving cattrs of dynamic inflated generic types.
4674 * reflection.c (mono_custom_attrs_from_event): Same.
4676 * reflection.c (mono_custom_attrs_from_field): Same;
4678 * reflection.c (typebuilder_setup_events): Same cattrs of events.
4680 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
4681 Moved to metadata.c.
4683 * metadata.c: New functions to retrive the equivalent field, event
4684 of property from the generic type definition.
4686 * metadata-internals.h: Added new functions from metadata.c.
4688 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
4690 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
4691 to cached in a mempool is used.
4693 * metadata.c (free_generic_class): In some situations field generic_info type
4694 is not properly dup'ed and leads to double free'ing.
4698 2008-06-17 Mark Probst <mark.probst@gmail.com>
4700 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
4701 this arguments (will be needed later for generic methods).
4704 2008-06-17 Mark Probst <mark.probst@gmail.com>
4706 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
4707 Create a static RGCTX invoke wrapper for methods which require it.
4709 2008-06-17 Mark Probst <mark.probst@gmail.com>
4711 * object.c, class-internals.h: New function for checking whether
4712 an individual field is special static.
4714 2008-06-15 Zoltan Varga <vargaz@gmail.com>
4716 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
4717 linear search since the table is sorted.
4719 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
4722 2008-06-14 Zoltan Varga <vargaz@gmail.com>
4724 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
4725 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
4727 * gc.c (mono_domain_finalize): Allow an infinite timeout.
4729 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
4731 * threads.c (mono_thread_request_interruption): Get rid of locking, use
4732 InterlockedCompareExchange to query and modify
4733 thread->interruption_requested.
4735 * object-internals.h (struct _MonoThread): Change interruption_requested
4736 to a gint32 so it can be modified by atomic operations. Add
4737 'critical_region_level' from the managed side, change small_id to a guint32,
4738 add new set of 'unused' fields.
4740 * appdomain.c: Bump corlib version.
4742 2008-06-13 Zoltan Varga <vargaz@gmail.com>
4744 * class.c (mono_class_from_name): Search modules as well. Fixes
4747 2008-06-13 Mark Probst <mark.probst@gmail.com>
4749 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
4750 templates. Templates are generalized with an additional type_argc
4751 argument. RGCTX templates have type_argc==0, MRGCTX templates
4754 * domain-internals.h, domain.c: New hash table for looking up
4757 * metadata.c, metadata-internals.h: Rename hash and equal
4758 functions for MonoGenericInst's and make them public.
4760 * class-internals.h: New data structures for the MRGCTX. Macros
4761 for distinguishing slots in the RGCTX and the MRGCTX.
4763 2008-06-13 Mark Probst <mark.probst@gmail.com>
4765 * object.c (mono_method_get_imt_slot): Put the same methods of
4766 different instantiations of the same generic interface in the same
4767 IMT slots, to make generic sharing simpler.
4769 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
4771 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
4773 * metadata.c (mono_metadata_field_info_with_mempool): Added.
4774 This function works just like mono_metadata_field_info, but
4775 accept a mempool as argument to be used allocating memory.
4777 * marshal.c (mono_marshal_load_type_info): Use new function
4778 to load marshal data into image mempool.
4780 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
4782 * class.c (mono_class_inflate_generic_type_with_mempool):
4783 This function allows to inflate a generic type using
4786 * class.c (inflate_generic_type): Take a mempool as argument
4787 and use it to do type dup'ing.
4789 * class.c (mono_class_setup_fields): Field type for generic
4790 generic classes are allocated from the image mempool.
4792 * metadata.c (free_generic_class): Inflated field type is
4793 now allocated in the image mempool.
4795 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
4797 * threads.c (thread_cleanup): Free MonoThread::name.
4799 2008-06-12 Marek Habersack <mhabersack@novell.com>
4801 * appdomain.c (ensure_directory_exists): avoid unnecessary
4802 mkdir(2) calls when the shadow directory already exists.
4803 (mono_make_shadow_copy): copy also satellite assemblies from the
4804 private bin directories.
4806 2008-06-11 Zoltan Varga <vargaz@gmail.com>
4808 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
4810 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
4811 a page boundary. Fixes #396219.
4813 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4815 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
4816 due to double-checked locking.
4818 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4820 * assembly.c (build_assembly_name): Release memory on failure.
4822 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
4824 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4826 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
4829 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4831 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
4834 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4836 * loader.c (field_from_memberref): Check if field signature type is equal
4837 to the non-inflated type of the field. Fixes #398980.
4839 2008-06-11 Zoltan Varga <vargaz@gmail.com>
4841 * assembly.c (mono_assembly_load_from_full): Call
4842 mono_assembly_load_friends () outside the assemblies lock, since it can
4843 acquire the loader lock. Fixes #323696.
4845 * reflection.c (resolve_object): Inflate the inst with the context for
4846 FieldOnTypeBuilderInst. Fixes #399010.
4848 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4850 * reflection.c (mono_image_get_field_on_inst_token): Don't
4851 inflate the field to encode it's signature. If it's a
4852 VAR or MVAR it should stay that way in the signature.
4855 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4857 * reflection.c (resolve_object): Release memory of inflated types.
4859 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4861 * loader.c (mono_method_get_signature_full): Remove assert about
4862 loading a methodspec to a generic method. We have such methods, such as
4863 System.Threading.Interlocked::CompareExchange<T>.
4864 This assert was removed since it crashes the verifier when it checks
4865 methods calling CompareExchange<T>.
4867 2008-06-10 Marek Safar <marek.safar@gmail.com>
4869 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
4870 of Type array and not MonoType.
4872 2008-06-10 Marek Habersack <mhabersack@novell.com>
4874 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
4877 2008-06-10 Martin Baulig <martin@ximian.com>
4879 * debug-mono-symfile.h
4880 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
4881 changes to the file format, but we were generating incorrect
4882 source file indices in the line number table due to a bug, which
4883 made backtraces report an incorrect source file.
4885 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4887 * mono-debug.c: Moved mono_debug_free_method_jit_info from
4888 mini/debug-mini.c to here.
4890 * mono-debug.c (il_offset_from_address): Free memory from find_method.
4892 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
4893 use it to release structs returned by mono_debug_find_method.
4895 2008-06-10 Zoltan Varga <vargaz@gmail.com>
4897 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
4898 since it needs to set method->slot for all interface methods.
4900 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4902 * class-internals.h: Forgot to add.
4904 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4906 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
4908 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
4909 Lookup the custom attributes from property_hash.
4911 * reflection.c (mono_save_custom_attrs): Save the custom attributes
4912 in property_hash. Allocate all data using the image mempool.
4914 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
4915 for dynamic_custom_attrs to checks if the image is dynamic.
4917 2008-06-09 Zoltan Varga <vargaz@gmail.com>
4919 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
4922 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
4923 runtime functions while holding the domain assemblies lock.
4925 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4927 * verify.c: Reapplied the last bit of the reverted changes.
4929 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4931 * verify.c: Reapplied more of the reverted changes.
4933 2008-06-09 Martin Baulig <martin@ximian.com>
4935 * debug-mono-symfile.c (load_symfile): Check the major version
4936 first; if it's wrong, don't print the minor version in the error message.
4938 2008-06-09 Zoltan Varga <vargaz@gmail.com>
4940 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
4941 lock instead of the domain lock to avoid deadlocks, since the thread might
4942 already hold the loader lock.
4944 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
4945 (mono_thread_attach): Ditto.
4947 * monitor.c: Use a TLS variable for holding the current thread id instead
4948 of calling pthread_self ().
4949 (mono_monitor_init_tls): New internal function to initialize the TLS
4951 (mono_monitor_try_enter_internal): Put the owner == id check after the
4954 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
4955 missed optimizations when using gcc-4.3.
4957 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
4959 * reflection.c (mono_dynamic_image_free): Free the memory
4960 used by MonoGenericParam in MonoDynamicImage::gen_param.
4962 * reflection.c (mono_reflection_setup_generic_class): Allocate
4963 container from mempool.
4965 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
4966 container from mempool.
4968 2008-06-07 Zoltan Varga <vargaz@gmail.com>
4970 * threads.c (mono_set_pending_exception): New internal function to set the
4971 pending exception of the current thread.
4972 (mono_thread_get_and_clear_pending_exception): Check for
4973 thread->pending_exception as well.
4975 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
4977 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
4978 it can trigger a collection.
4980 2008-06-06 Martin Baulig <martin@ximian.com>
4982 Merged the `debugger-kahalo' branch.
4985 (MONO_DEBUGGER_VERSION): Bumped to 72.
4987 * debug-mono-symfile.h
4988 (MonoSymbolFileMethodIndexEntry): Removed.
4989 (MonoSymbolFileMethodEntry): New public typedef.
4990 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
4991 (MonoSymbolFileSourceEntry): Remove everything except `index' and
4993 (MonoSymbolFileMethodEntry): Removed.
4994 (MonoSymbolFileLexicalBlockEntry): Removed.
4995 (MonoSymbolFileLineNumberEntry): Removed.
4996 (MonoDebugLexicalBlockEntry): Removed.
4997 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
4998 removed `num_il_offsets' and `il_offsets'.
4999 (MonoSymbolFile): Replace `version' with `major_version' and
5001 (MONO_SYMBOL_FILE_VERSION): Replace with
5002 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
5003 `MONO_SYMBOL_FILE_MINOR_VERSION'.
5005 * debug-mono-symfile.c
5006 (mono_debug_symfile_lookup_location): Add support for the new line
5007 number table format.
5009 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
5011 * metadata.c (free_generic_class): Release the inflated
5012 MonoClass of dynamic generic classes if it's not a generic
5015 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
5017 * verify.c: Reapplied more of the reverted changes.
5019 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
5021 * reflection.c (lookup_custom_attr): Clean the cached flag or
5022 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
5025 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
5027 * verify.c: Reapplied a small part of the reverted changes.
5029 2008-06-07 Zoltan Varga <vargaz@gmail.com>
5031 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5033 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
5034 previously in managed code.
5035 (mono_monitor_exit): Ditto.
5036 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
5038 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
5039 the managed definition.
5041 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
5043 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
5045 2008-06-06 Zoltan Varga <vargaz@gmail.com>
5047 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
5049 * monitor.c: Add some micro optimizations.
5051 * icall.c (type_from_typename): Handle 'bool'.
5053 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
5055 * verify.c: Implement constructor verification per P III 1.8.1.4.
5058 2008-06-06 Zoltan Varga <vargaz@gmail.com>
5060 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
5061 holding the assemblies lock here too.
5063 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
5065 * verify.c: Kill stack_top function.
5067 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
5069 * verify.c: Kill stack_get function.
5071 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
5073 * verify.c (mono_method_verify): Last change broke the build. Fixed.
5075 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
5077 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
5080 * verify.c (mono_method_verify): Inflate params and locals to avoid
5081 mismatch when checking for compatibility.
5083 2008-06-05 Jonathan Chambers <joncham@gmail.com>
5085 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
5086 Length prefix should be size in bytes. Fix bug #339530.
5088 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
5089 Length prefix should be size in bytes. Fix bug #339530.
5091 Code is contributed under MIT/X11 license.
5093 2008-06-05 Bill Holmes <billholmes54@gmail.com>
5095 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
5097 Contributed under MIT/X11 license.
5099 2008-06-05 Martin Baulig <martin@ximian.com>
5101 * mono-debug-debugger.c
5102 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
5104 2008-06-05 Zoltan Varga <vargaz@gmail.com>
5106 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
5107 while holding the assemblies lock to prevent deadlocks. Handle the case
5108 where the search hook returns NULL but the assembly was still loaded.
5111 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
5112 modify domain state.
5114 2008-06-05 Andreas Färber <andreas.faerber@web.de>
5116 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
5117 * Makefile.am (pedump_LDADD): Post-process object files and
5118 add dtrace-generated object file, if necessary.
5120 Code is contributed under MIT/X11 license.
5122 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
5124 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
5126 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
5128 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
5130 2008-06-04 Mark Probst <mark.probst@gmail.com>
5132 * threads.c: Try to free everything from the delayed free table
5133 when shutting down threads, and set the variable to NULL after the
5134 table is freed so that calling
5135 mono_thread_hazardous_try_free_all() when shutting down the root
5136 domain doesn't crash.
5138 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
5140 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
5141 the caller if resulting type was inflated.
5143 * class.c (mono_class_create_from_typespec): Free the MonoType if it
5146 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
5149 2008-06-04 Zoltan Varga <vargaz@gmail.com>
5151 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
5152 class library tests.
5154 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
5155 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
5158 2008-06-04 Mark Probst <mark.probst@gmail.com>
5160 * domain.c, domain-internals.h: The JIT infos are now freed by the
5161 JIT info table code. They are freed immediately if there only a
5162 single JIT info table in circulation. If there is more, the free
5163 is delayed via a queue.
5165 * threads.c, threads-types.h: New hazard pointer function for
5166 freeing all freeable delayed items in one sitting.
5168 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
5170 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
5172 * reflection.c (typebuilder_setup_properties): Same.
5174 * reflection.c (typebuilder_setup_events): Same.
5176 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
5178 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
5179 and use it for allocating memory.
5181 * reflection.c (mono_marshal_spec_from_builder): Same.
5183 * reflection.c: Change code to use new signatures.
5185 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
5187 2008-06-03 Zoltan Varga <vargaz@gmail.com>
5189 * decimal.c (rescale128): Put back one line which was accidently commented
5192 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
5195 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
5197 * reflection.c (mono_reflection_generic_class_initialize): Name must
5198 be always malloc'ed so we can free it later on. Do this for field, property
5201 * metadata.c (free_generic_class): Free field, property and event names.
5203 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
5205 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
5206 instead of g_memdup.
5208 * reflection.c (typebuilder_setup_fields): Same.
5210 2008-06-03 Zoltan Varga <vargaz@gmail.com>
5212 * decimal.c (rescale128): Optimize this function a bit more.
5214 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
5216 * metadata.c (free_generic_class): Release some memory from
5217 SRE generic classes.
5219 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
5221 * reflection.c (mono_image_get_generic_field_token): No reference
5222 to name is kept, free it.
5224 * reflection.c (mono_reflection_generic_class_initialize): Free
5225 more memory of the inflated field.
5227 2008-06-03 Zoltan Varga <vargaz@gmail.com>
5229 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
5232 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
5234 * reflection.c (mono_dynamic_image_free): Release memory used by
5235 MonoDynamicImage::array_methods elements.
5237 * reflection.c (assembly_add_win32_resources): Release memory after
5240 2008-06-02 Zoltan Varga <vargaz@gmail.com>
5242 * decimal.c (log2_32): Use an optimized version for this function too.
5244 * decimal.c (log2_64): Fix this on 32 bit machines.
5246 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
5248 * class.c (mono_dup_array_type): Implement allocation using a mempool.
5250 * class.c (mono_metadata_signature_deep_dup): Same.
5252 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
5255 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
5257 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
5259 * metadata-internals.h: Added mono_metadata_signature_dup_full.
5261 * class-internals.h: Update signatures to take a MonoMemPool.
5263 2008-06-02 Dick Porter <dick@ximian.com>
5265 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
5267 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
5268 FormatMessage API to get the error text. Fixes bug 321827.
5270 2008-06-02 Zoltan Varga <vargaz@gmail.com>
5272 * decimal.c: Add some micro optimizations to make decimal operations faster.
5274 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
5276 * reflection.c (method_encode_clauses): Take a mempool
5277 as parameter and use it to allocate the clause array.
5279 * reflection.c (mono_image_get_field_on_inst_token): Free
5280 the inflated type after encoding it.
5282 * reflection.c (mono_dynamic_image_free): Free each element
5283 of MonoDynamicImage::gen_params.
5285 * reflection.c (reflection_methodbuilder_to_mono_method):
5286 Allocate the generic param array from the mempool.
5287 Allocate signature params from the mempool.
5289 * reflection.c (mono_reflection_generic_class_initialize):
5290 Free inflated fields after been used.
5292 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
5294 * icall.c: Reapply the memory leak fixes as they no
5295 longer make mono crash.
5297 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
5299 * reflection.c (mono_type_get_object): Don't store the suplied
5300 MonoType with type_hash. A caller which pass a type that
5301 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
5302 might end with a pointer to freed memory.
5303 The solution is to use byval_arg or this_arg from the associated
5304 MonoClass of the supplied type.
5306 2008-05-29 Zoltan Varga <vargaz@gmail.com>
5308 * icall.c: Revert the rest of the last change as it breaks the build too.
5310 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
5312 * icall.c: Revert a leak fix as it's breaking the build.
5314 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
5316 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
5318 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
5320 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
5322 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
5324 * icall.c: Fix some memory leaks.
5326 2008-05-29 Dick Porter <dick@ximian.com>
5328 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
5329 async socket operations from the pending list when a socket
5330 closes. Leaving it until the threadpool services the event
5331 exposes a race condition when a socket descriptor is reused.
5334 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5336 * object.c: Fix negative index check for array alocation.
5338 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5340 * icall.c, marshal.c: Delegate wrappers should skip visibility.
5341 This check is performed by the verifier for IL created delegates
5342 and by Delegate::CreateDelegate for programatically created ones.
5345 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5347 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
5348 Fix code to use mono_array_size_t instead of int.
5350 Based on patch by Luis F. Ortiz.
5351 Contributed under X11 license.
5352 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
5354 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5356 * icall.c: Added ves_icall_System_Array_GetLongLength and
5357 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
5360 * icall.h: Export both new functions.
5362 Based on patch by Luis F. Ortiz.
5363 Contributed under X11 license.
5364 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
5366 2008-05-28 Martin Baulig <martin@ximian.com>
5368 The debugger now requires exactly r103463.
5370 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
5371 This version is not supported by the debugger, wait for 72.
5373 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5375 * object.h: Changed array related functions to use
5376 mono_array_size_t instead of guint32. Forgot to commit this file.
5378 Patch by Luis F. Ortiz.
5379 Contributed under X11 license.
5380 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
5383 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5385 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
5386 don't define it. Use the number literal instead.
5388 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
5390 * icall.c: Changed array related functions to use
5391 mono_array_size_t instead of guint32.
5393 * icall.c (ves_icall_System_Array_GetLength): Check for length
5394 overflow under MONO_BIG_ARRAYS.
5396 Based on patch by Luis F. Ortiz.
5397 Contributed under X11 license.
5398 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
5400 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
5402 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
5404 Based on patch by Luis F. Ortiz.
5405 Contributed under X11 license.
5406 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
5408 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
5410 * object.c, object.h: Changed array related functions to use
5411 mono_array_size_t instead of guint32.
5413 Patch by Luis F. Ortiz.
5414 Contributed under X11 license.
5415 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
5417 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
5419 * object.h: Introduced mono_array_size_t typedef. This must be used
5420 in all places an array length is expected. This is 64bits wide if
5421 MONO_BIG_ARRAYS is enabled.
5423 Patch by Luis F. Ortiz.
5424 Contributed under X11 license.
5425 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
5427 2008-05-27 Zoltan Varga <vargaz@gmail.com>
5429 * security-manager.c class.c: Set the class exception info by calling
5430 mono_class_set_failure ().
5432 * class.c (mono_class_get_exception_data): New accessor function.
5433 (mono_class_set_failure): Store exception_data in the property hash.
5435 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
5436 the struct as a property.
5438 * loader.c (mono_get_method_full): Store the lookup result for method
5439 tokens in method_cache, the others in methodref_cache to decrease the memory
5440 usage of hash tables.
5442 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
5443 (mono_image_init): method_cache is lazy inited now.
5445 * metadata-internals.h (struct _MonoImage): Change method_cache to
5446 a MonoValueHashTable, add a separate methodref_cache.
5448 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
5450 * number-formatter.h: Fix tables to avoid arithemtic overflow in
5451 Double.ToString as exposed by Bug #383531.
5453 2008-05-26 Zoltan Varga <vargaz@gmail.com>
5455 * number-formatter.h: Make some tables static.
5457 * class.c (mono_method_set_generic_container): New accessor function.
5458 (mono_method_get_generic_container): Ditto.
5460 * class-internals.h (struct _MonoMethod): Remove rarely used
5461 'generic_container' field, store it in the property hash instead. Add
5462 'is_generic' boolean field instead.
5464 * image.c (mono_image_init): Initialize property_hash.
5465 (mono_image_close): Destroy property_hash.
5467 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
5468 hold rarely used fields of runtime structures belonging to this image.
5470 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
5471 to get/set method->generic_container.
5473 * loader.c (mono_get_method_from_token): Avoid loading the method header for
5476 2008-05-25 Zoltan Varga <vargaz@gmail.com>
5478 * class.c (mono_class_inflate_generic_method_full): Don't increase
5479 mono_stats.inflated_method_count for methods found in the cache.
5481 * threads.c (mono_thread_request_interruption): Add a comment about
5484 2008-05-24 Zoltan Varga <vargaz@gmail.com>
5486 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
5487 interface_offsets_packed table.
5489 * class.c (mono_class_init): Remove some dead code.
5491 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
5492 mono_class_setup_vtable () when CAS is active to detect security problems.
5494 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
5496 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
5498 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
5499 parameters as it's irrelevant for delegate checking.
5501 2008-05-23 Zoltan Varga <vargaz@gmail.com>
5503 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
5505 * class.c (mono_class_init): Control the creation of a generic vtable using
5506 a global which is true by default, but set to false by the runtime startup code.
5508 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
5509 Disabled for now since it breaks the embedding API.
5510 Move the setup of class->methods for arrays to mono_class_setup_methods ().
5511 (mono_class_setup_methods): Add a memory barrier.
5513 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
5514 when mono_class_init () doesn't compute the generic vtable.
5516 2008-05-23 Massimiliano Mantione <massi@ximian.com>
5517 * profiler.c: Added mono_profiler_install_statistical_call_chain,
5518 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
5519 to support call chains (backtrace) in the stat profiler.
5520 * profiler.c, profiler-private.h: Likewise.
5522 2008-05-22 Mark Probst <mark.probst@gmail.com>
5524 * generic-sharing.c: Init generic class when a method of it is
5525 requested via a runtime generic context.
5527 2008-05-22 Zoltan Varga <vargaz@gmail.com>
5529 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
5531 * reflection.c (mono_type_get_object): Add a FIXME.
5533 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
5535 * class.c (mono_class_get_method_by_index): New helper function, returning an
5536 entry in the class->methods array.
5538 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5540 * class.c (mono_class_init): Only do the array optimization for szarrays.
5541 Avoid creating a generic vtable for generic instances as well.
5542 (mono_class_get_method_from_name_flags): Don't search in the metadata for
5545 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
5547 * loader.c (mono_get_method_constrained): Inflate the signature
5548 with class context. Fix #325283.
5550 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5552 * object.c (mono_class_create_runtime_vtable): Add a comment.
5554 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
5556 (setup_interface_offsets): Handle the case when this is called twice for arrays.
5557 (mono_class_setup_vtable_general): Add an assert.
5558 (mono_class_init): Avoid creating a generic vtable for arrays.
5560 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
5561 here, let mono_class_init () do that.
5563 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
5564 interfaces in mscorlib.
5566 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
5567 interfaces. Add some comments.
5568 (mono_class_init): Call mono_class_setup_methods () here since it is no
5569 longer called by mono_class_setup_vtable ().
5571 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
5572 not set in class->vtable.
5573 (mono_class_create_runtime_vtable): Reenable the disabled code.
5575 * object.c (mono_class_create_runtime_vtable): Disable the last change for
5576 now as it causes some test failures.
5578 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
5579 if using the vtable trampoline. Also remove some strange code which put the
5580 generic methods themselves into the vtable slots. Remove the AOT init_vtable
5581 stuff as it is no longer needed.
5583 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
5585 * pedump.c: Give make --verify all option check code as well.
5586 Using --verify code won't check for metadata now.
5588 2008-05-19 Martin Baulig <martin@ximian.com>
5590 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
5593 (_mono_debug_using_mono_debugger): New global variable; it's set
5594 directly by the debugger, so mono_debug_using_mono_debugger() also
5595 works after attaching.
5597 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
5599 * object.c (mono_class_create_runtime_vtable): Use memory barriers
5600 as we do double checked locking on MonoClass::runtime_info and
5601 MonoClassRuntimeInfo::domain_vtables.
5603 2008-05-18 Zoltan Varga <vargaz@gmail.com>
5605 * debug-helpers.c (print_field_value): Fix a warning.
5607 2008-05-16 Zoltan Varga <vargaz@gmail.com>
5609 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
5610 set in the AOT case.
5612 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
5614 * class.c (mono_class_setup_vtable_general): Use memory barriers
5615 as we do double checked locking on MonoClass::vtable.
5617 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
5619 * reflection.c (resolve_object): Inflate only if the generic context
5620 is not null. Fixes #389886.
5622 2008-05-15 Jonathan Chambers <joncham@gmail.com>
5624 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
5627 Code is contributed under MIT/X11 license.
5629 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
5631 * class.c: Revert unrelated change.
5633 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
5635 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
5636 a generic instantiation, use mono_class_from_mono_type instead of playing
5637 with MonoType directly.
5639 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
5641 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
5642 checks must ignore generic instantiations, so mono_class_has_parent is not
5643 suitable. Fixes #390128.
5645 2008-05-14 Zoltan Varga <vargaz@gmail.com>
5647 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
5648 it to avoid registering tokens during metadata generation. Fixes #390023.
5650 2008-05-14 Kornél Pál <kornelpal@gmail.com>
5652 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
5655 Contributed under MIT/X11 license.
5657 2008-05-14 Kornél Pál <kornelpal@gmail.com>
5659 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
5660 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
5661 to fixup the EXE image.
5662 (mono_cleanup): Use mono_close_exe_image.
5663 (mono_close_exe_image): New function.
5664 * image.c: Include "marshal.h".
5665 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
5666 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
5667 counting when the image is loaded outside of mono_image_open_full. Set status
5668 based on GetLastError.
5669 * coree.c: Include required headers. Add init_from_coree.
5670 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
5671 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
5672 (_CorExeMain): Set init_from_coree.
5673 (CorExitProcess): Only call ExitProcess for now.
5674 (CorBindToRuntimeEx): New stub implementation.
5675 (CorBindToRuntime): New function.
5676 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
5677 (MonoFixupExe): ILONLY executables require no fixups.
5678 (mono_set_act_ctx): New function to set activation context.
5679 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
5680 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
5681 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
5682 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
5684 * domain-internals.h: Add mono_close_exe_image.
5686 Contributed under MIT/X11 license.
5688 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
5690 * metadata.c (mono_metadata_compute_size): Correctly calculate field
5691 size for generic param and event tables. Fixes #388977.
5693 2008-05-13 Zoltan Varga <vargaz@gmail.com>
5695 * loader.c (mono_method_signature): Use memory barriers because of the double
5696 checked locking pattern.
5698 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
5699 aborting or aborted as well. Fixes #376391.
5701 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
5702 existing runtime state in the Suspend handler during shutdown.
5704 2008-05-12 Zoltan Varga <vargaz@gmail.com>
5706 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
5708 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
5709 which are starting up or shutting down.
5711 * threads.c (mono_threads_set_shutting_down): Don't return a value since
5712 this function never returns if the runtime is already shutting down.
5714 * icall.c (ves_icall_System_Environment_Exit): Update after
5715 mono_threads_set_shutting_down () signature change.
5717 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
5719 * class.c: Added can_access_instantiation to verify if the instantiation
5720 is visible. Fix access check for nested types as they returned TRUE
5721 before doing type and generic instantiation visibility checks.
5723 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
5725 * reflection.c (mono_reflection_create_generic_class): The created type
5726 must have a different container from its TypeBuilder. Otherwise they
5727 will end sharing generic arguments, which is wrong.
5729 Due to the sharing, making a generic instance of the created type using
5730 the TypeBuider generic arguments resulted in the generic type definition
5731 been returned, which is wrong as well.
5733 As a bonus the code was leaking the type_params array. This memory should
5734 be allocated from the image mempool.
5736 This fixes bug #354047.
5738 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
5740 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
5741 to here as they are now used in assembly.c new code.
5742 Added a skipverification flag to MonoAssembly.
5743 New internal function mono_assembly_has_skip_verification.
5745 * assembly.c: New function mono_assembly_has_skip_verification. It checks
5746 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
5749 2008-05-07 Zoltan Varga <vargaz@gmail.com>
5751 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
5752 needed. Fixes #387034.
5754 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
5756 2008-05-06 Miguel de Icaza <miguel@novell.com>
5758 * assembly.c (mono_assembly_load_reference): Prevent crash while
5759 disassembling Silverlight 2.0 executables while we still do not
5760 have GACed libraries.
5762 2008-05-07 Zoltan Varga <vargaz@gmail.com>
5764 * reflection.c: Special case generic type definitions as well. Fixes #383444.
5766 2008-05-06 Zoltan Varga <vargaz@gmail.com>
5768 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
5769 of the dynamic case. Fixes #387404.
5771 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5773 *verify.c (mono_verifier_is_class_full_trust): If under
5774 verify_all and the verifier mode was not set, only
5775 gac and corlib types are fulltrust. This makes --verify-all
5776 usable to detect unverifiable code, which is the expected
5779 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5781 * verify.h: Ops, commited the header with debug
5784 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5786 * verify.c (merge_stack): Use the new value on unverifiable
5789 * verify.c (verify_type_compatibility_full): Comparison
5790 of nullable types can't use mono_class_is_assignable_from.
5792 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
5793 that makes all verification errors be reported.
5795 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
5798 2008-05-05 Robert Jordan <robertj@gmx.net>
5800 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
5801 support for value types. See #386415.
5803 * object.c: comments.
5805 Code is contributed under MIT/X11 license.
5807 2008-05-05 Martin Baulig <martin@ximian.com>
5809 * debug-mono-symfile.h
5810 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
5811 for old pre-terrania symbol files.
5813 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5815 * mono-config.c: Add ppc64 architecture.
5817 Code is contributed under MIT/X11 license.
5819 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5821 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
5822 PPC64 uses function descriptors as well.
5824 Code is contributed under MIT/X11 license.
5826 2008-05-04 Zoltan Varga <vargaz@gmail.com>
5828 * object.c (compute_class_bitmap): Ignore literal static fields.
5830 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
5831 var has an invalid format.
5832 (describe_ptr): Add some sanity checks for the vtable.
5833 (add_nursery_frag): Clear unused nursery fragments.
5834 (major_collection): Clear all remaining nursery fragments.
5836 2008-05-03 Robert Jordan <robertj@gmx.net>
5838 * image.c, metadata-internals.h: add thunk_invoke_cache.
5840 * marshal.c, marshal.h: implement
5841 mono_marshal_get_thunk_invoke_wrapper ().
5843 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
5845 Code is contributed under MIT/X11 license.
5847 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
5849 * verify.c (do_leave): Empty the stack.
5851 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
5853 * class.c (mono_class_is_assignable_from): Variance
5854 doesn't work between reference and value types. For example,
5855 given type C<T+>, C<int32> is not assignable to C<object>.
5856 Break the argument checking loop on first error.
5858 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
5860 * icall.c : base64_to_byte_array() needs some more strict
5861 check for sequence of '=' characters. Patch by Santa
5862 Marta (http://deee.g.hatena.ne.jp/santamarta).
5864 Contributed under MIT/X11 license.
5865 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
5867 2008-05-02 Jonathan Chambers <joncham@gmail.com>
5869 * domain.c: Disable LoadLibrary support to fix Win32 build.
5871 Code is contributed under MIT/X11 license.
5873 2008-05-02 Zoltan Varga <vargaz@gmail.com>
5875 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
5876 to help with cache behaviour.
5878 2008-05-01 Miguel de Icaza <miguel@novell.com>
5880 * appdomain.c (mono_domain_from_appdomain): Add new accessor
5883 2008-05-01 Zoltan Varga <vargaz@gmail.com>
5885 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
5887 2008-05-01 Dick Porter <dick@ximian.com>
5889 * process.c (process_get_fileversion): Only pass 16 bits of
5890 language ID to VerLanguageName. Fixes bug 381204.
5892 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5894 * verify.c (mono_method_verify): Fix the comparison
5895 operator for code bounds check.
5897 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5899 * verify.c (mono_method_verify): Check the bounds of
5900 all access of the code array.
5902 2008-04-29 Kornél Pál <kornelpal@gmail.com>
5904 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
5906 2008-04-28 Zoltan Varga <vargaz@gmail.com>
5908 * image.c (mono_image_strong_name_position): Fix return value when the rva is
5911 2008-04-28 Kornél Pál <kornelpal@gmail.com>
5913 * loader.c (mono_get_method_from_token, mono_method_signature): Add
5914 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
5915 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
5916 fixup main EXE images when using mono.exe for mixed-mode assembly support.
5917 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
5919 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
5920 runtime initialization from metadata.
5921 * assembly.c: Remove obsolete ceGetModuleFileNameA.
5922 (mono_set_rootdir): Use mono_get_module_file_name.
5923 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
5925 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
5926 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
5927 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
5928 MonoCLIImageInfo. Add support for module handles.
5929 (load_cli_header): Update mono_cli_rva_image_map signature.
5930 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
5931 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
5932 (mono_image_rva_map): Add support for module handles.
5933 (mono_image_ensure_section_idx): Add support for module handles.
5934 (mono_image_close): Add support for module handles.
5935 (do_load_header): Add support for module handles.
5936 (mono_image_open_from_module_handle): New function for internal use.
5937 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
5938 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
5939 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
5941 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
5942 * image.h: Add mono_image_fixup_vtable.
5943 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
5945 * coree.h: New file.
5946 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
5947 unsupported native code.
5948 (mono_marshal_set_callconv_from_modopt): New function splitted from
5949 mono_marshal_get_managed_wrapper.
5950 (mono_marshal_get_managed_wrapper): Use
5951 mono_marshal_set_callconv_from_modopt.
5952 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
5953 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
5954 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
5955 that results in a deadlock when the runtime is loaded in _CorDllMain.
5956 * Makefile.am: Add coree.c and coree.h.
5958 Contributed under MIT/X11 license.
5960 2008-04-28 Mark Probst <mark.probst@gmail.com>
5962 * generic-sharing.c: Search for type arguments in array element
5965 2008-04-28 Mark Probst <mark.probst@gmail.com>
5967 * class-internals.h, generic-sharing.c: New, small runtime generic context.
5969 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
5971 * object.c: Don't setup the RGCTX when the vtable is created,
5972 because we're setting it up lazily now.
5974 2008-04-26 Zoltan Varga <vargaz@gmail.com>
5976 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
5979 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5981 * verify.c (verify_class_for_overlapping_reference_fields):
5982 If class is under fulltrust allow reference types to overllap
5983 if they have the same RVA.
5985 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5987 * pedump.c: Added new flag valid-only, that makes the verifier
5988 behaves just like --security=validil. It won't fail type load
5989 due to unverifiable restrictions.
5991 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5993 * class-internals.h (struct MonoMethod): Added a verification_success
5994 field to cache verifier executions. Reduced MonoMethod:slot size by
5997 2008-04-23 Zoltan Varga <vargaz@gmail.com>
5999 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
6000 instead of a 'vt' argument to save an indirection and to allow these to be used
6002 (scan_vtype): New helper function to scan an area using a gc descriptor.
6003 (mono_gc_wbarrier_value_copy): Implement this.
6004 (handle_remset): Add support for REMSET_VTYPE.
6005 (find_in_remset_loc): Ditto.
6006 (mono_gc_base_init): Allow some debugging options to be controlled through the
6007 use of the MONO_GC_DEBUG env variable.
6008 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
6009 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
6011 2008-04-23 Martin Baulig <martin@ximian.com>
6013 * domain.c (mono_domain_create): Move the call to
6014 mono_debug_domain_create() down, after allocating the domain id.
6016 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
6018 verify.c (verify_class_for_overlapping_reference_fields): Skip
6019 static fields while verifying for overlapping fields as they
6020 don't matter at all.
6022 2008-04-23 Marek Habersack <mhabersack@novell.com>
6024 * domain-internals.h: added a declaration of
6025 mono_make_shadow_copy.
6027 * assembly.c (mono_assembly_open_full): shadow copying of
6028 assemblies moved to here, so that all the assemblies within the
6029 application domain's private binary directories can be
6030 processed. Fixes bug #380546
6032 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
6033 mono_make_shadow_copy and made non-static. The decision whether
6034 to shadow-copy an assembly is made based on its location - it's
6035 copied if it's in one of the private application domain binary
6036 directories and its different to the target file in the shadow
6037 directory. Fixes bug #380546
6039 2008-04-22 Zoltan Varga <vargaz@gmail.com>
6041 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
6043 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
6046 * reflection.c (mono_image_create_token): Handle
6047 Method/ConstructorOnTypeBuilderInst.
6048 (resolve_object): Ditto.
6049 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
6050 so it can be called from resolve_object. Also handle the case when the inflated
6051 class already has its methods setup.
6053 2008-04-21 Martin Baulig <martin@ximian.com>
6055 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
6057 2008-04-20 Geoff Norton <gnorton@novell.com>
6059 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
6060 pointer dereference.
6062 2008-04-15 Marek Habersack <mhabersack@novell.com>
6064 * appdomain.c (try_load_from): if IOMAP is in effect, call the
6065 portability API to look up the assembly file. Fixes behavior in
6066 situations when the application has a bin/ directory, but the
6067 assembly search patch refers to Bin/ (and thus the requested file
6068 name is Bin/SomeLibrary.dll). Fixes bug #379888
6070 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
6072 verify.c (mono_type_is_generic_argument): Extracted this check
6073 from a dozen places to here.
6075 verify.c: Fixed all issues related to boxing generic arguments
6076 and their constraints.
6078 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
6080 verify.c (mono_class_interface_implements_interface): Fix win32 build.
6082 2008-04-14 Zoltan Varga <vargaz@gmail.com>
6084 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
6085 isn't finished yet. Fixes #363447.
6087 2008-04-13 Zoltan Varga <vargaz@gmail.com>
6089 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
6092 2008-04-13 Jb Evain <jbevain@novell.com>
6094 * domain.c: update the 2.1 profile versions.
6095 Merged from the Moonlight 2 branch.
6097 2008-04-12 Zoltan Varga <vargaz@gmail.com>
6099 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
6100 mscorlibs for the non-refonly case as well.
6102 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
6103 in mono_assembly_load_from_full (). Fixes #378924.
6105 2008-04-11 Geoff Norton <gnorton@novell.com>
6107 * icall.c: The global extern environ doesn't exist on Mac. We
6108 need to call NSGetEnviron instead.
6110 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
6112 verify.c: Add generic method constraint verification.
6114 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
6116 class.c (mono_class_inflate_generic_method_full): Add a long
6117 explanation to the is_mb_open hack. Remove the FIXME.
6119 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
6121 * verify.c (mono_method_verify): Mark all unknown opcodes
6122 as invalid. Mark jmp as unverifiable.
6124 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
6126 * verify.c: Add code to do type constraint verification on class instances.
6128 * verify.c (mono_verifier_verify_class): Use the type constraint
6131 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
6133 * class.c (mono_class_get_field_default_value): Don't pass cindex
6134 as hint to mono_metadata_get_constant_index. The local is not initialized
6135 and should contain garbage most of the time. This could only work
6138 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
6140 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
6142 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
6144 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
6146 * class.c (mono_class_from_generic_parameter): Save the token of the
6147 generic param in MonoClass::sizes.generic_param_token.
6149 * reflection.c (mono_custom_attrs_from_class): If the class type is
6150 VAR or MVAR retrieve the attributes of the generic param.
6152 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
6154 * class.c (mono_class_init): Do class verification if the verifier
6157 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
6159 * verify-internal.h: Added mono_verifier_verify_class.
6161 * verify.c: Added mono_verifier_verify_class. It checks for
6162 classes with explicit layout that have overlapping reference fields.
6164 * pedump.c: Init the verifier state prior to verification. Fixed
6165 command line arguments.
6167 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
6169 * Makefile.am: Added verify-internals.h, hopefully fix the build.
6171 2008-04-08 Zoltan Varga <vargaz@gmail.com>
6173 * verify-internals.h: Fix a warning.
6175 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
6177 * verify-internals.h: New header with the verifier configuration
6178 extracted from mini.c.
6180 * verify.c: Implemented the new functions exported by verify-internals.h.
6182 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
6184 * verify.c: Add proper verification of ckfinite.
6186 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
6188 * verify.c (do_conversion): Improved error message to something
6191 * verify.c (check_is_valid_type_for_field_ops): Fix to work
6192 with primitive types.
6194 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
6196 * verify.c: Added tail prefix checking. Marked icall
6199 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
6201 * verify.c: Fix the detection of branches to the middle
6204 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
6206 * verify.c: Implemented verification of volatile. and
6207 unaligned. prefix. Check if a type is valid after retrieving it.
6209 2008-04-01 Dick Porter <dick@ximian.com>
6211 * process.c (process_get_fileversion): If there's no string block,
6212 set the file language to en_US. Fixes the other new part of bug
6215 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
6217 * class.c: New functions mono_method_can_access_field_full and
6218 mono_method_can_access_method_full. They perform type visibility
6219 and type site check.
6221 * class-internal.h: Added exported functions.
6223 * verify.c: Use new functions to implement proper visibility checks.
6225 2008-03-29 Zoltan Varga <vargaz@gmail.com>
6227 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
6229 2008-03-28 Dick Porter <dick@ximian.com>
6231 * process.c (process_get_fileversion): Use the first language ID
6232 we see, rather than insisting on an invariant language. Fixes bug
6235 2008-03-28 Zoltan Varga <vargaz@gmail.com>
6237 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
6238 the streams to fix reading of invalid memory later.
6240 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
6243 2008-03-26 Zoltan Varga <vargaz@gmail.com>
6245 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
6246 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
6248 2008-03-26 Massimiliano Mantione <massi@ximian.com>
6249 * threads.h: Added MonoThreadManageCallback type and
6250 mono_thread_set_manage_callback prototype
6251 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
6252 (used to store the mono_thread_manage callback).
6253 * threads.c: Added mono_thread_set_manage_callback, and handle
6254 "MonoThread->manage_callback" in build_wait_tids.
6256 2008-03-26 Dick Porter <dick@ximian.com>
6258 * process.c (process_get_fileversion): Set FileVersionInfo strings
6259 to Empty when the resource doesn't have the particular info.
6262 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
6264 * verify.c (mono_method_verify): Proper prefix validation.
6266 2008-03-25 Zoltan Varga <vargaz@gmail.com>
6268 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
6269 itself in a separate argument instead of throwing them. Fixes #373448.
6271 * appdomain.c: Bump corlib version.
6273 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
6275 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
6277 2008-03-20 Kornél Pál <kornelpal@gmail.com>
6279 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
6282 2008-03-20 Mark Probst <mark.probst@gmail.com>
6284 * generic-sharing.c, class-internals.h: Code for putting
6285 reflection types into the runtime generic context.
6287 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
6289 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
6293 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
6295 * verify.c (VerifyContext): Added instruction prefix data to the struct.
6297 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
6299 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
6301 * verify.c (do_cast): Let the result value keep the boxed status.
6303 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
6305 2008-03-17 Jb Evain <jbevain@novell.com>
6307 * reflection.c: when running on a 2.0 runtime, emit
6308 unconditionally the #~ header version as 2.0, and the
6309 CLI header version as 2.5, for symmetry's sake with csc.
6311 2008-03-16 Zoltan Varga <vargaz@gmail.com>
6313 * class.c: Remove the unused cache_interface_offsets stuff.
6315 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
6316 profiler.c: Fix warnings.
6318 2008-03-16 Mark Probst <mark.probst@gmail.com>
6320 * generic-sharing.c, class-internals.h: Support for putting
6321 methods into the runtime generic context.
6323 2008-03-16 Zoltan Varga <vargaz@gmail.com>
6325 * class.c (mono_class_setup_fields): Ignore calls made to this function for
6326 classes which are generic instances of not-yet finished typebuilders. Fixes
6329 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
6331 2008-03-15 Zoltan Varga <vargaz@gmail.com>
6333 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
6335 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
6336 field, replace it with a hash table in MonoDynamicImage.
6338 * reflection.c (inflate_mono_method): Access the generic definition object from
6339 image->generic_def_objects instead of imethod->reflection_info.
6341 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
6343 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
6345 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
6346 function in reflection.c so it is easier to keep in sync with the dynamic image
6349 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
6350 mono_image_close ().
6352 2008-03-15 Mark Probst <mark.probst@gmail.com>
6354 * class.c (mono_class_generic_sharing_enabled): Disable generic
6355 sharing for all architectures except AMD64 and x86 to fix build.
6357 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
6359 * verify.c: Use the generic definition MonoGenericContext when available.
6360 Remove code for checking generics instance compatibility in favor of
6361 mono_class_is_assignable_from.
6363 2008-03-14 Mark Probst <mark.probst@gmail.com>
6365 * marshal.c, marshal.h, metadata-internals.h, image.c,
6366 wrapper-types.h: New wrapper for invoking a shared static method
6367 without having to pass the runtime generic context argument.
6369 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
6371 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
6373 2008-03-14 Zoltan Varga <vargaz@gmail.com>
6375 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
6377 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
6378 create a token from a FieldOnTypeBuilderInst.
6379 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
6380 (resolve_object): Ditto.
6382 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
6383 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
6385 2008-03-14 Martin Baulig <martin@ximian.com>
6387 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
6389 * debug-mono-symfile.h
6390 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
6391 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
6393 2008-03-10 Martin Baulig <martin@ximian.com>
6395 * debug-mono-symfile.h
6396 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
6397 `lexical_block_table_offset'.
6398 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
6400 (MonoSymbolFile): Added `version'.
6403 (MonoDebugLexicalBlockEntry): Removed.
6404 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
6407 * mono-debug.c (mono_debug_add_method): Don't compute lexical
6408 blocks here; the debugger now does this internally.
6410 2008-02-27 Martin Baulig <martin@ximian.com>
6412 * object.c (mono_runtime_exec_main): Call
6413 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
6414 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
6416 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
6418 * verify.c (verify_type_compatibility_full): Allow native int to be converted
6419 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
6421 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
6423 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
6424 ldftn with a virtual method.
6426 2008-03-13 Geoff Norton <gnorton@novell.com>
6428 * decimal.c: Only include memory.h if the platform has it.
6430 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
6432 * assembly.c, class.c, metadata-internals.h: make sure public key
6433 tokesns are compared in a case-insensitive way. Also, all
6434 the lookups in the GAC use a lowercase public key token
6435 (gaacutil already does the lowercasing on install). Fixes
6438 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
6440 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
6443 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
6445 * image.c: when someone loads a mscorlib from a file, return the
6446 currently loaded mscorlib (fixes bug #369253).
6448 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
6450 * class.c: handle types with no parents by forcing them to have
6451 System.Object as a parent and marking them as broken (this currently
6452 allows the first part of bug #369173 to work as well, likely because
6453 we don't check for typeload exceptions everywhere yet).
6455 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
6457 * class.c: more complete check that types belong to corlib
6458 (fixes second part of bug #369173).
6460 2007-03-10 Bill Holmes <billholmes54@gmail.com>
6462 * generic-sharing.c: Including glib.h for the MSVC builds to define
6463 "inline" to "__inline" before including mono-membar.h.
6465 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
6466 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
6469 Contributed under MIT/X11 license.
6471 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
6473 * verify.c (do_invoke_method): Remove return type validation.
6475 * verify.c (do_ret): Do return type validation at return site instead of
6478 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
6480 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
6482 * verify.c: Some todos cleaned and improved a few error messages.
6484 2008-03-08 Zoltan Varga <vargaz@gmail.com>
6486 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
6488 2008-03-07 Zoltan Varga <vargaz@gmail.com>
6490 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
6491 system types correctly.
6493 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
6496 2008-03-06 Zoltan Varga <vargaz@gmail.com>
6498 * assembly.c (build_assembly_name): Fix a warning.
6500 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
6502 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
6503 the called function takes an object type argument. Fixes storing or
6504 valuetypes across remoting as well as reducing memory usage.
6505 * image.c, metadata-internals.h: remove now unused ldfld_remote and
6506 stfld_remote wrapper caches.
6508 2008-03-06 Zoltan Varga <vargaz@gmail.com>
6510 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
6513 * reflection.c (mono_image_register_token): New helper function to save
6514 a token->object mapping.
6516 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
6519 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
6520 one dimension arrays. Fixes #367670.
6521 (mono_reflection_get_type_internal): Ditto.
6523 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6525 * marshal.c: mono_load_remote_field_new() always returns object.
6526 so use the proper signature (fixes bug #366445).
6528 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6530 * class-internals.h (MonoMethod): Remove unused uses_this flag,
6531 add an 'inline_failure' flag instead.
6533 2008-03-04 Mark Probst <mark.probst@gmail.com>
6535 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
6536 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
6537 contains the location of "this", used for exception handling.
6539 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6541 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
6542 their size on all platforms for perf reasons.
6544 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
6546 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
6549 * object-internal.h: Same.
6551 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
6553 * reflection.h: Fix the build I just broke.
6555 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
6557 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
6558 Test if a token is valid, this remove explicit usage of
6559 MonoDynamicImage::tokens from the verifier code.
6561 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
6563 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
6564 instead of direct access to MonoDynamicImage::tokens.
6566 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
6568 * verify.c (token_bounds_check): Fix the build I just broke.
6570 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
6572 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
6574 * verify.c (verifier_load_method): Fixed the errors message.
6576 * verify.c (mono_method_verify): Fixed a debug message.
6578 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
6580 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
6581 mono-perfcounters.h, class-internals.h: support for predefined
6582 writable counters, query of categories and counters, bugfixes.
6584 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
6586 * verify.c (do_refanytype): Verify the refanytype opcode.
6588 * verify.c (mono_method_verify): Use do_refanytype.
6590 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
6592 * verify.c (do_mkrefany): Verify the mkrefany opcode.
6594 * verify.c (mono_method_verify): Use do_mkrefany.
6596 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
6598 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
6599 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
6602 2008-02-27 Zoltan Varga <vargaz@gmail.com>
6604 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
6605 the type load exception.
6607 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
6609 * verify.c: Added a few FIXME for method signatures
6611 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
6612 of mono_method_get_signature and get vararg call working. Removed unused
6613 checks for return value.
6615 * verify.c (do_refanyval): Verify the refanyval opcode.
6617 * verify.c (mono_method_verify): Implemented verification of arglist and
6620 2008-02-27 Zoltan Varga <vargaz@gmail.com>
6622 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
6623 vtypes to marshal.c.
6625 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
6626 it works for AOT as well.
6628 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
6630 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
6631 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
6632 the system time is adjusted.
6634 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
6636 * icall.c, icall-def.h: use the new time functions (fixes the
6637 non-monotonic behaviour of TickCount).
6639 2008-02-26 Zoltan Varga <vargaz@gmail.com>
6641 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
6642 it breaks the build.
6644 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
6645 cattr is not finished yet.
6647 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
6649 * verify.c: Proper token validation for field, method and type.
6651 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
6653 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
6655 * loader.c (method_from_memberref): Generate type load error instead of method missing
6656 if the type is not found.
6658 2008-02-23 Zoltan Varga <vargaz@gmail.com>
6660 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
6661 some of the conversions caused the generation of a marshal directive exception.
6663 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
6665 verify.c: Report which exception should be thrown by the JIT.
6666 Added a lot of FIXME notes.
6668 2008-02-22 Mark Probst <mark.probst@gmail.com>
6670 * generic-sharing.c: Runtime generic context slots are not
6671 instantiated on init anymore. Instead, provide function to do the
6672 instantiating on demand.
6674 * class-internals.h: Added vtable to runtime generic context.
6675 Macros for encoding direct and indirect slot offsets in one
6678 2008-02-21 Mark Probst <mark.probst@gmail.com>
6680 * object.c, generic-sharing.c: Moved some generic sharing code
6681 from object.c to generic-sharing.c.
6683 * generic-sharing.c: Added support for extensible runtime generic
6686 * metadata-internals.h: Two new hash tables in MonoImage for
6687 extensible runtime generic context support.
6689 * domain.c: Unregister generic vtables upon domain unloading.
6691 * image.c: Destroy new hash tables upon image unloading.
6693 * metadata.c: Unregister generic subclasses upon image unloading.
6695 * class-internals.h: New data structure for runtime generic
6696 context template. New fields in the runtime generic context for
6699 * Makefile.am: Added generic-sharing.c.
6701 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
6703 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
6704 there is a pending loader exception, raise it.
6706 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
6709 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
6714 2008-02-20 Zoltan Varga <vargaz@gmail.com>
6716 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
6718 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
6720 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
6721 ref-only requests for compatibility with MS.
6723 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
6725 * reflection.c (mono_custom_attrs_from_method): Don't silently
6726 return an empty list for generic method instances.
6727 (mono_custom_attrs_from_param): Likewise.
6729 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
6730 Raja R Harinath <harinath@hurrynot.org>
6733 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
6734 * class.c (mono_class_inflate_generic_method_full): Initialize it
6735 when a fully-open method is instantiated.
6736 * metadata.c (inflated_method_equal, inflated_method_hash): Update
6738 * reflection.c (inflate_mono_method): Don't create a temporary context.
6740 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
6742 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
6743 Compute correct value, to prepare for imethod->reflection_info going away.
6745 2008-02-19 Zoltan Varga <vargaz@gmail.com>
6747 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
6749 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
6751 * verify.c: Implement skip visibility flag.
6753 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
6755 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
6756 which contains an extra field to tell the kind of exception that should be thrown.
6758 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
6760 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
6762 * loader.c (mono_method_get_param_names): Initialize 'klass' after
6763 'method' is updated.
6765 2008-02-11 Zoltan Varga <vargaz@gmail.com>
6767 * class.c (mono_class_layout_fields): Set class->min_align for classes using
6768 explicit layout as well. Fixes #360375.
6770 2008-02-11 Geoff Norton <gnorton@novell.com>
6772 * loader.c: Guard and dereference against inflated generic methods
6774 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
6776 * class.c: Include Retargetable spec in assembly name.
6777 * assembly.c: Always include PublicKeyToken spec in assembly name
6778 (with value "null" if assembly is not signed), and include
6780 * icall-def.h: Added icall for Assembly.get_fullname.
6781 * icall.c: Added icall returning the fullname of an assembly.
6783 2008-02-09 Zoltan Varga <vargaz@gmail.com>
6785 * class.c (mono_class_setup_vtable_general): Add a missing call to
6786 mono_class_setup_methods () which is needed in the AOT case.
6788 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
6790 * verify.c (mono_type_get_stack_name): Added. Return the name for the
6791 stack type of the given MonoType.
6793 * verify.c (verify_type_compatibility_full): Handle the void type.
6795 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
6796 way stack merging works.
6798 * verify.c (store_local): Improved verification message.
6800 * verify.c (do_branch_op): If the merging is invalid, the method
6801 is unverifiable and not invalid. Improved error message.
6803 * verify.c (merge_stacks): Properly merge a boxed valuetype and
6804 a reference type diferent than System.Object. Improved error
6807 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
6809 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
6811 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
6812 type of an enum even if the argument is byref.
6814 * verify.c: Replace all explicit uses of enumtype and enum_basetype
6815 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
6817 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
6819 *verify.c (verify_type_compatibility_full): Make enum types
6820 compatible with their base types.
6822 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
6823 types are compatible for the special case of a boxed valuetype and
6826 * verify.c (verify_stack_type_compatibility): The function
6827 is_compatible_boxed_valuetype was extracted from here.
6829 * verify.c (push_arg): Only set ctx->has_this_store if the method
6832 * verify.c (do_ldelem): Fixed a typo in an error message and added
6833 strict check for mixing int32 and native int as the array type
6836 * verify.c (merge_stacks): Consider boxed valuetypes in the
6837 compatibility checks.
6839 2008-02-07 Massimiliano Mantione <massi@ximian.com>
6840 * profiler.h: (MonoGCEvent): Added start-stop the world events.
6842 2008-02-06 Massimiliano Mantione <massi@ximian.com>
6843 *class.c: use_new_interface_vtable_code: renamed the env var to have
6844 a "MONO_" prefix, and fix the logic to enable it by default.
6846 2008-02-06 Massimiliano Mantione <massi@ximian.com>
6848 mono_class_setup_vtable_general: rewrote the way in which interface
6849 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
6850 makes the code more maintainable.
6851 For now the old code is still there, and can be activated setting
6852 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
6854 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
6856 * verify.c: guarded some debug functions around and #ifdef.
6858 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
6860 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6862 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
6863 changes for now since they seem to break too many things.
6865 2008-02-05 Mark Probst <mark.probst@gmail.com>
6867 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
6868 mono_marshal_find_nonzero_bit_offset): Added macro and function
6869 for finding the byte- and bit-offset of a bitfield within a
6872 2008-02-05 Zoltan Varga <vargaz@gmail.com>
6874 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
6875 (mono_marshal_get_struct_to_ptr): Ditto.
6877 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
6880 2008-02-03 Zoltan Varga <vargaz@gmail.com>
6882 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
6883 between methods for non-corlib types.
6885 2008-02-02 Geoff Norton <gnorton@novell.com>
6887 * loader.c (mono_method_get_param_names): Populate the parameter name for
6888 generic parameters as well. (Fixes #342536)
6890 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
6892 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
6894 * verify.c (do_invoke_method): Fix for calling with byref structs.
6896 * verify.c (do_cast): push a boxed value type based on the type token and not
6899 2008-01-31 William Holmes <billholmes54@gmail.com>
6901 * process.c (process_module_string_read): Check the size returned form
6902 VerQueryValue to avoid out of memory exception.
6904 2008-01-30 Zoltan Varga <vargaz@gmail.com>
6906 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6907 Handle properly modules which are not in the moduleref table. Fixes
6910 2008-01-29 Zoltan Varga <vargaz@gmail.com>
6912 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
6913 the dynamic case which is now in managed code.
6914 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
6916 * marshal.c (mono_string_to_bstr): Fix a warning.
6917 (init_com_provider_ms): Ditto.
6919 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
6921 * exception.c (mono_get_exception_out_of_memory): New helper function.
6923 2008-01-28 Jonathan Chambers <joncham@gmail.com>
6925 * marshal.c: Add support for BSTR marshalling
6926 using other COM systems.
6928 Code is contributed under MIT/X11 license.
6930 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
6932 * object.c (mono_runtime_invoke_array): reverted previous
6933 commit as it breaks the build.
6935 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
6937 * object.c (mono_runtime_invoke_array): Verify arguments for
6938 invalid types. Fixes #348522.
6940 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
6942 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
6943 non-final virtual calls using call.
6945 * verify.c (do_invoke): fixed some TODOs.
6947 * verify.c (push_arg): set has_this_store for "ldarga 0".
6949 2008-01-27 Zoltan Varga <vargaz@gmail.com>
6951 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
6952 which belong to an inflated class. Fixes #356531.
6954 2008-01-26 Robert Jordan <robertj@gmx.net>
6956 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
6957 which resort to FindFirstFile when a certain error condition
6958 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
6959 Code is contributed under MIT/X11 license.
6961 2008-01-24 Jonathan Chambers <joncham@gmail.com>
6963 * marshal.c (emit_marshal_string): Fix out string marshalling
6964 to use specified encoding. Fixes #323900.
6966 Code is contributed under MIT/X11 license.
6968 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
6970 * class.c (mono_class_inflate_generic_method_full): Don't modify
6971 iresult->context after cache check.
6973 2008-01-23 Zoltan Varga <vargaz@gmail.com>
6975 * class.c (mono_class_inflate_generic_method_full): Change the
6976 struct assignments to memcpy for better visibility and add some comments.
6978 2008-01-23 Dick Porter <dick@ximian.com>
6980 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
6981 procedure, and make it work on windows.
6983 2008-01-22 Zoltan Varga <vargaz@gmail.com>
6985 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
6986 a MonoReflectionTypeBuilder since it is always of that type.
6988 * reflection.c (mono_type_get_object): Remove an unneccesary check.
6990 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
6992 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
6994 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
6996 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
6998 * reflection.c (mono_reflection_create_runtime_class): Remove already created
6999 instantiations from the type cache.
7001 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7003 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
7005 * verify.c (do_unbox_value): push a controled mutability managed pointer.
7007 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7009 * verify.c (do_ldstr): added, verifies if the #US token is valid.
7011 * verify.c (mono_method_verify): removed old TODO
7013 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7015 * verify.c (do_newobj): add visibility check.
7017 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7019 * verify.c (do_load_function_ptr): add visibility check.
7021 2008-01-21 Massimiliano Mantione <massi@ximian.com>
7023 mono_generic_class_get_class: hook profiler events.
7024 mono_field_get_offset: added to support heap-shot in the new profiler.
7025 *class.h: exported mono_field_get_offset.
7027 mono_reflection_setup_internal_class: hook profiler events.
7029 2008-01-20 Zoltan Varga <vargaz@gmail.com>
7031 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
7032 argument here too and use it to avoid checking for pending exceptions if
7035 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
7037 * assembly.c (build_assembly_name): add arg for passing the assembly
7038 flags. Do not consider a PublicKey with value "null" valid.
7039 (mono_assembly_name_parse_full): added boolean argument that will be
7040 set if the assembly name contains a PublicKeyToken spec. Added support
7041 for the Retargetable spec for which only Yes or No are allowed as valid
7042 value. Consider assembly name invalid if Retargetable spec is set, but
7043 either version, culture or public key (token) are not specified.
7044 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
7045 with implementation in assembly.c.
7046 * icall.c (fill_reflection_assembly_name): also copy assembly flags
7047 from MonoAssemblyName.
7048 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
7049 introduced argument for mono_assembly_name_parse_full to know if the
7050 assembly name has a PublicKeyToken spec, and if it has instruct
7051 fill_reflection_assembly_name to use default value for keyToken (if
7052 PublicKeyToken is null).
7054 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
7056 * verify.c (mono_method_verify): fixed ovf ops with
7057 float values. They are unverifiable now.
7059 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
7061 * class.c (set_failure_from_loader_error): add BadImageException to the
7062 list of exceptions that can cause a type to fail to load.
7064 * class.c (mono_class_get_exception_for_failure): same.
7066 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
7068 * verify.c (in_any_exception_block): added, check if offset
7069 is part of any exception handling clause.
7071 * verify.c (get_stack_type): added VAR and MVAR types.
7073 * verify.c (do_stobj): better error messages.
7075 * verify.c (do_cpobj): added, check cpobj.
7077 * verify.c (do_initobj): added, check initobj.
7079 * verify.c (do_sizeof): added, check sizeof.
7081 * verify.c (do_localloc): added, check localloc.
7083 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
7085 2008-01-17 Zoltan Varga <vargaz@gmail.com>
7087 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
7088 save_lmf/restore_lmf opcodes.
7090 * threads.c (mono_threads_install_notify_pending_exc): New function to
7091 install a callback notifying the JIT there is a pending exception on a thread.
7092 (mono_thread_request_interruption): Call the new callback.
7093 (mono_thread_get_and_clear_pending_exception): New function to return the
7094 exception pending on a thread.
7096 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
7097 to turn off checking for pending exceptions.
7098 (mono_marshal_get_native_wrapper): Ditto.
7100 2008-01-16 Zoltan Varga <vargaz@gmail.com>
7102 * threads-types.h: Get rid of the unnecessary extern declarations.
7104 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
7106 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
7107 return field from parent class if not private.
7108 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
7109 returns fields from parent class if they are not private.
7110 (method_nonpublic): added function to determine if a given method
7111 should be considered non-public. Returns false for private methods
7112 on parent class, and internal methods from parent on the 1.0 profile.
7113 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
7114 use method_nonpublic function to determine whether method should be
7116 (property_accessor_public): use newly introduced method_nonpublic
7117 function to determine whether accessor is non-public.
7118 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
7119 event from parent class if not private. Only return static event if
7120 Static flag is set, and only return static event from parent class if
7121 FlattenHierarchy flag is set.
7122 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
7123 include non-private events from parent class.
7125 2008-01-16 Zoltan Varga <vargaz@gmail.com>
7127 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
7130 2008-01-16 Wade Berrier <wberrier@novell.com>
7132 * security.c: Add assembly.h header to appease some warnings
7134 2008-01-16 Dick Porter <dick@ximian.com>
7136 * process.c (process_module_string_read): Remove trailing null
7139 2008-01-16 Mark Probst <mark.probst@gmail.com>
7141 * class-internals.h: A new data structure describing the layout of
7142 a runtime generic context (MonoRuntimeGenericContextTemplate).
7144 * metadata-internals.h: Added a hash table to MonoDomain that maps
7145 from open generic classes to their runtime generic context
7148 * object.c: Building of the runtime generic context, including
7149 proper handling of generic type arguments of superclasses.
7150 Building of the runtime generic context according to the template.
7152 2008-01-15 Zoltan Varga <vargaz@gmail.com>
7154 * class.c (mono_class_setup_fields): Set field.count for generic instances.
7157 * image.c (do_mono_image_open): Pass TRUE as last_exists to
7158 mono_portability_find_file (). Fixes #325466.
7159 (mono_image_get_public_key): Fix a warning.
7161 2008-01-14 Zoltan Varga <vargaz@gmail.com>
7163 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
7165 (mono_class_from_name_case): Ditto.
7167 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
7169 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
7170 common storage for the tables used in the System/NumberFormatter class.
7172 2008-01-13 Zoltan Varga <vargaz@gmail.com>
7174 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
7176 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
7178 * verify.c (get_boxable_mono_type): check if the token is valid.
7180 * verify.c (set_stack_value): changed to add an error if an
7181 invalid type is set on stack. Changed all callers due to signature change.
7183 * verify.c (do_stobj): implement stobj validation.
7185 2008-01-11 Zoltan Varga <vargaz@gmail.com>
7187 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
7188 set container->is_method, it was set earlier.
7190 * metadata.c (type_in_image): Handle MVARs which belong to not finished
7193 * reflection.c (mono_reflection_initialize_generic_parameter): Set
7194 is_method of the generic container to TRUE for methods.
7196 2008-01-10 Zoltan Varga <vargaz@gmail.com>
7198 * metadata.c (type_in_image): Handle type parameters properly.
7200 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
7201 memory ownership of this structure.
7203 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
7205 * verify.c (get_boxable_mono_type): make typedref types been just
7206 unverifiable. check for void type.
7208 * verify.c (do_unbox_any): added, verify opcode unbox.any.
7210 * verify.c (do_load_function_ptr): accept method spec tokens.
7212 2008-01-10 Zoltan Varga <vargaz@gmail.com>
7214 * marshal.c (mono_class_native_size): Always set *align even if this is called
7217 2008-01-09 Zoltan Varga <vargaz@gmail.com>
7219 * verify.c (mono_verify_corlib): Remove this as it was not used and was
7222 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7224 * verify.c: removed some old unused tables. A huge bunch of small fixes
7225 to things found while testing the verifier with mono basic.
7227 * verify.c (dump_stack_value): dump null literal flag to.
7229 * verify.c (verify_type_compatibility_full): fix comparison
7230 for types that have a generic super type.
7232 * verify.c (verify_stack_type_compatibility): fix compatibility
7233 between null literals and reference types. fix compatibility between
7234 boxed valuetypes and object. fix corner case test for enums.
7236 * verify.c (do_cmp_op): proper verification of cgt.un in case
7239 * verify.c (do_invoke_method): fix error message.
7241 * verify.c (do_store_indirect
7243 * verify.c (check_is_valid_type_for_field_ops): proper verification
7244 of managed pointers to valuetypes and boxed valuetypes. proper verification
7247 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
7248 allow token to be a reference type.
7250 * verify.c (do_cast): proper handling of boxes valuetypes.
7252 * verify.c (do_stelem): proper handling of storing a boxed valuetype
7255 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
7256 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
7257 fixed the decoding of unbox_any
7259 2008-01-08 Zoltan Varga <vargaz@gmail.com>
7261 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
7263 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
7265 * verify.c (do_newobj): do delegate verification.
7267 * verify.c (verify_delegate_compatibility): perform delegate
7270 * verify.c (verify_ldftn_delegate): perform tests related to
7273 * verify.c (mono_delegate_signature_equal): perform the
7274 slightly diferent signature comparison required by delegates.
7276 * metadata.c (mono_metadata_type_equal_full): added and exported
7277 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
7278 allows signature only comparison.
7280 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
7283 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
7285 * verify.c: added a bunch of stack_slot_* functions to
7286 make access to stack slot type easier. This is required to
7287 allow optional flags, like null literal, boxed value and
7289 All access paths to IlStackDesc::stype have been changed
7290 to use these new funcions.
7291 Removed a bunch of unused functions and cleared all warnings.
7292 This patch introduces the usage of the this pointer and
7295 2008-01-07 Zoltan Varga <vargaz@gmail.com>
7297 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
7299 2008-01-06 Zoltan Varga <vargaz@gmail.com>
7301 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
7302 match managed version.
7304 * appdomain.c: Bump corlib version.
7306 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
7309 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
7311 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
7312 Set public key token to zero-length byte array if assembly is not
7315 2008-01-05 Zoltan Varga <vargaz@gmail.com>
7317 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
7318 writing a vtype array elem.
7320 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
7322 * assembly.c (build_assembly_name): return FALSE if length of token is
7323 not 16 (if not "null").
7324 (mono_assembly_name_parse_full): return FALSE if value of version,
7325 culture, token or key is 0.
7326 * icall.c (fill_reflection_assembly_name): add boolean arguments to
7327 specify whether public key and public key token must be set to default
7328 value (zero-length byte array) if not available. Set versioncompat to
7329 SameMachine. If public key is available or the default is set, then
7331 (ves_icall_System_Reflection_Assembly_FillName): if no public key
7332 is available, use empty byte array as default value. On the 2.0
7333 profile, use default value for public key token if not set.
7334 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
7335 profile, use default value for public key if not set. On the 2.0
7336 profile, use default value for public key token if not set.
7337 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
7338 default values for public key and public key token.
7340 2008-01-05 Zoltan Varga <vargaz@gmail.com>
7342 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
7343 field to keep it in synch with the managed object.
7345 * marshal.c (emit_marshal_object): Add support for byref marshalling of
7346 delegates. Fixes #351520.
7348 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
7349 contains defined memory.
7351 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
7353 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
7355 * sgen-gc.c (check_consistency): New helper function to do a consistency check
7356 of the GC data structures.
7358 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
7360 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
7362 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
7364 (mono_array_clone_in_domain): Ditto.
7365 (mono_array_clone_in_domain): Ditto.
7367 * threads.c (start_wrapper): Register the thread start argument as a GC root.
7368 (cache_culture): Use a write barrier.
7370 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
7371 (ves_icall_get_property_info): Ditto.
7373 * object.h (MONO_STRUCT_SETREF): New macro.
7375 * class-internals.h (MonoStats): Add some GC statistics.
7377 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
7379 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
7381 * exception.c (mono_exception_from_name_two_strings):
7382 Break from loop after method is found.
7384 2008-01-04 Dick Porter <dick@ximian.com>
7386 * process.c (process_module_string_read): Rename variable to
7387 reflect correct usage, after fixing bug 345972.
7389 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
7391 * verify.c (mono_type_create_fnptr_from_mono_method):
7392 created a MonoType function pointer instance to be used during
7393 verification. The verifier releases this memory at end.
7395 * verify.c (mono_method_is_constructor): extracted repeated
7396 checks for constructor into a single class.
7398 * verify.c (do_push_field): use new extracted method
7399 for constructor check.
7401 * verify.c (do_newobj): same.
7403 * verify.c (do_ldftn): renamed to do_load_function_ptr
7404 and make it verify ldvirtftn too.
7406 * verify.c (mono_method_verify: proper verification
7407 of ldvirtftn. release created MonoMethod instances.
7409 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
7411 * verify.c (token_bounds_check): added.
7413 * verify.c (do_ldftn): added.
7415 * verify.c (mono_method_verify): proper verificartion of ldftn.
7417 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
7419 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
7420 than the table row count. It's the resposibility of the caller to
7421 make the bounds check and raise the correct error.
7423 * metadata.c (mono_metadata_decode_row_col): Same.
7425 * loader.c (mono_get_method_from_token): perform bounds check
7426 on token for methoddef table.
7428 2007-12-29 Miguel de Icaza <miguel@novell.com>
7431 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
7432 assert into a negative result, the managed code already coped with
7435 Some folks on Windows reported this error.
7437 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
7439 * appdomain.c: Bump corlib version.
7441 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
7442 CultureInfo.CreateCulture to create CultureInfo for name.
7443 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
7444 create CultureInfo for name. Fixes bug #347174.
7446 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
7448 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
7451 * verify.c (is_valid_branch_instruction): allow branching to the
7452 first instruction of the protected block.
7454 * verify.c (is_valid_cmp_branch_instruction): same.
7456 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
7457 avoid double initialization.
7459 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
7460 detect which cases the eval stack should just be copied.
7462 * verify.c (mono_method_verify): check if the eval stack
7463 is empty when entering a protected block.
7465 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
7467 * verify.c: added is_clause_in_range, is_clause_inside_range,
7468 is_clause_nested and verify_clause_relationship. They perform
7469 the verifications stated in P1 12.4.2.7.
7471 * verify.c (mono_method_verify): remove some unused variables,
7472 add the new exception clause checks, add instruction border
7473 checks for protected block start/end, improved some error
7474 messages and fixed a bug in the way invalid instruction access
7477 2007-12-26 Zoltan Varga <vargaz@gmail.com>
7479 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
7480 from GC 7.0 if available.
7482 * object.c: Remove an unused define.
7484 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
7486 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
7488 * null-gc.c (mono_gc_make_descr_for_array): Implement.
7490 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
7492 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
7493 to take the same arguments as the other make_descr functions.
7495 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
7497 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
7500 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
7503 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
7506 * boehm-gc.c (mono_gc_register_root): Fix a warning.
7508 * null-gc.c (mono_gc_register_root): Fix a warning.
7510 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
7512 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
7513 (mono_gc_base_init): Call GC_init ().
7515 * null-gc.c: Define mono_gc_register_root () as a no-op.
7517 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7519 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
7521 * verify.c: add prototype for merge_stacks at top
7523 * verify.c (do_switch): added.
7525 * verify.c (merge_stacks): on some cases the stack merging
7526 was not happening properly. Unequal stack sizes at merge
7527 points should be invalid.
7529 * verify.c (mono_method_verify): added more debug info on stack state.
7530 verify switch properly.
7532 2007-12-24 Zoltan Varga <vargaz@gmail.com>
7534 * method-builder.h: New file, moved the mono_mb_ declarations here from
7537 * boehm-gc.c marshal.c: Include method-builder.h.
7539 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
7541 * marshal.c: Remove some code which is now in method-builder.c.
7543 2007-12-23 Zoltan Varga <vargaz@gmail.com>
7545 * method-builder.c: New file, extraction of the method builder functionality
7548 * marshal.c: Move the mb functions into method-builder.c.
7550 * marshal.h marshal.c: Export some mono_mb_... functions.
7552 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
7554 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
7557 * class.c (mono_class_get_full): Check the token type in the dynamic case.
7559 * loader.c (mono_field_from_token): Ditto.
7561 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
7564 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
7567 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
7568 a helper function for setting it.
7570 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
7573 * assembly.c: Significally simplify code now that referenced assemblies are
7574 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
7576 * threads.h: Don't include the internal threads-types.h header file. Fixes
7579 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
7581 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
7582 instructions that were target of branches or are at protected block boundaries.
7584 * verify.c (in_same_block): handle filter clauses.
7586 * verify.c (is_valid_branch_instruction): added. checks the target of
7587 instructions br or brtrue/false.
7589 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
7590 binary branch instructions such as beq and bge.
7592 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
7593 and made it pin the instruction as been part of the exception block.
7595 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
7598 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
7601 * verify.c (do_ret): ret from a protected block is unverifiable and
7604 * verify.c (do_static_branch): verify br and br.s instructions.
7606 * verify.c (merge_stacks): add extra param to support detection
7607 of branches in the middle of instructions.
7609 * verify.c (mono_method_verify): verify branches and exception blocks
7610 that target the middle of instructions. Proper verification of br and br.s.
7612 2007-12-21 Zoltan Varga <vargaz@gmail.com>
7614 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
7615 skip_visibility field.
7616 (reflection_methodbuilder_from_dynamic_method): Ditto.
7618 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
7619 registrations. Fixes #348193.
7621 * threads.h: Move the internal mono_thread_get_pending_exception () to
7622 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
7624 2007-12-20 Zoltan Varga <vargaz@gmail.com>
7626 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
7627 icall registration. Fixes #348193.
7629 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
7630 for corlib classes into object. Fixes #349621.
7632 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
7634 * icall.c (property_accessor_nonpublic): new function to determine
7635 whether an accessor allows a property to be considered non-public.
7636 Returns false for private accessor(s) from parent class, and internal
7637 accessor(s) from parent on 2.0 profile (and higher).
7638 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
7639 to determine whether property should be included if NonPublic flag
7640 is set. Fixes bug #349078.
7642 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
7644 * verify.c (init_stack_with_value): added.
7646 * verify.c (mono_method_verify): extracted common
7647 code for exception initialization into init_stack_with_value.
7649 * verify.c (mono_method_verify): initialize the exception
7650 for handler clauses as well.
7652 * verify.c (mono_method_verify): fix the exception clause
7653 ordering rules, it should use handler end offset and not
7656 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
7658 * rawbuffer.c: remove useless warning.
7660 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
7662 * threads.h, threads-types.h: move functions to the correct header
7665 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
7667 * verify.c (mono_method_verify): proper verification
7668 of exception handling clauses ranges and fallthru in
7669 and out of protected blocks.
7671 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
7673 * verify.c (mono_method_verify): fixed compilation issue.
7675 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
7677 * verify.c (mono_method_verify): a printf slipped in, changed
7678 to use verifier debug macro.
7680 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
7682 * verify.c (is_correct_leave): check for filter clauses.
7684 * verify.c (do_filter): added.
7686 * verify.c (mono_method_verify): property verification of leave.
7689 2007-12-18 Mark Probst <mark.probst@gmail.com>
7691 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
7692 Win32 build, until we figure out how to do the proper thing on
7695 2007-12-17 Zoltan Varga <vargaz@gmail.com>
7697 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
7698 by the previous patch.
7700 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
7701 the assembly resolve handler for refonly assemblies.
7703 2007-12-17 Mark Probst <mark.probst@gmail.com>
7705 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
7706 Make sure only one thread is allowed to commence shutdown, and
7707 don't allow new threads to be started once shutdown is in
7710 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
7712 * verify.c (is_correct_endfilter): added.
7714 * verify.c (is_unverifiable_endfilter): added.
7716 * verify.c (do_endfilter): added.
7718 * verify.c (mono_method_verify): property verification of endfilter
7719 and fixed a corner case or endfinally.
7721 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
7723 * verify.h: new flags to support fail fast of unverifiable code and
7724 do non-strict verification. Non-strict verification is required to
7725 have MS runtime compatibility. There are a huge amount of unverifiable
7726 code that it accepts as verifiable. The strict mode verifies the code
7728 Non-strict mode will be required in cases where code needs to be
7729 accepted as verifiable but fails under strict mode.
7731 * pedump.c: added support to fail fast and non-strict verification.
7733 * verify.c: added support for both fail fast and non-strict verification.
7735 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7737 * verify.c (is_correct_endfinally): added.
7739 * verify.c (mono_method_verify): property verification of endfinally.
7741 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7743 * verify.c (in_any_block): check for filter clauses.
7745 * verify.c (is_correct_rethrow): added.
7747 * verify.c (mono_method_verify): property verification of rethrow.
7749 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
7751 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7753 * verify.c (do_throw): added.
7755 * verify.c (mono_method_verify): property verification of throw
7757 2007-12-11 Zoltan Varga <vargaz@gmail.com>
7759 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
7760 assemblies. Fixes #346425.
7762 2007-12-10 Zoltan Varga <vargaz@gmail.com>
7764 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
7767 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
7769 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
7770 prevent asserts when this is called with a token which might not be valid.
7772 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
7773 lookup_dynamic_token_class with valid_token == FALSE.
7775 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
7777 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
7779 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
7781 2007-12-10 Mark Probst <mark.probst@gmail.com>
7783 * gc.c: Don't delay threadpool thread finalization unless Mono is
7786 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7788 * threads.c: turn an assert into a non-fatal warning.
7790 2007-12-09 Robert Jordan <robertj@gmx.net>
7792 * icall.c (GetVirtualMethod): Add missing argument validation.
7794 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
7796 * verify.c (do_cast): added.
7798 * verify.c (mono_method_verify): property verification of castclass and isinst.
7801 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
7803 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
7805 * verify.c (do_stelem): added.
7807 * verify.c (mono_method_verify): property verification of stelem.X.
7809 2007-12-07 Mark Probst <mark.probst@gmail.com>
7811 * class.c, class-internals.h: Introduce an environment variable
7812 (MONO_GENERIC_SHARING) through which the extent of generic code
7813 sharing can be controlled (share all classes, share only corlib
7814 classes, or share nothing).
7816 * object.c: Only create runtime generic context for classes for
7817 which sharing is enabled.
7819 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
7821 * verify.c (do_ldelem): refactor it to work with ldelem.any.
7823 * verify.c (mono_method_verify): property verification of ldelem.any.
7825 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
7827 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
7828 added ldelem.X opcodes.
7830 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
7832 * verify.c: proper verification of ldelem.X
7834 2007-12-06 Zoltan Varga <vargaz@gmail.com>
7836 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
7838 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
7840 * verify.c (mono_method_verify): null literal requires special handling,
7841 the value pushed on stack need to be flagged as so.
7843 * verify.c (do_ldelema): Verify ldelema properly.
7845 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
7847 * verify.c: Verify ldlen properly.
7849 2007-12-05 Zoltan Varga <vargaz@gmail.com>
7851 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
7852 to the target object's type. Fixes #346160.
7854 2007-12-05 Dick Porter <dick@ximian.com>
7856 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
7857 Solaris needs the same workaround as BSD-derived systems. Fixes
7858 bug 323524, patch by Burkhard Linke
7859 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
7861 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
7863 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
7864 handle to use when error dialog is shown; otherwise, update mask
7865 to show no error dialog when an error occurs.
7867 2007-12-03 Zoltan Varga <vargaz@gmail.com>
7869 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
7871 * class.c (mono_class_get_field_default_value): New helper function to initialize
7872 field->def_type and field->data.
7874 2007-11-30 Zoltan Varga <vargaz@gmail.com>
7876 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
7879 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
7881 * marshal.c: Avoid depending on delegate->method_info being set.
7883 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
7885 * object.c (mono_delegate_ctor): Set delegate->method.
7887 * object-internals.h (struct _MonoDelegate): Add 'method' field.
7889 * appdomain.c: Bump corlib version.
7891 2007-11-27 Raja R Harinath <harinath@gmail.com>
7893 * metadata.c (mono_generic_inst_equal_full): Short-circuit
7894 equality check if we're comparing canonicalized MonoGenericInsts.
7896 2007-11-23 Zoltan Varga <vargaz@gmail.com>
7898 * class.c (generic_array_methods): Call mono_class_setup_methods () before
7899 accessing class->methods.
7901 2007-11-22 Dick Porter <dick@ximian.com>
7903 * threads.c: Ensure that the synch_cs is set before trying to use
7906 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
7908 * profiler.c: r89126 broke the statistial profiler, unbreak.
7910 2007-11-22 Martin Baulig <martin@ximian.com>
7912 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
7915 (mono_debug_debugger_version): Bump to 3.
7916 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
7917 -> mono_debugger_class_initialized().
7919 * mono-debug-debugger.c
7920 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
7923 (mono_debugger_start_class_init_func): Removed.
7924 (mono_debugger_class_loaded_methods_func): Added.
7925 (mono_class_setup_methods): Call it here.
7927 2007-11-22 Martin Baulig <martin@ximian.com>
7930 (mono_debug_add_delegate_trampoline): New public method.
7931 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
7934 (MonoSymbolTable): Added `global_data_table'.
7935 (MonoDebuggerTypeKind): Removed.
7937 2007-11-21 Zoltan Varga <vargaz@gmail.com>
7939 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
7942 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7944 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
7946 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
7948 2007-11-20 Martin Baulig <martin@ximian.com>
7950 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
7952 * mono-debug-debugger.c
7953 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
7954 (mono_debugger_remove_breakpoint): Likewise.
7955 (mono_debugger_check_breakpoints): Likewise.
7956 (mono_debugger_register_class_init_callback): New public method.
7957 (mono_debugger_remove_class_init_callback): Likewise.
7958 (mono_debugger_add_type): Likewise.
7960 * mono-debug-debugger.h
7961 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
7963 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
7965 * class.c: more interface implementations needed for the
7966 array enumerator (fixes bug #341112).
7968 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
7970 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
7971 fix ParamName of ArgumentNullExceptions.
7973 2007-11-17 Miguel de Icaza <miguel@novell.com>
7975 * reflection.c (mono_reflection_encode_sighelper): Generate the
7976 modopts and modreqs. I have a useless test that crashes monodis,
7977 but that shows the code working.
7979 2007-11-17 Zoltan Varga <vargaz@gmail.com>
7981 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
7982 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
7984 2007-11-15 Dick Porter <dick@ximian.com>
7986 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
7987 When joining a thread, it's the thread that's calling Join that
7988 gets WaitSleepJoin state not the target. Fixes the standalone
7989 test case in bug 334740, and hopefully the whole bug too.
7991 2007-11-15 Dick Porter <dick@ximian.com>
7993 * process.c: Read file version info from the files pointed at by
7994 process modules, not the current process. Fixes bug 315969.
7996 Use windows typedef names in some places to fix warnings on the
7999 2007-11-15 Mark Probst <mark.probst@gmail.com>
8001 * image.c, metadata-internals.h: Added a generic_class_cache hash
8002 to MonoImage for looking up generic classes when sharing generics.
8004 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
8006 * sgen-gc.c: warning cleanups.
8008 2007-11-15 Zoltan Varga <vargaz@gmail.com>
8010 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
8011 inherited properties.
8013 2007-11-14 Mark Probst <mark.probst@gmail.com>
8015 * object.c, class-internals.h: Added more information to the
8016 runtime generic context.
8018 2007-11-13 Zoltan Varga <vargaz@gmail.com>
8020 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
8021 instead of just the target method. Generalize the abstract method handling to
8022 handle any non-static method.
8024 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
8025 mono_marshal_get_delegate_invoke () signature change.
8027 2007-11-13 Mark Probst <mark.probst@gmail.com>
8029 * class.c, class-internals.h: Made
8030 mono_type_get_basic_type_from_generic () public. Fixed member
8031 access check for shared generics.
8033 * loader.c: Don't insert field into field cache if it's part of a
8034 non-inflated generic class.
8036 * domain.c, domain-internals.h: The generic sharing context is now
8037 part of the jit info data structure. Added two accessor
8040 2007-11-12 Zoltan Varga <vargaz@gmail.com>
8042 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
8043 the array Get/Set/Address methods, since the JIT inlines them.
8045 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
8047 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
8048 (mono_image_init): Initialize runtime_invoke_direct_cache.
8050 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
8051 mono_marshal_get_delegate_invoke signature change.
8053 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
8054 an additional argument. Add support for invoking abstract methods.
8056 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
8058 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
8060 2007-11-09 Mark Probst <mark.probst@gmail.com>
8062 * class.c: Do field layout for open generic classes as well.
8064 2007-11-09 Mark Probst <mark.probst@gmail.com>
8066 * gc.c, gc-internal.h: Don't finalize threadpool threads with
8067 other objects, because the threadpool is still around. Put them
8068 in a list instead and after finalizing all other objects in the
8069 root domain shut down the thread pool and then finalize the
8070 threads. Fixes bug #337383.
8072 * threads.c, thread-types.h: New mono_thread_create_internal()
8073 function for marking a thread with the threadpool flag before it
8074 started. Set synch_cs to NULL after freeing it.
8076 * threadpool.c: Mark threadpool threads before they start.
8078 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
8080 * reflection.h, reflection.c: don't export random functions
8081 and lazy load dbnull and missing objects.
8083 2007-11-07 Jonathan Chambers <joncham@gmail.com>
8085 * class.c: Initialize COM types if COM interfaces
8086 are present (not just COM classes).
8088 Code is contributed under MIT/X11 license.
8090 2007-11-07 Massimiliano Mantione <massi@ximian.com>
8092 create_dynamic_mono_image: hook module profiler events (dynamic case).
8093 mono_image_basic_init: hook assembly profiler events (dynamic case).
8095 2007-11-07 Massimiliano Mantione <massi@ximian.com>
8097 simple_appdomain_unload: completely terminate the profiler
8098 instead of only processing the statistical samples.
8099 simple_shutdown: make sure this is really called exactly once,
8100 even in multithreaded applications, and always listen to
8102 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
8103 here, the "[un]load" functions will do it.
8104 Fixes bugs #333791 and #325261.
8106 2007-11-07 Geoff Norton <gnorton@novell.com>
8108 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
8109 rather than depend on __APPLE__.
8111 2007-11-07 Mark Probst <mark.probst@gmail.com>
8113 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
8115 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
8117 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
8118 UTF16 MonoString. Fix the crash from bug #335488
8120 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
8122 * marshal.c: Correct (for non-Win32 OS) length != size in
8123 mono_string_from_bstr. Fix #339530.
8125 2007-11-06 Geoff Norton <gnorton@novell.com>
8127 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
8130 2007-11-05 Kornél Pál <kornelpal@gmail.com>
8132 * process.c: Added run-time GetProcessId API detection for Windows.
8134 2007-11-04 Miguel de Icaza <miguel@novell.com>
8136 * reflection.c (mono_param_get_objects): If a parameter has the
8137 attribute [System.Runtime.InteropServices.Optional] we should
8138 set the DefaultValue of the ParameterInfo to be
8139 System.Reflection.Missing instead of DBNull.
8143 (mono_get_reflection_missing_object): New method,
8144 returns the System.Reflection.Missing.Value singleton instance.
8146 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
8148 * culture-info-table.h : regenerated.
8150 2007-11-02 Jonathan Chambers <joncham@gmail.com>
8152 * icall.c: Use GetEnvironmentStrings on windows
8153 so we are using the same environment block as
8154 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
8157 Code is contributed under MIT/X11 license.
8159 2007-10-31 Martin Baulig <martin@ximian.com>
8161 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
8163 * mono-debug-debugger.h
8164 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
8166 2007-10-30 Zoltan Varga <vargaz@gmail.com>
8168 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
8171 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
8173 * culture-info-table.h : regenerated.
8175 2007-10-30 Robert Jordan <robertj@gmx.net>
8177 * icall-def.h, icall.c:
8178 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
8180 Code is contributed under MIT/X11 license.
8182 2007-10-29 Zoltan Varga <vargaz@gmail.com>
8184 * class.c (mono_class_setup_vtable): Find the inflated methods in the
8185 inflated class instead of inflating them again.
8187 * class.c (mono_class_setup_vtable): Inflate the override methods in the
8190 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
8191 Call setup_supertypes () after klass->parent is set.
8192 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
8194 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
8195 for inflated instances of not yet created dynamic generic classes.
8196 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
8197 times from inflated_method.
8198 (methodbuilder_to_mono_method): Ditto.
8200 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
8202 * gc.c: code cleanup and removed old untested option of not creating the
8205 2007-10-29 Zoltan Varga <vargaz@gmail.com>
8207 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
8208 creating a jump trampoline for dynamic methods.
8210 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
8212 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
8213 generic TypeBuilders when called from another method of the same type (bug #335131).
8216 2007-10-27 Zoltan Varga <vargaz@gmail.com>
8218 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
8219 doesn't seem to work perfectly.
8221 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
8222 called multiple times.
8223 (methodbuilder_to_mono_method): Ditto.
8224 (resolve_object): Inflate FieldBuilder's.
8226 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
8228 * string-icalls.c, string-icalls.h, appdomain.c: patch from
8229 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
8230 RemoveEmptyEntries in the string.Split implementation (bug #322375).
8232 2007-10-26 Dick Porter <dick@ximian.com>
8234 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
8235 Thread initialisation changes
8237 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
8239 * verify.c: fix compatibility check between arrays and System.Array
8241 2007-10-26 Zoltan Varga <vargaz@gmail.com>
8243 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
8246 2007-10-25 Zoltan Varga <vargaz@gmail.com>
8248 * object.c (mono_value_box): Use typed allocation here.
8250 2007-10-23 Zoltan Varga <vargaz@gmail.com>
8252 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
8253 trampoline instead of compiling the method right away.
8255 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
8257 2007-10-21 Zoltan Varga <vargaz@gmail.com>
8259 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
8260 related fields for dynamic classes. Fixes #334493.
8262 2007-10-20 Zoltan Varga <vargaz@gmail.com>
8264 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
8266 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
8268 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
8269 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
8271 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
8273 * reflection.c (create_generic_typespec): Initialize klass->generic_container
8275 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
8277 2007-10-18 Jonathan Chambers <joncham@gmail.com>
8279 * marshal.c: Use correct key when removing item
8282 Code is contributed under MIT/X11 license.
8284 2007-10-17 William Holmes <billholmes54@gmail.com>
8286 *marshal.c: Adding a case to marshal booleans to U1
8288 Code is contributed under MIT/X11 license.
8290 2007-10-18 Zoltan Varga <vargaz@gmail.com>
8292 * class.c (mono_class_from_name): Search the modules compromising dynamic
8293 assemblies. Fixes #331601.
8295 2007-10-16 Zoltan Varga <vargaz@gmail.com>
8297 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
8298 exception if the type name contains an assembly component. Fixes #334203.
8300 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
8301 modules inside dynamic assemblies. Fixes #334200.
8303 * reflection.c: Set image->public_key and image->public_key_length;
8305 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
8308 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
8310 2007-10-16 Mark Probst <mark.probst@gmail.com>
8312 * metadata.c: Implemented correct comparing of generic classes.
8313 An inflated generic class can be equal to a non-inflated one if it
8314 is inflated with generic type variables as type arguments. Fixes
8317 2007-10-15 Dick Porter <dick@ximian.com>
8319 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
8320 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
8323 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
8324 instead of a monitor lock. This means that monitor_try_enter and
8325 co can set the thread state safely.
8326 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
8327 thread_interrupt_requested, so interrupt actually works.
8329 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
8330 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
8331 state accessor function
8333 2007-10-15 Martin Baulig <martin@ximian.com>
8336 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
8337 the debugger with the current runtime.
8339 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8341 * object.c, object-internals.h: added the ability to set a single
8342 trampoline for all the slots in a vtable.
8344 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
8346 * marshal.c: deal with a possible race condition during multicast
8347 delegate invocation.
8349 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
8351 * class.c: ensure value type methods don't have the synchronized
8354 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
8356 * string-icalls.c, string-icalls.h: reverted unapproved patch that
8359 2007-10-11 Joel Reed <joelwreed@comcast.com>
8361 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
8362 to take an options parameter so that empty entries can be removed during
8363 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
8365 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8367 * marshal.c: make sure we don't store the signature from a dynamic
8368 method into the runtime invoke cache (bug #327189).
8370 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
8372 * marshal.c: make sure the wrapper methods are properly initialized.
8374 2007-10-11 Mark Probst <mark.probst@gmail.com>
8376 * metadata.c, metadata-internals.h: Generalized
8377 mono_type_stack_size() to mono_type_stack_size_internal() which
8378 takes an additional argument specifying whether it allows open
8381 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
8383 * verify.c (do_invoke_method): handle typedbyref params
8384 correctly and check for unverifiable return values.
8386 * verify.c (do_newobj): fix a warning.
8388 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
8390 * verify.c: don't tread typedbyref as allways unverifable,
8391 so uses, like (ld/st)loc.0 are valid. verify for the cases
8392 that it matters, like boxing related operations.
8394 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
8396 * verify.c: add verification of the newobj opcode. verification
8397 of delegate instantation still missing due ldftn and virldftn not
8398 pushing the function type on stack
8400 2007-10-08 Mark Probst <mark.probst@gmail.com>
8402 * class-internals.h: Runtime generic context data structure
8405 * object.c: Initialization of runtime generic context at runtime
8406 vtable creation time.
8408 2007-10-08 Massimiliano Mantione <massi@ximian.com>
8409 * class.c (mono_class_create_from_typedef,
8410 mono_class_from_generic_parameter, mono_ptr_class_get,
8411 mono_fnptr_class_get, mono_bounded_array_class_get)
8412 * domain.c (mono_domain_create, mono_domain_free)
8413 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
8414 * image.c (do_mono_image_load, mono_image_close):
8415 Hooked up load-unload profiler events.
8417 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8419 * domain.c: track statistics about the actual amount of native code
8422 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8424 * class.c: the valuetype enumerators don't have the additional
8425 supertypes interfaces.
8427 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
8429 * class.c: need more interfaces setup for the IEnumerator<T>
8430 object created for arrays (tests/ienumerator-interfaces.2.cs).
8432 2007-10-05 Zoltan Varga <vargaz@gmail.com>
8434 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
8436 2007-10-05 Alp Toker <alp@atoker.com>
8438 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
8439 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
8442 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
8444 * verify.c (verify_type_compatibility_full): verification of
8445 compatibility improved, validates correctly non-strict checks between
8446 native int and I4 types different than (unsigned)int32.
8448 * verify.c (do_store_indirect): added, do all verification of
8451 * verify.c (get_load_indirect_mono_type): renamed to
8452 get_indirect_op_mono_type, as it now returns the MonoType for
8453 ldind.X and stind.X opcodes.
8455 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
8457 * reflection.c: Fix the encoding of generic type definition for
8460 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
8461 mono_image_typedef_or_ref but allows to specify if typespec lookups should
8462 be made. Typespec check is done prior to typeref cache lookup.
8464 * reflection.c (mono_image_typedef_or_ref): now just delegate to
8465 mono_image_typedef_or_ref_full.
8467 * reflection.c (encode_generic_class): encode the generic class
8468 directly instead of calling encode_type.
8470 * reflection.c (encode_type): encode the generic type definition
8471 MonoClass as a generic instantiation.
8473 * reflection.c (create_typespec): cache typespec tokens in
8474 the assembly->typespec cache. Don't create typespec for a generic
8475 instance MonoClass. Create typespec for the generic type defintion.
8477 * reflection.c (create_generic_typespec): encode the generic
8478 class directly instead of calling encode_type.
8480 * reflection.c (mono_image_create_token): encode the generic
8481 type definition not using a typespec for MonoType instances.
8484 2007-10-04 Raja R Harinath <rharinath@novell.com>
8487 * class.c (mono_image_init_name_cache): Don't return nested
8488 'protected internal' classes.
8489 (mono_class_from_name_case): Likewise.
8491 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
8493 * icall-def.h, icall.c : get_bundled_machine_config() is now the
8494 common function used by both DefaultConfig in System.dll and
8495 InternalConfigurationHost in System.Configuration.dll.
8497 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8499 * class.c: automatically add to vectors only a few essential explicit
8500 generic interfaces. The rest of the interfaces that arrays should
8501 provide are currently implicitly added (but still not lazily, see the
8502 design in the discussion of bug#325495 for the details of what is
8503 needed for that). Additionally, implicit interfaces are assigned the
8504 same vtable slot as the explicit interfaces (as they are compatible):
8505 this enables huge memory savings since we don't need to instantiate
8506 as many memthods and as large vtables anymore. Also, Since
8507 GetEnumerator<T> returns an instance of a type that is required to
8508 support a similarly large set of interfaces as arrays, we add
8509 implicit interfaces and interface offset sharing support to those
8510 types, too. This change adds all the required interfaces so that
8511 the anonarray.cs test case in the bug report works (we don't add
8512 all the interfaces to arrays of arrays 3-level deep and more because
8513 of the memory requirements explained in the bug and since they are much
8514 less common: the lazy-loading support will enabled them to work, too).
8516 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
8518 * verify.c (merge_stacks): major clean up, all type compatibility
8519 checks are done by verify_type_compatibility. This fix my earlier lack
8520 of understanding of the CLR type system and merge_stacks no longer looks
8523 * verify.c: fixed some bad spelling.
8525 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
8527 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
8528 a given stack slock.
8530 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
8531 verify_type_compatibility_full. This removed a near indentical function and fixed
8532 handling of Int32 and IntPtr across all opcodes.
8534 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
8536 * class.c: only vectors have the additional generic interfaces.
8538 2007-10-01 Jonathan Chambers <joncham@gmail.com>
8540 * mono-config.c: Use g_strcasecmp instead of
8541 strcasecmp like everywhere else to fix
8542 compilation with MSVC.
8544 Code is contributed under MIT/X11 license.
8546 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
8548 * object.c, object-internals.h: refactored the IMT code to enable
8549 building a single slot at a time and lazily creating the IMT trampolines
8552 2007-09-29 Zoltan Varga <vargaz@gmail.com>
8554 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
8556 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
8559 2007-09-29 Raja R Harinath <harinath@gmail.com>
8561 * loader.c (method_from_methodspec): Rearrange to avoid
8562 un-necessary exposition. Don't assert out if the method's
8563 declaring type is a generic type definition.
8565 2007-09-28 Martin Baulig <martin@ximian.com>
8567 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
8569 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8571 * class-internals.h: optimize field layout of MonoClass to
8572 requires less cachelines at runtime and save a few bytes on 64 bit
8575 2007-09-28 Jb Evain <jbevain@novell.com>
8577 * reflection.c: when encoding type names in custom attributes,
8578 if the type is a closed generic type, its generic arguments
8579 have to be serialized as AssemblyQualifiedName, so that when
8580 they are deserialized, it's possible to re-create them properly.
8584 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
8586 * object.c, class-internals.h: added delegate-creation counter.
8588 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8590 * class.c: cleanup of the code that synthetizes interfaces for
8591 arrays in 2.0: saves quit a bit of corlib mempool memory.
8592 Code to fix bug #325495 ifdeffed out for now until the issues
8593 with memory usage and O(n^2) behaviour are fixed.
8595 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
8597 * marshal.c: when possible, do not duplicate the name of the methods
8598 in the method builder and in the generated MonoMethod.
8600 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
8601 * verify.c: added support for type checking ldind_* opcodes.
8603 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
8605 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
8606 which is used to distinguish the fully open instantiation of a TypeBuilder
8607 with the rest. This temporary hack is required to restore the property that
8608 the fully open instantiation is the same type of the generic type definition.
8610 * class-internals.h (mono_generic_class_is_generic_type_definition):
8611 new function as part of the internal API.
8613 * class.c (inflate_generic_type): return NULL when the generic inst is
8614 fully open. The fully open generic type is now the same as the generic type
8615 definition for non TypeBuilder types.
8617 * class.c (mono_generic_class_get_class): removed assert since it is
8618 no longer valid, gklass->cached_class can point to the generic type definition.
8620 * class.c (mono_generic_class_is_generic_type_definition): new.
8622 * metadata.c (mono_generic_class_hash): added is_tb_open field
8623 to the hash calculation.
8625 * metadata.c (free_generic_class): if the generic class is associated
8626 with the generic type definition, its field will come from the mempool and
8629 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
8630 new, this function identifies the corner case of a TypeBuilder fully open
8633 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
8634 for lookup. Set gclass->cached_class to be the container class in case of
8635 the fully open instantiation of non TypeBuilder types.
8637 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
8638 to compare generic classes.
8640 * reflection.c (method_encode_methodspec): remove assert that
8643 * reflection.c (mono_reflection_generic_class_initialize): add
8644 an aditional assert to ensure the proper type is used.
8646 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
8648 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
8651 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
8653 * verify.c (push_arg): Fixed support for ldarga
8654 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
8655 MonoType used as first arg in case of instance calls.
8657 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
8659 * verify.c: Support for verifying VAR and MVAR types,
8661 2007-09-25 Zoltan Varga <vargaz@gmail.com>
8663 * icall.c (ves_icall_get_property_info): Set the reflected type of the
8664 accessors correctly.
8666 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8668 * threads.c: support OSX and other systems in
8669 mono_thread_get_stack_bounds (bug #328026).
8671 2007-09-25 Martin Baulig <martin@ximian.com>
8674 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
8676 2007-09-24 Martin Baulig <martin@ximian.com>
8679 (MonoDebugClassEntry): Moved the definition of this struct into
8680 mono-debug.c to make it private.
8683 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
8684 type table per symbol file, we don't need to store the symfile id
8687 2007-09-24 Martin Baulig <martin@ximian.com>
8689 Create one type table per symbol file, since a `MonoClass *' gets
8690 invalid when its image is unloaded.
8692 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
8693 (MonoDebugHandle): Added `type_table'.
8695 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8697 * mempool.c, mempool.h: added mono_mempool_new_size () API
8698 to be able to specify a smaller initial size for the pool.
8699 Adjusted the code to slowly increase pool size before using
8700 the previous default size.
8701 * image.c: use a small initial size for image mempools.
8703 2007-09-23 Zoltan Varga <vargaz@gmail.com>
8705 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
8708 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
8709 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
8711 2007-09-22 Zoltan Varga <vargaz@gmail.com>
8713 * metadata.c (mono_type_create_from_typespec): Remove an invalid
8714 free. Fixes #327438.
8716 2007-09-21 Raja R Harinath <harinath@gmail.com>
8718 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
8719 generic instantiations, etc.
8720 <MONO_TYPE_ARRAY>: Likewise.
8722 2007-09-21 Martin Baulig <martin@ximian.com>
8724 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
8725 these structs were never defined.
8726 (MonoDebugHandle): Removed the `_priv' field, it was never used.
8728 2007-09-21 Martin Baulig <martin@ximian.com>
8730 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
8732 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
8734 * image.c: removed the guid hash tables: we can get the same info
8735 without the additional memory usage hit (partially fixes also bug #327052).
8737 2007-09-10 Massimiliano Mantione <massi@ximian.com>
8739 * profiler.h, profiler-private.h, profiler.c: add a new profiler
8740 event to handle unloading methods. After the event is called, the
8741 corresponding MonoMethod* must be considered invalid.
8742 * loader.c (mono_free_method): call the new mono_profiler_method_free
8745 2007-09-20 Mark Probst <mark.probst@gmail.com>
8747 * domain-internals.h: New flag in MonoJitInfo which marks shared
8748 generic methods. New hash table (shared_generics_hash) in
8749 MonoDomain to keep track of shared generic methods. Prototypes
8750 for functions to register and lookup shared generic methods.
8752 * domain.c: Support for registering and looking up shared generic
8753 methods via a hash table (shared_generics_hash) in MonoDomain.
8755 * class-internals.h: New exception to signal failure of shared
8756 compilation of a generic method. New counters for generics
8757 sharing in MonoStats.
8759 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8761 * image.c, metadata-internals.h: don't keep a file descriptor open
8762 for loaded assemblies (bug#325988).
8764 2007-09-19 Raja R Harinath <rharinath@novell.com>
8766 * metadata.c (signature_in_image): New. Carve out of type_in_image.
8767 (ginst_in_image, gclass_in_image): Simplify. Change signature to
8768 use the corresponding datatypes.
8769 (type_in_image): Update to changes.
8770 (CleanForImageUserData): Simplify.
8771 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
8772 Avoid quadratic behaviour in handling the "stolen" list by
8773 separating the filter predicate out, and by prepending the stolen
8774 items rather than appending them.
8775 (steal_ginst_in_image): Likewise.
8776 (mono_metadata_clean_for_image): Update to changes.
8778 2007-09-19 Martin Baulig <martin@ximian.com>
8780 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
8782 2007-09-19 Martin Baulig <martin@ximian.com>
8784 * mono-debug.c (mono_debug_cleanup): Don't call
8785 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
8787 2007-09-19 Raja R Harinath <harinath@gmail.com>
8789 Fix crash on 'make run-test' in mcs/errors
8790 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
8791 Avoid more potential allocations in mono_class_from_mono_type.
8792 (ginst_in_image): Update to changes.
8793 (gclass_in_image): Rearrange slightly.
8795 2007-09-18 Zoltan Varga <vargaz@gmail.com>
8797 * class.c (mono_class_init): Move the code that sets up class->methods to
8798 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
8800 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
8801 canonical instance of an inflated generic signature.
8802 (mono_type_create_from_typespec): Remove an invalid free.
8804 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
8806 2007-09-18 Marek Habersack <mhabersack@novell.com>
8808 * domain-internals.h: added a declaration of the
8809 mono_assembly_load_full_nosearch internal function.
8811 * assembly.c (mono_assembly_load_with_partial_name): use
8812 mono_try_assembly_resolve return value properly.
8813 (mono_assembly_load_full_nosearch): copied the function body from
8814 mono_assembly_load_full, without the code to invoke assembly
8816 (mono_assembly_load_full): calls the above new function and if the
8817 assembly is not resolved, invokes the search hooks.
8819 * appdomain.c (mono_runtime_init): restore the global postload
8820 assembly search handlers.
8822 2007-09-18 Zoltan Varga <vargaz@gmail.com>
8824 * class.c (mono_class_init): Make sure class->methods and class->properties
8825 are never NULL in the generics case.
8827 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
8829 2007-09-17 Zoltan Varga <vargaz@gmail.com>
8831 * metadata.c (free_generic_class): Disable some code to fix the build.
8833 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
8835 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
8836 from the image mempool.
8838 * metadata.c (free_generic_class): Free more data from the inflated class.
8840 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
8842 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
8844 (mono_type_create_from_typespec): Ditto.
8846 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
8847 MonoImage to the caller.
8848 (mono_init_internal): Save the opened image in a global variable.
8849 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
8851 * reflection.c (resolve_object): Fix a leak.
8853 * metadata.c: Fix the freeing of data in the generics caches.
8855 * metadata.c (free_generic_inst): Comment this out to fix the build.
8856 (free_generic_class): Ditto.
8858 * metadata.c: Free cached generic methods, instantinations and classes when
8859 they are removed from the caches.
8860 (mono_metadata_free_type): Free the type itself.
8862 * class.c: Free the result of mono_class_inflate_generic_type () in a few
8865 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
8867 * boehm-gc.c: restrict managed allocs to __thread supporting
8870 2007-09-16 Zoltan Varga <vargaz@gmail.com>
8872 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
8873 (mono_generic_class_get_class): Fix a leak.
8875 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
8876 mono_metadata_free_type ().
8877 (mono_metadata_inflate_generic_inst): Fix a leak.
8879 2007-09-14 Zoltan Varga <vargaz@gmail.com>
8881 * mono-debug.c (free_header_data): Fix a leak missed earlier.
8883 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
8886 * mono-debug.c (mono_debug_close_image): Fix call to
8887 g_hash_table_remove ().
8889 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
8891 * icall-def.h: redirect all the string ctor to the managed
8892 CreateString () methods.
8893 * string-icalls.c, string-icalls.h: removed dead code for string
8896 2007-09-14 Zoltan Varga <vargaz@gmail.com>
8898 * mono-debug.c: Fix memory leaks.
8900 2007-09-14 Jonathan Chambers <joncham@gmail.com>
8902 * threads-types.h: Implement mono_hazard_pointer_set and
8903 mono_hazard_pointer_clear macros using do/while(0) to fix
8904 compilation with MSVC.
8906 Code is contributed under MIT/X11 license.
8908 2007-09-14 Zoltan Varga <vargaz@gmail.com>
8910 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
8911 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
8913 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
8915 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
8918 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
8920 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
8921 managed-code allocated as well.
8923 2007-09-13 Zoltan Varga <vargaz@gmail.com>
8925 * class.c (mono_class_is_assignable_from): Add support for generic variance.
8927 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
8929 * boehm-gc.c: fixed the build after the AOT changes.
8931 2007-09-13 Zoltan Varga <vargaz@gmail.com>
8933 * wrapper-types.h: Add an ALLOC wrapper type.
8935 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
8936 reference managed allocator methods.
8938 2007-09-12 Marek Safar <marek.safar@gmail.com>
8940 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
8941 of Type array and not MonoType, a fix suggested by Hari.
8943 2007-09-12 Jonathan Chambers <joncham@gmail.com>
8945 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
8946 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
8948 Code is contributed under MIT/X11 license.
8950 2007-09-10 Massimiliano Mantione <massi@ximian.com>
8952 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
8954 2007-09-12 Marek Habersack <mhabersack@novell.com>
8956 * image.c (do_mono_image_open): if assembly file fails to open and
8957 MONO_IOMAP is in effect, try to find the path in a
8958 case-insensitive way.
8960 * appdomain.c (mono_runtime_init): do not install postload hooks -
8961 tests show that MS.NET doesn't use anything of that sort to
8962 trigger the AppDomain.AssemblyResolve event.
8963 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
8965 (mono_runtime_init): init portability helpers here.
8967 * assembly.c (mono_assembly_load_with_partial_name): if other
8968 attempts fail, trigger the AppDomain.AssemblyResolve event handler
8969 to resolve the assembly.
8971 * domain-internals.h: added mono_try_assembly_resolve and marked
8974 2007-09-11 Jb Evain <jbevain@novell.com>
8976 * object-internals.h (MonoReflectionDynamicMethod): add
8977 a `MonoReflectionType *owner` field. The owner is used
8979 (mono_reflection_create_dynamic_method): use the owner of the dynamic
8980 method as the class declaring the dynamic method.
8981 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
8982 dynamic method to the declaring type of the methodbuilder.
8984 2007-09-11 Mark Probst <mark.probst@gmail.com>
8986 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
8987 rules for calling methods via reflection.
8989 2007-09-11 Zoltan Varga <vargaz@gmail.com>
8991 * reflection.c (resolve_object): Add support for MonoGenericClass.
8994 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8996 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
8997 provide a managed method that does fast allocations without needing
8998 a managed->unmanaged transition. Boehm GC implementation currently
8999 enabled for ptrfree objects on sane architectures.
9001 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
9003 * marshal.c, marshal.h: exported a couple of useful functions and
9004 added mono_mb_get_label () to easily handle backward branches.
9006 2007-09-10 Zoltan Varga <vargaz@gmail.com>
9008 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
9010 2007-09-10 Massimiliano Mantione <massi@ximian.com>
9012 * loader.c (find_method): Fixed the regression introduced while
9015 2007-09-09 Zoltan Varga <vargaz@gmail.com>
9017 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
9020 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
9021 icall.c reflection.c: Pass a MonoGenericContext argument to
9022 mono_lookup_dynamic_token ().
9024 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
9027 2007-09-09 Robert Jordan <robertj@gmx.net>
9029 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
9030 for generic methods.
9032 * object.c (mono_object_get_virtual_method): Handle generic methods.
9035 Code is contributed under MIT/X11 license.
9037 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
9039 * image.c: fix locking in mono_image_load_file_for_image ().
9041 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
9043 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
9044 used only as a cache: added an icall to fill it.
9046 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
9048 * reflection.h: exposed mono_reflection_free_type_info
9049 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
9050 since mono_reflection_bind_generic_parameters makes a copy of it.
9051 * reflection.c (free_type_info): subinfos should be freed.
9052 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
9054 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
9055 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
9056 this fixes #82695 and #81726.
9059 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
9061 * process.h, process.c: added support for user profile/info in
9062 ProcessStartInfo. For now only Windows works.
9064 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
9066 * metadata.c: consider the generic arguments when comparing
9067 signatures (bug #82614).
9069 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9071 * cil-coff.h, image.c: updated assembly loader to cope with the
9072 PE32+ 64 bit file format.
9074 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9076 * assembly.c, class.c, domain.c, loader.c: remove useless
9077 inclusion of cil-coff.h.
9079 2007-08-29 Jonathan Chambers <joncham@gmail.com>
9081 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
9082 if interface is marked with CoClassAttribute.
9084 Code is contributed under MIT/X11 license.
9086 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
9088 * sgen-gc.c: ensure no object from the to space is copied again or finalized
9089 if it's seen twice in major collections.
9091 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
9093 * sgen-gc.c: big objects are not copied to the gray area, but they
9094 need to be considered for scanning, too, if they are brought alive
9095 by an object ready for finalizations or a survived one.
9097 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
9099 * sgen-gc.c: properly account the number of disappearing links when
9102 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
9104 * sgen-gc.c: share the code to scan the registered roots between the
9105 different types of collections.
9107 2007-08-28 Zoltan Varga <vargaz@gmail.com>
9109 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
9111 2007-08-28 Zoltan Varga <vargaz@gmail.com>
9113 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
9114 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
9116 2007-08-28 Mark Probst <mark.probst@gmail.com>
9118 * security-manager.c (mono_security_manager_get_methods):
9119 LinkDemandSecurityException now has 2 arguments instead of 3.
9121 2007-08-27 Zoltan Varga <vargaz@gmail.com>
9123 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
9124 platforms which need it.
9126 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9128 * sgen-gc.c: unregister thread data structures with a pthread_key_t
9131 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
9133 * threads.c: free the thread static data on thread exit.
9135 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
9137 * class.c: walk the hierarchy to find the generic definition for
9138 a class (fixes runtime part of bug #82498).
9140 2007-08-24 Zoltan Varga <vargaz@gmail.com>
9142 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
9145 * image.c (mono_image_close): Here. Hopefully fixes #82510.
9147 2007-08-24 Mark Probst <mark.probst@gmail.com>
9149 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
9151 2007-08-24 Robert Jordan <robertj@gmx.net>
9153 * appdomain.c: don't perform the ':'->';' substitution on Win32.
9155 2007-08-24 Jb Evain <jbevain@novell.com>
9157 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
9160 2007-08-24 Mark Probst <mark.probst@gmail.com>
9162 * threads.c: Make sure a thread gets cleaned up only once. Fixes
9165 2007-08-24 Zoltan Varga <vargaz@gmail.com>
9167 * assembly.c: Fix a warning.
9169 2007-08-23 Marek Habersack <mhabersack@novell.com>
9171 * appdomain.c: parse the <runtime> section looking for the probing
9172 element with the 'privatePath' attribute, which sets additional
9173 directories in which the runtime should look for assemblies.
9175 2007-08-23 Robert Jordan <robertj@gmx.net>
9177 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
9180 2007-08-23 Martin Baulig <martin@ximian.com>
9182 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
9183 _mono_debug_init_corlib() and remove it from the header file.
9185 2007-08-23 Martin Baulig <martin@ximian.com>
9187 * mono-debug-debugger.c
9188 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
9189 don't notify the debugger about it.
9191 * mono-debug-debugger.h
9192 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
9194 2007-08-23 Robert Jordan <robertj@gmx.net>
9196 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
9197 Code is contributed under MIT/X11 license.
9199 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9201 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
9203 2007-08-22 Martin Baulig <martin@ximian.com>
9205 * mono-debug.c: Store debugging info on a per-domain basis and
9206 free it on domain unload. Add support for unloading symbol files.
9209 (MonoDebugList): New typedef.
9211 - add `data_tables and `type_table'.
9212 - replace 'symbol_files' and `num_symbol_files' with a
9214 (mono_debug_data_table): Removed.
9215 (mono_debug_list_add): New public function.
9216 (mono_debug_list_remove): New public function.
9217 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
9218 (mono_debug_init_2_memory): Renamed into
9219 mono_debug_open_image_from_memory().
9220 (mono_debug_close_image): New public function.
9221 (mono_debug_domain_create): Likewise.
9222 (mono_debug_domain_unload): Likewise.
9223 (MONO_DEBUGGER_VERSION): Bump to 60.
9225 * mono-debug-debugger.h
9226 (MonoDebuggerEvent):
9227 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
9228 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
9229 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
9230 - rename `THREAD_CREATED' and `THREAD_EXITED' into
9231 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
9232 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
9234 (mono_debugger_add_symbol_file): Removed.
9235 (mono_debugger_add_type): Removed.
9236 (mono_debugger_lookup_type): Removed.
9237 (mono_debugger_lookup_assembly): Removed.
9240 (mono_domain_create): Call mono_debug_domain_create().
9241 (mono_init_internal): Call mono_debug_init_corlib().
9244 (mono_assembly_close): Call mono_debug_close_image().
9246 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
9248 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
9251 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
9253 * sgen-gc.c: ensure section->pin_queue_end is initialized
9254 correctly when non pinning objects in the section have been found.
9256 2007-08-22 Marek Habersack <mhabersack@novell.com>
9258 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
9259 containing a list of directories separated by ':'. MSDN docs say
9260 the directories should be separated with ';'. Part of a bugfix for
9263 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
9265 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
9266 it should MonoType and not MonoClass.
9268 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
9270 * culture-info-table.h : regenerated.
9272 2007-08-20 William Holmes <billholmes54@gmail.com>
9274 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
9275 to call ReplaceFile Kernel32 on windows or in io-layer.
9276 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
9277 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
9278 as an internal call.
9280 Code is contributed under MIT/X11 license.
9282 2007-08-20 Jb Evain <jbevain@novell.com>
9284 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
9285 and MONO_EXCEPTION_FIELD_ACCESS.
9287 * debug-helpers.[c|h]: new mono_field_full_name function.
9289 2007-08-20 Mark Probst <mark.probst@gmail.com>
9291 * class.c: Removed class_security_level() and moved it to
9292 security-core-clr.c.
9294 * security-core-clr.c, security-core-clr.h: class_security_level()
9295 is now public and renamed to mono_security_core_clr_class_level().
9296 It also looks for security attributes in the classes a class is
9299 2007-08-20 Mark Probst <mark.probst@gmail.com>
9301 * security-core-clr.c, security-core-clr.h: CoreCLR security
9304 * Makefile.am: Added security-core-clr.[ch].
9306 * security-manager.c, security-manager.h: Functions and enum for
9307 setting and getting the security mode.
9309 * class.c: CoreCLR security checks.
9311 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
9313 * icall-def.h, process.c, process.h: implemented icall to get
9314 user/system processor times.
9316 2007-08-17 Mark Probst <mark.probst@gmail.com>
9318 * domain.c, threads.c, class-internals.h, domain-internals.h: New
9319 reader-lock-free jit_info_table.
9321 2007-08-17 Zoltan Varga <vargaz@gmail.com>
9323 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
9325 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
9327 * object-internals.h (MonoException): Add missing _data member.
9329 2007-08-08 Massimiliano Mantione <massi@ximian.com>
9331 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
9332 checking that only methods with matching qname or fqname are picked
9333 from implemented interfaces.
9335 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
9337 * verify.c (do_newarr):added, do type verification of
9338 newarr ops, push the right value on the eval stack.
9339 * verify.c (mono_method_verify): use do_newarr
9342 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
9344 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
9345 factored the common code into get_boxable_mono_type, which
9346 is now using mono_type_get_full, this fixed byref related tests.
9348 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
9350 * class.c: added mono_type_get_full, this function has the same
9351 behavior of mono_class_get_full but the returned MonoType has
9352 all metadata of the associated token in case of a typespec token.
9353 * class.c: added mono_type_retrieve_from_typespec, used by
9354 mono_type_get_full to retrieve the token type.
9355 * class.c (mono_class_create_from_typespec): changed to use
9356 mono_type_retrieve_from_typespec.
9357 * class.c (mono_ldtoken): changed to use mono_type_get_full
9358 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
9359 * class-internals.h: exported mono_type_get_full for internal use.
9361 2007-08-16 Jb Evain <jbevain@novell.com>
9363 * domain.c (supported_runtimes): add entry for
9364 the 'moonlight' runtime version.
9366 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
9368 * verify.c (mono_method_verify): small typo sliped in.
9370 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
9372 * verify.c (do_unbox_value): added, do type verification of
9374 * verify.c (mono_method_verify): use do_unbox_value
9377 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
9379 * verify.c (dump_stack_value): fixed typo, was printing string
9380 instead of object on stack.
9381 * verify.c (do_box_value): moved the byref check up as it leads
9382 to invalid code and should be done earlier.
9383 * verify.c: improved error messages for and ldobj
9385 2007-08-15 William Holmes <billholmes54@gmail.com>
9387 * marshal.c (emit_marshal_custom): Omit the call to
9388 marshal_native_to_managed when calling native to managed
9389 and the argument is specified as an out argument.
9391 Code is contributed under MIT/X11 license.
9393 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
9395 * verify.c: fixed the type checks for generics, function pointers and vectors.
9396 Added type verification for ldobj and ldtoken. The verifier
9397 would segfault if header or signature of a method contained references
9398 to non-existant types.
9400 2007-08-15 Jonathan Chambers <joncham@gmail.com>
9402 * marshal.c (cominterop_get_ccw): Patch from
9403 Bill Holmes to no walk up interface hierarchy.
9404 All parent methods should be present in the interface for COM.
9406 Code is contributed under MIT/X11 license.
9408 2007-08-15 Jonathan Chambers <joncham@gmail.com>
9410 * marshal.c (emit_marshal_com_interface): Patch from
9411 Bill Holmes to handle COM Interfaces as return values
9412 for native->managed calls.
9414 Code is contributed under MIT/X11 license.
9416 2007-08-14 Jonathan Chambers <joncham@gmail.com>
9418 * marshal.c (cominterop_get_idispatch_for_object): Implement
9419 for runtime callable wrappers.
9421 Code is contributed under MIT/X11 license.
9423 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
9425 * pedump.c (main): changed from mono_init to mono_init_from_assembly
9426 so 2.0 types are accessible
9429 2007-08-13 Miguel de Icaza <miguel@novell.com>
9431 * domain.c (mono_init_internal): Call mono_assembly_load_friends
9432 once we load mscorlib. Due to the order in which we initialize,
9433 the mono_assembly_load_full routine that loads mscorlib did not
9434 load friends. We now load it once we load the
9435 mono_defaults.internals_visible_class class.
9437 * assembly.c: Expose the mono_load_friend_assemblies method.
9439 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
9441 * verify.c: improved the handling of boxing, better
9442 type checking for unary ops and conversion. Fix bug
9443 regarding managed pointer compatibility checking
9445 2007-08-11 Zoltan Varga <vargaz@gmail.com>
9447 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
9449 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
9451 2007-08-09 Raja R Harinath <rharinath@novell.com>
9453 * reflection.c (dup_type): Remove.
9454 * class.c (dup_type): Remove.
9455 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
9456 instead of the dodgy 'dup_type'.
9457 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
9458 handle the case where 'dup_type' needed the second argument.
9460 2007-08-08 Zoltan Varga <vargaz@gmail.com>
9462 * domain.c: Fix a warning.
9464 2007-08-08 Massimiliano Mantione <massi@ximian.com>
9466 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
9467 checking that methods with the same fqname are not overridden
9468 with a method from an ancestor.
9470 2007-08-07 Zoltan Varga <vargaz@gmail.com>
9472 * threads.c (free_thread_static_data_helper): Avoid a crash if
9473 thread->static_data is not yet set.
9475 2007-08-07 Jonathan Chambers <joncham@gmail.com>
9477 * marshal.c: Use correct image when emitting
9478 native wrapper for COM calls.
9480 Code is contributed under MIT/X11 license.
9482 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
9484 * icall-def.h, security.c, security.h :
9485 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
9487 2007-08-07 Martin Baulig <martin@ximian.com>
9489 * mono-debug-debugger.h
9490 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
9492 * domain.c (mono_domain_free): Call
9493 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
9495 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
9497 * verify.c (check_underflow, check_overflow): error message now returns IL offset
9498 * verify.c (in_same_block): code should test if either offset is inside the clauses
9499 * verify.c (mono_method_verify): push the exception into the eval stack of exception
9502 2007-08-03 Zoltan Varga <vargaz@gmail.com>
9504 * image.c (mono_image_close): Fix a leak.
9506 * object.c (mono_runtime_invoke_array): Avoid using alloca.
9508 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
9510 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
9512 * domain.c, threads.c, threads-types.h: fix memory retention issue
9513 with thread static variables not being cleared on domain unload.
9514 Reuse thread static slots after domain unload.
9516 2007-08-03 Zoltan Varga <vargaz@gmail.com>
9518 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
9521 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
9522 now done in mono_runtime_invoke_array.
9524 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
9525 receiver is a nullable type.
9527 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
9530 2007-08-03 Jonathan Chambers <joncham@gmail.com>
9532 * marshal.c: Implement COM Objects as return type for
9533 managed->unmanaged calls. Added Release calls for COM Object
9534 out/return values in managed->unmanaged calls.
9536 Code is contributed under MIT/X11 license.
9538 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
9540 * threads.h, threads-type.h: move the hazard pointer declarations
9541 to the private header.
9543 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
9545 * file-io.c, appdomain.c: memory leak fixes.
9547 2007-08-02 Dick Porter <dick@ximian.com>
9550 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
9551 SO_REUSEADDR setting into io-layer/sockets.c.
9553 2007-08-01 Zoltan Varga <vargaz@gmail.com>
9555 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
9556 from Object when called on a generic parameter. Fixes #82211.
9558 2007-08-01 Dick Porter <dick@ximian.com>
9560 * file-io.c (convert_share): Test FileShare values bit-by-bit.
9561 Fixes bug 79250 yet again.
9563 2007-07-30 Martin Baulig <martin@ximian.com>
9565 Merged the `debugger-dublin' branch.
9568 (MonoDebugDataTable): New typedef.
9569 (MonoDebugMethodAddressList): New typedef.
9570 (MonoDebugWrapperData): Removed.
9571 (MonoDebugSymbolTable): Removed `current_data_table',
9572 `current_data_table_size', `current_data_table_offset'.
9573 (MonoDebugDataItemType): Moved into mono-debug.c.
9574 (MonoDebugMethodJitInfo): Remove `address'.
9575 (mono_debug_data_table): New global variable.
9576 (mono_debug_lookup_method_addresses): New public function.
9577 (mono_debug_find_method): Take a `MonoMethod *', not a
9578 `MonoDebugMethodInfo *'.
9580 * mono-debug.c: Drop support for the old symbol tables.
9582 2007-06-28 Martin Baulig <martin@ximian.com>
9584 * mono-debug.c (mono_debug_debugger_version): New public variable.
9586 2007-07-31 William Holmes <billholmes54@gmail.com>
9588 * metadata.c Changed mono_type_create_from_typespec to not insert
9589 the type into the hash map until after
9590 do_mono_metadata_parse_type has completed.
9592 Code is contributed under MIT/X11 license.
9594 2007-07-31 Zoltan Varga <vargaz@gmail.com>
9596 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
9597 generic parameter. Fixes #82211.
9599 2007-07-27 Jb Evain <jbevain@novell.com>
9601 * pedump.c (dump_metadata, dump_metadata_header): dump
9602 versions contained in the metadata header.
9604 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
9606 * threads.c: register small_id_table with the GC.
9608 2007-07-27 Mark Probst <mark.probst@gmail.com>
9610 * threads.c, threads.h, class-internals.h, object-internals.h:
9611 Hazard pointers, to be used by lock-free parallel algorithms.
9613 2007-07-26 Dick Porter <dick@ximian.com>
9615 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
9616 routine on non-windows platforms, as I've not managed to think of
9617 a non-kludgy way of doing this. Finishes off bug 78739.
9619 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
9621 * object.c: properly setup interface_bitmap in proxy vtables.
9623 2007-07-25 Marek Habersack <mhabersack@novell.com>
9625 * appdomain.c (get_shadow_assembly_location): do not use TickCount
9626 to create unique shadow copy target directories, use the domain's
9627 serial number instead. Each domain gets a unique target directory
9630 * domain.c (mono_domain_create): added code to increment domain
9631 shadow copy serial number and cache the value in the current
9634 * domain-internals.h (struct _MonoDomain): added a new field -
9635 shadow_serial to hold the serial number used in generation of
9636 shadow-copy directories. This is to make sure that the directory
9637 name is unique for each and every domain created. We avoid a race
9638 condition with overriding assemblies already in use by other app
9641 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
9643 * class.c (mono_bounded_array_class_get): fixed memory leak when
9644 binding generic parameters.
9646 2007-07-24 Raja R Harinath <rharinath@novell.com>
9648 * metadata.c (do_mono_metadata_parse_generic_class): Use
9649 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
9652 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9654 * loader.c, class-internals.h, reflection.c: removed the per-method
9655 generics hashtable: we use the global one through the call of
9656 mono_class_inflate_generic_method ().
9658 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
9660 * class.c, metadata.c, class-internals.h: introduce yet another
9661 generics global cache for inflated methods (fixes 98% of the perf
9662 issue in bug #81806).
9664 2007-07-23 Raja R Harinath <rharinath@novell.com>
9666 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
9667 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
9668 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
9669 return a MonoGenericInst containing (a copy) of those types.
9670 (mono_metadata_inflate_generic_inst): Update to changes.
9671 (mono_metadata_parse_generic_inst): Likewise.
9672 (mono_get_shared_generic_inst): Likewise.
9673 * reflection.c (mono_class_bind_generic_parameters): Likewise.
9674 (mono_reflection_bind_generic_method_parameters): Likewise.
9675 * metadata-internals.h: Likewise.
9676 * icall.c (free_generic_context): Kill.
9677 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
9679 * reflection.c (reflection_methodbuilder_to_mono_method): Use
9680 mono_metadata_type_dup.
9681 * marshal.c (mono_mb_create_method): Likewise.
9683 * metadata.c (mono_metadata_type_dup): Rename from
9684 mono_metadata_type_dup_mp. Take an optional mempool instead of a
9685 MonoImage. Handle a few more cases, esp. when no mempool is given.
9686 * marshal.c, metadata-internals.h: Update to changes.
9688 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
9690 * class.c: fixed a small leak for array classes and removed warning.
9692 2007-07-22 Zoltan Varga <vargaz@gmail.com>
9694 * loader.c (mono_method_get_param_token): Make this work on generic methods.
9695 Return 0x8000000 for return parameters. Fixes #82161.
9697 2007-07-21 Marek Habersack <grendello@gmail.com>
9699 * appdomain.c (get_shadow_assembly_location): append the current
9700 ticks value to the path. Avoids overwriting the same assemblies by
9701 several threads at the same time.
9703 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
9704 and Raja R Harinath <rharinath@novell.com>
9706 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
9708 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
9709 property for testing if a method is a generic method definition.
9711 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
9713 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
9715 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
9717 * verify.c: used function from private branch, reverted to the one in class.h
9719 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
9721 * verify.c: a typo slipped in and the code wont compile
9723 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
9725 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
9726 disabled box instruction as it is doing the wrong thing
9727 improved stack dump messages, now it is easier to debug type related issues
9730 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
9732 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
9734 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
9736 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
9737 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
9738 grouped with class and valuetype. This change will simply
9739 the code as it should be handled just like unmanaged pointers.
9741 2007-07-19 Mark Probst <mark.probst@gmail.com>
9743 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
9745 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
9747 * verify.c: several stack merge issues fixed, reference comparisons now
9748 check the type size. strict type check now works correctly.
9749 added more uses of IS_MANAGED_POINTER macro.
9750 fixed issues pointed by running the test suite against .net.
9753 2007-07-19 Mark Probst <mark.probst@gmail.com>
9755 * class.c, loader.c, class-internals.h: Removed the
9756 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
9759 * icall.c: Better error checking in some internal reflection
9762 2007-07-18 William Holmes <billholmes54@gmail.com>
9764 * filewatcher.c : removed unused variable 'filename' in
9765 ves_icall_System_IO_FSW_SupportsFSW
9767 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
9769 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
9772 2007-07-15 Zoltan Varga <vargaz@gmail.com>
9774 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
9776 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
9778 2007-07-14 Zoltan Varga <vargaz@gmail.com>
9780 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
9781 Implement generics support.
9782 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
9784 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
9785 type_args and method_args arguments.
9786 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
9787 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
9788 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
9790 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
9792 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
9793 It adds a rootimage parameter to mono_reflection_get_type_internal,
9794 adds new function mono_reflection_get_type_with_rootimage and use
9795 the rootimage to resolve the types instead of the current image
9797 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
9799 * culture-info-table.h: Forgot to update after r78304.
9801 2007-07-13 Raja R Harinath <rharinath@novell.com>
9803 * class.c (mono_class_is_open_constructed_type)
9804 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
9806 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
9808 * class.c (mono_bounded_array_class_get): method fails if used with
9809 an incomplete TypeBuilder enum (no basetype field), fixed it by
9810 avoiding calculating the size for such array as it cannot be instantiated.
9813 2007-07-12 Raja R Harinath <rharinath@novell.com>
9815 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
9817 * metadata.c, reflection.c: Update to changes.
9819 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9821 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
9822 mono_class_is_valid_enum, they are used to valide a enum when loading.
9823 * reflection.c: used new functions to throw TypeLoadException when and
9824 invalid enum is build with TypeBuilder. Fixes #82018
9826 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
9828 * object.c: forgot commit of mono_class_setup_methods () to access
9830 * object-internals.h: added a few more handy fields to
9833 2007-07-11 Zoltan Varga <vargaz@gmail.com>
9835 * object.c (build_imt): Call mono_class_setup_methods () before accessing
9838 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
9840 * class-internals.h, object-internals.h, object.c: IMT-based
9841 interface invocation core from Massimiliano Mantione
9842 (massi@ximian.com) with a reworked arch-specific interface,
9843 bsearch implementation and a few bugfixes and memory savings by me.
9845 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
9847 * class.c (mono_class_create_from_typedef): mono would segfault if
9848 an enum did not have a __value field. It now throws a TypeLoadException
9849 for such cases. Fix bug #82022
9851 2007-07-10 Zoltan Varga <vargaz@gmail.com>
9853 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
9855 2007-07-09 Mark Probst <mark.probst@gmail.com>
9857 * class.c (mono_class_init): If a class is already inited but has
9858 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
9860 2007-07-09 Mark Probst <mark.probst@gmail.com>
9862 * class.c: Properly handle the case of an unimplemented interface
9863 method. Fixes: 81673.
9865 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
9867 * class-internals.h, object.c: cleanup patch from massi: use
9868 MonoVTable->interface_bitmap since the vtable interfaces offset array
9871 2007-07-10 Zoltan Varga <vargaz@gmail.com>
9873 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
9874 GetMDStreamVersion icall instead.
9876 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
9878 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
9879 not use mono_dl_build_path() with a full library name: makes
9880 fallbacks to libgaim and libfam work.
9882 2007-07-06 William Holmes <billholmes54@gmail.com>
9884 * assembly.c: Added a continue statement in probe_for_partial_name when
9885 parse_assembly_directory_name fails. Fixes : 82002
9887 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
9889 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
9890 and added a verification for TYPEDBYREF.
9891 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
9892 make native int interchangeable with int32 and some small cleanup and formating.
9893 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
9894 handle byref of byref.
9895 * verify.c (push_local): handle byref of byref.
9896 * verify.c (do_binop): invalid mix of values is unverifiable
9897 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
9898 added visibility checks
9899 * verify.c (field related method): added visibility checks
9900 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
9902 2007-07-06 Zoltan Varga <vargaz@gmail.com>
9904 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
9907 2007-07-05 Zoltan Varga <vargaz@gmail.com>
9909 * profiler.c (mono_profiler_load): Fix an off-by-one error.
9911 * marshal.c (emit_marshal_string): When returning a string from managed code,
9912 allways make a copy even for unicode strings. Fixes #81990.
9914 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
9916 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
9917 of byref generic inst types (bug #81997).
9919 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
9921 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
9922 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
9924 2007-07-02 Zoltan Varga <vargaz@gmail.com>
9926 * marshal.c (emit_marshal_string): Add support for unicode strings in
9927 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
9929 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
9931 * verify.c: field load/store are now verified, missing only access checks now
9933 2007-06-28 Martin Baulig <martin@ximian.com>
9935 * mono-debug.c (mono_debug_debugger_version): New public variable.
9937 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
9939 * locales.c: When constructing DateTimeFormat or NumberFormat for
9940 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
9941 MonoCultureInfo contructed from the current locale is always
9942 read-only and has UseUserOverride set to true. All MonoCultureInfo
9943 instances returned for GetCultures have both IsReadOnly and
9944 UseUserOverride set to true. Fixes part of bug #81930.
9946 2007-06-22 Jonathan Chambers <joncham@gmail.com>
9948 * icall-def.h: Update System.__ComObject icalls
9949 * marshal.c: Avoid managed transition (and object creation)
9950 when looking up COM interface in RCW.
9953 Code is contributed under MIT/X11 license.
9955 2007-06-22 Zoltan Varga <vargaz@gmail.com>
9957 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
9958 to avoid crashes during assembly unloading.
9960 2007-06-22 Raja R Harinath <rharinath@novell.com>
9962 Fix MethodInfo.IsGenericMethodDefinition
9963 * reflection.c (mono_reflection_bind_generic_method_parameters):
9964 Rearrange code to ensure we always uses a generic method definition.
9965 * class.c (mono_class_inflate_generic_method_full): Set
9966 'generic_container' field only for generic method definitions.
9967 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
9968 Use presense of 'generic_container' field as indication of being a
9969 generic method definition.
9971 2007-06-21 Zoltan Varga <vargaz@gmail.com>
9973 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9975 * object-internals.h: Reflect changes in the layout of the managed Delegate
9978 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
9979 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
9980 runtime memory used by the dynamic method. Fixes #77146.
9982 2007-06-21 Dick Porter <dick@ximian.com>
9985 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
9986 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
9989 2007-06-21 Raja R Harinath <rharinath@novell.com>
9991 * reflection.c (method_encode_methodspec): Add a tripwire.
9992 * class.c (inflate_generic_type): The fully open generic type is
9993 not the same as the generic type definition.
9995 2007-06-21 Martin Baulig <martin@ximian.com>
9997 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
9999 * mono-debug-debugger.h
10000 (MonoDebuggerBreakpointInfo): Removed.
10001 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
10002 (mono_debugger_remove_breakpoint): Likewise.
10003 (mono_debugger_breakpoint_callback): Likewise.
10004 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
10006 2007-06-21 Raja R Harinath <rharinath@novell.com>
10008 * metadata.c (mono_metadata_lookup_generic_class): The fully open
10009 generic type is not the same as the generic type definition.
10010 * class.c (mono_generic_class_get_class): Likewise.
10012 2007-06-20 Geoff Norton <gnorton@customerdna.com>
10014 * icall.c: The second argument to
10015 System.Reflection.MethodBase.GetMethodFromHandleInternalType
10016 is a MonoType not a MonoClass.
10018 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
10020 * verify.c: support for function pointers in the verifier
10022 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
10024 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
10026 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
10028 * assembly.c: removed Mono.Data.SqliteClient from the list of
10029 forward-compatible assemblies as it breaks the ABI (bug #81899).
10031 2007-06-19 Raja R Harinath <rharinath@novell.com>
10033 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
10034 lookup/update with the loader lock.
10035 * reflection.c (mono_class_bind_generic_parameters): No need to
10036 protect mono_metadata_lookup_* with the loader lock.
10037 * class.c (inflate_generic_type): Likewise.
10039 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
10040 on a generic instantiated type.
10042 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
10044 *verify.c: produce meanfull error messages on verification error
10045 *verify.c: fixed some cases of verification errors reported as validation errors
10046 *pedump.c: fixed the error name array, now it shows validation errors properly
10047 *verify.h: fixed the contant that should be used for verification errors
10049 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
10051 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
10052 for bug #77596, 81858 and 80743 (generics data structures on domain
10055 2007-06-15 Raja R Harinath <rharinath@novell.com>
10057 Avoid allocating 'MonoGenericContext' on the heap.
10058 * class-internals (_MonoMethodInflated::context): Make field
10059 inline, not a pointer.
10060 * loader.c (method_from_methodspec): Allocate 'new_context' on the
10061 stack. Use the context embedded within the inflated method as the
10062 hash key, rather than 'new_context'.
10063 * class.c (inflate_generic_context): Simplify. Return a struct
10064 rather than allocating on the heap.
10065 (mono_class_inflate_generic_method_full): Update to changes. Now,
10066 doesn't salt away a copy of the context -- simplifying the
10067 lifetime rules of a 'MonoGenericContext *'.
10068 (mono_method_get_context): Return pointer to embedded context.
10069 (setup_generic_array_ifaces): Allocate temporary context on stack.
10070 * reflection.c (inflate_mono_method): Likewise.
10071 (mono_reflection_bind_generic_method_parameters): Likewise.
10072 Use the context embedded within the inflated method as the hash key.
10074 Avoid a source of allocation of 'MonoGenericContext'.
10075 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
10076 and 'cached_context' fields into embedded 'MonoGenericContext' field.
10077 * class.c: Update to changes.
10078 (mono_generic_class_get_context): Simplify drastically. Now just
10079 returns a pointer to the field.
10080 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
10081 argument as a const pointer.
10082 (mono_metadata_generic_context_equal): Likewise.
10083 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
10086 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
10088 * verify.c improved the handling of brtrue/brfalse, factored out common code
10090 2007-06-14 Raja R Harinath <rharinath@novell.com>
10092 Kill MonoGenericMethod.
10093 * class-internals.h (MonoGenericContext::method_inst): Rename from
10094 'gmethod' and convert to a MonoGenericInst.
10095 (MonoGenericMethod): Remove.
10096 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
10097 * loader.c (method_from_methodspec): Update to changes. Use a
10098 MonoGenericContext as the key to the hashtable.
10099 * metadata.c (mono_metadata_generic_context_equal): Rename from
10100 'mono_metadata_generic_method_equal' and take MonoGenericContext.
10101 (mono_metadata_generic_context_hash): Likewise from
10102 'mono_metadata_generic_method_hash'. Change hash function.
10103 (mono_metadata_load_generic_params): Update to changes.
10104 (mono_get_shared_generic_method): Remove.
10105 * metadata-internals.h (mono_get_shared_generic_method): Remove.
10106 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
10107 (inflate_generic_context): Likewise.
10108 (mono_class_inflate_generic_method_full): Likewise.
10109 (setup_generic_array_ifaces): Likewise.
10110 (mono_class_create_from_typespec): Likewise.
10111 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
10112 (method_encode_methodspec): Update callsite.
10113 (reflection_methodbuilder_to_mono_method): Update to changes.
10114 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
10115 MonoGenericContext as the key to the hashtable.
10116 (inflate_mono_method): Update to changes.
10118 * class-internals.h (MonoGenericMethod::container): Remove.
10119 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
10121 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
10123 * profiler-private.h, profiler.c, profiler.h: added API to profile
10126 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
10128 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
10130 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
10132 * verify.c: method invocation is now validated, now we verify parameter types on stack.
10133 Fixed overflow and underflow not aborting the verification process.
10135 2007-06-13 Mark Probst <mark.probst@gmail.com>
10137 * class-internals.h (MonoStats): Added stats entries for dynamic
10140 2007-06-12 Zoltan Varga <vargaz@gmail.com>
10142 * loader.c (mono_free_method): Free header->locals and header->clauses.
10144 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
10147 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
10149 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
10151 2007-06-12 Raja R Harinath <rharinath@novell.com>
10153 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
10156 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
10158 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
10160 2007-06-11 Raja R Harinath <harinath@gmail.com>
10162 MonoGenericMethod on a diet
10163 * class-internals.h (_MonoMethodInflated::reflection_info): Move
10165 (_MonoGenericMethod::reflection_info): ... from here.
10166 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
10168 * reflection.c (inflate_mono_method): Likewise.
10169 (mono_reflection_bind_generic_method_parameters): Likewise.
10171 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
10173 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
10174 *verify.c: factored long ldarg forms to share code with short forms
10176 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
10178 *verify.c: fixed code formating factored some duplicate code
10179 into a new function
10181 *verify.h: fixed binary incompatibility introduced earlier
10183 *pedump.c: fixed formating
10185 2007-06-11 Raja R Harinath <harinath@gmail.com>
10187 Fix assertion when disassembling Mono.C5.dll
10188 * loader.c (method_from_methodspec): Avoid inflating a method
10189 twice with the same context. If the methodref is inflated, use
10190 the declaring method instead.
10192 * class.c (mono_class_from_generic_parameter): Fix case similar to
10193 bug #81830 handled below, but for method containers.
10195 2007-06-10 Raja R Harinath <harinath@gmail.com>
10197 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
10198 get_shared_generic_class. Directly inflate the instance.
10199 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
10200 (inflate_generic_class): Delete.
10201 (get_shared_generic_class): Delete. Move setting of
10202 'cached_class' and 'cached_context' ...
10203 * metadata.c (mono_metadata_lookup_generic_class): ... here.
10205 * metadata.c (mono_metadata_lookup_generic_class): Change
10206 signature to take the components of a MonoGenericClass rather than
10207 an allocated MonoGenericClass. Change semantics to be intern-like.
10208 * reflection.c (mono_class_bind_generic_parameters): Update to
10209 changes. Make locking region tighter.
10210 * class.c (inflate_generic_class): Update to changes.
10211 (get_shared_generic_class): Likewise.
10212 * metadata-internals.h: Likewise.
10214 * reflection.c (mono_class_bind_generic_parameters): Take and
10215 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
10216 (mono_reflection_bind_generic_parameters): Use
10217 'mono_class_bind_generic_parameters' rather than duplicate the code.
10218 * class.c (mono_bounded_array_class_get): Update to changes.
10219 * object-internals.h: Likewise.
10221 * reflection.c (mono_class_bind_generic_parameters): Only support
10222 parameterizing generic type definitions. Remove support for other
10225 2007-06-08 Zoltan Varga <vargaz@gmail.com>
10227 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
10229 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
10230 in the dynamic case.
10232 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
10234 * threads.c: When cleaning up thread, reset the Background bit.
10237 2007-06-08 Jonathan Chambers <joncham@gmail.com>
10239 * metadata.c: Move variable declarations to top of scope.
10240 * verify.c: Move variable declarations to top of scope.
10242 Code is contributed under MIT/X11 license.
10244 2007-06-08 Raja R Harinath <rharinath@novell.com>
10246 * reflection.c (mono_class_bind_generic_parameters): Replace
10247 open-coded loop with mono_metadata_inflate_generic_inst.
10249 * class.c (get_shared_generic_class): Don't call
10250 mono_get_shared_generic_inst. Use the container's own
10253 * metadata.c (mono_metadata_load_generic_params): Move
10254 initialization of 'context' field here from ...
10255 * class.c (mono_class_create_from_typedef): ... here, and ...
10256 * loader.c (mono_get_method_from_token): ... here.
10258 * class.c (get_shared_generic_class): Rename from
10259 mono_get_shared_generic_class and make static.
10260 (mono_get_shared_generic_inst): Move to metadata.c.
10261 * loader.c (mono_get_shared_generic_method): Likewise.
10262 * class-internals.h, metadata-internals.h: Update to changes.
10265 * class.c (mono_class_from_generic_parameter): Don't assume a
10266 generic container owner exists. Generic containers from monodis
10269 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
10271 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
10272 * verify.h: new typedefs to returns the non-verifiable status
10273 * verify.c: initial implementation of generics, stack merging and object compatibility check
10275 2007-06-06 Mark Probst <mark.probst@gmail.com>
10277 * class.c, image.c, class-internals.h (MonoImage): class_cache is
10278 a MonoInternalHashTable again (fixed bug in internal hash table
10281 2007-06-06 Mark Probst <mark.probst@gmail.com>
10283 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
10284 MonoInternalHashTable again (fixed bug in internal hash table
10287 2007-06-06 Mark Probst <mark.probst@gmail.com>
10289 * class.c, image.c, class-internals.h, domain.c,
10290 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
10291 changes. Have to figure out what makes them break the SWF
10294 2007-06-04 Mark Probst <mark.probst@gmail.com>
10296 * class.c, image.c, class-internals.h (MonoImage): class_cache is
10297 a MonoInternalHashTable now.
10299 2007-06-04 Mark Probst <mark.probst@gmail.com>
10301 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
10302 MonoInternalHashTable now.
10304 2007-05-31 Zoltan Varga <vargaz@gmail.com>
10306 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
10309 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
10311 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
10312 dependent trampoline.
10314 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10316 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
10318 2007-05-29 Robert Jordan <robertj@gmx.net>
10320 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
10322 2007-05-28 Zoltan Varga <vargaz@gmail.com>
10324 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
10326 2007-05-25 Jonathan Chambers <joncham@gmail.com>
10328 * marshal.c: Fix interface lookup loops for
10329 cominterop_get_com_slot_for_method and
10330 cominterop_get_method_interface. Only need to lookup
10331 if type is a class, else use interface type method is on.
10333 Code is contributed under MIT/X11 license.
10335 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
10337 * reflection.c: HasSecurity can be present even if no specially
10338 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
10339 SecurityAttribute). Fix CAS regression tests on buildbot.
10341 2007-05-24 Jonathan Chambers <joncham@gmail.com>
10343 * appdomain.c: Add configure checks for header files.
10344 * image.c: Add configure checks for header files.
10345 * file-io.c: Add configure checks for header files.
10346 * debug-mono-symfile.c: Add configure checks for header files.
10347 * threadpool.c: Add configure checks for header files.
10348 * console-io.c: Add configure checks for header files.
10349 * profiler.c: Add configure checks for header files.
10350 * rawbuffer.c: Add configure checks for header files.
10351 * icall.c: Add configure checks for header files.
10352 * rand.c: Add configure checks for header files.
10353 * socket-io.c: Add configure checks for header files.
10355 Code is contributed under MIT/X11 license.
10357 2007-05-24 Zoltan Varga <vargaz@gmail.com>
10359 * reflection.c (mono_custom_attrs_from_builders): Remove the
10360 assertion as it breaks the build.
10362 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
10364 * reflection.c (lookup_custom_attr): Make a copy here too.
10366 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
10369 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
10372 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
10375 2007-05-22 Zoltan Varga <vargaz@gmail.com>
10377 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
10378 (load_cattr_value): Ditto.
10380 2007-05-20 Zoltan Varga <vargaz@gmail.com>
10382 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
10384 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
10386 * threads.c: In "start_wrapper", set apartment_state to MTA if
10387 apartment_state is Unknown and we're running on 2.0 profile or
10389 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
10390 to main method, then set apartment_state to Unknown on 1.0 profile,
10391 and MTA on 2.0 profile.
10393 2007-05-16 Jb Evain <jb@nurv.fr>
10395 * class-internals.h (MonoDefaults): Add an attribute_class and
10396 customattribute_data_class.
10397 * domain.c (mono_init_internal): Populate them.
10398 * reflection.c: Use them to remove duplicates. Make a vew
10399 MonoClass variables `static'.
10401 2007-05-15 Massimiliano Mantione <massi@ximian.com>
10403 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
10404 step in implementing IMT, so that all isinst checks now can go
10405 through the bitmap.
10406 This was needed because vtables for TransparentProxy need to look
10407 like the vtable of the "target" class, so they need to point to
10408 its interface bitmap directly.
10410 * object.c: inside "mono_class_create_runtime_vtable" and
10411 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
10413 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
10415 * object-internals.h
10416 culture-info.h : added territory field in MonoCulture and
10417 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
10418 * locales.c : fill territory field above too.
10419 * culture-info-table.h : regenerated.
10421 2007-05-12 Zoltan Varga <vargaz@gmail.com>
10423 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
10426 2007-05-11 Jonathan Chambers <joncham@gmail.com>
10428 * object.c: Always initialize apartment, even if
10429 there is no custom attributes on entry point.
10431 Code is contributed under MIT/X11 license.
10433 2007-05-10 Jonathan Chambers <joncham@gmail.com>
10435 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
10436 * metadata.c: If no encoding is set, check for unicode
10439 Code is contributed under MIT/X11 license.
10441 2007-05-09 Jonathan Chambers <joncham@gmail.com>
10443 * threads.c: Handle if mono_thread_current returns NULL
10445 Code is contributed under MIT/X11 license.
10447 2007-05-09 Jonathan Chambers <joncham@gmail.com>
10449 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
10450 in start_wrapper. Added mono_thread_init_apartment_state and
10451 mono_thread_cleanup_apartment_state.
10452 * object.c: Initialize thread apartment state on main thread
10453 by checking for STAThreadAttribute on entry point.
10454 * object-internals.h: Add apartment_state field to MonoThread.
10455 * threads-types.h: Add unmanaged definition of
10456 System.Threading.ApartmentState, MonoThreadApartmentState.
10458 Code is contributed under MIT/X11 license.
10460 2007-05-08 Jonathan Chambers <joncham@gmail.com>
10462 * class.c: Fix windows build.
10463 * class-internals.h: Fix windows build.
10465 Code is contributed under MIT/X11 license.
10467 2007-05-08 Robert Jordan <robertj@gmx.net>
10469 * process.c (CreateProcess_internal):
10470 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
10471 .CreateNoWindow was specified. Fixes #81496.
10473 2007-05-08 Massimiliano Mantione <massi@ximian.com>
10475 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
10476 step in implementing IMT, replaced it with two compact arrays
10477 (interfaces_packed and interface_offsets_packed) and a bitmap that
10478 is used for isinst checks (interface_bitmap).
10480 * class.c: (compare_interface_ids): compare function to pass to
10481 bsearch when looking for an interface with a given id.
10482 (mono_class_interface_offset): reimplemented using bsearch on
10483 interfaces_packed, getting the offset from interface_offsets_packed.
10484 (print_implemented_interfaces): utility debugging function.
10485 (setup_interface_offsets): reworked to initialize interfaces_packed,
10486 interface_offsets_packed and interface_bitmap.
10488 * object.c: replaced all accesses to "MonoClass.interface_offsets"
10489 with uses of interfaces_packed and interface_offsets_packed.
10491 2007-05-08 Massimiliano Mantione <massi@ximian.com>
10493 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
10494 mono_class_interface_offset prototype to wrap all accesses to
10495 "MonoClass.interface_offsets".
10497 * class.c: Implemented mono_class_interface_offset, and wrapped all
10498 accesses to "MonoClass.interface_offsets".
10500 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
10501 "MonoClass.interface_offsets".
10503 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
10505 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
10506 GetMethodFromHandle overloads (bug #78637).
10508 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
10510 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
10511 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
10513 2007-05-01 Zoltan Varga <vargaz@gmail.com>
10515 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
10518 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
10520 (mono_custom_attrs_from_index): Ditto.
10522 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
10525 2007-04-30 Zoltan Varga <vargaz@gmail.com>
10527 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
10528 is now allocated from a mempool.
10530 2007-04-28 Zoltan Varga <vargaz@gmail.com>
10532 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
10533 caller holds threads_lock, leading to deadlocks. Fixes #81476.
10535 2007-04-26 Zoltan Varga <vargaz@gmail.com>
10537 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
10538 mono_loader_clear_error () too late. Fixes #81463.
10540 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
10542 * culture-info-table.h : regenerated.
10544 2007-04-25 Zoltan Varga <vargaz@gmail.com>
10546 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
10549 2007-04-25 Dick Porter <dick@ximian.com>
10551 * Makefile.am: Put the mingw enforced-optimisation back into the
10552 PLATFORM_WIN32 section.
10554 2007-04-24 Zoltan Varga <vargaz@gmail.com>
10556 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
10559 * image.c (mono_image_load_module): New API function to load a module reference.
10561 * image.c (load_modules): Load modules lazily. Fixes #80812.
10563 * class.c (mono_class_from_typeref): Use mono_image_load_module.
10565 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
10567 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
10568 to mono_image_load_module_dynamic.
10570 2007-04-23 Jonathan Chambers <joncham@gmail.com>
10572 * marshal.c: Fix calling convention for CCW on non-windows
10573 platforms. STDCALL on windows, CDECL everywhere else to work
10574 with XPCOM and MainWin COM.
10576 Code is contributed under MIT/X11 license.
10578 2007-04-23 Martin Baulig <martin@ximian.com>
10583 (method_from_memberref): Added `gboolean *used_context' argument.
10584 (mono_get_method_from_token): Likewise.
10585 (mono_get_method_full): Don't insert the method in the cache when
10586 `used_context' is true.
10588 2007-04-23 Raja R Harinath <rharinath@novell.com>
10590 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
10592 * reflection.c (mono_reflection_bind_generic_parameters): Don't
10593 create new MonoTypes for returned types.
10594 * class.c (mono_generic_class_get_class): Export mono-internal.
10595 * class-internals.h: Update to changes.
10597 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
10599 * threadpool.c, threadpool.h, icall-def.h: patch from
10600 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
10602 2007-04-18 Zoltan Varga <vargaz@gmail.com>
10604 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
10606 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
10608 * threads.c (mono_thread_get_stack_bounds): New helper function.
10610 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
10611 Correctly compute stack bounds when attaching. Fixes #81394.
10613 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
10615 * reflection.c: fix handling of doubles in custom attributes
10616 for the arm-fpa format (bug #81368).
10618 2007-04-18 Raja R Harinath <rharinath@novell.com>
10620 * reflection.c (assembly_add_win32_resources): Mildly relax an
10621 bounds check to let the end pointer point just past the end of the
10622 allocated buffer. (may fix #81384)
10624 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
10626 * culture-info-table.h : regenerated.
10628 2007-04-07 Zoltan Varga <vargaz@gmail.com>
10630 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
10631 the thread is aborted early.
10633 2007-04-05 Dick Porter <dick@ximian.com>
10635 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
10636 FindFirstFile()/FindNextFile() to find entries. This lets the
10637 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
10640 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
10642 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
10644 2007-04-04 Martin Baulig <martin@ximian.com>
10647 (mono_method_desc_full_match): Add support for nested classes.
10649 2007-04-02 Zoltan Varga <vargaz@gmail.com>
10651 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
10653 2007-04-01 Zoltan Varga <vargaz@gmail.com>
10655 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
10656 waiting for too many threads.
10658 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
10660 * environment.c: Fix return value check on uname so we can get the
10661 executing version on Solaris operating systems.
10663 2007-03-28 Jb Evain <jbevain@gmail.com>
10665 * class.c (mono_type_get_name_recurse): Complete the
10666 fix for the creation of assembly qualified names for
10667 pointer types. Fixes #81208.
10669 2007-03-27 Dick Porter <dick@ximian.com>
10671 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
10672 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
10676 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
10677 the value of ReleaseMutex().
10679 2007-03-27 Dick Porter <dick@ximian.com>
10681 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
10682 in little-endian order, not network endian, so must be converted
10683 to host endian here. Fixes bug 80593.
10685 2007-03-22 Jb Evain <jbevain@gmail.com>
10687 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
10688 qualified names for pointer types. Fixes #81208.
10690 2007-03-21 Jonathan Chambers <joncham@gmail.com>
10692 * marshal.c: Add support for PreserveSigAttribute.
10694 Code is contributed under MIT/X11 license.
10696 2007-03-14 Zoltan Varga <vargaz@gmail.com>
10698 * process.c: Fix endianness issues. Fixes #81126.
10700 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
10701 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
10703 * image.c (mono_image_lookup_resource): Make this work on big-endian
10704 machines.Change API contract so the caller needs to free the return value.
10706 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
10709 2007-03-14 Martin Baulig <martin@ximian.com>
10711 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
10712 mono_type_get_desc() as well.
10714 2007-03-13 Jonathan Chambers <joncham@gmail.com>
10716 * icall.c: Fix environ access in VS.
10718 2007-03-13 Alp Toker <alp@atoker.com>
10720 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
10721 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
10724 2007-03-12 Zoltan Varga <vargaz@gmail.com>
10726 * reflection.c (mono_reflection_create_dynamic_method): Add support for
10727 circular references among dynamic methods. Fixes #81091.
10729 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
10731 2007-03-09 Martin Baulig <martin@ximian.com>
10733 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
10735 2007-03-09 Jonathan Chambers <joncham@gmail.com>
10737 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
10738 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
10740 Code is contributed under MIT/X11 license.
10742 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
10744 * loader.c: Reapply patch for bug #79424.
10746 2007-03-06 Zoltan Varga <vargaz@gmail.com>
10748 * metadata.c (mono_type_to_unmanaged): Only convert object to
10749 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
10751 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
10753 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
10754 (and incorrectly set) is_reference field from MonoGenericInst.
10756 2007-03-06 Zoltan Varga <vargaz@gmail.com>
10758 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
10761 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
10763 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
10765 2007-03-05 Miguel de Icaza <miguel@novell.com>
10767 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
10768 FileOptions.1 value to mean "temporary", map that to
10769 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
10773 2007-03-03 Marek Habersack <mhabersack@novell.com>
10775 * appdomain.c: implement MS .Net style shadow copying. Copies of
10776 the assemblies are made in a subdirectory of the dynamic base
10777 directory, the assembly names are preserved.
10778 Copy .mdb and .config files along with the assemblies being shadowed.
10780 2007-02-28 Zoltan Varga <vargaz@gmail.com>
10782 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
10783 (emit_marshal_handleref): Ditto.
10785 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
10786 on Visual C++. Fixes #80671.
10788 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
10790 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
10791 for clone operations.
10793 2007-02-28 Zoltan Varga <vargaz@gmail.com>
10795 * marshal.c: Fix warnings.
10797 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
10799 * loader.c: allow case-insensitive matching of the dll name
10800 in dllmap handling when prefixed with "i:".
10802 2007-02-20 Jonathan Chambers <joncham@gmail.com>
10804 * threads.c: Fix #ifdef for dummy_apc function for VS.
10806 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
10808 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
10810 2007-02-19 Massimiliano Mantione <massi@ximian.com>
10811 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
10812 giving precedence to the methods with a fully qualified name
10813 (InterfaceName.MethodName) when building the interface sections
10816 2007-02-16 Dick Porter <dick@ximian.com>
10818 * threadpool.c (append_job): Fix fast-path array handling, so it's
10819 less likely the array will grow exponentially when the load is
10822 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10824 * metadata-internals.h, loader.c: fix dllmap lookup order
10825 for non-function maps, too, and prepare for fallback code.
10827 2007-02-12 Robert Jordan <robertj@gmx.net>
10829 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
10830 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
10831 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
10832 GlobalFree. Fixes a part of bug #77075.
10834 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
10836 * loader.c: implemented typedef parent in field memberref.
10838 2007-02-11 Jonathan Chambers <joncham@gmail.com>
10840 * marshal.c: Fix warnings and remember to call Release on
10843 Code is contributed under MIT/X11 license.
10845 2007-02-10 Miguel de Icaza <miguel@novell.com>
10847 * class-internals.h: Add MonoHandleRef definition, and
10848 handleref_class to mono_defaults.
10850 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
10851 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
10853 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
10854 (do nothing on this stage)
10855 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
10856 (emit_marshal_handleref): New method, used for argument handling
10859 2007-02-08 Jonathan Chambers <joncham@gmail.com>
10861 * class.c (mono_class_setup_parent): Lazily init com types.
10862 * domain.c (mono_init_internal, mono_init_com_types): Lazily
10864 * object.c (mono_remote_class_vtable): Lazily init com types.
10865 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
10866 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
10867 * domain-internals.h: Expose mono_init_com_types.
10868 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
10869 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
10870 Add support for COM Callable Wrapper marshalling.
10871 * marshal.h: Add icall definitions.
10872 * gc.c: Handle freeing of CCWs in finalizer code.
10874 Code is contributed under MIT/X11 license.
10876 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
10878 * reflection.c: changed all the signature encoding code to use
10879 a variable-sized buffer.
10881 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10883 * marshal.c: locking fixes: never take the loader lock
10884 or other runtime locks when holding the marshal lock
10887 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
10889 * marshal.c: make the delegate function pointer mapping
10890 work for the moving GC.
10892 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
10894 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
10897 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10899 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
10902 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
10904 * threadpool.c: made the code moving-GC safe.
10906 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
10908 * assembly.c, boehm-gc.c, class-internals.h, class.c,
10909 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
10910 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
10912 * reflection.c: warning cleanup, some threading and moving GC fixes.
10914 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
10916 * class.c, loader.c: create the needed Set/Get/Address array methods
10917 as well as the .ctors in mono_class_init (), fixes bug #80567.
10919 2007-01-24 Zoltan Varga <vargaz@gmail.com>
10921 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
10922 we doesn't decrease its alignment. Should fix the sparc build.
10924 2007-01-24 Dick Porter <dick@ximian.com>
10927 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
10928 Create the returned object if we need to ignore an unsupported
10929 socket option. Fixes a segfault reported by Atsushi.
10931 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10933 * class.c, object.c: restrict GC-tracked fields to
10934 UIntPtr fields used inside corlib, so we provide better
10935 type info to the GC and also allow broken packing as in
10938 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
10940 * sgen-gc.c: removed duplicated function.
10942 2007-01-19 Miguel de Icaza <miguel@novell.com>
10944 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
10945 value that means that the value is not supported, but that we
10946 should not return a failure, but instead report this as a
10947 successful operation.
10949 2007-01-19 Raja R Harinath <rharinath@novell.com>
10951 Fix tests/bug79956.2.il
10952 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
10953 (mono_generic_class_get_class): If the generic definition in an
10954 enum, copy over other fields related to it.
10956 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10958 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
10959 genericinst enums (bug #79215).
10961 2007-01-17 Massimiliano Mantione <massi@ximian.com>
10962 * class.c: Fix bug 80307.
10964 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
10966 * image.c: if the file table is not present, try to load
10967 all the modules, since we don't have info about them
10968 having or not metadata (bug #80517).
10969 * assembly.c: allow mono_assembly_load_references () to
10970 work for netmodules.
10972 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10974 * image.c, metadata-internals.h, object.c: execute module
10975 cctors when running on the 2 runtime if present (bug #80487).
10977 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
10979 * icall.c: optimized InitializeArray() on bigendian.
10981 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
10983 * icall.c: fix for the broken ARM FPA double format.
10985 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
10987 * icall.c: handle endian issues for r4 and r8 types, too, in
10988 the InitializeArray() icall.
10990 2007-01-15 Miguel de Icaza <miguel@novell.com>
10992 * loader.c (mono_loader_error_prepare_exception): Clear the error
10993 once we have extracted the information from it, do this before we
10994 call into the JIT's class loading mechanisms.
10996 * object.c (mono_class_create_runtime_vtable): Do not clear the
10997 loader error before calling mono_class_get_exception_for_failure
10998 as the loader error is needed inside
10999 mono_class_get_exception_for_failure to throw the error (thinko).
11003 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
11005 * reflection.c: align fields rva data so it's faster to load at
11008 2007-01-12 Raja R Harinath <rharinath@novell.com>
11010 Prepare to simplify GenericMethod handling.
11011 * class-internals.h (mono_method_get_context): New accessor function.
11012 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
11013 rather than directly accessing '->context' field.
11015 * class-internals.h (_MonoGenericParam.method): Move ...
11016 (_MonoGenericContainer): ... here. Add into union with klass field.
11017 * class.c, icall.c, loader.c, metadata.c, reflection.c:
11020 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
11022 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
11023 the wrapper type enum and reduce relocations.
11025 2007-01-12 Raja R Harinath <rharinath@novell.com>
11027 * reflection.c (inflate_mono_method): Reuse method instantiation
11028 from the generic method, if available.
11030 2007-01-11 Jonathan Chambers <joncham@gmail.com>
11032 * marshal.c (emit_marshal_variant): Fix conv_arg
11033 type in last commit, based on whether parameter is byref.
11035 2007-01-11 Jonathan Chambers <joncham@gmail.com>
11037 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
11039 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
11040 MONO_TYPE_OBJECT back for VARIANT support.
11042 2007-01-11 Jonathan Chambers <joncham@gmail.com>
11044 * marshal.c, marshal.h, icall-def.h: Implement
11045 Marshal.ReAllocCoTaskMem.
11047 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
11049 * marshal.c: memory retention fixes: use the proper
11050 image cache for runtime_invoke method lookups.
11052 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
11054 * mempool.c: added code to help debug mempool allocations.
11056 2007-01-11 Dick Porter <dick@ximian.com>
11058 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
11059 support (experimenting with faking it with IP_MTU_DISCOVER for
11060 systems that don't have IP_DONTFRAGMENT.)
11061 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
11064 * icall-def.h: new System.Net.Sockets.Disconnect icall.
11066 * socket-io.h: Add new fields to MonoSocketAsyncResult
11067 corresponding to the new ones in Socket.cs.
11069 2007-01-11 Raja R Harinath <rharinath@novell.com>
11071 Fix IronPython regression mentioned in #80249
11072 * metadata.c (do_mono_metadata_parse_generic_class): Clear
11073 'cached_context' field, since it may have been initialized as a
11074 side-effect of metadata parsing.
11076 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
11077 (_MonoGenericClass.cached_class): Move here and rename from lone
11078 remaining field of ...
11079 (_MonoInflatedGenericClass): ... this. Remove.
11080 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
11083 Fix mcs/tests/test-128.cs regression.
11084 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
11085 2007-01-10 change below.
11086 [MONO_TYPE_OBJECT]: Recurse into array case.
11088 2007-01-11 Raja R Harinath <harinath@gmail.com>
11090 * class-internals.h (mono_get_inflated_generic_class): Remove.
11091 * class.c (mono_get_inflated_generic_class): Remove.
11092 (mono_generic_class_get_class): Rename from
11093 mono_class_create_generic.
11094 (mono_class_from_mono_type) [GENERICINST]: Use it.
11095 * reflection.c, metadata.c: Update to changes. Use
11096 'mono_class_from_mono_type'.
11098 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
11100 * reflection.c: use passed type when encoding an array element
11101 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
11103 2007-01-09 Robert Jordan <robertj@gmx.net>
11105 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
11106 result arguments (someDelegate.EndInvoke (unrelatedAres)).
11109 2007-01-09 Raja R Harinath <rharinath@novell.com>
11111 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
11113 * object.c (set_value): Avoid aliasing between type->data.klass
11114 and type->data.generic_class.
11116 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
11118 2007-01-08 Raja R Harinath <rharinath@novell.com>
11120 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
11121 between type->data.klass and type->data.generic_class.
11123 2007-01-08 Lluis Sanchez <lluis@ximian.com>
11125 * marshal.c: In MS.NET, StringBuilder objects are not copied by
11126 value in out parameters.
11128 2007-01-08 Raja R Harinath <rharinath@novell.com>
11130 Simplify invariant for MonoGenericClass::klass field.
11131 * class.c (mono_class_create_generic): Verify 'klass' is null.
11132 * metadata.c (do_mono_metadata_parse_generic_class): Don't
11133 initialize 'klass' field.
11135 2007-01-05 Raja R Harinath <rharinath@novell.com>
11137 Ongoing work to avoid redundant data and simplify invariants.
11138 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
11139 'generic_class', and change type to a GenericInst.
11140 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
11141 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
11143 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
11145 * class.c : skip io-layer under PLATFORM_WIN32.
11147 2007-01-03 Tor Lillqvist <tml@novell.com>
11149 Fix #80305: In a bundled executable, look in the bundled exe
11150 assembly to determine the runtime version. Add the possibility to
11151 bundle also the machine.config file.
11153 * assembly.c (mono_assembly_open_from_bundle): Make
11154 non-static. Allow being called even if we have no bundled
11155 assemblies, and return NULL right away in that case.
11157 * domain-internals.h: Declare mono_assembly_open_from_bundle()
11160 * domain.c (app_config_parse): Take an assembly exe file name as
11161 parameter instead of a config file name. Check for a bundled
11162 config file for that assembly by calling
11163 mono_config_string_for_assembly_file() (see below) before looking
11164 for one in the file system.
11165 (get_runtimes_from_exe): Corrsponding change to call of
11166 app_config_parse().
11167 (get_runtimes_from_exe): Check for bundled assembly exe file first
11168 by calling mono_assembly_open_from_bundle(). If no bundled
11169 assembly exe file is found, call mono_image_open() as before to
11170 look it up in the file system.
11172 * mono-config.c: Add variable bundled_machinec_onfig.
11173 (mono_config_string_for_assembly_file): New function.
11174 (mono_config_for_assembly): Move code snippet that looks for a
11175 bundled assembly .config file into the above new function. Call
11177 (mono_register_machine_config, mono_get_machine_config): New
11178 functions to set and retrieve
11180 * assembly.h: Declare mono_register_machine_config().
11182 * mono-config.h: Declare mono_get_machine_config() and
11183 mono_config_string_for_assembly_file().
11185 * icall.c: No declaration of environ necessary on Win32. It is
11186 declared (as a macro expanding to a function call) in stdlib.h.
11187 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
11188 New internal mono function. Returns the value of
11189 mono_get_machine_config() as a Mono string.
11191 * icall-def.h: Add get_bundled_machine_config().
11193 2007-01-04 Raja R Harinath <rharinath@novell.com>
11195 Remove redundant field
11196 * class-internals.h (_MonoGenericContext.container): Remove field.
11197 * loader.c (mono_method_get_signature_full): Don't parse a
11198 "container" for a signature parse when the signature is inflated
11200 (method_from_methodspec): Likewise, for a generic_inst.
11201 * class.c, metadata.c, reflection.c: Update to changes.
11203 2006-01-04 Raja R Harinath <rharinath@novell.com>
11205 * class-internals.h (_MonoGenericClass): Rename 'context' field to
11206 'cached_context', and change semantics -- it starts off NULL, and
11207 is initialized on demand.
11208 * class.c (mono_generic_class_get_context): New accessor to
11209 replace 'context' field accesses.
11210 (mono_class_get_context): New helper.
11211 (*): Update to changes.
11212 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
11214 2007-01-03 Miguel de Icaza <miguel@novell.com>
11216 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
11217 before the memcpy. Fixes Marshal2 regression.
11219 2007-01-02 Jb Evain <jbevain@gmail.com>
11221 * blob.h: add a MONO_TYPE_ENUM definition
11222 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
11223 fix the encoding of arrays of enums in custom attributes.
11227 2007-01-01 Miguel de Icaza <miguel@novell.com>
11229 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
11230 string is null terminated, but only cut the string short if it
11231 overflows the buffer.
11233 (mono_string_to_byvalstr): Also fix this routine. The code here
11234 was not properly terminating a string (it was only terminated
11235 because of the previous catch-all memset).
11237 I left the memset, because I do not know if applications expect
11238 the runtime to clear this region.
11242 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11243 Clear the error before returning to unmanaged code to prevent the
11244 runtime from being confused later on (fixes 80420).
11245 (ves_icall_type_from_name): Always call mono_loader_clear_error
11246 after parsing a type that could have failed.
11247 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
11249 * loader.c (mono_loader_clear_error): Fix indentation.
11251 2006-12-28 Martin Baulig <martin@ximian.com>
11253 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
11255 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11257 * reflection.c: patch from Rolf Bjarne Kvinge to fix
11258 getting a token for an EnumBuilder.
11260 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
11262 * reflection.c: be more careful in case resource generation
11263 fails to create the data array.
11265 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11267 * sgen-gc.c: write barrier for clone and fix unregister handles.
11269 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11271 * reflection.c: some fixes needed in the generics code for the moving GC.
11273 2006-12-22 Robert Jordan <robertj@gmx.net>
11275 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
11276 account. Fixes bug #80299.
11278 2006-12-21 Raja R Harinath <rharinath@novell.com>
11280 Fix WaitHandle usage in delegates.
11281 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
11282 * object.c (mono_wait_handle_new): Use the property set method to
11283 initialize the handle.
11284 (mono_wait_handle_get_handle): New.
11285 * threadpool.c (mono_async_invoke): Use it.
11286 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
11288 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
11290 2006-12-21 Jonathan Chambers <joncham@gmail.com>
11292 * marshal.c (emit_marshal): Call emit_marshal_variant and
11293 emit_marshal_com_interface when applicable.
11294 (emit_marshal_variant, emit_marshal_com_interface): Add
11295 methods for this case and remove if's from emit_marshal_object.
11297 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
11299 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
11301 2006-12-19 Jonathan Chambers <joncham@gmail.com>
11303 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
11304 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
11305 and GlobalFree on Windows. Remove FIXME.
11307 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11309 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
11310 implementation for managed objects.
11312 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
11314 * object.c: implemented code to be used for checking
11315 that no reference field overlaps with non-references.
11317 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11319 * threadpool.c: fix queue code to be compatible with the
11322 2006-12-18 Miguel de Icaza <miguel@novell.com>
11324 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
11325 in structures by throwing ArgumentNullException.
11327 (emit_marshal_safehandle): Also when they are null parameters.
11329 (emit_marshal_safehandle): Add support for ref
11330 SafeHandles parameters
11332 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11334 * profiler.c: updated to use the mono-dl API instead of
11337 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11339 * profiler.c: updated to use the mono-dl dynamic loading
11340 API instead of gmodule.
11342 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
11344 * profiler.c: use readlink, older versions of glib don't have
11345 g_file_read_link ().
11347 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
11349 * profiler.c: try to detect the path to mono if libc fails to provide
11350 a useful name (bug #80286).
11352 2006-12-16 Raja R Harinath <rharinath@novell.com>
11355 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
11356 instance, use the generic type definition instead.
11357 (ves_icall_Type_GetNestedTypes): Likewise.
11358 * class.c (mono_class_create_generic): Always set the
11359 nested_classes of a generic instance to NULL, even if the generic
11360 type definition has nested types.
11362 2006-12-15 Jonathan Chambers <joncham@gmail.com>
11364 * marshal.c (mono_string_from_bstr): Revert previous Windows change
11367 2006-12-15 Miguel de Icaza <miguel@novell.com>
11369 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
11370 my arguments were in the wrong order. I also fixed the Windows
11371 version which seems to have had the same issue.
11373 (mono_free_bstr): On Unix, this is g_free.
11374 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
11375 conversions (for the tests in corlib to pass).
11377 2006-12-14 Miguel de Icaza <miguel@novell.com>
11379 * marshal.c (emit_ptr_to_object_conv): For now, ignore
11380 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
11381 exception if a ref SafeHandle in a struct has changed).
11383 (emit_struct_conv): Do not perform layout checks for classes
11384 derived from SafeHandle, as those are specially handled.
11386 (emit_object_to_ptr_conv): Add support for
11387 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
11389 (emit_marshal_safehandle): Implement conversion of return values
11390 of safehandles (MARSHAL_ACTION_CONV_RESULT).
11392 * threads.c: WaitHandle now is compiled with two different handles
11393 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
11396 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
11397 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
11398 these routines to cope with both kinds of fields.
11400 2006-12-12 Miguel de Icaza <miguel@novell.com>
11402 * metadata.c (mono_type_to_unmanaged): Handle the case where
11403 type->data.klass is a SafeHandle, and in that case, return the
11404 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
11405 MONO_MARSHAL_CONV_SAFEHANDLE.
11407 2006-12-11 Miguel de Icaza <miguel@novell.com>
11409 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
11410 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
11411 calling emit_marshal_object.
11413 (emit_marshal_safehandle): Implement marshalling of
11414 SafeHandle parameters (no ref support yet).
11416 (MarshalAction): Document the defines as I implement
11417 them for SafeHandle.
11419 (emit_marshal_object): indentation police.
11421 * class-internals.h: Define MonoSafeHandle.
11422 Add safehandle_class to MonoDefaults type.
11424 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
11425 list of classes to check for fields.
11427 * domain.c (mono_init_internal): Add SafeHandle to the list of
11428 mono_defaults loaded.
11430 2006-12-15 Raja R Harinath <rharinath@novell.com>
11433 * reflection.c (mono_reflection_bind_generic_parameters): If the
11434 generic type definition is a type builder, ensure that it is fully
11435 initialized before instantiating it. Kill some dead code.
11437 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
11439 * object.c: clear the loader_error () before loading
11440 more metadata stuff (bug #80258).
11442 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
11444 * icall.c, icall-defs.h: type modifiers icalls for
11445 parameters and properties.
11447 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
11449 * object.c, icall.c: fixed warnings.
11451 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11453 * marshal.c: fixed a couple of leaks and coding style in a few places.
11455 2006-12-08 Dick Porter <dick@ximian.com>
11457 * process.c: Cope with NULL ProcessStartInfo arguments on windows
11458 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
11461 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11463 * process.c: ProcessStartInfo may have only filename set and
11464 arguments can be NULL.
11466 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
11468 * icall.c: fix leak found by Robert Jordan.
11470 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11472 * marshal.c, marshal.h: generate managed method to access an element
11473 of a multi-dimensional array.
11475 2006-11-30 Paolo Molaro (lupus@ximian.com)
11477 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
11479 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11481 * icall.c: back out GetFields () fix until the serialization code is
11482 fixed to not depend on the incorrect behaviour.
11484 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11486 * profiler.c: provide defaults if none are set.
11488 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11490 * Makefile.am, attrdefs.h: new public header file with
11491 constants for attributes for use by embedders.
11493 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11495 * icall.c: GetFields () fix for bug #80064.
11497 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
11499 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
11500 removed long unused icalls.
11502 2006-11-27 Jonathan Chambers <joncham@gmail.com>
11505 (mono_marshal_emit_managed_wrapper): Level of indirection for
11506 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
11507 can be generated without a delegate class.
11508 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
11510 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
11512 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11514 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
11517 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11519 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
11520 icall-def.h: added icalls needed by System.GC.
11522 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
11524 * loader.c: ensure the class in catch clauses is handled
11525 correctly for generics methods (fixes bug#79980).
11527 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
11529 * monitor.h, monitor.c: added mono_locks_dump () function
11530 to help debug deadlocks involving managed locks.
11532 2006-11-13 Dick Porter <dick@ximian.com>
11534 * file-io.c (get_file_attributes): If the file is a symlink try
11535 and get the stat data for the target, but also add the
11536 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
11537 the specs for the windows symlink support, but will probably have
11538 to be reworked when I have test data from a vista machine. Fixes
11541 2006-11-13 Dick Porter <dick@ximian.com>
11543 * gc.c (mono_domain_finalize):
11544 * marshal.c (mono_delegate_begin_invoke):
11545 * threadpool.c (socket_io_init, mono_thread_pool_init)
11546 (mono_thread_pool_finish):
11547 * monitor.c (mono_monitor_try_enter_internal):
11548 * threads.c (mono_thread_resume, mono_thread_init)
11549 (mono_thread_suspend_all_other_threads)
11550 (mono_thread_execute_interruption):
11551 * appdomain.c (mono_domain_unload): Check for NULL error returns
11552 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
11555 2006-11-11 Miguel de Icaza <miguel@novell.com>
11558 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
11559 Only close the handle if the value of the handle is not
11560 INVALID_HANDLE_VALUE. This just makes the process a bit more
11563 Improvement for #75733, so that we do not run into this problem.
11566 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
11567 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
11568 internal variables. Fixes #79462
11571 2006-11-09 Dick Porter <dick@ximian.com>
11573 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
11574 Use poll() not select(). Fixes bug 79397.
11576 2006-11-09 Raja R Harinath <rharinath@novell.com>
11579 * assembly.c (mono_assembly_load_from_full): Check that the given
11580 image has an assembly manifest.
11582 2006-11-09 Ankit Jain <jankit@novell.com>
11584 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
11585 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
11586 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
11588 2006-11-07 Dick Porter <dick@ximian.com>
11590 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
11591 Put the old resolver behaviour back for pre-2.0 profiles.
11593 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
11595 * threadpool.c: precise GC and locking fixes.
11597 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11599 * class.c: don't load types that have an explicit unaligned
11600 managed reference. Provide better info in the TypeLoad exception.
11601 Part of the fix for bug #79744.
11602 * object.c: use the correct check for class type load issues.
11604 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
11606 * class.c: enforce alignment of fields with managed references
11607 even when Pack=1 is forced by the user (bug #77788).
11609 2006-11-03 Dick Porter <dick@ximian.com>
11611 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
11612 If the address reverse lookup fails, return it as the hostname
11613 anyway. Fixes bug 79721.
11615 2006-11-03 Dick Porter <dick@ximian.com>
11617 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
11618 Fix build on Windows.
11620 2006-11-02 Dick Porter <dick@ximian.com>
11623 * object-internals.h:
11624 * exception.c (mono_get_exception_thread_interrupted):
11625 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
11628 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
11629 Check for pending Thread.Interrupt.
11631 2006-10-27 Massimiliano Mantione <massi@ximian.com>
11632 * loader.c: Fixed bug 79684.
11634 2006-10-27 Dick Porter <dick@ximian.com>
11636 * file-io.c (get_file_attributes): Force symlinks to directories
11637 to be returned as a regular file. Fixes bug 79733.
11638 2006-10-26 Dick Porter <dick@ximian.com>
11640 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
11641 CreateFile to open a directory then we need to set the
11642 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
11644 2006-10-23 Zoltan Varga <vargaz@gmail.com>
11646 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
11649 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
11651 * sgengc.c: small cleanup of timer code.
11653 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11655 * sgen-gc.c: fix some warnings and start adding support for
11656 complete object removal on domain unload.
11658 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
11660 * assembly.c: build_assembly_name should not consider a version
11661 number without build or revision number invalid. Fixes bug #79715.
11663 2006-10-18 Jonathan Chambers <joncham@gmail.com>
11665 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
11666 call kernel32 function OutputDebugString directly.
11668 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
11670 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
11672 * reflection.c: small cleanup, using a function to insert a MonoString
11673 in the string heap.
11675 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
11677 * reflection.c: moving GC fixes.
11679 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
11681 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
11682 all the objects with finalizers belonging to an unloading appdomain.
11684 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
11686 * sgen-gc.c: added ability to allocate even when the nursery is fully
11687 pinned and fixed a couple of bugs.
11689 2006-10-15 Zoltan Varga <vargaz@gmail.com>
11691 * threads.h: Revert the last change for now.
11693 * threads.h (mono_thread_get_pending_exception): Rename this to
11694 mono_thread_get_undeniable_exception ().
11696 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
11698 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
11699 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
11700 when fname does not refer to valid assembly. This result in a more
11701 meaningful error message.
11702 * exception.c: added mono_get_exception_bad_image_format2 which
11703 constructs a BadImageFormatException using the ctor taking a custom
11704 message and the file name. Passing in a NULL msg results in a default
11706 * exception.h: define mono_get_exception_bad_image_format2 function.
11707 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
11708 when file name pointed to an invalid IL image. Use
11709 mono_get_exception_file_not_found2 to construct FileNotFoundException,
11710 as this results in a more meaningful error message.
11712 2006-10-15 Zoltan Varga <vargaz@gmail.com>
11714 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
11717 2006-10-12 Zoltan Varga <vargaz@gmail.com>
11719 * metadata.c (mono_type_size): Change the align parameter to guint32 for
11720 consistency with the other _size functions.
11721 (mono_type_stack_size): Ditto.
11723 * class.c object.c icall.c: Fix warnings caused by the above change.
11725 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
11727 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
11729 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
11731 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
11733 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
11734 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
11735 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
11736 threadpool.h, threads-types.h: mark more internal functions.
11738 2006-10-11 Dick Porter <dick@ximian.com>
11740 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
11741 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
11742 reproduce the bug even before applying the fix.)
11744 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
11746 * reflection.c: allow retrieving attributes for arguments in generic
11747 methods (bug #79241).
11749 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
11751 * debug-mono-symfile.c: properly check fopen () result (found by
11754 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
11756 * reflection.c: make error message clearer and fixed two
11757 issuelets found by Coverity.
11759 2006-10-10 Zoltan Varga <vargaz@gmail.com>
11761 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
11763 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
11765 * object-internals.h, gc-internal.h, profiler-private.h:
11766 mark internal functions.
11768 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11770 * reflection.c: put data in the text section.
11771 * icall.c: recognize more types in type_from_typename ().
11772 * process.c, marshal.c: added some GC FIXMEs.
11774 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
11776 * loader.c: check for NULL before initializing.
11778 2006-10-09 Zoltan Varga <vargaz@gmail.com>
11780 * gc.c (finalizer_thread): Use a non-alertable wait here.
11782 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
11783 until the correct solution is found.
11785 2006-10-06 Zoltan Varga <vargaz@gmail.com>
11787 * reflection.c (mono_module_get_object): Avoid an assert when operating on
11788 modules with no metadata. Fixes #79596.
11790 * image.c (load_metadata_ptrs): Put back the error message when
11791 the #- heap is encountered since the support is not complete yet.
11793 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
11795 * gc.c: do not allow the user to SuppressFinalize () a
11796 delegate because it would leak the trampoline if present.
11798 2006-10-06 Zoltan Varga <vargaz@gmail.com>
11800 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
11803 2006-10-05 Zoltan Varga <vargaz@gmail.com>
11805 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
11807 * metadata.c (mono_metadata_get_param_attrs): Ditto.
11809 * row-indexes.h: Add definitions for *Ptr tables.
11811 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
11813 * metadata.c (mono_metadata_translate_token_index): New helper function to
11814 translate table indexes used in uncompressed metadata.
11815 (mono_metadata_decode_table_row): Ditto.
11816 (mono_metadata_decode_table_row_col): Ditto.
11818 * metadata.c: Add table schema for *Ptr tables.
11820 * class.c loader.c: Use the new helper function to access the affected metadata
11823 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
11826 2006-10-04 Zoltan Varga <vargaz@gmail.com>
11828 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
11829 sequences which can be unbounded in size. Fixes #79583.
11831 2006-10-02 Zoltan Varga <vargaz@gmail.com>
11833 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
11834 static initialization.
11836 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
11838 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
11840 * domain.c (mono_domain_free): Free up type_init_exception_hash.
11842 * object.c (mono_runtime_class_init): Implement correct semantics when a static
11843 ctor fails, i.e. throw the same exception on subsequent accesses.
11845 2006-09-0 Jonathan Chambers <joncham@gmail.com>
11847 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
11848 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
11849 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
11850 Handle marshalling of interfaces and VARIANTs contained in structs.
11852 Code is contributed under MIT/X11 license.
11854 2006-09-30 Zoltan Varga <vargaz@gmail.com>
11856 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
11858 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
11861 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11863 * console-io.c: ignore previous SIGINT handler.
11865 2006-09-27 Zoltan Varga <vargaz@gmail.com>
11867 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
11868 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
11869 #79460, #79461, #79485.
11871 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
11873 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
11876 2006-09-26 Zoltan Varga <vargaz@gmail.com>
11878 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
11879 could be generated from it.
11881 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
11883 * rand.c: fix read loop to correctly handle EINTR.
11885 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
11887 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
11888 internal calls are defined to keep methods closer to the declaring
11889 type and allow a significant reduction in runtime relocations and
11892 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
11894 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
11895 exception message to have FileNotFoundException use the default
11896 assembly load error message. Fixes bug #79426.
11897 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
11899 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11901 * threadpool.c: (start_thread_or_queue) use the root domain when
11902 creating the thread instead of the async object one.
11904 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
11906 * class.c, object.c, class-internals.h, reflection.c:
11907 for arrays, store element_size inside MonoClass (speedup
11908 for array object creation).
11910 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
11912 * icall.c: fixed CodeBase to use the file name and not the module
11915 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
11917 * mono-debug.c, mono-debug.h: export find_method as
11918 mono_debug_find_method ().
11920 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
11922 * debug-helpers.c, class-internals.h: added a few functions useful
11923 when debugging under gdb.
11925 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11927 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
11928 characters that need special handling.
11930 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
11932 * mono-config.c: make the os/cpu specification more flexible,
11933 allowing lists and negation.
11935 2006-09-18 Jonathan Chambers <joncham@gmail.com>
11937 * marshal.c: COM Interop fixes. Handle case where method->klass.
11938 is interface. Handle BSTR/MonoString when null. Use CDECL as
11939 calling convention on non-windows platforms. This is for
11940 compatibility with XPCOM and MainWin COM.
11942 Code is contributed under MIT/X11 license.
11945 2006-09-18 Zoltan Varga <vargaz@gmail.com>
11947 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
11948 correctly. Fixes #79217.
11950 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
11952 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
11954 * mono-config.c: allow both an os and cpu attribute for dllmap
11955 and dllentry elemnets to enable a single config file to be used
11956 for multiple architectures.
11958 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
11960 * loader.c: MonoLoaderError was cleared too soon on load failure.
11963 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
11965 * icall.c: use the defining class vtable when accessing a
11966 static field, not a pobblibly derived class.
11968 2006-09-17 Zoltan Varga <vargaz@gmail.com>
11970 * icall.c string-icalls.c: Remove references to unicode.h.
11972 * unicode.h unicode.c Makefile.am: Remove these unused source files.
11974 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
11976 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
11977 indicating the image where custom marshaller types should be looked up.
11978 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
11979 custom marshallers, instead of corlib. Fixes #79425.
11981 2006-09-14 Zoltan Varga <vargaz@gmail.com>
11983 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
11985 2006-09-14 Jonathan Chambers <joncham@gmail.com>
11987 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
11988 Implement Environment.ProcessorCount.
11990 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
11991 Implement Environment.ProcessorCount.
11994 Add Environment.ProcessorCount icall.
11996 Patch by Jason McFall.
11998 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12000 * assembly.c: don't append .exe/.dll when the filename already contains
12001 one of those extensions.
12003 2006-09-12 Martin Baulig <martin@ximian.com>
12005 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
12006 to array interfaces.
12008 2006-09-11 Martin Baulig <martin@ximian.com>
12010 * reflection.c (mono_image_build_metadata): Create the
12011 MethodImpl's after emitting all types and methods, so we don't
12012 need another fixup pass for them.
12014 2006-09-11 Zoltan Varga <vargaz@gmail.com>
12016 * class.c (mono_class_from_name_case): Fix regression introduced by the last
12019 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
12021 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
12024 2006-09-10 Zoltan Varga <vargaz@gmail.com>
12026 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
12027 args is not set. Fixes #78926.
12029 2006-09-08 Zoltan Varga <vargaz@gmail.com>
12031 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
12033 * image.c (load_class_names): Move this to class.c, and rename it to
12034 'mono_image_init_name_cache'.
12035 (load_modules): Fix a warning.
12037 * class.c icall.c image.c: Initialize image->name_cache lazily.
12039 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
12040 on its name using information in the AOT file.
12042 * class.c (mono_class_from_name): Use the new hook function.
12044 2006-09-06 Zoltan Varga <vargaz@gmail.com>
12046 * reflection.c (mono_param_get_objects): Handle enum default parameter values
12049 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
12052 2006-09-06 Martin Baulig <martin@ximian.com>
12054 * icall.c (mono_lookup_internal_call): Small fix.
12056 2006-09-05 Raja R Harinath <rharinath@novell.com>
12058 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
12061 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
12063 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
12064 when --debug is specified.
12066 2006-09-04 Zoltan Varga <vargaz@gmail.com>
12068 * class.c (setup_generic_array_ifaces): Fix a warning.
12070 2006-09-04 Miguel de Icaza <miguel@novell.com>
12072 * Temporarily remove the patch to assemly.c that checks the
12073 assembly versions as it breaks our gacutil.
12075 2006-09-03 Zoltan Varga <vargaz@gmail.com>
12077 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
12079 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
12082 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
12083 created using the default ctor. Fixes #79152.
12084 (mono_string_builder_to_utf16): Ditto.
12086 2006-09-01 Martin Baulig <martin@ximian.com>
12088 Fix handling of the generic array interfaces.
12090 * class-internals.h
12091 (MonoDefaults): Removed `generic_array_class' and added
12092 `generic_ilist' class.
12095 (mono_bounded_array_class_get): Add the new generic array interfaces.
12096 (setup_generic_array_ifaces): New static method; create vtable
12097 entries for each method in the generic array interfaces.
12100 (select_container): Allow "parent-less" generic methods.
12103 (mono_marshal_get_generic_array_helper): New public method.
12106 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
12107 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
12108 moved the interncall into System.Array.
12110 2006-09-01 Raja R Harinath <rharinath@novell.com>
12112 A few more cases of avoiding work on types with ->byref set.
12113 Has the real fix for #79238
12114 * icall.c (is_generic_parameter): New helper.
12115 (ves_icall_Type_GetGenericParameterPosition): Use it.
12116 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
12117 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
12118 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
12119 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
12121 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
12123 (ves_icall_Type_get_IsGenericInstance): Likewise.
12124 (ves_icall_Type_get_IsGenericType): Likewise.
12126 2006-09-01 Zoltan Varga <vargaz@gmail.com>
12128 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
12131 * mempool.h (mono_mempool_get_allocated): New helper function.
12133 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
12136 * mempool.c: Fix warnings and the calculation of stats.
12138 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
12140 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
12142 * loader.c (mono_get_method_from_token): Update method_count stat.
12144 * class-internals.h (MonoStats): Add some stats.
12146 2006-08-31 Robert Jordan <robertj@gmx.net>
12148 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
12149 with managed variants.
12150 All code is contributed under the MIT/X11 license.
12152 2006-08-31 Zoltan Varga <vargaz@gmail.com>
12154 * reflection.c (reflection_methodbuilder_to_mono_method): Set
12155 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
12157 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
12159 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
12160 with cycles in classes.
12162 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
12164 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
12165 missing a [MarshalAs] directive. Fixes #79203.
12167 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
12168 klass->marshal_info. Fixes #79217.
12170 2006-08-30 Martin Baulig <martin@ximian.com>
12172 Committing a patch from Joachim Ante <joe@otee.dk>:
12173 Add support for binary data symbol stores.
12175 * debug-mono-symfile.c
12176 (mono_debug_open_mono_symbol_file): Renamed into
12177 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
12181 (mono_debug_open_image): Added `raw_contents' and `size' args.
12182 (mono_debug_init_2_memory): New public function.
12184 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
12186 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
12188 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12190 * appdomain.c: implement support for ShadowCopyFiles.
12192 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
12194 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
12195 when value is NULL (and should remove CID #51).
12197 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12199 * image.c: moved 2 functions to ../utils.
12201 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
12203 * gc.c: cope with the target object of a GC handle being NULL
12206 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
12208 * class.c: recursively check parent's explicit implementations
12209 of interface methods (fixes bug #79125).
12211 2006-08-19 Miguel de Icaza <miguel@novell.com>
12213 * filewatcher.c: Avoid warnings when building, do not redefine
12214 constants that are defined.
12218 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12220 * image.c: don't fail when the link points to an absolute path.
12222 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
12224 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
12227 2006-08-17 Miguel de Icaza <miguel@novell.com>
12229 * image.c (full_path): A new method used to obtain the actual path
12230 of an assembly even in the presence of symbolic links.
12232 This is necessary for the case where we are running a binary that
12233 has been GACed, but we are using the "published" path name
12234 ($prefix/mono/1.0/blah.exe) which happens to point to the real
12237 This was the source of the failure for the `xsp' command with the
12238 recent AppDomain changes, as far as the runtime was concerned,
12239 there were two different assemblies: $prefix/mono/1.0/blah.exe and
12240 $prefix/mono/gac/blah/version/blah.exe.
12242 (do_mono_image_open): use full path
12244 2006-08-17 Zoltan Varga <vargaz@gmail.com>
12246 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
12248 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
12250 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
12251 domain_id is supplied. Fix CID #241 and corlib's unit tests.
12253 2006-08-17 Zoltan Varga <vargaz@gmail.com>
12255 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
12256 small structures. Fixes #78990.
12258 2006-08-17 Zoltan Varga <vargaz@gmail.com>
12260 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
12262 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
12264 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12267 * marshal.c: don't load all the assemblies from a domain into newly
12268 created ones. The new domains might have different rules and load
12269 assemblies from different locations. Fixes bug #76757.
12271 Patch by Lluis. Conflicts resolved by Brian Crowell.
12273 2006-08-16 Alp Toker <alp@atoker.com>
12275 * socket-io.c: First half of the fix for #79084.
12276 Set sa_size to the length of the content, not that of the struct.
12277 Don't add NULL suffix to the content, this should be done in
12278 managed code if needed.
12280 2006-08-14 Raja R Harinath <rharinath@novell.com>
12283 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
12284 mono_metadata_parse_type returns NULL.
12286 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
12288 * normalization-tables.h : new file for string normalization data.
12289 * locales.c, locales.h, icall.c :
12290 added load_normalization_resource() for string normalization,
12292 * Makefile.am : added normalization-tables.h to the sources.
12294 2006-08-13 Zoltan Varga <vargaz@gmail.com>
12296 * marshal.c: Add more helper functions to reduce code duplication and use them
12299 2006-08-12 Zoltan Varga <vargaz@gmail.com>
12301 * marshal.c: Fix non-x86 stdcall warnings.
12303 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
12306 2006-08-11 Jonathan Chambers <joncham@gmail.com>
12308 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
12309 type check on multi-dimensional arrays. Fixes #79000.
12311 2006-08-10 Jonathan Chambers <joncham@gmail.com>
12313 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
12314 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
12315 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
12316 * class-internals.h: add is_com_object to class structure.
12317 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
12318 null checks to COM object marshalling. Fix .ctor call on RCW.
12319 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
12321 All code is contributed under the MIT/X11 license.
12323 2006-08-09 Dick Porter <dick@ximian.com>
12325 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
12326 racing mono_monitor_allocator_lock() somewhere, so don't delete
12327 the critical section for now. Found by running and exiting
12330 2006-08-10 Zoltan Varga <vargaz@gmail.com>
12332 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
12333 (ves_icall_System_ComObject_FindInterface): Ditto.
12334 (ves_icall_System_ComObject_CacheInterface): Ditto.
12336 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
12337 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
12339 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12341 * threadpool.c: treat pipes from process asynchronous reads as sockets
12342 when reading from them, so we get select/poll or epoll to wait for
12345 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
12347 * loader.c: Fix a typo (CID #233) in the null check.
12349 2006-08-07 Zoltan Varga <vargaz@gmail.com>
12351 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
12352 Hopefully fixes #78949.
12354 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
12355 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
12356 bytes. Fixes #78972.
12358 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12360 * filewatcher.c: we need to set errno here.
12362 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12364 * filewatcher.c: let Win32Exception get the error value.
12366 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12368 * filewatcher.c: translate errno into win32 errors for Win32Exception
12369 to know what happened.
12371 2006-08-01 Zoltan Varga <vargaz@gmail.com>
12373 * threadpool.c: Fix more warnings.
12375 * assembly.c (search_loaded): Fix warnings.
12377 * threadpool.c (mono_thread_pool_finish): Fix warnings.
12378 (mono_async_invoke): Ditto.
12380 2006-07-28 Jonathan Chambers <joncham@gmail.com>
12382 * object.c (mono_remote_class_vtable): Need to create proxy vtable
12383 entries for __ComObject type in addition to ComImport types.
12384 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
12387 All code is contributed under the MIT/X11 license.
12389 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
12391 * image.c: avoid tentative loading of modulerefs that contain
12392 no metadata (P/Invoke library names).
12394 2006-07-28 Dick Porter <dick@ximian.com>
12396 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
12397 mono_loader_lock() somewhere, so don't delete the critical section
12398 for now. Found by running and exiting monodevelop.
12400 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12402 * filewatcher.c: define the inotify syscalls when we're building on
12403 linux and have sys/syscall.h. The build system might not have support
12404 for inotify but the target system might have it.
12406 2006-07-26 Miguel de Icaza <miguel@novell.com>
12408 * domain.c: Documentation updates.
12410 * loader.c (mono_free_method): Do not release the method
12411 information if we are being profiled, as profilers will use this
12412 information at shut down to present some data to the user.
12414 This is needed so that the profiler does not crash, as the
12415 profiler tends to keep MonoMethods around, and they might become
12416 invalid if we free these.
12418 (mono_get_method_constrained): Return the original CIL stream
12419 method as well, so verification can be performed against it.
12421 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12423 * filewatcher.[ch]: support for inotify file system watcher.
12424 * icall.c: add new internal calls for the inotify file system watcher.
12426 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12428 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
12431 2006-07-20 Dick Porter <dick@ximian.com>
12433 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
12436 2006-07-20 Dick Porter <dick@ximian.com>
12438 * threads.c (start_wrapper): Do the thread cleanup while we still
12439 hold a reference to its object. Fixes bug 78123.
12441 2006-07-18 Kornél Pál <kornelpal@gmail.com>
12443 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
12444 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
12445 "managed-to-managed".
12446 * icall.c: Redirect string constructors that take sbyte* to
12447 ves_icall_System_String_ctor_RedirectToCreateString.
12448 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
12449 to CreateString () methods with matching signature.
12450 * reflection.c: Use original security informations for
12451 MONO_WRAPPER_MANAGED_TO_MANAGED.
12452 * security-manager.c: Use original security informations for
12453 MONO_WRAPPER_MANAGED_TO_MANAGED.
12454 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
12455 that is a placeholder and only its address should be used.
12456 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
12457 that is a placeholder and only its address should be used.
12459 2006-07-15 Jonathan Chambers <joncham@gmail.com>
12461 Begin implementing COM Interop.
12462 * appdomain.c: Increment corlib version.
12463 * class.c: Set ComImport classes' parent to __ComObject.
12464 * loader.c: Mark cominterop methods as such.
12465 * domain.c: Add __ComObject class to MonoDefaults structure.
12466 * image.c: Add 2 hashtables to the image for COM Interop related methods
12467 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
12468 using the mempool allocator
12470 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
12471 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
12472 declaration for mono_metadata_type_dup_mp.
12474 * debug-helpers.c: Added strings for two additional wrapper types
12475 * object.c: Create proxy objects for ComImport classes
12476 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
12477 and added __ComObject class to MonoDefaults structure.
12479 * object-internals.h: Finish MonoRealProxy definition, and add definition of
12480 MonoComInteropProxy and MonoComObject.
12482 * marshal.c: Added support for COM Interop
12483 (signature_cominterop): Converts managed signature to corresponding
12484 unmanaged COM signature.
12485 (cominterop_get_function_pointer): gets unmanaged function pointer via
12487 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
12488 (cominterop_get_method_interface): returns interface type that method is defined on
12489 (mono_mb_emit_cominterop_call): emits native call to function pointer
12491 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
12492 that matches signature of unmanaged function.
12493 (cominterop_get_native_wrapper): wrapper around adjusted method call.
12494 (cominterop_get_invoke): forwards call from proxy to __ComObject
12495 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
12496 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
12497 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
12499 * marshal.h: Added Marshal icall declarations.
12500 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
12501 so we can access them in finalizer
12503 2006-07-14 Dick Porter <dick@ximian.com>
12505 * object.c (mono_type_initialization_cleanup): Fix a race
12506 condition by temporarily commenting out the critical section
12509 2006-07-14 Zoltan Varga <vargaz@gmail.com>
12511 * reflection.c (create_custom_attr): Fix some warnings.
12512 (create_custom_attr_data): Ditto.
12513 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
12514 types. Fixes #78855.
12516 2006-07-11 Zoltan Varga <vargaz@gmail.com>
12518 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
12520 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
12522 2006-07-08 Zoltan Varga <vargaz@gmail.com>
12524 * reflection.c (resolve_object): Add support for DynamicMethod.
12526 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
12527 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
12529 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
12531 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
12532 don't leak GPtrArray's pdata has we have no use (nor free) for it.
12534 2006-07-01 Zoltan Varga <vargaz@gmail.com>
12536 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
12539 2006-06-30 Raja R Harinath <rharinath@novell.com>
12541 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
12542 slightly: remove a shadow local variable.
12544 2006-06-29 Raja R Harinath <rharinath@novell.com>
12546 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
12547 definition that introduces the virtual function slot.
12548 Also fix Coverity #105.
12550 2006-06-29 Zoltan Varga <vargaz@gmail.com>
12552 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
12553 for dynamic assemblies. Fixes #78724.
12555 2006-06-28 Zoltan Varga <vargaz@gmail.com>
12557 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
12560 2006-06-21 Martin Baulig <martin@ximian.com>
12563 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
12566 2006-06-21 Zoltan Varga <vargaz@gmail.com>
12568 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
12570 2006-06-20 Raja R Harinath <rharinath@novell.com>
12572 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
12574 * class.c (mono_class_create_from_typespec): Add 'context' argument.
12575 Inflate result if necessary.
12576 (mono_class_get_full): Remove old version. Rename from
12577 'mono_class_get' and add 'context' argument. Pass it to
12578 ..._create_from_typespec.
12579 (mono_class_get): New. Simple wrapper to mono_class_get_full.
12580 (mono_ldtoken): Revert change below.
12582 2006-06-20 Martin Baulig <martin@ximian.com>
12584 * class.c (mono_ldtoken): Don't pass the generic context to
12585 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
12587 2006-06-15 Zoltan Varga <vargaz@gmail.com>
12589 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
12590 and later freeing it. Fixes #78638.
12592 2006-06-15 Miguel de Icaza <miguel@novell.com>
12594 * icall.c (mono_class_get_throw): Revert over-zealous error
12595 throwing, the caller for mono_class_get_throw will cope with
12596 errors when classes are not properly initialized already.
12598 The code still copes with loader exceptions though.
12600 Fixes the regression in reftype1 and reftype3 from the CAS tests.
12602 2006-06-14 Miguel de Icaza <miguel@novell.com>
12604 Fixes the `make run1' version of RuntimeAbort (to be commited,
12605 source is in Bugzilla).
12607 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
12608 FALSE on class loading failure instead of returning true.
12610 * class.c (mono_class_create_from_typedef): It is possible for
12611 mono_metadata_interfaces_from_typedef_full to fail if a class is
12612 not found, cope with this.
12615 2006-06-14 Dick Porter <dick@ximian.com>
12618 * process.c: Fix a bunch of signed/unsigned warnings from gcc
12621 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
12623 * culture-info-table.h : oops, forgot to make it nsync with r61548.
12625 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
12627 * icall.c: Another fix for building mono in Visual Studio.
12629 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
12631 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
12633 2006-06-09 Martin Baulig <martin@ximian.com>
12635 * debug-mono-symfile.c: Put this back and really fix it this
12636 time. Sorry for all the trouble.
12638 2006-06-08 Zoltan Varga <vargaz@gmail.com>
12640 * icall.c (mono_class_get_throw): Fix a warning.
12641 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
12642 ReflectionTypeLoadException if needed. Fixes #78606.
12644 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
12645 (mono_class_init): Ditto.
12647 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
12648 ref_only exceptions.
12649 (mono_loader_clear_error): Make this work even if there is no error.
12651 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
12653 * object-internals.h marshal.c marshal.h icall.c: Implement method
12654 Marshal.GetComSlotForMethodInfo using internal call.
12656 2006-06-07 Zoltan Varga <vargaz@gmail.com>
12658 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
12659 a function for signalling it.
12661 * class.c (mono_class_from_typeref): Use the new kind of loader error when
12662 a referenced assembly is not found.
12664 * loader.c (mono_loader_error_prepare_exception): Add support for
12665 LOADER_ERROR_ASSEMBLY. Fix formatting.
12667 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
12669 * domain.c appdomain.c class-internals.h marshal.c: Add support
12670 for VARIANT marshalling on windows and increment corlib version
12671 since Variant struct was added.
12673 2006-06-03 Miguel de Icaza <miguel@novell.com>
12675 * debug-mono-symfile.c: Revert Martin's previous patch which broke
12676 stack trace line information:
12678 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
12679 (Martin) when looking up B which is between A and C, return A not C.
12683 Thanks to Alexander Olk for tracking this down.
12685 2006-06-02 Zoltan Varga <vargaz@gmail.com>
12687 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
12689 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
12690 avoid clobbering its value.
12691 (mono_string_to_lpstr): Fix a warning on windows.
12693 2006-05-31 Zoltan Varga <vargaz@gmail.com>
12695 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
12697 * reflection.c loader.c: Removed references to 'dummy' flag.
12699 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
12701 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
12702 it gets GC tracking.
12704 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
12707 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
12709 * marshal.c threadpool.c: Update callers of mono_async_result_new.
12711 * appdomain.c: Bump corlib version.
12713 2006-05-30 Zoltan Varga <vargaz@gmail.com>
12715 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
12716 CEE_STIND_REF when working with object references.
12718 2006-05-31 Zoltan Varga <vargaz@gmail.com>
12720 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
12723 2006-05-30 Miguel de Icaza <miguel@novell.com>
12725 * loader.c (method_from_memberref): Fix argument value for
12726 mono_loader_set_error_method_load (I was passing the MonoClass
12727 instead of the class name char *).
12729 2006-05-30 Zoltan Varga <vargaz@gmail.com>
12731 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
12732 CEE_STIND_REF when working with object references.
12734 2006-05-30 Martin Baulig <martin@ximian.com>
12736 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
12737 mono_method_full_name() change and replace the ':' with a '.'
12740 2006-05-30 Martin Baulig <martin@ximian.com>
12742 * debug-mono-symfile.c
12743 (mono_debug_symfile_lookup_location): Fix the algorithm:
12744 when looking up B which is between A and C, return A not C.
12746 2006-05-29 Martin Baulig <martin@ximian.com>
12749 (MonoDebugMethodInfo): Make the typedef public.
12750 (MonoDebugSourceLocation): New public struct.
12753 (mono_debug_source_location_from_address): Removed.
12754 (mono_debug_source_location_from_il_offset): Removed.
12755 (mono_debug_il_offset_from_address): Removed.
12756 (mono_debug_address_from_il_offset): Removed.
12757 (mono_debug_lookup_method): New public function.
12758 (mono_debug_lookup_source_location): New public function; replaces
12759 the old mono_debug_source_location_from_*() functions; see the
12760 inline documentation.
12761 (mono_debug_free_source_location): New public function.
12762 (mono_debug_print_stack_frame): New public function; see the
12763 inline documentation.
12765 * debug-mono-symfile.c
12766 (mono_debug_find_source_location): Renamed into
12767 mono_debug_symfile_lookup_location(); only take a
12768 `MonoDebugMethodInfo *' and an `offset' argument; added inline
12770 (mono_debug_find_method): Renamed into
12771 mono_debug_symfile_lookup_method().
12773 2006-05-27 Zoltan Varga <vargaz@gmail.com>
12775 * assembly.c (mono_assembly_open_full): Dont overwrite the status
12776 returned by mono_image_open_full ().
12778 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
12779 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
12782 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
12785 2006-05-27 Miguel de Icaza <miguel@novell.com>
12787 * class.c (mono_class_from_typeref): handle missing images
12788 earlier, deals with bug #78418. Refactor code;
12790 Fix a warning introduced in my previous commit (some stale code
12791 from before I revisited my patch).
12793 * class.c (mono_class_create_from_typedef): On failure, remove the
12794 class from the MonoImage->class_cache as the class is not
12795 initialized; Fixes the leak pointed out by Paolo.
12797 2006-05-25 Dick Porter <dick@ximian.com>
12799 * threads.c (mono_thread_cleanup): Build fix. Comment out the
12800 DeleteCriticalSections until I figure out which one may still be
12801 sometimes locked when mono_thread_cleanup is called.
12803 2006-05-24 Dick Porter <dick@ximian.com>
12805 * threads.c (mono_thread_cleanup): Move the threading cleanup out
12806 of mono_thread_manage and back into its own function, so it can be
12807 called after the finalizer thread has finished.
12809 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
12811 2006-05-24 Zoltan Varga <vargaz@gmail.com>
12813 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
12816 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
12817 with non-blittable elements.
12818 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
12820 2006-05-24 Martin Baulig <martin@ximian.com>
12822 * mono-debug-debugger.h (MonoDebuggerEvent): Added
12823 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
12825 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
12826 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
12827 `mono_debugger_event_handler' to NULL.
12829 2006-05-24 Martin Baulig <martin@ximian.com>
12831 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
12833 2006-05-24 Martin Baulig <martin@ximian.com>
12835 * mono-debug-debugger.h
12836 (mono_debugger_create_notification_function): Added
12837 `MonoCodeManager *' argument.
12839 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
12841 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
12843 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
12845 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
12846 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
12849 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
12851 * icall.c: precise GC support: objects can't be stored in unmanaged
12852 memory anymore, even if they are kept alive by other references: since
12853 they can move the GC needs to be able to always find them.
12855 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
12857 * object.c: precise GC support for static fields. Support
12858 for moving GCs: write barriers and pinned allocation for interned
12861 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
12863 * domain.c, domain-internals.h: precise GC support for the MonoDomain
12866 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
12868 * class.c, gc.c: sgen and precise GC updates.
12870 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
12872 * marshal.h, marshal.c: added write barrier wrapper and precise type
12875 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
12877 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
12880 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
12882 * reflection.c: precise and sgen GC updates.
12884 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
12886 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
12888 2006-05-22 Zoltan Varga <vargaz@gmail.com>
12890 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
12892 2006-05-20 Zoltan Varga <vargaz@gmail.com>
12894 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
12895 MONO_TYPE_OBJECT. Fixes #78462.
12897 2006-05-18 Zoltan Varga <vargaz@gmail.com>
12899 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
12900 and blittable types.
12902 2006-05-17 Miguel de Icaza <miguel@novell.com>
12904 * class.c (mono_class_get_exception_for_failure): Implement parts
12905 of a TODO: if the loader error is set (instead of the class
12906 error), we return a Loader exception that can be properly thrown
12909 This was exposed by some Winforms 2.0 code that I tried to run
12910 (Atsushi pointed me to it).
12912 2006-05-17 Zoltan Varga <vargaz@gmail.com>
12914 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
12915 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
12917 * marshal.c (emit_marshal_vtype): Add limited support for
12918 UnmanagedType.LPStruct. Fixes #78427.
12920 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
12921 Applied a patch from kangaroo to fix #77523.
12923 2006-05-17 Martin Baulig <martin@ximian.com>
12926 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
12927 (debugger_thread_created): Removed.
12928 (debugger_thread_exited): Removed.
12930 2006-05-15 Zoltan Varga <vargaz@gmail.com>
12932 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12934 * object-internals.h (MonoReflectionResource): Sync with managed version.
12936 2006-05-12 Wade Berrier <wberrier@novell.com>
12938 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
12940 2006-05-12 Zoltan Varga <vargaz@gmail.com>
12942 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
12943 functions try to allocate from the image mempool.
12945 2006-05-12 Dick Porter <dick@ximian.com>
12947 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
12949 2006-05-12 Lluis Sanchez <lluis@ximian.com>
12951 * object.c: The FieldGetter and FieldSetter methods require the full
12952 name of the class, not only the name. Fixes bug #78277.
12954 2006-05-11 Miguel de Icaza <miguel@novell.com>
12956 * loader.c (method_from_memberref): Do not pass the NULL klass to
12957 mono_loader_set_error_() methods. Pass the non-NULL value
12960 2006-05-11 Zoltan Varga <vargaz@gmail.com>
12962 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
12963 (mono_assembly_close): Null out assembly->image->references after freeing it.
12965 * image.c (mono_image_close): Free image->references.
12967 * reflection.c (mono_image_basic_init): Fix a small memory leak.
12969 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
12971 * marshal.c: In function mono_mb_add_local don't use the mb pointer
12972 before checking if it's NULL (g_assert).
12974 2006-05-10 Martin Baulig <martin@ximian.com>
12976 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
12977 I thought I already killed that two months ago, but now it somehow reappeared.
12979 2006-05-10 Martin Baulig <martin@ximian.com>
12981 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
12983 2006-05-10 Zoltan Varga <vargaz@gmail.com>
12985 * reflection.c: Allocate memory for dynamically created methods in the image
12988 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
12990 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
12991 don't use the ad pointer before checking if it's NULL (g_assert).
12993 2006-05-09 Zoltan Varga <vargaz@gmail.com>
12995 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
12996 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
12998 * marshal.c: Allocate all signatures from mempools.
13000 * marshal.c: Allocate some more signatures from mempools.
13002 2006-05-09 Miguel de Icaza <miguel@novell.com>
13004 * object.c (mono_load_remote_field): The code used to provide a
13005 temporary variable for returning results if the user did not
13006 provide a result pointer. But our temporary variable was allocted
13009 Fix calling code to always pass a result area. Coverity ID 103.
13011 2006-05-06 Zoltan Varga <vargaz@gmail.com>
13013 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
13014 value, not the old. Fixes #78312.
13015 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
13017 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
13018 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
13021 * assembly.c (mono_assembly_close): Free image->references.
13023 * assembly.c (mono_assembly_names_equal): Fix a warning.
13024 (mono_assemblies_cleanup): Cleanup more global data.
13026 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
13028 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
13029 ptr_cache and image->modules.
13031 * image.c (mono_image_init): Allocate array_cache lazily.
13033 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13035 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
13036 behavior was changed recently and has bad side effects.
13038 2006-05-05 Zoltan Varga <vargaz@gmail.com>
13040 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
13042 * assembly.c (mono_assembly_close): Remove a debug printf.
13044 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
13046 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
13047 to also allow for temporary references between mono_image_open ()/close ().
13049 * domain.c (get_runtimes_from_exe): Add a FIXME.
13051 2006-05-04 Zoltan Varga <vargaz@gmail.com>
13053 * marshal.c: Fix support for dynamic methods.
13055 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
13057 * marshal.c (mono_marshal_cleanup): New cleanup function.
13059 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
13062 * class.c (mono_class_init): Fix leaking class->nested_classes.
13064 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
13066 * image.c (mono_image_init): Initialize the new cashes.
13068 * image.c (mono_image_close): Destroy the new cashes.
13070 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
13072 * mempool.c (mono_mempool_strdup): New helper function.
13074 * class-internals.h: Add prototype for mono_loader_unlock ().
13076 * domain.c (mono_jit_info_table_find): Fix a warning.
13077 (mono_debugger_check_runtime_version): Ditto.
13079 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
13080 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
13081 functions to these modules.
13083 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
13086 * marshal.c (mono_free_bstr): Fix a warning.
13088 * assembly.c (mono_assembly_open_full): Fix another small leak.
13090 * object.c: Fix some unload leaks in the remoting code.
13092 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
13095 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
13097 * reflection.c: Fix some unload leaks in dynamic assemblies.
13099 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
13101 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
13102 * marshal.h: Add BSTR support on Win32
13103 * icall.c: Add BSTR icalls
13104 * metadata.h: Add BSTR enums
13106 2006-04-28 Miguel de Icaza <miguel@novell.com>
13108 Work to catch the crash from #76795 and turn it into an
13109 exception. As I stubbed out pieces of the VisualBasic support,
13110 I found a number of places where the code was failing and I added
13111 checks to those places.
13113 * metadata.c (do_mono_metadata_parse_generic_class): Make this
13114 function return a status code. If we fail to parse the signature
13115 from mono_metadata_parse_generic_inst, return FALSE.
13117 * loader.c (mono_get_method_from_token): If we fail to load the
13118 method (mono_class_get) return NULL.
13120 * (method_from_memberref): Return NULL if we are unable to parse
13121 the method signature
13123 (mono_loader_error_prepare_exception): Since we now use the
13124 loader_error flag internally to stop processing, and obtaining
13125 exceptions that might be thrown will walk this code path the
13126 proper way of going from a MonoLoaderError into a
13127 MonoException was convoluted. This new routine encapsulates the
13128 process of turning the error into an exception and *clearing* the
13131 2006-04-27 Miguel de Icaza <miguel@novell.com>
13133 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
13134 with missing assemblies), and to cope with:
13136 * Missing fieldref from a non-existing assembly.
13137 * Missing methodref from a non-existing assembly.
13139 The first batch of work to address *some* of the issues from 76661.
13141 * object.c (mono_class_create_runtime_vtable): If we fail to
13142 initialize the class raise the exception here.
13144 * metadata.c (mono_class_get_overrides_full): If any methods fail
13145 to load return the failure to the caller.
13147 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
13148 flagging assemblies that failed to load.
13150 Do not crash if we are unable to load the assembly.
13152 (mono_assembly_close): Do nothing with REFERENCE_MISSING
13155 * loader.c (mono_loader_set_error_type_load): Change the
13156 convention to always pass unallocated strings, so we make our own
13157 copies (I know our own code had duplicated strings before, but
13158 this keeps the normal conventions).
13159 (method_from_memberref): Call mono_loader_set_error_method_load
13160 for all possible failures of loading the class.
13161 Remove assert, turn into a loader error.
13163 (mono_loader_error_to_exception): Move this routine from mini
13164 (mini_loader_error_to_exception) there was no need to have that in
13167 * class.c (mono_class_from_typeref): If we were not able to load
13168 the assembly with mono_assembly_load_reference, call the
13169 mono_loader_set_error_type_load to register the problem.
13171 (mono_class_setup_fields): If we fail to load the type from
13172 mono_metadata_parse_type_full, call mono_class_set_failure and
13173 break from the loop.
13175 If class->exception_type is set, we do not layout the fields as
13176 that might crash the runtime, and instead return (from breaking
13177 from the previous loop).
13179 (mono_class_setup_vtable): This now returns a boolean indicating
13180 whether the table was properly setup. The decision is driven by
13181 mono_class_get_overrides_full which might run into non-existing
13184 (mono_class_init): Returns TRUE on success or FALSE if there was a
13185 problem in loading the type (incorrect assemblies, missing
13186 assemblies, methods, etc).
13188 When we call mono_class_setup_fields we also check for a potential
13189 error inside this call (either a class exception or a general
13192 (mono_class_create_from_typedef): If the parent fails to load
13193 (calling mono_class_get_full) return NULL.
13197 calls to mono_metadata_parse_type_full should be checked
13198 everywhere and set the mono_class_set_failure
13199 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
13201 The current patch checks the places where my manually constructed
13202 tests show the errors are showing up, but we should do it
13207 mono_class_init return values should be tested everywhere, like
13208 the previous case this is something that we should audit
13209 everywhere and not only on the cases exposed by the tests I
13212 2006-04-26 Miguel de Icaza <miguel@novell.com>
13214 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
13215 boolean parameter and instead pass the information on `options'
13216 parameter (FileOptions).
13218 * icall.c: Register the new signature for MonoIO.Open.
13220 * debug-helpers.c (dis_one): Trying to understand how coverity
13221 works. Fix Run 5, item 78.
13223 2006-04-26 Dick Porter <dick@ximian.com>
13225 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
13228 2006-04-25 Martin Baulig <martin@ximian.com>
13230 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
13232 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
13233 debugger_thread_created().
13234 (debugger_gc_push_all_stacks): Don't handle the main thread in any
13236 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
13237 (mono_debugger_finalize_threads): New function; undo the effects
13238 of mono_debugger_init_threads().
13239 (mono_debugger_create_all_threads): Removed.
13241 2006-04-24 Zoltan Varga <vargaz@gmail.com>
13243 * image.c (mono_image_close): Tidy up trace messages.
13245 * assembly.c (mono_assembly_close): Ditto.
13247 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
13248 no longer references an already freed assembly. Fixes #78168.
13250 2006-04-21 Dick Porter <dick@ximian.com>
13252 * threads.c (mono_thread_detach): Fix reference counting when
13255 2006-04-21 Zoltan Varga <vargaz@gmail.com>
13257 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
13260 2006-04-19 Zoltan Varga <vargaz@gmail.com>
13262 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
13263 (mono_type_to_stind): Ditto.
13265 * marshal.c: Use the new helper functions to simplify code.
13267 * image.c (mono_image_close): Add some code for help debug assembly unloading
13270 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
13273 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
13274 assembly was already loaded in another appdomain. Fixes #78083.
13276 2006-04-13 Zoltan Varga <vargaz@gmail.com>
13278 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
13279 referenced assemblies.
13280 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
13282 * domain.c (mono_domain_free): Add a trace message.
13284 * appdomain.c (add_assemblies_to_domain): Ditto.
13286 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
13289 2006-04-12 Zoltan Varga <vargaz@gmail.com>
13291 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
13293 2006-04-12 Martin Baulig <martin@ximian.com>
13295 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
13296 `USE_INCLUDED_LIBGC'.
13298 2006-04-12 Zoltan Varga <vargaz@gmail.com>
13300 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
13301 the patch contains ../ and a small directory name later. Hopefully fixes
13304 2006-04-10 Martin Baulig <martin@ximian.com>
13306 Clean up the debugger's thread-handling code.
13308 The debugger's thread-handling code has been moved from
13309 ../mini/debug-debugger.c to threads.c. We now iterate directly
13310 over the `threads' hash, keep track of exiting threads and also
13311 use proper locking.
13313 We can now debug XSP and XSP based applications with the debugger.
13315 * object-internals.h (MonoThread): Added `gpointer end_stack'.
13318 (MonoThreadCallbacks): Removed; this was only used by the debugger.
13319 (mono_install_thread_callbacks): Likewise.
13321 * threads.c (mono_thread_callbacks): Removed.
13322 (debugger_thread_created, debugger_thread_exited): New static functions.
13323 (start_wrapper): Call debugger_thread_created().
13324 (thread_cleanup): Call debugger_thread_exited().
13325 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
13326 (mono_debugger_init_threads): New public function.
13327 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
13328 iterate directly over the `threads' hash and also use proper locking.
13330 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
13332 * mono-debug-debugger.h
13333 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
13335 2006-04-10 Zoltan Varga <vargaz@gmail.com>
13337 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
13338 argument type=array. Fixes #78057.
13340 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
13342 * culture-info-table.h : regenerated. Fixed bug #69652.
13344 2006-04-07 Zoltan Varga <vargaz@gmail.com>
13346 * loader.c metadata.c: Reapply a variant r59116.
13348 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
13350 * class.c (mono_class_setup_interface_offsets): New internal function.
13352 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
13353 interfaces too. Fixes #77398.
13355 * reflection.c (encode_cattr_value): Add support for
13356 parameter type=object, argument type=array.
13357 (load_cattr_value): Ditto. Fixes #77916.
13359 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
13360 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
13362 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
13363 a byval char array and CharSet is Ansi.
13365 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
13367 2006-04-06 Zoltan Varga <vargaz@gmail.com>
13369 * metadata.c: Add some locking comments.
13371 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
13373 (mono_metadata_free_method_signature): Don't free the signature itself.
13375 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
13377 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
13378 reference the same MonoImage.
13379 (mono_assembly_load_from_full): Add an assert.
13381 2006-04-05 Zoltan Varga <vargaz@gmail.com>
13383 * image.c (mono_image_close): Don't put the image we are about to free into the
13384 loaded_images_guid_hash.
13386 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
13387 to reduce code duplication.
13389 * marshal.c: Register the native functions called by this module as icalls, to
13390 somewhat centralize the creation of MonoMethodSignature's.
13392 * loader.c (mono_method_signature): Add a cache for method signatures.
13394 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
13395 the parameter attributes of a method.
13396 (mono_metadata_parse_method_signature_full): Refactored the computation of
13397 parameter attributes into a separate function. Also avoid one allocation in
13400 * assembly.c (mono_assembly_close): Ditto.
13402 * image.c (mono_image_close): Log trace messages with INFO level.
13404 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
13406 * image.c reflection.c: Correct reference counting of image modules.
13408 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
13409 of this function from the image mempool.
13411 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
13412 to allow more cached types to be used.
13414 * mono-debug.c (mono_debug_add_method): Appled patch from
13415 David S. Miller <davem@sunset.davemloft.net>: Access
13416 minfo->lexical_blocks[] entry elements using read32().
13418 2006-04-04 Zoltan Varga <vargaz@gmail.com>
13420 * loader.c (mono_free_method): No longer free the method header for non-dynamic
13421 methods as it is allocated from the mempool.
13423 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
13426 * metadata-internals.h: Add comments describing the reference counting scheme
13427 used for MonoImage and MonoAssembly.
13429 * image.c assembly.c reflection.c: Rework reference counting of images and
13430 assemblies so they are freed when the runtime is shut down. Free some
13431 additional memory structures when an image is unloaded.
13433 2006-04-03 Zoltan Varga <vargaz@gmail.com>
13435 * class.c loader.c reflection.c: Allocate more data structures in
13438 2006-03-31 Miguel de Icaza <miguel@novell.com>
13441 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
13442 build on pre glib 2.4 systems.
13444 2006-03-31 Zoltan Varga <vargaz@gmail.com>
13446 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
13448 * icall.c: Fix some warnings.
13450 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
13452 * culture-info-table.h : regenerated.
13454 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
13456 * threads.c, object-internals.h, verify.c: changed the culture caching
13457 code to use a normal MonoArray for storage so the GC can keep track of
13458 them easily. Fixed bits of the cache logic, too and simplified the
13461 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
13463 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
13464 thread for non-Boehm GCs.
13466 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
13468 * domain.c, object.c, domain-internals.h: reduce the amount of memory
13469 needed to keep track of the data for static fields.
13471 2006-03-29 Raja R Harinath <rharinath@novell.com>
13474 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
13475 for interface classes. Use 'num_methods' instead.
13476 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
13477 before using '->vtable_size' field.
13479 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13481 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
13482 doesn't contain managed pointers, so use a normal hashtable.
13484 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
13486 * reflection.c, class-internals.h, domain.c: fixed handling of types
13487 used as values for objects in custom attributes (bug #77915):
13489 2006-03-24 Martin Baulig <martin@ximian.com>
13491 * class.c (mono_class_setup_fields): Added support for generic
13492 instances; fixes #77580.
13494 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13496 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
13498 2006-03-24 Dick Porter <dick@ximian.com>
13500 * file-io.c (get_file_attributes): More stat macro breakage.
13503 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
13505 * profiler.c: added the file=filename option in the default profiler
13506 to output the profile data to filename.
13508 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13510 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
13513 2006-03-22 Martin Baulig <martin@ximian.com>
13515 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
13516 allocated `MonoClassField *' in `fb->handle'.
13518 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13520 * class.c, image.c, metadata-internals.h: implemented new mechanism to
13521 allocate interface ID to save memory and allow better ID reuse on
13522 appdomain unload. setup_generic_vtable () removal from Martin.
13524 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
13526 * object.h, appdomain.c, domain.c, exception.c, icall.c,
13527 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
13528 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
13529 write barriers for reference stores with managed objects accessed with
13530 C structures in the runtime and in embedding programs.
13532 2006-03-20 Raja R Harinath <rharinath@novell.com>
13534 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
13535 'interface_id' and 'max_interface_id' fields of MonoClasses
13536 representing open generic types.
13538 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
13540 * object.h, object.c, icall.c: added functions to deal with
13541 storing valuetypes that contain references in managed objects.
13542 * reflection.c, string-icalls.c, threads.c, marshal.c: small
13543 fixes and comments around uses of mono_array_addr ().
13545 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
13547 * object.h, icall.c, monitor.c: object.GetHashCode ()
13548 implementation that supports the moving garbage collector.
13550 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
13552 * icall.c, threads-types.h, threads.c: implemented finalizer for
13553 LocalDataStoreSlot.
13555 2006-03-15 Zoltan Varga <vargaz@gmail.com>
13557 * metadata.c (mono_type_size): Add a fixme.
13558 (mono_type_stack_size): Ditto.
13560 * object-internals.h (MonoReflectionAssemblyBuilder): Added
13561 'type_forwarders' field.
13563 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
13564 attribute from net 2.0.
13566 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
13569 * class.c (mono_class_setup_fields): Fix a warning.
13571 * class.c (mono_class_from_name): Add support for assemblyref entries
13572 in the EXPORTEDTYPE table.
13574 * reflection.c: Add support for handling type forwarders under net 2.0.
13576 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13578 2006-03-14 Zoltan Varga <vargaz@gmail.com>
13580 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
13581 overwriting entries in ModuleBuild->types, also clean up the code
13582 a little. Fixes #77774.
13584 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
13586 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
13587 load friend assembly info when present.
13589 2006-03-14 Raja R Harinath <rharinath@novell.com>
13591 Fix crasher on gtest-158.cs.
13592 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
13593 the return value if the MonoClass we want is yet in an
13594 inconsistent state.
13595 * class.c (mono_class_create_from_typedef): Add an comment
13596 explaining an order dependency between mono_class_setup_parent and
13597 mono_class_setup_mono_type.
13599 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
13601 * class.c: documentation updates and events bug fix.
13603 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
13605 * class.c: some cleanup, locking fixes.
13607 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
13609 * class.c: fix the generics code to setup nested
13610 type info to the instantiated type (bug #77770).
13612 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
13614 * marshal.c: fixed a few type correctness issues.
13616 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13618 * loader.c: the Set/Get/Addrtess array methods should be public.
13620 2006-03-11 Zoltan Varga <vargaz@gmail.com>
13622 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
13624 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
13627 2006-03-10 Zoltan Varga <vargaz@gmail.com>
13629 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
13631 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
13633 * mempool.c (mono_mempool_alloc): Speed this up a bit.
13634 (mono_mempool_alloc0): Ditto.
13636 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13639 (create_object_from_sockaddr): it was allocating 4 extra bytes
13640 for the AF_UNIX data. Fixes bug #77747.
13642 2006-03-09 Zoltan Varga <vargaz@gmail.com>
13644 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
13646 2006-03-09 Dick Porter <dick@ximian.com>
13648 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
13649 Fixes bug 76966 again.
13651 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
13653 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
13655 * appdomain.c: Bumped corlib version to 48 (due to r57532)
13657 2006-03-07 Martin Baulig <martin@ximian.com>
13660 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
13662 2006-03-07 Martin Baulig <martin@ximian.com>
13665 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
13666 regression introduced in r56970; see gtest-252.cs.
13668 * loader.c (mono_get_method_constrained): Correctly handle generic
13669 methods; see gtest-253.cs.
13671 2006-03-04 Zoltan Varga <vargaz@gmail.com>
13673 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
13675 2006-03-04 Martin Baulig <martin@ximian.com>
13677 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
13678 compute the parent type at runtime, just like we're already doing
13682 (mono_reflection_bind_generic_parameters): Don't compute the
13683 parent type anymore.
13685 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
13687 2006-03-04 Martin Baulig <martin@ximian.com>
13689 * mono-debug-debugger.h
13690 (mono_debugger_create_notification_function): Allocate memory at
13691 runtime and return a pointer to it.
13693 2006-03-03 Zoltan Varga <vargaz@gmail.com>
13695 * assembly.c: Fix windows build.
13697 * assembly.c: Fix build.
13699 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
13701 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
13703 2006-03-03 Dick Porter <dick@ximian.com>
13706 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
13707 Check parameters before dereferencing them. Fixes Aaron's part of
13710 2006-03-03 Raja R Harinath <rharinath@novell.com>
13712 Fix performance regression.
13713 * loader.c (find_method_in_class): Add 'from_class' argument.
13714 Rename 'klass' argument to 'in_class'. The signature is compared
13715 against the method in 'in_class', and the corresponding method is
13716 returned from 'from_class'.
13717 (find_method): Walk both 'in_class' and 'from_class' in parallel.
13718 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
13719 type definition and generic instantiation in parallel.
13720 (mono_get_method_constrained): Update to changes.
13722 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
13724 * threads.c: make sure the domain is correct, too when doing
13725 mono_thread_attach ().
13727 2006-03-01 Zoltan Varga <vargaz@gmail.com>
13729 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
13730 windows. Fixes #77683.
13732 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
13734 * object.h, *: introduced specific way to set elements of an array
13735 of references to be used as write barrier. Still need to audit the
13736 uses of mono_array_addr.
13738 2006-03-01 Miguel de Icaza <miguel@novell.com>
13740 * object-internals.h: New field to cache the assmebly name, patch
13741 from Tambet Ingo (tambet@ximian.com)
13743 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
13745 * decimal.h, class-internals.h, metadata-internals.h,
13746 file-io.h: mark a few function declarations as internal, to
13747 reduce the number of PLT entries.
13749 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13751 * file-io.c: fix typo in warning message.
13753 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
13755 * loader.c: on unix, lookup the "*A" version of a function
13756 if charset is auto as a second option before failing.
13758 2006-02-28 Raja R Harinath <rharinath@novell.com>
13760 * class.h (mono_class_inflate_generic_method): Revert to two
13762 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
13763 (mono_class_inflate_generic_method_full): Add.
13764 * class.c (mono_class_inflate_generic_method_full): Rename from
13765 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
13766 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
13767 * loader.c, reflection.c: Update to changes.
13769 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
13771 * icall.c: const fixes and small improvements.
13773 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13775 * threadpool.c: for asynchronous connect(), enable the same workaround
13776 for BSD 6 as for the Mac. Fixes bug #77637.
13778 2006-02-24 Zoltan Varga <vargaz@gmail.com>
13780 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
13781 formatted classes. Fixes #77524.
13783 2006-02-24 Raja R Harinath <rharinath@novell.com>
13785 * class.c (inflate_generic_type): Add a couple more
13786 micro-optimizations.
13787 (inflate_generic_context): Don't use the 'gmethod' from
13789 (mono_class_inflate_generic_method): If the method has generic
13790 parameters, but the passed-in context doesn't have a 'gmethod',
13791 create one. Use the possibly simplified generic instantiation
13792 from the declaring class instead of the one passed in.
13794 2006-02-24 Raja R Harinath <harinath@gmail.com>
13796 Make generic method signature and method header handling lazy.
13797 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
13798 (inflate_generic_header): Likewise.
13799 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
13800 parameter to avoid inflating types.
13801 (mono_get_inflated_method): Empty out.
13802 * class.h (mono_class_inflate_generic_method): Update to changes.
13803 * loader.c (mono_get_method_from_token): Don't parse signature for
13804 generic methods, nor methods of generic classes.
13805 (mono_method_signature): Rename from 'mono_method_signature'.
13806 Inflate signature on demand.
13807 (mono_method_get_header): Inflate method header on demand.
13808 * reflection.c: Update to changes.
13810 2006-02-23 Raja R Harinath <rharinath@novell.com>
13812 * metadata.c (mono_metadata_inflate_generic_inst): If the
13813 instantiation is closed, don't bother expanding it in the new
13815 * class.c (inflate_generic_class): If the generic instantiation
13816 doesn't change after inflation, return the argument itself.
13817 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
13819 (inflate_generic_context): If neither the generic class nor the
13820 generic method instantiations change, return the original context.
13821 * reflection.c (mono_method_get_object): Do
13822 'mono_get_inflated_method' before accessing the ->klass field.
13823 (inflate_mono_method): Don't create a MonoGenericMethod unless
13825 (inflate_method): Don't pass a constructed type as the declaring
13826 type of a methodbuilder.
13828 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
13830 * object.c: fix memory overwrite.
13832 2006-02-22 Dick Porter <dick@ximian.com>
13834 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
13835 it doesn't work any more.
13836 (mono_threads_request_thread_dump): Fix unused variable warnings.
13838 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13840 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
13841 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
13842 the public header file.
13844 2006-02-21 Zoltan Varga <vargaz@gmail.com>
13846 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
13848 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
13850 * class-internals.h, object.c: reduce the size of MonoVTable
13851 and store the interface_offsets array at negative offsets.
13853 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
13855 * metadata.c: tweak table descriptors data structures to reduce
13856 size and runtime relocations.
13858 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13860 * marshal.c: fix some types and opcodes to be type-safe
13861 in marshaling wrappers.
13863 2006-02-21 Ankit Jain <jankit@novell.com>
13865 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
13867 2006-02-21 Raja R Harinath <rharinath@novell.com>
13869 * metadata.c (get_constraints): Relax debugging checks for monodis.
13871 2006-02-21 Ankit Jain <jankit@novell.com>
13873 * metadata.c (mono_metadata_load_generic_params): Move the code
13874 checking for ambiguous generic params from here to mono/dis/get.c
13875 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
13877 2006-02-21 Raja R Harinath <harinath@gmail.com>
13879 Fix assertion triggered when compiling nemerle.
13880 * class.c (mono_get_shared_generic_inst): Rename from
13881 get_shared_inst and make non-static.
13882 * loader.c (mono_get_shared_generic_method): New. Used to create
13883 the MonoGenericContext-equivalent of a MonoGenericContainer.
13884 (mono_get_method_from_token): Initialize the 'context' field of
13885 the created MonoGenericContainer.
13886 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
13887 * metadata.c (get_constraints): Add sanity check.
13888 * class-internals.h: Add new internal methods.
13890 * reflection.c (verify_safe_for_managed_space): New sanity check.
13891 Currently checks that owner-less generic parameters aren't allowed
13893 (mono_type_get_object): Use it.
13894 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
13895 that are now in mono_type_get_object.
13896 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
13898 2006-02-19 Raja R Harinath <harinath@gmail.com>
13900 * metadata.c (mono_type_create_from_typespec): Rename from
13901 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
13902 argument and caching of types in the generic container.
13903 (unwrap_arrays, find_generic_param): Remove.
13904 * metadata-internals.h: Update.
13905 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
13907 2006-02-18 Zoltan Varga <vargaz@gmail.com>
13909 * class.c (mono_class_get_exception_for_failure): Fix a warning.
13911 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
13912 return values. Fixes #77581.
13914 * class.c (mono_fnptr_class_get): Switch name and name_space.
13916 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
13917 classes and add support for [In, Out] attributes.
13918 (mono_marshal_free_asany): Ditto. Fixes #77524.
13920 2006-02-18 Raja R Harinath <harinath@gmail.com>
13922 * class.c (mono_class_from_generic_parameter): Make more robust to
13923 incomplete MonoGenericContainers from monodis.
13925 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13927 * class-internals.h: added some more exception types.
13928 * class.c, metadata.c: added a few checks to handle missing
13931 2006-02-17 Raja R Harinath <rharinath@novell.com>
13933 Use owner-less generic-params some more.
13934 * class.c (my_mono_class_from_generic_parameter): Remove.
13935 (mono_class_from_generic_parameter): Handle null image,
13936 param->name and param->owner.
13937 (mono_class_from_mono_type): Update.
13938 (mono_class_create_from_typespec): Remove 'container' parameter.
13939 If that parameter is non-null, the result is always inflated by
13940 'mono_class_get_full' anyway.
13941 (mono_class_get): Rename from _mono_class_get. Remove 'container'
13943 (mono_class_get_full): Update.
13945 * class.c (inflate_generic_type) [GENERICINST]: If the generic
13946 instance is not open, don't bother inflating.
13947 (mono_class_setup_fields): Hoist some loop-invariants. Don't
13948 parse metadata for inflated classes.
13949 (_mono_class_get): Change GenericContext* parameter to
13951 (mono_class_create_from_typespec): Likewise. Simplify, and
13952 implement trivially. All the cases are handled in
13953 mono_class_from_mono_type. Don't inflate returned class.
13954 (mono_class_get_full): Delegate GENERICINST optimization to
13955 inflate_generic_type.
13956 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
13958 2006-02-16 Dick Porter <dick@ximian.com>
13960 * socket-io.c (create_object_from_sockaddr): Fix typo.
13961 (create_sockaddr_from_object): Check array lengths before
13962 potentially accessing items off the end.
13963 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
13964 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
13965 (ves_icall_System_Net_Sockets_Socket_Send_internal)
13966 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
13967 length checks to avoid wraparound overflows.
13968 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
13969 contents of the array of sockets
13970 (hostent_to_IPHostEntry2)
13971 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
13972 Check return value of inet_ntop ().
13973 (addrinfo_to_IPHostEntry): Fix typo
13975 2006-02-16 Raja R Harinath <rharinath@novell.com>
13977 Type metadata parsing doesn't use generic-instantiation information.
13978 * metadata.c (mono_metadata_parse_array_full): Change
13979 MonoGenericContext* parameter to MonoGenericContainer*.
13980 (mono_metadata_parse_type_full): Likewise.
13981 (mono_type_create_from_typespec_full): Likewise.
13982 (mono_metadata_parse_mh_full): Likewise.
13983 (mono_metadata_parse_generic_inst): Likewise.
13984 (do_mono_metadata_parse_generic_class): Likewise.
13985 (do_mono_metadata_parse_type): Likewise.
13986 * metadata-internals.h: Update to changes.
13987 * class.c (mono_class_find_enum_basetype): Likewise.
13988 (mono_class_setup_fields): Likewise.
13989 (mono_class_create_from_typespec): Likewise.
13990 * loader.c (method_from_methodspec): Likewise.
13991 (mono_get_method_from_token): Likewise.
13992 (mono_method_get_header): Likewise.
13994 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13996 * marshal.c: handle additional GENERICINST case (patch from
13997 Thong Nguyen <tum@veridicus.com>).
13998 Fix a few cases where LDIND_I/STIND_I was used for references.
14000 2006-02-16 Raja R Harinath <rharinath@novell.com>
14002 * reflection.c (mono_reflection_get_token): Remove unused variable.
14004 2006-02-16 Martin Baulig <martin@ximian.com>
14006 * reflection.c (mono_reflection_get_token): Add support for fields
14007 in instantiated generic types.
14010 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
14012 2006-02-15 Martin Baulig <martin@ximian.com>
14015 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
14016 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
14017 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
14018 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
14020 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
14022 * class.c, metadata.c, metadata.h, object.c, icall.c,
14023 marshal.c: changed mono_type_get_underlying_type () to do
14024 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
14025 Fixed handling of instantiated generic valuetypes (bug #75479).
14027 2006-02-15 Raja R Harinath <rharinath@novell.com>
14029 * metadata.c (mono_metadata_decode_signed_value): Simplify.
14030 Delegate to mono_metadata_decode_value, and work on the returned value.
14032 * icall.c (ves_icall_MonoType_GetGenericArguments):
14033 Add consistency check here too.
14035 2006-02-15 Ankit Jain <jankit@novell.com>
14037 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
14040 2006-02-15 Ankit Jain <jankit@novell.com>
14042 * metadata.c (mono_metadata_decode_signed_value): New function to decode
14043 signed values, used only for representing lower bounds of arrays.
14044 (mono_metadata_parse_array_full): Use new
14045 mono_metadata_decode_signed_value to decode lower bounds.
14047 2006-02-14 Martin Baulig <martin@ximian.com>
14050 (mono_reflection_get_token): Support "MonoGenericMethod" and
14051 "MonoGenericCMethod" and allow generic instances / methods.
14053 2006-02-11 Zoltan Varga <vargaz@gmail.com>
14055 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
14056 to obtain the terminal size using an ioctl.
14058 * object.c (mono_nullable_init): Revert this as nullable reference
14059 types are not valid.
14060 (mono_nullable_box): Ditto.
14062 2006-02-09 Dick Porter <dick@ximian.com>
14064 * threads.c (mono_thread_detach): Drop a reference to the thread
14067 2006-02-09 Zoltan Varga <vargaz@gmail.com>
14069 * object.c (mono_nullable_init): Handle nullable reference types.
14070 (mono_nullable_box): Ditto. Fixes #77446.
14072 2006-02-07 Martin Baulig <martin@ximian.com>
14074 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
14076 2006-02-07 Ankit Jain <jankit@novell.com>
14078 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
14079 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
14080 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
14081 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
14082 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
14083 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
14085 2006-02-02 Zoltan Varga <vargaz@gmail.com>
14087 * class.c (mono_class_create_generic): Set type_token as well.
14089 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
14090 compatible with MS.
14092 2006-02-02 Martin Baulig <martin@ximian.com>
14094 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
14095 has never been used so far.
14097 2006-02-02 Martin Baulig <martin@ximian.com>
14099 * mono-debug-debugger.h: Changed comment at the top of this file;
14100 the header is not installed, but it's safe to #include it from
14103 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
14104 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
14106 2006-02-02 Martin Baulig <martin@ximian.com>
14109 (MonoSymbolTable): Removed the `metadata_info' field.
14112 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
14114 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
14115 (mono_debugger_add_builtin_types): Removed.
14116 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
14117 (mono_debugger_create_notification_function): We now operate on a
14118 pre-allocated area; take a `gpointer' and return `void'.
14120 * mono-debug-debugger.c
14121 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
14122 (mono_debugger_add_builtin_types): Removed.
14124 2006-02-02 Martin Baulig <martin@ximian.com>
14126 * threads.c (mono_debugger_create_all_threads): New public method.
14128 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
14130 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
14131 breaks on several platforms.
14133 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
14135 * assembly.c: the VS.NET build doesn't supply default values for
14136 MONO_ASSEMBLIES and MONO_CFG_DIR.
14138 2006-02-01 Zoltan Varga <vargaz@gmail.com>
14140 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
14143 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
14145 * loader.c (method_from_memberref): Fix a warning.
14147 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
14149 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
14150 with explicit layout. Fixes #77433.
14152 2006-01-31 Zoltan Varga <vargaz@gmail.com>
14154 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
14155 max_interface_id is initialized before using it. Fixes #77398.
14156 (ves_icall_Type_GetInterfaces): Ditto.
14158 2006-01-30 Raja R Harinath <rharinath@novell.com>
14160 * metadata.c (mono_metadata_parse_method_signature_full): Don't
14161 allocate memory for parameter attributes when parsing memberref
14163 * loader.c (mono_loader_set_error_method_load): Don't warn.
14164 (method_from_memberref): Ensure MissingMethodException gets thrown
14165 if method is not found. Make warning more informative.
14167 2006-01-29 Raja R Harinath <harinath@gmail.com>
14170 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
14171 return true if is byref.
14172 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
14173 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
14174 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
14176 2006-01-27 Raja R Harinath <rharinath@novell.com>
14178 Fix tests/find-method.2.il
14179 * loader.c (find_method, find_method_in_class): Remove is_inflated
14180 argument. Revert 2006-01-18 change.
14181 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
14182 is generic, search for method in its generic definition.
14183 * class.c (mono_class_setup_vtable_general): Print generic
14184 arguments of generic types in debugging printf.
14186 2006-01-26 Zoltan Varga <vargaz@gmail.com>
14188 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
14190 * threads.c (mono_threads_request_thread_dump): New helper function.
14192 2006-01-25 Raja R Harinath <rharinath@novell.com>
14194 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
14196 2006-01-25 Ankit Jain <jankit@novell.com>
14198 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
14199 move definition to ..
14200 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
14202 2006-01-25 Ankit Jain <jankit@novell.com>
14203 Raja R Harinath <rharinath@novell.com>
14205 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
14206 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
14209 2006-01-25 Martin Baulig <martin@ximian.com>
14211 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
14212 `MonoDebuggerThread' into debug-debugger.c.
14214 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
14216 * profiler.c: fix printing of data.
14218 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
14220 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
14221 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
14223 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14225 * object.c: fix deadlock related to string interning.
14227 2006-01-23 Martin Baulig <martin@ximian.com>
14229 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
14231 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
14233 2006-01-23 Martin Baulig <martin@ximian.com>
14235 * mono-debug.h: Moved the prototypes of some functions which are
14236 used by the JIT here from mono-debug-debugger.h.
14238 2006-01-21 Martin Baulig <martin@ximian.com>
14240 * Makefile.am: Don't install mono-debug-debugger.h.
14242 2006-01-21 Martin Baulig <martin@ximian.com>
14244 * mono-debug-debugger.h: Enforce the private status of this header
14245 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
14246 Moved some stuff from mono-debugger-jit-wrapper.h here.
14248 2006-01-20 Raja R Harinath <rharinath@novell.com>
14250 * class.c (mono_class_from_typeref): Add a sanity test to help
14251 catch lack of assembly load/search hooks.
14253 2006-01-19 Zoltan Varga <vargaz@gmail.com>
14255 * marshal.c (emit_struct_conv): Relax the fields with same offset
14256 check even more. Fixes #77230.
14258 2006-01-18 Martin Baulig <martin@ximian.com>
14260 * loader.c (find_method_in_class): Added `gboolean is_inflated'
14261 argument; if false, we compare the uninstantiated signatures.
14262 (method_from_memberref): Compare the uninstantiated signatures;
14265 2006-01-18 Robert Jordan <robertj@gmx.net>
14267 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
14268 Clear the weak link. Fixes bug #77170.
14270 * gc.c (mono_gchandle_free):
14271 Reflect *-gc.c changes (tiny optimization).
14273 2006-01-18 Zoltan Varga <vargaz@gmail.com>
14275 * metadata.c (mono_metadata_signature_dup): Applied patch from
14276 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
14279 2006-01-17 Zoltan Varga <vargaz@gmail.com>
14281 * marshal.c (emit_struct_conv): Allow fields with the same offset when
14282 marshalling from native to managed code. Fixes #77230.
14284 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14286 * threadpool.c: fix problem (Mac only) when more than one asynchronous
14287 connect. Fixes bug #77020.
14289 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
14291 * class.c: fixed id assignement for nested interfaces (bug #77275).
14292 Added also better info for --print-vtable debugging.
14294 2006-01-12 Martin Baulig <martin@ximian.com>
14296 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
14297 interfaces on-the-fly; fixes #76625.
14299 * class-internals.h
14300 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
14301 don't need that anymore.
14303 2006-01-12 Miguel de Icaza <miguel@novell.com>
14306 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
14307 To avoid initing the nested_classes when not needed I turned the
14308 PeerCredData as a toplevel internal class, as it has to be shared
14311 Fixes the CASA issue.
14313 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
14315 * domain.c: Accessors for MonoJitInfo
14317 * profiler-private.h: Add jitinfo to the end jit hook
14319 * profiler.[ch]: Define new hooks, called after jitting which give
14320 the MonoJitInfo that was compiled
14322 2006-01-10 Martin Baulig <martin@ximian.com>
14324 * class.c (mono_class_setup_events): Add support for generic
14325 classes; fixes #76440.
14327 2006-01-06 Raja R Harinath <rharinath@novell.com>
14330 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
14331 on passed-in method.
14333 2006-01-03 Zoltan Varga <vargaz@gmail.com>
14335 * object.c (mono_runtime_invoke_array): Add Nullable support.
14337 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
14339 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
14341 * file-io.c: Don't consider sockets as directory and avoid an endless
14342 loop. Fix bug #76966.
14344 2006-01-03 Zoltan Varga <vargaz@gmail.com>
14346 * object.c (mono_nullable_init): New helper function.
14347 (mono_nullable_box): Ditto.
14349 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
14351 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
14353 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
14355 2006-01-02 Zoltan Varga <vargaz@gmail.com>
14357 * class.c (mono_class_is_assignable_from): Make T assignable to
14360 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
14362 * appdomain.c: Bump corlib version to 46.
14363 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
14364 serialization purpose) and changed ves_icall_System_Reflection_
14365 Assembly_get_code_base signature to accept a boolean (to escape, or
14366 not, the assembly code base).
14368 2005-12-23 Dick Porter <dick@ximian.com>
14372 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
14373 CreateEvent icall now returns "created" boolean parameter.
14375 2005-12-22 Zoltan Varga <vargaz@gmail.com>
14377 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
14380 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
14381 when attr_klass is an interface. Fixes #77045.
14383 2005-12-20 Zoltan Varga <vargaz@gmail.com>
14385 * marshal.c (emit_struct_conv): Fix previous patch.
14387 * marshal.c (emit_struct_conv): Add a check for fields with the same
14390 2005-12-20 Raja R Harinath <rharinath@novell.com>
14392 Fix regression in Mono.C5.
14393 * class.c (mono_class_create_generic): If 'klass' is an interface
14394 set up the interface offsets.
14395 (mono_class_is_assignable_from): Don't throw away generic arguments.
14397 2005-12-19 Raja R Harinath <rharinath@novell.com>
14399 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
14402 2005-12-15 Raja R Harinath <rharinath@novell.com>
14404 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
14406 (do_mono_metadata_parse_generic_class): Don't pass the current
14407 generic context when parsing the type being instantiated: it
14408 cannot use it, anyway.
14410 * loader.c (method_from_memberref): Don't inflate a signature if
14411 it doesn't contain any type parameters.
14413 2005-12-15 Zoltan Varga <vargaz@gmail.com>
14415 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
14417 2005-12-14 Martin Baulig <martin@ximian.com>
14420 (mono_type_get_name_recurse): Don't return null for type
14421 parameters and open generic classes.
14422 (mono_class_setup_methods): Don't exclude generic instances.
14423 (mono_get_unique_iid): Use different IDs for different
14424 instantiations of the same generic type.
14425 (mono_class_setup_vtable): Only use setup_generic_vtable() for
14426 open generic instances; create a normal vtable for closed generic
14428 (mono_class_setup_vtable_general): We're now also called for
14429 closed generic instances.
14432 (mono_reflection_bind_generic_parameters): Correctly use
14433 mono_metadata_lookup_generic_inst() everywhere.
14435 2005-12-14 Zoltan Varga <vargaz@gmail.com>
14437 * object.c (mono_class_create_runtime_vtable): Call
14438 mono_class_setup_vtable ().
14440 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
14442 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
14445 * loader.c (mono_loader_set_error_type_load): Print the type load
14446 warnings to the console so they are more visible to the user.
14447 (mono_loader_set_error_method_load): Ditto.
14449 * reflection.c (ensure_runtime_vtable): Revert the last change as it
14452 * reflection.c (ensure_runtime_vtable): Fix build.
14454 * reflection.c (ensure_runtime_vtable): Disable an optimization which
14455 doesn't work in all cases.
14457 2005-12-13 Zoltan Varga <vargaz@gmail.com>
14459 * object.c (mono_array_new_full): Treat a single dimensional array
14460 with 0 lower bounds as an szarray. Fixes #76973.
14462 * reflection.c (custom_attr_visible): Really fix this.
14464 2005-12-12 Zoltan Varga <vargaz@gmail.com>
14466 * reflection.c (custom_attr_visible): Allow nested public attributes
14469 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
14472 2005-12-12 Raja R Harinath <harinath@gmail.com>
14474 * class.c (set_generic_param_owner): Delete.
14475 (mono_class_create_from_typedef): Don't set ->owner field of
14476 generic parameters to "param containers" of enclosing classes.
14477 * reflection.c (mono_reflection_initialize_generic_parameter):
14480 2005-12-11 Zoltan Varga <vargaz@gmail.com>
14482 * reflection.c (custom_attr_visible): Fix build.
14484 2005-12-10 Zoltan Varga <vargaz@gmail.com>
14486 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
14487 private attributes.
14489 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
14490 handling of null parameter defaults.
14492 2005-12-09 Raja R Harinath <rharinath@novell.com>
14494 * class.c (mono_class_from_generic_parameter): Don't set
14495 klass->generic_container.
14496 (my_mono_class_from_generic_parameter): Likewise.
14498 2005-12-07 Zoltan Varga <vargaz@gmail.com>
14500 * reflection.c (load_public_key): Fix a warning.
14501 (method_encode_code): Fix unaligned accesses.
14503 2005-12-07 Martin Baulig <martin@ximian.com>
14505 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
14508 (write_generic_param_entry): Encode our custom attrs.
14510 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
14512 2005-12-07 Martin Baulig <martin@ximian.com>
14514 * reflection.c (encode_new_constraint): Removed; we don't use the
14515 `NewConstraintAttribute' anymore.
14517 2005-12-06 Zoltan Varga <vargaz@gmail.com>
14519 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
14520 not fire a TypeResolve event when Assembly.GetType () is called.
14522 2005-12-05 Ben Maurer <bmaurer@ximian.com>
14524 Beginning of support for nullable types in the runtime. Parts of
14525 this patch are from Martin.
14527 * appdomain.c (MONO_CORLIB_VERSION): Bump
14529 * domain.c (mono_init_internal): get the nullable type
14531 * class.c (mono_class_is_nullable): New method
14532 (mono_class_get_nullable_param): New mehod
14533 (mono_class_create_generic): In types T? set cast_class to T
14535 * class-internals.h (MonoDefaults): new nullable default class
14536 (mono_class_get_nullable_param, mono_class_get_nullable_param):
14539 2005-12-05 Raja R Harinath <rharinath@novell.com>
14541 * metadata.c (select_container): New. Refactor code to select the
14542 appropriate GenericContainer given the type of generic parameter
14543 we are looking for.
14544 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
14545 not a MonoGenericContext. Use select_container. Update parameters.
14546 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
14547 and MONO_TYPE_MVAR.
14548 (unwrap_arrays): Remove duplicate tests.
14549 (find_generic_param): Rename from 'has_same_context'. Now walks a
14550 generic instantiated class to find any arguments that are generic
14552 (mono_type_create_from_typespec_full): Use find_generic_param to
14553 avoid evicting some generic instantiations from the typespec
14556 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
14558 * reflection.c: fixed writing of doubles on ARM FPA.
14560 2005-12-02 Robert Jordan <robertj@gmx.net>
14562 * icall.c: Fixed EventInfo.ReflectedType (#76829).
14564 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14566 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
14567 least on SUSE 10 they are not the same (on debian, they are just the
14570 2005-12-01 Raja R Harinath <rharinath@novell.com>
14572 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
14573 DeclaringType for VARs and MVARs.
14574 * class.c (set_generic_param_owner): Fix initialization of owner
14577 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
14579 * icall.c: fixed Enum.ToObject() to correctly convert the values.
14581 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14583 * threadpool.c: workaround for a bug that shows up on the Mac:
14584 select()+connect() on a blocking socket is not like it should
14585 be, so we proceed to connect() in that case, wasting the I/O
14586 threadpool thread until connect succeedes. Fixes bug #75436.
14588 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14590 * threadpool.c: fix typo when setting file descriptor states.
14592 2005-11-28 Raja R Harinath <rharinath@novell.com>
14594 * class-internals.h (MonoGenericContainer.is_signature): Remove.
14595 * metadata.c (mono_metadata_parse_method_signature_full): Don't
14596 create a temporary signature container.
14597 (mono_metadata_parse_generic_param): Update to changes.
14598 (mono_type_create_from_typespec_full): Update to changes.
14599 * loader.c (method_from_memberref): Don't use a
14600 MonoGenericContainer while parsing a memberref signature.
14601 (method_from_methodspec): Remove dead-store of the 'container'
14602 variable. It's overwritten before use.
14604 * metadata.c (mono_type_create_from_typespec_full): Make debugging
14606 (mono_metadata_parse_generic_param): Likewise.
14607 * loader.c (find_method_in_class): Does not need a
14608 MonoGenericContainer. Use 'mono_method_signature' rather than
14609 'mono_method_signature_full'.
14610 (find_method, mono_get_method_constrained, method_from_memberref):
14613 * metadata.c (mono_type_create_from_typespec_full): Ensure that
14614 owner-less generic-parameters are never evicted from the typespec
14617 * loader.c (method_from_memberref): Don't use the current context
14618 when parsing signatures.
14619 (method_from_methodspec, mono_get_method_from_token): Update to changes.
14621 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
14622 side-effects in g_assert.
14623 * loader.c (mono_get_method_from_token): Resolve klass earlier so
14624 that we don't potentially lose information.
14626 2005-11-26 Dick Porter <dick@ximian.com>
14629 * threads.c: icalls to implement basic (ie, not named)
14630 System.Threading.Semaphore.
14632 2005-11-24 Dick Porter <dick@ximian.com>
14635 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
14636 Use GetProcessId() if it's available.
14638 2005-11-23 Zoltan Varga <vargaz@gmail.com>
14640 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
14642 2005-11-23 Raja R Harinath <rharinath@novell.com>
14643 Ankit Jain <jankit@novell.com>
14645 * loader.c (mono_get_method_from_token): Initialize 'method' field
14646 of all generic parameters before parsing the signature. Remove
14647 code that "fixed"-up MVAR references.
14649 2005-11-23 Ankit Jain <jankit@novell.com>
14651 * metadata.c (mono_metadata_has_generic_params):
14652 (mono_metadata_load_generic_param_constraints):
14653 (mono_metadata_load_generic_params): Move duplicate code ...
14654 (mono_metadata_get_generic_param_row): ... here. Returns the
14655 first row-id in GenericParam table for a given owner (token).
14656 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
14659 2005-11-23 Raja R Harinath <rharinath@novell.com>
14660 Ankit Jain <jankit@novell.com>
14662 * metadata.c (mono_metadata_class_equal): Pass signature_only when
14663 comparing VARs too.
14664 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
14665 type->data.generic_param only if the type is an MVAR.
14666 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
14667 leak owner-less VARs and MVARs into managed space.
14669 2005-11-21 Martin Baulig <martin@ximian.com>
14671 * class-internals.h
14672 (MonoMethod): Moved the `generic_container' here from
14673 `MonoMethodNormal' since we now also need it for
14674 `MonoMethodPInvoke';
14675 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
14676 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
14677 an union containing both `MonoMethodNormal' and
14678 `MonoMethodPInvoke'.
14681 (mono_get_method_from_token): Allow implementing generic methods
14685 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
14688 2005-11-17 Dick Porter <dick@ximian.com>
14692 * process.c: Split the Process Start_internal icall into
14693 ShellExecuteEx_internal and CreateProcess_internal, which are
14694 called depending on whether UseShellExecute is true. Fixes bug
14697 * appdomain.c (MONO_CORLIB_VERSION): Incremented
14699 2005-11-17 Zoltan Varga <vargaz@gmail.com>
14701 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
14702 'msize' parameters, use the information in 'mspec' instead.
14703 (emit_object_to_ptr_conv): Ditto.
14705 * marshal.c (emit_struct_conv): Handle explicit layout structs with
14706 fields out of order. Fixes #76733.
14708 2005-11-17 Ankit Jain <jankit@novell.com>
14710 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
14712 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
14714 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
14717 2005-11-16 Zoltan Varga <vargaz@gmail.com>
14719 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
14720 for types with non-auto layout. Fixes #76717.
14722 2005-11-16 Ankit Jain <jankit@novell.com>
14724 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
14725 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
14726 if generic_context is null.
14727 (mono_metadata_generic_param_equal): param->owner can be null.
14728 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
14731 2005-11-16 Zoltan Varga <vargaz@gmail.com>
14733 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
14736 2005-11-15 Martin Baulig <martin@ximian.com>
14738 * object.c (set_value): Use mono_class_from_mono_type() instead of
14739 the hack for generic instances; fixes #76136.
14741 2005-11-15 Zoltan Varga <vargaz@gmail.com>
14743 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
14746 * image.c (load_metadata_ptrs): Initialize the new fields.
14748 * reflection.c (create_dynamic_mono_image): Ditto.
14750 * reflection.c (build_compressed_metadata): Use the new fields.
14752 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
14755 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
14758 2005-11-15 Ankit Jain <jankit@novell.com>
14759 Raja R Harinath <harinath@gmail.com>
14761 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
14762 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
14763 new per-generic_container cache if the cached MonoType's context matches
14764 the current context.
14765 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
14766 to the expected context.
14767 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
14769 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14771 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
14772 we changed the signature of an icall.
14773 * icall.c: Modify to mono_double_ParseImpl return true/false
14774 depending on the success, instead of throwing the exception. This will
14775 help us in Double.TryParse methods.
14777 2005-11-14 Zoltan Varga <vargaz@gmail.com>
14779 * marshal.c (emit_marshal_object): Throw an exception when
14780 marshalling 'object' instead of crashing. Fixes #76696.
14782 2005-11-11 Zoltan Varga <vargaz@gmail.com>
14784 * class-internals.h: Add prototype for mono_type_get_full_name ().
14786 2005-11-11 Dick Porter <dick@ximian.com>
14788 * threads.c (mono_thread_manage): Make sure the main thread has
14789 abandoned all its mutexes when cleaning up. Fixes bug 74680.
14791 2005-11-11 Zoltan Varga <vargaz@gmail.com>
14793 * loader.c (mono_loader_set_error_type_load): Log a warning to the
14794 console about the missing type.
14795 (mono_loader_set_error_method_load): Ditto.
14797 2005-11-09 Miguel de Icaza <miguel@novell.com>
14799 * mono-config.c (mono_get_config_dir): Set the system defaults if
14802 * assembly.c (mono_set_dirs): New API entry point to set the
14803 assembly and the config directory in one call
14805 2005-11-09 Zoltan Varga <vargaz@gmail.com>
14807 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
14808 the ftnptr was created from a delegate in a domain other than the
14809 current domain. Fixes #75377.
14811 * exception.h exception.c: Add mono_get_exception_not_supported ().
14813 2005-11-08 Martin Baulig <martin@ximian.com>
14815 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
14817 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
14819 * security-manager.h: Added definitions to deal with strongname key
14820 pairs bigger (and smaller) than 1024 bits.
14821 * reflection.c: Remove hardcoded strongname size (128 bytes) and
14822 adjust wrt the public key length being used.
14824 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
14826 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
14827 Windows build (r51396-51397).
14829 2005-11-03 Martin Baulig <martin@ximian.com>
14831 * class.c (mono_class_setup_vtable_general): Also add generic
14832 methods to the vtable; fixes #76581.
14834 2005-11-01 Miguel de Icaza <miguel@novell.com>
14836 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
14837 sure that we lookup GetString method from the System.Text.Encoding
14838 class, not the derived class or we get an empty method.
14840 Fixed class #76612.
14842 2005-10-25 Miguel de Icaza <miguel@novell.com>
14844 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
14845 if it has been previously set (embedders).
14847 Make mono_set_rootdir available also on Unix.
14849 005-10-24 Robert Jordan <robertj@gmx.net>
14851 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
14853 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
14855 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
14856 only calls which are made to native code use this flag.
14858 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
14860 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
14862 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
14863 Add support for FieldBuilders.
14865 2005-10-29 Martin Baulig <martin@ximian.com>
14868 (mono_debug_using_mono_debugger): New public method; returns
14869 whether we're running inside the debugger.
14871 2005-10-27 Zoltan Varga <vargaz@gmail.com>
14873 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
14874 for Method/Constructor/FieldBuilders.
14876 2005-10-26 Zoltan Varga <vargaz@gmail.com>
14878 * reflection.c (module_add_cattrs): Save custom attributes for global methods
14879 and fields as well.
14881 2005-10-26 Martin Baulig <martin@ximian.com>
14883 * mono-debug-debugger.c
14884 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
14886 2005-10-24 Raja R Harinath <harinath@gmail.com>
14888 * icall.c (base64_to_byte_array): Don't pass an out-of-range
14889 integer to isspace.
14891 2005-10-21 Zoltan Varga <vargaz@gmail.com>
14893 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
14894 when passing valuetypes byref. Fixes #76502.
14896 2005-10-19 Jackson Harper <jackson@ximian.com>
14898 * profiler.c: Don't put a . in front of types that are not in a
14901 2005-10-18 Zoltan Varga <vargaz@gmail.com>
14903 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
14905 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
14907 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
14909 (mono_marshal_get_ldflda_wrapper): Fix a warning.
14911 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14913 * assembly.c metadata-internals.h icall.c: Define an additional
14914 parameter for mono_assembly_name_parse_full, so we can avoid creating
14915 S.R.AssemblyName.Version when no version info wasn't passed.
14917 2005-10-09 Miguel de Icaza <miguel@novell.com>
14919 * class.c (mono_type_get_full_name): Reimplement method that was
14922 * image.c: Some docs
14924 2005-10-10 Zoltan Varga <vargaz@gmail.com>
14926 * profiler.c (output_newobj_profile): Fix printing of Total memory
14929 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
14931 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
14933 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
14935 * threads.c: remove debug output.
14937 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
14939 * threads.c (mono_thread_manage): Fix crashes if more than 64
14940 threads need to be aborted. Hopefully fixes #75899.
14942 * assembly.c (mono_stringify_assembly_name): New helper function.
14944 * class.c: Use mono_stringify_assembly_name instead of the similar
14947 * assembly.h assembly.c: Add support for calling a postload search
14948 hook if an assembly cannot be loaded.
14950 * appdomain.c: Register new search hooks which call the AssemblyResolve
14951 events in AppDomain. Fixes #75231
14953 2005-10-07 Martin Baulig <martin@ximian.com>
14955 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
14956 methods without debug info.
14958 2005-10-07 Zoltan Varga <vargaz@gmail.com>
14960 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
14963 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14965 * file-io.c: now that we return symlinks, use lstat and, when the file
14966 is a symbolic link, stat, to get the file attributes. Also avoid the
14967 conversion to/from utf16/external.
14969 2005-10-06 Zoltan Varga <vargaz@gmail.com>
14971 * class.c (mono_class_layout_fields): Compute klass->has_references
14972 correctly if an embedded valuetype is not yet initialized. Fixes
14975 2005-10-04 Martin Baulig <martin@ximian.com>
14978 (mono_metadata_load_generic_param_constraints): New public
14979 function; splitted the constraints loading out from
14980 mono_metadata_load_generic_params().
14982 * class.c (mono_class_create_from_typedef): Call
14983 mono_metadata_load_generic_param_constraints() after setting up
14984 the type and creating our parent; fixes #75329.
14986 2005-10-04 Martin Baulig <martin@ximian.com>
14988 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
14989 non-dynamic parent classes.
14991 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
14993 * file-io.c : win32 build fix (ETXTBSY seems not found).
14995 2005-10-04 Martin Baulig <martin@ximian.com>
14998 (mono_image_get_methodspec_token): Make the cache actually work;
15001 2005-10-04 Martin Baulig <martin@ximian.com>
15003 * class.c (mono_class_name_from_token): Removed the unneccessary
15004 `MonoGenericContext *' argument.
15006 2005-10-04 Martin Baulig <martin@ximian.com>
15009 (method_from_methodspec): Make the caching work again; fixes the
15010 performance regression from #76262.
15012 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15016 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
15017 GetFileSystemEntries that performs the same work but without going
15018 into io-layer, locking, etc.
15020 2005-09-30 Zoltan Varga <vargaz@gmail.com>
15022 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
15023 ThreadState_Stopped as well. Fixes #76047.
15025 2005-09-29 Martin Baulig <martin@ximian.com>
15028 (inflate_generic_context): If the new context has a `gmethod', set
15029 its `container' that that gmethod's `container'.
15032 (mono_metadata_parse_generic_param): Simplify things;
15033 `generic_container = generic_context->container;' is just fine.
15035 * loader.c (method_from_methodspec): Code cleanups.
15037 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
15039 * decimal.c: fix warning (and let gcc generate correct
15040 code on ARM with optimizations).
15042 2005-09-28 Martin Baulig <martin@ximian.com>
15045 (method_from_memberref): Added `MonoGenericContext *class_context'
15046 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
15047 (method_from_methodspec): If we're a memberref, use the enclosing
15048 context when parsing its parent. Fixes #76262; see gtest-206.cs.
15050 2005-09-28 Martin Baulig <martin@ximian.com>
15052 * object.c (mono_runtime_invoke_array): Added support for
15053 MONO_TYPE_GENERICINST; fixes #75917.
15055 2005-09-27 Martin Baulig <martin@ximian.com>
15057 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
15058 `k->byval_arg.type' to determine the actual type.
15060 * loader.c (method_from_methodspec): Removed some hacks.
15062 2005-09-27 Ben Maurer <bmaurer@ximian.com>
15064 * class-internals.h (mono_field_is_deleted): Do the test for
15065 rtspecialname before we check the actual name of the field. This
15066 prevents us from dereferencing a pointer into the string table,
15067 saving us from accessing a few pages
15069 * *.c: Replace the use of {Enter,Leave}CriticalSection with
15070 macros. This will allow a deadlock debugger to easily be plugged
15073 2005-09-27 Martin Baulig <martin@ximian.com>
15075 * loader.c (method_from_methodspec): Create a "signature"
15076 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
15078 2005-09-27 Martin Baulig <martin@ximian.com>
15081 (inflate_generic_class): Correctly set the new context's
15085 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
15086 instead of a `MonoGenericContext *'.
15087 (mono_method_signature_full): Take a `MonoGenericContainer *'
15088 instead of a `MonoGenericContext *'.
15091 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
15092 instead of a `MonoGenericContext *'.
15093 (mono_metadata_parse_method_signature_full): Likewise.
15095 2005-09-26 Martin Baulig <martin@ximian.com>
15098 (mono_class_from_generic_parameter): Set `klass->generic_container'
15099 (mono_class_from_generic_parameter): Likewise.
15100 (mono_bounded_array_class_get): We inherit the generic container
15101 from the element class.
15104 (find_method, find_method_in_class): Take a `MonoGenericContext *'
15105 argument rather than computing it here.
15106 (method_from_memberref): Correctly set the generic context before
15107 parsing the signature. Fixes #75681.
15109 2005-09-26 Zoltan Varga <vargaz@gmail.com>
15111 * object.c (mono_class_has_special_static_fields): Fix warnings.
15113 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
15115 * assembly.c: Add parse_public_key function, to
15116 par the public keys. Also added mono_assembly_name_parse_full,
15117 to define it the parsed key should be freed or not.
15118 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
15119 to parse a long format assembly name.
15120 * metadata-internals.h: Keep mono_assembly_name_parse_full as
15121 private, since calling it to preserve the key requires
15122 freeing it manually.
15124 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
15126 * locales.c : removed HAVE_ICU part.
15128 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
15130 * object.c (mono_class_create_runtime_vtable): Avoid calling
15131 field_is_special_static if the klass has no special static fields.
15133 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
15134 (MonoCachedClassInfo): Likewise.
15136 * object.c (mono_class_has_special_static_fields): New helper function.
15138 2005-09-23 Zoltan Varga <vargaz@gmail.com>
15140 * class.c (mono_class_create_from_typedef): Don't call
15141 interfaces_from_typedef_full for enums.
15142 (mono_class_create_from_typedef): Compute the base types of enums directly
15143 without calling mono_class_setup_fields ().
15144 (mono_class_find_enum_basetype): New helper function.
15146 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
15147 one place inside the string heap.
15149 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
15151 * class.c: locking fixes, code cleanups, some docs added.
15152 Allocate some data structures in the image mempool.
15154 2005-09-23 Zoltan Varga <vargaz@gmail.com>
15156 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
15159 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
15161 * class-internals.h, class.c, reflection.c: reduce memory taken by
15164 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
15166 * metadata.c, metadata.h, loader.h: documentation updates, code and
15169 2005-09-23 Zoltan Varga <vargaz@gmail.com>
15171 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
15174 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
15175 page faults caused by the runtime while reading metadata.
15177 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15179 * socket-io.c: the field names were changed 3 months ago and no one
15180 realized until bug #76077 got filed!
15182 2005-09-20 Martin Baulig <martin@ximian.com>
15184 * icall.c (assembly_icalls): Removed some unused debugger icalls.
15186 2005-09-20 Martin Baulig <martin@ximian.com>
15188 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
15189 write the rank into the class entry.
15191 2005-09-20 Martin Baulig <martin@ximian.com>
15193 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
15195 2005-09-19 Zoltan Varga <vargaz@gmail.com>
15197 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15199 * icall.c (custom_attrs_defined_internal): New icall.
15201 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
15203 (mono_custom_attrs_construct_by_type): New helper function.
15205 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
15207 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
15208 terminate the resulting string. Fixes #76123.
15210 2005-09-16 Martin Baulig <martin@ximian.com>
15213 (mono_debug_add_method): Ignore inflated methods for the moment.
15215 2005-09-14 Martin Baulig <martin@ximian.com>
15217 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
15219 2005-09-13 Zoltan Varga <vargaz@gmail.com>
15221 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
15222 return a success/failure indication.
15223 (mono_metadata_interfaces_from_typedef_full): Ditto.
15224 (get_constraints): Ditto.
15226 2005-09-12 Zoltan Varga <vargaz@gmail.com>
15228 * marshal.c (emit_marshal_array): Fix handling of null arrays.
15230 * marshal.c (emit_marshal_array): Add support for returning string
15231 arrays from delegates. Fixes #76063.
15233 * marshal.c: Use the emit_ldloc/stloc macros where possible.
15235 2005-09-11 Zoltan Varga <vargaz@gmail.com>
15237 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
15240 2005-09-09 Zoltan Varga <vargaz@gmail.com>
15242 * reflection.c icall.c: Fix after mono_get_exception_type_load
15245 * assembly.c (mono_assembly_get_assemblyref): New helper function.
15246 (mono_assembly_load_reference): Use the new helper.
15248 * class-internals.h (MonoLoaderError): New structure containing
15249 information about type loading errors.
15251 * class-internals.h loader.c: Add APIs to store per-thread loader
15254 * loader.c class.c: Set the loader error if needed.
15256 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
15258 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
15260 * decimal.c: fixed to handle the broken ARM fp format.
15262 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
15264 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
15267 2005-09-06 Martin Baulig <martin@ximian.com>
15269 * domain.c (supported_runtimes): Added v2.0.50727.
15271 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
15273 * culture-info.h: reduce the size of some structures.
15275 2005-09-05 Martin Baulig <martin@ximian.com>
15277 Reflect latest API changes in the August CTP.
15280 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
15281 ("MonoType.HasGenericArguments"): Removed.
15282 ("MonoMethod.BindGenericParameters"): Renamed to
15283 "MakeGenericMethod".
15284 ("MethodBuilder.BindGenericParameters"): Renamed to
15285 "MakeGenericMethod".
15287 2005-09-05 Martin Baulig <martin@ximian.com>
15289 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
15291 2005-09-05 Martin Baulig <martin@ximian.com>
15293 Applying a patch from Michal Moskal <malekith@nemerle.org>.
15295 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
15296 generic_container is non-NULL.
15298 2005-09-05 Martin Baulig <martin@ximian.com>
15300 Applying a patch from Michal Moskal <malekith@nemerle.org>.
15302 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
15304 2005-08-29 Michal Moskal <malekith@nemerle.org>
15306 * reflection.c (encode_locals,
15307 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
15308 for large generic types.
15310 2005-09-05 Martin Baulig <martin@ximian.com>
15312 Applying a patch from Michal Moskal <malekith@nemerle.org>.
15314 * class.c (mono_dup_array_type): New public method.
15315 (mono_metadata_signature_deep_dup): New public method.
15316 (dup_type): Correctly duplicate array and function types.
15318 2005-09-05 Martin Baulig <martin@ximian.com>
15320 Applying a patch from Michal Moskal <malekith@nemerle.org>.
15322 * reflection.c (get_default_param_value_blobs): Handle generic types
15323 and generic methods.
15325 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
15327 * class.c: Fixed error reporting (method/class were inversed) for
15328 inheritance demands.
15329 * security-manager.c|h: Added the AppDomain when calling the managed
15330 System.Security.SecurityManager.InheritanceDemand method.
15332 2005-09-01 Raja R Harinath <rharinath@novell.com>
15334 * reflection.c (encode_marshal_blob): 'marshaltype' and
15335 'marshaltyperef' are alternate sources for the custom marshaler
15338 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
15340 * class.c: fix creation of array classes with rank == 1
15341 (patch by Ankit Jain <jankit@novell.com>).
15343 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
15345 * object.c: fix check for creating the bound data for arrays vs
15348 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15350 * object.c: configuration file name is now based on the executable name,
15351 not the image name. Fixes bug #75931.
15353 2005-08-29 Zoltan Varga <vargaz@gmail.com>
15355 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
15356 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
15358 2005-08-25 Zoltan Varga <vargaz@gmail.com>
15360 * rand.c: Use wincrypt.h instead of WinCrypt.h.
15362 2005-08-24 Ankit Jain <jankit@novell.com>
15363 Raja R Harinath <rharinath@novell.com>
15365 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
15366 called by it recursively.
15367 (mono_class_init): Remove special case in pending_init handling, since it's
15368 superseded by the fix to mono_class_from_typeref.
15370 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
15372 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
15373 BROKEN_THREAD_START stuff.
15375 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
15377 * class-internals.h object.c: Add a new kind of trampoline called a delegate
15380 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
15382 * object.c (mono_delegate_ctor): Replace the original function address with
15383 a delegate trampoline.
15385 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
15387 * icall.c: add boolean argument to base64_to_byte_array and
15388 InternalFromBase64String to control whether a whitespace-only string
15389 is allowed (or should casue a FormatException to be thrown). We need
15390 this as the behavior has changed between MS.NET 1.x and 2.0, and we
15391 to match the MS behaviour in both profiles.
15392 * appdomain.c: Bump corlib version.
15394 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
15396 This patch implements a big portion of publisher policy
15397 support, used to bind assembly versions and redirect
15398 one assembly from version A to version B.
15401 New GSList loaded_assembly_bindings, for storing the cached
15403 (assembly_binding_maps_name): New static function for checking if a
15404 assembly binding information maps an assembly name.
15405 (mono_assembly_binding_info_free): New function for freeing
15406 assembly binding information resources.
15407 (get_publisher_policy_info): New static function for retrieving
15408 assembly binding information from a MonoImage.
15409 (compare_versions): New static function for comparing an assembly
15410 binding information data and the version of an assembly name.
15411 (check_policy_versions): New static function for checking if an
15412 assembly binding info mapping an assembly name is valid for it.
15413 (mono_assembly_load_publisher_policy): New static function for
15414 loading the 'policy.major.minor.MyAssembly' image for an assembly
15415 with an assembly name 'aname'.
15416 (mono_assembly_bind_version): New static function for updating
15417 assembly redirection.
15418 (mono_assembly_apply_binding): New static function for applying
15420 (search_binding_loaded): New static function for searching
15421 loaded assembly binding infos in the cache domain.
15422 (mono_assembly_load_full): Don't apply assembly binding for
15423 reflection only assemblies.
15425 * metadata-internals.h: Add MonoAssemblyBindingInfo,
15426 which contains information about assembly binding. Also
15427 declare signature for mono_config_parse_publisher_policy ()
15428 function, used to retrieve pub policy info.
15431 (publisher_policy_start): New static function used to parse publisher
15432 policy config files.
15433 (publisher_policy_parser): New static MonoParseHandler containing
15434 the functions used when parsing config files.
15435 (mono_config_parse_publisher_policy): New function for parsing
15436 publisher policy files.
15438 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
15440 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
15442 * marshal.c (mono_delegate_free_ftnptr): Ditto.
15444 * object.c (mono_get_addr_from_ftnptr): New helper function.
15446 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
15448 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15450 2005-08-19 Dick Porter <dick@ximian.com>
15452 * threads.c, threads.h, appdomain.c, appdomain.h,
15453 profiler-private.h, monitor.c, object.c, object-internals.h,
15454 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
15455 store the thread ID, so it can hold a 64 bit value if needed.
15457 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
15459 * reflection.c (mono_reflection_create_dynamic_method): Store the
15460 handle class into the method references as well so ldtoken works in
15463 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
15466 2005-08-19 Ankit Jain <jankit@novell.com>
15469 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
15470 here rather than using the method signature of a arbitrary function
15471 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
15473 Hack done with Harinath.
15475 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15477 * threadpool.c: disable printing stack traces when we get a exception
15478 in a threadpool thread. I need to do more testing to figure out which
15479 cases actually print this. Fixes bug #75828.
15481 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15483 * icall.c: there might be ignored whitespace after the last '='. This
15484 fixes length computation and bug #75840.
15486 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
15488 * assembly.c (mono_assembly_load_full): Consider .exe extension as
15489 well. Fixes #75809.
15491 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
15494 * reflection.c (create_custom_attr_data): Ditto.
15496 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
15498 * locales.c, culture-info.h : removed RegionLCIDMap.
15499 * culture-info-tables.h : regenerated.
15501 2005-08-16 Martin Baulig <martin@ximian.com>
15503 * class.c (mono_type_get_name_recurse): Small fix.
15505 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
15507 * locales.c : indentation fixie.
15509 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
15511 * object-internals.h,
15515 icall.c : added RegionInfo table support.
15516 * culture-info-table.h : regenerated for region support.
15518 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
15520 * reflection.c (resolve_object): handle all kinds of MonoMethod
15521 including generic ones
15523 2005-08-12 Ankit Jain <jankit@novell.com>
15525 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
15526 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
15528 2005-09-12 Lluis Sanchez <lluis@ximian.com>
15530 * process.c: Don't close a thread handle when it's NULL. This is a
15531 workaround for bug #75733.
15533 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
15535 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
15537 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
15539 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
15541 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15543 * threadpool.c: if a work item in the thread pool has a callback that
15544 catches a exception, don't propagate it after invoking the callback.
15547 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
15549 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
15551 * class-internals.h (MonoCachedClassInfo): Add some new fields.
15553 * class.c (mono_class_init): Load field info lazily in the AOT case.
15555 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
15557 2005-08-03 Ankit Jain <jankit@novell.com>
15560 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
15561 PInvoke calling convention is 0.
15563 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
15565 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
15566 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
15568 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
15570 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
15571 to handle threads not started by the GC (patch by Michael Meeks
15572 <michael.meeks@novell.com>).
15574 2005-07-31 Kamil Skalski <nazgul@omega.pl>
15576 * reflection.c: Make buffer used in emitting types larger for some
15577 big generic types (patch by Michal Moskal).
15579 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
15581 * mono-debug.c: Fix some (not all) alignment problems.
15583 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
15585 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
15586 Invoke mono_image_load_from_data_full passing the refonly
15590 (mono_assembly_open_from_bundle): Add the refonly argument,
15591 in order to pass it to other methods it calls to.
15592 (do_mono_assembly_open): Add the refonly argument, in order
15593 to pass it to other methods it calls to.
15594 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
15595 the refonly parameter to it.
15597 * image.c: Add loaded_images_refonly_hash and
15598 loaded_images_refonly_guid_hash to cache the reflection
15599 only loaded images.
15600 (mono_images_init): Initialize the hash tables used for
15601 caching the reflection only images.
15602 (load_modules): Invoke mono_image_open_full passing the refonly
15603 parameter to load the modules the correct way.
15604 (build_guid_table): Add the refonly argument, to re-build the
15605 correct hash table.
15606 (do_mono_image_open): Added the refonly argument, in order to
15607 define it for the loaded image.
15608 (mono_image_loaded_full): New function, which receives an
15609 additional parameter to look for the image in the refonly or
15610 non-refonly section.
15611 (mono_image_loaded): Updated, using mono_image_loaded_full.
15612 (mono_image_loaded_by_guid_full): The same case that happens
15613 with mono_image_loaded_full.
15614 (mono_image_loaded_by_guid): Likewise.
15615 (register_image): Use the ref_only variable inside MonoImage
15616 to decide in which hash table store the current image.
15617 (mono_image_open_from_data_full): Rename
15618 mono_image_open_from_data to mono_image_open_from_data_full,
15619 adding the refonly argument, to define the ref_only variable
15621 (mono_image_open_from_data): Return
15622 mono_image_open_from_data_full.
15623 (mono_image_open_full): Rename mono_image_open to
15624 mono_image_open_full, receiving the new refonly argument,
15625 to pass it to inner methods.
15626 (mono_pe_file_open): Update this function, to open
15627 a MonoImage as a non-refonly image.
15628 (mono_image_close): Use the refonly variable inside
15629 MonoImage to remove the image from the correct caches.
15631 * image.h: Add the signatures of mono_image_open_full,
15632 mono_image_open_from_data_full, mono_image_loaded_full,
15633 mono_image_loaded_by_guid_full.
15635 * metadata-internals.h: Add the ref_only field to
15638 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
15640 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
15641 Fix the last behavior, which used to load the assemblies and
15642 extract MonoReflectionAssemblyName information, instead of
15643 extract it from the metadata tables. Needed for Reflection
15646 2005-07-29 Martin Baulig <martin@ximian.com>
15648 * mono-debug-debugger.c
15649 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
15653 (mono_debug_address_from_il_offset): Check whether we have
15654 debugging support before attempting to take the lock.
15655 (mono_debug_source_location_from_address): Likewise.
15656 (mono_debug_source_location_from_il_offset): Likewise.
15657 (mono_debug_il_offset_from_address): Likewise.
15658 (mono_debug_address_from_il_offset): Likewise.
15660 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
15662 * class.c (mono_class_from_name_case): Add support for dynamic images.
15665 * object.c (mono_class_compute_gc_descriptor): Add a workaround
15668 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
15670 * reflection.c (mono_method_get_object): Fix warning.
15672 2005-07-28 Martin Baulig <martin@ximian.com>
15675 (mono_debug_add_wrapper): Also write the wrapper type.
15677 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
15679 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
15681 * class.c (mono_class_init): Avoid reading nested classes if the AOT
15682 data indicates the class has none.
15684 2005-07-26 Ben Maurer <bmaurer@ximian.com>
15686 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
15687 loader lock with the debugger lock. Prevents deadlocks for beagle.
15689 Beagle can now run on an smp box for a weekend without any
15692 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
15694 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
15695 in a module. Fixes #75629.
15697 2005-07-26 Martin Baulig <martin@ximian.com>
15699 * mono-debug.c (mono_debug_add_wrapper): New static method.
15700 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
15701 interncall or a wrapper.
15703 * mono-debug.h (MonoDebugWrapperData): New public typedef.
15704 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
15705 (MONO_DEBUGGER_VERSION): Bump to 51.
15707 * mono-debug-debugger.c
15708 (mono_debugger_add_type): Removed this empty function.
15709 (mono_debugger_add_method): Likewise.
15711 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
15713 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
15714 before accessing method->slot.
15716 2005-07-21 Jb Evain <jbevain@gmail.com>
15718 * reflection.c (method_encode_clauses/class): Handle filters clauses.
15721 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
15723 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
15726 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
15728 * image.h image.c: Add mono_image_get_guid () API function.
15730 2005-07-19 Ben Maurer <bmaurer@ximian.com>
15732 There were issues when multiple threads tried to load
15733 assemblies. A deadlock was created between assemblies_mutex and
15734 mono_domain_assemblies_lock. This fixes the issue by making the
15735 assembly ref counting be lock free. See bug 75586.
15737 * image.c (mono_image_close): The add ref function here was using
15738 Interlocked operations while the unref was using a mutex and a
15739 --. I don't think this was ever a bug that would be exposed in a
15740 non-pendantic way (ie, by an embedder doing a ref on one thread
15741 and an unref on another), but for the sake of correctness, this is
15744 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
15745 (mono_assembly_load_reference): Call mono_assembly_addref rather
15746 than touching the refcount ourselves.
15747 (mono_assembly_close): Use InterlockedDecrement to unref the
15748 assembly. Don't acquire the lock unless it is actually needed.
15750 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
15752 * class.c (mono_class_layout_fields): Fix calculation of has_references
15755 2005-07-12 Martin Baulig <martin@ximian.com>
15757 Applying a patch from Michal Moskal <malekith@nemerle.org>.
15760 (mono_type_hash): Provide better hashing for generic instances.
15761 (mono_generic_inst_hash): Improve hashing.
15762 (mono_generic_class_hash): Likewise.
15764 * reflection.c (mymono_metadata_type_hash): Improve hashing for
15767 2005-07-12 Martin Baulig <martin@ximian.com>
15769 * reflection.c (mono_reflection_create_runtime_class): Remove the
15770 hack for generic type definitions and non-`Run' assemblies.
15771 (mono_reflection_bind_generic_parameters): Also use
15772 `klass->wastypebuilder' to check for TypeBuilders.
15774 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
15776 * class.c (mono_class_layout_fields): Fix calculation of has_references
15779 * class.c (inflate_generic_class): Fix a leak.
15780 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
15783 2005-07-11 Martin Baulig <martin@ximian.com>
15785 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
15788 2005-07-11 Martin Baulig <martin@ximian.com>
15790 * loader.c (find_method): Also lookup in
15791 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
15793 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
15795 * appdomain.c (mono_domain_unload): Don't free the error message
15796 before passing it to mono_get_exception_...
15798 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
15800 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
15802 * threads.c: try to better guess an available RT signal (bug #75387).
15804 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
15806 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
15809 2005-07-07 Martin Baulig <martin@ximian.com>
15811 * class.c (mono_type_get_name_full): Return NULL for
15812 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
15815 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
15817 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
15818 exit the appdomain as well being aborted.
15820 * threadpool.c: Create all threadpool threads inside the root appdomain, and
15821 change back to the root domain after calling managed code. This enables
15822 appdomains using threadpools to be unloaded.
15824 2005-07-07 Martin Baulig <martin@ximian.com>
15826 * class-internals.h
15827 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
15828 into `MonoDynamicGenericClass' since we only need it for dynamic
15831 * reflection.c (mono_class_bind_generic_parameters): We don't need
15832 to compute the `parent' here.
15834 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
15836 * culture-info-table.h : regenerated.
15838 2005-07-06 Martin Baulig <martin@ximian.com>
15841 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
15843 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
15845 2005-07-06 Martin Baulig <martin@ximian.com>
15847 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
15848 we're doing a signature-only comparision; fixes #74945.
15850 2005-07-06 Martin Baulig <martin@ximian.com>
15852 * class-internals.h (MonoGenericClass): Moved some things out into
15853 a new `MonoInflatedGenericClass' type.
15854 (MonoInflatedGenericClass): New type; the `klass' of a
15855 `MonoGenericClass' is now computed lazyly in
15856 mono_get_inflated_generic_class().
15858 * class.c (mono_get_inflated_generic_class): New public function.
15859 (mono_class_inflate_generic_method): Removed the unused
15860 `MonoClass *' argument.
15861 (setup_generic_vtable): Don't call mono_get_inflated_method() on
15863 (mono_class_create_generic): Make this static and merge it with
15864 mono_class_create_generic_2(); we're now called automatically from
15865 mono_get_inflated_generic_class().
15867 * loader.c (mono_method_signature): Call
15868 mono_get_inflated_method() here.
15870 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
15872 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
15873 type of fields with RVA.
15875 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
15876 for this pseudo class.
15877 (my_mono_class_from_generic_parameter): Likewise.
15878 (mono_class_init): Allow interfaces to have cctors.
15880 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
15882 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
15883 lazily for AOT methods.
15885 2005-07-05 Martin Baulig <martin@ximian.com>
15887 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
15888 returns FALSE for a successful match, not TRUE.
15890 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
15892 * loader.c (mono_method_get_index): Optimize this a bit.
15894 2005-07-04 Martin Baulig <martin@ximian.com>
15897 (class_compute_field_layout): Move the check for generic type
15898 definitions into mono_class_layout_fields(). Fixes #74684.
15899 (mono_class_from_generic_parameter): Correctly compute
15900 `klass->parent'; fixes #75457.
15902 * reflection.c (register_assembly, register_module): Make sure
15903 `domain->rejobject_hash' is already created.
15905 2005-07-02 Martin Baulig <martin@ximian.com>
15907 * class-internals.h
15908 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
15909 `MonoDynamicGenericClass'.
15911 2005-07-01 Lluis Sanchez <lluis@ximian.com>
15913 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
15914 returned by a field getter is null, since null is a valid value.
15916 2005-07-01 Martin Baulig <martin@ximian.com>
15918 * reflection.c (mono_reflection_generic_class_initialize): Update
15919 the `dgclass->fields [i].parent' to the correct class.
15920 (mono_image_get_fieldref_token): Use the declaring type, not the
15923 2005-07-01 Martin Baulig <martin@ximian.com>
15925 * loader.c (find_method): Also look in the interfaces; fixes #75429.
15927 2005-06-30 Ben Maurer <bmaurer@ximian.com>
15929 * threads.c (thread_cleanup): assert that thread != NULL
15930 (wait_for_tids_or_state_change): We were using the wrong variable
15931 when accessing wait->threads. `i' was always out of the bounds of
15934 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15936 * loader.c: map user32 and kernel32 to libMonoSupportW
15938 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
15940 * appdomain.c (unload_thread_main): Mark this as WINAPI.
15942 2005-06-28 Martin Baulig <martin@ximian.com>
15944 * loader.c (method_from_methodspec): Fix #75334.
15946 2005-06-28 Martin Baulig <martin@ximian.com>
15948 Fix #74953 - Arrays now implement the generic IList<T> interface
15949 on the 2.0 platform.
15951 * class-internals.h (MonoDefaults): Added `generic_array_class'.
15953 * reflection.c (mono_class_bind_generic_parameters): New public
15954 function; similar to mono_reflection_bind_generic_parameters(),
15955 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
15957 * domain.c (mono_init_internal): Try to initialize.
15958 `mono_defaults.generic_array_class' here; this'll only succeed if
15959 we're using the 2.0 corlib.
15962 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
15963 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
15964 (mono_lookup_internal_call): Added support for nested classes.
15967 (mono_get_method_from_token): Set `result->signature->pinvoke' if
15968 we're an interncall and have generic arguments.
15971 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
15972 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
15973 instance of System.Array.InternalArray<T> for arrays, so they
15974 implement the generic IList<T> interface.
15976 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
15978 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
15979 (chastamar@yahoo.com). Fixes #75374.
15981 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
15983 * culture-info-table.h: regenerated.
15985 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15987 * icall.c: handle spaces correctly for base64 strings.
15989 2005-06-26 Ben Maurer <bmaurer@ximian.com>
15991 * *.c: Kill some warnings.
15993 2005-06-23 Duncan Mak <duncan@novell.com>
15995 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
15996 that this builds on Solaris 10 (x86).
15998 2005-06-23 Martin Baulig <martin@ximian.com>
16001 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
16002 generic type definitions.
16004 2005-06-23 Martin Baulig <martin@ximian.com>
16008 * metadata.c (mono_class_get_overrides): Renamed to
16009 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
16010 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
16011 pass it to mono_get_method_full().
16013 2005-06-22 Ben Maurer <bmaurer@ximian.com>
16015 * reflection.c (mono_reflection_create_runtime_class): take the
16016 mono_domain_lock in this method. Prevents deadlocks
16018 2005-06-22 Martin Baulig <martin@ximian.com>
16020 * loader.c (method_from_methodspec): Fix #75330.
16022 2005-06-22 Martin Baulig <martin@ximian.com>
16024 * reflection.c (type_get_qualified_name): Use
16025 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
16026 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
16027 argument; use it if we don't have an assembly name.
16029 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
16031 * object.c: In mono_message_init, set "copy out" flag for in
16032 parameters with the [Out] flag.
16034 2005-06-21 Martin Baulig <martin@ximian.com>
16037 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
16040 2005-06-21 Martin Baulig <martin@ximian.com>
16042 * class.c (mono_class_init): Don't initialize `class->fields' for
16043 generic instances since they're initialized again in
16044 compute_field_layout().
16045 (compute_field_layout): Set the field's `generic_info' here; fix
16048 2005-06-21 Martin Baulig <martin@ximian.com>
16050 * class-internals.h
16051 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
16053 * metadata.c (mono_metadata_generic_method_equal): Also
16054 distinguish the `generic_class'; fixes #75334.
16056 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16060 * domain-internals.h:
16061 * reflection.c: 'domain_assemblies' field is now protected by its own
16062 lock. Don't call into managed code to run the AssemblyLoad event if we
16063 now there are no registered delegates for it.
16065 2005-06-20 Martin Baulig <martin@ximian.com>
16067 * class.c (mono_class_is_assignable_from): Use a custom version of
16068 mono_class_has_parent() to make things work for generic instances;
16071 2005-06-20 Martin Baulig <martin@ximian.com>
16073 * loader.c (method_from_methodspec): Apply a patch from
16074 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
16076 2005-06-20 Martin Baulig <martin@ximian.com>
16078 * class.c (mono_class_init): Reverted Zoltan's last change; it
16081 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
16083 * threads.c (wait_for_tids_or_state_change): Add missing locking.
16085 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16087 * socket-io.c: fix the index in the socket array for writable/error
16088 sockets. Fixes bug #75306.
16090 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
16092 * class.c (mono_class_init): Allow interfaces to have static ctors.
16094 2005-06-17 Martin Baulig <martin@ximian.com>
16096 * loader.c (method_from_methodspec): Use `context->container' when
16097 parsing the `gmethod->inst'.
16099 2005-06-17 Martin Baulig <martin@ximian.com>
16101 * class.c (mono_type_get_name_recurse): Don't add the assembly
16102 name for type arguments.
16104 2005-06-15 Martin Baulig <martin@ximian.com>
16106 * reflection.c (mono_image_get_inflated_method_token): Encode
16107 correct klass; fixes #75260.
16109 2005-06-13 Michal Moskal <malekith@nemerle.org>
16111 * icall.c: Make GetCorrespondingMethod/Constructor take
16112 MonoReflectionMethod method not MonoMethod. Removed
16113 MonoType.GetCorrespondingField, and make
16114 MonoGenericType.GetCorrespondingField take name not
16117 2005-06-13 Michal Moskal <malekith@nemerle.org>
16119 * reflection.c (field_encode_signature, encode_locals):
16120 Make sizes of buffers for types larger (for big generic types).
16121 (create_generic_typespec,
16122 mono_reflection_sighelper_get_signature_local,
16123 mono_reflection_sighelper_get_signature_field):
16124 Add asserts for too small buffers.
16126 2005-06-15 Martin Baulig <martin@ximian.com>
16128 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
16129 if our parent is not a dynamic type.
16131 2005-06-15 Martin Baulig <martin@ximian.com>
16133 * class-internals.h (MonoTypeNameFormat): New enum.
16136 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
16137 (mono_type_get_full_name): Removed.
16138 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
16139 argument instead of the boolean's.
16141 * icall.c (ves_icall_System_MonoType_getFullName):
16142 Added `gboolean assembly_qualified'.
16145 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
16147 * reflection.c (mono_reflection_parse_type): Parse the new type
16150 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16152 * icall.c: no need to convert from utf16 to utf8 and then back again
16153 after the call to GetLogicalDrives.
16155 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16157 * icall.c: frombase64. Fix problems exposed by new tests.
16159 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16161 * icall.c: added internal calls for converting char [] and strings in
16162 base64 into byte [].
16164 2005-06-10 Martin Baulig <martin@ximian.com>
16166 * class.c (mono_class_create_generic_2): Read the nested classes
16167 from the metadata rather than from `gklass->nested_classes' since
16168 `gklass' might not be initialized yet.
16170 2005-06-09 Duncan Mak <duncan@novell.com>
16172 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
16173 all public headers. Fixes #74919.
16175 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
16177 * domain.c: The key for proxy_vtable_hash is now a pointer
16178 array. Added new GHashFunc and GCompareFunc functions for this.
16180 * class.h: The list of interfaces in MonoRemoteClass is known in
16181 advance and can't grow (we create a new MonoRemoteClass if needed),
16182 so now the interface array can be allocated together with
16185 * object.c: Added a new method create_remote_class_key.
16186 Fixed mono_remote_class so it does not depend on
16187 mono_upgrade_remote_class.
16188 Removed extend_interface_array.
16189 Added new method clone_remote_class(), which makes a copy of a remote
16190 class and adds a new interface or class to it.
16191 mono_upgrade_remote_class() now creates a new remote class (or gets
16192 it from the cache) if an vtable upgrade is needed. In this way
16193 we make sure that other objects sharing the same remote class
16194 don't get the new vtable with unwanted interfaces.
16196 * object-internals.h:
16197 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
16199 * marshal.c: Track changes in mono_upgrade_remote_class().
16201 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
16202 * icall.c: Add runtime methods for obtaining members of inflated
16203 class, which were created from supplied non-inflated members. It
16204 is used in internal Get{Method,Constructor,Field} methods in
16207 2005-06-09 Martin Baulig <martin@ximian.com>
16210 (mono_reflection_bind_generic_method_parameters): Fix #75169.
16212 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
16213 * reflection.c (mono_image_basic_init): Define
16214 Version in MonoDynamicAssembly.
16216 2005-06-08 Martin Baulig <martin@ximian.com>
16221 (mono_method_signature_full): New public method; takes a
16222 `MonoGenericContext *'.
16223 (find_method): Use mono_method_signature_full() and pass the
16224 klass'es context to it.
16226 * class.c (mono_class_is_inflated_method): Use
16227 mono_method_signature_full() and pass the context to it.
16229 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
16231 * object.c: add proper locking in mono_remote_class_vtable(),
16232 fixes possible memory corruption.
16234 2005-06-08 Michael Meeks <michael.meeks@novell.com>
16236 * marshal.c (mono_remoting_marshal_init): set
16237 initialized after initialization.
16239 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
16241 * locales.c : hush.
16243 2005-06-06 Michael Meeks <michael.meeks@novell.com>
16245 * object.c (extend_interface_array): fix really silly
16246 memory corrupting / comparison bug.
16248 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
16250 * reflection.c: Functions added to support the creation
16251 of CustomAttributeData, which includes Attribute data
16252 used by ReflectionOnly methods.
16254 * reflection.h: mono_reflection_get_custom_attrs_data and
16255 mono_custom_attrs_data_construct added (functions exposed).
16257 * icall.c: Added mono_reflection_get_custom_attrs_data
16260 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
16262 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
16265 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
16267 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
16269 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
16270 dynamic DllImportAttribute.
16272 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
16273 dynamic DllImportAttribute.
16275 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
16278 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16280 * threads.c: avoid segfault when an unstarted thread is aborted.
16282 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
16284 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
16285 Returns the name and version of the runtime for reporting.
16287 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16289 * appdomain.c: bump corlib version.
16290 * object-internals.h: new field in MonoReflectionAssembly.
16292 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16294 * object-internals.h: Carlos forgot to add this field.
16296 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
16298 * icall.c: Added create_version to create instances
16299 of Version of MonoReflectionAssemblyName. This change helps
16300 the AssemblyName tests to keep running fine.
16302 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
16304 * object.c (mono_method_return_message_restore): A somehow less
16305 intrusive fix for #75138.
16307 2005-06-03 Raja R Harinath <rharinath@novell.com>
16309 * object.c (mono_method_return_message_restore): Fix computation
16310 of expected number of out args.
16312 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
16314 * reflection.c (mono_image_get_method_info): Fix the case when the
16317 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
16319 * object.c: Added missing null check in
16320 mono_method_return_message_restore.
16322 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
16324 * reflection.c (mono_image_get_method_info): Handle the case when
16327 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
16329 * object.c: When creating the vtable for a proxy, take into account
16330 all inherited interfaces, not only the ones registered in
16331 iclass->interfaces. This fixs bug #74996.
16332 Also, in mono_method_return_message_restore, verify that the array
16333 of out args has the expected lengh.
16335 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16337 * socket-io.c: update the timeout in Poll when the call is interrupte.
16339 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16341 * socket-io.c: support abort/suspend in Select_internal after last
16344 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16346 * threadpool.c: remove warning.
16348 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16351 * socket-io.[ch]: Select_internal uses poll() now when available, thus
16352 removing the 1024 limit from select(). Runtime part of the fix for
16355 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16357 * socket-io.c: when resolving the addresses for the same
16358 host returned by gethostname(), get the local IPs from the interface
16359 list. Loopback addresses are discarded if the are interfaces up with
16360 non-loopback ones. Fixes bug #63265.
16362 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
16364 * appdomain.c, verify.c, object-internals.h, reflection.c:
16365 bumped corlib number to 36, and added new extra_flags field
16366 to ReflectionMethodBuilder and friends. Fixes #75060.
16368 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
16370 * gc.c: register a new weak link only if the object is non-null
16373 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
16375 * culture-info.h : short time pattern too.
16377 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
16379 * culture-info.h : expand long time pattern string length.
16381 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
16383 * culture-info-table.h : update (more French date format; #72788).
16385 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
16387 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
16388 the method is static. Fixes #75029.
16390 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
16392 * reflection.c: Update the table_idx field of method builders after
16393 saving the module, since it can change. This is a workaround for
16396 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
16398 * culture-info-table.h : update (additional French date format).
16400 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
16402 * icall.c (ves_icall_type_Equals): Revert last change.
16404 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
16406 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
16408 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
16410 * class-internals.h: Added executioncontext_class field to
16411 MonoDefaults structure.
16412 * domain.c: Cache System.Threading.ExecutionContext class in
16414 * object.c: Capture the ExecutionContext for asynchroneous calls in
16415 mono_async_result_new.
16416 * object-internals.h: Added execution_context and original_context
16417 fields to MonoAsyncResult. Added execution_context to MonoThread.
16418 * security-manager.c|.h: Added mono_get_context_capture_method to
16419 return the capture method (if required by the security manager or by
16420 the framework version used).
16421 * threadpool.c: Apply capture (if present) ExecutionContext in
16422 mono_async_invoke and revert to original context after it completes.
16424 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
16426 * culture-info-table.h : updated (real hacky solution for zh-CHT).
16428 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
16430 * culture-info-table.h : zh-CHT related workaround.
16432 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
16434 * marshal.c (emit_marshal_custom): Add some error checking and call the
16435 methods in the ICustomMarshaler interface. Fixes #74875.
16437 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
16438 native->managed wrappers.
16440 2005-05-12 Martin Baulig <martin@ximian.com>
16442 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
16443 here and use the loader lock.
16445 * mono-debug.c: Properly lock when the debugger is not attached.
16446 (mono_debug_init): Release the initial lock if we're not running
16449 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
16451 * marshal.c (emit_marshal_custom): Pass through NULL values without
16452 calling the custom marshalling routines.
16454 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
16455 conversion in structures. Fixes #74882.
16457 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
16459 * culture-info-table.h : zh-* cultures were missing.
16461 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
16463 * threads.c: Added a new event background_change_event which is signaled
16464 when a thread changes its background mode.
16465 Moved here several checks previously done in managed code. The checks
16466 require the thread lock, and using the thread lock in managed code
16467 can result in deadlocks.
16468 Merged Start_internal and Thread_internal into a single method. Now
16469 Thread_internal does all work of creating and starting a thread.
16470 Added icalls for setting and getting the state of the object. Moved from
16471 managed code to avoid locking there.
16472 Added wait_for_tids_or_state_change() which is called instad of
16473 wait_for_tids when waiting for non-backround threads to end. This method
16474 will return if one of the threads ends or the background_change_event
16476 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
16477 the background mode. This method signals the background_change_event
16480 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
16481 removed Start_internal.
16483 2005-05-11 Martin Baulig <martin@ximian.com>
16485 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
16486 to order of some fields to get proper alignment on 64-bit machines.
16488 2005-05-11 Martin Baulig <martin@ximian.com>
16490 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
16491 changes as they're broken and completely fuck up the debugger.
16493 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
16495 2005-05-10 Martin Baulig <martin@ximian.com>
16497 * reflection.c (mono_reflection_generic_class_initialize): Don't
16498 call mono_class_setup_parent() here.
16500 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16502 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
16503 send/receive timeout use an integer in milliseconds. We were using a
16506 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16509 (internal_get_cultures): reserve the first slot of the array for the
16510 InvariantCulture, which will be filled in managed code.
16512 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
16514 * reflection.c (mono_image_fill_module_table): Initialize the
16515 GENERATION field as well.
16517 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16519 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
16520 Monitor.Enter on the object.
16522 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
16524 * threads.c: Enable the wait for running threads when exiting.
16525 * icall.c: Suspend all threads before exiting.
16527 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
16529 * assembly.c (mono_assembly_load_reference): Fix warning.
16531 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16533 * threadpool.c: changed the default number of threads per cpu. From now
16534 on, the default will be 20 + (5 * number of cpus) instead of 50.
16536 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
16538 * loader.c (mono_method_get_signature_full): Add locking here.
16540 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
16542 * appdomain.c: Moved methods for parsing and freeing assembly
16543 names to assembly.c.
16544 * assembly.c, domain-internals.h: Created public methods for parsing
16545 assembly names. Fixed mono_assembly_load_with_partial_name:
16546 it now finds the best match, taking into account the version,
16547 token and culture specified in the partial name. Also return
16548 the latest version if no version information is specified.
16550 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
16552 * threadpool.c: replace check for SocketAsyncCall class.
16554 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16556 * threadpool-internals.h:
16557 * Makefile.am: added threadpool-internals.h
16559 * threadpool.c: call mono_unhandled_exception on exceptions not handled
16560 that happen in threadpool threads (tested on MS).
16561 (mono_thread_pool_remove_socket): new function that dispatch any pending
16562 AIO call on a socket that is closing. By now only epoll really needs it,
16563 as select/poll wake up when the socket closes.
16566 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
16568 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
16570 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
16572 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
16574 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
16576 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
16578 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
16579 has an abort request, convert it into a suspend request.
16581 2005-04-30 Ben Maurer <bmaurer@ximian.com>
16583 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
16584 warning for the usage of `UnmanagedFunctionPointerAttribute' which
16585 is not supported yet.
16587 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16589 * image.c: register assemblies loaded from data (bundles) in the loaded
16590 assemblies hash. Fixes bug #74772.
16592 2005-04-29 Martin Baulig <martin@ximian.com>
16594 * class.c (mono_type_get_name_recurse): Update to the new naming
16595 schema from the latest .NET 2.x beta2.
16596 (mono_class_setup_vtable_general): If we're a generic instance,
16597 copy the vtable from our generic type definition and inflate all
16600 * loader.c (find_method): Update to the new naming schema from the
16601 latest .NET 2.x beta2.
16603 2005-04-29 Raja R Harinath <harinath@gmail.com>
16605 * class.c (mono_class_init): Add a mono_loader_unlock to the
16608 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
16610 * icall.c (ves_icall_System_Environment_Exit): Remove the
16611 suspend_all_other_threads () call for the time being, since it can hang.
16613 * threads.c (mono_thread_manage): Similarly, disable the waiting for
16614 the background threads to exit, since it can also hang.
16616 * class.c (mono_class_init): Applied patch from Ankit Jain
16617 (radical@gmail.com). Avoid pending init errors when a field refers
16618 to a nested class using a typeref. Fixes #74734.
16620 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
16621 this for dynamic modules.
16623 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16625 * threads.c: don't wait for threads that are in the process of aborting
16626 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
16627 and waiting for background threads to finish. This makes xsp and
16628 mod-mono-server exit without random length delays and/or hangs.
16630 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16632 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
16634 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
16636 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
16637 dynamic types to prevent infinite loops. Fixes #74727.
16639 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
16640 ..._is_assignable_to.
16642 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
16644 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
16646 2005-04-25 Martin Baulig <martin@ximian.com>
16648 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
16651 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
16653 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
16655 * reflection.c (build_compressed_metadata): Set metadata header
16658 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
16660 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
16661 number into an integral and a decimal part. Fixes #70473.
16663 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
16665 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
16667 * culture-info-table.h : reflected the latest locale-builder output.
16669 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16671 * threadpool.c: check for SuspendRequested too when deciding if
16672 mono_thread_interruption_checkpoint should be called.
16674 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16676 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
16677 * threads.c: remove interruption_mutex and use Interlocked instead. When
16678 suspending all the threads, wait for all the suspended events at once.
16679 If we're shutting down and get an APC that is going to be queued,
16680 call mono_thread_execute_interruption immediately, as the thread might
16681 be sleeping on a pthread condition or mutex.
16683 * icall.c: call mono_runtime_set_shutting_down before suspending the
16686 Fixes bug #74693. And now xsp is happier when exiting.
16688 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
16690 * loader.c (mono_stack_walk): Fix #74690.
16692 2005-04-22 Martin Baulig <martin@ximian.com>
16694 * mono-debug.h (MonoDebugMethodJitInfo): Added
16695 `MonoDebugMethodJitInfo *jit'.
16697 * mono-debug.c (mono_debug_read_method): Cache the
16698 MonoDebugMethodJitInfo in `address->jit'.
16699 (mono_debug_free_method_jit_info): New public method.
16701 2005-04-22 Martin Baulig <martin@ximian.com>
16703 * class.c (mono_class_is_assignable_from): Disallow
16704 type parameter -> interface.
16706 2005-04-21 Dick Porter <dick@ximian.com>
16708 * threads.c (mono_thread_create): Turn an assertion into an error.
16710 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
16712 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
16714 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
16715 Fix some gcc 4.0 warnings.
16717 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
16719 * file-io.c: fix alt dir separator char on unix systems
16720 and cleanup (fixes bug #71214).
16722 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
16724 * marshal.c: Use CALLVIRT instead of CALL when dispatching
16725 a call to a remote domain, since the method may be an
16726 interface method in the client domain. This fixes bug #74192.
16728 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16730 * threadpool.c: recv/send are now performed before going back to managed
16731 code to save one transition.
16733 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16735 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
16737 * metadata/threadpool.c: removed hack to workaround the bug above.
16741 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
16743 * reflection.c reflection.h: Fix handling of parameter defaults in
16744 dynamic methods. Also fixes handling of parameter attributes.
16747 * mono-debug.c (mono_debug_close_image): Fix warning.
16749 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16751 * socket-io.h: replaced old unused field with new 'blocking'.
16752 * threadpool.c: restore socket blocking state on windows(tm).
16754 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
16756 * icall.c: don't return the codebase in the AssemblyName[] returned by
16757 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
16758 * object-internals.h: Removed FIXME (fields were presents) and fixed
16759 versioncompat declaration.
16761 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16763 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
16764 not closed, so don't cleanup when it happens.
16766 2005-04-13 Chris Toshok <toshok@ximian.com>
16768 * mono-debug-debugger.h: change prototype for
16769 mono_debugger_lookup_type.
16771 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
16772 this function, although it should probably be named
16773 mono_debugger_init_type.
16775 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16777 * threadpool.c: fix non-AIO case.
16779 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
16781 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
16782 the built-in profiler to measure just JIT compilation times.
16784 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16786 * threadpool.c: the epollfd might be closed by another thread at
16787 any time, so ignore EBADF at treat it as a "we're closing" sign.
16789 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16791 * threadpool.c: release the semaphores with a count equals to the number
16792 of working threads in both IO and regular pools. Fixed typo that messed
16793 up the count of IO pool threads. Don't initialize the pipe handles if
16796 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16798 * threadpool.c: some systems don't like a NULL when deleting the socket
16801 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16803 * threadpool.c: fix semaphore allocation.
16805 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16807 * threadpool.c: added epoll() based implementation for asynchronous IO
16808 that is used instead of the default poll() when available.
16809 It can be disabled by setting MONO_DISABLE_AIO.
16811 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16813 * threadpool.c: windows needs 'closesocket' and instead of returning
16814 0 when the stream is closed while in select, it returns -1. Fixes bug
16817 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
16819 * class.c (class_compute_field_layout): Fix the regression caused by
16822 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16824 * threadpool.c: separate pool for socket async. IO.
16825 * threadpool.h: mono_max_worker_threads is not a global any more.
16827 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
16829 * class.c (class_compute_field_layout): Fix #74549.
16831 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16833 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
16834 use 2 connected sockets instead.
16836 2005-04-08 Miguel de Icaza <miguel@novell.com>
16838 * mono-config.c: Add new entry point for mkbundle
16839 mono_config_parse_memory.
16841 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16843 * threadpool.c: removed another unused function.
16845 2005-04-08 Ankit Jain <radical@corewars.org>
16847 * reflection.c (get_default_param_value_blobs): Add 'types'
16848 parameter to get the types encoded in the constant table.
16849 (mono_param_get_objects): Use the type from the constant table,
16850 not the type of the parameter, when creating default values.
16851 Handle null default values correctly.
16853 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16860 * socket-io.c: removed dead code for async IO.
16862 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16864 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
16866 * threadpool.c: intercept socket async. calls and pass them to a thread
16867 that is polling and dispatching the job items to the threadpool as
16868 socket become ready. Fixes bugs #71217, #71933.
16870 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
16871 between char and short/ushort arrays.
16873 * socket-io.c: remove dead code.
16875 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
16878 icall.c : removed InternalToUpper_Comp() and
16879 InternalToLower_Comp().
16881 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
16883 * char-conversions.h : The tables were incorrectly generated. Should
16884 be generated against invariant culture.
16886 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
16888 * object.c (mono_runtime_invoke_array): Fix return value when
16889 passing pre-created valuetype objects to ctors.
16891 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
16892 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
16895 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
16897 * domain.c: removed g_assert for runtimesecurityframe_class. This is
16898 only used with --security and hides the wrong corlib version error.
16900 2005-03-30 Joshua Tauberer <tauberer@for.net>
16902 * class.c: Changed mono_class_name_from_token so that types
16903 outside of a namespace don't have an initial period. Improved
16904 the g_warning message used in _mono_class_get when loading
16906 * assembly.c: In mono_assembly_load_reference, when an assembly
16907 can't be found, "No such file or directory" is misleading and
16908 unhelpful because a few paths were checked for the presence of
16909 the assembly. When that happens (ENOENT), display a nicer
16910 message indicating the directories that were searched. In all
16911 cases, the warning is made easier to read for non-hackers.
16913 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
16915 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
16917 * appdomain.h|domain.c: Removed inline from functions.
16918 * appdomain.c: Reduced warnings when compiling on windows.
16919 * icall.c: Fixed output_debug declaration to gunichar2*.
16920 * mono-config.c: Reduced warnings when compiling on windows.
16921 * rand.c: Added missing "windows.h". Added missing return value.
16922 * rawbuffer.c: Added missing winsock2.h for windows.
16923 * sysmath.h: Added mono-compiler.h header to allow/ease
16924 compilation with non-GCC compilers.
16925 * threads.c: Fixed declarations to compile with VS.NET C compiler.
16926 Removed cast warnings.
16928 Adapted from the work of J Lothian (for VC6).
16930 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
16932 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
16935 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
16937 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
16940 2005-03-27 Raja R Harinath <harinath@gmail.com>
16942 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
16943 has to be in $(exec_prefix). $(prefix) is for arch-independent
16944 stuff, and it would probably use $(prefix)/share rather than
16947 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16949 * console-io.c: added 2 includes that might be missing.
16951 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
16953 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
16956 * reflection.c (create_custom_attr): Allocate the params array using
16957 alloca so it gets GC tracking.
16959 2005-03-23 Chris Toshok <toshok@ximian.com>
16961 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
16964 2005-03-24 Raja R Harinath <rharinath@novell.com>
16966 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
16967 changes to pick up any changes in prefix, etc.
16969 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
16971 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
16973 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
16974 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
16976 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
16978 * class-internals.h object-internals.h class.c reflection.c: Extend the
16979 mono_lookup_dynamic_token () function to return the class of the
16982 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
16983 well. Fixes #73848.
16985 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
16987 * security-manager.c: Skip inheritance checks for intra-corlib
16988 class inheritance and method overrides. This skips a lot of checks
16989 and (anyway) permissions cannot work until corlib is loaded.
16991 2005-03-23 Martin Baulig <martin@ximian.com>
16993 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
16994 MONO_TYPE_GENERICINST.
16996 2005-03-23 Martin Baulig <martin@ximian.com>
16998 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
17000 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17002 * class.c: added locking comments to some functions.
17003 Cache the interface offsets arrays (saves about 20 KB
17004 of runtime memory in a typical app).
17005 Reduce the time overhead in mono_class_setup_supertypes ().
17007 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
17009 * icall.c: speedup and fix leaks in GetMethodsByName and
17010 GetPropertiesByName.
17012 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
17014 * reflection.c: some locking fixes.
17016 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
17018 * metadata.c: added missing break in case statement.
17020 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
17022 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
17023 typedbyref return values. Fixes #73941.
17025 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
17027 * security-manager.c|h: Added demandunmanaged method and
17028 suppressunmanagedcodesecurity class to MonoSecurityManager.
17029 Renamed aptc class to allowpartiallytrustedcallers.
17031 2005-03-17 Martin Baulig <martin@ximian.com>
17033 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
17035 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17037 * file-io.c: disabled file async. IO using aio_*. It uses the
17038 threadpool now. Workaround for bug #73718.
17040 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
17042 * assembly.h, mono-config.c: added code to deal with bundled configs
17043 for bundled assemblies.
17045 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
17047 * *.c, private.h: cleanup, removing old private.h header file.
17049 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
17051 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
17052 and throw_on_unmappable_char attributes.
17054 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
17056 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
17057 _ProcessName_internal.
17059 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
17061 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
17064 * icall.c threads.c threads-types.h: Remove slothash icalls as they
17065 are no longer used.
17067 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
17069 * object.c (compute_class_bitmap): Add support for generics. Fixes
17072 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
17074 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
17076 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17078 * filewatcher.c: commented out the code for windows watcher, as we don't
17079 use it (we use the managed implementation instead).
17081 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
17083 * object-internals.h (MonoThread): Remove 'unused1' field.
17085 * appdomain.c: Bump corlib version.
17087 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
17089 * reflection.c (mono_reflection_create_runtime_class): Remove the
17090 AssemblyBuilder.Save optimization since it causes too many problems.
17092 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
17094 * exception.c|h: Added mono_get_exception_reflection_type_load to
17095 create a ReflectionTypeLoadException object.
17096 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
17097 to return NULL is a InheritanceDemand fails during reflection. Updated
17098 ves_icall_System_Reflection_Assembly_GetTypes to throw a
17099 ReflectionTypeLoadException if an InheritanceDemand fails during
17100 reflection. Added icall mapping for GetLinkDemandSecurity.
17101 * security-manager.c|h: Added ves_icall_System_Security_
17102 SecurityManager_GetLinkDemandSecurity internal call to return the
17103 class and methods permissions set for a LinkDemand. Removed unused
17104 fields in MonoSecurityManager.
17106 2005-03-10 Martin Baulig <martin@ximian.com>
17108 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
17109 it's a generic instance.
17111 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
17113 * reflection.c (mono_get_object_from_blob): Applied patch from
17114 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
17116 * class.c (mono_class_is_assignable_from): Another try at fixing
17117 #73469 without breaking anything.
17119 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
17121 * class.c: (mono_class_is_assignable_from): Revert the last changes
17122 since they don't work with generics.
17124 * class.c (mono_class_is_assignable_from): Fix build bustage.
17126 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
17127 the managed IsAssignableFrom method. Fixes #73469.
17129 * reflection.c (mono_reflection_call_is_assignable_from): New helper
17132 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
17134 * object.c (mono_load_remote_field_new): Fix returning uninitialized
17135 memory when the remoting callback does not sets the out arguments.
17138 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
17141 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
17143 * object-internals.h (MonoStackFrame): Sync with managed object layout.
17145 * appdomain.c: Bump corlib version.
17147 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
17149 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
17152 * threads.c (mono_thread_attach): Detect threads which are not started
17153 by the GC pthread wrappers.
17155 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
17157 * icall.c: Added new icall for RNG.
17158 * rand.c|h: Added new icall to open the RNG. This allows to share a
17159 single handle on Linux to access /dev/urandom and fix #73183.
17161 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
17163 * object.c: setting the new vtable in a transparent proxy object must
17164 not change the GC descriptor.
17166 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
17168 * object.c: fixed compilation without GCJ support.
17169 * reflection.c: for runtime-created types ensure klass->has_references
17170 is correct (bug #73215).
17172 2005-03-02 Martin Baulig <martin@ximian.com>
17174 * class.c (mono_class_is_assignable_from): Make this work if
17175 `oklass' is a generic instance; fixes #72831.
17177 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
17179 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
17182 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
17184 * marshal.c: Reorganize native->managed marshalling code to also use
17185 the emit_marshal_... functions.
17187 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
17189 * object.c: typed allocs have issues with bitmap sizes > 30,
17190 so check for max_set >= 30.
17192 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
17194 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
17195 managed code. Fixes #73012.
17197 * metadata.h (MonoMarshalSpec): Add elem_mult field.
17199 * metadata.c reflection.c: Load/Emit elem_mult as well.
17201 * metadata.h (MonoMarshalSpec): Add comment.
17203 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
17205 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
17206 num_elem to -1 if not given.
17208 * object-internals.h (MonoReflectionMarshal): Add has_size field.
17210 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
17213 2005-03-01 Marek Safar <marek.safar@seznam.cz>
17215 * null-gc.c (mono_gc_free_fixed): Was not compilable.
17217 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
17219 * reflection.c (encode_marshal_blob): Encode param_num field as well.
17221 * object-internals.h (MonoReflectionMarshal): Add param_num field.
17223 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
17225 * object.c: generalized the reference bitmap creation
17226 and added hooks for the new GC.
17227 * class-internals.c: removed the gc_bitmap field from MonoClass.
17229 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
17231 * domain.c: help the compiler to produce better code
17232 in mono_jit_info_table_find ().
17234 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
17236 * object.c: make all allocations look typed.
17238 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
17240 * socket-io.c: load Mono.Posix if it's not loaded already
17243 2005-02-24 Martin Baulig <martin@ximian.com>
17245 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
17246 * reflection.c (dup_type): Likewise.
17248 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
17250 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
17251 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
17253 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
17255 * domain.c, threads.c, object-internals.h: make the critical thread
17256 local vars use the fast access mode (even when we're compiled in
17257 a lib). Provide accessors to be used by the jit during codegen.
17259 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17261 * appdomain.c: Changed hook functios behavior to include
17262 support for the reflection only assemblies. Some icalls were changed
17263 to support the mentioned assemblies too. Signatures of static methods
17264 try_assembly_resolve and real_load now have an additional parameter:
17267 * assembly.c: General changes to mono_assembly_ methods to support
17268 reflection only api. Functions mono_assembly_open, mono_assembly_load,
17269 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
17270 suffix, to support an additional gbool parameter to specify whether
17271 the assembli is reflection only or not. Created some new hook functions
17272 to add support for reflection only assemblies. Signatures of static
17273 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
17274 have now an additional parameter: refonly.
17276 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
17277 indicating whether the assembly is reflection only or not.
17279 * exception.c: Add mono_get_exception_invalid_operation.
17281 * icall.c: Throw an InvalidOperationException when trying to invoke
17282 a property/method/event, or trying to set/get the value of a field.
17283 Also add an icall to retrieve the ref_only flag to the
17284 MonoReflectionAssembly.
17286 2005-02-23 Chris Toshok <toshok@ximian.com>
17288 Part of fix for #72827.
17289 * mono-debug.c (mono_debug_add_method): add lexical block data to
17290 the info we write. Kind of a hack at the moment - we copy the
17291 lexical block info from the MonoDebugMethodInfo to the
17292 MonoDebugMethodJitInfo here, before writing it.
17293 (mono_debug_read_method): read the lexical block info.
17295 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
17297 * debug-mono-symfile.h: add lexical block support.
17299 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
17302 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
17304 * loader.c (mono_lookup_pinvoke_call): Fix warning.
17306 * object.c (mono_runtime_free_method): Call mono_free_method () and
17307 put the TODOs there.
17309 * loader.c (mono_free_method): Free up most memory allocated for
17312 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17314 * reflection.c: properly flag a Type argument to a
17315 named custom attr value (bug #72248).
17317 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
17319 * reflection.c: reduce code duplication in named custom
17320 attribute encoding.
17322 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
17324 * reflection.c: properly encode custom attrs of type object
17327 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
17329 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
17331 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
17333 * socket-io.c: load System.dll if it's not loaded already
17334 (bug #72850 and #70477).
17336 2005-02-21 Martin Baulig <martin@ximian.com>
17338 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
17341 2005-02-21 Martin Baulig <martin@ximian.com>
17343 * reflection.c (mono_image_build_metadata): We also need to
17344 "fixup" the MethodImpl table after we computed the final method
17345 indices. Call fixup_methodimpl() to do that.
17346 (fixup_methodimpl): New private method.
17348 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
17350 * assembly.c: special case mscorlib.dll (bug#72536),
17351 patch from Carlos Alberto Cortez.
17353 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
17355 * threads-types.h threads.c: Fix build bustage.
17357 * threads.c: Use a union for long<->double conversions.
17359 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
17360 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
17362 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
17363 containing the checkpoint call with NOT_TAKEN.
17365 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
17366 checkpoint before pushing the arguments, so they won't have to be
17369 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
17371 * domain.c, assembly.c, domain-internals.h: make some data
17372 const and relocation-free.
17374 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
17376 * object.c, appdomain.c, class-internals.h: introduce the
17377 MonoClassRuntimeInfo structure to hold the info needed to
17378 use a class at runtime. Made mono_class_vtable() lock-free
17379 for all the appdomains.
17381 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
17383 * metadata-internals.h, image.c: introduce a per-image mempool to
17384 be used for memory that has the same lifetime as the image.
17386 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
17388 * domain.c: In mono_init_internal(), instead of selecting the first
17389 runtime version supported by an executable, get a list of all
17390 supported versions and select the one for which an mscorlib exists
17391 (since even if the runtime supports a given version, it doesn't mean
17392 that the framework for that version is installed).
17393 Modified get_runtimes_from_exe to support this behavior.
17394 In supported_runtimes, added information about additional system
17397 * assembly.c: Added support for more than one system assembly version
17398 per runtime version. Updated the assembly list.
17399 In mono_assembly_remap_version, removed the initial version check,
17400 since we don't know to which version we need to compare until we
17401 get the version set on which the assembly is based.
17402 Moved the code for loading corlib into the new method
17403 mono_assembly_load_corlib(), so it can be used by the initialization
17406 * domain-internals.h: Updated data structures and added declaration
17407 for mono_assembly_load_corlib.
17409 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
17411 * reflection.c (resolve_object): Fix the creation of the signature in
17412 the SignatureHelper case.
17414 * assembly.c (mono_assembly_remap_version): Fix binary search.
17416 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
17418 * class.c: Added inheritance check when a method is overloaded (from a
17419 virtual method or when implementing an interface) and when a class is
17420 inherited. Added functions to set a failure for a class and to
17421 retreive the exception from a failure.
17422 * class-internals.h: Added fields to MonoClass to keep the exception
17423 information status for inheritance (or other exceptions) to be thrown
17424 later (i.e. not at load time).
17425 * object.c: Throw the inheritance SecurityException when a type is to
17426 be created with either class or method inheritance violations.
17427 * reflection.c|h: Fix when getting declsec from a class. Removed
17428 unrequired code for class. Improved sanity in parameter naming.
17429 * security-manager.c|h: Added functions to check for class and method
17432 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
17434 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
17435 and has_finalize in dynamic types as well.
17437 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
17439 * culture-info-table.h : fixed currency format for en-GB (and so on).
17441 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
17443 * gc.c: ensure the GC handles never have 0 as a value.
17445 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
17447 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
17448 a pointer to a struct to unmanaged code. Fixes #72625.
17450 2005-02-16 Martin Baulig <martin@ximian.com>
17452 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
17454 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
17456 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
17458 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
17460 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
17462 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
17463 UnmanagedFunctionPointerAttribute, use it for determining calling convention
17466 * reflection.c (mono_custom_attrs_get_attr): New helper function.
17468 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
17470 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
17472 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
17473 changes to make the current context a field in MonoThread.
17475 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
17477 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
17480 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
17481 extracted from mono_marshal_get_native_wrapper.
17483 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
17484 to create wrappers around native functions.
17486 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
17487 delegates for arbitrary function pointers. Fixes #71472.
17489 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
17491 * threads.c: cleaned up the code a little.
17493 2005-02-15 Martin Baulig <martin@ximian.com>
17495 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
17498 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
17499 allocate larger chunks if needed.
17501 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
17503 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
17506 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
17508 * domain.c: keep the domains in an array and ensure the domain ids
17509 are kept small, so they can be used as indexes to domain-specific data
17510 with a small memory overhead.
17512 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
17514 * icall.c: Handle byref types in Type icalls. Fixes #72544.
17516 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
17518 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
17520 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
17522 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
17524 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
17527 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
17529 2005-02-12 Ben Maurer <bmaurer@ximian.com>
17531 * domain-internals.h: add the hashtable here.
17533 * class-internals.h: Remove `info' from MonoMethod
17535 * domain.c: Add a new hashtable, jit_trampoline_hash
17537 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
17539 * object.c: don't set the value of static fields
17542 2005-02-11 Martin Baulig <martin@ximian.com>
17544 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
17545 (mono_debug_add_method): Silently ignore the method if it's too big.
17546 (mono_debug_add_type): Likewise.
17548 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
17550 * threads.c, appdomain.c: remove #ifdefs from the code.
17552 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
17554 * metadata-internals.h: Added flags to MonoAssembly to cache the most
17555 common security informations. This allows us to stay in unmanaged code
17556 when doing LinkDemand and it's special cases (except for the first
17557 time for initialization). The flags a very much used with --security.
17558 * reflection.c|h: Added code to get declarative security attributes
17559 for LinkDemand and InheritanceDemand. This required to refactor the
17560 existing code for Demand.
17561 * security-manager.c|h: Added new method fields for the special cases
17564 2005-02-10 Martin Baulig <martin@ximian.com>
17566 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
17567 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
17569 2005-02-10 Martin Baulig <martin@ximian.com>
17571 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
17572 debugging code; this is almost a complete rewrite.
17574 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
17576 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17578 * domain.c, object.h: expose mono_string_equal () and
17579 mono_string_hash ().
17580 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
17581 it's implemented in managed code.
17583 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
17585 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
17586 lo leak objects between appdomains.
17588 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
17590 * assembly.c: old compilers compilation fix from
17591 robertj@gmx.net (Robert Jordan).
17593 2005-02-09 Ben Maurer <bmaurer@ximian.com>
17595 * class-internals.h: Little reminder for the future.
17597 * debug-helpers.c: Fix up wrapper_type_names
17599 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
17601 * image.c, metadata-internals.h: when loading an image from a file,
17602 mmap all of it and use the same codepaths as when using a
17603 in-memory image: the code is simpler and we use less memory
17604 (both writable and readonly).
17606 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
17608 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
17609 API to alloc runtime data structures that need to be tracked by the
17610 GC and contain pointers.
17611 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
17612 make the code more readable and eventually use a different GC.
17614 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
17616 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
17619 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
17621 * object.c: In release_type_locks(), don't release the cctor lock
17622 if it has already been released. This fixes a crash in the
17625 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
17627 * gc.c, marshal.c, icall.c: register a delegate for finalization
17628 only when the native function pointer has been allocated for it.
17630 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
17632 * object.c: cleaned up some code, allocate objects that are
17633 pointer free with the atomic malloc variant. Allocate memory
17634 for static data from the mempool if it's pointer-free.
17635 Allocate the bounds array at the end of the array data, when needed.
17636 * object-internals.h, object.h: move a private function in a private
17638 * class.c: handle missing case in tracking references in fields.
17640 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
17642 * class.c, class-internals.h: keep track if a type has
17643 reference fields in either the instance or static fields.
17645 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
17647 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
17648 and renamed to MonoRuntimeInfo. Added fields to store the expected
17649 framework assembly version. Changed mono_get_framework_version and
17650 mono_get_runtime_version for a single mono_get_runtime_info method.
17652 * assembly.c: Added method to remap system assembly versions to the
17653 current executing runtime version. Removed old mapping code.
17654 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
17656 * icall.c, reflection.c: Track api changes.
17658 2005-02-06 Miguel de Icaza <miguel@novell.com>
17660 * loader.c (method_from_memberref): Improve error reporting,
17661 produce the class name instead of the typeref/typedef index.
17663 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
17665 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
17667 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
17669 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
17670 stdcall and charset name mangling. Reorganize the code and add
17671 some tracing stuff.
17673 2005-02-05 Ben Maurer <bmaurer@ximian.com>
17675 * monodiet.c: More iters!
17677 * marshal.c: Iter usage.
17679 * icall.c: Iter usage.
17681 * object.c: Use iters.
17683 * debug-helpers.c: More iters
17685 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
17687 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
17690 2005-02-05 Ben Maurer <bmaurer@ximian.com>
17692 * mono-debug-debugger.c: use iters
17694 * class.c, class-internals.h: mono_class_setup_events is static
17697 * All callers: use iters
17699 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
17701 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
17702 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
17704 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
17706 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
17708 * marshal.h: Add prototypes for ldfld/stfld_remote.
17710 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
17711 this is called during startup.
17713 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
17715 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
17716 MonoThreadsSync struct private in monitor.c. Changed the way
17717 MonoThreadsSync is allocated so it's faster and there is no
17718 need to keep track of it with a finalizer and it uses less memory.
17719 This also finally allows us to allocate mono objects as ptrfree when
17720 there are no reference fields.
17722 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
17724 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
17725 disappearing link to the GC interface and use them to simplify
17726 the gchandles code.
17728 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
17730 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
17731 stfld_remote which call mono_load/store_field_new. This allows methods
17732 calling ldfld/stfld wrappers to be AOTed.
17734 * console-io.c: Include sys/filio.h under solaris.
17736 * console-io.c: Include curses.h if needed correctly.
17738 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
17740 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
17741 method->klass as well.
17743 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
17745 * class.c (mono_class_init): Switch on lazy initialization of
17748 * class.c (mono_class_get_finalizer): Handle the case when the
17749 finalizer is inherited.
17751 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17753 * console-io.c: <curses.h> is needed by term.h on solaris.
17755 2005-02-03 Ben Maurer <bmaurer@ximian.com>
17757 * icall.c, class-internals.h, monodiet.c, class.c: Remove
17758 mono_class_setup_properties where possible. Remove this ftn from
17759 the header file, and make it static.
17761 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
17763 * loader.c: Add missing setup_... call.
17765 * class.c: Add missing setup_... calls.
17767 * class.c (mono_class_init): Switch on lazy initialization of
17768 the generic vtable.
17770 * class.c (mono_class_init): Fix generics broken by the recent changes.
17772 * monodiet.c (handle_type): Add missing setup_... calls.
17774 * class.c: Back out garbage in previous patch.
17776 * class.c: Add missing setup_... calls.
17778 * class.c (mono_class_get_method_from_name_flags): Avoid calling
17779 mono_class_setup_methods () if possible.
17781 * class-internals.h (MonoClass): Add 'has_cctor' flag.
17783 * class-internals.h (MonoCachedClassInfo): New structure.
17785 * class.c: Initialize properties and events fields of MonoClass lazily.
17787 * class.c: Add infrastructure for lazily initializing the methods and
17788 vtable fields of MonoClass. Not yet used.
17790 * class.c (mono_class_get_finalizer): New helper function.
17792 * class.c: Add infrastructure for loading some class related data from
17795 * object.c: Add infrastructure for initializing the vtable from data
17798 * gc.c (run_finalize): Use mono_class_get_finalizer ().
17800 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
17801 appropriate initialization function before accessing parts of the
17802 MonoClass structure.
17804 * marshal.c: Fix warnings.
17806 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
17808 * mono-debug-debugger.c (get_exception_message): Use
17809 mono_class_get_method_from_name_flags ().
17811 2005-02-02 Ben Maurer <bmaurer@ximian.com>
17813 * reflection.c, appdomain.c: Replace a few manual searches that
17814 Zoltan missed. (Paolo approved this part of my initial patch).
17816 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
17818 * profiler.c: disable recording statistical events at report time.
17820 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
17822 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
17823 to byteswap arrays of enum values, too (bug #72080).
17825 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
17827 * appdomain.c (set_domain_search_path): Allow this to be called if
17828 domain->setup is not yet set.
17830 * loader.c (mono_method_get_index): New helper function.
17832 * loader.c reflection.c: Use mono_method_get_index ().
17834 * class.c (mono_class_get_method_from_name_flags): New helper method.
17836 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
17839 * class.c (mono_class_get_cctor): New helper method.
17841 * string-icalls.c object.c class.c marshal.c reflection.c: Use
17842 mono_class_get_method () to look up methods.
17844 2005-02-01 Miguel de Icaza <miguel@novell.com>
17846 * console-io.c: Fix the build, this should work on Windows.
17848 2005-01-31 Ben Maurer <bmaurer@ximian.com>
17850 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
17851 be set to null to keep things valid
17853 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17855 * icall.c: added Console 2.0 icalls.
17856 * Makefile.am: added console-io.[ch]
17857 * console-io.[ch]: internal calls for Console 2.0 API.
17859 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
17861 * class.c: make sure we consider all the interfaces
17862 when calculating max_interface_id (bug found by
17863 Jeroen Frijters running ikvm).
17865 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
17867 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
17868 valuetype fields to null.
17870 * object.c (set_value): Ditto. Fixes #71669.
17872 2005-01-31 Martin Baulig <martin@ximian.com>
17874 * metadata.c (mono_metadata_has_generic_params): New public
17875 function; checks whether something is a generic method.
17877 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17879 * appdomain.c: fix infinite recursion when adding assemblies.
17881 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
17883 * object.c: Fix small typo to return all items for Environment.
17884 GetCommandLineArgs.
17886 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17888 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
17889 reflection.c: more domain and assembly-unload related fixes
17890 and memory leaks plugs.
17892 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
17894 * 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.
17896 2005-01-29 Ben Maurer <bmaurer@ximian.com>
17898 * loader.c (mono_method_signature): Make this method lazy
17899 (mono_get_method_from_token): Don't computate the signature here.
17901 Doing this saves quite a bit of memory. I got 90 kb on starting up
17902 monodoc. It should also save some disk reads on startup.
17904 * *: MonoMethod->signature might be NULL now. You *MUST* use
17905 mono_method_signature.
17907 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
17909 * object.c (mono_runtime_get_main_args): Return an array from the
17910 current domain here. Fixes #71938.
17912 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
17914 * monitor.c: formatting changes to comply with the
17915 mono coding style and remove #ifdefs from the code.
17917 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
17919 * metadata.c, private.h: remove some unneeded data
17920 and use a more compact representation for table schemas.
17922 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
17924 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
17925 to get a better distribution in hash tables.
17926 * *.c: use mono_aligned_addr_hash() where appropriate.
17927 * assembly.c: make var static.
17929 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
17931 * domain-internals.h: Put MonoJitInfo on a diet.
17933 * domain.c: Fix a warning.
17935 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
17937 * gc.c: rework the gc handles code to reuse handles
17940 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
17942 * domain.c: fixed long standing bug in mono_string_equal() which
17943 was brought to light with the ldstr changes.
17945 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
17947 * reflection.c: Remove warning by adding missing include for marshal.h
17949 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
17951 * domain.c, object.c: change the ldstr_table to hold
17952 MonoString* as keys: makes the runtime isinterned lookup
17953 faster and simplifies memory management.
17955 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
17957 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
17958 possible to add imperative security checks before calling the icall.
17959 * reflection.c: Return security attributes on the original MonoMethod
17960 (and not the wrapped one). This fix permissions on icalls.
17962 2005-01-25 Dick Porter <dick@ximian.com>
17964 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
17965 the check for mktime() support actually test the mktime() return
17966 value. "Fixes" bug 71682, though the output is still different to
17969 2005-01-25 Martin Baulig <martin@ximian.com>
17971 * class.c (mono_class_is_assignable_from): Make this work for
17974 2005-01-24 Ben Maurer <bmaurer@ximian.com>
17976 * marshal.c (mono_string_utf8_to_builder)
17977 (mono_string_builder_to_utf16): We might not have ownership of the
17978 string. In thise case, we need to create a new buffer.
17980 * object-internals.h (mono_stringbuilder_capacity): sb->str might
17981 be null, in which case, use the default capacity.
17983 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
17985 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
17986 GC events to the profiler.
17988 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
17990 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
17991 if you don't want the GC to run.
17993 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
17995 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
17996 start providing a GC API and keeping different implementations in
17998 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
18000 2005-01-22 Ben Maurer <bmaurer@ximian.com>
18002 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
18003 mmap rather than allocating a huge buffer.
18004 (mono_debug_close_mono_symbol_file): Free the buffer allocated
18007 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
18009 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
18010 and CheckExecutionRights.
18011 * reflection.c|h: Keep the index of the declarative security to be
18012 used, instead of the pointer, when AOT compiler is used. Also add
18013 class initialization when requesting demands.
18014 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
18015 CheckExecutionRights. Both properties are now FALSE by default, and
18016 unmodifiable, unless the --security option is used.
18018 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
18020 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
18021 reflection.c: properly refcount images and assemblies, many leaks fixed.
18023 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18025 * threadpool.c: increase the timeout for threads in the thread pool to
18026 10s. Fixes bug #67159.
18028 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
18030 * class-internals.h: Sun's compiler insists on explicit
18031 signed on bit fields to handle then correctly.
18033 2005-01-19 Miguel de Icaza <miguel@ximian.com>
18035 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
18036 Make the size of the array fit only the number of invalid path
18037 chars that we have.
18039 * class.c (_mono_class_get): Improve the error reporting when a
18040 class referenced is not found, to assist debugging.
18042 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
18044 * threads.c: fix off-by-one error.
18045 * domain.c: free data allocated in the domain.
18047 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
18049 * reflection.c (mono_method_body_get_object): Fill out exception info
18052 * object-internals.h: Add MonoReflectionExceptionHandlingClause
18055 2005-01-19 Martin Baulig <martin@ximian.com>
18057 * loader.c (mono_get_method_constrained): Make this work again.
18059 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
18061 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
18062 guint16 to match the managed side.
18064 * reflection.c (mono_reflection_body_get_object): Fill out local
18067 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
18070 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
18071 'local_var_sig_token'.
18073 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
18075 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
18078 * reflection.c (mono_method_body_get_object): Handle abstract and
18081 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
18083 * marshal.c, loader.c, class-internals.h, reflection.c:
18084 store the emthod data for a wrapper in an array instead of a list.
18086 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
18088 * marshal.c: change the code to allocate memory more
18089 conservatively for method wrappers.
18091 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
18093 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
18094 fields from MonoClass to the marshal info structure where they belong.
18096 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
18098 * class.c, object.c, class-internals.h, marshal.c: rearrange
18099 some fields and tweak some types to lower memory usage.
18101 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
18103 * threads.c (signal_thread_state_change): Handle the case when the
18104 target thread is the current thread.
18106 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
18108 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
18109 emit_ptr_to_object_conv.
18111 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
18112 marshalling. Fixes #71352.
18114 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
18116 * metadata.h, blob.h: move table enum to blob.h so it can be included
18118 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
18119 cut the size of MonoImage/MonoDynamicImage.
18121 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
18123 * profiler.c (mono_profiler_install_simple): Fix default arguments.
18125 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
18127 * reflection.c, reflection.h, icall.c: add a function to check
18128 if an attribute type is defined for a metadata object.
18130 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
18132 * object-internals.h: Added some needed fields from StringBuilder class.
18133 * marshal.c: Set the maxCapacity when creating a StringBuilder.
18135 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
18137 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
18138 threads before shutting down the runtime.
18140 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
18142 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
18144 * object-internal.h, threads.c: implement stacksize and
18145 parameterized thread start functionality (requires
18146 matching corlib). Marked broken code for later removal.
18148 2005-01-12 Martin Baulig <martin@ximian.com>
18150 * class-internals.h (MonoGenericClass): Moved the `initialized'
18151 flag to MonoDynamicGenericClass, removed `init_pending'.
18152 (MonoGenericInst): Added `is_reference' flag.
18154 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
18156 * reflection.c (mono_image_create_pefile): Only set the pe_offset
18157 inside the MSDOS header. Fixes #71201.
18159 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
18161 (mono_domain_finalize): Ditto.
18163 2005-01-12 Martin Baulig <martin@ximian.com>
18165 * class.c (mono_get_shared_generic_class): Use the cache for
18166 non-dynamic generic classes.
18168 * class-internals.h (mono_class_create_generic_2): Removed
18169 function prototype, this function is now static inside class.c.
18171 * class.c (mono_class_create_generic_2): Made this static, only
18172 call it from mono_class_init() and mono_class_setup_parent().
18173 (collect_implemented_interfaces_aux): Call mono_class_init() on
18174 the interfaces we collect.
18175 (mono_class_setup_vtable): Call mono_class_init (class->parent).
18177 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
18179 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
18180 it a real thread handle.
18182 * domain-internals.h: Move exvar_offset from MonoJitInfo to
18183 MonoJitExceptionInfo, since each catch clause needs its own variable.
18185 2005-01-11 Dick Porter <dick@ximian.com>
18187 * image.c (mono_pe_file_open): New variant on mono_image_open()
18188 that does not set up the CLI metadata; used for FileVersionInfo so
18189 it can get the data for windows binaries too.
18191 * process.c (process_read_string_block): Don't read off the end of
18192 the StringTable block.
18194 These both fix bug 70766.
18196 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
18198 * gc.c: set some fields to NULL at GC cleanup time.
18199 * threads.c: if we quit the main thread, call exit ().
18201 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
18203 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
18205 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
18207 * threads.h, threads.c, object.c: added accessor and settor for
18208 main_thread. Handle it specially when exiting from it: wait
18209 for other foreground threads to exit.
18211 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
18213 * process.c, verify.c: remove some bloat.
18215 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
18217 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
18218 the calling convention to cdecl under win32.
18220 2005-01-08 Ben Maurer <bmaurer@ximian.com>
18222 * object.c (mono_object_get_size): New function to get the size of
18223 an object instance.
18225 * profiler.c (simple_allocation): Use above.
18227 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
18229 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
18230 ves_icall_System_AppDomain_getRootDomain (as it's not required to
18231 get an appdomain by it's id and we can't assume the root's id is 0).
18232 * domain-internals.h: Change the function prototype to match.
18233 * icall.c: Change the icall table for AppDomain.
18235 2005-01-08 Miguel de Icaza <miguel@ximian.com>
18237 * locales.c (string_invariant_compare_char): Only compute
18238 GUnicodeTypes in the case where we need them. Test for ordinality
18239 first and return if so.
18244 * FIXME: here we must use the information from c1type and c2type
18245 * to find out the proper collation, even on the InvariantCulture, the
18246 * sorting is not done by computing the unicode values, but their
18247 * actual sort order.
18250 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
18252 * loader.c: for P/Invoke methods, allow the "Internal" shared
18253 library name to refer to the calling process symbol namespace.
18255 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
18257 * Makefile.am: Add the security manager to the build.
18258 * security-manager.c|h: New. Initialization of the security manager.
18260 2005-01-07 Dick Porter <dick@ximian.com>
18263 * monitor.c: Update thread state during Monitor and WaitHandle
18264 waits. Fixes bug 71031.
18266 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
18268 * reflection.c (property_encode_signature): Correctly handle when the
18269 property has no methods.
18271 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
18273 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
18275 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
18276 fields from mb, not rmb. Fixes #71017.
18278 * marshal.c (emit_ptr_to_str_conv): Add support for
18279 ByValTStr -> string conversion. Fixes #71015.
18281 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
18283 * mempool.c (mono_mempool_contains_addr): New helper function.
18285 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
18287 * metadata.c (mono_metadata_compute_size): Fix size calculation of
18288 HasSematics encoded fields.
18290 * metadata.c (mono_type_to_unmanaged): Improve error message for
18291 invalid string marshalling.
18293 * metadata.c: Fix warnings.
18295 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
18297 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
18300 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
18302 * domain.c object.c domain-internals.h: Revert part of r38077 since the
18303 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
18306 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
18308 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
18309 so methods containing these can be AOTed.
18311 2005-01-03 Martin Baulig <martin@ximian.com>
18313 * loader.c (find_method): Removed the hack for generic instances.
18314 (method_from_memberref): If our parent is a generic instance, pass
18315 its generic type definition to find_method() and then inflate the
18317 (mono_get_method_constrained): Pass the generic type definition to
18318 find_method() and inflate the method later.
18320 * class-internals.h (MonoStats): Added `generic_class_count'.
18322 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
18323 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
18325 * reflection.c (mono_custom_attrs_from_params): Don't ignore
18326 generic type definitions.
18328 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
18330 * loader.c icall.c: Fix warnings.
18332 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
18334 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
18335 blittable types. Fixes #70864.
18337 2004-12-29 Martin Baulig <martin@ximian.com>
18340 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
18342 * reflection.c (mono_method_get_object): Create a
18343 "System.Reflection.MonoGenericMethod" for inflated methods; don't
18344 call mono_get_inflated_method().
18346 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
18348 2004-12-27 Martin Baulig <martin@ximian.com>
18350 * class-internals.h (MonoMethod): Added `is_inflated' flag.
18351 (MonoMethodInflated): Added `inflated' field.
18353 * class.c (mono_class_inflate_generic_method): Don't really
18354 inflate the method here; just set the `is_inflated' flag in the
18356 (mono_class_get_inflated_method): Actually inflate the method here
18357 if it's not already inflated; we use the MonoMethodInflated's new
18358 `inflated' field as a cache.
18360 2004-12-26 Martin Baulig <martin@ximian.com>
18363 (inflate_generic_class): Moved some code out of inflate_generic_type().
18364 (mono_class_inflate_generic_method): If we're already inflated,
18365 inflate the context and use the declaring method; ie. make sure
18366 the declaring method of an inflated method is always the generic
18368 (mono_class_create_from_typedef): Create
18369 `class->generic_container->context->gclass'.
18371 2004-12-24 Ben Maurer <bmaurer@ximian.com>
18373 * metadata-internals.h, marshal.c, reflection.c: More
18374 MonoGHashTable->GHashTable.
18376 * domain-internals.h, class.c: Change MonoGHashTable's into
18377 GHashTables for some cases where no gc stuff is used
18379 All users: update apis
18381 2004-12-23 Ben Maurer <bmaurer@ximian.com>
18383 * metadata.c (builtin_types): Make this `const'. Makes this get
18384 put into the shareable section.
18385 (mono_metadata_init): Casts to make gcc happy.
18387 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
18389 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
18391 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
18393 * icall.c: Added an internal call to retrieve the position and length
18394 of assembly-level declarative security attributes (RequestMinimum,
18395 RequestOptional and RequestRefuse). This is used by the Assembly class
18396 to re-create the corresponding permission sets.
18398 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
18400 * marshal.c: fix the stelemref wrapper to be type correct
18403 2004-12-20 Ben Maurer <bmaurer@ximian.com>
18405 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
18406 to do key & 0x7fffffff. Hashtable already does this. It just
18407 results in longer code.
18409 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
18411 * appdomain.c: Bump corlib version.
18412 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
18413 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
18414 * reflection.c|h: Add functions to get declarative security infos
18415 (blob position and length) for assemblies, classes and methods.
18417 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
18419 * reflection.c: sort the constant table (bug #70693).
18421 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
18423 * object-internals.h, threads.c, domain.c: add accessors for
18424 the MonoThread and MonoDomain tls keys.
18426 2004-12-18 Martin Baulig <martin@ximian.com>
18428 * class.c (inflate_generic_type): If we're inflating a generic
18429 instance, set `ngclass->context->container = context->container';
18430 ie. the container we inflated into.
18432 * metadata.c (mono_metadata_parse_generic_param): Reflect above
18433 inflate_generic_type() changes.
18435 2004-12-17 Martin Baulig <martin@ximian.com>
18437 * class-internals.h
18438 (MonoGenericClass): Replaced `MonoType *generic_type' with
18439 `MonoClass *generic_class'. Removed `dynamic_info'; if
18440 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
18441 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
18443 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
18445 * exception.c (mono_exception_from_token): New helper function.
18447 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
18449 * assembly.c (mono_assembly_load_with_partial_name): Call
18450 mono_assembly_loaded before invoking the preload hooks. Fixes
18453 * object-internals.h (MonoThread): Change culture_info and
18454 ui_culture_info into an array.
18456 * threads.c: Cache culture info objects from more than one appdomain.
18458 * threads.c threads-types.h icall.c: Add icalls for manipulating the
18459 current UI culture.
18461 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
18463 * threads.h threads.c appdomain.c: Clear the culture_info field of
18464 all threads during unloading if they point to an object in the dying
18467 2004-12-13 Ben Maurer <bmaurer@ximian.com>
18469 * culture-info.h (TextInfoEntry): New struct
18470 * object-internals.h: sync with managed
18471 * locales.c: fill the `text_info_data' field
18472 * culture-info-tables.h: update
18474 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
18476 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
18479 2004-12-12 Ben Maurer <bmaurer@ximian.com>
18481 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
18482 (ves_icall_ModuleBuilder_getMethodToken): Ditto
18484 2004-12-12 Martin Baulig <martin@ximian.com>
18486 * mono-debug-debugger.c (write_type): If we're an enum and the
18487 builtin types have already been initialized, call mono_class_init().
18489 2004-12-11 Martin Baulig <martin@ximian.com>
18491 * metadata.c (mono_metadata_load_generic_params): Added
18492 `MonoGenericContainer *parent_container' argument; automatically
18493 compute `container->is_method'; pass the correct owner to
18496 * reflection.c (compare_genericparam): Sort the GenericParam table
18497 according to increasing owners.
18499 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
18501 * profiler.c: allow disabling the default profiler.
18503 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
18505 * decimal.c, icall.c: allow disabling System.Decimal support.
18507 2004-12-09 Marek Safar <marek.safar@seznam.cz>
18509 * reflection.c: Add support for null attribute arguments.
18511 2004-12-09 Martin Baulig <martin@ximian.com>
18513 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
18514 names to get rid of compiler warnings.
18516 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
18518 * marshal.c (mono_marshal_get_struct_to_ptr): Call
18519 mono_marshal_load_type_info (). Fixes #69625.
18520 (mono_marshal_get_ptr_to_struct): Likewise.
18522 2004-12-08 Martin Baulig <martin@ximian.com>
18524 * mono-debug.h: Bumped version number to 47.
18526 * mono-debug-debugger.c
18527 (mono_debugger_event_handler, mono_debugger_event): Take two
18528 guint64 arguments insteed of a gpointer and a guint32.
18530 2004-12-08 Martin Baulig <martin@ximian.com>
18532 * debug-mono-symfile.h
18533 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
18534 `address' to `native_offset'.
18536 2004-12-08 Martin Baulig <martin@ximian.com>
18538 * class.c (mono_class_create_from_typespec): Only inflate if we
18539 either have `context->gclass' or `context->gmethod'.
18541 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
18543 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
18545 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
18547 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
18549 * reflection.c (mono_assembly_get_object): Remove the workaround put
18550 in for the release.
18552 * appdomain.c: Use the corlib_internal field from MonoAssembly.
18554 * appdomain.c: Bump corlib version.
18556 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
18557 be visible in other appdomains.
18559 2004-12-07 Ben Maurer <bmaurer@ximian.com>
18561 * threads.c: Interlocked inc and dec for longs were messed up,
18562 use a KISS based impl for this. Fixes 70234
18564 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
18566 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
18568 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
18570 * icall.c: fix to follow policy not to allow struct
18571 arguments in icalls.
18573 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18575 * process.c: make the patch that handles spaces in file paths work
18576 on mono/windows too.
18578 2004-12-06 Martin Baulig <martin@ximian.com>
18580 * class.c (mono_class_create_generic): Call
18581 mono_class_setup_supertypes() if we're dynamic.
18582 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
18584 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
18586 * object-internals.h: Add new fields to MonoThread.
18588 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18590 * icall.c threads-types.h threads.c: Add new icalls.
18592 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
18594 * object-internals.h (MonoReflectionAssembly): Sync object layout with
18597 * appdomain.c: Bump corlib version.
18599 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
18600 internal assemblies. Fixes #69181.
18602 2004-12-05 Martin Baulig <martin@ximian.com>
18604 * class.c (mono_class_inflate_generic_signature): Make this a
18605 no-op if `context' is NULL or we don't have any type parameters;
18606 also copy `sentinelpos'.
18608 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
18610 * image.c: Add unbox_wrapper_cache.
18612 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
18614 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
18615 function generator.
18617 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
18620 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
18622 2004-12-04 Martin Baulig <martin@ximian.com>
18624 * loader.c (mono_method_get_signature_full): New public function;
18625 like mono_method_get_signature(), but with an additional
18626 `MonoGenericContext *' argument.
18628 * class.c (mono_class_inflate_generic_signature): Formerly known
18629 as inflate_generic_signature(); make this public.
18631 2004-12-04 Martin Baulig <martin@ximian.com>
18634 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
18635 instead of a `MonoGenericContainer *'.
18636 (mono_metadata_parse_array_full): Likewise.
18637 (mono_metadata_parse_signature_full): Likewise.
18638 (mono_metadata_parse_method_signature_full): Likewise.
18639 (mono_metadata_parse_generic_inst): Likewise.
18640 (mono_metadata_parse_generic_param): Likewise.
18641 (mono_metadata_parse_mh_full): Likewise.
18642 (mono_type_create_from_typespec_full): Likewise.
18644 2004-12-03 Martin Baulig <martin@ximian.com>
18646 * class-internals.h (MonoGenericContainer): Replaced the
18647 `MonoGenericContext * pointer with a `MonoGenericContext'
18648 structure and made it the first element.
18650 2004-12-03 Martin Baulig <martin@ximian.com>
18653 (inflate_generic_type): Set the `context->container' when creating
18654 a new MonoGenericContext.
18655 (mono_class_inflate_generic_method): Likewise.
18656 (mono_class_create_from_typespec): Just use `context->container'
18657 to get the container.
18659 * loader.c (method_from_methodspec): Set `context->parent' from
18660 `context->container' - and if that's a method container, use its
18661 parent. Also set the `context->container' when creating a new
18662 MonoGenericContext.
18663 (mono_get_method_from_token): Use just `context->container' to get
18666 * metadata.c (do_mono_metadata_parse_generic_class): Also set
18667 `gclass->context->container'.
18669 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
18670 the `context->container' when creating a new MonoGenericContext.
18672 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
18674 * reflection.c (compare_genericparam): Sort params with identical
18675 owner by their number. Fixes gen-111 on sparc.
18677 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
18679 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
18680 around the domain changes.
18682 * appdomain.c (mono_domain_unload): Handle the case when the thread
18683 calling Unload is itself being aborted during unloading. Fixes #70022.
18685 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
18687 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
18688 checkpoint_func as an icall so it gets a wrapper.
18689 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
18690 in the cross-appdomain wrappers too.
18692 * threads.c (mono_thread_has_appdomain_ref): Make this public.
18694 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
18696 * reflection.c: Fix some memory leaks.
18698 2004-12-02 Martin Baulig <martin@ximian.com>
18700 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
18702 * metadata.c (generic_class_cache): New static hashtable.
18703 (mono_metadata_lookup_generic_class): New public method.
18705 2004-12-02 Martin Baulig <martin@ximian.com>
18707 * class.c (mono_class_create_from_typedef): Call
18708 mono_class_setup_parent() and mono_class_create_mono_type() before
18709 parsing the interfaces.
18711 2004-12-02 Martin Baulig <martin@ximian.com>
18713 * metadata.c (generic_inst_cache): New static hashtable.
18714 (mono_metadata_lookup_generic_inst): New public function.
18715 (mono_metadata_inflate_generic_inst): New public function.
18716 (mono_metadata_parse_generic_inst): New public function.
18717 (do_mono_metadata_parse_generic_class): Use the new
18718 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
18719 since this'll also use the cache.
18721 * reflection.c (mono_reflection_bind_generic_method_parameters):
18722 Use mono_metadata_lookup_generic_inst() to use the new cache.
18724 * class.c (inflate_mono_type): Use
18725 mono_metadata_inflate_generic_inst() to inflate a generic
18726 instance; this'll also use the new cache.
18728 * loader.c (method_from_methodspec): Use
18729 mono_metadata_parse_generic_inst() and
18730 mono_metadata_inflate_generic_inst() rather than parsing it
18731 manually, so we can use the new cache.
18733 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
18735 * threads.c (wait_for_tids): Do not incorrectly free threads when
18736 the wait times out.
18738 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18740 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
18741 iter->args based on whether parameters are passed in registers (i.e.
18742 MONO_ARCH_REGPARMS is defined)
18744 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
18746 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
18747 the exception message. Fixes #70070.
18748 (method_from_methodspec): Fix warnings.
18750 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18752 * process.c: (complete_path) return the path quoted
18754 2004-12-01 Martin Baulig <martin@ximian.com>
18756 * class-internals.h (MonoGenericInst): New structure.
18757 (MonoGenericClass): Replaced `type_argc', `type_argv' and
18758 `is_open' with `MonoGenericInst *inst'.
18759 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
18760 `is_open' with `MonoGenericInst *inst'.
18762 2004-11-30 Martin Baulig <martin@ximian.com>
18764 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
18766 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
18767 to `generic_class_cache'.
18770 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
18771 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
18772 (mono_generic_inst_is_valuetype): Renamed to
18773 mono_generic_class_is_valuetype().
18775 * class-internals.h
18776 (MonoGenericInst): Renamed to MonoGenericClass.
18777 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
18778 (MonoClass): Renamed `generic_inst' to `generic_class'.
18779 (MonoGenericContext): Renamed `ginst' to `gclass'.
18781 * object-internals.h
18782 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
18784 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
18785 mono_reflection_generic_class_initialize().
18787 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
18788 now known as "System.Reflection.MonoGenericClass".
18789 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
18791 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
18793 * class-internals.h: Added a flag field to MonoClass to cache the
18794 declarative security attributes actions associated with the class.
18795 * domain-internals.h: Added booleans to MonoJitInfo to cache the
18796 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
18797 applicable to the JITted method.
18798 * reflection.c|h: Added functions to extract (as flags) which security
18799 actions are available (declaratively) for a method, class or assembly.
18800 * metadata.c|h: Added functions to search the declarative security
18801 table in the metadata.
18803 2004-11-29 Ben Maurer <bmaurer@ximian.com>
18805 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
18806 EXPORTEDTYPES are already in the class name cache, so there is no
18807 need to add extra code here to look at them. Just removes a bit of
18810 (ves_icall_System_Environment_get_TickCount): No need for #if
18811 WINDOWS. We already have the code in io-layer.
18813 2004-11-28 Martin Baulig <martin@ximian.com>
18816 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
18819 2004-11-27 Miguel de Icaza <miguel@ximian.com>
18821 * assembly.c (do_mono_assembly_open): Instead of having a
18822 conditional WITH_BUNDLE, incorporate support for bundles here, by
18823 having a global `bundles' variable holding a pointer to the actual
18826 (mono_register_bundled_assemblies): New API call used by the
18829 See mkbundle.1 for details.
18831 2004-11-27 Martin Baulig <martin@ximian.com>
18833 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
18834 the vtable for generic methods.
18836 2004-11-26 Martin Baulig <martin@ximian.com>
18839 (mono_metadata_generic_method_hash): New public function.
18840 (mono_metadata_generic_method_equal): Likewise.
18842 * class-internals.h
18843 (MonoGenericContainer): Added `GHashTable *method_hash'.
18845 * reflection.c (ReflectionMethodBuilder): Added
18846 `MonoGenericContainer *generic_container'.
18847 (reflection_methodbuilder_to_mono_method): Don't create a new
18848 MonoGenericContainer each time we're called.
18849 (mono_reflection_bind_generic_method_parameters): Use
18850 `container->method_hash' to cache the results so we don't create a
18851 different method if we're called several times with the same
18854 * loader.c (method_from_methodspec): Use the new
18855 `container->method_hash' here, too.
18857 2004-11-26 Martin Baulig <martin@ximian.com>
18859 * class.c (inflate_generic_signature): Correctly compute
18860 `res->has_type_parameters'.
18861 (mono_class_vtable): Use the `has_type_parameters' flag to
18862 determine whether we're a generic method.
18864 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
18866 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
18868 * object.c (mono_runtime_run_main): Fix a small memory leak.
18870 2004-11-25 Martin Baulig <martin@ximian.com>
18872 * class.c (set_generic_param_owner): Fixed the loop.
18874 2004-11-25 Martin Baulig <martin@ximian.com>
18876 * object.c (mono_class_vtable): Don't create any JIT wrappers for
18879 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
18881 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
18882 names. Fixes #69787.
18884 2004-11-24 Martin Baulig <martin@ximian.com>
18886 * class.c (mono_class_create_generic_2): If we don't have a
18887 `ginst->parent', inflate `gklass->parent' to get our parent.
18889 2004-11-24 Martin Baulig <martin@ximian.com>
18891 * reflection.c (compare_genericparam): Correctly sort the
18892 GenericParam table; fixes #69779.
18894 2004-11-23 Ben Maurer <bmaurer@ximian.com>
18896 * reflection.c: When writing a PE file, don't create a huge
18897 buffer in memory. Just write the arrays we have to the file.
18898 This reduces memory usage.
18900 * metadata-internals.h: MonoDynamicStream pefile is no longer used
18903 2004-11-17 Martin Baulig <martin@ximian.com>
18905 * class.c (mono_class_init): Don't setup `class->parent' for
18906 dynamic instances; moved this to mono_class_generic_2().
18907 (mono_class_create_generic): Also set `klass->inited' for dynamic
18909 (mono_class_create_generic_2): Don't do anything for dynamic
18910 generic instances. Set `klass->parent' here and also call
18911 mono_class_setup_parent() here.
18913 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
18914 `MonoType *parent' argument; set `ginst->parent' before calling
18915 mono_class_create_generic_2(), so we set the correct parent.
18917 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
18919 * reflection.c: allow getting attributes from ModuleBuilder
18922 2004-11-17 Martin Baulig <martin@ximian.com>
18924 * class.c (mono_class_create_from_typedef): If a type parameter is
18925 inherited from an outer class, set its owner to that class.
18927 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
18929 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
18930 for (int*) written size. This fixes bug #69592.
18932 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
18934 * icall.c: Added IsAuthenticodePresnet internal call.
18935 * image.c|h: New function that check a MonoImage for an Authenticode
18936 signature in the certificate PE data directory.
18937 * security.c|h: New internal call to ask the runtime if an
18938 Authenticode signature seems referenced in the PE header.
18940 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
18942 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
18944 * reflection.c (mono_image_create_pefile): Free the assembly streams
18945 after writing out the assembly file.
18947 * object.c (mono_runtime_run_main): Fix small memory leak.
18949 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
18950 property access modifiers. Fixes #69389.
18952 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
18954 * domain.c, object.c, object-internals.h, domain-internals.h,
18955 object.h, marshal.c: keep dynamic code info per domain.
18957 2004-11-15 Martin Baulig <martin@ximian.com>
18959 * class.c (mono_type_get_name_recurse): Put type arguments in
18960 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
18963 2004-11-15 Martin Baulig <martin@ximian.com>
18965 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
18966 (mono_class_setup_vtable): When computing `the_cname' for a
18967 generic instance, don't include the namespace since we'd otherwise
18970 2004-11-15 Martin Baulig <martin@ximian.com>
18972 * class.c (mono_class_create_generic): Changed return type to void.
18973 (mono_class_create_generic_2): New public function; setup
18974 `class->method', `class->field' and `class->interfaces' here
18975 instead of in mono_class_init().
18977 * class.h (mono_class_create_generic): Moved to class-internals.h.
18979 2004-11-14 Ben Maurer <bmaurer@ximian.com>
18981 * reflection.c (mono_image_create_pefile): take a file HANDLE.
18982 rather than writing to memory, write to this file. Right now,
18983 we are just writting into a buffer, and copying that. However
18984 we can avoid the buffer later.
18986 (mono_dynamic_stream_reset): new function
18988 * icall.c, object-internals.h: update for the above.
18990 2004-11-13 Ben Maurer <bmaurer@ximian.com>
18992 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
18993 have been using gc'd memory. First it is slower, unlikely
18994 the comment in the source code said, secondly, it increases
18995 our footprint to do it in the gc.
18997 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
18998 the method so that it does not have to copy to managed code.
19000 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
19002 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
19004 2004-11-12 Martin Baulig <martin@localhost>
19006 * reflection.c (mono_image_create_token): Allow generic method
19007 definitions here, since they may appear in an `.override'; see
19008 gen-98/gen-99 for an example.
19010 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
19012 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
19015 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
19018 2004-11-11 Martin Baulig <martin@ximian.com>
19020 * class.c (mono_class_setup_vtable): In an explicit interface
19021 implementation, the method name now includes the arity.
19023 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
19025 * object.c (mono_array_full_copy): Fix warning.
19027 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
19029 * appdomain.c: Removed look_for_method_by_name(). Use the new method
19030 mono_class_get_method_from_name() instead.
19032 * class-internals.h: Added two new types of wrappers.
19033 Added MonoRemotingTarget enum. Added new trampoline function type, which
19034 takes an additional MonoRemotingTarget value as parameter, so it is
19035 possible to request a trampoline for a specific target.
19037 * class.c: Added new mono_class_get_method_from_name() method.
19039 * class.h: In MonoRemoteClass, we can have now to vtables, one for
19040 general remoting sinks and one specific for cross domain calls.
19042 * debug-helpers.c: Added new wrapper names.
19044 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
19047 * image.c: Porperly delete value objects form the remoting invoke hashtable.
19049 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
19050 with several other methods (mono_marshal_get_xappdomain_dispatch,
19051 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
19052 and others) can generate a fast remoting wrapper for cross domain calls.
19053 More information can be found in docs/remoting.
19054 Other changes: Removed mono_find_method_by_name, and used
19055 mono_class_get_method_from_name instead.
19056 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
19057 is stored in the remoting invoke hashtable.
19059 * marshal.h: published the new method for getting the xdomain wrapper,
19060 and also added a method for getting the adequate wrapper for a given
19063 * object-internals.h, object.c: Added a couple of methods for capying and
19065 Modified mono_install_remoting_trampoline, which takes the new remoting
19066 trampoline that has a remoting target as parameter.
19067 mono_class_proxy_vtable now also takes a remoting target as parameter, and
19068 will return the most suitable vtable for the target.
19069 Added mono_remote_class_vtable, which returns the vtable of a remote class
19070 (which can be the normal remoting vtable or the xdomain vtable).
19072 * threads.c: the xdomain invoke and dispatch wrappers must also be
19073 protected against interruptions.
19075 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19077 * icall.c: use memmove in BlockCopyInternal when the source and
19078 destination arrays are the same.
19080 2004-11-09 Martin Baulig <martin@ximian.com>
19082 * class-internals.h (MonoGenericContainer): Removed `method' and
19083 `signature', replaced them with `is_method' and `is_signature'
19084 flags. Added `context'.
19086 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
19087 instead of a `MonoGenericContainer *'.
19089 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
19090 for dynamic type parameters.
19091 (mono_metadata_load_generic_params): Setup `container->context'.
19093 * reflection.c (mono_reflection_setup_generic_class): Setup
19094 `tb->generic_container->context'.
19095 (do_mono_reflection_bind_generic_parameters): Use
19096 mono_class_inflate_generic_type() to correctly inflate types,
19097 rather than using our own hack just for MONO_TYPE_VAR.
19099 2004-11-09 Martin Baulig <martin@ximian.com>
19101 * class.c (mono_class_inflate_generic_method): Small fix; don't
19105 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
19106 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
19107 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
19108 (ves_icall_Type_BindGenericParameters): Likewise.
19109 (ves_icall_Type_get_IsGenericInstance): Likewise.
19110 (ves_icall_Type_GetGenericParameterPosition): Likewise.
19111 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
19112 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
19113 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
19115 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
19117 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
19118 assembly versions and public key tokens. Fixes #69113.
19120 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
19122 * metadata.c: fix bug introduced with the type cache changes
19125 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
19127 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
19128 the MonoClass pointer instead of the token in exception clauses.
19129 * reflection.c: updates for the above and make the code not depend
19130 on the structure of MonoExceptionClause.
19132 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
19134 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
19135 Add support for dynamic assemblies. Fixes #69114.
19137 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
19139 2004-11-07 Ben Maurer <bmaurer@ximian.com>
19141 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
19142 since most only those methods use it. the code member of
19143 MonoMethodPInvoke was dead, so that can be removed too. Also,
19144 remove inline_count (again, not used), and move slot so that it
19145 can share bits with some other flags. This saves 8 bytes in the
19146 structure and gives us about 50 kb back for mcs helloworld.cs
19148 * *.[ch]: Do naming changes for the above.
19150 * loader.c (mono_method_get_header): Lazily init the header
19152 (mono_get_method_from_token): don't init the header here
19153 (mono_free_method): the header may never be allocated
19155 Overall, this saves 150 kb of unmanaged allocations
19156 for mcs helloworld.cs. That accounts for 10% of the unmanaged
19159 * loader.c, loader.h (mono_method_get_header): new accessor.
19161 * *.[ch]: use the above method. Prepares us to lazily load
19164 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
19165 three warnings, which are actual bugs (see 69206).
19167 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
19168 unused. Saves a cool 4 bytes / method.
19170 2004-11-06 Ben Maurer <bmaurer@ximian.com>
19172 * metadata.c (builtin_types): Add types for System.Object here.
19173 (mono_metadata_parse_type_full): Cache MonoType*'s that are
19174 for a class or valuetype from klass->this_arg or klass->byval_arg.
19176 On mcs for a hello world, this gets us down from 21836 MonoType's
19179 (mono_metadata_free_type): Account for the above change.
19181 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
19183 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
19184 exception instead of asserting if name is null.
19185 (ves_icall_System_AppDomain_GetData): Ditto.
19187 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
19189 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
19192 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
19193 Return NULL when the domain does not have entry_assembly set.
19195 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
19196 Add a 'resource_modules' argument.
19197 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
19199 * reflection.c (mono_reflection_create_runtime_class): Move setting
19200 of wastypebuilder here, so mono_get_type_object () returns a MonoType
19203 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
19204 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
19205 Throw an ArgumentNullException if 'ptr' is null.
19207 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
19208 assemblies here. Fixes #69020.
19210 2004-11-05 Geoff Norton <gnorton@customerdna.com>
19212 * reflection.c (build_compressed_metadata): Fix the previous patch for
19213 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
19216 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
19218 * assembly.c (mono_assembly_names_equal): Allow a match if one of
19219 the cultures is false. Fixes #69090.
19221 * reflection.c (build_compressed_metadata): Fix invalid memory read
19222 detected by valgrind.
19224 * reflection.c (mono_reflection_get_type): Avoid triggering a
19225 TypeResolve multiple times for the same type. Fixes #65577.
19227 2004-11-04 Ben Maurer <bmaurer@ximian.com>
19229 * marshal.c: Avoid using ldftn to call managed functions. It is
19230 much slower than just a call.
19232 * reflection.c (mono_module_get_object): free the basename we
19233 allocate here from glib.
19235 * reflection.c (ensure_runtime_vtable): make sure to free
19236 overrides. Also, we were allocating an array of MonoMethod not an
19237 array of MonoMethod*.
19239 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
19241 * image.c (mono_image_close): free image->guid here.
19243 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
19245 * reflection.c: Fix some spec conformance issues with the PE file
19246 structures so mcs compiled apps run on the Net 2.0 beta.
19248 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
19250 * string-icalls.c (ves_icall_System_String_ctor_encoding):
19251 Implement this. Fixes #67264.
19253 * debug-helpers.h debug-helpers.c marshal.c: Move
19254 mono_find_method_by_name to debug-helpers.c.
19256 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
19258 * object.c (mono_release_type_locks): type_initialization_hash is
19261 * reflection.c object.c object-internals.h: Fix warnings.
19263 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
19264 without accessors. Fixes #61561.
19266 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
19267 application base from the root domain if not set. Fixes #65641.
19268 (mono_runtime_init): Fix warning.
19270 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19272 * appdomain.c: call mono_thread_pool_init.
19273 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
19274 of worker threads based on the number of CPUs and the environment
19275 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
19276 for non-windows (windows) systems.
19278 2004-10-27 Chris Toshok <toshok@ximian.com>
19280 * mono-debug-debugger.c (write_class): don't call mono_class_init
19281 here, as even with the check for (!klass->init_pending), we get
19282 into a situation where we're hitting cycles in class
19283 initialization. Fixes #68816.
19285 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
19287 * image.c: Avoid overwriting values in the loaded_images_hash when an
19288 assembly is loaded multiple times. Fixes #61152.
19290 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
19291 so multiple satellite assemblies for the same name can be loaded.
19294 * mono_domain_assembly_preload: Actually return the loaded assembly,
19297 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
19298 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
19300 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
19301 pending finalizers are not invoked after the appdomain has been
19302 unloaded. Fixes #67862.
19304 2004-10-22 Martin Baulig <martin@ximian.com>
19306 * mono-debug-debugger.c
19307 (mono_debugger_runtime_invoke): Don't box valuetypes.
19309 2004-10-22 Chris Toshok <toshok@ximian.com>
19311 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
19312 don't hide private methods.
19314 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
19316 * icall.c: Allows the runtime to "share" (when known) the public key
19317 token of an assembly. This avoid the need to recalculate the token
19318 (from the public key) in managed code.
19320 2004-10-21 Chris Toshok <toshok@ximian.com>
19322 * debug-helpers.c (append_class_name): argh, revert last patch.
19324 2004-10-21 Chris Toshok <toshok@ximian.com>
19326 * debug-helpers.c (append_class_name): use '+' as the delimiter,
19327 not '/', so that it matches what the debugger uses to look up
19330 2004-10-21 Martin Baulig <martin@ximian.com>
19332 * mono-debug-debugger.c (mono_debugger_throw_exception): New
19333 public method; this is called each time an exception is thrown and
19334 allows the debugger to use exception catch points.
19336 2004-10-21 Martin Baulig <martin@ximian.com>
19338 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
19339 the stack pointer and the exception object in some struct and pass
19340 that to the debugger.
19342 2004-10-21 Chris Toshok <toshok@ximian.com>
19344 * mono-debug-debugger.c (do_write_class): add instance/static
19345 event support. We don't expose "raise" or "other" yet.
19346 (event_is_static): new method.
19348 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
19350 * mono-debug-debugger.c
19351 (mono_debugger_handle_exception): Remove
19352 bogus return value for fussy compilers.
19354 2004-10-20 Martin Baulig <martin@ximian.com>
19356 * mono-debug-debugger.c
19357 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
19358 (mono_debugger_handled_exception): Likewise.
19360 2004-10-20 Martin Baulig <martin@ximian.com>
19362 * mono-debug-debugger.h (MonoDebuggerEvent): Added
19363 MONO_DEBUGGER_EVENT_EXCEPTION.
19365 * mono-debug-debugger.c (mono_debugger_handle_exception): New
19366 public function to send the debugger a notification for an
19367 exception and inform it about a catch/finally clause.
19369 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
19371 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
19372 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
19375 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
19377 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
19379 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
19380 marshalled as [In,Out]. Fixes #58325.
19382 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
19384 * reflection.c (mono_method_body_get_object): Implement some fields.
19386 2004-10-12 Martin Baulig <martin@ximian.com>
19388 * reflection.c (mono_reflection_bind_generic_parameters): Small
19389 fix, correctly retrieve our parent from a generic instance.
19391 2004-10-12 Martin Baulig <martin@ximian.com>
19393 * metadata.c (mono_metadata_generic_param_equal): We always have
19397 (mono_class_from_generic_parameter): We need to have an owner.
19398 (my_mono_class_from_generic_parameter): Likewise.
19400 * reflection.c (mono_reflection_setup_generic_class): Renamed to
19401 mono_reflection_create_generic_class() and added a new
19402 mono_reflection_setup_generic_class().
19403 (mono_reflection_initialize_generic_param): If we're a nested
19404 generic type and inherited from the containing class, set our
19405 owner to the outer class.
19407 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
19409 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
19411 * reflection.c (mono_method_body_get_object): New function to create
19412 a MethodBody object.
19414 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
19416 2004-10-11 Martin Baulig <martin@ximian.com>
19418 * metadata.c (_mono_metadata_type_equal): Renamed to
19419 do_mono_metadata_type_equal() and made static.
19421 2004-10-11 Martin Baulig <martin@ximian.com>
19423 * appdomain.c: Bump corlib version number to 28.
19425 2004-10-10 Martin Baulig <martin@ximian.com>
19427 * class-internals.h
19428 (MonoGenericInst): Added `MonoGenericContainer *container'.
19429 (MonoGenericMethod): Likewise.
19430 (MonoGenericContext): Likewise.
19431 (MonoGenericParam): Added `MonoGenericContainer *owner'.
19434 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
19435 (do_mono_metadata_parse_generic_inst): Likewise.
19436 (mono_metadata_parse_type_full): New public method. This is the actual
19437 mono_metadata_parse_type() implementation - with an additional
19438 `MonoGenericContainer *' argument.
19439 (mono_metadata_parse_array_full): Likewise.
19440 (mono_metadata_parse_signature_full): Likewise.
19441 (mono_metadata_parse_method_signature_full): Likewise.
19442 (mono_metadata_parse_mh_full): Likewise.
19443 (mono_type_create_from_typespec): Likewise.
19444 (mono_metadata_interfaces_from_typedef_full): New public method;
19445 this is similar to the other _full() methods, but we take a
19446 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
19447 (mono_metadata_parse_generic_param): Take an additional
19448 `MonoGenericContainer *' argument and lookup the MonoGenericParam
19449 from that container.
19450 (mono_metadata_generic_param_equal): New static method to compare
19451 two type parameters.
19452 (_mono_metadata_type_equal): New static method; takes an
19453 additional `gboolean signature_only' argument - if true, we don't
19454 compare the owners of generic parameters.
19455 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
19456 with a TRUE argument - do a signature-only comparision.
19458 * loader.c: Use the new _full() methods and pass the
19459 MonoGenericContainer to them.
19461 * object-internals.h (MonoReflectionTypeBuilder): Added
19462 `MonoGenericContainer *generic_container' field.
19463 (MonoReflectionMethodBuilder): Likewise.
19465 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
19467 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
19468 case initial images of dynamic assemblies.
19470 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
19472 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
19474 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
19475 length of event->other array.
19476 (typebuilder_setup_events): Ditto.
19478 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
19479 'assembly_by_name' and add an 'assemblies' list.
19481 * assembly.h assembly.c: Add a new search hook for determining whenever
19482 an assembly is already loaded. Use this instead of searching in the
19483 loaded_assemblies list.
19485 * domain.c appdomain.c: Implement the new search hook so loaded
19486 assemblies are now scoped by appdomain. Fixes #67727.
19488 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
19490 * threads.c (mono_thread_attach): Initialize synch_lock field so
19491 mono_thread_detach works again.
19493 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
19494 'lib' too. Fixes #63130.
19496 2004-10-06 Jackson Harper <jackson@ximian.com>
19498 * culture-info-tables.h: regenerated.
19500 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
19502 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
19503 implemented by other interfaces in the result. Fixes #65764.
19505 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
19506 Handle unloadable modules without crashing.
19508 * image.c (load_modules): Revert the previous patch since modules must
19509 have a fixed index inside the array.
19511 * image.c (load_modules): Don't include native modules in the modules
19514 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
19516 * reflection.h: Add param_defaults field.
19518 * reflection.c: Add support for parameter defaults in dynamic methods.
19521 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
19522 an empty string when a type has no namespace. Fixes #64230.
19524 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
19526 * tabledefs.h: Added "internal" security actions to support non-CAS
19527 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
19528 Note: they do not seems to be used anymore in 2.0 (new metadata format)
19530 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
19532 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
19533 constructor of abstract class. Fixes #61689.
19535 2004-10-04 Martin Baulig <martin@ximian.com>
19537 * class-internals.h (MonoGenericContainer): New type.
19538 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
19539 `MonoGenericContainer *generic_container'.
19540 (MonoClass): Replaced `gen_params' and `num_gen_params' with
19541 `MonoGenericContainer *generic_container'.
19543 * metadata.c (mono_metadata_load_generic_params): Return a
19544 `MonoGenericContainer *' instead of a `MonoGenericParam *';
19545 removed the `num' argument.
19547 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
19549 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
19550 for dynamic images.
19552 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
19555 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
19557 * reflection.c: Save pe_kind and machine values into the generated
19560 * appdomain.c: Bump corlib version number.
19562 * object-internals.h: Reorganize layout of LocalBuilder.
19564 * class-internals.h class.c (mono_class_get_implemented_interfaces):
19565 New helper function.
19567 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
19568 created MonoType for dynamic types. Fixes #66180.
19570 2004-10-02 Ben Maurer <bmaurer@ximian.com>
19572 * threadpool.c: the ares hashtable needs a critical section around it.
19573 this prevents some nasty segfaults
19575 2004-10-02 Massimiliano Mantione <massi@ximian.com>
19577 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
19578 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
19581 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
19583 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
19585 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
19587 * image.c: Always canonicalize image file names, to avoid loading
19588 the same assembly twice when referenced using a relative path.
19590 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
19592 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
19594 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
19596 * marshal.c: Fix warnings.
19598 2004-09-29 Geoff Norton <gnorton@customerdna.com>
19600 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
19601 attempting to marshal the delegate_trampoline as the method_addr.
19602 This patch has a static hashtable of marshalled delegates so that
19603 we can map delegate_trampoline addresses back to delegates. This
19604 allows a delegate passed to managed code to be passed back into native
19607 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
19609 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
19611 * reflection.c (method_encode_code): Align method headers properly.
19614 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
19616 * marshal.c: In the runtime invoke wrapper, reset the abort
19617 exception if it is cached. This avoids the automatic rethrowal of
19618 the exception after the catch of the wrapper. Also check for pending
19619 interruptions before calling the managed method. This is done using
19620 the new method emit_thread_force_interrupt_checkpoint, since the
19621 normal checkpoint method is ignored when running the invoke wrapper.
19622 * object.c: If the abort exception is rethrown, set the abort_exc
19623 field of the thread, so it will be rethrown aftere every catch.
19624 * threadpool.c: Only run an interruption checkpoint if what has been
19625 requested is a stop of the thread (aborts will be ignored).
19626 * threads.c: By default, a thread will now never be interrumped while
19627 running the runtime invoke wrapper (this ensures that runtime_invoke
19628 will always return to the caller if an exception pointer is provided).
19629 There is a new special method mono_thread_force_interruption_checkpoint()
19630 to force an interruption checkpoint even if running a protected
19631 wrapper, which is used by the same runtime invoke wrapper to do a check
19634 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
19636 * object.c, object-internals.h: Implemented mono_release_type_locks,
19637 which releases the cctor locks held by a thread.
19638 * threads.c, threads.h: In thread_cleanup, release cctor locks held
19639 by a thread. Added mono_thread_exit() method to be used to safely stop
19642 2004-09-28 Raja R Harinath <rharinath@novell.com>
19644 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
19645 Move null check before dereference. Avoid indexing beyond the end
19646 of the 'modules' array.
19648 2004-09-28 Raja R Harinath <rharinath@novell.com>
19650 * metadata-internals.h (MonoImage): Add module_count field.
19651 * image.c (load_modules): Set image->module_count.
19652 (mono_image_load_file_for_image): Use image->module_count.
19653 * reflection.c (mono_image_load_module): Append to image->modules array
19654 of dynamic assembly.
19655 (mono_module_get_object): Fix loop to actually increment index.
19656 Use image->module_count.
19657 * assembly.c (mono_assembly_load_references): Use image->module_count.
19658 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
19661 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
19663 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
19664 Avoid assert on generic types.
19666 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
19668 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
19670 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
19672 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
19673 function to convert a MarshalSpec structure to its managed counterpart.
19675 * reflection.c: Fix warnings.
19677 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
19680 * icall.c (mono_create_icall_signature): Fix build.
19682 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
19684 * icall.c: Add MakePointType icall.
19686 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
19689 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19691 * threadpool.c: reuse allocated slots in the queue.
19693 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
19695 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
19697 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
19699 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
19702 * tabledefs.h: Add constants for pinvoke attributes BestFit and
19703 ThrowOnUnmappableChar.
19705 * icall.c (ves_icall_Type_GetPacking): New icall.
19707 2004-09-24 Martin Baulig <martin@ximian.com>
19709 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
19711 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19714 (mono_domain_set): allow setting a domain that is being unloaded.
19715 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
19718 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
19720 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
19721 the GetCustomAttributes icall.
19723 2004-09-23 Martin Baulig <martin@ximian.com>
19725 * object-internals.h (MonoReflectionGenericParam): Replaced
19726 'has_ctor_constraint', `has_reference_type' and `has_value_type'
19727 with `guint32 attrs'.
19729 2004-09-23 Martin Baulig <martin@ximian.com>
19731 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
19733 2004-09-23 Martin Baulig <martin@ximian.com>
19735 * object-internals.h (GenericParameterAttributes): New enum.
19737 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
19739 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
19741 * class.c (init_events): Fill out event->other field.
19743 * class.c: Fix warnings.
19745 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
19747 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
19749 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
19750 walk which doesn't supply the IL offset.
19752 2004-09-22 Martin Baulig <martin@ximian.com>
19754 * reflection.c (mono_reflection_setup_internal_class): If we're
19755 System.ValueType, System.Object or System.Enum, set
19756 `klass->instance_size' and create the vtable.
19757 (mono_reflection_create_internal_class): If we're an enum type,
19758 get the base class from our current corlib.
19760 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
19762 * reflection.h (MonoResolveTokenError): New type.
19764 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
19767 * icall.c: Add an 'error' argument to the ResolveToken icalls.
19769 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
19771 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
19772 Support also calling constructors, but only for already allocated objects.
19774 2004-09-17 Geoff Norton <gnorton@customerdna.com>
19776 * reflection.c (type_get_qualified_name): If the klass is null
19777 return the typename to avoid a NullRefEx.
19778 (encode_cattr_value): Get the qualified name of the boxed type,
19779 not the underlying enumtype. Fixes #62984.
19781 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
19783 * marshal.c: Fix problems with previous checkin.
19785 2004-09-21 <vargaz@freemail.hu>
19787 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
19788 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
19790 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
19792 2004-09-21 Geoff Norton <gnorton@customerdna.com>
19794 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
19795 should only return a type for pointers, arrays, and passbyref types.
19798 2004-09-21 Martin Baulig <martin@ximian.com>
19800 * domain.c (mono_debugger_check_runtime_version): New public
19803 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
19805 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
19807 * reflection.c: Added missing sort to the declarative security
19808 attributes table. MS implementation stops seeing the attributes if the
19809 token number regress in the table (as shown by ildasm and permview).
19811 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
19813 * object-internals.h (MonoReflectionModule): Add 'token' field.
19815 * reflection.c (mono_reflection_get_token): Add support for Module
19817 (mono_module_get_object): Set 'token' field.
19818 (mono_module_file_get_object): Set 'token' field.
19820 * icall.c: Add new Assembly and Module icalls.
19822 * appdomain.c: Bump corlib version.
19824 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
19826 * loader.h loader.c class.h class.c: Add helper functions for obtaining
19827 tokens of metadata objects.
19829 * reflection.h reflection.c (mono_reflection_get_token): New function
19830 to obtain the token of a metadata object.
19832 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
19834 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
19836 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
19838 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
19840 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
19842 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
19843 * object-internals.h: Added 3 MonoArray* members to MonoReflection
19844 AssemblyBuilder to access the permissions set in the class lib.
19845 * reflection.c: Added security attributes encoding step in
19846 mono_image_build_metadata.
19847 * tabledefs.h: Added new security actions defined in 2.0:
19848 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
19850 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
19852 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
19855 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
19857 * locales.c: nullify the ICU_collator member of CompareInfo when it is
19858 finalized. There where random SIGSEVs at program termination, when
19859 an object being finalized was trying to do a string comparison and
19860 the current culture was already finalized.
19862 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19864 * threads.c: call thread_cleanup before finishing the thread if we get
19867 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
19869 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
19870 assemblies from the parent. Fixes #65665.
19872 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
19874 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
19877 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
19879 * reflection.h: add prototype for mono_get_dbnull_object
19880 * reflection.c: add prototypes for get_default_param_value_blobs
19881 and mono_get_object_from_blob for fussier compilers
19883 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
19885 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
19886 false deadlock checks in class initialization.
19888 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
19890 * image.c (mono_image_addref): Fix comment.
19892 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
19895 2004-09-12 Jambunathan K <kjambunathan@novell.com>
19897 * reflection.c (mono_param_get_objects): Modified to return
19898 ParameterInfo.DefaultValue object.
19900 (get_default_param_value_blobs):
19901 (mono_get_object_from_blob):
19902 (mono_get_dbnull_object): New helper routines.
19904 * object.c (mono_get_constant_value_from_blob): New helper routine
19905 carved out from get_default_field_value ()
19907 * object-internals.h (mono_get_constant_value_from_blob): Added
19908 function declaration.
19910 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
19912 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
19913 referenced assemblies. Fixes #62135.
19915 * exception.h exception.c (mono_get_exception_file_not_found2): New
19918 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
19920 * class.h class.c: Add mono_type_get_underlying_type ().
19922 2004-09-09 Geoff Norton <gnorton@customerndna.com>
19924 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
19925 Fix GetTypes() to support dynamically created assemblies.
19927 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
19929 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
19931 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
19934 * reflection.h reflection.c loader.c: Allow dynamic construction of
19935 pinvoke methods. Fixes #65571.
19937 * reflection.c (mono_reflection_get_type): Revert previous change since
19938 it causes regressions.
19940 2004-09-08 Martin Baulig <martin@ximian.com>
19942 * class.c (class_compute_field_layout): Don't call
19943 mono_class_layout_fields() for open generic instances.
19945 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
19946 * threads.c appdomain.c: fix typo in GC macro
19948 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19950 * threads.c: don't call mono_thread_detach() in start_wrapper(),
19951 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
19953 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
19955 * image.c (mono_image_close): Applied patch from
19956 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
19957 assembly is loaded multiple times from data.
19959 * image.c (mono_image_open): Fix warning.
19961 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
19963 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
19964 once. Fixes #58334.
19966 * reflection.c (mono_reflection_create_runtime_class): Initialize
19967 klass->nested_classes. Fixes #61224.
19969 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19971 * threads.c: sched_yield() on exit, to allow threads to quit.
19973 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
19975 * object.c (mono_unhandled_exception): Remove leftover debug code.
19977 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
19979 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
19981 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
19983 * marshal.c (emit_marshal_array): Really null terminate string arrays.
19985 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
19987 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
19989 * marshal.c (emit_marshal_array): Null terminate string arrays.
19991 * marshal.c (raise_auto_layout_exception): Fix warning.
19993 * reflection.c (mono_param_get_objects): Initialize the default value
19994 with DBNull.Value, not null. Fixes #62123.
19996 2004-09-01 Miguel de Icaza <miguel@ximian.com>
19998 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
19999 throw an exception with a cute explanation.
20001 2004-09-06 Dick Porter <dick@ximian.com>
20003 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
20004 Close the new process's thread handle, as we don't use it. The
20005 handle stays around forever otherwise.
20007 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
20009 * object.c (arith_overflow): Fix warning.
20011 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
20012 calling conventions in method refs. Fixes #65352.
20014 * reflection.c: Fix warnings.
20016 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
20018 * icall.c: Add a new icall for Array.Clear
20020 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
20022 * object.c: When allocating an array, we have to throw
20023 an overflow exception if any of the lengths are < 0.
20025 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
20027 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
20028 properly. Also move implementation of string array marshalling to
20029 managed code. Fixes #42316.
20031 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20033 * assembly.c: provide more information when loading an assembly fails.
20035 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20037 * filewatcher.c: don't expect the development fam package to be
20040 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
20042 * marshal.c: Make a copy of the signature cookie since it will be
20043 freed by the caller.
20045 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
20047 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
20049 * metadata.c (mono_metadata_free_marshal_spec): New function to free
20052 * marshal.c: More refactoring.
20054 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
20057 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
20059 * object.c: In mono_message_invoke, fill the output parameter array after
20060 calling the managed method (it was done before the call). This fixes
20063 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
20065 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
20068 2004-09-02 Martin Baulig <martin@ximian.com>
20070 * class.c (mono_class_instance_size): Don't allow generic type
20071 definitions or open generic instances.
20072 (mono_class_array_element_size): If we're a value type, call
20073 mono_class_instance_size() on the original class.
20075 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
20076 handle generic instances.
20078 * mono-debug-debugger.c (write_type): Handle generic instances
20081 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
20083 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
20084 the allocation request fails. Fixes #65089.
20086 * object.c (mono_runtime_free_method): Do not call mono_free_method.
20088 * object.c (mono_runtime_free_method): New function to free a dynamic
20091 * marshal.c (mono_delegate_free_ftnptr): New function to free the
20092 delegate trampoline.
20094 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
20095 with hasthis as dynamic,
20097 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
20099 * domain.c (mono_jit_info_table_remove): New function to remove an
20100 entry from the jit info table.
20102 * class-internals.h (MonoMethod): Add 'dynamic' field.
20104 * loader.c: Fix warnings.
20106 2004-09-01 Martin Baulig <martin@ximian.com>
20108 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
20109 instead of mono_debugger_lock() because the latter one is a no-op
20110 unless running in the debugger.
20112 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
20114 * class.c (class_compute_field_layout): Classes with auto-layout or
20115 reference fields are not blittable.
20117 2004-09-01 Dick Porter <dick@ximian.com>
20119 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
20120 mono_image_get_filename() to get the assembly location.
20123 * metadata.h: Fix compile warnings
20125 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
20127 * class.c (class_compute_field_layout): System.Object is blittable.
20129 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
20130 as in/out. Fixes #59909.
20132 2004-09-01 Martin Baulig <martin@ximian.com>
20134 * metadata.h (MONO_TYPE_ISREFERENCE): Call
20135 mono_metadata_generic_inst_is_valuetype() if we're a generic
20136 instance to check whether our underlying type is a reference type.
20138 2004-09-01 Martin Baulig <martin@ximian.com>
20140 * metadata.c (mono_type_size): If we're a generic instance, call
20141 mono_class_value_size() for value types.
20143 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
20145 * marshal.c: Implement more custom marshalling functionality. Fixes
20148 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
20150 * mono-debug.c, debug-mono-symfile.c: add some locking love.
20152 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
20154 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
20156 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
20158 * icall.c: Fix some warnings.
20160 * threads.c (abort_appdomain_thread): Fix unref errors.
20161 (mono_thread_current): Fix THREAD_DEBUG define.
20163 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
20165 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
20167 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
20169 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
20171 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
20174 2004-08-28 Martin Baulig <martin@ximian.com>
20177 (mono_metadata_generic_inst_is_valuetype): New public function.
20179 * metadata.h (MONO_TYPE_ISSTRUCT): Call
20180 mono_metadata_generic_inst_is_valuetype() if we're a generic
20181 instance to check whether our underlying type is a valuetype.
20183 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
20185 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
20188 2004-08-25 Martin Baulig <martin@ximian.com>
20190 * loader.c (mono_get_method_from_token): Abstract methods can also
20191 be generic and thus have type parameters.
20193 * metadata-internals.h
20194 (MonoDynamicImage): Added `GPtrArray *gen_params'.
20196 * reflection.c (mono_image_get_generic_param_info): Don't create a
20197 metadata row, just add an entry to the `gen_params' array.
20198 (build_compressed_metadata): Sort the `gen_params' array and then
20199 actually create the metadata.
20201 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20203 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
20205 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
20207 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
20209 2004-08-24 Martin Baulig <martin@ximian.com>
20211 * class.cs (mono_class_is_subclass_of): Like an interface, a
20212 generic instance also derives from System.Object.
20214 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
20216 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
20217 custom modifiers to be in any order. Fixes #61990.
20219 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
20221 * object.c: Register mono_object_new_fast icall.
20223 * object.c (mono_class_get_allocation_ftn): Return to calling
20224 mono_object_new_fast, since it seems faster to compute the object
20225 size in unmanaged code than passing it as a parameter.
20227 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
20229 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
20230 this function with Boehm as the oom handler, so we don't have to check
20231 the result of GC_malloc.
20233 * object.c: Remove checks for oom.
20235 * object.h object.c (mono_class_get_allocation_ftn): New function to
20236 return the icall which can be used to allocate an instance of a given
20239 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
20241 * class-internals.h: Add 'enabled' field.
20243 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
20245 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
20247 2004-08-18 Jambunathan K <kjambunathan@novell.com>
20248 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
20251 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
20253 * appdomain.c: use the Tls function for appdomain too,
20254 at Zoltan's request. Actually return in mono_context_get
20256 * appdomain.c, profiler.c, threads.c: use __thread
20258 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
20260 * appdomain.c threads.c: Call GC_CreateThread on windows.
20262 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
20263 multiple libraries since this don't work on windows.
20265 2004-08-18 Martin Baulig <martin@ximian.com>
20267 * class-internals.h
20268 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
20271 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
20272 MonoMethodNormal since we also need it for abstract and interface
20276 (build_compressed_metadata): Sort the GenericParam table.
20277 (mono_image_create_token): Added `gboolean create_methodspec'
20278 argument; this is false when generating a MethodImpl token.
20279 (reflection_methodbuilder_to_mono_method): Abstract and interface
20280 methods may also have generic parameters.
20282 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
20284 * appdomain.c: thread local alloc
20286 2004-08-17 Martin Baulig <martin@ximian.com>
20288 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
20291 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
20294 * class.c (mono_type_get_full_name): New public function.
20295 (mono_type_get_name): Don't include the type arguments.
20297 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
20299 * Makefile.am: Build static versions of libmetadata and libmonoruntime
20300 for inclusion into the mono executable.
20302 2004-08-16 Martin Baulig <martin@ximian.com>
20304 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
20305 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
20307 2004-08-14 Martin Baulig <martin@ximian.com>
20309 * class.c (dup_type): Also copy the `byref' field.
20311 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
20313 * reflection.c (create_dynamic_mono_image): Revert the last change
20314 since it breaks bootstrap.
20316 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
20318 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
20320 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
20321 not free them with g_free.
20323 2004-08-11 Martin Baulig <martin@ximian.com>
20325 * reflection.c (mono_reflection_setup_internal_class): Also call
20326 mono_class_setup_mono_type() if we already have a `tb->type.type'.
20328 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
20330 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
20331 called during default (first) AppDomain creation. Keep track of
20332 Evidence when loading assemblies.
20334 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
20336 * opcodes.c, opcodes.h: reduce runtime relocations.
20338 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
20340 * culture-info.h, locales.c: fixes and chages to sue the new
20341 optimized format of the locale data.
20342 * culture-info-tables.h: regenerated.
20344 2004-08-06 Geoff Norton <gnorton@customerdna.com>
20346 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
20348 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
20350 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
20351 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
20352 * domain-internals.h: icall declaration.
20353 * icall.c: icall registration.
20354 * object-internals.h: New fields in MonoAssembly for CAS.
20356 2004-08-05 Duncan Mak <duncan@ximian.com>
20358 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
20361 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
20363 * reflection.c: fix to deal with object[] arrays in custom ctors
20366 2004-08-05 Martin Baulig <martin@ximian.com>
20368 * class.c (mono_class_array_element_size): Added support for
20369 generic instances and correctly handle "recursive" types.
20371 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
20373 * assembly.c: Fix warnings.
20375 2004-08-04 Martin Baulig <martin@ximian.com>
20378 (mono_type_get_name_recurse): Added `gboolean include_arity'
20379 argument specifying whether or not we should include the generic
20380 arity in the type name.
20381 (_mono_type_get_name): New static function.
20382 (mono_class_setup_vtable): If we're a generic instance, don't
20383 include the generic arity in the names of explicit method
20386 2004-08-03 Martin Baulig <martin@ximian.com>
20388 * class.c (mono_type_get_name_recurse): Enclose the generic type
20389 arguments in `<', '>'.
20391 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
20393 * gc.c: make GC warning messages use the trace API, they are just
20394 noise to most of the users.
20396 2004-08-03 Martin Baulig <martin@ximian.com>
20398 * debug-mono-symfile.c (read_string): Correctly read the string.
20400 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
20402 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
20404 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
20406 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
20408 2004-07-30 Martin Baulig <martin@ximian.com>
20410 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
20411 Reflect latest symbol writer changes.
20413 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
20415 * object.c: always create an object if null is passed
20416 to Invoke() where a valuetype is expected.
20418 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
20420 * marshal.c (mono_marshal_init): make managed
20421 signatures match native ones better for 64bits.
20423 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20425 * appdomain.c: hack to build correctly the private bin path on windows.
20428 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
20430 * assembly.c: Load mscorlib from the correct framework directory
20431 (mono/<version>/mscorlib.dll).
20432 * appdomain.h: Added prototypes for new functions.
20433 * internals.h: Added some prototypes.
20434 * domain.c: When initializing the runtime, get from the executable and
20435 the configuration files the runtime version that the app supports.
20436 Added support methods for reading app.exe.config. Added list of versions
20437 supported by the JIT. Added two new methods: mono_init_from_assembly,
20438 which initializes the runtime and determines the required version from
20439 the provided exe file, and mono_init_version, which initializes
20440 the runtime using the provided version.
20441 * icall.c: Get machine.config from version-specific directory.
20442 * reflection.c: When generating an image, embed the version number
20443 of the current runtime.
20445 2004-07-28 Dick Porter <dick@ximian.com>
20448 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
20449 returned sockaddr size before creating the remote address object.
20450 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
20453 2004-07-28 Dick Porter <dick@ximian.com>
20455 * locales.c (string_invariant_compare_char): Fix invariant char
20456 compares between upper and lower cases. Fixes bug 61458.
20458 2004-07-27 Ben Maurer <bmaurer@ximain.com>
20460 * marshal.c: actually cache stelem.ref wrappers.
20462 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
20464 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
20465 sections and remove the mono_cli_rva_map () function.
20467 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
20469 * debug-mono-symfile.c: fix one more endianess issue, from a patch
20470 by Geoff Norton (<gnorton@customerdna.com>).
20472 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
20474 * class.c: fix class loads for pointer types (typeof(int) !=
20477 2004-07-27 Martin Baulig <martin@ximian.com>
20479 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
20480 reading the debugging information from an external ".mdb" file.
20482 2004-07-24 Martin Baulig <martin@ximian.com>
20484 * reflection.c (mono_image_get_type_info): Only write a class
20485 layout entry if we actually have a size or a packing size.
20487 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
20489 * reflection.c (type_get_fully_qualified_name):
20490 insert cast to get type checking of ?: with non-gcc compilers
20492 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
20494 * rand.c: use g_getenv for both lookups of
20497 2004-07-17 Martin Baulig <martin@ximian.com>
20499 * reflection.c (mono_reflection_bind_generic_method_parameters):
20500 Set `gmethod->reflection_info'.
20502 2004-07-17 Martin Baulig <martin@ximian.com>
20504 * class.c (mono_class_create_from_typedef): Insert the newly
20505 created class into the hash table before computing the interfaces
20506 since we could be called recursively.
20508 2004-07-16 Ben Maurer <bmaurer@ximain.com>
20510 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
20511 function to implement stelem.ref in managed code
20512 * class-internals.h, debug-helpers.c: a new wrapper type
20515 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
20517 * gc.c: allow GC handles to work even when no GC is compiled in.
20518 Fix part of bug #61134 (GetAddrOfPinnedObject).
20520 2004-07-13 Peter Williams <peter@newton.cx>
20522 * process.c (complete_path): Make sure we don't attempt to execute
20525 2004-07-12 Geoff Norton <gnorton@customerdna.com>
20527 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
20528 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
20529 and will add/subtract the hour if needed
20531 2004-07-12 Martin Baulig <martin@ximian.com>
20533 * reflection.c (mono_field_get_object): If we have
20534 `field->generic_info', take the attributes from
20535 `field->generic_info->generic_type'.
20537 2004-07-12 Martin Baulig <martin@ximian.com>
20539 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
20540 This function must be called before initializing the runtime.
20541 (mono_debug_init_1): New function; call this after initializing
20542 the runtime, but before loading the assembly. It tells the
20543 debugger to load corlib and the builtin types.
20545 * mono-debug-debugger.c: Did some larger changes in the debugging
20546 code; support recursive class declarations, make sure we actually
20549 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20551 * debug-helpers.c: undo my previous patch and fixed the real issue in
20552 ../mini/exceptions-x86.c
20554 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20556 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
20557 when no HOME env. variable was set and a NullRef was thrown in a .cctor
20558 called from other .cctors.
20560 2004-07-09 Miguel de Icaza <miguel@ximian.com>
20562 * loader.c: Removed the mono_loader_wine_init hack now that we are
20563 doing a managed version of Windows.Forms.
20565 2004-07-09 Ben Maurer <bmaurer@ximian.com>
20567 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
20568 threadpool.c, threads.c: remove static data from rootset.
20570 2004-07-09 Dick Porter <dick@ximian.com>
20572 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
20573 Don't do any more processing if the matched length was 0. It was
20574 increasing the size of the string before. Fixes bug 61167.
20576 2004-07-09 Dick Porter <dick@ximian.com>
20580 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
20581 Add support for SO_PEERCRED if its available.
20583 2004-07-09 Peter Bartok <pbartok@novell.com>
20584 * loader.c: winelib.exe.so error message is now only displayed if
20585 MONO_DEBUG is set. To help us avoid questions when people are trying
20586 out the new Managed.Windows.Forms.
20588 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
20590 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
20591 for isinst and castclass wrappers.
20593 * class-internals.h icall.c: Move registration and lookup of JIT icalls
20594 to libmetadata from the JIT, so they could be used by the marshalling
20595 code and the interpreter.
20597 * marshal.c: Register marshalling related JIT icalls here instead of
20598 in mini.c. Use CEE_MONO_ICALL instead of the family of
20599 CEE_MONO_PROC<x> opcodes to call marshalling functions.
20601 * metadata.h: Remove unneeded marshalling conversions.
20603 * opcodes.c: Update for new opcodes.
20605 2004-07-08 Martin Baulig <martin@ximian.com>
20607 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
20608 (mono_debug_get_domain_data): Make this function static.
20610 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
20612 * gc.c, object.h: add nice GC handle API for embedders.
20614 2004-07-06 Ben Maurer <bmaurer@ximian.com>
20616 * reflection.c: more changes for the new api
20618 * object.c: When we reflect on a field w/ a constant value, it
20619 will not have a memory location, so we must access metadata. Also,
20620 allow easier reading of strings so that we can read them from
20623 * class.c (mono_class_layout_fields): no need for literal fields here.
20625 * class-internals.h: api changes for const fields
20627 * icall.c (ves_icall_get_enum_info): use new apis for const fields
20629 2004-07-06 Martin Baulig <martin@ximian.com>
20631 * mono-debug.h: Increment version number to 44.
20633 * mono-debug.c (mono_debug_add_wrapper): The second argument is
20634 now a gpointer, rewrote this whole method.
20636 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
20637 function. Add information about the wrapper in a new "misc table".
20639 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
20640 for the new misc table.
20642 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
20644 * metadata-internals.h image.c: Add a cache for helper signatures.
20646 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
20648 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
20650 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
20651 delegates from a delegate. Fixes #61033.
20653 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
20654 marshalling of stringbuilder arrays. Fixes #59900.
20656 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
20658 * icall.c: Add EnumBuilder:setup_enum_type icall.
20660 2004-06-30 Ben Maurer <bmaurer@ximian.com>
20662 * icall.c: Added a new icall for the property version of
20663 OffsetOfStringData.
20665 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
20667 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
20668 it has a constant size across platforms.
20670 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
20673 2004-06-29 Martin Baulig <martin@ximian.com>
20675 * mono-debug.c (mono_debug_add_method): Protect the whole function
20676 in mono_debugger_lock(), not just parts of it.
20678 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
20680 * reflection.c: make sure padding bytes in heaps are zeroed.
20682 2004-06-24 David Waite <mass@akuma.org>
20684 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
20685 image.c, loader.c, locales.c, marshal.c, metadata.c,
20686 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
20687 string-icalls.c, threads.c: change to C90-style comments from C99 /
20690 2004-06-24 Dick Porter <dick@ximian.com>
20693 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
20694 return createdNew. Fixes bug 60412.
20697 * icall.c: Add createdNew parameter to CreateMutex icall
20699 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
20701 * reflection.c, object-internals.h: save default value in params.
20703 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20705 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
20706 no need to build a new path combining that with the application base.
20709 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
20711 * reflection.c: fixed minor standard compliance issues.
20713 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
20715 * reflection.c: fixed issue with encoding some custom attributes
20716 (arrays in properties and fields, bug #60411).
20718 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20720 * reflection.c: fix start address when copying the public key token.
20722 2004-06-23 Martin Baulig <martin@ximian.com>
20724 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
20725 the `exc' object in a static object to put it into the GC's root set.
20727 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
20729 * reflection.c: make mono_reflection_setup_internal_class ()
20730 callable a second time to setup a new parent class.
20732 2004-06-23 Dick Porter <dick@ximian.com>
20734 * threads.c: Check for WAIT_IO_COMPLETION return values.
20736 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
20738 * appdomain.c: Removed the g_free on the public key token. Now copy
20739 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
20740 * assembly.c: Added public key token string value when loading
20741 assemblies. Fix bug #60439.
20742 * icall.c: Added missing informations (like public key) in
20743 GetReferencedAssemblies. Fix #60519.
20744 * image.h: Changed definition for public key token from const char*
20745 public_tok_value to guchar public_key_token [17];
20746 * reflection.c: Updated for changes to public key token.
20748 2004-06-22 Lluis Sanchez Gual
20750 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
20751 for the field in base classes.
20753 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
20755 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
20756 mark headers as not supported, they are installed only for use by the
20759 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
20761 * *.c, *.h: avoid namespace pollution in public headers.
20763 2004-06-21 Martin Baulig <martin@ximian.com>
20765 * exception.c (mono_get_exception_security): It's in
20766 "System.Security", not in "System".
20768 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
20769 the exception classes.
20771 2004-06-21 Martin Baulig <martin@ximian.com>
20773 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
20774 Protect the exception object from being finalized.
20776 2004-06-21 Martin Baulig <martin@ximian.com>
20778 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
20781 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
20783 * reflection.c: Load the assembly in mono_reflection_type_from_name,
20784 if it was not loaded before. Fix parts of #60439.
20786 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
20788 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
20789 code that was broken since Ben's change: wrappers are now
20790 dependent on the method signature only again.
20792 2004-06-21 Martin Baulig <martin@ximian.com>
20794 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
20795 added interface support.
20797 2004-06-21 Martin Baulig <martin@ximian.com>
20799 * class.c (mono_vtable_get_static_field_data): New public method.
20801 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
20803 * filewatcher.c : Windows build fix to be compliant with API changes.
20805 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
20807 * class.h, class.c: more accessors.
20808 * metadata.h, metadata.c: prepare for hiding MonoType and
20809 MonoMethodSignature: people should use the accessors from now on
20810 outside of the tree.
20812 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
20814 * *.c, *.h: more API cleanups.
20816 2004-06-18 Jackson Harper <jackson@ximian.com>
20818 * assembly.c: Trace loading assemblies.
20819 * loader.c: Trace loading native libraries.
20820 * mono-config.c: Trace loading config files.
20822 2004-06-18 Dick Porter <dick@ximian.com>
20824 * locales.c: Tell ICU the lengths of strings, it can cope with
20825 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
20827 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
20829 * image.c: swapped name/filename;
20831 2004-06-18 Martin Baulig <martin@ximian.com>
20833 * mono-debug-debugger.c (write_class): Write the parent class at
20834 the end of the header.
20836 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
20838 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
20840 2004-06-17 Raja R Harinath <rharinath@novell.com>
20842 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
20843 (bundle_obj): New conditional define.
20844 (BUILT_SOURCES): Remove.
20845 ($(bundle_srcs)): Make parallel-make safe.
20846 (libmonoruntime_la_LIBADD): Make unconditional.
20847 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
20848 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
20850 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
20852 * culture-info-tables.h: It was inconsistent with the latest
20855 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
20857 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
20860 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
20863 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
20865 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
20866 cleaned up public header threads.h.
20868 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
20870 * Makefile.am, *.c, *.h: more API cleanups.
20872 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20874 * Makefile.am: removed monosn from compilation.
20875 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
20876 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
20877 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
20878 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
20879 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
20880 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
20882 2004-06-15 Jackson Harper <jackson@ximian.com>
20884 * assembly.c: Make locales lower case when searching the GAC for
20885 assemblies. gacutil will always make locales lowercase when
20886 installing so this effectively makes them case insensitive.
20888 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
20890 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
20891 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
20892 parameter which allows to choose whether the wait can be interrupted or
20893 not. Also added the method mono_monitor_enter(), which locks the monitor
20894 using an infinite wait and without allowing interruption.
20895 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
20897 * object.h: Added new fields in MonoThread. suspend_event holds the event
20898 used to susped/resume the thread. synch_lock is the lock object to use for
20899 modifying the thread state.
20900 * threads.c: Use the new synch_lock object for locking, instead of "this",
20901 which can generate deadlocks.
20902 Moved thread state change in Thread.Sleep and Thread.Join from managed
20903 to unmanaged code. This avoids a deadlock when the thread was suspended
20904 just after acquiring the thread lock.
20905 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
20906 Implemented Thread.Suspend using an event instead of ThreadSuspend,
20907 which is not fully implemented in the io-layer.
20908 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
20910 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
20912 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
20913 threads-types.h: more API cleanups.
20915 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
20917 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
20918 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
20919 threadpool.c, threads.c: first pass at the exported API cleanup.
20921 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
20923 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
20925 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20927 * icall.c: added internalGetHome.
20929 2004-06-14 Dick Porter <dick@ximian.com>
20931 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
20932 possible to return successfully when '.' or '..' were the only
20933 entries in a directory, but were skipped. The MonoIOStat was not
20934 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
20937 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
20939 * reflection.c: make binaries run on .Net 1.1 by default.
20941 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
20943 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
20945 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
20947 * marshal.c: keep track of struct size with explicit layout
20950 2004-06-12 Martin Baulig <martin@ximian.com>
20952 * mono-debug-debugger.c: Comment out a debugging g_message().
20954 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
20956 * reflection.c, reflection.h: do not free custom attrs that are cached.
20957 * icall.c: use braces to make code clearer.
20959 2004-06-11 Martin Baulig <martin@ximian.com>
20961 * class.h (MonoInflatedField): New type.
20962 (MonoClassField): Replaced `MonoType *generic_type' with
20963 `MonoInflatedField *generic_info'.
20966 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
20968 2004-06-11 Martin Baulig <martin@ximian.com>
20970 * reflection.c (mono_image_create_method_token): Correctly encode
20973 2004-06-11 Martin Baulig <martin@ximian.com>
20975 * metadata.c (mono_metadata_parse_method_signature): When parsing
20976 a MethodDef which has VarArgs, also set sentinelpos if we don't
20977 have any parameters.
20979 2004-06-11 Martin Baulig <martin@ximian.com>
20981 * verify.c (mono_method_verify): In CEE_CALL, use
20982 mono_method_get_signature() to get the method's signature, unless
20983 we're a PInvoke method.
20985 2004-06-10 Jackson Harper <jackson@ximian.com>
20987 * assembly.c: Use <path>/lib/mono/gac for the extra paths
20988 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
20989 logical name as the supplied path is just a prefix to the gac not
20990 the direct path to it.
20992 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
20994 * reflection.c: make the token for a created method match
20995 the token of the MethodBuilder it was created from
20996 (IKVM requires this behaviour now).
20998 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
21000 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
21001 reflection.c, socket-io.c: leak fixes.
21003 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
21005 * icall.c: handle sentinel pos in vararg methods in position different
21008 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21010 * culture-info-tables.h: freshly generated.
21012 2004-06-09 Martin Baulig <martin@ximian.com>
21014 * loader.c (mono_get_method_constrained): Call `mono_class_init
21015 (constrained_class)'.
21017 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
21019 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
21020 any methods. Fixes #59629.
21022 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
21024 * culture-info-tables.h: reflecting locale-builder updates.
21026 2004-06-08 Dick Porter <dick@ximian.com>
21029 * locales.c: Fixed compile warnings, including a real bug in
21030 CompareInfo_internal_compare.
21032 2004-06-08 Dick Porter <dick@ximian.com>
21035 (ves_icall_System_Globalization_CompareInfo_internal_index):
21036 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
21037 Double-check the resuls of usearches, because ICU currently
21038 ignores most of the collator settings here. Fixes bug 59720.
21040 2004-06-08 Dick Porter <dick@ximian.com>
21043 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
21044 Fix memory leak and segfault-causing typo. No idea how this one
21045 lasted so long without being noticed.
21047 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
21049 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
21050 any methods. Fixes #59629.
21052 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21055 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
21056 own the critical section before). Removed dead code (that's done
21057 in the preload hook).
21059 (mono_assembly_load_with_partial_name): call the preload hook.
21061 2004-06-08 Martin Baulig <martin@ximian.com>
21063 * metadata.c (mono_metadata_signature_alloc): Default
21064 `sentinelpos' to -1.
21066 * reflection.c (mono_image_get_array_token): Likewise.
21068 2004-06-08 Martin Baulig <martin@ximian.com>
21070 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
21072 * metadata.c (mono_metadata_parse_method_signature): When parsing
21073 a MethodDef which has VarArgs, set sentinelpos.
21075 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
21076 `gint16' since we're using -1 for non-varargs methods.
21079 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
21080 (method_encode_signature): Added varargs support.
21081 (method_builder_encode_signature): Likewise.
21082 (mono_image_get_varargs_method_token): New static method.
21083 (mono_image_create_method_token): New public method; this is
21084 called via an icall instead of mono_image_create_token() when
21085 calling a varargs method.
21087 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
21089 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
21091 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
21093 * culture-info-tables.h : Reflecting the latest locale-builder that
21094 fixed empty array representation ({} to {0}).
21096 2004-06-07 Jackson Harper <jackson@ximian.com>
21098 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
21099 looking up extra gac paths. This allows MONO_GAC_PATH to act
21100 exactly like a prefix.
21102 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
21104 * reflection.c (mono_reflection_type_from_name): Make a copy of the
21105 type name before modifying it. Fixes #59405.
21107 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
21109 * culture-info.h: added fields for "all datetime patterns".
21110 * locales.c: ( ves_icall_System_Globalization_CultureInfo
21111 _construct_datetime_format ()): fill xxx_patterns fields.
21112 * object.h: added fields for "all datetime patterns" to
21113 MonoDateTimeFormatInfo.
21114 * culture-info-tables.h: reflecting locale-builder updates.
21116 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
21118 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
21119 the event has no add and remove methods. Fixes #59629.
21121 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
21123 * object.c: Fixed possible integer overflow when allocating large
21126 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
21128 * culture-info-tables.h: reflecting locale-builder updates.
21130 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
21132 * culture-info-tables.h: reflecting locale-builder updates.
21134 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
21136 * culture-info-tables.h: reflecting locale-builder updates.
21138 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
21140 * threads.c: Made Thread.Sleep abortable.
21142 2004-06-02 Martin Baulig <martin@ximian.com>
21144 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
21146 * debug-mono-symfile.h: Bumped symbol file version number to 37.
21148 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
21150 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
21152 2004-05-30 Jackson Harper <jackson@ximian.com>
21154 * reflection.c: Do not hardcode assembly versions or public key
21155 tokens anymore. All of this except the corlib section was dead
21158 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
21160 * object.c (mono_runtime_invoke_array): Automatically create boxed
21161 objects for byref valuetypes if needed. Fixes #59300.
21163 * object.c (mono_method_return_message_restore): Handle
21164 MONO_TYPE_OBJECT as well.
21166 2004-05-28 Jackson Harper <jackson@ximian.com>
21168 * reflection.c: The modified type encoding was causing build
21169 problems. Reverted for now.
21171 2004-05-28 Jackson Harper <jackson@ximian.com>
21173 * reflection.c/h: Take an assembly ref so that we dont create
21174 fully qualified names when encoding types in the same assembly as
21175 the custom attribute being emitted.
21176 * appdomain.c: Increment version number.
21178 2004-05-26 Duncan Mak <duncan@ximian.com>
21181 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
21182 Set the full version number (major, minor, build, revision).
21184 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
21186 * marshal.c (emit_struct_conv): increment src/dst after blit
21187 (mono_marshal_get_managed_wrapper,
21188 mono_marshal_get_native_wrapper): make sure we have marshalling
21189 info before marshalling params (info computation affects
21192 * class.c (class_compute_field_layout): correctly deal with
21194 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
21195 value types (as per what windows dows by default)
21196 (mono_class_setup_mono_type): System.ValueType is blittable
21197 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
21200 * marshal.c (mono_marshal_load_type_info): flag types as
21201 non-blittable if the native layout doesn't match the managed
21204 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21206 * appdomain.c: don't add stuff in the private search path that is
21207 above the application base. If application base is not set, there's
21208 no private search path.
21210 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
21212 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
21213 byref struct arguments in native->managed marshalling.
21215 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
21217 * marshal.c (mono_marshal_get_runtime_invoke): correctly
21218 cache methods using signature (special case for methods
21219 that are value type or string class)
21221 * image.c (mono_image_close): clean up allocated GSList's
21222 in runtime_invoke_cache.
21224 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21226 * mono-config.c: set the correct path for mono_cfg_dir on windows when
21227 there's no MONO_CFG_DIR environment variable defined.
21229 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21231 * threads.c: windows version must be >= 0x0500 to include OpenThread.
21233 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
21235 * threadpool.c: Really wait for 500ms after the async call, even if the wait
21237 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
21238 before waiting for it, and call CloseHandle after the wait to unref it.
21239 This will make sure that handles are not disposed too early.
21241 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21246 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
21249 * object.c: se the application_base only for the domain that runs
21250 Main. Fixes bug #59216,
21252 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21255 * object.c: only the domain in which Main is run have
21256 SetupInformation.ConfigurationFile set, so moved a few lines from
21257 appdomain.c to object.c.
21259 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21261 * appdomain.c: we tried to load [name].(dll|exe), but according
21262 to bug #57710, we must also try [culture]/[name].(dll|exe) and
21263 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
21264 There's a test case attached to bug #58922.
21266 2004-05-27 Dick Porter <dick@ximian.com>
21269 * file-io.c: Implemented icalls for locking and unlocking regions
21271 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
21272 FALSE on error (fixes both compiler warning and real bug.)
21274 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
21276 * culture-info-tables.h: reflecting locale-builder updates.
21278 (Added missing ChangeLog entry for 05/26)
21280 2004-05-27 Jackson Harper <jackson@ximian.com>
21282 * locales.c: Fix some cut and paste errors.
21284 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21286 * mono-config.c: set the correct path for config. directory on windows.
21288 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
21290 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
21293 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
21295 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
21296 from pinvoke functions.
21298 * marshal.c (mono_ftnptr_to_delegate): Implement this.
21300 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
21302 * culture-info-tables.h: reflecting locale-builder updates.
21304 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
21306 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
21309 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
21311 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
21312 * icall.c: Modified icalls for RNG.
21313 * rand.c|h: Changed RNG interface to allow thread-safe usage under
21314 Windows (CryptoAPI).
21316 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
21318 * locales.c: Fix build.
21320 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
21322 * culture-info-tables.h: reflecting locale-builder updates.
21324 2004-05-25 Jackson Harper <jackson@ximian.com>
21326 * locales.c: When creating the current culture use the $LANGs
21327 specific culture. So DateTimeFormat and NumberFormat entries are created.
21329 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
21331 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
21332 a char array as parameter.
21334 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
21336 * image.c: In mono_image_open(), always use an absolute path name to
21337 look for already loaded images.
21339 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
21341 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
21342 missing in the windows build (like older cygwin include files).
21344 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
21346 * icall.c: Fixed check for possible integer overflow in Buffer_
21347 BlockCopy icall. Replaced comments style // by /* */.
21349 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
21351 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
21353 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
21354 check after MONO_VTADDR. Fixes pinvoke2.exe.
21356 * marshal.h marshal.c metadata.h: Add beginnings of support for
21357 ftnptr -> delegate marshalling.
21359 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
21361 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
21362 * threads.c: Fix warnings.
21364 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
21366 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
21367 * icall.c: Registered icalls for Suspend and Resume.
21368 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
21370 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
21371 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
21372 * process.c: Use WaitForSingleObjectEx.
21373 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
21375 * threads.c, threads.h: Make use of new Ex wait methods. Improved
21376 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
21377 for Suspend and Resume. Added new mono_thread_stop, used for stoping
21378 background threads. Added basic support for Abort in Windows.
21379 Start new threads using a managed delegate invoke wrapper. This wrapper
21380 has an interruption checkpoint that is needed since an interruption
21381 can be requested before the thread leaves the unmanaged code that starts
21383 * marshal.c: Added interruption checkpoint after every native call, and
21384 also before managed calls for wrappers called from unmanaged code to
21385 go into managed code.
21386 * object.h: Added new field in MonoThread to keep track of interruption
21389 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
21391 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
21394 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21401 * rand.c: getenv -> g_getenv (windows!)
21403 * process.c: complete_path is also used on non-windows platforms.
21405 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21407 * icall.c: new signature for Process_Start.
21409 * process.[ch]: new signature for Process_Start. If we're on windows
21410 and UseShellExecute is false, we have to search for the program by
21411 ourselves if we don't get a full path.
21413 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
21415 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
21416 marshalling and call CleanUpNativeData if needed. Fixes #58646.
21418 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21420 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
21423 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21425 * process.c: use double quotes to quote program name and arguments on
21426 windows. Fixes bug #58575.
21428 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21430 * file-io.c: don't return "." and ".." when using windows Find*File.
21432 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
21434 * marshal.c: Don't pass wrappers to message init because method
21435 addressed used to lookup metadata. part of remoting[2|3] fix.
21437 2004-05-15 Jackson Harper <jackson@ximian.com>
21439 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
21440 path is essentially the same as MONO_PATH except that it points to
21441 GACs instead of lib directories.
21442 * loader.h: The user gac is gone so we dont need function to
21444 * mono-config.c: user gac option is now gone.
21446 2004-05-15 Jackson Harper <jackson@ximian.com>
21448 * culture-info.h: Make defines more consistent, add calendar data
21449 to the culture info table.
21450 * culture-info-tables.h: Add basic calendar data. Basically
21451 everyone gets default gregorian until all the data is
21453 * locales.c: Use the new consistent defines. Set calendar data for
21454 culture info objects.
21455 * object.h: add a field for calendar data to CultureInfo
21457 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
21459 * image.c: image->runtime_invoke_cache is keyed on signatures now.
21460 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
21462 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
21463 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
21464 an extra param that is the pointer of the method to invoke. The IL for
21465 the invoke method is no longer specific to the method, but to the
21466 signature of the method. Thus, we can share the same code for multiple
21467 methods. This reduces the number of methods that have to be compiled.
21469 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
21471 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
21473 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21475 * icall.c: Optimize Buffer.BlockCopy.
21477 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21479 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
21480 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
21481 quote). Changed them to "MMMM yyyy".
21483 2004-05-12 Miguel de Icaza <miguel@ximian.com>
21486 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
21488 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
21490 * reflection.h: Updated after changes to managed structures.
21492 * appdomain.c: Bump corlib version.
21494 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21496 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
21499 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21501 * Makefile.am: link to ../os/libmonoos.la on windows.
21504 -If MONO_DEBUG, warn about non-existing directories in
21506 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
21507 compile time variable.
21508 -Removed init_default_path and call mono_set_rootdir from
21509 libmonoos.a instead (windows only).
21511 * assembly.h: declare mono_assembly_getrootdir().
21514 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
21516 * loader.c: s/getenv/g_getenv/
21518 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
21520 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
21522 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
21524 * metadata.h: Add new marshalling conversions.
21526 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
21529 * reflection.c (mono_reflection_get_type): Lookup the type in all
21530 modules of a multi-module assembly. Fixes #58291.
21532 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
21534 * threads.c: Before aborting a background, set the StopRequested
21535 state. This avoids throwing the Abort exception.
21536 In mono_thread_manage, don't continue with the shutdown until all
21537 aborted threads have actually stopped.
21539 2004-05-10 Jackson Harper <jackson@ximian.com>
21541 * locales.c: Remove the modifier from culture names.
21543 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21545 * Makefile.am: monosn is not installed any more. It has been deprecated
21548 2004-05-07 Jackson Harper <jackson@ximian.com>
21551 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
21552 Fix array construction, add bailout if the length is 0.
21554 2004-05-07 Dick Porter <dick@ximian.com>
21556 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
21557 machine doesn't have a DNS entry. Patch by Urs Muff
21558 (umuff@quark.com), fixes bug 57928.
21560 2004-05-06 Jackson Harper <jackson@ximian.com>
21562 * reflection.c: Handle null PublicTokens properly. alloc mem for
21563 assembly names culture so we dont crash when freeing it.
21565 2004-05-06 Jackson Harper <jackson@ximian.com>
21567 * assembly.c: Check the usergac when loading with partial names.
21569 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
21571 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
21572 does nothing for now (not required for Linux/Windows) but the class
21573 library can call it (and a newer or modified runtime could need it).
21574 * icall.c: Registred icall.
21576 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21578 * loader.c: prints a message on module loading error we set MONO_DEBUG
21579 environment variable.
21581 2004-05-05 Jackson Harper <jackson@ximian.com>
21583 * appdomain.c: Handle PublicKeyToken=null properly.
21585 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
21587 * environment.c|h: Added icall ves_icall_System_Environment_
21588 GetOSVersionString to get the current OS version as a string.
21589 * icall.c: Registred icall.
21591 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
21593 * object.c: in mono_object_get_virtual_method(), take into account that
21594 non-virtual methods don't have a slot in the vtable. Check needed when
21595 the object is a proxy.
21597 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
21599 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
21600 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
21602 * object.c (mono_class_compute_gc_descriptor): Fix warning.
21604 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
21605 passed when a valuetype is expected.
21607 * object.c (mono_unhandled_exception): Only set the exit code if the
21608 exception happens in the main thread. Fixes thread5.exe.
21610 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
21611 invalid names. Fixes #58047.
21613 2004-05-03 Jackson Harper <jackson@ximian.com>
21615 * assembly.c: This line was committed accidently and is unneeded.
21617 2004-05-03 Jackson Harper <jackson@ximian.com>
21619 * icall.c: Add new icall for Assembly::LoadWithPartialName
21620 * assembly.c/.h: new function that probes the GAC to load partial
21621 assembly names by Paolo Molaro.
21623 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21625 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
21626 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
21627 (type_get_fully_qualified_name): Added PublicKeyToken when building a
21630 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21632 * appdomain.c: fixed check for 'neutral' culture and removed warning.
21633 * reflection.c: fix bug when parsing a full type name and Version is not
21634 the last thing in the string.
21636 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
21638 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
21639 crashes when it is freed.
21641 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21643 * assembly.c: print the compat warning to stderr.
21645 2004-05-01 Miguel de Icaza <miguel@ximian.com>
21647 * assembly.c (mono_assembly_load_references): Add a compatibility
21648 hack to run old applications that might be still referencing the
21649 3300-based assemblies, only do this for System.xxx.
21651 2004-05-01 Jackson Harper <jackson@ximian.com>
21653 * appdomain.c: If the culture is neutral we set it to "".
21655 2004-04-29 Jackson Harper <jackson@ximian.com>
21657 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
21659 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
21661 * string-icalls.c: added low overhead function for copying chars
21662 * icall.c: added needed icall for the above function
21664 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21666 * icall.c: fix return value of get_global_assembly_cache. Implemented
21667 Environment.GetLogicalDrives.
21669 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
21671 * rand.c: try and talk to egd or prngd
21672 for random bytes if opening devices fail.
21674 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
21676 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
21677 alignment for the type using the native alignment of its members
21678 instead of using klass->min_align.
21680 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
21682 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21685 * socket-io.c: added check for sys/aio.h.
21687 2004-04-28 Dick Porter <dick@ximian.com>
21689 * threads.c: Don't abort a thread thats already aborting, when
21690 terminating everything.
21692 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21694 * icall.c: added 2 new async calls for Socket.
21696 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
21697 IO on *nix systems.
21699 * threadpool.c: removed unused variable.
21701 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
21703 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
21705 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
21707 * locales.c: put back string_invariant_tolower () and
21708 string_invariant_toupper ().
21710 2004-04-26 David Waite <mass@akuma.org>
21715 * unicode.h: remove comma from end of enumeration declarations
21717 2004-04-26 David Waite <mass@akuma.org>
21719 * debug-mono-symfile.h:
21722 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
21725 2004-04-26 Jackson Harper <jackson@ximian.com>
21727 * appdomain.c: Increment version number.
21729 2004-04-26 Jackson Harper <jackson@ximian.com>
21731 * appdomain.c: Set assembly references public token value when
21732 PublicKeyToken is specified, not the hash_value. Free public token
21733 values when free assembly name data. Previously the public key
21734 token was hex decoded, however we are using hex encoded public key
21735 tokens, so this is not neccasary.
21736 * assembly.c: Lookup assemblies in the gac if their public token
21737 value is set. Add function to allow enabling user gac
21738 lookups. Specify whether or not the assembly was loaded from the
21739 GAC. Compare full assembly names when checking the cache for
21740 assemblies (Temporarily disabled see comment in code). Remove
21741 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
21742 specifies trace-loader they get extra info to stdout on the
21743 loading of assemblies.
21744 * image.h: Add a field for an assembly references public token
21745 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
21746 whether an assembly has been loaded from the GAC.
21747 * image.c: Remove a corlib -> mscorlib name mapping.
21748 * loader.h: Add function to enable/disable the user gac.
21749 * mono-config.c: Check if the usergac is enabled in the config
21751 * icall.c: New icall to determine whether or not an assembly has
21752 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
21753 * tabldefs.h: Add constant for assemblyref flag that specifies a
21754 full public key is used instead of a public token.
21755 * reflection.c: Remove mscorlib -> corlib mappings. Set
21756 PublicTokenValue instead of hash value. This value is a hex
21757 string so it does not need to be expanded.
21759 2004-04-26 Martin Baulig <martin@ximian.com>
21761 * mono-debug-debugger.c (mono_debugger_initialize): Set
21762 `mono_debugger_initialized' before calling mono_debug_lock().
21764 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
21766 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
21767 InternalToUpper/InternalToLower.
21768 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
21769 removed invariant culture shortcut. This is now done in managed code.
21770 * locales.c: (string_invariant_toupper/tolower) removed.
21772 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21774 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
21775 Added Poll internal call.
21777 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
21778 call for Poll. Select was too heavy for polling a single socket.
21780 * threadpool.[ch]: added mono_threadpool_cleanup.
21781 * threads.c: use it. Don't use Thread_Abort on windows.
21783 2004-04-23 Martin Baulig <martin@ximian.com>
21785 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
21787 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
21789 * icall.c: Registred new icalls for key pair protection and added an
21790 icall for Environment.GetFolderPath on Windows.
21791 * security.c|h: Added new icalls for key pair protection.
21793 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21795 * socket-io.c: don't display the non-supported family warning for known
21796 families. Now this is not displayed on windows when checking support
21799 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21801 * class.c: don't display the layout warning for static fields.
21803 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
21805 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
21806 * locales.c, locales.h: Added new icalls for culture-specific
21807 Char.ToLower and Char.ToUpper.
21809 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21811 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
21814 2004-04-20 Martin Baulig <martin@ximian.com>
21816 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
21817 of the type name before passing it to mono_reflection_type_from_name().
21819 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
21821 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
21822 encodings here. Fixes #56965.
21824 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
21826 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
21827 fix test on strstr result not that I can see anything that
21828 relies on the result.
21830 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
21832 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
21835 * marshal.c (mono_marshal_get_string_encoding): New helper function.
21837 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
21838 function to determine which marshalling to use for strings. Fixes
21841 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
21843 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
21845 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
21847 * icall.c: #include mono-config.h
21849 2004-04-15 Jackson Harper <jackson@ximian.com>
21851 * culture-info-tables.h: Fix date formats for en-US culture.
21853 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
21855 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
21856 ThreadPool.SetMinThreads.
21857 * threadpool.c: Implemented ThreadPool.GetMinThreads and
21858 ThreadPool.SetMinThreads.
21860 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
21862 * mono-config.c: also load the .config file in the directory
21863 where the assembly was found.
21865 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
21867 * assembly.c: load per-assembly config files.
21868 * icall.c: decrapified code to get the config dir and moved to
21870 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
21871 per-assembly config files. When doing a dll map lookup give precedence
21872 to the per-assembly data.
21874 2004-04-14 Martin Baulig <martin@ximian.com>
21876 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
21877 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
21878 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
21880 * mono-debugger-debugger.c: While the debugger is locked, remember
21881 whether the symbol tables have changes and send one single
21882 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
21884 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
21886 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
21888 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
21891 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
21892 account when marshalling string arrays. Fixes #56965.
21894 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
21896 * icall.c: Add new icalls mapping for security.
21897 * security.c|h: Add internal calls for WindowsIdentity,
21898 WindowsImpersonationContext and WindowsPrincipal.
21900 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
21902 * class.c: Added comment to ensure the System.MonoDummy class
21903 is removed when no longer necessary
21905 2004-04-13 Miguel de Icaza <miguel@ximian.com>
21907 * appdomain.c: Pass arguments to the bootstraping exceptions to
21908 minimize JITed methods at boot
21910 * metadata.c (mono_exception_from_name_two_strings): Allow for the
21911 second string to be null.
21913 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
21914 Change the protocol to minimize the JIT methods at startup. Now
21915 it Returns the internal codepage, if the value of "int_code_page"
21916 is 1 at entry, and we can not compute a suitable code page
21917 number, returns the code page as a string.
21919 2004-04-13 Jackson Harper <jackson@ximian.com>
21921 * culture-info-tables.h: Fix number of decimal digits for all
21924 2004-04-13 Jackson Harper <jackson@ximian.com>
21926 * icall.c: Clairfy out of sync error message. It is not always
21927 your corlib that is out of sync.
21929 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
21931 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
21932 properties when only the set accessor is overriden. Fixes #55874.
21934 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
21936 * assembly.c (mono_assembly_load_references): Make this thread safe.
21939 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
21941 * monosn.c: Add missing initialization calls.
21943 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
21946 ves_icall_System_Globalization_CultureInfo_construct_number_format
21947 Fix g_assert so it compiles on fussier compilers re int/ptr
21950 2004-04-08 Dick Porter <dick@ximian.com>
21953 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
21954 53992. Also rearrange the code so that the internal calls return
21955 an error value and exceptions are thrown from managed code.
21957 * icall.c: Add type info to the socket icalls.
21959 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21961 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
21964 2004-04-07 Martin Baulig <martin@ximian.com>
21966 * class.c (mono_class_from_generic_parameter): Don't default
21967 `klass->parent' to `mono_defaults.object_type'.
21969 2004-04-07 Martin Baulig <martin@ximian.com>
21971 * reflection.c (mono_reflection_initialize_generic_parameter): Set
21972 `param->pklass->reflection_info'.
21974 2004-04-07 Jackson Harper <jackson@ximian.com>
21976 * culture-info-tables.h: Fix date separator symbol.
21978 2004-04-07 Martin Baulig <martin@ximian.com>
21980 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
21981 from System.Type to System.MonoType.
21983 2004-04-07 Martin Baulig <martin@ximian.com>
21986 (MonoReflectionGenericParam): Added `has_reference_type' and
21987 `has_value_type' fields.
21989 * reflection.c (mono_image_get_generic_param_info): Encode the
21990 correct flags if we have the `class' or `struct' constraint.
21992 2004-04-07 Martin Baulig <martin@ximian.com>
21995 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
21997 2004-04-07 Jackson Harper <jackson@ximian.com>
21999 * appdomain.c: Revert extra patches, just wanted to bump the
22002 2004-04-07 Jackson Harper <jackson@ximian.com>
22004 * Makefile.am: Add culture-info private headers.
22005 * icall.c: Add new icalls for contructing locales.
22006 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
22007 * locales.h: Declare new culture info construction methods.
22008 * object.h: Add new fields used to avoid the CultureMap to
22010 * culture-info.h: Definition of structs used in the culture info
22012 * culture-info-tables.h: Autogenerated tables that contain culture
22013 info data. This file was generated with the locale-builder tool.
22014 * appdomain.c: Incement corlib version number.
22016 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
22018 * appdomain.c: (mono_runtime_init) move mono_thread_init
22019 to before mono_object_new calls so critical sections
22020 are initialized before use.
22022 2004-04-07 Martin Baulig <martin@ximian.com>
22025 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
22026 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
22027 (ves_icall_MonoGenericParam_initialize): Removed.
22028 (monogenericparam_icalls): Removed.
22029 (generictypeparambuilder_icalls): Added new table for
22030 System.Reflection.Emit.GenericTypeParameterBuilder.
22033 (mono_reflection_define_generic_parameter): Removed.
22034 (mono_reflection_initialize_generic_parameter): This is now called
22035 from GenericTypeParameterBuilder's .ctor.
22037 2004-04-06 Martin Baulig <martin@ximian.com>
22039 * class.c (mono_class_init): Don't inflate nested classes in a
22041 (mono_type_get_name_recurse): Include the generic arguments for
22042 generic instances and generic type declarations.
22043 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
22044 (_mono_class_get_instantiation_name): Removed.
22045 (mono_class_create_generic): Always use `gklass->name' as our name.
22047 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
22049 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
22050 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
22051 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
22052 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
22053 closed generic methods here.
22056 (mono_reflection_generic_inst_get_nested_types): Removed.
22057 (inflate_mono_method): Copy the generic parameters from the
22058 MonoMethodHeader into out MonoGenericMethod.
22060 2004-04-06 Martin Baulig <martin@ximian.com>
22063 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
22065 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
22067 * reflection.c (build_compressed_metadata): If we have any entries
22068 in the GenericParam, MethodSpec or GenericParamConstraint tables,
22069 set the header version to 1.1.
22071 2004-04-06 Martin Baulig <martin@ximian.com>
22073 * class.c (mono_class_init): If we're a generic instance,
22074 initialize our nested classes, too.
22075 (_mono_class_get_instantiation_name): Deal with the new `!%d'
22078 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22080 * process.c: quote the argument passed to the shell on windows.
22082 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
22084 * threads.c (mono_alloc_special_static_data): Allow this to be
22085 called during startup.
22087 2004-04-02 Martin Baulig <martin@ximian.com>
22090 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
22092 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
22094 * icall.c: Fix build.
22096 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
22098 * Makefile.am: Added security.c|h.
22099 * icall.c: Added icall for get_UserName;
22100 * security.c: New file for security related icalls. Added function
22101 get_UserName for System.Environment (fix #56144).
22102 * security.h: New. Header file for security.c
22104 2004-04-02 Dick Porter <dick@ximian.com>
22106 * icall.c: Deleted the icalls that were obsoleted some time ago
22107 by the ICU string code, and which were mixed into the icall
22108 rearranging. Fixes bug 55969.
22111 * string-icalls.c: Deleted the code that those icalls reference.
22113 2004-04-01 Martin Baulig <martin@ximian.com>
22115 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
22117 * class.c (mono_class_from_generic_parameter): Don't set
22118 TYPE_ATTRIBUTE_INTERFACE.
22119 (my_mono_class_from_generic_parameter): Likewise.
22121 2004-04-01 Martin Baulig <martin@ximian.com>
22123 * loader.c (find_method): Added an optional `MonoClass *ic'
22124 argument to search in a specific interface.
22125 (mono_get_method_constrained): New public function.
22127 2004-04-01 Martin Baulig <martin@ximian.com>
22129 * reflection.c (mono_image_get_generic_field_token): Use the
22130 `handleref' cache here.
22132 2004-04-01 Martin Baulig <martin@ximian.com>
22134 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
22136 * reflection.c (create_generic_typespec): Use the `typespec' hash
22137 here, not the `typeref' one.
22139 2004-04-01 Martin Baulig <martin@ximian.com>
22141 * class.c (mono_class_inflate_generic_type): Moved the
22142 functionality into a new static inflate_generic_type() which
22143 returns NULL if it didn't do anything. Only increment the
22144 `mono_stats.inflated_type_count' if we actually inflated
22146 (mono_class_get_full): Check the classes type to see whether we
22147 need to inflate it; also inflate MONO_TYPE_(M)VAR.
22149 2004-04-01 Jackson Harper <jackson@ximian.com>
22151 * reflection.c: Set culture for assembly references.
22153 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
22155 * reflection.[ch], icall.[ch], Fix support for pinning variables.
22157 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22160 (do_mono_assembly_open): the critical section also covers
22161 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
22163 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22166 (mono_manage_threads): abort the background threads when finishing.
22169 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22171 * gc.c: only close the done_event handle if there was no timeout.
22174 2004-03-30 Martin Baulig <martin@ximian.com>
22176 * icall.c (icall_entries): It's called "System.Activator", not
22177 "System.Activation".
22179 2004-03-30 Martin Baulig <martin@ximian.com>
22181 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
22182 (mono_class_create_from_typespec): Likewise.
22184 2004-03-30 Martin Baulig <martin@ximian.com>
22186 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
22187 `has_ctor_constraint' and `initialized'.
22189 2004-03-30 Martin Baulig <martin@ximian.com>
22191 * reflection.c (encode_new_constraint): New static function to add
22192 the constructor constraint attribute to a type parameter.
22193 (encode_constraints): Call encode_new_constraint() if necessary.
22196 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
22198 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
22200 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
22202 * reflection.c, icall.c: add support for pinning variables.
22204 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
22206 * marshal.c (mono_marshal_get_managed_wrapper):
22207 init bool local with zero rather than null.
22209 2004-03-29 Martin Baulig <martin@ximian.com>
22211 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
22212 the "official" behavior here.
22213 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
22215 2004-03-29 Martin Baulig <martin@ximian.com>
22217 * icall.c: Reflect latest API changes.
22219 2004-03-29 Martin Baulig <martin@ximian.com>
22221 * loader.c (mono_get_method_from_token): Also call
22222 mono_metadata_load_generic_params () for abstract and interface
22223 methods; replace the type arguments in the method signature with
22224 the ones which are loaded from the metadata.
22226 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
22228 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
22229 of the lock is not the current thread. MS.NET don't do it, in spite of
22230 what the documentation says. See bug #56157.
22232 2004-03-28 Martin Baulig <martin@ximian.com>
22234 * class.c (mono_class_init): Don't call init_properties() and
22235 init_events() for generic instances; set `prop->parent' when
22236 inflating properties.
22238 * reflection.c (mono_generic_inst_get_object): Call
22239 `mono_class_init (ginst->klass)'.
22240 (mono_type_get_object): Only create a MonoGenericInst if your
22241 generic type is a TypeBuilder.
22242 (do_mono_reflection_bind_generic_parameters): Only set
22243 `ginst->is_dynamic' if our generic type is a TypeBuilder.
22245 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
22247 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
22250 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22252 * icall.c: added Kill_internal icall.
22253 * process.[ch]: added Kill_internal icall.
22255 2004-03-25 Martin Baulig <martin@ximian.com>
22257 * class.h (MonoStats): Added `generic_instance_count',
22258 `inflated_method_count', `inflated_type_count' and
22259 `generics_metadata_size'.
22261 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22263 * reflection.c: no warnings now.
22265 2004-03-25 Martin Baulig <martin@ximian.com>
22267 * class.c (mono_class_get_full): New public function; does a
22268 mono_class_get(), but also takes a `MonoGenericContext *'.
22270 * loader.c (mono_field_from_memberref): Renamed to
22271 `field_from_memberref', made static and added `MonoGenericContext *'
22273 (mono_field_from_token): Added `MonoGenericInst *' argument.
22274 (method_from_memberef): Likewise.
22275 (mono_get_method_from_token): Likewise.
22276 (mono_get_method_full): New public function; does a
22277 mono_get_method(), but also takes a `MonoGenericContext *'.
22279 * verify.c (mono_method_verify): Get the method's generic context
22280 and pass it to mono_field_from_token(), mono_get_method_full() and
22281 mono_class_get_full().
22283 2004-03-25 Martin Baulig <martin@ximian.com>
22285 * class.c (mono_class_inflate_generic_type): Take a
22286 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
22287 `MonoGenericMethod *'.
22289 2004-03-25 Martin Baulig <martin@ximian.com>
22291 * loader.h (MonoMethodInflated): Store the MonoGenericContext
22292 instead of the MonoGenericMethod here.
22294 2004-03-25 Martin Baulig <martin@ximian.com>
22296 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
22297 each time we create a new MonoGenericInst, we also create a new
22298 context which points back to us.
22300 * class.c (inflate_method): Use `ginst->context' instead of
22301 creating a new context.
22303 * loader.c (method_from_memberref): Use
22304 `klass->generic_inst->context' instead of creating a new context.
22306 2004-03-25 Martin Baulig <martin@ximian.com>
22308 * class.h (MonoGenericContext): New struct.
22309 (MonoGenericMethod): Removed `generic_inst'.
22311 * class.c (mono_class_inflate_generic_method): Take a
22312 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
22314 2004-03-25 Martin Baulig <martin@ximian.com>
22316 * loader.h (MonoMethodInflated): New typedef.
22318 * metadata.h (MonoMethodSignature): Removed `gen_method', make
22319 `generic_param_count' consume just 30 bits, added `is_inflated'
22320 and `has_type_parameters' flags (one bit each).
22322 * class.c (mono_class_inflate_generic_method): Create a
22323 MonoMethodInflated instead of a MonoMethodNormal and set
22324 `is_inflated' in the method signature.
22326 * class.h (MonoGenericMethod): Removed `generic_method'.
22328 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
22330 * image.c: Make sure the name of a MonoImage is always an absolute path.
22331 This fixes bug #54415.
22333 2004-03-24 Martin Baulig <martin@ximian.com>
22335 * class.c (mono_class_setup_vtable): If we're a generic instance,
22336 use our generic type's vtable size.
22338 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
22340 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
22341 MONO_NO_UNLOAD env var as a temporary workaround for unloading
22344 2004-03-23 Martin Baulig <martin@ximian.com>
22346 * class.h (MonoDynamicGenericInst): Added `int count_events' and
22347 `MonoEvent *events'.
22349 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
22350 (typebuilder_icalls): Added "get_event_info"; calls
22351 mono_reflection_event_builder_get_event_info().
22353 * reflection.c (mono_reflection_generic_inst_initialize): Added
22354 `MonoArray *events'.
22355 (mono_reflection_event_builder_get_event_info): New function.
22357 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
22359 * object.h: add mono_type_initialization_init
22361 * object.c (mono_runtime_class_init):
22362 implement class constructor synchronization rules
22363 to cope with threading issues.
22364 add mono_type_initialization_init
22366 * appdomain.c (mono_runtime_init): call
22367 mono_type_initialization_init
22369 * class.h: removing initializing field from MonoVTable
22371 2004-03-23 Martin Baulig <martin@ximian.com>
22373 * class.c (my_mono_class_from_generic_parameter): Use
22374 `param->name' if it's not NULL.
22376 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
22378 * class.c: do not insert non-virtual methods in the vtable.
22379 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
22380 that means the method is non-virtual. This never would have
22383 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
22385 * profiler.c: Added lock for accessing coverage_hash.
22387 2004-03-22 Martin Baulig <martin@ximian.com>
22389 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
22390 `method->method->signature->generic_param_count != 0' to make it
22391 work for interface methods.
22393 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22395 * process.c: quote the string passed to the shell using g_shell_quote.
22397 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22400 (mono_threads_manage): don't remove the finalizer thread and self
22401 from the threads hash table so that mono_thread_manage can be called
22404 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22406 * process.c: quote the arguments when UseShellExecute is true. Fixes
22409 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22411 * threads.c: set mono_thread_detach as a cleanup routine for every
22412 thread. This way it's always executed upon thread termination, either
22413 aborted or finished normally. No more xsp hangs!
22415 2004-03-17 Martin Baulig <martin@ximian.com>
22417 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
22418 `int count_nested' and a `MonoType **nested'.
22420 * reflection.c (mono_reflection_bind_generic_parameters): Moved
22421 most of the functionality into a new static
22422 do_mono_reflection_bind_generic_parameters() and don't take a
22423 `MonoType *nested_in' argument any more. Don't compute nested
22425 (mono_reflection_generic_inst_get_nested_types): New public method
22426 to get nested types.
22428 * class.c (mono_class_create_generic): Set `klass->nested_in' if
22429 we're a nested class.
22431 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
22432 mono_reflection_generic_inst_get_nested_types() to compute the
22435 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
22437 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
22438 descriptive error message under windows.
22440 2004-03-17 Martin Baulig <martin@ximian.com>
22442 * class.c (dup_type): Added `const MonoType *original' argument;
22443 copy the attrs from the original type.
22445 2004-03-17 Martin Baulig <martin@ximian.com>
22447 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
22448 `m->generic_inst_cache' here.
22450 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
22452 * exception.h exception.c: Add stack_overflow_exception.
22454 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22457 (overlapped_callback): call SetEvent *after* invoking the callback.
22458 No need to call CloseHandle.
22460 2004-03-16 Martin Baulig <martin@ximian.com>
22462 * reflection.c (mono_image_get_fieldref_token): Take a
22463 `MonoReflectionField *' instead of a `MonoClassField *' and a
22464 `MonoClass *'; store the `MonoReflectionField *' in the hash.
22466 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22468 * appdomain.c: don't add the culture to the filename we're looking for
22469 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
22471 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22473 * locales.c: don't ignore symbols when doing case insensitive compares.
22474 Thanks Dick! Fixes bug #54046.
22476 * threads.c: surround 'threads' usage with enter/leave in
22477 mono_thread_manage.
22479 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
22481 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
22482 implicitly marshalled as [Out]. Fixes #55450.
22484 (mono_marshal_get_runtime_invoke): Zero out the result if there is
22487 2004-03-16 Martin Baulig <martin@ximian.com>
22489 * class.c (mono_class_from_generic_parameter): Use the actual
22492 2004-03-16 Martin Baulig <martin@ximian.com>
22494 * reflection.c (type_get_signature_size): New static function.
22495 Compues the size of the type in a method signature.
22496 (method_get_signature_size): New static function; calls
22497 type_get_signature_size() to compute the actual size of the
22498 method's signature.
22499 (method_encode_signature): Use method_get_signature_size() to get
22500 the signature's size rather than using `nparams * 10'.
22502 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22504 * file-io.h: define here WapiOverlapped on windows. I don't want the
22505 regular OVERLAPPED one.
22508 * threadpool.c: somehow, BindIoCompletionCallback is not found.
22509 Disabling AIO on windows.
22511 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22513 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
22516 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22518 * appdomain.c: upgraded corlib version.
22520 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
22521 and BeginWrite. Allow opening files for asynchrnous operations.
22523 * file-io.h: new struct that maps FileStreamAsyncResult.
22524 * icall.c: added new icalls.
22525 * process.[ch]: support setting child process environment variables
22526 and use the SHELL or COMSPEC when UseShellExecute is true.
22528 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
22529 callback for async. IO is here and also BindHandle.
22531 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
22534 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
22536 * reflection.c (create_custom_attr): Allow len == 0.
22538 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
22539 computation on big-endian machines.
22541 2004-03-13 Martin Baulig <martin@ximian.com>
22543 * class.h (MonoGenericInst): Added `int count_ifaces'.
22545 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
22546 `ginst->count_ifaces' instead `klass->interface_count' since we
22547 may get called before the vtable is created.
22549 * loader.c (mono_method_get_param_names): If we're a generic
22550 instance, return and don't initialize the class.
22552 * reflection.c (mono_reflection_setup_generic_class): Don't call
22553 ensure_runtime_vtable().
22554 (mono_reflection_bind_generic_parameters): Set
22555 `ginst->count_ifaces'.
22557 2004-03-11 Jackson Harper <jackson@ximian.com>
22561 * unicode.h: Remove unused System.Char icalls.
22563 2004-03-11 Miguel de Icaza <miguel@ximian.com>
22565 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
22566 code when we P/Invoke the first library in Windows.Forms, instead
22567 of when we first open the assembly.
22569 * assembly.c: Drop the lookup from here.
22571 2004-03-10 Martin Baulig <martin@ximian.com>
22573 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
22574 class for properties, fields and events. Finally fixes #54945.
22576 2004-03-10 Martin Baulig <martin@ximian.com>
22578 * metadata.c (mono_metadata_class_equal): New static function;
22579 checks whether two generic instances or two generic parameters are
22581 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
22584 2004-03-10 Martin Baulig <martin@ximian.com>
22586 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
22588 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
22589 argument and write it into the `reflection_info' field.
22592 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
22593 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
22595 2004-03-09 Jackson Harper <jackson@ximian.com>
22597 * char-conversions.h: use 8 bits for numeric data its all we need
22598 * icall.c: numeric data is only 8 bits now.
22600 2004-03-09 Martin Baulig <martin@ximian.com>
22602 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
22604 * class.c (init_properties, init_events): Initialize the new
22607 * reflection.c (typebuilder_setup_properties): Likewise.
22608 (typebuilder_setup_events): Likewise.
22610 * reflection.h (MonoEventInfo): Replaced `parent with
22611 `declaring_type' and `reflected_type'.
22613 * icall.c (ves_icall_get_property_info): Distinguish between
22614 declaring and reflected type.
22615 (ves_icall_get_event_info): Likewise.
22617 2004-03-09 Martin Baulig <martin@ximian.com>
22619 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
22620 (ves_icall_Type_GetField): Correctly set field->klass.
22622 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
22624 * loader.h: Fix warning.
22626 2004-03-08 Miguel de Icaza <miguel@ximian.com>
22628 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
22629 library routine if present. Notice that it will still continue
22630 executing even if its missing, for those working on the Gtk#
22631 edition of Windows.Forms.
22633 * assembly.c (do_mono_assembly_open): If loading the
22634 System.Windows.Forms call mono_loader_wini_init.
22636 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
22638 * class.h: Added MonoRemoteClass struct.
22639 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
22640 function for MonoStrings.
22641 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
22642 Added internal call for getting the proxy type.
22643 * marshal.c: Get the type of transparent proxies from its remote_class.
22644 Added methods that generate the IL for type checks and casts:
22645 mono_marshal_get_isinst, mono_marshal_get_castclass,
22646 mono_marshal_get_proxy_cancast.
22647 * marshal.h: Declaration of the previous new methods.
22648 * object.c: Added new moethods for creating and updating MonoRemoteClass
22649 instances: mono_remote_class, mono_upgrade_remote_class,
22650 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
22651 * verify.c: FIx transparent_proxy_fields layout.
22652 * appdomain.c: Bump corlib version.
22654 2004-03-04 Jackson Harper <jackson@ximian.com>
22656 * icall.c: Add icall to access char conversion tables.
22657 * char-conversions.h: Character conversion tables.
22658 * Makefile.am: Add char-conversions.h private header file.
22660 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
22662 * appdomain.c (unload_thread_main): Increase unloading timeout to
22663 10 sec as a temporary workaround for Nant problems.
22665 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
22667 * gc.c: Add checks for GC_enable and GC_disable.
22669 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
22670 (jaak@zd.com.pl). Fix memory corruption in String.Replace
22673 2004-02-27 Martin Baulig <martin@ximian.com>
22675 * reflection.c (mono_reflection_bind_generic_parameters): Take a
22676 `MonoReflectionType *' instead of a `MonoType *'.
22678 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
22680 * gc.c (run_finalize): Avoid finalizing the object representing the
22682 (finalizer_thread): Fix warning.
22684 2004-02-25 Martin Baulig <martin@ximian.com>
22686 * class.c (_mono_class_get_instantiation_name): Added `int offset'
22687 argument for nested types.
22688 (mono_class_create_generic): Added support for nested generictypes.
22690 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
22693 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
22695 * reflection.c (method_encode_signature): Increase the minimum
22696 value of `size' from 10 to 11.
22697 (mono_reflection_bind_generic_parameters): Take `int type_argc'
22698 and `MonoType **types' arguments instead of the `MonoArray
22699 *types'; added `MonoType *nested_in'. Recursively instantiate
22702 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
22704 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
22705 stack_overflow_ex members which are used by exception handling.
22707 * appdomain.c (mono_runtime_init): Initialize the new members.
22709 * gc.c (mono_gc_enable): New helper function.
22710 * gc.c (mono_gc_disable): New helper function.
22712 2004-02-23 Martin Baulig <martin@ximian.com>
22714 * icall.c: I must have been really stupid - make it actually work
22717 2004-02-23 Martin Baulig <martin@ximian.com>
22719 * loader.c (method_from_memberref): Only inflate the method if
22720 it's in another klass.
22722 2004-02-23 Martin Baulig <martin@ximian.com>
22724 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
22725 (mono_class_init): If we're a generic instance and an interface,
22726 compute `class->interface_id'; also create `class->interfaces'
22727 here and inflate them.
22729 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
22731 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
22733 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
22735 2004-02-15 Miguel de Icaza <miguel@ximian.com>
22737 * reflection.c (method_encode_code): Improved the error message
22738 generated by the exception.
22740 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22742 * icall.c: Martin did not do what he said in the ChangeLog for
22743 2004-02-18, but put back the changes for properties and events.
22744 Commenting those changes out again and adding comment to bug #54518.
22746 * process.c: removed warning.
22748 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
22750 * marshal.c (emit_struct_conv): Print an error message instead of
22751 asserting when a type does not have the StructLayout attribute.
22753 2004-02-20 Martin Baulig <martin@ximian.com>
22755 * reflection.c (mono_type_get_object): Also use the cache for
22757 (mono_reflection_bind_generic_parameters): Always compute
22760 2004-02-20 Martin Baulig <martin@ximian.com>
22762 * class.h (MonoGenericMethod): Removed `klass'.
22764 * class.c (mono_class_inflate_generic_method): Added `MonoClass
22767 2004-02-20 Martin Baulig <martin@ximian.com>
22769 * reflection.c (method_encode_methodspec): Actually use the
22770 uninflated signature for the memberref.
22772 2004-02-20 Martin Baulig <martin@ximian.com>
22774 * class.h (MonoGenericMethod): Removed `declaring'.
22776 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
22777 is NULL, compute it here.
22779 2004-02-20 Martin Baulig <martin@ximian.com>
22781 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
22783 * metadata.c (mono_metadata_generic_inst_hash): New method.
22784 (mono_metadata_generic_inst_equal): New method.
22786 * reflection.c (mono_reflection_bind_generic_parameters): Use the
22787 `klass->image->generic_inst_cache' cache to avoid creating
22788 duplicate MonoGenericInst's.
22790 * class.c (mono_class_inflate_generic_type): Use the cache.
22792 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
22794 * object.c: fixed gc descriptor calculation for embedded valuetypes.
22796 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22798 * icall.c: added Socket.WSAIoctl icall.
22800 * socket-io.[ch]: implemented
22801 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
22803 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
22805 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
22807 2004-02-18 Urs C Muff <umuff@quark.com>
22809 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
22810 this work on PPC and other big-endian architectures.
22812 * debug-mono-symfile.h: Prepended the names of all the `guint32'
22813 fields with an underscore to make sure they're only accessed by
22814 the read32() macro.
22816 2004-02-18 Martin Baulig <martin@ximian.com>
22818 * icall.c: Put the klass->refclass changes back for methods and
22819 fields, but not for properties and events. We're currently not
22820 distinguishing between DeclaringType and ReflectedType for
22821 properties and events, that's what caused the regressions.
22823 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22826 (mono_async_result_new): the handle can be NULL.
22828 * threadpool.c: Use an event instead of a semaphore, don't initialize
22829 it until needed. This saves quite a few semaphores from being created
22830 when using the threadpool.
22832 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
22834 * object.c (mono_string_is_interned_lookup): Fix interning of long
22835 strings. Fixes #54473.
22837 * domain.c (ldstr_equal): Optimize if the two strings are equal.
22839 * icall.c: Revert the klass->refclass changes since they introduce
22840 regressions (bug #54518).
22842 2004-02-18 Martin Baulig <martin@ximian.com>
22844 * class.c (mono_class_init): If we're a generic instance and don't
22845 come from a TypeBuilder, inflate our members here.
22846 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
22847 (mono_class_create_generic): New public method.
22848 (mono_class_initialize_generic): Removed.
22849 (get_instantiation_name): Renamed to
22850 _mono_class_get_instantiation_name() and made it public.
22852 2004-02-18 Martin Baulig <martin@ximian.com>
22854 * class.c (mono_class_inflate_generic_type): Clear the new
22855 instance's `nginst->klass' when inflating a generic instance.
22856 (mono_class_is_subclass_of): Added (basic) support for generic
22859 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
22861 * appdomain.h, domain.c: use a MonoCodeManager instead of a
22862 MonoMempool to hold compiled native code.
22864 2004-02-17 Martin Baulig <martin@ximian.com>
22866 * class.h (MonoDynamicGenericInst): Added `count_properties' and
22869 * reflection.c (mono_reflection_generic_inst_initialize): Added
22870 `MonoArray *properties' argument.
22872 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
22874 2004-02-17 Martin Baulig <martin@ximian.com>
22876 * icall.c (ves_icall_Type_GetFields): Renamed to
22877 ves_icall_Type_GetFields_internal() and added a
22878 `MonoReflectionType *rtype' argument; pass it to
22879 mono_field_get_object() to set the field's "reflected" type.
22880 (ves_icall_Type_GetConstructors): Likewise.
22881 (ves_icall_Type_GetEvents): Likewise.
22882 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
22883 argument; pass it to mono_method_get_object() to set the method's
22886 2004-02-17 Martin Baulig <martin@ximian.com>
22888 * class.h (MonoDynamicGenericInst): New type.
22889 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
22891 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
22892 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
22893 (ves_icall_MonoGenericInst_GetFields): New interncall.
22895 * class.c (mono_class_from_generic): Don't call
22896 mono_class_initialize_generic() if this is a dynamic instance;
22897 ie. it's being created from a TypeBuilder.
22898 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
22899 `class->byval_arg.type'.
22901 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
22902 to `inflate_method' and made static.
22903 (mono_reflection_inflate_field): Removed.
22904 (mono_reflection_generic_inst_initialize): New public method.
22906 * reflection.h (MonoReflectionGenericInst): Removed `methods',
22907 `ctors' and `fields'; added `initialized'.
22909 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
22911 * debug-helpers.c (mono_method_full_name): Fix output for empty
22914 2004-02-12 Martin Baulig <martin@ximian.com>
22916 * class.h (MonoClassField): Added `MonoType *generic_type'.
22918 * reflection.c (mono_image_get_fieldref_token): Added support for
22919 instantiated generic types.
22920 (field_encode_inflated_field): Removed.
22921 (mono_image_get_inflated_field_token): Removed.
22922 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
22924 * reflection.h (MonoReflectionInflatedField): Removed.
22926 2004-02-12 Martin Baulig <martin@ximian.com>
22928 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
22929 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
22931 * reflection.c (mono_image_get_methodspec_token): Take a
22932 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
22933 (mono_image_create_token): Check whether we have a
22934 `method->signature->gen_method' and call
22935 mono_image_get_methodspec_token() if appropriate.
22936 (inflated_method_get_object): Removed.
22937 (mono_reflection_bind_generic_method_parameters): Return a
22938 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
22939 (mono_reflection_inflate_method_or_ctor): Likewise.
22941 * reflection.h (MonoReflectionInflatedMethod): Removed.
22943 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
22945 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
22946 for custom valuetype marshalling.
22948 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
22950 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22952 * icall.c: fixed WSAGetLastError_internal name.
22954 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
22956 * threads.c (mono_thread_attach): Allow this to be called multiple
22957 times for a thread.
22959 * threads.c (build_wait_tids): Do not wait for ourselves.
22961 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
22962 appdomain list is empty.
22964 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
22965 memory returned by mono_string_builder_to_utf16, since it points into
22966 managed memory. Thanks to Bernie Solomon for noticing this.
22968 * icall.c: Add AppDomainSetup icalls.
22970 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
22972 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
22975 * reflection.c (reflection_methodbuilder_to_mono_method): Save
22976 custom attributes to the method_aux struct. Also fix array indexes etc.
22978 * loader.c (mono_method_get_param_names): Make dynamic case work again.
22980 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
22982 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
22983 (both static and runtime) and reduce startup time.
22985 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
22987 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
22988 AsAny marshalling conversion instead of crashing.
22990 * marshal.c: Fix warnings.
22992 2004-02-09 Martin Baulig <martin@ximian.com>
22994 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
22996 * reflection.h (MonoReflectionInflatedMethod): Removed the
22997 `declaring' field, it's now in the unmanaged MonoGenericMethod.
22999 * reflection.c (method_encode_methodspec): Removed the `method'
23000 argument; we get it from `gmethod->declaring'.
23001 (inflated_method_get_object): Removed the `declaring' argument.
23003 2004-02-09 Martin Baulig <martin@ximian.com>
23005 * class.h (MonoGenericMethod): New type.
23006 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
23009 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
23010 a `MonoGenericMethod *gen_method' one.
23012 * class.c (mono_class_inflate_generic_type): Take an additional
23013 `MonoGenericMethod * argument. This is only non-NULL if we're
23014 inflating types for a generic method.
23015 (mono_class_inflate_generic_signature): Renamed to
23016 inflate_generic_signature() and made static; take a
23017 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
23018 (inflate_generic_header): Take a `MonoGenericMethod *' argument
23019 instead of a `MonoGenericInst *' one.
23020 (mono_class_inflate_generic_method): Likewise.
23022 * reflection.c (encode_generic_method_sig): Take a
23023 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
23024 (method_encode_methodspec): Likewise.
23025 (inflated_method_get_object): Likewise.
23027 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
23028 field with a `MonoGenericMethod *gmethod' one.
23030 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
23032 * class.h (mono_class_has_parent): add parens to expansion
23035 2004-02-08 Martin Baulig <martin@ximian.com>
23037 * image.h (MonoImage): Removed `generics_cache'.
23039 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
23040 instead of a `MonoType *' argument; removed the `inflate_methods'
23041 argument. Don't inflate methods here.
23043 * loader.c (find_method): If it's a generic instance, call
23044 mono_class_init() on the `sclass->generic_inst->generic_type'.
23046 * metadata.c (mono_type_size): Make this work on uninitialized
23047 generic instances; call it on the `ginst->generic_type's class.
23049 * reflection.c (mono_reflection_bind_generic_parameters): Call
23050 mono_class_from_generic() to create the `ginst->klass'.
23052 2004-02-08 Martin Baulig <martin@ximian.com>
23054 * class.h (MonoClass): Changed type of `generic_inst' from
23055 `MonoType *' to `MonoGenericInst *'.
23057 2004-02-08 Martin Baulig <martin@ximian.com>
23059 * icall.c (ves_icall_Type_BindGenericParameters): Just call
23060 mono_type_get_object(), this is now creating a `MonoGenericInst'
23061 for MONO_TYPE_GENERICINST.
23062 (ves_icall_MonoGenericInst_GetParentType): Likewise.
23063 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
23065 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
23066 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
23067 (inflated_method_get_object): Added `MonoClass *refclass' argument.
23068 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
23069 and reflected type.
23071 * reflection.h (MonoReflectionInflatedMethod): Removed
23072 `declaring_type' and `reflected_type'.
23074 2004-02-08 Martin Baulig <martin@ximian.com>
23076 * class.h (MonoGenericInst): Added `MonoType *parent' and
23077 `MonoType **ifaces'.
23079 * reflection.h (MonoReflectionGenericInst): Removed `klass',
23080 `parent' and `interfaces'.
23082 * reflection.c (mono_reflection_bind_generic_parameters): Take a
23083 `MonoType *' argument and return a `MonoType *'.
23086 (ves_icall_MonoGenericInst_GetParentType): New interncall.
23087 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
23089 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
23091 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
23092 valuetype marshalling.
23094 2004-02-06 Martin Baulig <martin@ximian.com>
23097 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
23098 (my_mono_class_from_generic_parameter): Likewise.
23100 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
23102 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
23103 contents of the symbol files lazily.
23105 * object.h (MonoThread): Add 'name' and 'name_len' fields.
23107 * threads.h threads.c icall.c: New icalls for getting and setting the
23110 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
23112 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
23113 Raise an exception when the domain is not found.
23115 2004-02-03 Martin Baulig <martin@ximian.com>
23117 * reflection.c (mono_image_get_methodspec_token): Use the
23118 uninflated signature; fixes gen-33.
23120 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
23122 * gc.c threads.c: Make the finalizer thread a normal managed thread so
23123 the finalizer code can use thread functionality.
23125 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
23126 the finalizer thread.
23128 * threads.c: Make some functions more robust.
23130 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
23132 * metadata.h: Add new marshalling conventions.
23134 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
23135 stringbuilder marshalling. Fixes #53700.
23137 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
23139 * reflection.c (mono_image_get_type_info): Save declarative security
23142 * reflection.c (mono_image_get_field_info): Handle uninitialized
23143 unmanaged fields as well.
23145 * appdomain.c: Bump corlib version.
23147 2004-02-01 Martin Baulig <martin@ximian.com>
23149 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
23150 method type arguments.
23152 2004-01-30 Duncan Mak <duncan@ximian.com>
23154 * marshal.h: Add prototype for
23155 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
23157 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
23160 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
23162 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
23163 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
23165 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
23167 * marshal.c (mono_marshal_get_native_wrapper): Add support for
23168 custom marshalling of valuetypes.
23170 * marshal.c: Fix some warnings.
23172 2004-01-29 Martin Baulig <martin@ximian.com>
23174 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
23175 for generic method parameters.
23177 * reflection.c (method_encode_methodspec): Write the uninflated
23178 signature into the methodspec table.
23179 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
23180 is always the uninflated method.
23181 (reflection_methodbuilder_to_mono_method): Copy the generic
23182 parameters from the MethodBuilder into `header->gen_params'.
23184 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
23186 * class.c (mono_class_from_generic_parameter): Fix warning.
23188 2004-01-27 Martin Baulig <martin@ximian.com>
23190 * class.c (mono_class_from_generic_parameter): Don't create
23191 `klass->methods' here.
23193 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
23195 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
23196 extension since it does not work with libraries named lib<FOO>.dll.so.
23198 2004-01-25 Martin Baulig <martin@ximian.com>
23200 * class.c (mono_class_inflate_generic_type): Added support for
23201 MONO_TYPE_GENERICINST.
23203 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
23204 inflate methods on open constructed types.
23206 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23208 * object.c: fire ProcessExit event in the root AppDomain after running
23209 Main. Fixes bug #53299.
23211 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
23213 * socket-io.c: include the new socket-wrappers.h header.
23214 Use the wrappers instead of the unix socket functions to make the code
23217 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
23219 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
23221 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
23224 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
23226 * reflection.c (mono_image_create_pefile): Handle the case when the
23227 entry point is not a MethodBuilder.
23229 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
23230 field to ReflectionMethod since it is not allways a builder.
23232 * reflection.c (type_get_fully_qualified_name): New helper function to
23233 return the fully qualified name of a type.
23235 * reflection.c (encode_marshal_blob): Always emit the fully qualified
23236 type name for custom marshallers.
23238 * reflection.c (mono_marshal_spec_from_builder): Ditto.
23240 * class.c (mono_class_setup_vtable): If a parent class already
23241 implements an interface, use the implementing methods from that class.
23244 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23246 * threadpool.c: just return instead of ExitThread to allow for thread
23249 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
23251 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
23252 when closing resource modules.
23254 * reflection.c (mono_image_create_pefile): Handle the case when the
23255 entry point is not a MethodBuilder.
23257 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
23258 field to ReflectionMethod since it is not allways a builder.
23260 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
23262 * marshal.c (mono_marshal_get_managed_wrapper):
23263 mono_marshal_alloc takes native int so CONV_I
23264 the arg for 64bits.
23266 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
23268 * reflection.c (fixup_cattrs): New function to fixup the methoddef
23269 tokens in the cattr table. Fixes #53108.
23271 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23273 * loader.c: don't trim ".dll" before looking up in the config file.
23274 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
23276 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
23278 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
23279 Return the module which contains the resource as well.
23280 (ves_icall_System_Reflection_Module_Close): New icall.
23282 * appdomain.c: Bump corlib version number.
23284 * image.c (mono_image_addref): New public function.
23286 * assembly.c: Call mono_image_addref.
23288 * reflection.c (mono_module_get_object): Increase reference count of
23291 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
23294 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
23295 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
23296 proper exceptions on DllImport problems.
23298 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
23300 * class.c, metadata.c: eliminate CSIZE macro.
23302 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
23304 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
23305 * object.h: Added async_callback field in MonoAsyncResult.
23306 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
23307 * verify.c: Added async_callback in MonoAsyncResult layout.
23309 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
23311 * reflection.c (mono_reflection_get_custom_attrs): Add support
23314 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
23316 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
23318 (mono_marshal_method_from_wrapper): Add null pointer check.
23320 2004-01-16 Martin Baulig <martin@ximian.com>
23322 * debug-mono-symfile.h: Set version number to 36 and reflect
23323 latest symbol writer changes.
23325 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
23327 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
23328 multi-dimensional arrays.
23329 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
23330 (mono_class_from_mono_type): Use bounded_array_class_get.
23332 * class.c (mono_bounded_array_class_get): New function which takes
23333 a 'bounded' bool argument to distinguish vectors from one dimensional
23336 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
23337 bounded_array_class_get if the array has bounds.
23339 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
23340 Search modules loaded using AssemblyBuilder:AddModule as well.
23342 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23344 * appdomain.c: increased corlib version.
23345 * filewatcher.c: removed g_print.
23347 (get_property_info): only allocate what is actually requested.
23348 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
23350 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23352 * Makefile.am: added filewatcher.[ch]
23353 * filewatcher.[ch]: FileSystemWatcher runtime support.
23354 * icall.c: added new FSW icalls.
23356 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
23358 * string-icalls.c: fix stringbuilder regression as suggested by
23359 Iain McCoy <iain@mccoy.id.au>.
23361 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
23363 * process.c (process_read_stringtable_block): Recognize '007f' as
23364 a language neutral stringtable block.
23366 2004-01-12 Patrik Torstensson
23368 * object.h (MonoStringBuilder) : Changed layout to support our
23369 new stringbuilder class.
23370 * marshal.c: Change marshalling to support the new layout of
23372 * appdomain.c: increased version number because new layout of
23375 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
23377 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
23378 assembly name as an string instead of an AssemblyName, since it is
23379 easier to extract info from it.
23381 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
23382 the culture subdirectories too. Fixes #52231.
23384 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23386 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
23387 It takes 2 new parameters with an optional name for the method to look
23388 for and case ignoring info.
23390 * threadpool.c: removed unused variable.
23392 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23394 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
23395 It takes 2 new parameters with an optional name for the property to look
23396 for and case ignoring info.
23399 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
23401 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
23404 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23407 * assembly.c: escape the uri before passing it to g_filename_from_uri.
23410 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
23412 * reflection.c: Add support for more than one unmanaged resource.
23414 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
23415 in field->def_value, as done in all other cases.
23417 * reflection.c (mono_reflection_get_custom_attrs): Add support for
23420 * reflection.c (mono_reflection_create_runtime_class): Remove
23421 errorneous assignment to klass->element_class, since it is already
23422 done in mono_reflection_setup_internal_class.
23424 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23426 * gc.c: added missing LeaveCriticalSection.
23427 * icall.c: indented a couple of lines.
23428 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
23429 if we call EndInvoke inside a callback. Fixes bug #52601.
23431 2004-01-07 Martin Baulig <martin@ximian.com>
23433 * mono-debug-debugger.h
23434 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
23436 2004-01-06 Miguel de Icaza <miguel@ximian.com>
23438 * appdomain.c: Use messages in NotImplementedException.
23440 * exception.c (mono_get_exception_not_implemented): Now this takes
23441 a message argument.
23443 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
23444 exception instead of g_asserting an aborting when something is not
23447 Add some inline docs.
23449 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
23451 * reflection.h: Update after changes to object layout.
23453 * reflection.c: Implement saving of unmanaged aka win32 resources.
23455 * appdomain.c: Bump version number.
23457 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
23458 Handle missing domains gracefully.
23460 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
23462 * file-io.c : On Windows, there are much more invalid_path_chars.
23464 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
23466 * class.h, object.c: prepare for GetType () speedup.
23468 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
23470 * profiler.c: workaround for --profile null reference exception on
23471 cygwin. Patch by Patrik Torstensson.
23473 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
23475 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
23476 make work for unaligned access.
23478 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
23480 * class.c: small cleanup (class->fields [i] -> field).
23481 * image.c: check address of metadata is valid.
23483 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
23485 * assembly.h assembly.c (mono_assembly_loaded): New public function to
23486 search the list of loaded assemblies.
23488 * reflection.c (mono_reflection_type_from_name): Use
23489 mono_assembly_loaded instead of mono_image_loaded.
23491 * reflection.c: Fix warnings.
23493 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
23495 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
23496 is dynamic. This is needed since an assembly can contain both dynamic and
23497 non-dynamic images.
23499 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
23502 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
23504 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
23505 to store modules loaded using AddModule.
23507 * reflection.c (mono_image_fill_file_table): Generalize this so it works
23510 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
23512 * reflection.c (mono_image_fill_export_table_from_module): New function to
23513 fill out the EXPORTEDTYPES table from a module.
23515 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
23516 into a separate function. Also handle loaded non-dynamic modules.
23518 * reflection.c (mono_image_basic_init): Fix memory allocation.
23520 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23522 * assembly.c (mono_assembly_load_references): Make this public.
23524 2003-12-19 Martin Baulig <martin@ximian.com>
23526 * class.c (mono_class_initialize_generic): Made this static, take
23527 a `MonoGenericInst *' instead of a `MonoClass *'.
23528 (mono_class_from_generic): Call mono_class_initialize_generic()
23529 unless we're already initialized or being called from
23530 do_mono_metadata_parse_generic_inst().
23532 * class.h (MonoGenericInst): Added `initialized' and
23533 `init_pending' flags.
23535 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
23536 `mono_class_init (gklass)' or mono_class_initialize_generic()
23537 here; set `generic_inst->init_pending' while parsing the
23540 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
23542 * locales.c: include string.h for memxxx prototypes
23544 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
23546 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
23547 constructor when accessing literal fields.
23549 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
23551 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23553 * reflection.c (assembly_add_resource_manifest): New function to fill
23554 the MANIFESTRESOURCE table.
23556 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
23558 * reflection.h: Update to changes in class layout.
23560 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
23561 Reenable call to mono_runtime_is_shutting_down ().
23563 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
23564 determine if the runtime is shutting down.
23566 2003-12-16 Jackson Harper <jackson@ximian.com>
23568 * icall.c: comment out call to mono_runtime_is_shutting_down to
23571 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
23573 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
23574 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
23576 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
23578 * reflection.c: move definition of swap_with_size
23579 to before its first call
23581 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
23583 * appdomain.c (mono_runtime_is_shutting_down): New public function.
23585 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
23588 * object.c: Fix warnings.
23590 * icall.c (ves_icall_Type_Get...): Only consider inherited static
23591 members if FlattenHierarchy is set.
23593 * reflection.c (mono_image_add_decl_security): New function to emit
23594 declarative security.
23596 * reflection.h reflection.c: Add support for declarative security.
23598 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
23600 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
23602 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
23604 * appdomain.c verify.c: Moved corlib version checking into its own
23605 function in appdomain.c since it needs to create vtables etc.
23607 2003-12-13 Patrik Torstensson <p@rxc.se>
23609 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
23610 instead of unwrapped server.
23612 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
23614 * verify.c (check_corlib): Fix field index.
23616 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
23618 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
23621 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
23623 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
23624 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
23625 cope with sizeof(size_t) != sizeof(guint32).
23627 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23629 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
23630 in case of failure.
23632 2003-12-10 Mark Crichton <crichton@gimp.org>
23634 * icall.c: removed the GetNonZeroBytes. We now handle this case
23637 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
23639 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
23641 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
23644 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
23646 * verify.c (check_corlib): Handle the case when the version field is
23647 initialized by a static constructor.
23649 2003-12-08 Patrik Torstensson <p@rxc.se>
23651 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
23653 2003-12-08 Martin Baulig <martin@ximian.com>
23655 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
23656 a MonoReflectionGenericParameter, also take the parameter index
23657 and name as arguments.
23658 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
23659 (ves_icall_MonoGenericParam_initialize): New interncall.
23660 (ves_icall_Type_make_byref_type): New interncall.
23662 * reflection.h (MonoReflectionGenericParam): Derive from
23663 MonoReflectionType, not just from MonoObject. Added `refobj' and
23666 * reflection.c (mono_reflection_define_generic_parameter): Create
23667 and return a new MonoReflectionGenericParam; don't initialize the
23669 (mono_reflection_initialize_generic_parameter): New public method;
23670 initializes the constraints and creates the `param->pklass'.
23672 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
23674 * reflection.h reflection.c: Use the new fields 'num_types',
23675 'num_fields' and 'num_methods' to track the number of types etc.
23677 * verify.c (check_corlib): Check corlib version number.
23679 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
23681 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
23682 function works on all methods.
23684 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
23686 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
23687 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
23688 the custom_type_info flag of the transparent proxy.
23689 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
23690 objects that supports IRemotingTypeInfo.
23691 * object.h: Added custom_type_info field in transparent proxy.
23693 2003-12-06 Martin Baulig <martin@ximian.com>
23695 * class.c (mono_class_create_from_generic): Removed.
23696 (mono_class_from_generic): Check `ginst->klass' before doing
23697 anything else. This is important to fully support "recursive"
23700 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
23701 empty `generic_inst->klass' before doing anything else.
23703 2003-12-06 Dick Porter <dick@ximian.com>
23708 * locales.c: Use C structs to access class fields. Don't do a
23709 conversion between MonoString and UChar because both are
23710 platform-endian UTF-16. Compare now takes startindex and count
23711 parameters. Add a char overload for IndexOf. Speed up the
23712 invariant string IndexOf.
23714 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
23716 * Makefile.am (monosn_LDADD): Fix parallel build.
23718 2003-12-04 Martin Baulig <martin@ximian.com>
23721 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
23722 (ves_icall_Type_make_array_type): New interncall.
23724 2003-12-04 Martin Baulig <martin@ximian.com>
23726 * locales.c: also change it in the !HAVE_ICU case.
23728 2003-12-04 Dick Porter <dick@ximian.com>
23731 * locales.c: construct_compareinfo is now in CompareInfo, not
23734 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
23736 * image.c (mono_image_load_file_for_image): Cache loaded images in the
23737 image->files array.
23739 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
23742 * assembly.c (mono_assembly_load_references): Only load references
23745 * class.c (mono_class_from_name): Avoid linear search of the
23746 EXPORTEDTYPE table.
23748 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
23750 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
23752 * image.h (MonoImage): Add 'field_cache' field.
23754 * loader.c (mono_field_from_token): Cache field lookups.
23756 * reflection.c (mono_module_get_object): Fix name property.
23758 * icall.c (ves_icall_get_enum_info): Update after changes to
23759 mono_metadata_get_constant_index ().
23761 * icall.c: Get rid of get_type_info icall, use a separate icall for
23762 each type property to avoid needless memory allocations. Fixes #51514.
23764 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
23765 to avoid needless binary searches.
23767 * class.c (class_compute_field_layout): Move the initialization of
23768 field->def_value to mono_class_vtable ().
23770 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
23773 * object.c (mono_object_allocate): Make it inline.
23775 * object.c (mono_object_allocate_spec): Make it inline.
23777 2003-12-02 Dick Porter <dick@ximian.com>
23779 * locales.c (create_NumberFormat): NumberFormatInfo construction.
23780 Patch by Mohammad DAMT (mdamt@cdl2000.com).
23782 2003-12-01 Dick Porter <dick@ximian.com>
23784 * threads.c: Fix signature and call in CreateMutex and
23787 2003-12-01 Dick Porter <dick@ximian.com>
23790 * locales.c: Implement string compares and searching
23792 * object.h: Add extra Thread field
23794 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
23796 * reflection.c (fixup_method): Add support for MonoCMethod.
23798 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
23800 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
23802 * reflection.c (assembly_name_to_aname): Allow extra characters in
23803 assembly names. Fixes #51468.
23805 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
23807 * exception.c (mono_exception_from_name_domain): New helper function.
23809 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
23810 exception object in the correct domain.
23812 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
23813 formatting + make a copy a the input data.
23815 * loader.c (mono_get_method_from_token): Methods which contain
23816 native code do not have entries in the ImplMap.
23818 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
23819 Thanks to Gonzalo for spotting this.
23821 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
23822 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
23824 * assembly.h (mono_assembly_load_from): Split the second part of
23825 assembly loading into a new public function.
23827 * exception.h (mono_get_exception_bad_image_format): New function.
23829 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
23831 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
23832 Enumerate all modules inside a dynamic assembly. Fixes #51293.
23834 * icall.c: Add new icall for creating dynamic methods.
23836 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
23838 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
23840 * reflection.c (mono_reflection_create_dynamic_method): New icall to
23841 create a dynamic method.
23843 * reflection.c (resolve_object): New helper function.
23845 * reflection.c: Generalize ReflectionMethodBuilder and the functions
23846 which manipulate it so they can also work on dynamic methods.
23848 * reflection.c (reflection_method_builder_to_mono_method): Avoid
23849 creating the MonoReflectionMethodAux structure if it is not needed.
23851 * reflection.h verify.c: Update after changes to object layout.
23853 * reflection.c (method_builder_encode_signature): Fix compilation on
23856 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
23858 * appdomain.h: Added support for context static fields. Added static_data
23859 field to MonoAppContext and renamed thread_static_fields to a more
23860 generic special_static_fields in MonoAppDomain, since it can now contain
23861 context static fields.
23862 * domain.c: Updated hashtable name.
23863 * object.c: Replaced field_is_thread_static() for a more generic
23864 field_is_special_static() which also checks for context static attribute.
23865 In mono_class_vtable(), added support for static context fields.
23866 * threads.c: Changed methods that manage thread static fields to more
23867 generic methods so they can be reused both for thread and context static
23869 * threads.h: Declared some new methods.
23871 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
23873 * reflection.h: Update after changes to the managed types.
23875 * reflection.c (encode_custom_modifiers): New helper function.
23877 * reflection.c (method_encode_signature): Emit custom modifiers.
23879 * reflection.c (field_encode_signature): Emit custom modifiers.
23881 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
23883 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
23885 * icall.c (ves_icall_System_ValueType_Equals): New optimized
23888 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
23891 * object.c (mono_field_get_value_object): New function.
23893 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
23896 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
23898 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
23899 return a preallocated out-of-memory exception instance.
23901 * object.c (out_of_memory): Use the new function.
23903 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
23904 flag is before the custom modifiers. Fixes #49802.
23906 2003-11-16 Martin Baulig <martin@ximian.com>
23908 * class.c (mono_class_is_open_constructed_type): Implemented the
23909 MONO_TYPE_GENERICINST case.
23911 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
23913 * assembly.c (mono_assembly_fill_assembly_name): New function to
23914 fill out the MonoAssemblyName structure.
23915 (mono_assembly_open): Use the new function.
23917 * icall.c (fill_reflection_assembly_name): New helper function.
23919 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
23922 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
23924 2003-11-15 Martin Baulig <martin@ximian.com>
23926 * class.c (mono_class_is_open_constructed_type): New public
23927 function; checks whether a type is an open constructed type,
23928 ie. whether it still contains type parameters.
23929 (mono_class_inflate_generic_type): If we're a type parameter and
23930 the inflated type is also a MONO_TYPE_(M)VAR, return the original
23933 * class.h (MonoGenericInst): Added `guint32 is_open'.
23935 * loader.c (method_from_methodspec): Check whether we're an open
23936 or closed constructed type and set `ginst->is_open'.
23938 * reflection.c (mono_reflection_bind_generic_parameters): Check
23939 whether we're an open or closed constructed type and set
23941 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
23942 from open constructed types.
23944 2003-11-15 Martin Baulig <martin@ximian.com>
23946 * reflection.c (mono_reflection_bind_generic_parameters): If we're
23947 a generic instance (instead of a generic type declaration) with
23948 unbound generic parameters, bind them to our actual types.
23950 2003-11-14 Martin Baulig <martin@ximian.com>
23952 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
23954 * reflection.c (mono_reflection_bind_generic_parameters): If we're
23955 an interface type, populate `res->interfaces' with instantiated
23956 versions of all the interfaces we inherit.
23958 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
23960 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
23961 when MONO_PATH is set but doesn't contain the install dir.
23963 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23966 (ves_icall_Type_GetInterfaces): don't return an interface twice when
23967 it's also implemented in base classes. Fixes bug #50927.
23969 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
23971 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
23972 if this method is called from a finalizer. Fixes #50913.
23974 2003-11-12 Miguel de Icaza <miguel@ximian.com>
23976 * threads.c: Implement VolatileRead/VolatileWrite
23978 * icall.c: Add new icalls for VolatileRead/VolatileWrite
23980 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
23982 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
23983 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
23986 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
23987 from Peter Ross (pro@missioncriticalit.com).
23989 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
23991 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
23993 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
23995 * assembly.c (mono_assembly_load_references): Disable check because it
23996 triggers on older corlibs which lots of people have.
23998 2003-11-12 Jackson Harper <jackson@ximian.com>
24000 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
24001 load corlib.dll if mscorlib.dll is not found.
24002 * assembly.h: Remove corlib name define.
24005 * image.c: Change corlib name to mscorlib.
24007 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
24009 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
24011 2003-11-11 Miguel de Icaza <miguel@ximian.com>
24013 * appdomain.h: Added loader_optimization here to sync with the C#
24014 code, and add disallow_binding_redirects field.
24016 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
24018 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
24020 * reflection.c (mono_image_build_metadata): Fix crash on modules
24023 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
24025 * icall.c (ves_icall_get_method_info): Return callingConvention as
24028 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
24029 namespaces from the EXPORTEDTYPE table as well.
24031 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
24032 from all modules inside the assembly.
24034 2003-11-11 Martin Baulig <martin@ximian.com>
24036 * reflection.c (mono_reflection_bind_generic_parameters): Make
24037 this work for interfaces.
24039 2003-11-11 Martin Baulig <martin@ximian.com>
24041 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
24043 2003-11-11 Martin Baulig <martin@ximian.com>
24045 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
24046 "MonoInflatedMethod" and "MonoInflatedCtor".
24048 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
24050 * reflection.c (resolution_scope_from_image): Use the assembly table
24051 from the manifest module, since other modules don't have it.
24053 * debug-helpers.c (mono_type_full_name): New helper function.
24055 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
24057 * image.c (mono_image_load_file_for_image): New public function which
24058 is a replacement for the load_file_for_image in class.c.
24060 * assembly.c (mono_assembly_load_module): A wrapper for the function
24061 above which does assembly association and reference loading too.
24063 * class.c (mono_class_from_name): Call mono_assembly_load_module.
24065 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24067 * appdomain.c: not all of the attributes for the full assembly name
24068 are required and the order doesn't matter. Fixes bug #50787.
24070 2003-11-10 Dick Porter <dick@ximian.com>
24072 * locales.c: Use platform-endian UTF16
24074 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
24076 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
24078 2003-11-10 Martin Baulig <martin@ximian.com>
24081 (mono_metadata_load_generic_params): Make this actually work.
24083 * reflection.c (mono_reflection_bind_generic_parameters): If our
24084 parent is a generic instance, pass all the `types' to it, no
24085 matter whether it has the same number of type parameters or not.
24087 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
24089 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
24091 * assembly.c (mono_assembly_load_references): Move the image<->assembly
24092 assignment code to this function so it gets called recursively for all
24095 * image.c (load_modules): Remove the assembly assignment since it is
24096 now done by mono_assembly_load_references.
24098 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
24099 Add 'module' argument.
24100 (mono_module_get_types): New helper function.
24101 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
24103 2003-11-08 Martin Baulig <martin@ximian.com>
24105 * class.c (mono_class_inflate_generic_method): Interface method
24106 don't have a header.
24108 * reflection.c (mono_image_get_methodspec_token): Take an
24109 additional `MonoGenericInst *' argument instead of reading it from
24110 the header; this is necessary to support interfaces.
24111 (mono_image_create_token): Pass the `MonoGenericInst *' from the
24112 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
24113 (inflated_method_get_object): Take an additional `MonoGenericInst *'
24116 * reflection.h (MonoReflectionInflatedMethod): Added
24117 `MonoGenericInst *ginst'.
24119 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
24121 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
24123 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
24125 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
24127 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
24130 (reflection_methodbuilder_from_method_builder):
24131 (reflection_methodbuilder_from_ctor_builder): New helper functions to
24132 initialize a ReflectionMethodBuilder structure.
24133 (mono_image_get_methodbuilder_token):
24134 (mono_image_get_ctorbuilder_token): New functions to emit memberref
24135 tokens which point to types in another module inside the same assembly.
24137 * reflection.c: Use the new helper functions.
24139 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
24141 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
24142 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
24144 * reflection.c (resolution_scope_from_image): Emit a moduleref if
24147 * reflection.c (mono_image_build_metadata): Emit metadata only for the
24148 current module. Emit the manifest only for the main module.
24150 * reflection.c (mono_image_create_token): Add assertion when a
24151 memberref needs to be created.
24153 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
24155 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
24156 larger buffer for the custom attribute blob. Fixes #50637.
24158 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24160 * threadpool.c: notify listener on async processing handles after
24161 invoking the async callback. Thanks to Zoltan.
24163 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
24165 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
24166 avoid code duplication.
24168 * reflection.h (MonoDynamicImage): New type which is currently unused,
24169 but will be used through the ref.emit code in place of
24170 MonoDynamicAssembly.
24172 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
24175 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
24176 a MonoDynamicImage instead of just a MonoImage.
24178 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
24179 icalls to ModuleBuilder but keep their semantics, so they will work
24180 with moduleb->assemblyb. This will change later.
24182 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
24184 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
24187 * reflection.c (mono_image_build_metadata): Avoid creation of a default
24188 main module, since it is now done by the managed code.
24190 2003-11-03 Martin Baulig <martin@ximian.com>
24192 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
24193 `ginst->klass' here.
24194 (method_encode_methodspec): Don't use the `ginst->generic_method's
24195 klass if it's a generic instance, use `ginst->klass' in this case.
24197 2003-11-03 Martin Baulig <martin@ximian.com>
24199 * reflection.c (mono_image_get_generic_method_param_info):
24200 Removed, use mono_image_get_generic_param_info() instead.
24201 (mono_image_get_type_info): Write the GenericParam table before
24202 the Method table. This is neccessary because in the GenericParam
24203 table, type parameters of the class (ie. '!0' etc.) must come
24204 before the ones from its generic methods (ie. '!!0' etc).
24206 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
24208 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
24210 2003-11-02 Martin Baulig <martin@ximian.com>
24212 * reflection.c (create_generic_typespec): Take a
24213 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
24214 the generic parameters from it.
24216 2003-11-02 Martin Baulig <martin@ximian.com>
24218 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
24219 instead of a `MonoClassField *' since we just need the type.
24220 (create_generic_typespec): New static function. Creates a
24221 TypeSpec token for a generic type declaration.
24222 (mono_image_get_generic_field_token): New static function.
24223 (mono_image_create_token): If we're a FieldBuilder in a generic
24224 type declaration, call mono_image_get_generic_field_token() to get
24227 2003-11-02 Martin Baulig <martin@ximian.com>
24230 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
24231 `MonoReflectionGenericInst *declaring_type' and
24232 `MonoReflectionGenericInst *reflected_type' fields.
24234 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
24235 `MonoReflectionGenericInst *declaring_type' and a
24236 `MonoReflectionGenericInst *reflected_type' argument instead of a
24237 single `MonoReflectionGenericInst *type' one. Set
24238 `res->declaring_type' and `res->reflected_type' from them.
24239 (mono_reflection_inflate_field): Likewise.
24241 2003-11-02 Martin Baulig <martin@ximian.com>
24243 * class.c (mono_class_setup_vtable): Don't store generic methods
24246 2003-11-02 Martin Baulig <martin@ximian.com>
24248 * reflection.h (MonoReflectionGenericInst): Added
24249 `MonoReflectionType *declaring_type'.
24251 * reflection.c (mono_reflection_bind_generic_parameters): Use
24252 `if (tb->parent)' instead of `klass->parent'.
24254 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
24256 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
24257 with an empty ASSEMBLY table.
24259 * reflection.c (mono_image_build_metadata): Avoid using the same loop
24260 variable in the inner and outer loops.
24262 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
24264 * metadata.h (mono_metadata_make_token): Put parentheses around macro
24267 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
24269 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
24270 icalls. Instead, do everything in managed code. This is needed since
24271 it is hard to restore the original domain etc. in unmanaged code in the
24272 presence of undeniable exceptions.
24274 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
24275 New icalls to push and pop appdomain refs.
24277 2003-10-31 Martin Baulig <martin@ximian.com>
24279 * class.c (inflate_generic_type): Renamed to
24280 mono_class_inflate_generic_type() and made it public.
24282 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
24285 * loader.c (mono_field_from_memberref): Also set the retklass for
24288 * fielder.c (mono_image_get_inflated_field_token): New static
24289 method; creates a metadata token for an inflated field.
24290 (mono_image_create_token, fixup_method): Added support for
24291 "MonoInflatedField".
24292 (fieldbuilder_to_mono_class_field): New static function.
24293 (mono_reflection_inflate_field): New public function.
24296 (MonoReflectionGenericInst): Added `MonoArray *fields'.
24297 (MonoReflectionInflatedField): New typedef.
24299 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
24301 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
24302 for Solaris and other platforms without s6_addr16
24304 2003-10-30 Martin Baulig <martin@ximian.com>
24306 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
24307 argument instead of two.
24308 (mono_class_inflate_generic_signature): Likewise.
24309 (inflate_generic_header): Likewise.
24310 (mono_class_inflate_generic_method): Likewise. In addition, if
24311 `ginst->klass' is set, it becomes the new `method->klass'.
24313 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
24316 * reflection.c (encode_generic_method_sig): Write a 0xa as the
24317 first byte. [FIXME]
24318 (method_encode_methodspec): If we have generic parameters, create
24319 a MethodSpec instead of a MethodRef.
24320 (fixup_method): Added support for "MonoInflatedMethod" and
24321 "MonoInflatedCtor".
24322 (mono_image_create_token): Added support for "MonoInflatedMethod"
24323 and "MonoInflatedCtor".
24324 (inflated_method_get_object): New static function; returns a
24325 managed "System.Reflection.MonoInflatedMethod" object.
24326 (mono_reflection_bind_generic_method_parameters): Return a
24327 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
24328 (mono_reflection_inflate_method_or_ctor): Likewise.
24329 (mono_image_get_generic_method_param_info): Initialize unused
24331 (mono_image_get_generic_param_info): Likewise.
24333 * reflection.h (MonoReflectionInflatedMethod): New public
24334 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
24335 "S.R.MonoInflatedCtor" classes.
24337 * loader.c (method_from_memberref): If we're a TypeSpec and it
24338 resolves to a generic instance, inflate the method.
24340 2003-10-28 Dick Porter <dick@ximian.com>
24342 * object.c (mono_runtime_run_main): Convert command-line arguments
24343 into utf8, falling back to the user's locale encoding to do so.
24345 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
24347 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
24350 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
24352 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
24353 up icalls at method definition time. Partially fixes #33569.
24355 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
24357 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
24358 marshalling of arrays. Fixes #50116.
24360 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
24362 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
24363 points to a vtable in the dying appdomain.
24365 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
24366 listeners into unmanaged code inside the lock.
24368 * object.c (mono_class_vtable): Turn off typed allocation in non-root
24369 domains and add some comments.
24371 2003-10-25 Martin Baulig <martin@ximian.com>
24373 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
24375 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
24377 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
24378 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
24379 currently parsing. Create the generic class and store it in
24380 `generic_inst->klass' before parsing the type arguments. This is
24381 required to support "recursive" definitions; see mcs/tests/gen-23.cs
24383 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
24384 to support recursive typespec entries.
24386 * class.c (mono_class_setup_parent): If our parent is a generic
24387 instance, we may get called before it has its name set.
24388 (mono_class_from_generic): Splitted into
24389 mono_class_create_from_generic() and mono_class_initialize_generic().
24391 2003-10-25 Martin Baulig <martin@ximian.com>
24393 * icall.c (ves_icall_Type_BindGenericParameters): Return a
24394 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
24395 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
24396 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
24398 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
24399 (create_typespec): Likewise.
24400 (mono_reflection_bind_generic_parameters): Return a
24401 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
24402 (mono_reflection_inflate_method_or_ctor): New public function.
24404 * reflection.h (MonoReflectionGenericInst): New typedef.
24406 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
24408 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
24409 inside the domain lock. Fixes #49993.
24411 * object.c (mono_class_vtable): When typed allocation is used,
24412 allocate vtables in the GC heap instead of in the mempool, since the
24413 vtables contain GC descriptors which are used by the collector even
24414 after the domain owning the mempool is unloaded.
24416 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
24418 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
24419 reflect what it does. Also invalidate mempools instead of freeing
24420 them if a define is set.
24422 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
24425 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
24426 hold the finalizable objects in this domain.
24428 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
24431 * appdomain.c (mono_domain_set): New function to set the current
24432 appdomain, but only if it is not being unloaded.
24434 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
24435 appdomain which is being unloaded.
24437 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
24438 unloading of the root appdomain.
24440 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
24441 icall to execute a method in another appdomain. Intended as a
24442 replacement for InternalSetDomain, which can confuse the code
24443 generation in the JIT.
24445 * appdomain.c (mono_domain_is_unloading): New function to determine
24446 whenever an appdomain is unloading.
24448 * appdomain.c (mono_domain_unload): New function to correctly unload
24451 * assembly.c (mono_assembly_load_references): Check that an assembly
24452 does not references itself.
24454 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
24455 domain manually, it asks the finalizer thread to do it, then waits for
24456 the result. Also added a timeout.
24458 * icall.c: Register the new icalls.
24460 * threads.h threads.c: Export the mono_gc_stop_world and
24461 mono_gc_start_world functions.
24463 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
24464 function to fill out the mempool with 0x2a.
24466 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
24468 * reflection.h (MonoReflectionMethodAux): New structure to store
24469 information which is rarely used, thus is not in the MonoMethod
24472 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
24473 store the aux info.
24475 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
24476 and marshalling info into the aux structure.
24478 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
24479 from the aux structure.
24481 * loader.c (mono_method_get_param_names): Retrieve the param names from
24484 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
24486 * exception.h exception.c: Add AppDomainUnloadedException && fix
24489 2003-10-21 Dick Porter <dick@ximian.com>
24492 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
24493 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
24495 2003-10-21 Martin Baulig <martin@ximian.com>
24497 * reflection.c (mono_reflection_bind_generic_parameters):
24498 `klass->parent' is NULL for interfaces.
24500 2003-10-21 Martin Baulig <martin@ximian.com>
24502 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
24504 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
24506 * exception.c (mono_exception_from_name_msg): New helper function for
24507 creating exceptions and initializing their message field.
24509 * exception.c: Simplify functions using the new helper.
24511 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
24514 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
24515 mono_raise_exception, since otherwise gcc doesn't generate the function
24516 epilog for raise_exception, confusing the stack unwinding in the JIT.
24519 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
24520 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
24523 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24525 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
24528 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
24530 * icall.c: Removed GetUninitializedObject method because
24531 AllocateUninitializedClassInstance does the same.
24533 2003-10-18 Martin Baulig <martin@ximian.com>
24535 * class.c (inflate_generic_signature): Renamed to
24536 mono_class_inflate_generic_signature() and made it public.
24537 (my_mono_class_from_generic_parameter): New static function; if we
24538 don't already have the generic parameter's MonoClass, create a
24539 very simple one which is just used internally in the runtime and
24540 not passed back to managed code.
24542 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
24544 * metadata.h (MonoMethodSignature): Moved the
24545 `MonoGenericParam *gen_params' to the MonoMethodHeader.
24546 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
24548 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
24549 ves_icall_MonoMethod_GetGenericArguments(); this is now an
24550 interncall on the MonoMethod class, not on MethodInfo.
24551 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
24552 calling mono_reflection_bind_generic_method_parameters() directly.
24554 * loader.c (mono_method_get_signature): If this is a MethodSpec;
24555 return the already computed `method->signature'.
24556 (method_from_methodspec): New static function to load a method
24557 from a MethodSpec entry.
24558 (mono_get_method_from_token): Call the new method_from_methodspec()
24559 for MethodSpec tokens.
24560 (mono_get_method_from_token): If we're a generic method, load the
24563 * reflection.c (mono_image_get_memberref_token): Allow
24564 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
24566 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
24567 (mono_image_create_token): First check whether it's a generic
24568 method (so we'd need to create a MethodSpec), then do the other
24570 (mono_reflection_bind_generic_method_parameters): Return a
24571 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
24572 called directly from the interncall.
24574 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
24576 * reflection.c (load_public_key): Move loading of the public key
24579 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
24581 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
24584 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
24585 culture, hash_alg and public_key. Fixes #49555.
24587 2003-10-17 Martin Baulig <martin@ximian.com>
24589 * class.h (MonoGenericInst): Moved this declaration here and added
24590 `MonoMethod *generic_method'.
24593 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
24594 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
24596 * metadata.c (mono_metadata_type_equal): Two types of
24597 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
24598 index; ie. don't compare the address of the `MonoGenericParam'
24600 (mono_metadata_load_generic_params): Removed the `MonoMethod
24603 * metadata.h (MonoGenericInst): Moved declaration to class.h.
24604 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
24606 * reflection.c (method_encode_signature): Encode the number of
24607 generic parameters.
24608 (encode_generic_method_sig): New static function.
24609 (method_encode_methodspec): New static function; creates an entry
24610 in the MethodSpec table for a generic method.
24611 (mono_image_get_methodspec_token): New static function.
24612 (mono_image_create_token): Call mono_image_get_methodspec_token()
24613 for generic methods.
24614 (mono_reflection_bind_generic_method_parameters): New public
24615 function. Instantiates a generic method.
24617 2003-10-16 Martin Baulig <martin@ximian.com>
24619 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
24620 *gen_params' here from MonoMethodHeader.
24622 * metadata.c (mono_metadata_parse_method_signature): If we have
24623 generic parameters, initialize `method->gen_params' and then set
24624 the correct `type->data.generic_param' in all the parameters.
24626 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
24628 * threads.c (mono_threads_get_default_stacksize): New function to
24629 return the default stacksize.
24631 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
24632 termination of the finalizer thread, since the previous method had
24633 race conditions. Fixes #49628.
24635 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
24636 as for the other managed threads.
24638 2003-10-16 Martin Baulig <martin@ximian.com>
24640 * class.c (inflate_generic_signature): Copy `generic_param_count'
24643 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
24646 * metadata.c (mono_metadata_parse_method_signature): Actually set
24647 the `method->generic_param_count' here.
24648 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
24650 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
24652 * object.h: Add a new field to TypedRef to simplify the implementation
24653 of the REFANY opcodes in the JIT.
24655 * icall.c: Make use of the new field.
24657 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
24660 2003-10-15 Martin Baulig <martin@ximian.com>
24662 * class.c (mono_class_from_gen_param): Renamed to
24663 mono_class_from_generic_parameter() and moved most of the
24664 functionality from mono_reflection_define_generic_parameter()
24665 here; ie. we create a "real" class here.
24666 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
24667 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
24668 previously been called.
24670 * class.h (MonoGenericParam): Moved the declaration of this struct
24671 here from metadata.h and added `MonoMethod *method'.
24673 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
24676 * loader.c (mono_get_method_from_token): If we have any generic
24677 parameters, call mono_metadata_load_generic_params() to read them
24678 from the MONO_TABLE_GENERICPAR.
24680 * metadata.c (mono_metadata_load_generic_params): Added
24681 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
24683 * metadata.h (MonoMethodSignature): Replaced
24684 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
24685 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
24687 * reflection.c (mono_reflection_define_generic_parameter): Moved
24688 most of the functionality into the new
24689 mono_class_from_generic_parameter(); set the `method' field if
24690 we're a method parameter.
24692 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
24694 * marshal.c (emit_struct_conv): if native size is 0
24697 2003-10-14 Martin Baulig <martin@ximian.com>
24699 * icall.c: The generics API has changed in the spec since it was
24700 added to System.Type; these modifications make it match the spec
24702 (ves_icall_Type_GetGenericParameters): Renamed to
24703 `ves_icall_Type_GetGenericArguments'.
24704 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
24705 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
24706 `ves_icall_MonoType_get_HasGenericArguments'.
24707 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
24708 `ves_icall_MonoType_get_IsGenericParameter'.
24709 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
24710 this is no interncall anymore.
24711 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
24712 `ves_icall_TypeBuilder_get_IsGenericParameter'.
24714 2003-10-14 Martin Baulig <martin@ximian.com>
24716 * reflection.c (mono_reflection_bind_generic_parameters): Also
24717 inflate generic methods if we're reading the class from IL.
24719 2003-10-13 Martin Baulig <martin@ximian.com>
24721 * reflection.c (mono_reflection_define_generic_parameter): This
24722 method isn't called directly from the icall anymore; take a
24723 `MonoReflectionAssemblyBuilder *' so we can use this for type and
24724 method generic parameters.
24725 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
24726 (method_builder_encode_signature): Encode generic parameters.
24727 (mono_image_get_method_info): Write generic params to the
24728 MONO_TABLE_GENERICPARAM table.
24730 * reflection.h (MonoReflectionMethodBuilder): Added
24731 `MonoArray *generic_params'.
24733 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
24735 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
24736 wrapper for mono_reflection_define_generic_parameter().
24737 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
24739 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
24741 * marshal.h: Add missing function to fix build.
24743 * marshal.c (mono_marshal_get_native_wrapper): Add support for
24744 the SetLastError pinvoke attribute.
24746 * marshal.c (mono_marshal_set_last_error): New helper function called
24747 by the generated code.
24749 * marshal.c (mono_mb_emit_branch): New helper function.
24751 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
24753 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
24754 classes as parameters and return values of delegates. Fixes #29256.
24756 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
24758 * locales.c: use gint32 in non HAVE_ICU case
24760 2003-10-11 Martin Baulig <martin@ximian.com>
24762 * mono-debug.c (mono_debug_add_method): Added a workaround for
24765 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
24767 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
24768 delegates passed to native code must use the STDCALL calling
24769 convention. Fixes #35987.
24771 2003-10-10 Martin Baulig <martin@ximian.com>
24773 * class.c (inflate_generic_type): If we're inflating for a generic
24774 type instance (and not for a generic method), return
24775 MONO_TYPE_MVAR unchanged.
24777 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24779 * string-icalls.c: Join ignores null strings in the source array.
24780 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
24781 * threads.c: GetAvailableTheads is slightly more accurate.
24783 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
24785 * threads.h threads.c : add mono_threads_set_default_stacksize
24786 and pass default to CreateThread calls.
24788 2003-10-09 Dick Porter <dick@ximian.com>
24792 * locales.c: Internal calls for constructing CultureInfo and
24793 related objects from libicu (if its available.)
24795 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
24797 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
24799 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24801 * threadpool.c: added an argument to async_invoke_thread that is the
24802 item to process, pass the MonoAsyncResult to the thread start function
24803 when creating a new thread. This way we don't need to acquire any lock
24804 when we're creating a new thread. Readded a semaphore for faster
24805 response times (instead of that Sleep i added).
24807 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
24809 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
24810 get daylight change dates better on Windows, fix handling
24811 of platforms without tm_gmtoff.
24813 2003-10-06 Martin Baulig <martin@ximian.com>
24815 * class.c (inflate_generic_method): Renamed to
24816 mono_class_inflate_generic_method() and made public.
24817 (mono_class_init): Don't inflate the generic methods here.
24818 (mono_class_from_generic): Added `gboolean inflate_methods'
24819 argument. Inflate the methods here.
24821 * loader.c (mono_method_get_param_names): Ignore instances of
24822 generic types for the moment.
24824 * reflection.c (fixup_method): Added support for inflated methods.
24825 (mono_image_create_token): Use mono_image_get_methodref_token()
24826 for inflated methods.
24827 (mono_custom_attrs_from_param): Ignore instances of generic types
24829 (mono_reflection_bind_generic_parameters): New public function.
24830 Moved all the functionality from
24831 ves_icall_Type_BindGenericParameters() here and added support for
24833 (mono_reflection_define_generic_parameter): Initialize
24834 `klass->methods' here.
24836 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
24837 functionality into mono_reflection_define_generic_parameter().
24838 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
24839 TypeBuilder, return that TypeBuilder.
24841 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24843 * appdomain.c: removed mono_delegate_semaphore.
24846 (mono_thread_pool_add): moved hash table creation inside and the thread
24847 creation outside of the critical region.
24848 (mono_thread_pool_finish): removed obsolete code.
24849 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
24850 continue or exit the thread depending on the queue.
24852 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
24854 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
24855 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
24856 handle more bool marshalling options
24858 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
24860 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
24861 arrays of structs. Also add a more descriptive error message when
24862 a structure member is marshalled as LPArray.
24864 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
24866 * marshal.c (mono_marshal_get_native_wrapper): Add support for
24867 marshalling arrays of complex types. Fixes #29098. Also remove an
24868 usused and incomplete function.
24870 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
24872 * gc.c: report heap_size - free_bytes as total memory allocated
24875 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
24877 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
24878 fix timezone handling problems on Windows.
24880 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
24881 asserts when the year is outside the range handled by ms the functions.
24883 * class.c (setup_interface_offsets): If the class is an interface,
24884 fill out its interface_offsets slot.
24886 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24888 * threadpool.c: mark threadpool threads as background.
24890 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
24892 * decimal.c - define DECINLINE to nothing if not using GCC
24894 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
24896 * assembly.c: More refcount fixes.
24898 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24900 * string-icalls.c: if we're not trimming, return the same string.
24901 When not splitting, don't create a new string.
24903 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24906 (mono_image_open): increment the ref_count inside the critical section.
24908 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
24910 * image.c (mono_image_open): Fix reference counting bug.
24912 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
24914 * marshal.c (mono_marshal_type_size) struct alignment changed for
24915 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
24916 64bits. Avoid leak in mono_marshal_get_native_wrapper when
24917 mono_lookup_pinvoke_call throws.
24919 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
24921 * reflection.c (mono_reflection_parse_type): Fix #49114.
24923 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
24924 temporary workaround for cygwin header problem.
24926 * object.c (mono_object_isinst): Synchronize this with the code
24927 generated by the JIT for casts.
24929 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
24931 * reflection.c (encode_type): Fix #38332.
24933 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
24935 * marshal.c (mono_marshal_method_from_wrapper): New function to return
24936 the original method from the wrapper method.
24938 2003-09-25 Martin Baulig <martin@ximian.com>
24940 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
24941 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
24942 (ves_icall_Type_get_IsGenericInstance): New interncall.
24944 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
24946 * object.c: fix cast warning in big endian code.
24948 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
24950 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
24952 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24954 * assembly.c: don't call check_env from mono_assembly_load. It's
24955 already done once in mono_assemblies_init and may cause headaches when
24956 multiple threads are loading assemblies.
24958 2003-09-19 Martin Baulig <martin@ximian.com>
24960 * reflection.c (mono_reflection_define_generic_parameter): Don't
24961 allocate `klass->methods', set `klass->flags' to
24962 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
24964 2003-09-18 Martin Baulig <martin@ximian.com>
24966 * class.c (mono_class_init): Don't create `class->methods' if it's
24967 already initialized.
24969 * metadata.c (mono_metadata_load_generic_params): Make this
24972 * reflection.c (mono_reflection_define_generic_parameter): Set
24973 parent class and interfaces from the constraints.
24975 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
24976 to keep this struct in sync with the declaration in TypeBuilder.cs.
24978 2003-09-17 Martin Baulig <martin@ximian.com>
24980 * metadata.h (MonoType): Replaced the data's `int type_param'
24981 field with `MonoGenericParam *generic_param'.
24982 (MonoGenericParam): Added `MonoClass *klass'.
24984 * class.c (mono_class_from_gen_param): Removed the
24985 `MonoImage *image' and `int type_num' arguments.
24987 * metadata.c (mono_metadata_parse_generic_param): New static
24988 method; creates a MonoGenericParam which just contains the index.
24989 (do_mono_metadata_parse_type): Call
24990 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
24993 * reflection.c (mono_image_typedef_or_ref): Generic type
24994 parameters may be in the same assembly, but never use a typedef
24996 (mono_reflection_define_generic_parameter): We're now creating a
24997 "real" class for the type parameter; it's now safe to call
24998 mono_class_from_mono_type() on the class'es type, it'll do the
25001 2003-09-16 Martin Baulig <martin@ximian.com>
25003 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
25004 `symfile->range_entry_size' and `symfile->class_entry_size' here;
25005 the `symfile' data structure must be fully initialized before it
25006 gets added to the table.
25008 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
25010 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
25012 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
25013 class init trampolines.
25015 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
25017 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
25018 to the built-in profiler to turn off time and allocation profiling
25021 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
25023 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
25026 * debug-helpers.c (mono_method_full_name): Print the wrapper type
25027 in human readable form.
25029 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
25031 * reflection.c icall.c: Fixed warnings.
25033 * image.c (load_class_names): Use a temporary hash table to hold the
25034 namespaces in order to avoid doing many string comparisons.
25036 * image.h: Fix typo.
25038 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
25039 Pass NULL instead of g_direct_equal to the GHashTable constructor
25040 since the NULL case is short-circuited inside g_hash_table_lookup,
25041 leading to better performance.
25043 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
25044 obtain the first custom attribute for a given index. Depends on the
25045 CustomAttribute table being sorted by the parent field.
25047 * reflection.c (mono_custom_attrs_from_index): Use the new function
25048 for better performance.
25050 2003-09-07 Martin Baulig <martin@ximian.com>
25052 * class.c (mono_class_init): If we're a generic instance, inflate
25053 all our methods instead of loading them from the image.
25054 (mono_class_from_generic): Set `class->methods = gklass->methods'.
25056 2003-09-07 Martin Baulig <martin@ximian.com>
25058 * mono-debug-debugger.c: Added support for constructors.
25060 2003-09-06 Martin Baulig <martin@ximian.com>
25062 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
25065 * reflection.c (mono_reflection_setup_generic_class): Call
25066 ensure_runtime_vtable() to create the vtable.
25068 2003-09-05 Martin Baulig <martin@ximian.com>
25070 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
25073 2003-09-04 Martin Baulig <martin@ximian.com>
25075 * reflection.c (mono_reflection_define_generic_parameter): Generic
25076 parameters start with zero.
25078 2003-09-04 Martin Baulig <martin@ximian.com>
25080 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
25082 * reflection.h (MonoReflectionGenericParam): New typedef.
25083 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
25084 the generic parameters from the managed TypeBuilder.
25086 * reflection.c (mono_reflection_define_generic_parameter): New function.
25087 (mono_reflection_create_runtime_class): Encode generic parameters.
25088 (mono_reflection_setup_generic_class): New function; this is
25089 called after adding adding all generic params to the TypeBuilder.
25090 (encode_type): Added MONO_TYPE_VAR.
25092 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
25094 * class.h class.c (mono_class_needs_cctor_run): Moved this method
25097 * assembly.h assembly.c: Moved the AOT loading code into an assembly
25100 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
25102 * reflection.h reflection.c class.h class.c: Delete duplicate
25103 definition of mono_type_get_name () from reflection.c and export the
25106 * class.c: Class loading fixes from Bernie Solomon
25107 (bernard@ugsolutions.com).
25109 * reflection.c: Endianness fixes from Bernie Solomon
25110 (bernard@ugsolutions.com).
25112 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
25114 * assembly.h assembly.c: Define a file format version for AOT
25117 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
25119 * appdomain.h (MonoJitInfo): New field to determine whenever the
25120 code is domain neutral.
25122 2003-08-31 Miguel de Icaza <miguel@ximian.com>
25124 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
25126 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
25128 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
25129 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
25130 Avoid caching the result since strings must be domain specific. Fixes
25133 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
25135 * marshal.c (mono_marshal_init): Make this callable multiple times
25136 since it is hard to find a correct place to call it.
25138 * object.c (mono_runtime_class_init): Execute static constructors in
25139 the correct appdomain.
25141 * image.c (build_guid_table): Handle the case when multiple images have
25144 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25146 * icall.c: added a couple of icalls for System.Web.
25148 2003-08-28 Martin Baulig <martin@ximian.com>
25150 * icall.c (ves_icall_Type_BindGenericParameters): Use
25151 `klass->generic_inst' instead of `&klass->byval_arg' in the
25152 mono_type_get_object() call. The returned type must be
25153 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
25155 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
25159 * object.c (mono_class_proxy_vtable): Make it thread safe.
25161 * pedump.c: Fix warning.
25163 * object.c appdomain.h: Get rid of metadata_section.
25164 It is no longer needed and it was causing deadlocks with domain->lock.
25166 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
25168 2003-08-26 Martin Baulig <martin@ximian.com>
25170 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
25172 2003-08-26 Martin Baulig <martin@ximian.com>
25174 * pedump.c (main): Call mono_metadata_init(),
25175 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
25176 and mono_loader_init().
25178 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
25180 * loader.h: Add missing include to fix build.
25182 * image.h: mono_image_load_references is no more.
25184 * assembly.c: Reworked assembly loading to make it really thread safe.
25185 After these changes, the assembly returned by mono_assembly_open is
25186 fully initialized, i.e. all its references assemblies are loaded.
25188 * assembly.c (mono_image_load_references): Renamed to
25189 mono_assembly_load_references, and made private, since clients no
25190 longer need to call it.
25192 * class.c: Removed calls to mono_assembly_load_references, since it was
25193 a source of deadlocks.
25195 * loader.h loader.c class.h class.c: Protect data structures using a
25196 new lock, the loader lock.
25198 * class.c (mono_class_setup_vtable): Create temporary hash tables and
25199 GPtrArrays only when needed.
25201 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
25202 into empty structures by mcs. Fixes pinvoke7.cs.
25204 * domain.c (mono_init): Call a new initialization function.
25206 * appdomain.c (mono_runtime_init): Call the new initializer function
25207 of the marshal module.
25209 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
25210 inserted into empty structures by mcs. Fixes pinvoke7.cs.
25212 * marshal.h marshal.c: Added locks around the wrapper caches to make
25213 this module thread safe.
25215 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
25216 this argument. Fixes pinvoke1.exe.
25218 2003-08-25 Lluis Sanchez <lluis@ximian.com>
25220 * object.h: Added call_type field to MonoMethodMessage and the corresponding
25221 enumeration of values. Removed fields to store remote call output values in
25222 MonoAsyncResult. Not needed any more.
25223 * object.c: Initialize call_type and async_result fields in mono_message_init.
25224 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
25225 dispatching the message.
25226 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
25227 async call to finish. To do it use a message with EndInvoke call type.
25229 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
25231 * loader.h loader.c (mono_method_hash_marhal_info): New function which
25232 determines whenever a method has marshalling info.
25234 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25236 * assembly.c: fix the build on windows.
25238 2003-08-22 Lluis Sanchez <lluis@ximian.com>
25240 * object.cs: Fixed bug #47785.
25242 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
25244 * string-icalls.c (StringReplace): If their are no occurances of
25245 the old string found return a reference to the supplied
25246 string. This saves some memory and matches MS behavoir.
25248 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25250 * socket-io.c: fixed compilation for systems that define AF_INET6
25251 and don't define SOL_IP/SOL_IPV6.
25253 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
25255 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
25256 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
25258 * rawbuffer.c rawbuffer.h: Make this module thread safe.
25260 * domain.c: Make this module thread safe.
25262 * domain.c (mono_init): Call new initialization function.
25264 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
25265 reference types too. Fixes #38812.
25267 * image.c (mono_image_init): Fixed warnings.
25269 * class.c (mono_class_from_typeref): Handle assembly load failure
25272 * appdomain.c (add_assemblies_to_domain): Handle the case when
25273 the references of an assembly are not yet loaded.
25275 * metadata.c image.c assembly.c: Moved initialization of global
25276 variables to a separate function called at startup since lazy
25277 initialization of these variables is not thread safe.
25279 * image.c assembly.c: Made this module thread safe by adding locks in
25280 the appropriate places.
25282 * domain.c (mono_init): Call the new initialization functions of the
25285 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
25287 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
25288 make a direct call. It is proxy's work to make the call asynchronous.
25289 mono_delegate_end_invoke(): If the targe is a proxy, just collect
25291 * object.cs: mono_method_call_message_new(): read AsyncResult and
25292 state object from parameters list, if this info is requested.
25293 * object.h: Added fields to store remote call output values in
25294 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
25296 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
25298 * object.h: add needed fields to MonoThread.
25299 * threads.c, threads.h: allow registering a function to cleanup data
25300 allocated per thread by the JIT.
25302 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
25304 * loader.h: portability fix by Bernie Solomon
25305 * <bernard@ugsolutions.com>.
25307 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
25309 * reflection.h reflection.c (mono_param_get_objects): Changed this to
25310 return a MonoArray. This simplifies the code and also ensures that
25311 the cache allways contains an object reference as a value.
25313 * icall.c (ves_icall_get_parameter_info): Simplified using the new
25316 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25318 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
25319 fixes a problem with byte ordering when getting the address family for
25322 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
25324 * .cvsignore: Added monosn.
25326 * reflection.h reflection.c loader.c: Added support for parameter
25327 marshalling to dynamically created types. Fixes #47295.
25329 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
25331 * rand.c: remove useless warnings.
25333 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
25335 * class.c: implemented ldtoken for methods and fieldrefs.
25337 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25339 * threadpool.c: when mono_async_invoke was called, no one took care of
25340 monitoring the queue. So if the method invoked took some time and we
25341 got new async invoke requests after 500 ms (the thread created waited
25342 that long in WaitForSingleObject), the new async invoke was not called
25343 until the previous one finished.
25345 This is fixed now. Thanks to Totte for helping with it.
25347 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25349 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
25351 2003-08-11 Martin Baulig <martin@ximian.com>
25353 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
25355 2003-08-06 Martin Baulig <martin@ximian.com>
25357 * mono-debug-debugger.c: Added support for static fields,
25358 properties and methods.
25360 2003-08-06 Martin Baulig <martin@ximian.com>
25362 * mono-debug-debugger.c: Don't store the MonoString's vtable to
25363 make this work for applications with multiple application domains.
25365 2003-08-04 Martin Baulig <martin@ximian.com>
25367 * mono-debug-debugger.c: Completely reworked the type support; the
25368 most important thing is that we're now just using one single
25369 `MonoType' instance per type.
25371 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
25373 * mono-endian.h, mono-endian.c, icall.c: Added icall
25374 ves_icall_System_Double_AssertEndianity to assert double word endianity
25375 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
25377 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
25379 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
25380 support, icalls and fixes.
25382 2003-07-31 Miguel de Icaza <miguel@ximian.com>
25384 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
25385 classes that are a punctuation character in .NET is not the same a
25388 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
25390 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
25392 2003-07-29 Miguel de Icaza <miguel@ximian.com>
25394 * icall.c: Add new MemCopy internalcall.
25395 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
25396 Simplified code; It is not necessary to handle all the cases here,
25397 as the C# code takes care of it. Only handle the case of the name
25398 resource embedded into the assembly.
25400 Changed signature to return the data pointer and the size of the
25403 2003-07-26 Miguel de Icaza <miguel@ximian.com>
25405 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
25406 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
25408 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
25410 * socket-io.c: ignore EINTR error in select.
25412 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
25414 * class.h, class.c: removed unused subclasses field in MonoClass.
25416 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
25418 * icall.c: improve fix of get_base_definition(). If the parent class
25419 doesn't have the mehod, look at the parent of the parent.
25420 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
25421 to check if a parameter is an in or out parameter
25422 (PARAM_ATTRIBUTE_IN is not set by default).
25423 mono_method_return_message_restore(): Use mono_class_value_size to
25424 get the size of a value type. mono_type_stack_size (parameterType)
25425 does not return the correct value if parameterType is byRef.
25426 mono_load_remote_field(), mono_load_remote_field_new(),
25427 mono_store_remote_field(), mono_store_remote_field_new():
25428 raise exception if the remote call returns an exception.
25430 2003-07-28 Martin Baulig <martin@ximian.com>
25432 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
25433 method. This is a wrapper around mono_runtime_invoke() which
25434 boxes the instance object if neccessary.
25436 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
25438 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
25439 metadata.h, row-indexes.h, verify.c: first cut of generics support.
25441 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
25443 * icall.c: disable mcs bug workaround.
25445 2003-07-21 Miguel de Icaza <miguel@ximian.com>
25447 * object.c (mono_runtime_class_init): Take the metadata_section
25448 mutex before obtaining the domain mutex.
25450 * appdomain.h: Added definition of metadata_section mutex here.
25452 * object.c: define metadata_mutex here.
25454 2003-07-24 Ravi Pratap <ravi@ximian.com>
25456 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
25459 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
25461 * reflection.c: Fix bug #46669
25463 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25468 * object.h: fill in the type name for TypeLoadException.
25470 2003-07-23 Ravi Pratap <ravi@ximian.com>
25472 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
25473 relationship between TypeBuilders while compiling corlib) and bug
25474 45993 (Array types returned from the runtime while compiling
25475 corlib were from the loaded corlib).
25477 2003-07-22 Martin Baulig <martin@ximian.com>
25479 * mono-debug-debugger.c: Reworked the type support a bit more;
25480 distinguish between types and classes.
25482 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
25484 * icall.c: add IsArrayImpl icall.
25486 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
25488 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
25489 initializing real_size only once. Also fix bug #46602.
25491 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
25493 * object.c: Renamed mono_metadata_section to metadata_section.
25495 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
25497 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
25498 empty array if the type is an array. Fixed.
25499 ves_icall_MonoMethod_get_base_definition: if the base method
25500 is abstract, get the MethodInfo from the list of methods of
25502 * reflection.c: ParameterInfo.PositionImpl should be zero-based
25503 and it was 1-based. Fixed in mono_param_get_objects.
25505 2003-07-20 Martin Baulig <martin@ximian.com>
25507 * mono-debug.h: Set version number to 31.
25508 (mono_debug_init): Added `MonoDomain *' argument.
25510 * mono-debug-debugger.c: Reworked the type support; explicitly
25511 tell the debugger about builtin types; pass the `klass' address to
25514 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
25516 * image.c: Allow new metadata tables to be loaded without a
25517 warning. Also update the warning message to give the new constant value.
25519 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
25521 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
25522 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
25523 array type representation changes.
25525 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
25527 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
25528 on Environment.Exit () call.
25530 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
25532 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
25533 requires a matching corlib.
25535 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
25537 * Changelog: My editor decided to add a CR to each line. Sorry about that.
25538 Committed again without the CRs.
25540 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
25542 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
25543 getting it from the "this" socket instance. Did not work
25544 if the socket is a subclass of Socket.
25545 Also fixed bug #35371.
25547 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25549 * metadata.c: fixed size for TypedByRef.
25550 * loader.c: when searching for a method, consider the vararg amrker.
25551 * unicode.c, decimal.c: constify some arrays.
25553 2003-07-15 Dick Porter <dick@ximian.com>
25555 * socket-io.c: Fixed compilation for gcc < 3.2.
25557 Fixed compilation for machines that don't have AF_INET6 (thanks to
25558 Bernie Solomon <bernard@ugsolutions.com> for that part.)
25560 Fixed compile warnings.
25562 Fixed formatting and line endings.
25564 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
25567 * socket-io.c: Added IPv6 support.
25569 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
25571 * class.c (mono_class_is_assignable_from): New function to implement
25572 the is_assignable_from logic. Used by mono_object_isinst,
25573 Type::IsAssignableFrom () and the interpreter.
25575 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
25576 Object, even interfaces.
25578 * object.c (mono_object_isinst): Implement in terms of
25579 is_assignable_from.
25581 * icall.c (ves_icall_type_is_assignable_from): New icall.
25583 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
25585 * domain.c (foreach_domain): fix compiler warning.
25587 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
25589 * image.c (load_metadata_ptrs): use g_strndup because strndup is
25590 not available on all plattforms
25592 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
25594 * image.h image.c: Store the metadata version string in MonoImage.
25595 * icall.c: New icall to retrieve the image version.
25596 * reflection.c (create_dynamic_image): Fill in the image version field
25597 * reflection.c (build_compressed_metadata): Use the image version
25598 from the image structure.
25600 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25602 * appdomain.c: modified comment.
25603 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
25604 That will be its last iteration when mono_gc_cleanup is called from
25605 mono_runtime_cleanup and before the domain is unloaded.
25609 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
25611 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
25614 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
25616 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
25617 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
25618 Bernie Solomon <bernard@ugsolutions.com>.
25620 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
25622 * object.c, object.h: provide mono_object_new_fast() for faster
25623 allocation in some special cases.
25625 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
25627 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
25628 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
25630 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
25632 * threadpool.c: fix leaks.
25634 2003-07-01 Dick Porter <dick@ximian.com>
25636 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
25637 using MonoGHashTables. Fixes threadpool bug posted to list.
25639 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
25641 * image.h, image.c: added support to load an assembly from a byte array.
25642 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
25643 assembly bundle support.
25645 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
25647 * threadpool.c (mono_thread_pool_add): keep a reference to the
25648 AsyncResult to prevent GC
25650 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
25652 * class.c: leak fix.
25654 2003-06-25 Dick Porter <dick@ximian.com>
25656 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
25657 for the async object, the WaitHandle object will close the handle.
25660 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25662 * class.c: in mono_array_class_get (), lookup from the hash with the
25663 same type we insert: this works around a bug in
25664 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
25665 lluis. The real fix will have to wait for after the release.
25667 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25669 * icall.c: fix memory leak when getting type members.
25671 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
25673 * reflection.c: added more pubtoken special cases.
25675 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
25677 * class.c: handle field offset correctly when class size
25678 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
25680 2003-06-20 Martin Baulig <martin@ximian.com>
25682 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
25685 2003-06-20 Martin Baulig <martin@ximian.com>
25687 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
25689 2003-06-20 Martin Baulig <martin@ximian.com>
25691 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
25692 just distinguish between variables in registers and variables at
25693 an offset relative to a register.
25695 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25697 * icall.c: #ifdef out latest changes until mcs is fixed.
25699 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
25701 * icall.c: return members in metadata order.
25703 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
25705 * icall.c: avoid infinite loop in GetTimeZoneData.
25707 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
25709 * icall.c: added Marshal.Prelink/All icalls.
25711 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
25713 * object.c, object.h: fix warnings and do some overflow checking
25714 when creating arrays.
25716 2003-06-17 Dick Porter <dick@ximian.com>
25719 * file-io.c: File attributes need to be tweaked slightly when
25720 passed from the managed to the w32 world.
25722 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
25723 * profiler.h profiler-private.h profiler.c: Rework last patch
25724 based on suggestion by Paolo.
25726 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
25728 * profiler.h profiler-private.h profiler.c: Added infrastructure for
25729 instruction level coverage data collection.
25730 * profiler.h profiler.c (: Added new callback function which can be
25731 used by the profiler to limit which functions should have coverage
25733 * profiler.c (mono_profiler_load): Call g_module_build_path to
25734 generate the file name of the profiler library.
25736 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
25738 * profiler.c, profiler.h, profiler-private.h: added basic block
25739 coverage profiling API.
25741 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
25743 * reflection.c (mono_reflection_create_runtime_class): Add support
25744 for events in dynamically generated code.
25746 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
25749 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25751 * icall.c: when getting timezone info, return reasonable values if we
25752 can't get the actual data.
25754 2003-06-14 Dick Porter <dick@ximian.com>
25756 * threads.c (start_wrapper): Remove the reference to the thread
25757 object in the TLS data, so the thread object can be finalized.
25758 This won't be reached if the thread threw an uncaught exception,
25759 so those thread handles will stay referenced :-( (This is due to
25760 missing support for scanning thread-specific data in the Boehm GC
25761 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
25763 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
25765 * reflection.c: ensure streams and tables are first allocated with
25766 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
25768 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
25770 * icall.c: fixed GetElementType for byrefs (bug# 44792).
25772 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
25774 * reflection.c (mono_reflection_create_runtime_class): Add support for
25775 properties to dynamically created classes.
25776 * reflection.c: Fix a few places where non-MonoObjects were inserted
25777 into the tokens hashtable.
25779 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
25781 * object.c: some support to handle out of memory exceptions.
25783 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
25785 * marshal.c (mono_marshal_get_native_wrapper): support reference
25788 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
25790 * object.h, object.c: more portability stuff from Bernie Solomon.
25791 Unexport mono_object_allocate(). Added mono_object_unbox ().
25792 Set exitcode when an unhandled exception is thrown.
25794 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
25796 * marshal.c (mono_marshal_get_native_wrapper): use custom
25797 marshaler for return types.
25799 2003-06-10 Dick Porter <dick@ximian.com>
25801 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
25802 ip_mreq is available
25804 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
25806 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
25807 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
25808 by Bernie Solomon <bernard@ugsolutions.com>.
25810 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
25812 * gc.c (mono_gc_init): Avoid error message on shutdown when
25813 GC_DONT_GC=1 is used.
25815 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
25816 New icall to return the GUID of a module.
25818 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
25820 * class.c: ensure instance size always includes the parent's size
25821 even whem class size is set explicitly (fixes bug#44294).
25823 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25825 * profiler.h, profiler.c: made the simple profiler thread-safe,
25826 get more accurate timing info. Allow the loading of an
25827 externally-developed profiler module.
25829 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
25831 * marshal.c (mono_marshal_get_native_wrapper): improved
25832 class/byref arguments.
25833 (mono_marshal_get_native_wrapper): better string marshaling support.
25835 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
25837 * class.c: ensure .pack and .size are handled correctly and
25838 simplified layout of static fields.
25840 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
25843 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
25845 * loader.c (mono_lookup_pinvoke_call): look for modules in the
25846 current directory (fix bug 44008)
25848 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
25850 * marshal.c (mono_marshal_get_native_wrapper): started support for
25852 (mono_delegate_to_ftnptr): consider marshalling specifications
25854 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
25856 * reflection.c, reflection.h: emit custom marshal info.
25858 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25860 * object.c: free the GError.
25861 * icall.c: added CloseEvent_internal.
25863 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
25866 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
25868 * loader.c (mono_method_get_signature): Add support for dynamic
25871 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
25873 * reflection.c: fixed bug #43905.
25875 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25877 * class.c, domain.c, icall.c, metadata.h, object.h: support for
25878 handling TypedReference and ArgIterator.
25879 * loader.c, loader.h: added function to get signature at call site.
25881 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
25883 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
25884 data readonly. Buglets and warning fixes. Some MethodSpec support.
25886 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
25888 * class.h, class.c, object.c: remove relative numbering support.
25890 2003-05-26 Miguel de Icaza <miguel@ximian.com>
25892 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
25893 free the string, until we get a chance to fix Gtk#
25895 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25897 * marshal.c: revert last patch.
25899 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
25901 * icall.c: updates for new mono_class_vtable() not calling
25902 the type constructor anymore.
25904 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
25906 * object.h, object.c: separate vtable creation from type
25907 initialization. Make running the .cctor thread safe.
25909 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
25911 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
25913 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
25915 * loader.c (mono_get_method): consider calling convention
25917 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
25919 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
25920 to return the invisible global type for a module.
25922 * reflection.c (mono_image_build_metadata): Emit global fields too.
25924 2003-05-20 Peter Williams <peterw@ximian.com>
25926 * loader.c (mono_lookup_internal_call): Add a few newlines.
25928 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
25930 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
25933 * appdomain.c (set_domain_search_path): Recalculate search path when
25934 AppDomainSetup.PrivateBinPath changes.
25936 * object.c (mono_class_compute_gc_descriptor): It turns out some
25937 parts of the class libs (like System.Thread) holds pointers to
25938 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
25939 to treat native int a pointer type here.
25941 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
25943 * appdomain.h, domain.c: add hashtable for jump target resolution.
25945 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
25947 * reflection.h reflection.c icall.c: Added new icalls
25948 GetManifestResourceInfoInternal, GetModulesInternal and support
25951 2003-05-16 Dick Porter <dick@ximian.com>
25955 * file-io.c: Implement System.IO.MonoIO::GetTempPath
25957 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
25959 * object.c: mono_store_remote_field: little fix to previous patch.
25961 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
25963 * class.c: add constructors to array classes.
25964 * icall.c: special case array construction for InternalInvoke (),
25966 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
25968 * class.h class.c reflection.c object.c: Added support for field
25969 defaults in dynamically generated classes.
25971 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
25973 * reflection.c: properly encode charset for ddlimport.
25975 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
25977 * threads.c: allow compiling without GC.
25979 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25981 * appdomain.h, object.c, object.h, threads.c, threads.h: added
25982 handling of thread static data.
25984 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
25986 * reflection.h, reflection.c: added mono_custom_attrs_free ().
25988 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
25990 * class.c (mono_array_class_get): always set the serializable flags
25991 (mono_array_class_get): always set the SEALED attribute for array types
25993 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
25995 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
25996 attributes (fix for bug 42021).
25998 2003-05-12 Dick Porter <dick@ximian.com>
26000 * gc.c: Don't run finalizers when the finalizer thread is
26001 finishing up, because the default domain has already been
26004 2003-05-11 Miguel de Icaza <miguel@ximian.com>
26006 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
26007 value is null, we should throw an exception. This is slightly
26008 different than the other conventions used for the constructor.
26010 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26012 * socket-io.c: fixed windows build.
26014 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26016 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
26018 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
26020 * object.c (mono_string_new_wrapper): Compatibility fix for MS
26023 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
26025 * class.c (mono_class_layout_fields): Add experimental GC aware
26026 auto layout facility. Requires class library changes to work correctly.
26028 (mono_class_setup_vtable): Avoid overriding explicit interface
26029 method implementations. Fixes iface3.exe test.
26031 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
26033 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
26034 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
26036 * metadata.h: Add new type classification macro which determines
26037 whenever the type holds an object reference.
26039 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
26041 * marshal.c (mono_marshal_get_native_wrapper): cleanups
26043 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
26045 * gc.c (finalizer_thread): Work around a GC bug.
26047 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
26049 * marshal.c (emit_struct_conv): allow unions
26051 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
26053 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
26055 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
26057 2003-05-06 Martin Baulig <martin@ximian.com>
26059 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
26061 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26064 (Select_internal): allow NULLs, don't create arrays if not needed.
26065 Coupled with Socket.cs changes.
26068 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
26069 register a finalizer for it that will close the semaphore handle. This
26070 fixes the leak and make Lupus' test run with > 4080 loops.
26072 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
26074 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
26075 Jerome Laban (bug #42287)
26077 2003-05-02 Martin Baulig <martin@ximian.com>
26079 * debug-mono-symfile.h
26080 (MonoSymbolFile): Moved declaration into mono-debug.h.
26081 (MonoDebugMethodJitInfo): Likewise.
26082 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
26084 (_mono_debug_address_from_il_offset): Take a
26085 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
26088 (MonoDebugDomainData): New struct.
26089 (mono_debug_get_domain_data): New function.
26090 (mono_debug_add_method): Take an additional `MonoDomain *'
26092 (mono_debug_source_location_from_address): Likewise.
26093 (mono_debug_il_offset_from_address): Likewise.
26094 (mono_debug_address_from_il_offset): Likewise.
26096 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
26098 * reflection.c: one more check for null type in custom attrs.
26100 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26102 * reflection.c: avoid warning (comparison is always false due to limited
26103 range of data type).
26105 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26107 * icall.c: throw an exception in Type.GetField if the argument 'name'
26110 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
26112 * reflection.c: fixed handling of enums in named arguments to custom
26113 attributes (bug #42123).
26115 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
26117 * reflection.c: use the right array element type and handle
26118 a null for a Type argument, too.
26120 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
26122 * reflection.c: handle arrays as arguments to custom attributes.
26124 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
26126 * reflection.c: handle a string value in a custom attr
26127 ctor that takes an object.
26129 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
26131 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
26134 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
26136 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
26138 2003-04-27 Martin Baulig <martin@ximian.com>
26140 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
26141 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
26142 MONO_DEBUGGER_EVENT_BREAKPOINT.
26143 (mono_breakpoint_trampoline_code): Removed.
26144 (mono_debugger_event_handler): The last argument is now a
26146 (mono_debugger_insert_breakpoint_full): Removed the
26147 `use_trampoline' argument.
26148 (mono_debugger_method_has_breakpoint): Likewise.
26149 (mono_debugger_trampoline_breakpoint_callback): Renamed to
26150 mono_debugger_breakpoint_callback(); take the method and
26151 breakpoint number as arguments.
26153 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
26155 * metadata.c: fix off by one when loading parameters attributes.
26157 2003-04-24 Martin Baulig <martin@ximian.com>
26159 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
26161 2003-04-24 Martin Baulig <martin@ximian.com>
26163 * mono-debug-debugger.c: Moved all code which interacts with the
26164 Mono Debugger here.
26166 * debug-mono-symfile.c: This code now just deals with the symbol
26167 file itself, the debugger code is now in mono-debug-debugger.c.
26169 2003-04-23 Martin Baulig <martin@ximian.com>
26171 * mono-debug.c (mono_debug_source_location_from_il_offset):
26172 New method; like mono_debug_source_location_from_address(), but
26173 takes an IL offset instead of a machine address.
26175 2003-04-23 Martin Baulig <martin@ximian.com>
26177 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
26178 `line' field; this is now computed by the debugger.
26180 2003-04-23 Martin Baulig <martin@ximian.com>
26182 * mono-debug.[ch]: New files. This is the new debugging interface.
26184 * mono-debug-debugger.[ch]: New files. Moved all code which
26185 interacts with the Mono Debugger here.
26187 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
26189 * domain.c (mono_init): initialize mono_defaults.monitor_class
26191 2003-04-21 Miguel de Icaza <miguel@ximian.com>
26193 * reflection.c (method_encode_code): Add a spicy exception to help
26194 future compiler authors.
26196 2003-04-21 Martin Baulig <martin@ximian.com>
26199 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
26200 Make this work with relative pathnames; g_filename_to_uri() needs
26201 an absolute filename.
26203 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
26205 * icall.c: Track name changes in Object and ValueType.
26207 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
26209 * metadata.c (mono_type_stack_size): size should be a multiple of
26212 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26215 (internal_domain_finalize): moved into mono_domain_finalize. No need
26216 to create another thread because the finalizers will be run in the
26219 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
26220 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
26221 to be run (MS does this too).
26223 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
26225 * object.c (mono_class_compute_gc_descriptor): Update comment.
26227 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
26229 * image.h: Add synchronized wrapper cache.
26231 * image.c (do_mono_image_open): Initialize cache.
26233 * reflection.c (create_dynamic_mono_image): Initialize cache.
26235 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26237 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
26238 ves_icall_System_Buffer_ByteLengthInternal.
26240 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
26242 * reflection.c: setup klass->nested_in earlier. Allow
26243 a dash in the assembly name.
26245 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
26247 * metadata.c (mono_type_to_unmanaged): dont access
26248 type->data.klass for MONO_TYPE_OBJECT
26249 (mono_type_to_unmanaged): consider System.Delegate class
26251 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
26253 * class.c: just setup supertypes in the proper place instead of
26254 initializing the full element class for arrays.
26256 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
26258 * class.c: ensure the element class of arrays is initialized.
26259 Setup the supertype info for array classes, too.
26261 2003-04-14 Miguel de Icaza <miguel@ximian.com>
26263 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
26265 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26267 * Makefile.am: re-added -m option when running cygpath. This way,
26268 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
26270 * mono-config.c: same codepath for locating mono config file for WIN32
26272 * assembly.c: if mono_assembly_setrootdir is called, don't override
26275 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26277 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
26278 MONO_ASSEMBLIES variable.
26280 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
26282 * icall.c: added Assembly::GetNamespaces() icall.
26284 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26286 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
26288 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
26290 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
26291 * object.c: fixed bug in the construction of vtable for proxies
26293 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
26295 * object.c (mono_array_new): Mark mono_array_new as an icall.
26297 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26299 * class.c: fixed test for public method when overriding interfaces.
26302 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
26304 * appdomain.h, domain.c: added mono_domain_foreach() to
26305 be able to access the currently loaded appdomains.
26306 * object.c: make string interning work across sppdomains.
26307 Mark some functions for use as icalls.
26309 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
26311 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
26313 * reflection.h reflection.c: Allocate long living data using
26314 GC_MALLOC_ATOMIC so the collector does not need to scan it.
26316 * reflection.c: Double the allocation size in streams instead of
26317 increasing it, to prevent unneccesary copying on large assemblies.
26319 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
26320 creation if the assembly does not have the Run flag set.
26322 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
26324 * class.h: avoid the C++ keywords in header files (Jerome Laban
26325 spotted and fixed this).
26327 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26330 (mono_unhandled_exception): fill in the arguments for the
26331 UnhandledException event. Only trigger that event for the default
26332 domain (as MS does).
26334 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
26336 * object.c: Improve typed allocation stuff based on suggestions from
26337 Paolo. Also turn it on if the GC library supports it.
26339 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
26341 * object.c object.h class.h: Added experimental typed allocation
26342 facility using the interfaces in gc_gcj.h.
26344 * os/gc_wrapper.h: Added new include files.
26346 2003-04-03 Martin Baulig <martin@ximian.com>
26348 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
26349 which is not yet enabled by default.
26351 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
26353 (mono_gc_lock, mono_gc_unlock): New static functions.
26355 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
26356 functions; stop/start the world for the garbage collector. This
26357 is using the windows API; we need to complete the SuspendThread()/
26358 ResumeThread() implementation in the io-layer to make this work on Unix.
26359 (mono_gc_push_all_stacks): New public function; tells the garbage
26360 collector about the stack pointers from all managed threads.
26362 2003-04-03 Martin Baulig <martin@ximian.com>
26364 * object.h (MonoThread): Added `gpointer stack_ptr'.
26366 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
26368 2003-04-03 Martin Baulig <martin@ximian.com>
26370 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
26372 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
26374 * reflection.c (typebuilder_setup_fields): Initialize field.first and
26377 2003-04-02 Miguel de Icaza <miguel@ximian.com>
26379 * loader.c (mono_lookup_internal_call): Report the corlib that is
26382 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
26384 * icall.c (ves_icall_type_GetTypeCode): fixed check for
26385 System.DBNull (it's class not valuetype).
26387 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
26389 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
26390 if the array method was already assigned a token (fixes bug#40646).
26392 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
26394 * reflection.c (mono_reflection_get_type): Attempt type resolve even
26395 if no assembly is given.
26397 2003-04-01 Miguel de Icaza <miguel@ximian.com>
26399 * metadata.h: Added the new tables.
26401 * row-indexes.h: Added definitions for new tables.
26403 * metadata.c: Add schemas for new tables, and add support for
26404 computing the sizes of them.
26406 * class.c: Update for handling the new type cases.
26408 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
26410 * metadata.h (MONO_TYPE_IS_VOID): new macro
26412 2003-03-31 Martin Baulig <martin@ximian.com>
26414 * threads.h (MonoThreadCallbacks): Added `thread_created'.
26416 * threads.c (mono_thread_new_init): Call `thread_created' in the
26417 mono_thread_callbacks.
26419 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
26421 * loader.h: added marshalbyrefobject_class to mono_defaults
26422 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
26423 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
26424 generation of output parameters.
26425 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
26426 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
26427 contextbound and the target object belongs to the context of the caller.
26428 * object.h: added context and unwrapped_server variables in MonoRealProxy.
26429 * object.c: Implemented support for interfaces and abstract classes
26430 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
26431 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
26433 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
26435 * class.h class.c (mono_class_is_subclass_of): New function.
26437 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
26438 routines for most common case (calls from ArrayList::ToArray).
26440 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
26441 routine so programs which call Environment::Exit() can be profiled.
26443 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
26444 Added MONO_ARCH_SAVE_REGS.
26446 * icall.c (ves_icall_type_is_subtype_of): Use new function.
26448 2003-03-29 Miguel de Icaza <miguel@ximian.com>
26450 * blob.h: Add a couple of new MonoType types definitions.
26452 * tabledefs.h: Add a couple of new call convs.
26454 2003-03-27 Zoltan Varga <vargaz@freemail.h>
26456 * reflection.h (MonoReflectionDynamicAssembly): track changes in
26457 the layout of the class.
26459 * reflection.c (alloc_table): double the size on overflow to avoid
26460 unnecessary copying.
26462 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
26463 avoid filling out metadata tables and blobs. Also set mb->ilgen to
26464 null so it can be garbage collected.
26466 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
26468 * reflection.c (mono_reflection_get_type): Return the resolved type
26469 only if it is in the assembly we searched.
26471 * reflection.c (ensure_runtime_vtable): Initialize method slots.
26473 * class.c (mono_class_setup_vtable): Set the slot of the overriding
26476 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26479 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
26480 the right one is 'file:///blah', but MS allows it.
26482 (mono_assembly_open): allow 'file://blah'
26484 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
26486 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
26488 * socket-io.c: fixes bug #40310.
26490 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
26492 * reflection.c (mono_reflection_parse_type): handle deeply nested
26495 * reflection.c (mono_image_create_token): Use unique token values
26496 since they will be put into a hash table.
26498 * class.c (mono_class_setup_vtable): If a method occurs in more than
26499 one place in the vtable, and it gets overriden, then change the
26500 other occurances too.
26502 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
26503 object as return type.
26505 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
26507 * icall.c: Deleted "ToString" implementation for double and float
26508 because they are full implemented in managed code.
26510 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
26512 * reflection.c, reflection.h: implemented and exported functions
26513 to retrieve info about custom attributes.
26515 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26517 * appdomain.c: moved Uri handling to assembly.c
26518 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
26519 work when using a file Uri in *nix and windows.
26521 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
26522 GetReferencedAssemblies.
26524 2003-03-18 Dick Porter <dick@ximian.com>
26526 * icall.c: Rename a couple of internal calls
26528 * threads.c: Set the thread state to Stopped when a thread exits.
26531 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
26533 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
26536 * object.c (mono_class_vtable): fix warning.
26538 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
26540 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
26542 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
26544 (method_encode_clauses): Create exception info structures in the right
26546 (mono_reflection_setup_internal_class): Initialize supertypes field.
26548 * class.c object.c: Handle interfaces which implement other interfaces
26551 * class.h class.c: Move the supertypes array initialization code into
26552 a separate function so it can be used for dynamic types too. Also call
26553 it earlier, in mono_class_init(), since it can be used before the
26554 type is initialized.
26556 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26560 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
26565 * object.c: remove warnings.
26567 2003-03-13 Martin Baulig <martin@ximian.com>
26569 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
26570 (MonoDebugLexicalBlockEntry): New types.
26572 * debug-mono-symfile.c
26573 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
26575 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26577 * process.c: ret can be any non-zero value accroding to MS doc.
26579 2003-03-07 Miguel de Icaza <miguel@ximian.com>
26581 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
26582 fixing a warning for a miss-used prototype, would have cause
26583 random memory corruption.
26585 2003-03-07 Martin Baulig <martin@ximian.com>
26587 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
26588 getting really annoying ....
26590 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
26592 * reflection.c (fixup_method): added support for array methods.
26594 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
26596 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
26597 (pointed out by Michael Adams).
26599 2003-03-04 Dick Porter <dick@ximian.com>
26601 * icall.c: Temporarily reverted the Double and Single ToString()
26602 change, because it broke nunit.
26604 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
26606 * object.h, threads.h: make include files compatible with C++
26607 (patch by Jerome Laban <jlaban@wanadoo.fr>).
26609 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
26611 * icall.c: Erased ToString helper functions for Double and Single.
26612 Now, that implementations ar all in managed code (Double and Single
26615 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
26617 * appdomain.c: Added method for initializing the default context of
26618 a domain. Added internal call for getting the default context.
26619 * appdomain.h: Added context variable in MonoDomain struct.
26620 * domain.c: mono_domain_set also sets the default context of the domain
26621 * icall.c: Mapped internal method InternalGetDefaultContext.
26622 * object.c: mono_object_get_virtual_method returns always a remoting
26623 wrapper if the object is a transparent proxy.
26624 mono_runtime_invoke_array: when creating an object by calling the
26625 constructor, if the created object is a proxy, then the constructor should
26626 be called using the a remoting wrapper.
26628 2003-03-03 Dick Porter <dick@ximian.com>
26630 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
26631 variable so it compiles on solaris. Problem spotted by
26632 Christopher Taylor <ct@cs.clemson.edu>
26634 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26637 (get_info_from_assembly_name): don't leak value.
26640 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
26643 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
26645 * assembly.c: export mono_image_load_references ().
26646 * class.c: handle function pointers. mono_class_from_name() now
26647 supports nested type names directly.
26649 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
26651 * reflection.h reflection.c: Encode already created dynamic methods
26652 and fields correctly as a DEF instead of a REF.
26654 * reflection.c: Get rid of the force_ref argument to
26655 mono_image_typedef_or_ref since it was wrong in the first place.
26657 * string-icalls.c: add error checking to string constructors according
26660 * reflection.c: Emit types in the order their TypeBuilders were
26661 created. Previously, a new table index was assigned to each type before
26662 the tables were emitted. This was wrong because the signature blob
26663 might already refer to a type by its original table index.
26665 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
26667 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
26670 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26672 * Makefile.am: make assemblies dir have \ instead of / on windows.
26674 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
26676 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
26677 iterate over the NESTEDCLASS table using a linear search since the
26678 table is not guaranteed to be sorted by the secondary key.
26680 * class.c (mono_class_create_from_typedef): fixed up call to
26681 mono_metadata_nesting_typedef.
26683 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
26685 * marshal.c (mono_string_to_byvalstr): clear the memory as
26686 suggested by Jerome Laban <jlaban@wanadoo.fr>
26688 2003-02-26 Dick Porter <dick@ximian.com>
26690 * process.c: Cope with padding in .rsrc blocks
26692 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
26694 * metadata.h: reverted the filter_len change, it breaks reflection
26696 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
26698 * metadata.h: added a new field to store the filter_len
26701 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
26703 * reflection.c: handle custom attributes for types and members
26704 created with Reflection.Emit (bug#38422).
26706 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
26708 * reflection.c: define RTSpecialName automatically for constructors for
26709 compatibility with MS.NET.
26711 * reflection.c (mono_reflection_create_runtime_class): initialize
26712 nested_in field of dynamically created classes.
26714 2003-02-22 Martin Baulig <martin@ximian.com>
26716 * debug-mono-symfile.h: Incremented version number.
26718 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
26720 * object.h icall.c process.c: fix warnings.
26722 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
26724 * appdomain.h appdomain.c:
26725 (mono_domain_try_type_resolve): split the
26726 name_or_tb argument into a name and a tb argument.
26727 (mono_domain_has_type_resolve): new function to check whenever the
26728 application has registered a TypeResolve event handler.
26730 * icall.c reflection.h reflection.c: move the type resolve logic into
26731 mono_reflection_get_type () so it will be invoked when
26732 Assembly::GetType () is called.
26735 (mono_reflection_get_type): renamed to get_type_internal.
26736 (mono_reflection_get_type): fixed type name generation so it works
26737 for nested types too.
26738 (mono_reflection_get_type): call has_type_resolve () to avoid the
26739 costly type name generation if there is no resolve event handler.
26741 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
26743 * class.c, image.c: load exported types from file references.
26745 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
26747 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
26748 used to cache the managed methods used to create proxies and make
26749 remote invocation of methods.
26750 * class.h: Added in MonoVTable a flag to indicate that a class needs
26751 to be remotely created.
26752 * object.c: Modified the method mono_class_vtable(). It now initializes
26753 the remote flag of the vtable. Modified mono_object_new_specific(),
26754 so now it checks the remote flag.
26755 * icall.c: Added a couple of internal methods, one for enabling instance
26756 creation interception for a type, and one for creating objects bypassing
26759 2003-02-18 Martin Baulig <martin@ximian.com>
26761 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
26762 New interncall to get a method's metadata token.
26764 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
26765 New interncall for the debugger.
26767 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
26769 * class.c (mono_class_setup_vtable): allocate supertype array
26771 2003-02-18 Martin Baulig <martin@ximian.com>
26773 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
26775 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26778 (assembly_name_to_aname): jump over unknown properties (i've found
26779 something like: 'type, assembly, version=xxx, custom=null, public...',
26780 so now will ignore custom=null and still get the rest of the values).
26782 2003-02-17 Dick Porter <dick@ximian.com>
26784 * threads.c: Have Thread.Start() wait for a semaphore to signal
26785 that the thread has set up all its local data. This fixes bug
26786 34323, where Abort() raced the new thread's TLS data.
26788 Also removes the handle_store() call from start_wrapper, because
26789 threads are now always created suspended and there is no longer a
26790 race between the parent and child threads to store the info.
26792 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
26794 * image.c: explain the #- heap issue in a message, hopefully
26795 avoiding FAQs on mono-list.
26797 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26800 (GetEntryAssembly): if the domain has not invoked
26801 AppDomain.ExecuteAssembly yet, return the assembly of the default
26804 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
26806 * class.c (mono_ldtoken): make it work in dynamic assemblies.
26808 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
26810 * metadata.c, reflection.c: simple speedup to type hash
26813 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
26815 * image.c, image.h, class.c, assembly.c: move module loading
26816 to MonoImage. When loading metadata, consider alignemnet from
26817 the start of metadata, not from the metadata address in memory.
26819 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
26821 * reflection.c (mono_reflection_get_custom_attrs): Added support for
26822 AssemblyBuilder objects. Factored out custom attribute creation into
26823 a separate function.
26824 (create_custom_attr): new function to create custom attributes.
26826 2003-02-12 Miguel de Icaza <miguel@ximian.com>
26828 * Makefile.am: Got tired of typing the full pathname to pedump.
26829 Until there is another option, am installing this.
26831 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
26833 * class.c (class_compute_field_layout): always set field->parent
26834 (mono_ldtoken): use mono_defaults.fieldhandle_class;
26836 2003-02-11 Dick Porter <dick@ximian.com>
26839 * monitor.c: Rewrote Monitor, making lock much faster and
26840 Pulse/Wait work as specified. Also uses much fewer handles, and only
26841 creates them as needed.
26843 * exception.c: Added SynchronizationLockException
26845 * threads.c: Deleted old Monitor implementation. The new one is
26848 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
26850 * class.c: handled TypedReference type code. Set the correct size for
26851 class data. Setup interface_offsets for interface classes, too.
26853 2003-02-09 Martin Baulig <martin@ximian.com>
26855 * debug-mono-symfile.h: Reflect latest symbol writer changes.
26857 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
26859 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
26860 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
26861 * object.c: fixed mono_object_get_virtual_method () for interfaces.
26862 * verify.c: check for code that runs after the end of the method.
26864 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
26866 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
26867 "System.Math::Round2".
26868 * sysmath.h: Added Floor, Round and Round2 definitions.
26869 * sysmath.c: Modified certain functions that were not 100% compliant
26870 with MS.NET (math precision) and added the implementation of Floor,
26873 2003-02-07 Martin Baulig <martin@ximian.com>
26875 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
26877 2003-02-07 Martin Baulig <martin@ximian.com>
26879 * debug-mono-symfile.c: Reflected latest symwriter changes.
26880 (mono_debug_create_mono_symbol_file): Removed.
26881 (mono_debug_open_mono_symbol_file): Take an argument which
26882 specifies whether to create a dynamic symbol file.
26884 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
26886 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
26888 2003-02-05 Martin Baulig <martin@ximian.com>
26890 * reflection.c (mono_image_build_metadata): Make this public,
26891 protect it against being called multiple times, don't create
26892 resources and don't build the compressed metadata here.
26893 (mono_image_create_pefile): Do this here.
26896 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
26898 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26900 * socket-io.c: fixed bug #36322.
26902 2003-02-06 Piers Haken <piersh@friskit.com>
26906 * debug-mono-symfile.c:
26912 * socket-io.c: warning cleanups
26914 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
26916 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
26917 function. works like remoting invoke, but does a check for the Proxy first.
26919 2003-02-05 Miguel de Icaza <miguel@ximian.com>
26921 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
26923 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
26925 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
26927 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
26928 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
26930 * object.c (mono_store_remote_field_new): used by the new jit
26931 instead of mono_store_remote_field
26932 (mono_load_remote_field_new): used by the new jit
26933 instead of mono_load_remote_field
26935 2003-02-05 Patrik Torstensson
26937 * appdomain.c: changed unload to take the domain id instead
26940 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
26943 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26945 * appdomain.c: don't look for assemblies in ApplicationBase if
26946 PrivateBinPathProbe is set.
26948 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26950 * object.c: make the first argument in main_args contain the absolute
26951 path to the assembly. Fixes bug #37511.
26953 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26955 * icall.c: get correct UTC offset for countries not using daylight
26956 time saving. Fixes bug #30030.
26958 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26960 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
26961 and 1 are the family).
26963 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
26965 * icall.c (ves_icall_InternalExecute): removed wrong assertion
26967 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
26969 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
26971 * reflection.c: added support for SignatureHelper tokens, which is
26972 needed by the Calli opcode.
26974 * reflection.h: track changes to SignatureHelper class.
26976 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
26978 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26980 * appdomain.c: fixed loading assemblies from PrivateBinPath.
26982 2003-02-03 Patrik Torstensson
26983 * appdomain.[c|h], domain.c :
26984 - Added support for getting a domain via domain id
26985 - Support for setting and getting domain from System.AppDomain
26986 (used in cross appdomain channel)
26987 - Added support for get/set for a MonoAppContext on a thread
26988 (Context class in System.Runtime.Remoting.Contexts),
26989 - Removed hack in Get/SetData and ExecuteAssembly.
26991 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
26992 the managed world to get control when a proxy is created.
26994 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
26996 2003-02-03 Miguel de Icaza <miguel@ximian.com>
26999 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
27000 Populate the codebase field as well.
27002 2003-02-02 Martin Baulig <martin@ximian.com>
27004 * debug-mono-symfile.c
27005 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
27006 (mono_debug_symfile_add_method): Allow interncalls.
27008 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27010 * icall.c: throw parse exception if strtod fails or the string is empty.
27012 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
27014 * marshal.c: handle object type separately from defined
27017 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
27019 * marshal.c: handle NATIVE_LPSTR for strings when it's
27020 explicitly specified.
27022 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
27024 * reflection.c, reflection.h, icall.c: setup the reflection
27025 handle cache for ModuleBuilders and AssemblyBuilders.
27027 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
27029 * reflection.c (reflection_methodbuilder_to_mono_method): set
27032 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27034 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
27036 2003-01-29 Dick Porter <dick@ximian.com>
27038 * threads.c: No need for the fake_thread kludge now that Thread
27039 doesn't run a class constructor
27041 2003-01-29 Dick Porter <dick@ximian.com>
27043 * threads.c: Use g_direct_hash instead of the rather bogus
27046 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
27048 * marshal.c (mono_marshal_get_native_wrapper): add check for null
27049 (fix pinvoke12.exe)
27050 (mono_marshal_get_struct_to_ptr): generate valid IL code
27051 (mono_marshal_get_ptr_to_struct): generate valid IL code
27052 (*): correctly set sig->pinvoke, we need to memdup the signature
27055 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
27057 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
27058 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
27060 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
27062 * profiler.c: provide more callers information.
27064 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
27066 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
27068 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
27070 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
27072 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
27074 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
27075 exception instead of going into an infinite loop on dates which it
27078 * string-icalls.c (ves_icall_System_String_get_Chars): raise
27079 out-of-range exception if needed.
27081 * class.c (mono_class_setup_vtable): allow a virtual method to provide
27082 an implementation for an interface method and to override an inherited
27083 method at the same time.
27084 Imagine a scenario when a virtual method is used to override a
27085 virtual abstract method in a parent class, and this same method
27086 provides an implementation for an method inherited from an interface.
27087 In this case, the interface resolution code will set im->slot, which
27088 means that the virtual method override pass will skip this method
27089 which means a pointer to the abstract method inherited from the parent
27090 will remain in the vtable of this non-abstract class.
27092 * class.c: (mono_class_setup_vtable): continue search for a real
27093 method if only an abstract method is found.
27095 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
27097 * reflection.c: add size to encoding for ByValStr and ByValArray
27098 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
27100 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
27102 * class.c (mono_class_setup_vtable): pass the override info as an
27105 * class.c (mono_class_setup_vtable): set the slot of overriding methods
27108 * reflection.c (ensure_runtime_vtable); add support for method
27111 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
27113 * reflection.c (resolution_scope_from_image): Hack to work to work with
27114 dynamic assemblies.
27116 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
27117 added a 'force_ref' argument to force this function to allways return
27118 a TypeRef. This is needed by mono_image_get_memberref_token ().
27120 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
27122 * reflection.c (mono_image_get_type_info): interfaces really don't have
27125 * reflection.c (mono_image_basic_init): fill out missing fields of
27128 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
27129 dynamic assemblies. This is required so dynamic assemblies show up in
27130 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
27131 Type::GetType() etc. This is consistent with MS behaviour.
27133 * image.c image.h reflection.c: add newly created classes to the name
27134 cache so mono_class_get () will find them.
27136 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
27138 First part of changes to get IKVM.NET running under mono.
27140 * appdomain.h, appdomain.c: added new function
27141 mono_domain_try_type_resolve() which will emit TypeResolve events.
27142 This function will call AppDomain::DoTypeResolve to do the actual work.
27144 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
27145 moved existing code dealing with dynamic tokens to a new function
27146 called mono_reflection_lookup_dynamic_token (). This function will
27147 raise TypeResolve events when appropriate. Since reflection.c is not
27148 part of libmetadata, a new hook function called
27149 mono_lookup_dynamic_token() is added to class.c which will call this.
27151 * assembly.h assembly.c: make the invoke_load_hook function public,
27152 so it can be called for dynamic assemblies.
27154 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
27156 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
27159 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
27160 MonoGHashTable, since it contains pointers to objects which the GC
27163 * assembly.c (search_loaded): remove unused variable.
27165 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
27167 * object.c: fixed issue exposed by gcc-generated IL programs
27168 that use RVA data for pointers.
27170 2003-01-25 Martin Baulig <martin@ximian.com>
27172 * threads.c (start_wrapper): Moved the initialization of
27173 `start_func' above the mono_new_thread_init() call to which we
27174 pass it as argument.
27176 2003-01-24 Martin Baulig <martin@ximian.com>
27178 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
27179 the MonoThread pointer.
27181 2003-01-21 Miguel de Icaza <miguel@ximian.com>
27183 * icall.c: Rename `PowImpl' to Pow.
27185 2003-01-23 Dick Porter <dick@ximian.com>
27187 * threads.c (start_wrapper): Create a Thread object if needed, so
27188 the Main() thread can do the class initialisation in a subthread
27189 that has been set up to allow managed code execution.
27191 Pass the thread ID instead of the MonoThread pointer to the thread
27192 start and attach callbacks. This change is required, because the
27193 jit thread start callback must be called _before_ the Thread
27194 object can be created.
27196 (mono_thread_init): Removed much object creation code that is no
27197 longer needed. No managed code is called from here now.
27199 * object.c (mono_runtime_exec_managed_code): Create a subthread
27200 for Main, and call back to the runtime to use it.
27201 Set the exit code when Main exits.
27203 * gc.c: Make sure domain finalisation happens in a subthread.
27204 Re-enable threaded GC, fixing bug 31333 (again).
27206 * environment.c: System.Environment internall calls (so far just
27207 ExitCode is here, the others are still in icall.c)
27209 * appdomain.c (mono_runtime_cleanup): All threads running managed
27210 code should have finished before mono_runtime_cleanup() is
27211 reached, so no need to clean up threads.
27213 2003-01-22 Martin Baulig <martin@ximian.com>
27215 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
27216 `gpointer func' arguments.
27217 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
27218 but added `MonoThread *thread' argument.
27219 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
27221 * threads.c (mono_new_thread_init): Added `gpointer func' argument
27222 and pass it to the mono_thread_start_cb callback.
27223 (mono_install_thread_callbacks): New public function to install a
27224 set of callbacks which are set by the debugger.
27225 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
27227 2003-01-22 Martin Baulig <martin@ximian.com>
27229 * Makefile.am: Install debug-mono-symfile.h.
27231 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
27233 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
27235 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
27237 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
27238 * class.c (mono_ptr_class_get): correctly set access levels of pointers
27239 (mono_array_class_get): correctly set access levels of arrays
27241 2003-01-20 Patrik Torstensson
27242 * image.h (MonoAssemblyName): changed major, minor, build, revision
27243 from signed to unsigned.
27245 2003-01-20 sean kasun <skasun@azstarnet.com>
27247 * reflection.c (load_cattr_value): Now this handles
27248 MONO_TYPE_SZARRAY. Fixes bug #35629
27250 2003-01-20 Miguel de Icaza <miguel@ximian.com>
27252 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
27255 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27257 * decimal.c: fixed bug #26056.
27259 2003-01-17 Martin Baulig <martin@ximian.com>
27261 * gc.c: Raise an ExecutionEngineException instead of using g_error().
27263 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27266 (mono_get_exception_type_initialization): new function.
27268 * object.c: throw a TypeInitializationException when an exception is
27269 thrown invoking the class constructor.
27271 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27273 * reflection.c: fixed attribute reading.
27275 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27278 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
27279 provided, look for the type in the calling assembly and then in
27280 mscorlib; if the assembly name is provided, only try that one.
27282 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
27284 * object.c: register the vtable before there is a chance it's
27285 queried again recursively.
27287 2003-01-13 Duncan Mak <duncan@ximian.com>
27289 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
27292 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
27294 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
27296 2003-01-11 Martin Baulig <martin@ximian.com>
27298 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
27299 this to 20 for the release.
27301 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
27303 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
27305 * loader.c (mono_method_get_marshal_info): bug fix
27307 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
27308 structures with explicit layout
27310 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
27312 * profiler.c: made the output more readable (and sorted).
27313 Added caller information for the allocation profiler.
27315 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
27317 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
27319 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27321 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
27322 to get value types.
27324 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
27326 * object.c, profiler.h, profiler.c, profiler-private.h:
27327 Added object allocation profiler.
27329 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
27331 * reflection.h, reflection.c: handle global methods.
27332 Compress blob entries.
27334 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
27336 * marshal.c: fix compilation.
27338 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
27340 * loader.c (mono_method_get_marshal_info): impl.
27342 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
27344 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27346 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
27347 for reference types.
27349 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
27351 * loader.c: fixed off by one error in loaded parameter names.
27353 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
27355 * marshal.c (mono_marshal_get_icall_wrapper): like
27356 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
27357 instead of a MonoMethod.
27359 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27361 * decimal.c: fixed bug #36537.
27363 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
27365 * marshal.c: throw a missing method exception if a
27366 P/Invoke method is not found.
27368 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
27370 * icall.c: allow a null this for constructors.
27372 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
27374 * icall.c: raise the proper exceptions if the arguments to the
27375 internal Invoke are incorrect.
27377 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
27379 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
27381 2003-01-03 Martin Baulig <martin@ximian.com>
27383 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
27385 2002-12-31 Martin Baulig <martin@ximian.com>
27387 * debug-mono-symfile.c: Completely rewrote the type section.
27388 Instead of using individual malloc()ed fields, we use one big
27389 continuous memory area and offsets into this area.
27390 See the comments in the source code for details.
27392 2002-12-30 Martin Baulig <martin@ximian.com>
27394 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
27396 2002-12-30 Martin Baulig <martin@ximian.com>
27398 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
27399 line number table in this data blob instead of using an external
27402 2002-12-28 Martin Baulig <martin@ximian.com>
27404 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
27406 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
27408 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
27409 as a boxed return type.
27411 2002-12-21 Miguel de Icaza <miguel@ximian.com>
27414 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
27415 g_build_filename to properly get separators on the filename created.
27417 * object.h: Small change, introduce MonoMarshalByRefObject to
27418 track the layout of that structure in the C# universe as we make
27421 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
27423 * object.c: removed assert to allow static fields on interfaces.
27424 * loader.c: a TypeSpec may be used for any type, not just arrays.
27426 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
27428 * class.c, class.h: added mono_class_array_element_size ().
27429 Ignore static methods in interfaces.
27431 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27433 * threads.c: fixed the build under cygwin.
27435 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
27437 * reflection.c: handle nullref constants. Allocate keys for
27438 reflection handles with the GC.
27440 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
27442 * threads.c, threads.h: added mono_thread_get_abort_signal()
27443 to get a suitable signal for thread abort.
27445 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
27447 * metadata.c: fix handling of ExportedType table.
27449 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27451 * icall.c: added WriteWindowsDebugString internal call.
27453 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27455 * reflection.h: added fields to match C# implementation.
27457 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27459 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
27461 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
27463 * gc.h, gc-internal.h: Rename header for GC internal calls to
27464 gc-internal.h from gc.h as to not clash with Boehm GC having its
27465 header installed as <gc.h> in outside include paths.
27466 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
27467 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
27469 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27471 * icall.c: assign minor, build and revision in FillName.
27473 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
27475 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
27476 Added support for running code generated by Reflection.Emit.
27478 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27480 * appdomain.c: check for NULL argument in LoadFrom.
27482 2002-12-10 Dick Porter <dick@ximian.com>
27484 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
27486 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27488 * appdomain.c: fix buglet when building exe file name. Handle full
27489 assembly name (needed after latest changes to AssemblyName).
27491 (mono_image_close): free some hashtables.
27493 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
27495 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
27496 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
27497 on some systems (redhat 7.3)
27499 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
27501 * threads.c: delete the critical section of a sync block,
27502 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
27504 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
27506 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
27508 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27510 * appdomain.[ch]: handle the assembly preload event to try loading the
27511 assemblies using the paths we have in the current domain.
27513 * assembly.[ch]: created an assembly preload hook that is called to try
27514 loading the assembly by other means that the ones provided here.
27516 * domain.c: initialize the domain search path.
27518 From now on, assemblies (TODO: except corlib and System) are loaded
27519 according to these rules when using mono_assembly_load ():
27521 1. It tries to load the assembly from the ApplicationBase
27522 of the current domain appending .dll and .exe (TODO: have to
27523 try loading from name/name.dll and name/name.exe).
27525 2. It tries the search path specified in PrivateBinPath for the
27526 current domain (if any).
27528 3. Previous behavior.
27530 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
27532 * icall.c: implemented GetInterfaceMap() related icall.
27533 * domain.c, loader.h: load MethodInfo in mono_defaults.
27535 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
27537 * gc.c: disable the finalizer thread for now, untill all the issues
27538 with it are resolved.
27540 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
27542 * string-icalls.c: handle embedded nulls in string ctor when the
27543 length is specified.
27545 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
27547 * class.c: look for explicit interface implementation in parent
27550 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
27552 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
27554 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
27556 * gc.c: protect handles with a critical section.
27558 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27561 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
27562 parameters. If no assembly specified, try getting the type from all
27563 the assemblies in the current domain, else, load the assembly and get
27566 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27568 * marshal.c: applied patch from Aleksey Demakov that fixes
27569 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
27571 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27573 * icall.c: fixed get_location.
27575 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
27577 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
27578 declarations to make it work with older gcc.
27580 * loader.c (mono_get_method): set signature->pinvoke for native calls
27582 2002-11-20 Dick Porter <dick@ximian.com>
27584 * threads.c (mono_thread_init): Set the main thread's handle
27586 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
27588 * gc.c: allow compilation without GC support. Changed to match the
27591 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
27593 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
27595 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
27597 * reflection.c: set a public key token on the core assemblies.
27599 2002-11-18 Dick Porter <dick@ximian.com>
27601 * threads.c: Split out some thread initialisation so that other
27602 files can set the start callback function.
27604 * gc.c: Run finalisers in a separate thread, to avoid stack
27605 overflow. Fixes bug 31333.
27607 * appdomain.c: Set up GC finalisation thread.
27611 * domain.c: Use gc.h macros for GC_malloc
27613 2002-11-15 Dick Porter <dick@ximian.com>
27617 * appdomain.c: Removed mono_runtime_init_with_attach(),
27618 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
27619 merging the extra parameter with the existing function. Removed
27620 unneeded code in mono_thread_attach().
27622 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
27624 * image.c (mono_image_loaded_by_guid): a method to get loaded
27626 (load_metadata_ptrs): we store the guid as string.
27628 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
27630 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
27632 * metadata.c (mono_guid_to_string): imported method form Zoltan
27633 Varga (slightly modified)
27635 * assembly.c (mono_assembly_open): load precompiled code
27637 * loader.h (MonoMethod): we store the method token for use in the
27640 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27642 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
27643 the hook function called when an assembly is loaded.
27645 * domain.c: Modified file.
27646 (mono_domain_assembly_load): removed hash table insertion of assemblies.
27650 2002-11-07 Miguel de Icaza <miguel@ximian.com>
27652 * reflection.c: Map PEFileKind to the value expected by the WinNT
27655 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27657 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
27658 Read until the buffer is filled completely.
27660 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27662 * icall.c: implemented MonoType.InternalGetEvent ().
27664 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27666 * appdomain.c: implemented InitAppDomainSetup. Delayed
27667 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
27668 the entry_assembly.
27670 * assembly.c: base_dir is now an absolute path ending with
27673 * icall.c: modified get_location according to the above changes.
27675 * object.c: init AppDomain.SetupInformation for the default domain after
27676 we have the entry assembly.
27678 * domain.c: when unloading a domain, setup = NULL.
27680 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
27682 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
27684 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
27686 * object.h, object.c: introduced mono_object_get_virtual_method ()
27687 to lookup the method invoked on an object when a callvirt is done on
27689 * icall.c: make MethodInfo::Invoke() always do a virtual call.
27691 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27693 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
27694 current domain when loaded an assembly and failed to load it.
27696 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
27698 2002-10-31 Dick Porter <dick@ximian.com>
27702 * file-io.c: Return the error status in a parameter, as the
27703 GetLastError() value has long since been blown away if we try and
27704 look it up in a subsequent internal call invocation. Delete the
27705 GetLastError() internal call, because it's useless.
27707 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
27709 * class.[ch]: added cast_class to fix bug 29517
27711 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
27713 * marshal.c: create valid IL code in the filter clause:
27714 the new JIT is less forgiving:-)
27716 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27718 * icall.c: removed get_property internal call.
27720 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
27722 * appdomain.h domain.c: Added an ID to appdomains.
27724 * threads.c threads.h icall.c: Implement icall
27725 Thread:GetDomainID(), and remove unused icall
27726 CurrentThreadDomain_internal.
27728 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27730 * icall.c: Don't recurse through the base types in GetConstructor.
27733 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
27735 * mempool.h, mempool.c: added mono_mempool_empty() and
27736 mono_mempool_stats().
27738 2002-10-23 Dick Porter <dick@ximian.com>
27742 * icall.c: Added MonoIO.GetFileType internal call
27744 2002-10-17 Dick Porter <dick@ximian.com>
27746 * appdomain.c (mono_runtime_cleanup): Don't signal the async
27747 delegate semaphore before waiting for all threads to finish,
27748 because new threads can also call async delegates. Fixes bug
27751 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
27752 of 3 seconds, in case another async job is queued. (This part is
27753 needed because the bug fix reintroduced the 3s exit lag.) This
27754 makes the mono_runtime_shutdown flag superfluous.
27756 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
27758 * reflection.c: include ehader size in method section headers.
27759 Really check for suplicated modules entries.
27761 2002-10-17 Martin Baulig <martin@gnome.org>
27763 * debug-mono-symfile.c: Added back support for locals.
27765 2002-10-14 Martin Baulig <martin@gnome.org>
27767 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
27770 2002-10-14 Martin Baulig <martin@gnome.org>
27772 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
27773 mono_class_get() instead of looking in the class cache.
27775 2002-10-13 Martin Baulig <martin@gnome.org>
27777 * debug-mono-symfile.c: Set version number to 28, include the
27778 signature in method names.
27780 2002-10-13 Martin Baulig <martin@gnome.org>
27782 * debug-mono-symfile.h: Set version number to 27.
27784 2002-10-11 Martin Baulig <martin@gnome.org>
27786 * gc.c: Don't register/unregister NULL pointers as disappearing links.
27788 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27790 * metadata.c, metadata.h: added helper function to allocate signatures.
27792 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27794 * icall.c: added internal call to get the location of machine.config.
27796 2002-10-08 Martin Baulig <martin@gnome.org>
27798 * debug-mono-symfile.c: Ignore classes with a pending init for the
27801 2002-10-03 Dick Porter <dick@ximian.com>
27803 * threads.c: Freebsd pthread_t is a pointer
27805 2002-10-03 Dick Porter <dick@ximian.com>
27807 * socket-io.c: Implemented GetHostName_internal
27809 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27812 (mono_config_parse_file): don't leak the text.
27814 2002-10-02 Martin Baulig <martin@gnome.org>
27816 * debug-mono-symfile.c: Added support for methods.
27818 2002-10-01 Martin Baulig <martin@gnome.org>
27820 * debug-mono-symfile.c: Don't emit methods and line numbers for
27821 the dynamic symbol file, just write the type table. We can easily
27822 have an external helper program which creates a symbol file for an
27825 2002-10-01 Dick Porter <dick@ximian.com>
27827 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
27828 Only add the handle to the cleanup array when we're about to
27829 launch the thread. Bug 31425 deadlocked when the test was run on
27832 2002-10-01 Martin Baulig <martin@gnome.org>
27834 * debug-mono-symfile.c: Added support for properties.
27836 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27838 * reflection.c: unaligned store fix from Mark Crichton
27839 <crichton@gimp.org>.
27841 2002-09-27 Martin Baulig <martin@gnome.org>
27843 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
27846 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27848 * assembly.h, assembly.c: use a sane API to hook into the assembly
27849 loading process instead of a useless special-purpouse hack
27850 (ngen needs a hook, too, for example).
27852 2002-09-27 Dick Porter <dick@ximian.com>
27854 * threads.c (mono_thread_init): Call GetCurrentProcess() so
27855 io-layer can set up some process handle info. Not needed on w32,
27856 but doesn't hurt either.
27858 * process.c: Pass the program name in the second parameter to
27859 CreateProcess, so the path is searched. Include the working
27860 directory. Implemented process name, process enumeration, and some
27861 process detail internal calls.
27863 * icall.c: Added internal calls for process lookup, and some
27866 2002-09-26 Martin Baulig <martin@gnome.org>
27868 * assembly.c (mono_install_open_assembly_hook): New global
27869 function to install a function to be invoked each time a new
27870 assembly is loaded.
27871 (mono_assembly_open): Run this callback function if set.
27873 * debug-mono-symfile.c: Put back line numbers for the dynamic
27874 symbol file and also record the .il file as source file. This
27875 allows us to install the temporary symbol file as `file.dbg' just
27876 like a compiler-generated one.
27878 2002-09-26 Nick Zigarovich <nick@chemlab.org>
27880 * Corrected typo in gc.c (BOHEM vs BOEHM).
27882 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27884 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
27885 GetProperties. Also avoid calling g_slist_length in GetProperties and
27888 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27890 * reflection.c: avoid unaligned stores (bug spotted by
27891 Mark Crichton <crichton@gimp.org>).
27893 2002-09-25 Martin Baulig <martin@gnome.org>
27895 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
27896 instead of guint64 for addresses and added prologue/epilogue info.
27898 2002-09-25 Martin Baulig <martin@gnome.org>
27900 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
27901 store line number info. For the dynamic symbol file, we only need
27902 to provide the JIT generated dynamic line number info for the dynamic
27905 2002-09-25 Martin Baulig <martin@gnome.org>
27907 * debug-mono-symfile.h: Incremented version number.
27909 2002-09-24 Martin Baulig <martin@gnome.org>
27911 * class.c (mono_debugger_class_init_func): New global function
27913 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
27916 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
27917 function. This is called via the mono_debugger_class_init_func
27918 hook to add all types to the dynamic type table.
27919 (ves_icall_MonoDebugger_GetType): New interncall to get a class
27920 from its metadata token.
27922 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
27923 New interncall for the debugger.
27925 2002-09-24 Nick Drochak <ndrochak@gol.com>
27927 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
27928 before using it in case it is null.
27930 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27932 * metadata.c: allow custom modifiers in local var signatures
27933 (bug spotted by Zoltan Varga).
27935 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
27937 * class.c: deal with the <Module> class that may have a NULL vtable.
27938 Eliminate warnings.
27940 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
27942 * image.c, image.h: more strong name helpers.
27943 * monosn.c: more work: convert pem keys to cryptoapi format.
27945 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
27947 * string-icalls.c: speedup IndexOf.
27949 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
27951 * icall.c: updates from Zoltan.2.Varga@nokia.com.
27953 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27955 * icall.c: cleanup: use mono_object_domain ().
27957 2002-09-23 Martin Baulig <martin@gnome.org>
27959 * debug-mono-symfile.c: Improved type support.
27961 2002-09-22 Martin Baulig <martin@gnome.org>
27963 * debug-mono-symfile.c: Added support for reference types and strings.
27965 2002-09-22 Martin Baulig <martin@gnome.org>
27967 * debug-mono-symfile.c: Started to work on the type table.
27969 2002-09-21 Martin Baulig <martin@gnome.org>
27971 * debug-mono-symfile.c: Largely reworked the symbol table format.
27972 The symbol table is now incrementally updated each time a new
27973 method is added. We're now also using our own magic and version
27974 so that you don't need to recompile all your classes if the
27975 dynamic table changes.
27976 (mono_debug_update_mono_symbol_file): Removed.
27977 (mono_debug_symfile_add_method): New function to add a method.
27979 2002-09-21 Martin Baulig <martin@gnome.org>
27982 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
27985 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
27986 New interncall to get a method from its metadata token.
27988 2002-09-21 Martin Baulig <martin@gnome.org>
27990 * debug-mono-symfile.c: Create type table.
27992 2002-09-20 Martin Baulig <martin@gnome.org>
27994 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
27996 2002-09-20 Martin Baulig <martin@gnome.org>
27998 * debug-mono-symfile.c: Provide information about params and locals.
28000 2002-09-20 Martin Baulig <martin@gnome.org>
28002 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
28005 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
28006 interncall to get a method from its metadata token.
28008 2002-09-20 Martin Baulig <martin@gnome.org>
28010 * debug-mono-symfile.c: Added a few checks for method->header
28011 being non-NULL. This should never happen, but for the moment
28012 let's use a g_warning() rather than a g_assert().
28014 2002-09-19 Mark Crichton <crichton@gimp.org>
28016 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
28017 even if support for it isn't present. Added an #ifdef to fix this.
28019 * socket-io.c: Added checks back for Solaris support.
28021 2002-09-19 Martin Baulig <martin@gnome.org>
28023 * debug-mono-symfile.c (read_string, write_string): Reflect latest
28024 changes in the symbol file format.
28026 2002-09-18 Martin Baulig <martin@gnome.org>
28028 * debug-mono-symfile.c: Set version number to 21.
28030 2002-09-18 Dick Porter <dick@ximian.com>
28032 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
28033 on netbsd. Fixes bug 30051.
28035 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28038 (set_version_from_string): little fix.
28040 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
28042 * monosn.c, Makefile.am: added strong name utility.
28043 * reflection.h, reflection.c: implemented delayed signing,
28044 locale, version and hash id assembly attributes.
28046 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
28048 * loader.c, metadata.c: load param attributes in signatures.
28050 2002-09-16 Martin Baulig <martin@gnome.org>
28052 * debug-mono-symfile.c: Added string table with all method names.
28054 2002-09-14 Martin Baulig <martin@gnome.org>
28056 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
28057 fast method lookup.
28059 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
28061 * reflection.c: record the public key token of referenced assemblies.
28063 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
28065 * image.c, image.h: added functions to get the strong name and the
28066 public key of an assembly.
28067 * pedump.c: use them.
28069 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
28071 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
28073 2002-09-12 Miguel de Icaza <miguel@ximian.com>
28075 * marshal.c (mono_marshal_get_managed_wrapper): Added
28078 2002-09-11 Martin Baulig <martin@gnome.org>
28080 * gc.c: Call GC_unregister_disappearing_link() on all links when
28081 finalizing them, this is necessary to aviod a crash in boehm's
28084 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
28086 * gc.c: handle GetTarget for finalized objects spotted and fixed by
28089 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
28091 * icall.c: implemented MonoType::Module.
28092 * reflection.c, reflection.h: mono_module_get_object () from
28093 Tomi Pakarinen <tomi.pakarinen@welho.com>.
28095 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
28097 * icall.c: ignore overridden methods in GetMethods ().
28098 Fix for FieldInfo::SetValue().
28099 * object.c: handle float/double in runtime invoke.
28101 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
28103 * object.c: allow a constructor to be called again on an object.
28105 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
28107 * class.h, class.c: move field layout code to it's own function and
28108 export it. Get an interface id earlier. Move fields in MonoClass
28109 so they are more cache friendly and align the bitfields.
28110 * loader.c: temporary handle get_param_names() for a runtime method.
28111 * reflection.c, reflection.h: more code to handle runtime creation of
28114 2002-09-09 Martin Baulig <martin@gnome.org>
28116 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
28117 signature with the pinvoke field being set for the actual call.
28119 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
28121 * icall.c: removed some unused icalls. Start of map of glib charsets
28122 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
28124 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
28126 * debug-helpers.c: break infinite loop (found and fixed by
28127 Holger Arnold <harnold@gmx.de>).
28129 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
28131 * icall.c: target may be null in create_delegate.
28133 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
28135 * marshal.c: handle a boolean return type.
28137 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
28139 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
28141 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
28143 * gc.c: fix weakreferences.
28145 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
28147 * icall.c: added icall to get default codepage.
28149 2002-09-03 Dick Porter <dick@ximian.com>
28152 * threads.c: Use MonoThread instead of MonoObject where
28155 Store running thread objects in a hash table, so that we have all
28156 the info to hand when waiting for them to finish
28157 (means we don't need OpenThread() any more, so mingw builds should
28158 be fully functional again.)
28161 * object.h: Added thread ID to MonoThread
28163 2002-09-03 Martin Baulig <martin@gnome.org>
28165 * icall.c (System.Reflection.Assembly::get_location): New interncall.
28167 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28169 * icall.c: fixed leak in get_temp_path. Thanks lupus.
28171 2002-09-03 Martin Baulig <martin@gnome.org>
28173 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
28174 argument to store the end address of the disassembled instruction.
28176 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
28177 here from debug-symfile.h.
28178 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
28179 JIT into this struct.
28180 (MonoSymbolFile): Added `char *image_file' field.
28181 (MonoDebugGetMethodFunc): Removed.
28182 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
28183 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
28184 (mono_debug_find_method): New method.
28186 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
28187 create a full symbol file.
28188 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
28189 and static symbol files.
28190 (mono_debug_find_method): The symbol file keeps an internal method hash,
28191 call this to get a MonoDebugMethodInfo from a MonoMethod.
28193 * debug-symfile.[ch]: Removed.
28195 2002-08-29 Miguel de Icaza <miguel@ximian.com>
28197 * image.c (do_mono_image_open): Remove linker version check.
28199 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
28201 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
28202 wrappers for instance methods.
28204 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28206 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
28208 2002-08-28 Dick Porter <dick@ximian.com>
28210 * Makefile.am: Export HOST_CC for w32 builds
28212 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
28214 * file-io.c process.c: MonoString are null terminated, no
28215 need for mono_string_to_utf16() anymore.
28217 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28219 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
28221 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
28223 * icall.c, reflection.h: speedup System.MonoType.
28225 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
28227 * reflection.c: allow null as the value of a string argument in
28228 custom attributes constructors.
28230 2002-08-27 Martin Baulig <martin@gnome.org>
28232 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
28233 `trampoline_address' field.
28235 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
28237 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
28238 check (fixes bug #29486)
28240 2002-08-27 Martin Baulig <martin@gnome.org>
28242 * debug-mono-symfile.c: Changed the file format in a way that allows us
28243 open it read-only and to use a specially malloced area for all the
28244 dynamic data. We can now also generate a symbol file on-the-fly if we're
28245 debugging IL code and there is no MCS generated symbol file for it.
28247 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
28249 * object.c: added a define for a good string and array
28250 creation speedup (not enabled by default because we need to deal with
28253 2002-08-26 Martin Baulig <martin@gnome.org>
28255 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
28256 function to create a dynamic symbol file. This is used by the
28257 debugger to create a symbol file for IL code on-the-fly.
28259 2002-08-26 Martin Baulig <martin@gnome.org>
28261 * loader.c (mono_lookup_pinvoke_call): Include the error message
28262 from g_module_error() in the error message.
28264 2002-08-24 Martin Baulig <martin@gnome.org>
28266 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
28267 function to update the symbol file. The symbol file is mmap()ed
28268 writable, but private. This allows us to install the symbol file
28269 together with the assembly.
28271 2002-08-24 Martin Baulig <martin@gnome.org>
28273 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
28274 but they can read the new symbol file format which mcs is now creating.
28276 * debug-symfile.c (mono_debug_find_source_location): Moved to
28277 debug-mono-symfile.c; this is now operating on the new symbol file.
28279 2002-08-23 Martin Baulig <martin@gnome.org>
28281 * debug-helpers.c (mono_method_desc_from_method): New function to get
28282 a MonoMethodDesc from a MonoMethod.
28284 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
28286 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
28287 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
28289 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
28291 * string-icalls.[ch]: make helper methods static.
28293 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28295 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
28296 types to it and to SetValueInternal.
28298 * object.c: Moved handle_enum label to its proper place. This was the
28301 This time i compiled mcs and gtk-sharp and they both work.
28303 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28305 * icall.c: reverted partially my previous patch until
28306 object.c:set_value handles enums correcly.
28308 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28311 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
28312 (ves_icall_System_Environment_get_MachineName): removed warning when
28313 compiling under cygwin.
28315 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
28317 * object.c: fixed field_get_value() for reference types.
28319 2002-08-22 Dick Porter <dick@ximian.com>
28321 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
28322 Don't free a buffer while it's still needed. Patch from Jonathan
28323 Liger <Jonathan.liger@wanadoo.fr>
28325 2002-08-21 Miguel de Icaza <miguel@ximian.com>
28327 * icall.c (ves_icall_System_Environment_get_Platform): Add new
28330 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
28332 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
28333 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
28335 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
28336 we call unmanaged code which throws exceptions.
28338 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
28340 * appdomain.h: added per-domain entry_assembly.
28341 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
28343 * icall.c: Assembly::GetEntryAssembly icall.
28344 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
28345 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
28347 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
28349 * appdomain.h, gc.c: added mono_domain_finalize ().
28351 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28354 (mono_print_unhandled_exception): changed g_warning by g_printerr
28355 because g_log has a 1024 characters limit (yeah, i got a big stack
28356 trace). Don't print exception name, that should be in ToString
28359 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28361 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
28362 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
28364 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28367 (mono_print_unhandled_exception): after previous commit, i realized
28368 that MS calls ToString on the exception. I changed this function to
28369 do that. This way we get stack_trace for free.
28371 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28374 (mono_print_unhandled_exception): invoke Message property instead of
28375 getting 'message' field from Exception. Don't allocate memory for
28376 'trace' and 'message' if not needed.
28378 2002-08-18 Dick Porter <dick@ximian.com>
28380 * unicode.c: Fix asserts to match Encoder.cs checks
28382 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
28384 * marshal.c: fix unaligned store issue and a few wrong
28385 opcode argument types.
28387 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28389 * icall.c: added GetUninitializedObjectInternal internal call.
28391 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
28393 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
28394 to the right domain.
28396 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
28398 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
28400 * class.c (class_compute_field_layout): set blittable to false for Strings
28402 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
28404 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28406 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
28407 first chunk of code to create types at runtime. Code to
28408 handle ReflectedType/DeclaringType. Make reflection handles
28411 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
28413 * class.c: set correct name in arrays.
28415 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
28417 * appdomain.c (mono_domain_transfer_object): make it work with
28418 valuetypes. bug fixes.
28420 2002-08-12 Dick Porter <dick@ximian.com>
28422 * object.h: Rename some parameters to avoid c++ keywords (Patch
28423 from Joseph Wenninger <kde@jowenn.at>)
28425 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
28427 * icall.c: added icall to implement Assembly.GetFile*.
28429 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
28431 * reflection.h, reflection.c: code to embed managed resources.
28433 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
28435 * class.c: move all the type size stuff into
28436 class_compute_field_layout().
28438 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
28440 * class.c: ensure enums have always the correct instance size.
28441 * unicode.c: remove wrong assert.
28443 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
28445 * assembly.c: fix mem corruption issue.
28446 * image.h, image.c: added mono_image_get_resource () to access
28448 * icall.c: implemented Assembly.EntryPoint property and some
28449 Managed Resources related internalcalls.
28452 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
28454 * image.c, image.h: impemented mono_image_get_entry_point ().
28455 * appdomain.c: use mono_image_get_entry_point.
28457 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
28459 * reflection.c: support the object type argument when loading
28462 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
28464 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
28465 String as return type.
28467 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
28469 * reflection.c: fix encoding of named args for custom attrs to match
28470 the ms implementation. Read them back when instantiating custom
28473 2002-08-02 Radek Doulik <rodo@ximian.com>
28475 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
28476 by Dietmar as quick fix
28477 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
28478 16 as stack size, used on more places as quick fix before Dietmar
28479 will fix it properly
28481 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
28483 * object.h, object.c: added accessors for fields and properties.
28485 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
28487 * class.c, class.h: made mono_class_get_field_from_name ()
28488 loop on parent types.
28489 Added mono_class_get_property_from_name ().
28491 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
28493 * class.c, class.h: move the code to setup the type vtable in its own
28494 function so that it can be reused also for types created at runtime.
28495 Eliminate the "class" identifier from the header file.
28496 * reflection.c: setup the vtable for enums so that we can create
28497 objects for use in SetConstant ().
28499 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
28501 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
28502 instead of the delegate itself as this pointer (bug #28383)
28504 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
28506 * marshal.c (mono_marshal_get_managed_wrapper): added return type
28509 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28511 * loader.c: don't set the pinvoke bit on icalls.
28513 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
28515 * debug-helpers.c (mono_method_full_name): only print a number to
28516 indicate wrapper type (so that the output is more readable in traces).
28518 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
28520 * class.c (mono_class_init): include method override patch from Paolo
28522 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
28524 * icall.c: fixed GetTypeCode().
28526 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
28528 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
28529 use real delegate invoke function to make it work with multicast
28530 delegates (fix bug# 28291).
28532 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
28534 * object.c: load constant strings.
28536 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28538 * reflection.c: no magic numbers.
28539 * tabledefs.h: security action enum.
28541 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
28543 * assembly.c: fix possible memory corruption.
28545 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
28547 * reflection.h, reflection.c: added support for linking resources.
28548 * verify.c: check we have an updated corlib.
28550 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
28552 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
28554 (mono_marshal_string_array): null terminate unmanaged string arrays.
28555 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
28557 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
28559 * icall.c: Type.GetType () can now return also types from the
28562 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
28564 * loader.h, loader.c: stack walking support.
28565 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
28566 GetCallingAssembly.
28568 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
28570 * marshal.c: added optimisations for blittable types
28572 * class.c (mono_array_class_get): do not set blittable attribute on arrays
28573 (mono_class_setup_mono_type): set blittable attribute for single
28576 * marshal.c (mono_string_utf8_to_builder): impl.
28577 (mono_string_builder_to_utf8): impl.
28578 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
28580 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
28582 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
28583 (mono_marshal_get_managed_wrapper): impl. byref types
28585 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28588 (search_method): don't display debug message.
28590 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
28592 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
28594 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
28596 * appdomain.c: set the missing filename when throwing exception.
28598 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
28600 * metadata.c (mono_type_size): code cleanup
28601 (mono_type_stack_size): removed some test code
28603 2002-07-21 Miguel de Icaza <miguel@ximian.com>
28605 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
28606 mono_get_exception_file_not_found now.
28608 * exception.c (mono_exception_from_name_two_strings): New version
28609 that will call a constructor with two string arguments.
28610 (mono_get_exception_file_not_found): New helper routine, used to
28611 report file-not-found errors.
28613 2002-07-20 Dick Porter <dick@ximian.com>
28616 * process.c: Pass file handles to CreateProcess
28620 * file-io.c: Implemented CreatePipe
28622 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
28624 * metadata.c (mono_get_param_info): set alignment for value types
28626 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28628 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
28629 Constify mono_domain_assembly_open().
28630 * loader.c: handle null namespace in icalls.
28632 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
28634 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
28635 (emit_str_to_ptr_conv): marshal object as structs
28637 * metadata.c (mono_type_to_unmanaged): marshal object as structs
28639 * marshal.c (mono_marshal_get_runtime_invoke): support value types
28641 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
28643 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
28644 (mono_marshal_get_native_wrapper): we an now return value types
28646 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28648 * verify.c: more checks implemented.
28650 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
28652 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
28654 (mono_marshal_get_native_wrapper): allow byref arguments
28655 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
28656 impl. PtrToStringXXX methods
28657 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
28658 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
28659 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
28660 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
28661 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
28663 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
28665 * reflection.c: fix buglet in parsing an assembly name.
28667 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
28669 * marshal.c (emit_ptr_to_str_conv): first impl.
28671 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
28673 * object.c, class.h: cache the vtable in the class as suggested by
28674 vargaz@freemail.hu (Zoltan Varga).
28676 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
28678 * class.h, loader.c: added mono_field_from_token().
28679 * verify.c: first cut of type checking code.
28681 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
28683 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
28685 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
28687 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
28689 (mono_marshal_get_remoting_invoke): impl.
28690 (mono_delegate_begin_invoke): impl.
28691 (mono_mb_emit_save_args): impl.
28692 (mono_delegate_end_invoke): impl.
28693 (mono_marshal_get_delegate_begin_invoke):
28694 (mono_marshal_get_delegate_end_invoke):
28695 (mono_marshal_get_delegate_invoke): generate a special name for
28696 those methods (including the signature) and associate them whith
28697 the delegate class.
28699 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
28702 (mono_reflection_type_from_name): now it has a MonoImage parameter
28703 which is used as the default image to search the type in. If the image
28704 is NULL or getting the type from it fails, it defaults to corlib.
28706 * icall.c: changed 1 call to mono_reflection_type_from_name to match
28709 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
28711 * reflection.c: update the parameter table index.
28713 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
28715 * domain.c: don't include the mark byte in the string hash.
28717 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
28719 * icall.cs: icall for Type.GetTypeCode ().
28720 * verify: a couple of fixes and disabled local initialization checks.
28722 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
28724 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
28726 * debug-helpers.c (mono_method_full_name): print the type of the
28729 * metadata.c (mono_signature_hash): a hash function for signatures
28730 (mono_signature_hash): better hash algorithm
28732 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
28734 * debug-helpers.c (mono_method_full_name): this can now generate
28735 method names with signatures
28737 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
28738 method dont have this pointers.
28740 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28742 * reflection.c: fixup typebuilder tokens.
28743 * image.c: fix buglet.
28744 * marshal.h: remove whitespace.
28745 * metadata.h, metadata.c: reinstate code that was removed.
28746 * verify.c: handle catch directives and fix another couple of bugs.
28748 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
28750 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
28751 (mono_marshal_get_native_wrapper): make it comp. with the old code
28752 (mono_marshal_get_native_wrapper): support boolean
28753 (mono_marshal_get_managed_wrapper): support more types
28755 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
28757 * class.c (class_compute_field_layout): compute class->blittable attribute.
28759 2002-07-09 Dick Porter <dick@ximian.com>
28761 * threads.c: Make the thread cleaning up cope with threads that
28764 2002-07-08 Radek Doulik <rodo@ximian.com>
28766 * reflection.c (method_encode_code): use non-translated values to
28767 compute finally_start, this fixes exception handling on ppc, yay!
28769 * decimal.h (struct signscale): fix endianess
28771 2002-07-07 Radek Doulik <rodo@ximian.com>
28773 * reflection.c: swap box_val and not val
28775 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
28777 * reflection.c, reflection.h: handle full assembly info in type name.
28778 Handle Type arguments when loading custom attributes.
28779 * icall.c: updated to use new mono_reflection_type_from_name () method.
28781 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28784 (method_from_memberref): also print assembly name when method not found.
28786 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28789 (ves_icall_TypeGetProperties): fixed bug #27473.
28791 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28793 * reflection.c: display image name and token when cannot find the
28794 .ctor for an attribute.
28796 2002-07-05 Martin Baulig <martin@gnome.org>
28798 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
28800 2002-07-04 Dick Porter <dick@ximian.com>
28802 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
28803 compile on mingw. This will cause mingw builds to not wait for
28804 subthreads to terminate after the main thread does. I've lodged a
28805 bug with the mingw developers for them to wrap OpenThread().
28807 2002-07-03 Dick Porter <dick@ximian.com>
28809 * threads.c: Store thread IDs instead of handles, because
28810 GetCurrentThread() returns a pseudohandle and therefore stores
28811 useless values. mono_thread_cleanup() continues checking the
28812 array of threads until it is empty, to cope with subthreads
28813 spawning new threads after the main thread has finished.
28817 * profiler-private.h: Pass the thread ID to thread profiler
28818 functions, instead of a handle
28820 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
28822 * verify.c: fixes to make it more usable.
28823 * pedump.c: added --verify code to verify IL code in an assembly.
28825 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28827 * reflection.c: turn errors into warnings to allow compiling corlib.
28829 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
28831 * reflection.c: add special cases to compile corlib.
28833 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
28835 * reflection.c: handle properties with only a set method.
28837 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
28839 * opcodes.h: add enum with opcodes in opval order.
28841 2002-07-01 Dick Porter <dick@ximian.com>
28844 * object.c (mono_runtime_run_main): Removed unneeded argument
28846 2002-06-28 Martin Baulig <martin@gnome.org>
28848 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
28850 2002-06-27 Dick Porter <dick@ximian.com>
28852 * threads.c: Store the handle in both the parent thread and in the
28853 subthread, to minimise the time between starting a new thread and
28856 2002-06-26 Dick Porter <dick@ximian.com>
28858 * appdomain.c (mono_runtime_cleanup): Close the socket library
28859 after all the threads have finished, not before
28861 2002-06-26 Martin Baulig <martin@gnome.org>
28863 * debug-symfile.c (mono_debug_find_source_location): Added
28864 `guint32 *line_number' argument. If it's not NULL, store the line number
28865 there and return the file name without the line number.
28867 2002-06-25 Dick Porter <dick@ximian.com>
28871 * process.c: Process forking and other support functions
28873 2002-06-25 Dick Porter <dick@ximian.com>
28875 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
28876 things dont happen when the image is closed.
28877 (mono_image_lookup_resource): Walk the resource section looking
28878 for a particular entry
28880 * cil-coff.h: PE resource section decoding
28882 2002-06-25 Dick Porter <dick@ximian.com>
28886 (mono_assembly_foreach): Accessor functions to walk the list of
28888 (mono_assembly_set_main):
28889 (mono_assembly_get_main): Process methods need to know which
28890 assembly is the "main" one
28892 * object.c (mono_runtime_run_main): Record the main assembly
28894 * debug-helpers.c: Fix typo
28896 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
28898 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
28899 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
28901 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
28903 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
28905 2002-06-21 Miguel de Icaza <miguel@ximian.com>
28907 * image.c (do_mono_image_open): Initialize reference count,
28908 otherwise we leak the MonoImage.
28910 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
28912 * reflection.c: small tweak to handle self-hosting.
28914 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
28916 * reflection.c: fix type name parse code.
28918 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
28920 * reflection.c: break out of the loop.
28921 * image.c: special case corlib.
28923 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28925 * reflection.c: add all the custom attrs at the end to ensure the
28926 ctors have been properly initialized when the attributes are defined
28927 in the current assembly.
28929 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
28931 * reflection.c: handle correctly multiple-nested types.
28933 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
28935 * row-indexes.h: fix typos.
28936 * reflection.c: adjust for typos and fix method_def_or_ref
28937 encoding in MethodImpl table.
28939 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
28941 * reflection.c: fix entry point patching (thanks Serge!).
28943 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
28945 * verify.c: add check for System.Exception
28947 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
28949 * image.c, class.c: minifix for code just c&p'ed.
28950 * reflection.c: warning fix.
28951 * object.h, loader.h, domain.c: load also StringBuilder.
28953 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
28955 * marshal.h, marshal.c: some support code to handle complex marshaling.
28957 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28959 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
28960 Better signatures with vtable error dump.
28962 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
28964 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
28966 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
28968 * icall.c (ves_icall_Type_GetField): impl.
28970 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28972 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
28973 to retrieve a marshal description blob for a field or param.
28975 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
28977 * reflection.h, reflection.c: change order of nested type emission
28978 to avoid table corruption. The NestedTypes table is sorted.
28979 * icall.c: change order of GetConstructor results to workaround mcs bug.
28981 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
28983 * reflection.h, reflection.c: handle field and param marshal
28986 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
28988 * icall.c, marshal.c marshal.h: more Marshal class implementation.
28990 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
28992 * reflection.c: fix call convention.
28994 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
28996 * reflection.h, reflection.c: mono_image_get_memberref_token()
28997 takes a type instead of a class, now. Added
28998 mono_image_get_array_token() to create tokens for the special
28999 multi-dim array methods.
29001 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
29003 * assembly.c: handle modules (no assembly table). Split
29004 loading references in its own function.
29005 * class.c: handle moduleref resolution scope.
29006 * image.c, image.h: cache module name in image.
29008 2002-06-07 Martin Baulig <martin@gnome.org>
29010 * reflection.c (mono_image_get_type_info): Only add a class layout entry
29011 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
29013 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
29015 * icall.c: more signature fixes that used uint instead of int.
29017 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
29019 * reflection.c: fixed signature of field refs.
29021 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
29023 * class.c, reflection.c: handle typerefs of nested types
29024 (both on read and when writing files).
29026 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
29028 * icall.c: fix method signatures that tried to workaround the previous
29031 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
29033 * debug-helpers.c: fix typo.
29035 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
29037 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
29038 rewrote the PE/COFF writing code (our programs are understood by the
29041 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
29043 * gc.c, gc.h, icall.c: weakreference support.
29045 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
29047 * Makefile.am, mono-config.c: use $(sysconfdir).
29049 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
29051 * icall.c: changed default precision of Double.ToString() to 15.
29052 Fixed memory leak. Unified with Single.ToString.
29054 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
29056 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
29058 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
29060 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
29061 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
29062 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
29065 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
29067 * debug-symfile.c, sysmath.c: yet more compilation fixes.
29069 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
29071 * reflection.c, socket-io.c: more compilation fixes.
29073 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
29075 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
29076 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
29077 unicode.c: warning and compiler compatibility fixes.
29079 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
29081 * class.h, metadata.c: fixed warnings/compilation errors.
29083 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
29085 * Makefile.am, mono-config.c, mono-config.h: configuration file
29087 * loader.c, loader.h: make Dll mapping configurable at runtime in the
29088 config file. Export methods to insert and lookup mappings.
29090 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
29092 * reflection.c: handle types and boxed objects in custom attr
29095 2002-05-30 Martin Baulig <martin@gnome.org>
29098 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
29100 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
29102 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
29103 to lookup the implmap row for a P/Invoke method.
29104 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
29105 P/Invoke method from the runtime on an as needed basis.
29107 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
29109 * metadata.c (mono_metadata_parse_signature): impl.
29111 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
29113 * class.c: handle .pack directive.
29115 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
29117 * object.c: initialize static fields with RVA data.
29119 2002-05-25 Martin Baulig <martin@gnome.org>
29122 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
29124 2002-05-24 Martin Baulig <martin@gnome.org>
29127 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
29128 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
29129 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
29131 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
29133 * object.c: special case string ctros in invoke.
29134 * gc.c: silly whitespace changes.
29136 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
29138 * threadpool.[ch]: impl. a threadpool that can
29139 be used by mint and mono.
29141 2002-05-22 Martin Baulig <martin@gnome.org>
29143 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
29144 The first argument is now a `MonoReflectionModuleBuilder *', the return
29145 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
29146 `methods' field to get the method builder. The `token' argument is the
29149 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
29150 invalid characters instead of g_assert_not_reached()ing. This seems
29151 to be the behaviour of mscorlib.
29153 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
29155 * object.c (mono_runtime_invoke_array): applied patch from Rachel
29156 Hestilow to fix bug #25104
29158 2002-05-21 Martin Baulig <martin@gnome.org>
29160 * debug-symfile.c (mono_debug_find_source_location): New function.
29161 Looks up an IL offset in the line number table and returns the source
29162 location as a string.
29164 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29167 (mono_double_ToStringImpl): changed %f by %g until we have something
29170 2002-05-21 Nick Drochak <ndrochak@gol.com>
29172 * icall.c : Use different name for Math.Pow's icall. Needed to check
29173 parameters first in C#.
29175 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
29177 * icall.c, reflection.h: added icall to get info about an event.
29179 2002-05-20 Radek Doulik <rodo@ximian.com>
29181 * object.c (mono_value_box): don't use memcpy for boxing on BIG
29183 (mono_value_box): don't use memcpy for small sizes on
29184 architectures with unaligned access
29186 2002-05-20 Martin Baulig <martin@gnome.org>
29188 * reflection.c (mono_reflection_setup_internal_class): Don't crash
29189 if `tb->parent == NULL'.
29190 (mono_reflection_create_internal_class): New function. This is
29191 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
29194 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
29197 2002-05-19 Martin Baulig <martin@gnome.org>
29199 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
29200 argument to get the length, don't default to the array length.
29202 2002-05-18 Miguel de Icaza <miguel@ximian.com>
29204 * assembly.c (mono_assembly_setrootdir): New function used to
29205 override the MONO_ASSEMBLIES directory.
29207 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
29209 * icall.c: ValueType_GetHashCode() initialize local var.
29211 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
29213 * reflection.c: sort custom attributes table.
29215 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
29217 * reflection.c: support named args in custom attributes (write support).
29219 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
29221 * reflection.c: fix finally position calculation.
29223 2002-05-15 Radek Doulik <rodo@ximian.com>
29225 * reflection.c: fixed endianess at many places
29227 * icall.c (ves_icall_InitializeArray): comment out debug msg
29229 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
29231 * object.c (mono_unhandled_exception): new function to handle
29232 unhandled exceptions.
29233 (mono_unhandled_exception): call the UnhandledException event.
29234 (mono_runtime_delegate_invoke): impl.
29236 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
29238 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
29239 returns the RVA, not the direct pointer to the data. Handle the case
29240 when the class size is fixed.
29242 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
29244 * reflection.c: fix some endianess issues.
29246 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
29248 * object.c (mono_runtime_invoke): is now able to catch exceptions.
29250 * threads.c (mono_thread_init): added a callback which is invoked
29253 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
29255 * icall.c: make GetHashCode return non-negative values.
29257 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
29259 * object.c, icall.c, gc.c: revert to address-based hashcode.
29261 2002-05-13 Miguel de Icaza <miguel@ximian.com>
29263 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
29265 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
29267 * icall.c, class.c: special case <Module>.
29269 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
29271 * icall.c: fix bug in GetNow().
29273 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
29275 * object.c (mono_runtime_class_init): make sure that we call all
29276 static class constructors.
29278 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
29280 * reflection.c: sort methodsemantics table.
29282 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
29284 * reflection.h, reflection.c: honour init locals setting.
29286 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
29288 * icall.c: copied Double ToStringImpl for Single ToStringImpl
29290 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
29292 * reflection.c: support ContructorBuilders in attribute blob creation.
29294 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
29296 * reflection.c: some changes to build a binary that can be run
29297 directly in windows.
29299 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
29301 * loader.c: print a big message when an icall can't be found.
29303 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29305 * string-icalls.c: fix bug 24248.
29307 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
29309 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
29310 icall.c, reflection.h: separate assembly loading by pathname and by
29311 assembly name. Use the MONO_PATH env var to search for assemblies.
29313 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
29315 * assembly.c, image.h: add some support for assemblies
29316 with multiple modules.
29317 * class.c, class.h: export mono_class_from_typeref().
29318 * loader.c: remove duplicated code and use mono_class_from_typeref(),
29321 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
29323 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
29324 documentation says (the ECMA one is correct).
29326 2002-05-02 Dick Porter <dick@ximian.com>
29328 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
29329 Don't name the synchronisation mutex.
29331 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
29334 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
29335 Make the prototypes match.
29336 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
29340 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
29341 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
29342 all systems have tm.tm_zone, so use strftime() with %Z to print
29343 the timezone abreviation into a temp string.
29345 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
29346 rather than mono_array_addr() on a MonoString on Big Endian
29349 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
29351 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
29354 2002-04-30 Dick Porter <dick@ximian.com>
29356 * socket-io.c: Cope with SOCKET being an integer rather than a
29359 * threads.c: Added Thread_free_internal, to deal with thread
29360 handle cleanup. Moved calls to handle_store() and handle_remove()
29361 to start_wrapper(), so each can only be called once. Allocate
29362 synchronisation blocks with GC_malloc(), and use GC finalisation
29363 to close the handles.
29365 * icall.c: added System.Threading.Thread::Thread_free_internal
29367 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
29369 * icall.c: support Environment.Exit, CommandLineArgs().
29371 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
29373 * object.c, object.h: added mono_runtime_run_main () and
29374 mono_runtime_get_main_args () for use in System.Environment.
29376 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
29378 * gc.c: fix thinko, enable actual finalization since the jit is now
29381 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
29383 * gc.c, object.c: take into account that an object may be offset wrt the address
29384 returned by GC_malloc().
29386 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
29388 * image.c: handle files without entries in the assembly table (modules).
29390 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
29392 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
29393 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
29394 allowed to be null when it's System.Object class setup.
29396 2002-04-27 Martin Baulig <martin@gnome.org>
29398 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
29399 if `tb->parent == NULL' rather than crashing.
29401 2002-04-28 Nick Drochak <ndrochak@gol.com>
29403 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
29404 calling acos() where asin() should have been called.
29406 2002-04-26 Martin Baulig <martin@gnome.org>
29408 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
29409 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
29410 there's a subdirectory called `System', but we don't want to read that
29411 subdirectory as an assembly.
29413 2002-04-25 Martin Baulig <martin@gnome.org>
29415 * debug-symfile.c: Reflect latest MonoString changes.
29417 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
29419 * rand.c, rand.h: instance method icalls need to have an explicit
29420 this pointer as first argument in the C implementation.
29422 2002-04-25 Nick Drochak <ndrochak@gol.com>
29424 * icall.c: Fix typo in map for GetNonZeroBytes
29426 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
29428 * string-icalls.c : String does now passes unit tests without any
29429 errors, the following changes has been made:
29431 Implemented replace methods.
29432 Renaming of methods to (try) follow the standard.
29433 Fixed compare ordinal
29434 Made all memory allocated directly to function instead of via icall function.
29435 Small performance fix in is_in_array function
29437 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
29439 c (mono_string_Internal_ctor_charp_int_int):
29440 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
29441 sindex < 0, throw ArgumentOutOfRangeException instead of
29442 ArgumentNullException.
29444 Added new check for length == 0, however
29445 I need to make it return String.Empty from the C code.
29447 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
29448 that calculate the length for us here.
29450 (mono_string_Internal_ctor_sbytep_int_int): Replaced
29451 mono_string_new_utf16 with mono_string_new, since value is utf8.
29453 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
29455 * object.c: register the object for finalization if needed.
29456 Allocate one more char in the string for the terminating 0 char.
29458 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
29460 * class.c, class.h, image.c: check if a type implemenst a destructor.
29461 Use the proper key for array class lookups.
29462 * icall.c: register the icalls in the System.GC class.
29463 * gc.c, gc.h: GC-related functions and icalls.
29465 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29469 * unicode.c: free some strings gotten from mono_string_to_utf8 and
29470 changed a couple of free () by g_free ().
29472 * decimal.c: one-liner in the comments for decimal2string ().
29474 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
29476 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
29478 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
29480 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
29481 * object.c (mono_runtime_invoke_array) : handle null in params
29483 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
29485 * string-icalls.c: fixed bug in split (one off bug)
29487 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
29489 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
29490 * icalls.c: added String::Equals as internal method
29492 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
29494 * threads.c: fixed bug in the double interlocked functions
29496 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
29498 * threads.c: implemented all of the new interlocked icalls.
29499 * string-icalls.c: fix a bug in insert.
29500 * icalls.c: added the icalls for interlocked, removed old string functions.
29502 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
29504 * loader.c: fix off-by-one error when reading argument names.
29506 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
29508 * profiler.c: win32 counter implementation (untested).
29509 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
29510 (the latter needs testing and more complete impl. from win32 folks).
29512 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
29514 * object.c: mono_array_new_full workaround mono_array_class_get
29517 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
29519 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
29520 * object.h (mono_string_chars): Changed casting type.
29522 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
29524 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
29525 method signatures to use gunichar2 instead of gint16.
29527 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
29529 * object.h, object.c: domain-specific versions of mono_object_new and
29532 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
29534 * object.c: changed String layout
29536 * string-icalls.c (mono_string_Internal_ctor_chara): added
29537 internal string constructors.
29539 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
29541 * threads.c: pass 'this' to the thread start routine.
29543 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29545 * string-icalls.c: fix IndexOf and LastIndexOf. Now
29546 InternalCompareStr don't call twice mono_string_cmp_char for the last
29547 character. Improved performance in mono_string_cmp_char.
29549 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
29551 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
29552 code into its own library: libmonoruntime.
29554 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
29556 * object.h, object.c: changed array format so that szarrays do not
29557 require a bounds structure.
29558 * icall.c, appdomain.c: support for new szarray format.
29560 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
29562 * metadata.c: compare also the retuns type when comparing signatures:
29563 we didn't do this as an optimization since really overloaded methods
29564 must differ also in the arguments, but this doesn't work with
29565 low-level IL code (or when using explicit conversion operators: see
29566 bug#23498 for an example).
29568 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
29570 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
29572 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
29574 * icall.c: make MonoType::GetElementType its own icall.
29576 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
29578 * icall.c: remove MonoMethod_get_Name().
29579 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
29582 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
29584 * string-icalls.c: optimized a few methods.
29586 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
29588 * icall.c: added all new string internal calls
29589 * string-icalls.c: added, new string internal call implementation.
29590 * object.c: added mono_string_new_size for allocating a string a size
29592 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
29594 * object.c (mono_object_isinst): use the same code as in the
29595 optimized x86 version.
29597 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
29599 * profiler.c: TSC-based timer code (faster and more accurate).
29600 Not hooked up in configure, yet (set USE_X86TSC to 1).
29602 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
29604 * profiler.c, profiler.h: track time spent compiling methods.
29605 * threads.c: track thread creation/destruction.
29607 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
29609 * profiler.c, profiler.h, profiler-private.h: profiling interface
29610 and sample implementation. Moved here so that it can be used also by
29613 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
29615 * reflection.c, reflection.h: keep types and other handles separate in
29616 the hash tables for referred tokens. Add guid for modules.
29618 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
29620 * assembly.c: fix bugs found with valgrind.
29621 * metadata.h, metadata.c: added mono_metadata_guid_heap().
29623 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
29625 * threads: added icall support for getting current domain for
29628 2002-04-13 Martin Baulig <martin@gnome.org>
29630 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
29631 (MonoDebugVarInfo): Added `index' field for register based addresses.
29632 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
29633 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
29634 `MonoDebugVarInfo *params' and `guint32 this_offset' with
29635 `MonoDebugVarInfo *this_var'.
29637 * debug-symfile.c (relocate_variable): New static function to write
29638 a location description for a local variable or method parameter.
29640 2002-04-12 Martin Baulig <martin@gnome.org>
29642 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
29643 stack offset and begin/end scope address of a local variable.
29644 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
29645 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
29646 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
29648 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
29649 Added new relocation types for start/end scope of a local variable.
29651 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
29653 * object.h: add mono_object_domain() macro.
29654 * reflection.c: handle typespecs.
29655 * icall.c: MonoMethod::get_Name() implementation.
29657 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
29659 * icall.c: String::GetHashCode() icall implementation.
29661 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
29663 * icall.c: String::IndexOfAny icall.
29664 * object.c, object.h: make array->max_length more useful.
29665 Intrduced mono_object_class() and mono_string_length() macros.
29667 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29669 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
29670 instead of g_unichar_isdigit.
29672 2002-04-11 Nick Drochak <ndrochak@gol.com>
29674 * icall.c: Implement a simple Double.ToString().
29676 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
29678 * appdomain.h: only io-layer.h is supposed to be included.
29679 * icall.c: explicitly import environ. Fix warning.
29681 2002-04-10 Nick Drochak <ndrochak@gol.com>
29683 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
29684 return true even if it's not Daylight Savings time.
29685 Only return false for the case where the function isn't
29686 implemented for a plaform (read Windows).
29688 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
29690 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
29693 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
29695 * mempool.c (mono_mempool_alloc): only use g_malloc when
29696 absolutely necessary.
29698 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
29700 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
29702 * class.c (mono_class_vtable): use domain mempool to allocate vtable
29703 (mono_class_proxy_vtable): use domain mempool
29705 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
29707 * appdomain.h, appdomain.c: split initialization that requires the
29708 execution engine support into mono_runtime_init().
29710 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
29712 * class.c (mono_class_init): don't include vtable inside MonoClass
29713 to save some memory, gather some statistics.
29714 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
29716 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
29718 * icall.c: internalcall implementation for ValueType.Equals().
29720 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
29722 * object.c (mono_message_init): moved
29723 (mono_runtime_exec_main): new arch. independent impl.
29724 (mono_runtime_invoke_array): new method - like
29725 mono_runtime_invoke, but you can pass an array of objects.
29726 (mono_remoting_invoke): new arch. independent impl.
29727 (mono_message_invoke): new arch. independent impl.
29728 (mono_runtime_class_init): new arch. independent impl.
29729 (mono_runtime_object_init): new arch. independent impl.
29731 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
29733 * metadata.c, object.c, reflection.c: documented the exported
29736 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
29738 * icall.c: simpler code to pass the assembly builder data to corlib.
29739 Implement GetNestedTypes() internalcall.
29741 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
29743 * class.c: warn if a type can't be loaded.
29745 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
29747 * image.h: typedef MonoImageOpenStatus
29748 * types.h: removed unused file
29750 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
29752 * icall.c: Enum_ToObject accepts enum value arguments.
29754 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
29756 * class.c: move initialization of properties, events and nested
29757 classes, so that they happen for interfaces, too.
29759 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
29761 * icall.c: cleanup some ugly casts in Array_SetValue*.
29763 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
29765 * icall.c: the values array fro enums is of the correct type, now.
29766 Implement (correctly) getFullName instead of assQualifiedName for
29768 * reflection.h, reflection.c: added mono_type_get_name ().
29770 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
29772 * assembly.c, image.h: for each MonoImage, record from wich assembly
29774 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
29775 Make Type.Assembly work.
29777 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
29779 * debug-symfile.h: use char* instead of gpointer to avoid
29782 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
29784 * icall.c (ves_icall_InternalExecute): impl. FielSetter
29785 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
29787 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
29789 * icall.c (mono_message_init): impl. (code cleanup)
29790 (ves_icall_InternalExecute): impl. FieldGetter
29792 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
29793 defined we call all (non-static)methods through the vtable.
29795 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
29797 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
29798 finalizer even though the memory is still referenced (and the chunk of
29799 memory is not freed).
29801 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
29803 * assembly.c: fix brokeness.
29805 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
29807 * class.c: kill some warnings. Check explicit interface method
29808 implementation also without considering the namespace.
29809 Load also literal strings in static class data.
29811 2002-03-29 Miguel de Icaza <miguel@ximian.com>
29813 * assembly.c (default_assembly_name_resolver): Kill memory leak.
29814 (default_assembly_name_resolver): Make the resolver take the
29815 "base" directory where the assembly was originally defined, so we
29816 can load DLLs that are in the same directory as the assembly that
29817 is being referenced.
29819 2002-03-28 Dick Porter <dick@ximian.com>
29825 * unicode.c: Warning cleanups
29827 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
29829 * object.h, reflection.h: use the correct type instead of MonoObject.
29831 2002-03-28 Martin Baulig <martin@gnome.org>
29833 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
29834 (mono_debug_update_symbol_file): Initialize classes if necessary.
29836 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
29838 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
29839 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
29841 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
29843 * assembly.h: fix function prototype.
29844 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
29845 * mono-endian.h: use const cast.
29847 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
29849 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
29851 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
29853 * loader.c: don't assert when a typeref can't be loaded, give
29854 a chance to the runtime to trow an exception instead.
29855 * loader.h: fix warning.
29857 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
29859 * class.c (mono_class_proxy_vtable): added proxy support
29861 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
29863 * icall.c: removed last of PAL calls, added System.Environment
29864 * file-io.h, file-io.c: MonoIO implementation
29865 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
29867 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
29869 * appdomain.c: do not use the byte marker in ldstr table lookup.
29870 * debug-helpers.c: allow two ':' to separate class and method name.
29871 * object.c: allocate arrays bounds with the GC, too.
29872 * verify: add a few more checks.
29874 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
29876 * reflection.c: output also literal strings. Allocate parameter data
29877 with GC_malloc() (thanks, Martin, for catching this!).
29879 2002-03-26 Martin Baulig <martin@gnome.org>
29881 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
29882 include the `this' offset in the `param_offsets'.
29884 2002-03-25 Martin Baulig <martin@gnome.org>
29886 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
29887 mono_debug_get_class() function to get the classes. Added new
29888 relocation types for arrays and strings.
29889 (mono_debug_get_class): New static function to search in all
29890 referenced assemblies for a metadata token.
29892 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
29894 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29896 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
29897 hold gc-allocated objects. Make the string heap a stream like the
29898 others. Removed duplicated code when writing stream info.
29899 Added asserts to catch possible buffer overflows. Set the sorted map
29900 for tables that need sorting. Added some documentation.
29902 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
29904 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
29905 for interned strings and vtables.
29907 2002-03-24 Martin Baulig <martin@gnome.org>
29909 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
29910 it in the array since it was created with g_slist_prepend().
29912 2002-03-24 Martin Baulig <martin@gnome.org>
29914 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
29915 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
29916 (mono_debug_method_from_token): Renamed to
29917 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
29918 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
29920 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
29923 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
29925 2002-03-24 Martin Baulig <martin@gnome.org>
29927 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
29928 (mono_debug_method_from_token): New func.
29930 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
29931 New interncall, calls mono_debug_local_type_from_signature().
29932 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
29933 calls mono_debug_method_from_token().
29935 2002-03-23 Martin Baulig <martin@gnome.org>
29937 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
29938 specifies the number of bytes to be converted, not the array size.
29939 Return the number of chars, not the number of bytes.
29940 (ves_icall_iconv_get_chars): The `byteCount' argument
29941 specifies the number of bytes to be converted, not the array size.
29943 2002-03-23 Martin Baulig <martin@gnome.org>
29945 * reflection.h (MonoReflectionSigHelper): New type.
29947 * reflection.c (mono_reflection_sighelper_get_signature_local),
29948 (mono_reflection_sighelper_get_signature_local): New functions.
29950 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
29951 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
29954 2002-03-23 Martin Baulig <martin@gnome.org>
29956 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
29957 is_writeable is set.
29958 (mono_raw_buffer_update): New function to write the modified map
29961 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
29963 * debug-symfile.c (mono_debug_update_symbol_file): Call
29964 mono_raw_buffer_update() when done writing.
29966 2002-03-23 Martin Baulig <martin@gnome.org>
29968 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
29970 * debug-symfile.c: Added support for arguments and local variables.
29972 2002-03-23 Dick Porter <dick@ximian.com>
29974 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
29975 protected by ifdefs, hence breaking the w32 build.
29977 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29979 * object.c: implement is_interned() the right way.
29981 2002-03-21 Martin Baulig <martin@gnome.org>
29983 * debug-symfile.[ch]: New files to handle debugging information
29984 files. There's also support to dynamically update these symbol
29985 files to include machine dependent information.
29987 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
29989 * threads.c (mono_thread_create): new function to create thread
29992 2002-03-20 Martin Baulig <martin@gnome.org>
29994 * icall.c (ves_icall_InternalInvoke): Create a new object if the
29995 method is a constructor.
29996 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
29997 points to ves_icall_InternalInvoke().
29999 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
30001 * file-io.c: Flush shouldn't throw exceptions.
30003 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
30005 * file-io.c: FileStream flush support; FileSetLength now
30006 restores file pointer.
30008 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
30010 * class.c: set image for pointer classes.
30012 2002/03/19 Nick Drochak <ndrochak@gol.com>
30014 * sysmath.c: Forgot one.
30016 2002-03-18 Miguel de Icaza <miguel@ximian.com>
30018 * sysmath.c: Avoid redefining existing names.
30020 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
30022 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
30023 handled by runtime as icall rather than dllimport from libm.so
30024 * file-io.c, file-io.h: fixed handle argument type.
30026 2002-03-18 Dick Porter <dick@ximian.com>
30028 * reflection.c (mono_image_get_type_info): rename interface to
30029 iface, because of "#define interface struct" on windows.
30031 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
30033 * class.c, class.h: rename and export mono_ptr_class_get().
30034 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
30035 * reflection.c, reflection.h, icall.c: better/saner type name
30036 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
30039 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
30041 * class.c (mono_class_init): removed hardcoded GHC_SLOT
30043 * icall.c (ves_icall_InternalInvoke): impl.
30045 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
30047 * reflection.c: output the interface map table, too.
30049 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
30051 * class.c (class_compute_field_layout): separate computation of
30052 static field layout
30054 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
30056 * icall.c: added System.Buffer support.
30057 * file-io.c: moved file icalls from PAL to FileStream.
30059 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
30061 * icall.c (ves_icall_System_Object_GetHashCode): impl.
30063 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
30065 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
30067 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
30069 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
30071 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
30073 * debug-helpers.{c,h}: moved here from monograph some useful functions
30074 to locate a method by name/signature in a class or image. Included
30075 also a small and flexible IL disassembler.
30077 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
30079 * reflection.c: fixup tokens in methods with small header size, too.
30081 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
30083 * object.c (mono_string_to_utf8): remove assert(!error), instead
30086 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
30088 * icall.c: update to the new mono_Array_class_get interface.
30090 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
30092 * appdomain.c, object.c: Boehm-GC enable.
30093 * icall.c: make get_data_chunk() support split data requests.
30094 Ensure a class is initialized in more cases. Return only the first
30095 property found in GetProperties() or the compiler gets confused.
30096 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
30097 * reflection.h, reflection.c: add fixup mechanism for field and method
30098 tokens. Initialize assembly->typeref in a single place. Output
30099 properties after events. Support custom attributes for events, too.
30100 Typo fix for paramter custom attrs.
30102 2002-03-07 Martin Baulig <martin@gnome.org>
30104 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
30106 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
30108 * class.c (mono_array_class_get): fix. for multi. dim. arrays
30110 2002-03-06 Martin Baulig <martin@gnome.org>
30112 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
30113 non-zero lower bounds. See testcases #F10-#F13.
30115 2002-03-05 Martin Baulig <martin@gnome.org>
30117 * exception.c (mono_get_exception_argument_out_of_range): New exception.
30119 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
30120 ves_icall_System_Array_GetValue(), only calculate the absolute array position
30122 (ves_icall_System_Array_SetValue): Likewise.
30123 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
30124 as argument and does the actual work. This function is used when copying a
30125 multi-dimensional array.
30126 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
30127 now do all the widening conversions of value types.
30128 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
30130 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
30132 * class.c: remove some magic numbers and use the smbolic names,
30133 instead. Added init_events() to load event info at class init time.
30134 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
30135 and mono_metadata_methods_from_event().
30136 * reflection.h, reflection.c: added support for writing out the evnets
30137 related information.
30139 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
30141 * reflection.h, icall.c: use a different method (GetInterfaces)
30142 to gather interface info and add isbyref, isprimitive and
30143 ispointer to the ves_icall_get_type_info() return value.
30145 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
30147 * class.h: stared adding support for events.
30148 * icall.c: split find_members implementation. Added debug icall to get
30149 the address of an object.
30150 * reflection.c: handle TypeBuilders in mono_type_get_object().
30152 2002-03-01 Martin Baulig <martin@gnome.org>
30154 * icall.c (ves_icall_System_Array_GetLength): This must throw an
30155 ArgumentOutOfRangeException(), not an ArgumentException().
30156 (ves_icall_System_Array_GetLowerBound): Likewise.
30157 (ves_icall_System_Array_GetValue): Improved argument checking.
30158 (ves_icall_System_Array_SetValue): Improved argument checking.
30160 2002-03-01 Martin Baulig <martin@gnome.org>
30162 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
30163 called with invalid arguments rather than just dying with g_assert().
30164 (ves_icall_System_Array_SetValue): Likewise.
30165 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
30166 raise a NotImplementedException instead.
30167 (ves_icall_System_Array_GetLength): Added argument checking.
30168 (ves_icall_System_Array_GetLowerBound): Added argument checking.
30170 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
30172 * object.h (mono_assert): new macros mono_assert and
30173 mono_assert_not_reached
30175 2002-02-28 Martin Baulig <martin@gnome.org>
30177 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
30178 and "System::String::IsInterned" to "System::String::_IsInterned".
30180 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
30182 * icall.c: remove hacks for typebuilder. Added icall to create a
30183 modified type from a tybebuilder.
30184 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
30185 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
30186 to create a backing MonoClass for a TypeBuilder.
30188 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
30190 * class.c, class.h: more refactoring of class init.
30191 Export mono_class_setup_mono_type() and mono_class_setup_parent().
30193 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
30195 * marshal.c, marshal.h: start of marshaling interface.
30197 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
30199 * icall.c: fix order in assembly qualified name icall.
30201 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
30203 * class.c: do not free str, since we store it in the hash table.
30204 * reflection.h: add label field to MonoILExceptionInfo.
30205 * reflection.c: handle references to more than one assembly. Handle
30206 case when there isn't a module created in the assembly.
30208 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
30210 * class.c: Fix typo. Start refactoring of class init code.
30212 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
30214 * appdomain.c: exit with 1 on error.
30215 * class.c: we already have the name in MonoClassField.
30216 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
30217 MonoStreamHeader instead of an offset of image->raw_metadata.
30219 2002-02-26 Miguel de Icaza <miguel@ximian.com>
30221 * appdomain.c (mono_init): Be even more descriptive about the error.
30223 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
30225 * appdomain.c: give the user an informative message when corlib can't
30228 2002-02-26 Martin Baulig <martin@gnome.org>
30230 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
30231 New icall to get the time zone data.
30233 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
30235 * reflection.c: set virtual and raw size of section correctly.
30236 * threads.c: transfer domain information to newly created threads.
30238 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
30240 * class.c: when instancing a class in a domain, load the default
30241 vaules for static fields from the constant table. Fix System.Enum to
30243 * icall.c: implement Object::GetType() internalcall. Implemented
30244 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
30245 Fixed checking of binding flags in find_members().
30246 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
30247 * reflection.c: handle enumerations when writing to the constant
30248 table. Use a different object cache for types.
30251 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
30253 * object.c (mono_object_isinst): fix for arrays
30255 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
30257 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
30259 * object.c: don't use mprotect () and fix intern pool hash table
30260 lookup for big endian systems.
30262 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
30264 * icall.c: change type_is_subtype_of () signature.
30266 2002-02-21 Mark Crichton <crichton@gimp.org>
30268 * rand.c, rand.h: Added random number generator for
30269 System.Security.Cryptography classes.
30271 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
30273 * icall.c: Added System.Security.Cryptography calls.
30275 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
30277 * class.c, icall.c, metadata.c: better support for pointer types.
30278 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
30279 * reflection.c: Add support for getting custom attrs for properties
30280 and simplify some code.
30282 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
30284 * icall.c: change getToken () and add custom attribute GetBlob()helper
30286 * reflection.h: add custom attrs array to the reflection builder structures.
30287 * reflection.c: encode and emit custom attributes for all the relevant
30288 reflection objects. Cache fieldref and methodref tokens. Change
30289 mono_image_create_token() interface to take a MonoDynamicAssembly.
30290 More complete custom attributes decoder. Load custom attributes for
30291 Assembly, Field, Method and Constructor objects, too. Make the
30292 returned array an Attribute[] one, not object[]. Added
30293 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
30294 custom attribute constructor.
30296 2002-02-20 Dick Porter <dick@ximian.com>
30300 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
30301 problem code out for now).
30303 2002-02-19 Radek Doulik <rodo@ximian.com>
30305 * object.c (mono_ldstr): use hash table to avoid multiple swapping
30307 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
30309 * icall.c: register the GetCustomAttributes method.
30310 * object.c, object.h: add mono_string_new_len ().
30311 * reflection.h, reflection.c: added mono_runtime_invoke(),
30312 mono_install_runtime_invoke(). Added
30313 mono_reflection_get_custom_attrs () to load custom attributes and
30314 create the attribute objects.
30316 2002-02-19 Dick Porter <dick@ximian.com>
30317 * threads-dummy-types.c:
30318 * threads-dummy-types.h:
30321 * threads-pthread-types.c:
30322 * threads-pthread-types.h:
30323 * threads-pthread.c:
30324 * threads-pthread.h: Deleted obsolete files
30326 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
30328 * class.c (mono_class_vtable): runtime init the class when we
30329 allocate static class data.
30331 * icall.c (ves_icall_System_Array_SetValue): check for null values.
30333 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
30334 and String - but we will need generic marshalling support in the
30336 (mono_init): set the domain name in a ms compatible way
30338 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
30341 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
30343 * object.c (mono_array_clone): use alloca() instead of g_malloc
30346 * appdomain.c (mono_domain_unload): impl.
30348 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
30350 * appdomain.c, object.c: fix intern pool implementation.
30351 * class.c: fix alignment code.
30353 2002-02-16 Radek Doulik <rodo@ximian.com>
30355 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
30356 and s2 > s1, just copy lower bytes to be compatible with little
30357 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
30358 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
30360 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
30361 force big_endian to be 1 for big endian machines
30362 (ves_icall_iconv_new_decoder): ditto
30364 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
30366 * socket-io.c (convert_sockopt_level_and_name): If the system
30367 doesn't define SOL_IP or SOL_TCP, get them by hand using
30368 getprotobyname() and caching the values (because this could be a
30370 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
30371 Use the appropriate struct when the system does support it. Ie,
30372 not all systems have struct ip_mreqn so use struct ip_mreq when
30375 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
30377 * reflection.c: handle finally clauses.
30379 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
30381 * socket-io.c: use g_snprintf() instead of snprintf.
30383 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
30385 * reflection.c (mono_param_get_objects): Cast second argument to
30386 mono_method_get_param_names to a const char** to silence the
30389 * appdomain.c (mono_domain_assembly_open): Put parens around the
30390 truth statement in the for-loop.
30392 * unicode.c (iconv_convert): Got rid of a compiler warning about
30393 int i being unused when the system has a new iconv.
30394 (iconv_get_length): Same.
30396 * image.c (load_class_names): Cast the second argument to
30397 g_hash_table_insert() to char* to hush compiler warnings about the
30399 (mono_image_open): Same here.
30401 * socket-io.c: Don't conditionally include sys/filio.h or
30402 sys/sockio.h here anymore since we now get them from
30403 io-layer/io-layer.h
30404 (inet_pton): If the system doesn't support inet_aton, implement
30405 using inet_addr and also #define INADDR_NONE if it isn't defined
30408 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
30410 * metadata.c, metadata.h: added function to get packing and size info
30412 * reflection.h, reflection.c: handle field RVA data. Save info about
30413 the table layout if needed. Assign typedef indexes to all the types
30414 before dumping the info about them to avoid forward reference problems.
30416 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
30418 * socket-io.c (convert_sockopt_level_and_name): ifdef
30419 SO_ACCEPTCONN because it is not defined on my system (old debian)
30421 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
30423 * opcode.c: use stddef.h to get NULL.
30425 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
30427 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
30428 for FIONBIO, FIONREAD and SIOCATMARK.
30429 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
30430 define INADDR_NONE and besides, inet_addr() is deprecated and
30431 should not be used. Use inet_pton() instead - it also has the
30432 added bonus that it can easily handle IPv6 addresses as well.
30433 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
30435 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
30437 * decimal.c: remove _MSC_VER conditional.
30439 2002-02-13 Dick Porter <dick@ximian.com>
30442 * icall.c: Internal calls for Blocking, Select, Shutdown,
30443 GetSocketOption and SetSocketOption
30445 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
30447 * assembly.cs: better resolver: use it instead of some kludgy
30450 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
30452 * reflection.c: the best way to speed-up the compiler is to avoid
30455 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
30457 * class.c (mono_class_vtable): changed the object layout
30458 (obj->vtable->class).
30459 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
30461 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
30463 * assembly.c: look for assemblies in the assembly dir, too.
30465 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
30467 * class.c: fix thinko in mono_class_from_type().
30469 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
30471 * exception.h, exception.c: added TypeLoadException.
30472 * object.h, object.c: added mono_array_clone ().
30473 * icall.c: handle throwOnError in AssemblyGetType().
30474 Added Array.Clone().
30475 * opcode.h, opcode.c: use a single value for the opcode val.
30476 Compile fix for non-gcc compilers.
30478 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
30480 * opcodes.c, opcodes.h: export interesting info about opcodes.
30482 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
30484 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
30487 * class.c (class_compute_field_layout): set element_class for enums
30488 (mono_class_create_from_typedef): set element_class for normal classes
30490 * icall.c (ves_icall_System_Enum_get_value): impl.
30492 * class.c (mono_class_create_from_typedef): do not set valuetype
30493 flag for System.ValueType and System.Enum
30495 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
30497 * unicode.c (iconv_convert): fix big endian problem.
30499 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
30501 * class.c: add asserts if we are ever going to scribble over memory.
30502 * socket-io.c: not all systems have AF_IRDA defined.
30504 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
30506 * class.c (class_compute_field_layout): do not consider static
30507 fields to compute alignment
30509 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
30511 * appdomain.c (mono_appdomain_get): impl.
30512 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
30514 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
30516 * icall.c: ignore "file://" prefix when loading an assembly.
30518 2002-01-23 Dick Porter <dick@ximian.com>
30522 * Makefile.am: Added socket support
30524 2002-01-23 Miguel de Icaza <miguel@ximian.com>
30526 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
30527 code back. This should return the assemblies that are loaded by
30528 the runtime on behalf of an application domain.
30530 The current implementation is still broken, it just returns every
30531 assembly loaded, but until we get real applications domain this
30534 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
30536 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
30539 2002-01-23 Miguel de Icaza <miguel@ximian.com>
30541 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
30542 the mono_class_from_name lookup.
30543 (ves_icall_get_parameter_info): ditto.
30544 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
30546 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
30548 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
30550 * class.c: load also nested classes on class init.
30551 System.ValueType instance methods gets passed boxed
30552 values, unless methods in derived classed that get a pointer to the
30554 * icall.c: use better name parsing code in GetType().
30555 * image.c, image.h: add mono_image_loaded ().
30556 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
30557 * reflection.c, reflection.h: added mono_reflection_parse_type().
30559 2002-01-22 Veronica De Santis <veron78@interfree.it>
30561 * icall.c : Added mapping of internal calls for Manual and Auto reset events
30562 * threads.c : Added the implementation of internal calls for events
30563 * threads.h : Added prototypes of internal calls for events
30565 2002-01-21 Radek Doulik <rodo@ximian.com>
30567 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
30569 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
30571 * class.c (mono_class_init): set min_align to 1 (instead of 0)
30572 (mono_class_value_size): use min_align
30574 2002-01-20 Dick Porter <dick@ximian.com>
30577 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
30578 so it compiles on w32.
30580 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
30582 * metadata.c (mono_type_stack_size): impl.
30584 * class.c (mono_class_get_field): impl. memberref token
30586 2002-01-16 Veronica De Santis <veron78@@interfree.it>
30588 * icall.h : Added the internal calls mapping for CreateMutex_internal
30589 and ReleaseMutex_internal.
30590 * threads.h : Added the prototype of mutexes internal calls.
30591 * threads.c : Added the implementations of mutexes internal calls.
30593 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
30595 * metaparse.h: removed unused file.
30596 * reflection.c, reflection.h: added stream_data_align () function
30597 to align data in streams and keep stream aligned. Add support for
30598 exception support in method headers.
30600 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
30602 * unicode.c: make iconv_convert () return the number of bytess written
30603 in the output buffer.
30605 2002-01-15 Dick Porter <dick@ximian.com>
30606 * threads.c: Make the runtime's idea of infinite timeouts coincide
30607 with the class library's
30609 Fix a particularly egregious bug in mono_thread_cleanup(). That
30610 code was so utterly bogus it must have been written on a Monday.
30612 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
30614 * reflection.h: add subtypes field to TypeBuilder.
30615 * reflection.c: encode constants for literal fields.
30616 Handle subtypes. Fix user string token (and add a zero byte)
30619 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
30621 * class.c (mono_class_init): bug fix: assign slot numbers for
30624 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
30626 * reflection.c: don't try to output a code RVA for abstract methods.
30627 Small fixes for method header format. Output parameter info to the
30628 ParamDef table. Save method overriding info to MethodImpl table.
30629 Fix property support. Allow typedef.extends to be a type in the
30631 * verify.c: fix off-by-one error.
30633 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
30635 * class.c: fix mono_class_from_mono_type () for szarray types.
30636 Remove unused cache check in mono_class_from_type_spec().
30637 * icall.c: *type_from_name () functions handle simple arrays and byref.
30638 * reflection.c: handle byref and szarray types. Handle methods without
30639 body (gets P/Invoke compilation working). Handle types and fields in
30641 * reflection.h: add rank to MonoTypeInfo.
30643 2002-01-10 Dick Porter <dick@ximian.com>
30645 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
30648 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
30650 * icall.c: initialize class in type_from_handle ().
30651 Loop also in parent classes for get_method ().
30652 * reflection.c: properly encode class and valuetype types.
30653 Start on encoding TypeBuilder types. Handle fieldrefs.
30654 Use correct length when registering a user string.
30655 Handle ConstructorBuilder and MonoMethod in get_token ().
30656 Make mono_type_get_object () aware of cached types.
30657 * object.c: back out change to mono_string_new ().
30659 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
30660 * object.c: mono_string_new should return a NULL when the string
30661 passed in is NULL -- not try to deference it.
30663 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
30665 * icall.c: hack to make IsSubType work for TypeBuilders.
30666 * reflection.c: emit constructors before methods.
30667 Retrieve param names in mono_param_get_objects().
30669 2002/01/05 Nick Drochak <ndrochak@gol.com>
30671 * Makefile.am: fix list of headers and sources so automake 1.5
30672 doesn't complain. Removed \# at end of list.
30674 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
30676 * reflection.c: get token for a method ref. Set return type of
30677 constructor to void.
30678 * loader.c: debug message.
30679 * class.c: typo fix.
30681 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
30683 * icall.c: fix array init with rank > 1. FindMembers
30684 loops in parent class as well.
30685 * image.c: do not insert nested types in name cache.
30686 * reflection.c: warning fix.
30687 * reflection.h: add override method (for interface impl).
30689 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
30691 * metadata.c: fix customattr decoding.
30693 2001-12-21 Miguel de Icaza <miguel@ximian.com>
30695 * rawbuffer.cs: Added native Win32 implementation, avoids using
30696 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
30698 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
30700 * class.c: make the low-level routines handle the cache.
30702 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
30704 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
30706 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
30708 * class.c: fix mono_array_element_size() for objects.
30709 * class.h, class.c: add properties to MonoClass and load them
30711 * icall.c: check with isinst() when assigning a value to an array
30712 instead of requiring the classes to match exactly.
30713 Implemented icall for System.Type::GetType().
30714 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
30715 enums. Handle bindingflags when looking for methods and fields.
30716 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
30717 and mono_metadata_methods_from_property().
30718 * reflection.h, reflection.c: added structures for propreties,
30719 parameters and enums. Implemented mono_property_get_object() and
30720 mono_param_get_objects().
30722 2001-12-18 Dick Porter <dick@ximian.com>
30724 * file-io.c: Use mono_string_to_utf16() instead of
30725 mono_string_chars()
30727 * object.c: Added mono_string_to_utf16(), which copies the non
30728 NULL-terminated MonoString into a new double-null-terminated
30731 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
30733 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
30735 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
30737 * file-io.c: raise exceptions if handle is invalid.
30739 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
30741 * assembly.c: yet another check for mscorlib.
30742 * class.c, class.h: load nesting info for classes.
30743 * icall.c: many new functions to support the Reflection classes.
30744 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
30745 * reflection.h, reflection.c: mono_image_create_token(),
30746 mono_assembly_get_object(), mono_type_get_object(),
30747 mono_method_get_object(), mono_field_get_object(): methods to return
30748 objects that parallel the C representation of assemblies, types,
30751 2001-12-11 Dick Porter <dick@ximian.com>
30754 * file-io.c: Internal calls for file IO.
30756 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
30758 * tabledefs.h: missing FileAttributes.
30759 * verify.h, verify.c: use is_valid_string () to simplify and check for
30760 valid strings more correctly. Fix warnings and speeling.
30761 Check more tables: Filed, File, ModuleRef, StandAloneSig.
30762 Check code: branches, maxstack, method calls.
30764 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
30766 * object.c (mono_object_allocate): removed static, so that the jit
30767 can allocate value types.
30769 * icall.c (ves_icall_System_DateTime_GetNow): impl.
30771 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
30773 * class.c: init enum types right away and register the
30774 token->MonoClass map in mono_class_create_from_typedef ().
30775 * verify.h, verify.c: first cut of the verifier.
30776 * pedump.c: add --verify switch to verify metadata tables.
30777 * tabledefs.h: add some missing enums.
30779 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
30781 * class.c (mono_install_runtime_class_init): impl.
30782 (mono_class_init): renamed mono_class_metadata_init to
30783 mono_class_init, also removed the metadata_inited flag
30785 * object.c (mono_object_isinst): use faster algorithm
30787 2001-11-30 Radek Doulik <rodo@ximian.com>
30789 * mono-endian.h: reverted last change
30790 added function prototypes
30792 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
30793 add mono-endian.c back
30795 * mono-endian.c: returned back, as Paolo pointed out, it's needed
30796 for unaligned access, I've mistaked it with endianess. I am
30798 (mono_read16): fix reverted endianess
30799 (mono_read64): ditto
30800 (mono_read32): ditto
30802 2001-11-30 Dick Porter <dick@ximian.com>
30804 * exception.c: Implement mono_exception_from_name()
30806 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
30808 * metadata.h, metadata.c: remove params_size and locals_size and their
30809 calculation from the metadata code: they are only usefult to the
30812 2001-11-29 Radek Doulik <rodo@ximian.com>
30814 * object.c (mono_ldstr): swap bytes here, it's probably not the
30815 best place, but works for me now, I'll redo it once I know mono
30816 better, also note that I add PROT_WRITE and don't reset back, also
30817 note that it's only affects big endians, so x86 should be OK
30819 * mono-endian.h (read16): use just glib macros for both endians
30821 * mono-endian.c: removed as glib macros are used in in
30822 mono-endian.h so we don't need to care about endianess for read
30823 macros as glib does that for us already
30825 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
30827 * class.h, class.h: take minimum alignment into consideration so
30828 that the fields of a class remain aligned also when in an array.
30830 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
30832 * loader.h, loader.c: add mono_method_get_param_names().
30833 * class.c: 0-init class fields.
30835 2001-11-26 Dick Porter <dick@ximian.com>
30839 * threads.c: New file that handles System.Threading on all platforms
30842 * object.h: Remove the synchronisation struct from MonoObject,
30843 replace it with a pointer that gets initialised on demand
30845 * Makefile.am: Replace all the system-specific threading code with
30846 a single file that uses the new wrapper library
30848 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
30850 * class.c, class.h: add mono_install_trampoline() so that the runtime
30851 can register a function to create a trampoline: removes the ugly
30852 requirement that a runtime needed to export arch_create_jit_trampoline.
30853 * object.h, object.c: added mono_install_handler() so that the runtime
30854 can install an handler for exceptions generated in C code (with
30855 mono_raise_exception()). Added C struct for System.Delegate.
30856 * pedump.c: removed arch_create_jit_trampoline.
30857 * reflection.c: some cleanups to allow registering user strings and
30858 later getting a token for methodrefs and fieldrefs before the assembly
30860 * row-indexes.h: updates and fixes from the new ECMA specs.
30862 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
30864 * class.h, class.c: add enum_basetype field to MonoClass.
30865 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
30866 to get index in the constant table reated to a field, param or
30868 * reflection.h, reflection.c: handle constructors. Set public-key and
30869 version number of the built assembly to 0.
30870 * row-indexes.h: update from new ECMA spec.
30872 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
30874 * class.h, class.c: add a max_interface_id to MonoClass.
30875 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
30876 since it's used to do that. Added mono_type_type_from_obj().
30877 Make GetType() return NULL instead of segfaulting if the type was not
30878 found. Handle simple arrays in assQualifiedName.
30879 * object.h: add a struct to represent an Exception.
30880 * reflection.c: output call convention in method signature.
30881 Add code to support P/Invoke methods and fixed offsets for fields.
30883 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
30885 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
30887 * icall.c: use mono_array_addr instead of array->vector: fixes the
30888 reflection image writing.
30889 * reflection.c: init call convention byte to 0 in method signature.
30890 Encode the property signature. Don't output property-related methods
30891 twice. Really process the properties for a type (don't cast a field to
30892 a property, my mom always told me that).
30893 Fix 64 bit issues in pointer alignment in a different and more
30896 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
30898 * loader.h: Removed type class from MonoDefaults, added monotype
30900 * loader.c: Loaded MonoType, removed loading of Type
30902 * icall.c (my_mono_new_object): Now returns a System.MonoType,
30903 and fills in System.Type._impl with a RuntimeTypeHandle rather
30904 than the actual MonoClass *
30906 (ves_icall_type_from_handle): change from type_class to
30909 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
30912 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
30915 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
30917 (ves_icall_System_Reflection_Assembly_GetType): implemented
30919 (ves_icall_System_MonoType_assQualifiedName): implemented
30921 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
30923 2001-11-09 Miguel de Icaza <miguel@ximian.com>
30925 * assembly.c (mono_assembly_open): Implement a cache for the
30928 (mono_assembly_close): only destroy the assembly when the last
30931 2001-11-09 Dick Porter <dick@ximian.com>
30933 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
30935 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
30937 * class.c (mono_class_metadata_init): bug fix: compute the right slot
30939 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
30941 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
30942 from Martin Weindel.
30943 * object.h: add mono_string_chars ().
30945 2001-11-07 Miguel de Icaza <miguel@ximian.com>
30947 * reflection.c (build_compressed_metadata): Eliminates warnings
30948 and uses 64-bit clean code.
30950 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
30951 (mono_type_equal): Change signature to eliminate warnings.
30953 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
30955 * icall.c, loader.c: remove the internalcall array constructors.
30956 Changes to match the new MonoArray structure.
30957 * object.h, object.c: an array object doesn't allocate an extra
30958 vector. Add mono_array_new_full () to create jagged arrays easily.
30960 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
30962 * metadata.h, metadata.c: add mono_metadata_field_info () to
30963 retreive all the info about a field from vairous tables.
30964 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
30965 * class.h, class.c: augment MonoClassField with more info.
30966 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
30967 policy and load a field's RVA if needed.
30969 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
30971 * class.c (mono_class_metadata_init): create a trampoline for all
30972 virtual functions instead of actually compiling them.
30974 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
30976 * class.h, class.c: include name in MonoClassField.
30977 * class.c: fix fundamental type of System.Object and System.String.
30978 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
30980 * icall.c: remove internalcalls for the Reflection stuff that is now
30982 * loader.c: mono_field_from_memberref () implementation.
30983 * mono-endian.c: thinko (s/struct/union/g).
30984 * object.c, object.h: make the mono_string_* prototypes actually use
30985 MonoString instead of MonoObject.
30986 * reflection.c, reflection.h: updates for changes in the reflection
30987 code in corlib: we use C structures that map to the actual C# classes.
30988 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
30989 fat method header if needed and use the info from the ILGenerator for
30990 methods. Handle fields in types. Misc fixes.
30992 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
30994 * class.c (mono_class_metadata_init): bug fix: always allocate
30995 space for static class data
30997 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
30999 * class.c (mono_compute_relative_numbering): use relative
31000 numbering to support fast runtime type checks.
31002 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
31004 * class.c (mono_class_create_from_typeref): added debugging output
31005 to print class name when MonoDummy is returned instead of real class
31007 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
31009 * class.c (mono_class_metadata_init): interface offset table now
31010 contains pointers into the vtable - this is more efficient for the jit
31012 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
31014 * class.c (mono_class_metadata_init): use a temporary vtable (the
31015 old algorithm only worked for the interpreter, but not for the jit)
31017 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
31019 * loader.c (method_from_memberref): use mono_class_get to get the
31020 class of an array instead of using System.Array directly.
31021 (mono_get_method): also add MEMBERREF methods to the method cache
31022 which usefull for arrays.
31024 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
31026 * pedump.c (arch_compile_method): added to compute vtable entry
31028 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
31029 number of interfaces.
31031 * class.h: merged MonoArrayClass into MonoClass
31033 * class.c (mono_class_create_from_typedef): compute the vtable size and
31034 allocate space to include the vtable inside MonoClass
31035 (mono_class_metadata_init): initialize the vtable
31037 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
31039 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
31040 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
31041 * image.c: endian fixes by Laurent Rioux.
31042 * object.h, object.c: rename MonoStringObject to MonoString and
31043 MonoArrayObject to MonoArray. Change some function names to conform to
31044 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
31045 guint16* as first argument, so don't use char*.
31046 Provide macros to do the interesting things on arrays in a portable way.
31047 * threads-pthread.c: updates for the API changes and #include <sched.h>
31048 (required for sched_yield()).
31049 * icall.c: updates for the API changes above.
31050 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
31051 platforms that need them.
31053 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
31055 * class.c: set the correct type for all the fundamental
31056 type when loading the class.
31058 2001-10-05 Dick Porter <dick@ximian.com>
31060 * threads-pthread.c (pthread_mutex_timedlock): Simple
31061 compatibility version for C libraries that lack this call.
31063 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
31065 * class.c: MonoTypes stored in MonoClass are stored as
31066 fundamental MonoTypes when the class represents a
31067 fundamental type (System.Int32, ...).
31068 The TypeHandle return by ldtoken is a MonoType*.
31069 * icall.c: ves_icall_get_data_chunk () write out all the
31070 PE/COFF stuff. Implement ves_icall_define_method (),
31071 ves_icall_set_method_body (), ves_icall_type_from_handle ().
31072 * image.c: properly skip unknown streams.
31073 * loader.h, loader.c: add type_class to mono_defaults.
31074 * metadata.c, metadata.h: export compute_size () as
31075 mono_metadata_compute_size () with a better interface.
31076 Typo and C&P fixes.
31077 * pedump.c: don't try to print the entry point RVA if there is no entry point.
31078 * reflection.c, reflection.h: many cleanups, fixes, output method
31079 signatures and headers, typedef and typeref info, compress the metadata
31080 tables, output all the heap streams, cli header etc.
31081 * row-indexes.h: typo fixes.
31083 2001-10-04 Dick Porter <dick@ximian.com>
31085 * object.h: Add a synchronisation mutex struct to MonoObject
31087 * object.c (mono_new_object): Initialise the object
31088 synchronisation mutexes
31090 * icall.c: System.Threading.Monitor internal calls
31092 * threads-pthread.h:
31093 * threads-pthread.c: System.Threading.Monitor internal calls
31095 * threads-types.h: New file, includes the system-specific thread
31098 * threads-pthread-types.h:
31099 * threads-pthread-types.c: New files, handle pthread-specific
31100 synchronisation types
31102 * threads-dummy-types.h:
31103 * threads-dummy-types.c: New files of dummy support for
31104 thread-specific types
31108 * pedump.c: include mono-endian.h not endian.h
31110 * Makefile.am: More threads files.
31111 Name mono-endian.h not endian.h
31113 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
31115 * Makefile.am, reflection.h, reflection.c: move here the reflection related
31116 stuff and implement a few more bits.
31117 * icall.c: a field needs to be dereferenced twice. Do not use the same
31118 name for two variables in the same scope.
31119 * image.c, image.h: cleanups.
31121 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
31123 * class.c (mono_class_metadata_init): bug fix: compute the right size
31125 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
31127 * icall.c: implemented some of the Reflection internalcalls.
31128 * image.c, image.h: start writing out the PE/COFF image.
31129 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
31130 that does the reverse than decode_blob_size ().
31131 * object.c: use mono_metadata_encode_value (). Move here
31132 temporary implementation of mono_string_to_utf8 ().
31133 * rawbuffer.c: make malloc_map static.
31135 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
31137 * metadata.c: fix type comparison for arrays.
31138 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
31139 Added a couple of new classes to monodefaults.
31140 * icall.c: added a couple of Reflection-related internalcalls.
31141 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
31142 Added a byval_arg MonoType to MonoClass.
31144 2001-09-28 Dick Porter <dick@ximian.com>
31147 * threads-pthread.h:
31148 * threads-pthread.c: Implemented internal calls for
31149 LocalDataStoreSlot operations. Applied mutexes around all shared
31150 data. Reworked the thread creation and Start() operations to
31151 avoid a race condition.
31154 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
31156 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
31158 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
31160 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
31162 * class.c, loader.c: warn and return NULL instead of erroring out.
31163 * icall.c: added System.AppDomain::getCurDomain().
31164 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
31166 2001-09-25 Dick Porter <dick@ximian.com>
31168 * threads-pthread.h:
31169 * threads-pthread.c: Implemented timed thread joining and added
31170 System.Threading.Thread::Join_internal internal call
31172 * icall.c: Added System.Threading.Thread::Join_internal internal call
31175 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
31177 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
31179 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
31180 mono_string_intern () to implement the semantics of the ldstr opcode
31181 and the interning of System.Strings.
31182 * icall.c: provide hooks to make String::IsIntern and String::Intern
31185 2001-09-23 Dick Porter <dick@ximian.com>
31188 * threads-dummy.h: New files of dummy threading routines
31190 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
31191 support code based on system specifics
31193 Rename PTHREAD_LIBS to THREAD_LIBS
31195 2001-09-23 Dick Porter <dick@ximian.com>
31197 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
31198 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
31200 (mono_thread_init): Set up a Thread object instance to return when
31201 the main thread calls Thread.CurrentThread
31202 (mono_thread_cleanup): Wait for all subthreads to exit
31204 * icall.c: New internal calls for System.Threading.Thread::Sleep
31205 (including Schedule) and CurrentThread
31207 * threads.h: New file, to insulate thread-specific stuff from the
31210 2001-09-21 Dick Porter <dick@ximian.com>
31212 * threads-pthread.h:
31213 * threads-pthread.c: New file, for handling pthreads-style
31214 threading support. Start() now starts a new thread and executes
31215 the ThreadStart delegate instance.
31217 * icall.c: Added the internalcall for
31218 System.Threading.Thread::Start_internal
31220 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
31222 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
31224 * loader.c: work around the different signatures for delegates
31225 constructors csc generates in compiled code vs the ones compiled in mscorlib.
31227 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
31229 * class.h, class.c: add mono_class_get_field_from_name ().
31230 * *: Fix C comments and other ANSI C issues.
31232 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
31234 * endian.h, assembly.c: fix some endianness issues.
31236 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
31238 * loader.h, load.c: add delegate_class to mono_defaults.
31239 Handle runtime provided methods in mono_get_method ().
31241 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
31243 * loader.c (mono_get_method): use pinvoke for internal call
31245 * icall.c: use pinvoke for internal call
31247 * loader.c (method_from_memberref): set the method name
31249 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
31251 * metadata.c: help the compiler generate better code for
31252 mono_class_from_mono_type ().
31254 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
31256 * class.c (mono_class_metadata_init): delayed computing of the
31257 class size to mono_class_metadata_init ()
31259 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
31261 * class.c, class.h: add an interfaces member to MonoClass.
31262 * image.c, image.h: add assembly_name field to MonoImage
31263 from the assembly table.
31264 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
31266 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
31268 * class.c: Handle Array in mono_class_from_mono_type ().
31269 * metadata.c, pedump.c: some endian fixes.
31271 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
31273 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
31274 * metadata.c: fix small problem introduced with the latest commit.
31276 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
31278 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
31279 We don't need a MonoMetadata pointer anymore to compare signatures in
31280 mono_metadata_signature_equal (), update callers.
31281 Reduced memory usage an number of allocations for MonoMethodHeader and
31282 MonoMethodSignature.
31284 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
31286 * metadata.c: added compare for szarray.
31288 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
31290 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
31291 and add a couple more types to it and mono_defaults. Give an hint on
31292 classes that need implementing in our corlib and are referenced
31295 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
31297 * class.h, class.c: keep track if a class is also an Enum.
31298 * loader.c: Implement a couple more types for use in libffi
31299 marshalling. Gives better diagnostics when failing to dlopen
31300 a library. Set method->klass for P/Invoke methods, too.
31302 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
31304 * class.c, class.h: add a MonoType this_arg to MonoClass that
31305 represents a pointer to an object of the class' type that
31306 can be used by the interpreter and later the type cache.
31307 Add best guess alignment info for valuetype objects.
31309 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
31311 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
31312 into MonoType: one less level of indirection and allocation and
31313 simplifies quite a bit of code. Added cache for MonoTypes that are
31314 used frequently, so that we don't need to allocate them all the time.
31316 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
31318 * class.c (mono_class_create_from_typedef): System.Enum is also a
31319 value type, although it does not derive from System.ValueType
31320 (maybe a bug in the ms compiler?)
31322 * metadata.c (mono_type_size): return the right size for value types
31324 * loader.c (mono_get_method): only initialize method header if not abstract
31326 * class.c (mono_class_from_mono_type): use mono_default values.
31328 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
31330 * *: use MonoClass pointers instead of <type_tokens>
31332 * class.h: new flag: metadata_inited.
31334 * class.c (mono_class_metadata_init): impl.
31335 (mono_class_instance_size): impl.
31336 (mono_class_data_size): impl.
31338 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
31340 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
31341 MonoClass now has the name and name_space fields.
31342 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
31343 mono_get_method () takes and optional MonoClass as argument.
31344 Removed mono_typedef_from_name() and added mono_class_token_from_name()
31345 instead that takes advantage of a map from class names to typedef
31346 tokens in MonoImage.
31348 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
31350 * metadata.c: zero is not a valid alignment boundary.
31351 Merge MONO_TYPE_VOID in default decoding code.
31353 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
31355 * image.h: merged MonoMetadata into MonoImage
31357 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
31358 identify the type of elements.
31360 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
31362 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
31363 * cil-coff.h: split MonoMSDOSHeader and add size info.
31364 * image.c: add some consistency checks.
31365 * metadata.c: fix row size computation: one programmer
31366 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
31367 add explanation for the locator routine.
31368 Fix decoding of size in method header.
31370 2001-08-20 Miguel de Icaza <miguel@ximian.com>
31372 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
31373 (g_concat_dir_and_file): Bring g_concat_dir_and_file
31374 function from gnome-libs. This uses the right path separator
31375 based on the OS, and also works around a bug in some systems where
31376 a double slash is not allowed.
31377 (default_assembly_name_resolver): Use g_concat_dir_and_file
31378 (mono_assembly_open): ditto.
31380 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
31382 * metadata.c (mono_metadata_signature_equal): impl.
31384 * *: void is now a realy MonoType (instead of using NULL)
31386 * metadata.c (do_mono_metadata_parse_type): use
31387 mono_metadata_parse_type to parse void value.
31389 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
31391 * metadata.c, metadata.h: in the signature and method header store
31392 only the space required for holding the loca vars and incoming arguments.
31394 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
31396 * metadata.c (do_mono_metadata_parse_type): treat void like any
31397 other type (instead of assigning NULL);
31399 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
31401 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
31403 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
31405 * image.c (do_mono_image_open): added a cache for arrays.
31407 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
31409 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
31410 decode a single column from a row in a metadata table and changes
31411 to take advantage of it in the typedef locator (gives a nice speed up).
31412 Store offset info for function params.
31414 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
31416 * image.h (MONO_IMAGE_IS_CORLIB): removed
31418 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
31420 * assembly.c: how could mono_assembly_close () had ever worked?
31421 * metadata.c, metadata.h: provide offset info for local vars.
31422 Implement mono_type_size () to take care of alignment as well
31423 as size (it was mono_field_type_size in cli/class.c before).
31425 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
31427 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
31429 * assembly.h (CORLIB_NAME): set to corlib.dll
31431 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
31433 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
31435 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
31436 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
31437 tokentype.h: massive namespace cleanup.
31439 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
31441 * metadata.h, metadata.c: decode exception clauses when parsing method header.
31443 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
31445 * metadata.c (mono_metadata_free_type): added check for type !=
31446 NULL (void) before calling mono_metadata_free_type()
31448 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
31450 * metadata.h, row_indexes.h: added header with enumerations to use
31451 to index in the columns from tables in metadata and to decode coded
31452 tokens: we should start using this instead of embedding magic numbers
31455 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
31457 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
31458 Move metadata_t info from cli_image_info_t to MonoImage, where
31459 it's easily accessible. Changed all the uses accordingly.
31460 Added the method and class caches to MonoImage.
31461 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
31462 and mono_metadata_decode_value () signature to be more consistent
31463 with the other parse functions (and simplify code). Taken advantage
31464 of zero-length array allocation with GCC. Removed reduntant (and
31465 wrong) MonoFieldType struct and use MonoParam instead. Changed
31466 mono_metadata_parse_field_type () to use common code for parsing.
31467 Added mono_metadata_typedef_from_field () and
31468 mono_metadata_typedef_from_method () to lookup a typedef index from a
31469 field or method token.
31470 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
31472 2001-07-23 Miguel de Icaza <miguel@ximian.com>
31474 * metadata.c (mono_metadata_parse_field_type): Implement.
31475 (do_mono_metadata_parse_type): Split engine from
31476 mono_metadata_parse_type, so that we can create smaller structures
31477 for things that just have one pointer to the MonoType (look at
31480 2001-07-20 Miguel de Icaza <miguel@ximian.com>
31482 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
31483 as Jan Gray found out, it is incorrect.
31485 2001-07-18 Miguel de Icaza <miguel@ximian.com>
31487 * assembly.c: Implement asssembly loading. This loads an image
31488 and loads all the referenced assemblies. Come to think of it, we
31489 could always do lazy loading of the assemblies.
31491 * image.c (mono_image_open): Keep loaded images in a hashtable.
31493 * image.h (MonoImage): Add reference count.
31495 2001-07-17 Miguel de Icaza <miguel@ximian.com>
31497 * assembly.c (mono_assembly_open): Keep track of the file name in
31498 case the assembly has no ASSEMBLY table.
31500 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
31503 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
31505 * metadata.c, metadata.h: decode local vars in method header
31506 parse function. Change callers accordingly.
31508 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
31510 * metadata.h, cil-coff.h: protect against multiple inclusion.
31511 Added some new structures to hold information decoded from metadata:
31512 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
31513 and relevant decoding/free functions.
31514 * metadata.c: implement decoding functions. Add warning for out of bounds
31515 index in mono_metadata_locate(). Implement mono_get_method () to retreive
31516 all the info about a method signature and invocation. Remove check on
31517 uninitialized local var in parse_mh() and fix memory leak.
31519 2001-07-12 Miguel de Icaza <miguel@ximian.com>
31521 * metadata.h: More macros.
31523 * tokentype.h: New file.
31525 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
31527 * assembly.c: added a consistency check and initialize
31528 some structures with g_new0().
31529 * metadata.c: fixed a couple more bugs in table size computation
31530 and add other checks for out-of bound access to metadata.
31532 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
31534 * metatada.c: fix bugs computing table sizes. Spew a
31535 warning when index in string heap is out of bounds.
31537 2001-07-04 Miguel de Icaza <miguel@ximian.com>
31539 * metadata.h: Add a couple of macros to manipulate tokens.
31541 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
31543 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
31544 cli_section_tables).
31546 2001-07-01 Miguel de Icaza <miguel@ximian.com>
31548 * metadata.c (mono_metadata_user_string): New function, provides
31549 access to the UserString heap.
31551 2001-06-27 Miguel de Icaza <miguel@ximian.com>
31553 * metadata.c: Add inline documentation.
31555 2001-06-26 Miguel de Icaza <miguel@ximian.com>
31557 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
31560 2001-06-22 Miguel de Icaza <miguel@ximian.com>
31562 * typeattr.h: New file, TypeAttribute flags.
31564 2001-06-21 Miguel de Icaza <miguel@ximian.com>
31566 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
31567 mono_assembly_ensure_section): Section loading code.
31568 (load_section_tables): Load the sections.
31570 * mono/metadata/metadata.c (mono_metadata_locate_token,
31571 mono_metadata_locate): Functions to locate the information
31572 definition given a token or a table and an index.
31573 (mono_metadata_compute_table_bases): New.
31574 (compute_size): New function to compute the sizes of the various
31577 * mono/metadata/metadata.h: Finish listing the different index
31580 * mono/metadata/pedump.c: Improve to dump new information.
31582 2001-06-19 Miguel de Icaza <miguel@ximian.com>
31584 * mono/metadata/metadata.c: Entered all the tables matching
31587 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2