1 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3 * verify.c (verify_class_fields): Check for duplicate fields.
5 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
7 * metadata-verify.c: Verify the typeref table for duplicates.
9 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
11 This reverts r140936 and properly handles interfaces with static methods. The
12 right fix is to ensure vtables without bubles which is an easier to verify
13 constraint. We should avoid such special cases as of the reverted patch as those
14 only make the runtime more brittle.
16 * class.c (mono_class_setup_vtable_general): Revert previous change that handle
17 static methods on interfaces.
19 * class.c (setup_interface_offsets): Use the number of virtual methods when
20 calculating interface offsets instead of the number of methods. This way we
21 avoid bubles on the layout.
23 2009-08-31 Rodrigo Kumpera <rkumpera@novell.com>
25 * metadata-verify.c (verify_metadata_header): Some very smart
26 obfuscators like to add extra stream headers. Ignore them.
28 2009-08-30 Zoltan Varga <vargaz@gmail.com>
30 * class.c (mono_class_setup_vtable_general): Verify interfaces with static
33 2009-08-29 Rodrigo Kumpera <rkumpera@novell.com>
35 * metadata-verify.c: Verify for duplicated types.
37 2009-08-28 Rodrigo Kumpera <rkumpera@novell.com>
39 * metadata-verify.c (verify_typedef_table): Verify for nested types
40 without an entry on the nested class table.
42 2009-08-28 Zoltan Varga <vargaz@gmail.com>
44 * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
45 <tom_hindle@sil.org>. Add locking around hash table accesses.
47 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
49 * verify.c (mono_verifier_verify_class): Verify all interface if
50 really are interfaces. Fixes #534184.
52 2009-08-27 Rodrigo Kumpera <rkumpera@novell.com>
54 * pedump.c: Initialize all types during metadata validation so we report
55 errors only detected as part of class initialization.
57 2009-08-26 Rodrigo Kumpera <rkumpera@novell.com>
59 * metadata-verify.c (verify_method_table): PInvoke requires method to
60 be static. Fixes #534189
62 2009-08-26 Zoltan Varga <vargaz@gmail.com>
64 * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
67 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
69 * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
70 for holes or bad methods. Fixes #525314.
72 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
74 * class.c (setup_interface_offsets): Don't allocate slot
75 for the same interface multiple times. This creates bubbles
76 that waster space and make vtable verification harder.
78 The same interface get a slot multiple times since we need
79 to get the closure of all implemented interfaces, which means
80 the same interface is reported multiple times.
82 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
84 * verify.c (mono_verifier_verify_class): Don't check the fields
85 of generic instances since the context on which they got expanded
86 might lead to false positives.
88 Such thing happens when a generic type is inflated in the context
89 of a generic method and the inflated type of a field turns into a
90 generic method argument, which causes the checking code to think
91 it's an invalid class when it's not.
93 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
95 * verify.c (mono_type_is_valid_in_context): Verify if type
96 is NULL and remove duplicate test.
98 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
100 * verify.c (mono_verifier_verify_class): Check fields for
101 invalid generic arguments.
103 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
105 * class.c (verify_class_overrides): Verify if for static
106 and non virtual methods.
108 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
110 * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
111 Check for errors after retrieving the vtable.
113 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
115 * class.c (mono_class_setup_vtable_general): Verify
116 if method overrides are valid before processing them.
118 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
120 * marshal.c (mono_array_to_lparray): Fix minimal build with
123 * marshal.c (mono_free_lparray): Same.
125 2009-08-21 Mark Probst <mark.probst@gmail.com>
127 * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
128 the hash function for the ares_htable.
130 2009-08-20 Rodrigo Kumpera <rkumpera@novell.com>
132 * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
133 bit for assembly flags. MS is ok with it but there is no spec anywhere
136 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
138 * class.c (mono_class_create_from_typedef): Emit profiler events
141 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
143 * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
144 Release memory on failure.
146 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
148 * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
151 * metadata.c (get_constraints): Use a single-linked table as we don't
152 traverse it backward. Fail and return FALSE if only of the contraint types
155 * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
156 to mono_metadata_load_generic_param_constraints except for having a return value.
157 This has to be done since the later is part of the public API.
159 * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
162 * loader.c (mono_get_method_from_token): Properly check the loading of constraints
165 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
167 * metadata-verify.c (is_valid_method_header): Add work-around to deal
168 with MS broken behavior of emmitting EH section sizes without the
171 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
173 * metadata.c (mono_type_create_from_typespec): Don't allocate image
174 memory until we're sure that we'll need it. This avoids leaking for
175 broken types or duplicated instantiation.
177 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
179 * metadata-verify.c (is_valid_method_header): Fix stupid formating
182 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
184 * metadata-verify.c (is_valid_method_header): Fix number of clauses
185 and expected size calculation.
187 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
189 * class.c (mono_class_get_field_idx): Add fixme for broken
190 behavior for types with multiple fields with the same name.
191 I would rather fix it, but have no idea on how to generate
192 such artifact for testing.
194 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
196 * verify.c (verifier_load_field): We should allow references to
197 fields to be made using the generic type definition. It's up to
198 the loader system to fail invalid ops.
200 * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
203 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
205 * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
207 * metadata-internals.h: Fix declaration of
208 mono_metadata_interfaces_from_typedef_full.
210 * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
211 heap_alloc_result parameter that controls if the result should be
214 * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
215 array be g_malloc'd and properly document this public API function.
217 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
219 * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
220 remove METHOD_HEADER_TINY_FORMAT1.
222 * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
224 * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
226 Both spec and MS uses only 2 bits to enumerate the kind of header.
227 So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
228 is superfluous, only used for tiny headers with odd code lengths.
230 This change also make sure that mono doesn't wronly interpret bit 2
231 of fat header flags, which is currently reserved.
233 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
235 * metadata.c (do_mono_metadata_parse_type): Do error
236 checking for element types. Don't abort if presented
237 with a broken type kind.
239 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
241 * metadata.c (mono_metadata_parse_method_signature_full):
242 Gracefully fail bad vararg signatures.
244 2009-08-18 Christian Hergert <chris@dronelabs.com>
247 * class.c: Fix warnings for uninitialized variables.
249 2009-08-18 Christian Hergert <chris@dronelabs.com>
251 * icall.c: Fix _NSGetEnviron method declaration warning.
253 2009-08-18 Christian Hergert <chris@dronelabs.com>
256 * reflection.c: Make bitwise checks explicit.
258 2009-08-18 Christian Hergert <chris@dronelabs.com>
261 * marshal.c: Fix printf warnings.
263 2009-08-18 Zoltan Varga <vargaz@gmail.com>
265 * reflection.c (encode_cattr_value): Fix a warning.
267 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
269 * metadata.c (mono_metadata_parse_array_full): Fix memory leak
272 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
274 * loader.c (mono_method_signature): Don't assert on broken
275 signature. Print a more useful error message.
277 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
279 * loader.c (mono_method_get_marshal_info): Assert if
280 signature is invalid. Bounds check stores to the
283 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
285 * loader.c (field_from_memberref): Fix warning.
287 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
289 * loader.c (mono_method_get_param_names): Check if signature
290 is null. Don't store beyond the size of the name array.
292 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
294 * loader.c (mono_get_method_constrained): Check if signature
297 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
299 * loader.c (mono_loader_set_error_bad_image): Improve
302 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
304 * loader.c (mono_get_method_full): Convert an assertion
307 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
309 * class-internals.h, class.c: Better naming and documentation.
311 2009-08-17 Zoltan Varga <vargaz@gmail.com>
313 * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
316 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
318 * loader.c (mono_method_get_signature_full): Fail gracefully if signature
321 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
323 * loader.c (mono_loader_error_prepare_exception): Handle missing field
324 errors with no class set.
326 * loader.c (field_from_memberref): If the field signature is of the wrong
327 type fail with a MissingFieldException instead of a BadImageException as
328 this is the behavior observed on MS.
330 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
332 * loader.c (field_from_memberref): Don't crash if either the field
333 signature or the typespec class are invalid.
335 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
337 * verify.c (verifier_load_field): Don't allow field related
338 ops to reference fields on generic type definition.
340 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
342 * metadata-verify.c: Add new warning level for errors specified
343 by ECMA 335 but that MS ignores.
345 * metadata-verify.c (verify_method_table): Make compiler controled
346 visibility + (rt)specialname error a warning as MS ignores this. Ignoring
347 this check is safe because the end result will only be some visibility
348 exceptions been thrown.
350 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
352 * verify.c (get_boxable_mono_type): Don't allow the
353 use of the generic type definition on boxed type positions.
357 2009-08-14 Mark Probst <mark.probst@gmail.com>
359 * threadpool.c: Make sure no cross-domain references remain in
360 ares_htable or the arrays that are thrown away when resizing.
362 2009-08-14 Mark Probst <mark.probst@gmail.com>
364 * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
365 list of classes for which we have to unregister reflection_info
366 with the GC and which are not in the namespace cache.
368 * reflection.c (mono_reflection_initialize_generic_parameter): Add
369 the class to the list.
371 2009-08-14 Mark Probst <mark.probst@gmail.com>
373 * domain.c (mono_domain_free): Unregister the GC roots in
376 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
378 * reflection.c (mono_reflection_type_get_handle): Fix typo.
380 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
382 * class.c: Add mono_class_get_field_from_name_full which does
383 the same as mono_class_get_field_from_name but does check field
386 * class-internals.h: Export mono_class_get_field_from_name_full as
387 part of the internal API.
389 * loader.c (field_from_memberref): Search fields by name and signature
390 as it's valid to have two fields with same name but different types.
394 2009-08-10 Rodrigo Kumpera <rkumpera@novell.com>
396 * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
398 * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
400 * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
403 2009-08-13 Zoltan Varga <vargaz@gmail.com>
405 * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
407 * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
409 2009-08-12 Mark Probst <mark.probst@gmail.com>
411 * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
412 to sgen-scan-object.h, which can be included and parameterized via
415 * Makefile.am: sgen-scan-object.h added.
417 2009-08-12 Mark Probst <mark.probst@gmail.com>
419 * gc.c: #define GC_dont_gc if we're compiling with SGen.
421 2009-08-12 Mark Probst <mark.probst@gmail.com>
423 * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
424 before clearing a domain in the GC.
426 2009-08-12 Mark Probst <mark.probst@gmail.com>
428 * exception.c (mono_exception_from_name_domain): Actually create
429 the exception in the specified domain.
431 * appdomain.c (mono_domain_create_appdomain_internal): Create the
432 OutOfMemoryException a bit later so that the domain is inialized
433 "enough" that it works.
435 2009-08-12 Mark Probst <mark.probst@gmail.com>
437 * threads.c (thread_cleanup): Clean up the cached_culture_info
438 array to prevent cross-domain references.
440 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
442 * metadata.c: more documentation for MonoType accessors.
444 2009-08-11 Raja R Harinath <harinath@hurrynot.org>
446 Fix incorrect size definitions where the tail array isn't a list
448 * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
450 * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
451 * metadata.h (MONO_SIZEOF_TYPE): Likewise.
452 * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
454 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
457 * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
459 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
463 * metadata-internals.h:
465 * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
467 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
474 * reflection.c: #define for sizeof in MonoType and
477 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
480 * domain-internals.h: add and use #define's instead of sizeof()
481 for MonoJitInfo and MonoJitInfoTable.
483 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
486 * class.h: use #define instead of sizeof() for MonoRemoteClass.
488 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
495 * marshal.c: use a #define instead of sizeof() for a few
496 structures that use a zero-length array.
498 2009-08-06 Rodrigo Kumpera <rkumpera@novell.com>
500 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
501 to handle inflated generic methods.
503 * appdomain.c: Bump corlib version.
505 * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
508 * reflection.c (fixup_method): Same
510 * reflection.c (resolve_object): Same.
512 * reflection.c (inflate_method): Replace a g_assert_not_reached with a
513 g_error and a decent message.
515 2009-08-06 Massimiliano Mantione <massi@ximian.com>
517 * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
518 from the object because it could not yet be available globally
519 (it happens if the profiler tries to create a gchandle on the
520 MonoThread object of a thread that is still registering itself
523 2009-08-04 Rodrigo Kumpera <rkumpera@novell.com>
525 * reflection.c (mono_generic_class_get_object): Initialized the
526 managed type arguments array.
528 * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
530 * appdomain.c: Bump corlib version.
532 2009-08-04 Zoltan Varga <vargaz@gmail.com>
534 * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
537 2009-08-03 Zoltan Varga <vargaz@gmail.com>
539 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
540 Avoid a crash if synch_cs is not set.
542 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
543 Handle the case when the handle is 0.
545 * appdomain.c: Bump corlib version.
547 2009-08-02 Zoltan Varga <vargaz@gmail.com>
549 * reflection.c (mono_type_get_object): Fix a warning.
551 2009-08-01 Mark Probst <mark.probst@gmail.com>
553 * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
554 descriptor here. We assume it's already been computed.
556 * generic-sharing.c (instantiate_other_info): Compute the GC
557 descriptor for info type MONO_RGCTX_INFO_KLASS.
559 2009-08-01 Mark Probst <mark.probst@gmail.com>
561 * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
562 type, so don't use MONO_OBJECT_SETREF to set a field.
564 2009-08-01 Mark Probst <mark.probst@gmail.com>
566 * gc.c: We were missing one case where invoking a finalizer would
567 not reset the domain. Also, in the finalizer thread loop, assert
568 that we're in the root domain.
570 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
572 * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
573 if the type is not an array.
575 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
577 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
578 method bound to the declaring type of the method. Raise an exception
579 if the type is not a generic param.
581 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
583 * class.c (print_unimplemented_interface_method_info): Print the
586 * class.c (mono_class_setup_vtable_general): When dealing with a
587 generic instance first check if the generic type definition is
590 2009-02-11 Tom Hindke <tom_hindle@sil.org>
592 * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
594 * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
596 * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
598 * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
600 * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
602 Code is contributed under MIT/X11 license
604 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
606 * verify.c: Fix naming of stelem and ldelem.
608 2009-07-30 Mark Probst <mark.probst@gmail.com>
610 * generic-sharing.c: Replace the templates lock with the loader
611 lock because of very hard to resolve deadlock issues.
613 2009-07-30 Zoltan Varga <vargaz@gmail.com>
615 * icall.c (ves_icall_Type_GetMethodsByName): Use
616 mono_class_get_vtable_size () instead of accessing klass->vtable_size
617 directly. Fixes #525338.
619 * class.c (mono_class_get_vtable_size): New helper function.
621 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
622 the field belongs to the type. Fixes #525733.
624 2009-07-30 Mark Probst <mark.probst@gmail.com>
626 * sgen-gc.c: When we stop a thread and its stack top is not within
627 its allocated stack (because it's in an altstack signal handler),
628 restart it and stop it again, until it is.
630 2009-07-30 Mark Probst <mark.probst@gmail.com>
632 * sgen-gc.c: Take a thread's stack top and registers from the
633 sigcontext in the suspend signal handler.
635 * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
636 stuff to sgen-archdep.h.
638 * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
639 caller, because have code in sgen-archdep.h to acquire that data.
641 2009-07-29 Massimiliano Mantione <massi@ximian.com>
643 * profiler.c, profiler.h, profiler-private.h:
644 Added support for keeping track of code chunks and buffers.
646 2009-07-29 Rodrigo Kumpera <rkumpera@novell.com>
648 * metadata-verify.c: Fix endianness problems on decoding functions.
649 Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
651 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
653 * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
654 schema for vectors and one dimension SZARRAY.
656 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
658 * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
659 schema for vectors and one dimension SZARRAY.
661 2009-07-27 Mark Probst <mark.probst@gmail.com>
663 * icall-def.h, thread-types.h, threads.c: New separate icalls for
664 Interlocked.(Compare)Exchange with object arguments, which invoke
667 2009-07-26 Miguel de Icaza <miguel@novell.com>
669 * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
670 passed invalid arguments. Fixes another crasher in the
671 Silverlight test suite.
673 * class.c (mono_class_array_element_size): Return 0 for the size
674 of the class; This fixes the crasher exposed by :
676 typeof (void).MakeArrayType ();
678 * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
679 if there is no method to dereference. Put all the code that
680 depends on this inside the if (method) block.
682 This fixes the crasher exposed by Microsoft's Silvelright CLR test
683 suite ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
685 With this change, we pass the test.
687 * reflection.c (mono_reflection_sighelper_get_signature_local):
688 Only dereference the assembly if it has been set. Fixes a
689 crasher exposed by #525328
691 2009-07-25 Mark Probst <mark.probst@gmail.com>
693 * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
694 don't perform the store in mono_gc_wbarrier_generic_nostore().
695 Remove the second argument (value), which is not needed.
697 2009-07-24 Zoltan Varga <vargaz@gmail.com>
699 * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
704 2009-07-24 Mark Probst <mark.probst@gmail.com>
706 * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
707 not perform the store itself. Introduce
708 mono_gc_wbarrier_generic_nostore(), which is the same as
709 mono_gc_wbarrier_generic_store(), except it doesn't perform the
712 2009-07-24 Mark Probst <mark.probst@gmail.com>
714 * icall.c (ves_icall_System_Array_SetGenericValueImpl):
715 mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
716 we still need the memcpy().
718 2009-07-22 Mark Probst <mark.probst@gmail.com>
720 * sgen-gc.c: Align array bounds calculation to mono_array_size_t
721 so that big arrays are handled correctly. Always use
722 safe_object_get_size() to calculate array object sizes, which
723 takes bounds into account.
725 2009-07-22 Mark Probst <mark.probst@gmail.com>
727 * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
728 GC descriptor is computed before we use it.
730 2009-07-22 Mark Probst <mark.probst@gmail.com>
732 * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
733 write barrier if necessary.
735 2009-07-22 Mark Probst <mark.probst@gmail.com>
737 * icall-def.h, icall.c, thread-types.h: New separate icall for
738 VolatileWrite(object&,object) that uses a write barrier.
740 * console-unix.c, file-io.c, icall.c, threads.c: Use write
741 barriers in icalls which write to "ref" or "out" arguments.
743 2009-07-21 Zoltan Varga <vargaz@gmail.com>
745 * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
746 handler in a separate icall, to reduce the size of the wrappers.
748 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
750 * metadata-verify.c (is_valid_typespec_blob): Fix error message.
752 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
754 * metadata-verify.c (parse_field): Allow byref field.
756 * metadata-verify.c (parse_locals_signature): Allow byref locals.
758 * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
760 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
762 * verify.c (do_cast): Fail for any non reference type that isn't boxed.
765 2009-07-20 Robert Jordan <robertj@gmx.net>
767 * cominterop.c (cominterop_get_managed_wrapper_adjusted):
768 Fix invalid IL in valuetype handling (STOBJ must push the
769 corresponding class). Fixes bug #523149.
771 Code is contributed under MIT/X11 license.
773 2009-07-20 Geoff Norton <gnorton@novell.com>
775 * gc.c: Use proper semaphores where available on posix and darwin.
777 2009-07-19 Geoff Norton <gnorton@novell.com>
779 * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
781 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
783 * refletion.c (is_sre_usertype): Change name to is_usertype and
784 invert it's result so it returns true if the type is an user type
785 and not the opposite.
787 * reflection.c (is_*_type): Change all of those to use new macro
788 check_corlib_type_cached that cached the type lookup so we don't
789 need to do string comparisons all the type. Changed the signature
790 to take a MonoClass instead.
792 * reflection.c: Change mono_image_create_token and resolve_object
793 to use is_sre_* functions.
795 2009-07-18 Mark Probst <mark.probst@gmail.com>
797 * sgen-gc.c: Check for writes to the stack in the managed
800 2009-07-18 Mark Probst <mark.probst@gmail.com>
802 * sgen-gc.c: When a thread is unregistered, don't free its remsets
803 but put them on a list which is processed with the other thread's
806 2009-07-18 Mark Probst <mark.probst@gmail.com>
808 * sgen-gc.c: Fix and enable the internal allocator instead of
809 using malloc/free (which causes deadlocks).
811 2009-07-16 Rodrigo Kumpera <rkumpera@novell.com>
813 * refletion.c: Fix builds with SRE disabled by adding a minimal
814 implementation of mono_reflection_type_get_handle.
816 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
818 * refletion.c: Make mono_reflection_type_get_handle non static.
820 * object-internals.h: Export mono_reflection_type_get_handle.
822 * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
823 unmanaged handle using mono_reflection_type_get_handle.
825 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
827 * refletion.c: Replace all reads of MonoReflectionType::type with
828 calls to mono_reflection_type_get_handle. Only the functions that
829 deal with constructing TypeBuilder::type have not been changed
830 because they have to deal with NULL values.
832 This is a first step into supporting reflection types that don't
833 map directly into their unmanaged counterpart.
835 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
837 * metadata-verify.c (parse_locals_signature): Don't complain
838 on signature with zero locals since MS generates it and doesn't
841 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
843 * reflection.c (mono_image_get_array_token): Resolve return
844 type using mono_reflection_type_get_handle.
846 * reflection.c (mono_image_get_array_token): Resolve array method
847 parent type using mono_reflection_type_get_handle.
849 2009-07-14 Zoltan Varga <vargaz@gmail.com>
851 * reflection.c (mono_image_basic_init): Applied patch from
852 <Dax@daxxfiles.net>. Set the public key token from the assembly
853 builder. Fixes #518909.
855 * appdomain.c: Bump corlib version.
857 2009-07-13 Zoltan Varga <vargaz@gmail.com>
859 * class.c (mono_class_needs_cctor_run): Make this return false if
860 the class has no cctor.
862 2009-07-13 Mark Probst <mark.probst@gmail.com>
864 * sgen-gc.c: When the minor GC needs to allocate a new section,
865 invoke the major GC afterwards.
867 2009-07-14 Bill Holmes <billholmes54@gmail.com>
869 * process.c (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
870 Applying the window_style field to the SHELLEXECUTEINFO struct.
872 Code is contributed under MIT/X11 license.
874 2009-07-13 Mark Probst <mark.probst@gmail.com>
876 * sgen-gc.c: Fix the race condition in the unmanaged allocator by
877 locking earlier. Fix it in the managed allocator by making sure
878 that no thread is stopped there before the GC runs. If we do stop
879 a thread there, we restart it and let it run a but, until it stops
882 * gc-internal.h, gc.c: Function for getting the IP from a signal
883 context via a function registered by mini.
885 2009-07-11 Zoltan Varga <vargaz@gmail.com>
887 * object-internals.h (MonoIntPtr): New structure describing a boxed
890 * object.c (mono_runtime_invoke_array): Handle ptr arguments and
891 returns. Fixes #519953.
893 * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
895 2009-07-09 Mark Probst <mark.probst@gmail.com>
897 * class-internals.h, generic-sharing.c: New RGCTX info type for
898 getting a remoting invoke with check wrapper.
900 2009-07-07 Geoff Norton <gnorton@novell.com>
902 * icall-def.h: Fix the enable-minimal build.
904 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
906 * object-internals.h: Add MonoReflectionDerivedType.
908 * reflection.c: Implement support for PointerType.
909 Fixed tons of warnings.
911 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
913 * object-internals.h: Add MonoReflectionByRefType.
915 * reflection.c: Implement support for ByRefType.
917 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
919 * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
921 * object-internals.h: Add MonoReflectionArrayType and
922 mono_reflection_create_unmanaged_type.
924 * reflection.c: Implement support for ArrayType.
926 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
928 * metadata-verify.c (is_valid_method_header): Parse EH block
931 2009-07-03 Mark Probst <mark.probst@gmail.com>
933 * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
934 processing the disappearing links, and process disappearing links
935 in a loop until no new objects are copied.
937 2009-07-03 Mark Probst <mark.probst@gmail.com>
939 * object.c (handle_enum): Invoke the write barrier when copying
940 value type instances.
942 * sgen-gc.c: Register remsets for unmanaged write barriers only
943 when the address written to is actually on the heap. This makes
944 set_value() in object.c work without requiring that the result be
947 2009-07-02 Rodrigo Kumpera <rkumpera@novell.com>
949 The runtime wrappers are all bound to a given type that must
950 exist in the same image. For regular images we use the <Module>
951 type, which is required to exist for all images.
953 The <Module> type can't be used for dynamic images because it
954 might not exist at the time the wrapper is required, so we create
955 a synthetic type to use instead.
957 The current code works because of the 2 stage setup of MonoClass,
958 but once this is gone it will no longer work.
960 * icall-def.h: Add ModuleBuilder::set_wrappers_type.
962 * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
964 * object-internals.h: Export mono_image_set_wrappers_type icall
965 as part of the internal API.
967 * marshal.c (get_wrapper_target_class): If the image is dynamic,
968 use MonoDynamicImage::wrappers_type instead of the <Module> type.
970 reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
971 image wrappers_type to the provided value.
973 2009-07-01 Rodrigo Kumpera <rkumpera@novell.com>
975 * appdomain.c (deregister_reflection_info_roots): No need
976 to use the image lock here.
978 2009-07-02 Mark Probst <mark.probst@gmail.com>
980 * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
982 2009-06-29 Zoltan Varga <vargaz@gmail.com>
984 * threads.c: Store the thread start argument in a hash table instead of
985 registering it as a root, as libgc doesn't support unregistering roots
986 under windows, leading to 'too many root sets' errors when many threads
989 * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
990 shutdown, they can still be referenced by the other dying objects.
993 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
995 * socket-io.c: DontLinger does not allow LingerOptions.
997 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
999 * metadata-verify.c: The spec doesn't mention that it's possible to add
1000 custom attribute to a generic parameter. Fixed.
1002 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1004 * class.c (inflate_generic_type): Don't crash while trying to output a message
1005 on why we're aborting.
1007 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1009 * socket-io.c: DontLinger can take an int or a boolean too.
1011 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
1013 * gc.c: check for a null argument to SuppressFinalize () and
1014 ReRegisterForFinalize ().
1016 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1018 * loader.c (method_from_methodspec): Call into the verifier to check
1021 * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
1023 * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
1024 part of the internal API.
1026 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1028 * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
1031 * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
1033 * verify-internals.h: Export mono_verifier_verify_typespec_signature as
1034 part of the internal API.
1036 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1038 * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
1041 * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
1044 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1045 part of the internal API.
1047 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1049 * metadata-verify.c: Use is_valid_blob_object to verify blob validity
1050 when doing basic verification.
1052 This check must be done since the runtime peeks into signatures in much
1053 more places than it does decoding so it makes sense to ensure that all
1054 pointers to blob objects are well formed.
1056 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1058 * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
1059 Use proper overflow dectection. Fix usage of it.
1061 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1063 * loader.c (field_from_memberref): Call into the verifier to check
1066 * loader.c (mono_method_get_signature_full): Same.
1068 * loader.c (method_from_memberref): Same.
1070 * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
1072 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1073 part of the internal API.
1075 2009-06-25 Mark Probst <mark.probst@gmail.com>
1077 * threadpool.c (mono_thread_pool_add): If the domain is unloading
1078 or unloaded, still return an AsyncResult, but don't add it to the
1081 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1083 * threads.c: fix missing colon when DEBUG is defined.
1085 2009-06-25 Mark Probst <mark.probst@gmail.com>
1087 * threadpool.c: Don't add new calls to a threadpool if the domain
1088 of the call is unloading or unloaded. When dequeuing a job, null
1089 the reference in the queue.
1091 2009-06-25 Mark Probst <mark.probst@gmail.com>
1093 * sgen-gc.c (null_link_in_range): Add the dislink for the old
1094 generation if an object was moved.
1096 2009-06-25 Sylvain Dupont <duposyl@gmail.com>
1098 * cominterop.h cominterop.c marshal.c: Added support for marshalling out
1099 parameters of type SAFEARRAY[VARIANT].
1101 * reflection.c (encode_marshal_blob): Properly generate element type
1102 (SafeArraySubType marshal attribute option).
1104 Code is contributed under MIT/X11 license.
1106 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
1108 * reflection.c: in mono_method_clear_object () really ensure all the
1109 objects are removed.
1111 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1113 * loader.c (mono_method_signature): Call into the verifier to check
1114 the method signature.
1116 * metadata-verify.c (verify_method_table): Move signature verification
1117 to verify_method_table_full.
1119 * metadata-verify.c: Add mono_verifier_verify_method_signature.
1121 * verify-internals.h: Export mono_verifier_verify_method_signature as
1122 part of the internal API.
1124 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1126 * loader.c (mono_method_get_header): Call into the verifier to
1127 check the method header.
1129 * metadata-verify.c: Add mono_verifier_verify_method_header.
1131 * verify-internals.h: Export mono_verifier_verify_method_header as
1132 part of the internal API.
1134 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1136 * class.c (mono_class_find_enum_basetype): Call into the verifier to
1137 check the field signature. Replace an assert with an explicit check.
1139 * class.c (mono_class_setup_fields): Call into the verifier to check
1140 the field signature.
1142 * metadata-verify.c: Add mono_verifier_verify_field_signature.
1144 * verify-internals.h: Export mono_verifier_verify_field_signature as
1145 part of the internal API.
1147 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1149 * class.c (mono_class_find_enum_basetype): Simplify this function
1150 by moving code outside of the loop and not decoding static fields.
1152 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1154 * metadata-verify.c (verify_typedef_table): Check the extends
1155 token here. Move to here a flags check from verify_typedef_table_full.
1157 2009-06-24 Zoltan Varga <vargaz@gmail.com>
1159 * metadata-verify.c (is_valid_method_header): Fix a warning.
1161 * metadata-internals.h (MonoImage): Remove the unused
1162 static_rgctx_invoke_wrapper_cache.
1164 * image.c marshal.c: Ditto.
1166 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
1168 * image.c (do_mono_image_load): Enable table data verification.
1170 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
1172 * metadata-verify.c (is_valid_constant): Fix nullref check.
1174 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
1176 * metadata-verify.c (is_valid_constant): Fix string bounds check.
1178 2009-06-22 Mark Probst <mark.probst@gmail.com>
1180 * sgen-gc.c: Managed allocation with pthreads TLS.
1182 * threads.c, threads-types.h: Functions for the JIT to tell the
1183 runtime whether it supports the MONO_TLS opcode.
1185 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1187 * metadata-verify.c (verify_param_table): Fix a crash for assemblies
1190 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1192 * metadata-verify.c (is_valid_constant): Fix the string length check.
1193 Use safe overflow checking. Add decent error messages.
1195 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1197 * metadata-verify.c: Move remaininh blob checks to the offline
1200 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1202 * metadata-verify.c: Move more blob checks to the offline verification
1205 2009-06-22 Bill Holmes <billholmes54@gmail.com>
1207 * object-internals.h : Adding interrupt_on_stop field.
1209 * threads.c (mono_thread_request_interruption) : On Windows exit the
1210 thread if interrupt_on_stop is set.
1212 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
1213 Removing old interrupt logic and setting the interrupt_on_stop for the
1214 thread when calling accept.
1216 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
1217 setting the interrupt_on_stop for the thread when calling accept.
1219 Contributed under MIT/X11 license.
1221 2009-06-20 Martin Baulig <martin@ximian.com>
1223 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
1225 2009-06-21 Zoltan Varga <vargaz@gmail.com>
1227 * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
1228 running in no-exec mode.
1230 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1232 * metadata-verify.c (verify_method_table): Move header
1233 checking to verify_method_table_full.
1235 * metata-verify.c (mono_verifier_verify_full_table_data):
1236 Call verify_method_table_full.
1238 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1240 * metadata-verify.c (verify_field_table): Move signature
1241 checking to verify_field_table_full.
1243 * metata-verify.c (mono_verifier_verify_full_table_data):
1244 Call verify_field_table_full.
1246 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1248 * metadata-verify.c (verify_typedef_table): Move remaining
1249 stuff to verify_typedef_table_full.
1251 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1253 * metadata-verify.c: Kill is_corlib from VerifyContext.
1254 It is only used by the offline mode.
1255 So we better remove it from the runtime path.
1257 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1259 * metadata-verify.c: Add new mono_verifier_verify_full_table_data
1260 function that perform the offline metadata verification steps.
1262 * metadata-verify.c (verify_typedef_table): Move some checks to
1263 verify_typedef_table_full and make it been called by new function
1264 mono_verifier_verify_full_table_data.
1266 * pedump.c: Call mono_verifier_verify_full_table_data.
1268 * verify-internals.h: Export mono_verifier_verify_full_table_data as
1269 part of the internal API.
1271 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1273 * metadata-verify.c (typedef_is_system_object): Fix System.Object
1276 * metadata-verify.c (verify_implmap_table): Fix implmap invalid
1277 flags bits. SupportLastError was confused as bit 7 instead of 6.
1279 * metadata-verify.c (verify_implmap_table): Fix import scope verification
1280 to check against the module ref table instead of module.
1282 * metadata-verify.c (verify_implmap_table): Fix corlib check.
1284 * pedump.c: Call mono_image_load_names.
1286 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1288 * image.c: Extract mono_image_load_names from do_mono_image_load.
1290 * metadata-internals.h: Export mono_image_load_names as part of
1293 2009-06-19 Zoltan Varga <vargaz@gmail.com>
1295 * metadata.c (mono_metadata_cleanup): Free the generic method cache
1296 first, as it could reference data in the other caches.
1298 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
1300 * metadata-verify.c: Finished with method header verification.
1302 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
1304 * metadata-verify.c: Added more header verification code.
1305 Now only EH clauses are missing.
1307 2009-06-17 Zoltan Varga <vargaz@gmail.com>
1309 * marshal.c (get_runtime_invoke_type): Don't share primitive types
1312 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
1314 * metadata-verify.c: Initial method header verification.
1316 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
1318 * metadata-verify.c (verify_import_table): The IAT contents
1319 might end been patched by the windows DL when running with
1322 2009-06-15 Rodrigo Kumpera <rkumpera@novell.com>
1324 * class.c (mono_class_from_typeref): If the enclosing type is not
1325 found return null instead of crashing. Fixes #508487.
1327 2009-06-15 Atsushi Enomoto <atsushi@ximian.com>
1329 * normalization-tables.h : updated to the latest unicode charcter
1331 * appdomain.c : bump corlib version.
1333 2009-06-14 Zoltan Varga <vargaz@gmail.com>
1335 * class.c (mono_class_from_name): Fix support for assembly references
1336 in the EXPORTEDTYPE table. Fixes #511704.
1338 2009-06-13 Geoff Norton <gnorton@novell.com>
1340 * domain.c: Ensure that mono_domain_assembly_open actually opens the
1341 assembly in the target domain.
1343 2009-06-12 Robert Jordan <robertj@gmx.net>
1345 * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
1346 because "this" of the managed signature has become an
1347 ordinary parameter in the unmanaged signature.
1349 2009-06-12 Zoltan Varga <vargaz@gmail.com>
1351 * class-internals.h (struct _MonoGenericContainer): Add an 'image'
1352 field for owner-less generic containers.
1354 * reflection.c (mono_reflection_initialize_generic_parameter): Set the
1355 image field of the owner-less generic containers created here.
1357 * metadata.c (mono_metadata_load_generic_params): Ditto, the
1358 contain is ownerless until the caller sets its owner.
1360 * metadata.c (type_in_image): Handle owner-less generic containers
1363 2009-06-11 Zoltan Varga <vargaz@gmail.com>
1365 * image.c (mono_image_close): Support debug_assembly_unload for
1368 2009-06-11 Andrés G. Aragoneses <aaragoneses@novell.com>
1370 * class.c: Fix some typos in comments.
1372 2009-06-11 Zoltan Varga <vargaz@gmail.com>
1374 * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
1376 * threads.c (mono_thread_execute_interruption): Avoid creating the
1377 abort exception object while holding the synch_cs lock.
1379 2009-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1381 * metadata-verify.c: Verify basic cattr content.
1383 2009-06-10 Zoltan Varga <vargaz@gmail.com>
1385 * reflection.c (add_exported_type): Don't set the FORWARDER flag on
1388 * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
1389 support for nested types. Fixes #511704.
1391 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
1393 * metadata-verify.c: Verify methodspec signatures.
1395 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
1397 * metadata-verify.c: Verify typespec signatures.
1399 2009-06-09 Zoltan Varga <vargaz@gmail.com>
1401 * metadata.c (free_inflated_method): Call
1402 mono_marshal_free_inflated_wrappers (), which was missed earlier.
1404 2009-06-08 Miguel de Icaza <miguel@novell.com>
1406 * mono-config.c: Small change to report the PPC64/ILP32 model.
1408 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
1410 * metadata-verify.c (parse_type): Check szarray.
1412 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
1414 * metadata-verify.c (parse_type): Check fnptr.
1416 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
1418 * metadata-verify.c (parse_type): Check generic instances.
1420 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
1422 * metadata-verify.c (parse_type): Check array shape.
1424 2009-06-05 Robert Jordan <robertj@gmx.net>
1426 * class.c (mono_class_create_from_typedef): Check only for
1427 mscorlib's System.Array.
1429 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
1431 * metadata-verify.c (parse_type): Check pointer, class/valuetype
1434 * metadata-verify.c (parse_field): Check the signature.
1436 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
1438 * metadata-verify.c: Implement locals signature check.
1440 2009-06-04 Marek Safar <marek.safar@gmail.com>
1442 * domain.c: Add .NET 4.0 Beta 1 version.
1444 2009-06-04 Bill Holmes <billholmes54@gmail.com>
1446 * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
1447 For QueryInterface on CCWs consider the base class
1450 Code is contributed under MIT/X11 license.
1452 2009-06-04 Zoltan Varga <vargaz@gmail.com>
1454 * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
1456 * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
1459 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
1460 adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
1462 * generic-sharing.c (inflate_other_data): Ditto.
1464 2009-06-03 Rodrigo Kumpera <rkumpera@novell.com>
1466 * metadata-verify.c: Implement property signature check.
1468 2009-06-04 Mark Probst <mark.probst@gmail.com>
1470 * sgen-gc.h: Register saving support for PPC.
1472 2009-06-04 Mark Probst <mark.probst@gmail.com>
1474 * sgen-gc.c: Fixed a pthread TLS screwup.
1476 2009-06-04 Mark Probst <mark.probst@gmail.com>
1478 * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
1481 2009-06-04 Mark Probst <mark.probst@gmail.com>
1483 * sgen-gc.c: Disable TLA and managed allocation if the __thread
1484 keyword is not supported.
1486 2009-06-04 Zoltan Varga <vargaz@gmail.com>
1488 * marshal.c metadata.c: Applied patch from Ulrich Weigand
1489 <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
1490 the inflated method is freed. Fixes #508389.
1492 The code is contributed under the MIT/X11 license.
1494 2009-06-03 Zoltan Varga <vargaz@gmail.com>
1496 * marshal.c (get_wrapper_target_class): New helper function.
1497 (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
1498 the <Module> class of the image. Fixes #509049.
1500 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1502 * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
1503 Check if the thread was interrupted and proccess it straight away.
1504 Makes abortion much more responsive.
1506 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1508 * threads.c (mono_thread_execute_interruption): Use atomic cas with
1509 MonoThread::interruption_requested to match it's counterpart.
1511 Fixes a hang in abort-stress-1 on a 2 core x86.
1513 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
1516 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1518 Change MonoImage::name_cache to be protected by the image lock
1519 instead of the loader lock.
1521 * appdomain.c (deregister_reflection_info_roots): Protect access
1524 * class.c (mono_image_init_name_cache): Change from the loader lock
1525 to the image lock. Check if the cache wasn't already created.
1527 * class.c: Change from the loader to the image lock.
1529 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
1530 the code to hold the image lock while iterating over name_cache and
1531 not go into mono_array_new holding it.
1533 * metadata-internals.h: Add a comment about this change.
1535 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1537 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1538 Under the 2.0 profile raise the loader error.
1542 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1544 * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
1545 of ldind opcode for generic instances so we don't fail for direct wrappers.
1546 This only affect direct calls.
1548 2009-05-31 Zoltan Varga <vargaz@gmail.com>
1550 * reflection.c (create_dynamic_mono_image): Fix warnings.
1552 * generic-sharing.c (other_info_equal): Ditto.
1554 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
1556 * metadata-verify.c: Implement field signature check.
1558 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
1560 * metadata-verify.c: Implement standalone signature check.
1562 2009-05-28 Rodrigo Kumpera <rkumpera@novell.com>
1564 * metadata-verify.c: Implement methodref signature check.
1566 2009-05-28 Zoltan Varga <vargaz@gmail.com>
1568 * object-internals.h (MonoRuntimeCallbacks): New structure containing
1569 callbacks supplied by the runtime.
1571 * object.c (mono_install_callbacks): New internal function to install
1574 * object.c (mono_create_ftnptr): Move the implementation of this to
1577 * object.c (mono_get_addr_from_ftnptr): Ditto.
1579 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
1581 * metadata-verify.c (parse_return_type): Proper byref check.
1582 * metadata-verify.c (is_valid_method_signature): Check for zero arity
1583 generic signatures and method params.
1585 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
1587 * metadata-verify.c (decode_signature_header): Fix bounds check.
1589 * metadata-verify.c (parse_custom_mods): Check custom mods.
1591 * metadata-verify.c (parse_type): Do initial basic verification
1594 * metadata-verify.c (is_valid_method_signature): Parse the generic
1597 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
1599 * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
1600 discarded based on their most specific definition so we set the method_slots
1601 array before checking if the method is acceptable or not.
1605 2009-05-26 Mark Probst <mark.probst@gmail.com>
1607 * icall.c: Free the old array when resizing a mono_ptr_array.
1609 2009-05-26 Mark Probst <mark.probst@gmail.com>
1611 * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
1612 for the hashes whose keys are managed objects.
1614 2009-05-26 Mark Probst <mark.probst@gmail.com>
1616 * object-internals.h, threads.c: Set the execution context on
1617 thread start here, not in corlib.
1619 * appdomain.c: Bump corlib version.
1621 2009-05-27 Martin Baulig <martin@ximian.com>
1623 * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
1624 if `_mono_debug_using_mono_debugger' is set to make things work
1625 properly when embedding Mono.
1627 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1629 * class.c (mono_class_setup_fields): Don't mark simd types as having
1630 16 bytes alignment as the whole runtime doesn't support.
1632 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1634 * metadata-verify.c (safe_read): Use endian safe read macros.
1636 2009-05-25 Zoltan Varga <vargaz@gmail.com>
1638 * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
1639 it is read-only when using full aot.
1641 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
1643 * metadata-verify.c (is_valid_method_signature): Verify parts
1644 of the return type. Provide an error message in case of failure.
1646 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
1648 * metadata-verify.c (is_valid_method_signature): Verify the call conv.
1650 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
1652 * metadata-verify.c: Include the size prefix in the bounds check.
1654 2009-05-22 Miguel de Icaza <miguel@novell.com>
1656 * icall.c: Remove warnings.
1658 * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
1659 prevent auto-detection based on GCC defines.
1663 * metadata-verify.c: Do not include signal.h
1665 * generic-sharing.c, marshal.c: Add returns to avoid some warning
1666 messages. Not sure why the g_assert_not_reached is not enough to
1670 * appdomain.c: Remove code that is not used when
1671 DISABLE_SHADOW_COPY is set.
1673 * image.c: use g_getenv
1675 2009-05-21 Miguel de Icaza <miguel@novell.com>
1677 * reflection.c: Remove code that it not used with
1678 DISABLE_REFLECTION_EMIT is defined.
1680 2009-05-21 Zoltan Varga <vargaz@gmail.com>
1682 * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
1685 2009-05-20 Miguel de Icaza <miguel@novell.com>
1688 (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
1689 the ifdef here and instead put that on io-layer
1691 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
1693 * metadata-verify.c: Verify the generic param constraint table.
1695 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
1697 * metadata-verify.c (verify_generic_param_table): Fix
1698 thinko on the valid flags bits for generic params.
1700 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
1702 * metadata-verify.c: Verify the methodspec table.
1704 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
1706 * metadata-verify.c: Verify the generic param table.
1708 2009-05-19 Mark Probst <mark.probst@gmail.com>
1710 * sgen-gc.c: Store and use the count with REMSET_VTYPE.
1712 2009-05-19 Mark Probst <mark.probst@gmail.com>
1714 * sgen-gc.c: Use generation enum more consistently and use the
1715 correct generation in mono_gc_register_for_finalization().
1717 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
1719 * metadata-verify.c: Verify the nested class table.
1721 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
1723 * metadata-verify.c: Verify the manifest resource table.
1725 2009-05-17 Zoltan Varga <vargaz@gmail.com>
1727 * debug-helpers.c (dis_one): Add little-endian support for ldstr.
1729 2009-05-16 Zoltan Varga <vargaz@gmail.com>
1731 * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
1732 wrappers, this is now done in the JIT.
1734 * class.c (mono_set_generic_sharing_supported): New internal function.
1735 (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
1737 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1739 * metadata-verify.c: Verify the exported type table.
1741 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1743 * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
1745 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1747 * metadata-verify.c: Verify the file table.
1749 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1751 * metadata-verify.c (verify_assembly_table): Fix an error message.
1753 * metadata-verify.c: Verify the assemblyref table.
1755 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1757 * metadata-verify.c (verify_assembly_table): Fix the valid
1758 bits mask for flags.
1760 2009-05-15 Zoltan Varga <vargaz@gmail.com>
1762 * debug-helpers.c (mono_method_full_name): Print generic parameters of
1763 generic methods as well.
1765 2009-05-15 Geoff Norton <gnorton@novell.com>
1767 * gc.c: MachO/Darwin supports and uses semaphores fine for this
1768 use-case and is significantly more performant than the wapi layer.
1770 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
1772 * metadata-verify.c: Verify the assembly table.
1774 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
1776 * metadata-verify.c: Fix rows limit check.
1778 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
1780 * metadata-verify.c: Verify the fieldrva table.
1782 2009-05-13 Mark Probst <mark.probst@gmail.com>
1784 * sgen.c: Speed up weak links and finalizers by grouping them by
1787 2009-05-13 Mark Probst <mark.probst@gmail.com>
1789 * marshal.c (delegate_hash_table_add): When overwriting an entry,
1790 free the old GCHandle (only applies to SGen).
1792 2009-05-13 Zoltan Varga <vargaz@gmail.com>
1794 * loader.c (mono_get_method_from_token): Avoid the expensive call to
1795 mono_metadata_load_generic_params () for non-generic methods.
1797 2009-05-12 Mark Probst <mark.probst@gmail.com>
1799 * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
1800 New function for returning a monitor's weak link if it has one.
1802 * sgen-gc.c: Remove an object's monitor's weak link (if it has
1803 one) when clearing a domain. These can still be around because
1804 the object might not have been collected.
1806 2009-05-12 Zoltan Varga <vargaz@gmail.com>
1808 * gc.c: Fix a warning.
1810 2009-05-12 Kornél Pál <kornelpal@gmail.com>
1812 * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
1813 prevous wait that resulted in a deadlock on Windows when initializing
1814 the runtime form DllMain. Also results in improved startup time.
1815 (finalizer_thread): Get rid of thread_started_event.
1816 * threads.c, threads-types.h (mono_thread_create_internal): Return the
1817 resulting MonoThread.
1819 Contributed under MIT/X11 license.
1821 2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
1823 * metadata-verify.c: Verify the implmap table.
1824 Don't require that #US and #Strings be present.
1826 2009-05-11 Sebastien Pouliot <sebastien@ximian.com>
1828 * security-core-clr.c: Delegate checks are done at creation time,
1829 not a invocation time. Fix exception for Telerik Silverlight demo
1831 2009-05-11 Mark Probst <mark.probst@gmail.com>
1833 * sgen-gc.c (need_remove_object_for_domain): Remove the special
1834 case for the Thread class.
1836 * threads.c: Do clean-up of abort exception/state in
1837 thread_cleanup() instead of Thread.free_internal(). Also clean up
1838 current_appcontext. The reason we have to do that is because
1839 those references might point into another domain and if that
1840 domain is unloaded before the thread is finalized, they point to
1843 2009-05-10 Andreas Faerber <andreas.faerber@web.de>
1845 * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
1848 Contributed unter MIT/X11 license.
1850 2009-05-09 Miguel de Icaza <miguel@novell.com>
1852 * verify.c, metadata-verifier.c: Add support for disabling the
1853 verifier in some builds.
1855 [ Sorry, my previous commit accidentally commited some work in
1858 2009-05-08 Zoltan Varga <vargaz@gmail.com>
1860 * class.c (mono_class_setup_fields): Set class->field.first for
1863 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
1865 * metadata-verify.c: Verify the typespec table.
1867 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
1869 * metadata-verify.c: Verify the module table.
1871 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
1873 * metadata-verify.c: Verify the methodimpl table.
1875 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
1877 * metadata-verify.c: Verify the property table.
1879 2009-05-06 Zoltan Varga <vargaz@gmail.com>
1881 * debug-helpers.c (mono_method_desc_match): Add support for generic
1884 2009-05-05 Rodrigo Kumpera <rkumpera@novell.com>
1886 * metadata-verify.c: Verify the propertymap table.
1888 2009-05-04 Rodrigo Kumpera <rkumpera@novell.com>
1890 * metadata-verify.c: Verify the event table.
1892 * metadata-verify.c (search_sorted_table): Fix offset
1895 2009-05-02 Zoltan Varga <vargaz@gmail.com>
1897 * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
1899 2009-05-01 Mark Probst <mark.probst@gmail.com>
1901 * gc.c (mono_gc_run_finalize): Don't set the domain too late,
1902 because mono_delegate_free_ftnptr() needs it.
1904 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1906 * metadata-verify.c: Verify the eventmap table.
1908 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1910 * metadata-verify.c: Verify the standalonesig table.
1912 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1914 * metadata-verify.c: Verify the field layout table.
1916 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1918 * class.c (mono_type_get_name_recurse): Don't crash
1919 for ownerless generic params.
1921 * debug-helpers.c (mono_type_get_desc): Correct the format
1922 for ownerless generic params.
1924 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1926 * metadata-verify.c: Verify the class layout table.
1928 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1930 * metadata-verify.c: Verify the decl security table.
1932 2009-04-30 Mark Probst <mark.probst@gmail.com>
1934 * domain.c (mono_domain_set_internal_with_options): Don't do
1935 anything if the old domain is the same as the old one. Fixes
1938 2009-04-30 Mark Probst <mark.probst@gmail.com>
1940 * appdomain.c: Deregister the reflection_info roots when unloading
1943 * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
1944 memory allocated by a domain and frees its disappearing links.
1946 * boehm-gc.c, null-gc.c: Empty implementation of
1947 mono_gc_clear_domain().
1949 2009-04-30 Mark Probst <mark.probst@gmail.com>
1951 * appdomain.c (clear_cached_vtable): Free the static fields memory
1954 2009-04-30 Mark Probst <mark.probst@gmail.com>
1956 * gc.c: Set the correct domain when invoking finalizers.
1958 * appdomain.c: Set the correct domain when creating threads.
1960 2009-04-30 Mark Probst <mark.probst@gmail.com>
1962 * sgen-gc.c: Fix skip size for vectors.
1964 2009-05-03 Martin Baulig <martin@ximian.com>
1966 * mono-debug-debugger.c
1967 (mono_debugger_check_breakpoints): Check class init handlers even
1968 if we don't have any method load handers.
1970 2009-04-30 Zoltan Varga <vargaz@gmail.com>
1972 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
1973 returning refonly assemblies if refonly is FALSE. Fixes #499013.
1975 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
1977 * metadata-verify.c: Verify the field marshal table.
1979 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
1981 * metadata-verify.c: Verify the custom attribute table.
1983 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
1985 * metadata-verify.c: Verify the constant table.
1987 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
1989 * metadata-verify.c: Verify the memberef table.
1991 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
1993 * metadata-verify.c (get_coded_index_token): Remove
1996 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
1998 * metadata-verify.c: Verify the interfaceimpl table.
2000 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2002 * verify.c: Improve error message.
2004 * debug-helpers.c (mono_type_get_desc): Harden the code that
2005 deals with VAR and MVAR.
2007 2009-04-28 Zoltan Varga <vargaz@gmail.com>
2009 * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
2012 2009-04-23 Tom Hindle <tom_hindle@sil.org>
2014 * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
2015 changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
2017 2009-04-28 Sebastien Pouliot <sebastien@ximian.com>
2019 * security-core-clr.c: Avoid redundant checks for platform code,
2020 e.g. check for method and for class (very common) and check
2021 for class and outer class (less common)...
2023 2009-04-27 Zoltan Varga <vargaz@gmail.com>
2025 * reflection.c: Avoid returning random cattrs for synthetic methods.
2028 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2030 * assembly.c: assemblies in the GAC should never be shadow-copied.
2032 2009-04-26 Mark Probst <mark.probst@gmail.com>
2034 * domain.c, domain-internals.h: Disable
2035 track_resurrection_{objects,handles}_hash in MonoDomain if using
2038 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2040 * metadata-verify.c: Verify the param table.
2042 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2044 * metadata-verify.c (verify_typedef_table): Range check FieldList and
2047 * metadata-verify.c (verify_method_table): Proper check the ParamList
2050 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2052 * metadata-verify.c (verify_method_table): Check for runtime
2053 implemented functions such as delegate .ctors. Remove spurious
2056 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2058 * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
2060 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2062 Don't allocate MonoGenericInfo for ownerless generic params.
2063 * class-internals.h (MonoGenericParam::info): Move field to ...
2064 (MonoGenericParamFull): ... this. New struct.
2065 (MonoGenericContainer::type_params): Change type to
2066 MonoGenericParamFull.
2067 (MonoGenericParam, MonoGenericContainer): Update accessors.
2068 * metadata.c (mono_metadata_parse_generic_param): Don't initialize
2069 'info' field for ownerless generic param.
2070 (mono_metadata_load_generic_params): Update to changes.
2071 * reflection.c (mono_reflection_create_generic_class): Likewise.
2072 (reflection_methodbuilder_to_mono_method): Likewise.
2073 (mono_reflection_initialize_generic_parameter): Likewise.
2075 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2077 Don't use MonoGenericParamInfo for ownerless generic params.
2078 * class.c (get_anon_gparam_class, set_anon_gparam_class): New. Don't
2079 use ParamInfo class at all.
2080 (mono_class_from_generic_parameter): Use them.
2081 (make_generic_param_class): Fix a couple of instances where 'pinfo
2082 == NULL' wasn't handle.
2084 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2086 * class.c (make_generic_param_class): Carve out of ...
2087 (mono_class_from_generic_parameter): ... here.
2089 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2091 Simplify mono_class_from_generic_parameter
2092 * class-internals.h (MonoGenericParamInfo::token): New field.
2093 * metadata.c (mono_metadata_load_generic_params): Initialize it
2095 * class.c (mono_class_from_generic_parameter): Use it instead of
2096 searching through metadata.
2098 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2100 * metadata-verify.c: Add verification of the method table.
2102 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2104 * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
2105 Delegate::Invoke optimization.
2107 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2109 * appdomain.c (mono_domain_create_appdomain_internal): Free the
2110 string returned by get_shadow_assembly_location_base.
2112 * appdomain.c (get_shadow_assembly_location_base): Add a comment
2113 about caller's ownership.
2115 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2117 * reflection.c: Add mono_reflection_cleanup_domain to cleanup
2118 reflection memory on domain unload.
2120 * domain.c (mono_domain_free): Don't free refobject_hash, let the
2121 reflection cleanup code do it.
2123 * domain-internals.h: Add mono_reflection_cleanup_domain.
2125 This fixes a memory leak for managed mirrors of reflection objects
2128 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
2130 * metadata-verify.c: Implement more verification of the field table.
2132 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
2134 * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
2135 doesn't try to parse the input assembly, which can be broken.
2137 2009-04-23 Mark Probst <mark.probst@gmail.com>
2139 * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
2140 sgen-gc.c: Implement track resurrection in weak GC handles in SGen
2141 by using the lowest bit in the link to store whether the link is
2142 tracked. Move the track_resurrection hashes into boehm-gc.c.
2144 2009-04-22 Miguel de Icaza <miguel@novell.com>
2146 * Makefile.am: Split the console support in platform specific code
2147 and put together a framework for making this easy in the future so
2148 that we can start splitting code instead of having a mess of PLATFORM_WIN32
2150 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
2152 * pedump.c: Fix a warning.
2154 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
2156 * verify.c (mono_delegate_type_equal): Compare valuetypes using
2157 mono_class_from_mono_type to avoid bad interactions with the dual representation
2158 of the generic type definition.
2160 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
2162 * verify.c (do_invoke_method): Use mono_class_from_mono_type to
2163 get the MonoClass for the call context type as it might be a generic
2168 2009-04-21 Mark Probst <mark.probst@gmail.com>
2170 * object-internals.h: The Thread object has no execution_context
2173 * threads.c, threadpool.c, threads-types.h: Accessor functions for
2174 the execution context.
2176 * appdomain.c: Bump corlib version.
2178 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2180 * verify.c (do_newobj): Improve error message.
2182 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2184 * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
2185 is nested in the filter block.
2187 * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
2188 block is not fully nested.
2192 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2194 * verify.c (verify_type_compatibility_full): Compare MonoClass and
2195 not MonoType to check for equality of valuetypes as the generic type
2196 definition allows for two different encodings: the generic type definition
2197 class or a generic instance over the GTD arguments.
2201 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2203 * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
2205 * verify.c (do_initobj): Improve error message.
2207 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2209 * metadata-verify.c: Enable pe verification as the issue with #496453
2210 is that the authenticode data directory have a different unspecified
2211 format. Ignore it for now.
2213 * pedump.c: Run the metadata verifier together with the IL verifier.
2217 2009-04-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
2219 * metadata-verify.c: Temporarily disable pe verification due to #496453.
2221 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
2223 * class.c (can_access_type): Check visibility against
2224 the element type for pointers and arrays.
2228 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
2230 * metadata-verify.c: Fix cli and table verification to use information
2231 from the MonoImage. A lot of duplicated code got killed.
2233 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
2236 This patch starts to integrate the metadata verifier with the runtime code.
2238 This patch causes major regression in functionality for the metadata verifier
2239 as cli and table verification are disabled since they require to be ported to
2240 use MonoImage information.
2242 * image.c (do_mono_image_load): Split the code in this function
2243 into mono_image_load_pe_data and mono_image_load_cli_data.
2244 Add care_about_pecoff parameter to not load pecoff data.
2245 Call into the metadata verifier for pecoff and cli verification.
2247 * image.c (mono_image_open_raw): New function that doesn't perform
2248 any parsing of the image contents.
2250 The reason for the 3 new functions is to give pedump better control
2251 into the interaction with the verifier.
2253 * metadata-internals.h: Add new functions from image.c as part of the
2256 * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
2257 mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
2258 to make those functions work together with the runtime.
2260 * verify.c: Add mono_verifier_is_enabled_for_image function that returns
2261 true if the image needs to be verified.
2263 * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
2265 * pedump.c: Use new metadata verifier API.
2267 2009-04-19 Zoltan Varga <vargaz@gmail.com>
2269 * object.c (mono_install_vtable_trampoline): Make this receive a
2270 trampoline creation function instead of trampoline, allowing the JIT
2271 to use a different trampoline for each vtable.
2273 2009-04-18 Mark Probst <mark.probst@gmail.com>
2275 * object.c (mono_raise_exception): Don't reset the thread abort
2276 exception state here.
2278 2009-04-18 Mark Probst <mark.probst@gmail.com>
2280 * icall-def.h: New icall for getting the thread abort exception
2283 * object.c, thread.c, object-internals.h: A thread's abort
2284 exception state is now a GC handle. To get the object it stands
2285 for, we must move it into the current app domain, if it's
2286 different than the one where it originated from.
2288 * appdomain.c: Bump corlib version.
2290 * domain.c, domain-internals.h: New function for setting the
2291 domain and migrate the thread abort exception or not.
2293 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2295 * metadata-verify.c: Add initial verification of the
2298 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2300 * metadata-verify.c: Add a macro to conditionally enable
2301 dumping of verification information. Add make_coded_token
2302 and search_sorted_table to enable search sorted tables
2303 by a given coded token.
2305 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2307 * metadata-verify.c: Add array mapping from table index
2308 to description offset. Add get_col_offset and get_col_size
2311 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2313 * metadata-verify.c: Add remaining table descriptions offsets.
2314 Add remaining coded index descriptions.
2316 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2318 * metadata-verify.c: Fixed constant table description.
2319 Fixed calculation of HasCustomAttribute coded index size.
2320 Fixed calculation of size for many table indexes.
2322 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2324 * pedump.c (dump_metadata): Dump table offset instead
2325 of useless pointer in memory.
2327 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2329 * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
2331 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2333 * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
2334 a missing of for interface types.
2336 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2338 * metadata-verify.c (verify_pe_optional_header): Add comment of why
2339 the code is commented.
2341 * metadata-verify.c (verify_resources_table): Remove spurious printf
2342 and don't fail if there are unmanaged resources. Gmcs generates a useless
2343 one for all assemblies - I bet it's some MS compatibility junk.
2345 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2347 * metadata-verify.c (verify_typedef_table): Verify the extends field.
2349 * metadata-verify.c (mono_image_verify): Add a is_corlib.
2351 * verify-internals.h: Same.
2353 * pedump.c: Fix for mono_image_verify new signature.
2355 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2357 * metadata-verify.c (verify_typedef_table): Verify for some invalid
2360 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2362 * metadata-verify.c (verify_module_table): Ignore the generation field.
2364 2009-04-15 Martin Baulig <martin@ximian.com>
2366 * debug-mono-symfile.c
2367 (mono_debug_symfile_lookup_location): Don't print a warning for
2368 unknown extended opcodes if they're within 0x40 and 0x7f.
2370 2009-04-15 Zoltan Varga <vargaz@gmail.com>
2372 * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
2373 invoke signatures returning an enum. Fixes #494847.
2375 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
2377 * metadata-verify.c: Initial code to verify the typedef table.
2379 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
2381 * verify.c (mono_method_verify): Don't fail if an unconditional branch
2382 with non empty stack happens before the beginning of a try block.
2386 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
2388 * metadata-verify.c: Verify typename and typenamespace fields of
2391 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
2393 * metadata-verify.c: Initial code to verify the typeref table.
2395 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
2397 * verify.c (verify_delegate_compatibility): Fix error message.
2399 2009-04-14 Sebastien Pouliot <sebastien@ximian.com>
2401 * security-core-clr.c: Fix typo
2403 2009-04-14 Zoltan Varga <vargaz@gmail.com>
2405 * marshal.c (delegate_hash_table_add): Make delegate_target_locations
2406 a MonoGHashTable to keep its values alive.
2407 (emit_marshal_boolean): Fix a warning.
2409 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
2411 * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
2412 not have any interface configured for IPv4/IPv6.
2414 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
2416 * assembly.c: fix typo in error message.
2418 2009-04-14 Zoltan Varga <vargaz@gmail.com>
2420 * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
2421 allocating the location holding the this argument to prevent
2422 'too many root sets' errors.
2424 * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
2425 to mark fields as special static.
2426 (mono_field_static_get_value): Handle special static fields.
2427 (mono_field_static_set_value): Ditto.
2429 * class-internals.h (struct _MonoClassField): Document this.
2431 2009-04-13 Bill Holmes <billholmes54@gmail.com>
2433 * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
2434 the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
2435 case. This will handle when managed code returns null to native code.
2437 Code is contributed under MIT/X11 license.
2439 2009-04-13 Bill Holmes <billholmes54@gmail.com>
2441 * object.c (build_imt_slots): Changing a free to a g_free to match
2442 the g_malloc0 in add_imt_builder_entry that allocated this memory.
2444 Code is contributed under MIT/X11 license.
2446 2009-04-13 Bill Holmes <billholmes54@gmail.com>
2448 * marshal.c (emit_marshal_boolean): Adding code to ensure that
2449 the correct TRUE value is passed through the marshaling layer.
2451 Code is contributed under MIT/X11 license.
2453 2009-04-13 Zoltan Varga <vargaz@gmail.com>
2455 * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
2456 correctly. Fixes #492330.
2458 * marshal.c: Fix the embedding of object pointers into JITted code in
2459 the native-to-managed wrappers by allocating some GC tracked memory, and
2460 embedding the address of that.
2462 2009-04-11 Zoltan Varga <vargaz@gmail.com>
2464 * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
2465 pointers into the vtable.
2467 2009-04-09 Rodrigo Kumpera <rkumpera@novell.com>
2469 * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
2471 * verify.c (verify_ldftn_delegate): Improve error message.
2473 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
2475 * reflection.c (my_mono_class_from_mono_type): Remove.
2477 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
2479 Prepare to reduce memory usage of owner-less generic parameters (1/n)
2480 * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
2481 and constraints fields into ...
2482 (MonoGenericParamInfo): ... this.
2483 (mono_generic_param_info, mono_generic_container_get_param_info):
2485 * class.c, debug-helpers.c, icall.c: Update to changes.
2486 * metadata.c, reflection.c, verify.c: Likewise.
2488 2009-04-09 Zoltan Varga <vargaz@gmail.com>
2490 * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
2492 * marshal.c (get_runtime_invoke_type): Share enums with their base types.
2494 * marshal.c (get_runtime_invoke_type): Share pointers with ints and
2495 booleans with sbytes.
2497 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
2499 * class.c (can_access_instantiation): Verify accesibility of element types
2500 for arrays and pointers.
2502 * class.c (can_access_type): Return true if the target class is VAR or MVAR.
2504 * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
2508 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
2510 * verify.c (do_invoke_method): Improve error messages.
2512 2009-04-08 Bill Holmes <billholmes54@gmail.com>
2514 * verify.c: Fixing the MSVC build.
2516 Code is contributed under MIT/X11 license.
2518 2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
2520 * security-core-clr.c: Simplify get_reflection_caller not to call
2521 mono_method_get_last_managed (another stack walk) and adjust the
2522 callers to handle a (should not happen) NULL return value.
2524 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2526 Add accessors to some MonoGenericParam fields
2527 * class-internals.h (mono_generic_param_owner): New accessor.
2528 (mono_generic_param_num): Likewise.
2529 (mono_type_get_generic_param_owner): New helper.
2530 (mono_type_get_generic_param_num): New helper.
2531 * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
2533 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2535 * class-internals.h (mono_generic_container_get_param): New wrapper.
2536 * class.c, icall.c, metadata.c, verify.c: Use it.
2538 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2541 * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
2542 the standard case/loop. In particular, don't complain about
2543 references to generic type definitions.
2545 2009-04-07 Zoltan Varga <vargaz@gmail.com>
2547 * debug-helpers.c (dis_one): Decode string arguments.
2549 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
2551 * pedump.c (dump_verify_info): Dump type name correctly.
2553 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
2555 * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
2556 are larger than code size.
2558 This can happen in valid code if the try/catch block is not followed by any instruction
2559 and do a backward branch on the leave instruction.
2563 2009-04-06 Sebastien Pouliot <sebastien@ximian.com>
2565 * security-core-clr.c: Fix typo while comparing second method names
2566 in can_avoid_corlib_reflection_delegate_optimization
2568 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
2570 * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
2574 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
2576 * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
2577 a MVAR using a class context.
2581 2009-04-06 Zoltan Varga <vargaz@gmail.com>
2583 * object.c (mono_class_compute_gc_descriptor): Make this non-static.
2585 * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
2587 * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
2588 functions supplied by the JIT for the SGEN GC.
2590 * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
2592 2009-04-06 Massimiliano Mantione <massi@ximian.com>
2594 monitor.c (mono_monitor_try_enter_internal):
2595 Added calls to profile monitor contentions.
2596 Also duplicated a small piece of code (the "get the monitor" logic)
2597 from the fast path to the slow path, and changed the relevant goto
2598 statements, so that monitor acquisition events can be emitted from the
2599 slow path (this is by Paolo Molaro).
2601 2009-04-06 Massimiliano Mantione <massi@ximian.com>
2603 * profiler.c, profiler.h, profiler-private.h:
2604 Added support for profiling monitor contentions.
2606 2009-04-03 Rodrigo Kumpera <rkumpera@novell.com>
2608 * metadata-verify.c: Verify the modules table.
2610 2009-04-02 Rodrigo Kumpera <rkumpera@novell.com>
2612 * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
2613 using the context of the method been verifier and not of the method been called.
2615 * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
2616 safely inflate generic types.
2618 2009-04-02 Sebastien Pouliot <sebastien@ximian.com>
2620 * security-core-clr.c: Change the strategy for checking the
2621 "reflection using delegates optimization" to avoid unneeded
2622 attributes in multiple class libraries.
2624 2009-04-02 Mark Probst <mark.probst@gmail.com>
2626 * sgen-gc.c: Remove object element in the disappearing link struct
2627 by storing the object pointer in the link.
2629 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
2631 * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
2633 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
2635 * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
2637 * verify.c (mono_method_verify): Do proper bounds checking of exception
2640 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
2642 * loader.c (mono_field_from_token): Don't crash if the field parent could
2645 2009-03-31 Mark Probst <mark.probst@gmail.com>
2647 * sgen-gc.c: Execute critical finalizers after ordinary
2650 * class-internals.h, domain.c: Add CriticalFinalizerObject to
2653 2009-03-31 Jb Evain <jbevain@novell.com>
2655 * verify.c (do_ldstr): don't check if a string is in the user strings
2656 heap if the current image is dynamic.
2658 2009-03-31 Mark Probst <mark.probst@gmail.com>
2660 * sgen-gc.c: Wait until the last finalizer has executed when
2661 returning from WaitForPendingFinalizers.
2663 2009-03-31 Martin Baulig <martin@ximian.com>
2665 * mono-debug-debugger.h (MonoDebuggerEvent): Add
2666 `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
2667 `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
2668 (mono_debugger_event_create_appdomain): New function.
2669 (mono_debugger_event_unload_appdomain): New function.
2671 * appdomain.c (mono_domain_create_appdomain_internal): Call
2672 mono_debugger_event_create_appdomain().
2674 2009-03-31 Martin Baulig <martin@ximian.com>
2676 * mono-debug-debugger.c
2677 (mono_debugger_register_class_init_callback): Also register the
2678 class init callback if the class is already initialized to make
2679 things work with shadow copied assemblies.
2681 2009-03-31 Sebastien Pouliot <sebastien@ximian.com>
2683 * security-core-clr.c
2684 (mono_security_core_clr_ensure_reflection_access_field): Let
2685 critical code access the field (just like we do for methods). Use
2686 check_field_access helper.
2687 (mono_security_core_clr_ensure_reflection_access_method): Use
2688 check_field_access helper.
2690 2009-03-31 Mark Probst <mark.probst@gmail.com>
2692 * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
2693 call the run-finalize function directly.
2695 * gc.c, gc-internal.h: Make run_finalize() non-static.
2697 2009-03-31 Mark Probst <mark.probst@gmail.com>
2699 * sgen-gc.c: Use a separate struct for disappearing links.
2701 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
2703 * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
2704 * MaxIOVectorLength enabled, just ignore them.
2707 2009-03-30 Rodrigo Kumpera <rkumpera@novell.com>
2709 * metadata-verify.c: Fix eglib build.
2711 2009-03-30 Zoltan Varga <vargaz@gmail.com>
2713 * threads-types.h: Fix the win32 build.
2715 2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
2717 * class.c: move coreclr inheritance/override checks to
2719 * security-core.clr.c|h: add code from class.c with additional
2720 documentation. Fix override check when the method is not critical.
2722 2009-03-28 Zoltan Varga <vargaz@gmail.com>
2724 * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
2725 (match_class): Ditto.
2727 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
2729 * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
2731 * metadata-verify.c: Implement table layout row size calculation. Verify
2732 the total size of the tables.
2734 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
2736 * metadata-verify.c: Verify heap sizes and size to decode row counts.
2738 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2741 * console-io.[ch]: added new mono_console_init() to make sure that
2742 file descriptors 0, 1 and 2 are opened.
2745 2009-03-27 Sebastien Pouliot <sebastien@ximian.com>
2747 * appdomain.h: Export a new callback type and a new function to
2748 set this callback. This allow a mono host to provide it's own
2749 definition for "platform code".
2750 * metadata-internals.h: Add a core_clr_platform_code flag on
2751 _MonoImage to (cache and) know if it is representing platform
2753 * image.c (do_mono_image_open): Set core_clr_platform_code flag
2754 on platform code images.
2755 * security-core-clr.c|h
2756 (mono_security_set_core_clr_platform_callback): Allow the host
2757 to provide it's own platform check definition.
2758 (mono_security_core_clr_determine_platform_image): Detect if an
2759 image is platform code (using the specified callback).
2760 (mono_security_core_clr_is_platform_image): Return cached value
2763 2009-03-27 Zoltan Varga <vargaz@gmail.com>
2765 * threads.c (mono_create_thread): New helper function to wrap CreateThread
2766 which has different parameter types for the 'tid' argument in windows and
2769 * appdomain.c attach.c threads.c: Use the new helper.
2771 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
2773 * metadata-verify.c: Verify valid table bits.
2775 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
2777 * metadata-verify.c (verify_metadata_header): Store size in the size field.
2779 * metadata-verify.c: Add initial table schema verification.
2781 2009-03-26 Zoltan Varga <vargaz@gmail.com>
2783 * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
2784 obtain the refclass argument needed by mono_param_get_objects (). Fixes
2787 * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
2789 * appdomain.c (MONO_CORLIB_VERSION): Bump this.
2791 2009-03-26 Sebastien Pouliot <sebastien@ximian.com>
2793 * security-core-clr.c: Add/update documentation
2795 2009-03-26 Zoltan Varga <vargaz@gmail.com>
2797 * marshal.c (emit_marshal_object): Generate code to throw an exception
2798 instead of throwing it. Fixes #488670.
2800 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
2802 * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
2803 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
2804 an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
2805 and add a call to mono_security_core_clr_ensure_delegate_creation
2806 to do the extra checks required by CoreCLR.
2807 * security-core-clr.c|h: Add function to check delegate creation,
2808 both in the binding and accessibility, under CoreCLR.
2810 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
2812 * reflection.c (mono_reflection_create_dynamic_method): when
2813 coreclr is enabled make sure that every resolved object are
2814 checked (e.g. field and method access).
2815 * security-core-clr.c|h: Add function to check objects resolved
2816 when a dynamic method is created.
2818 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
2820 * metadata-verify.c: Cache directory rva translations.
2822 * metadata-verify.c: Add cli-header and streams verification.
2824 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
2826 * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
2827 the wrong offset (8 instead of 6).
2829 2009-03-23 Zoltan Varga <vargaz@gmail.com>
2831 * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
2832 methods, return the native function address itself. Fixes
2835 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
2837 * console-io.c: some of the values for control characters might not be
2840 2009-03-21 Sebastien Pouliot <sebastien@ximian.com>
2842 * exception.c|h: Add helpers to create [Field|Method]AccessException
2843 * icall.c: Add required coreclr check calls for field reflection.
2844 Move the existing (method) check logic into security-core-clr.c
2845 * security-core-clr.c: Add functions to check if the access of a
2846 field or method is allowed when reflecting under coreclr. This is
2847 mostly done using a stack walk to find the "real" caller: i.e. the
2848 code that is calling the reflection
2850 2009-03-20 Zoltan Varga <vargaz@gmail.com>
2852 * gc-internal.h: Change location of gc_wrapper.h
2854 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
2856 * class.c: Simplification to coreclr checks for overrides that
2857 makes it easier to set breakpoints.
2859 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
2861 * security-core-clr.c|h: (mono_security_core_clr_class_level,
2862 mono_security_core_clr_method_level): Avoid potential
2863 MonoCustomAttrInfo allocation for transparent assemblies (e.g.
2864 user/application code) and make it easier to set breakpoints
2866 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
2868 * metadata-verify.c: Reject cli header tables that mono don't handle.
2870 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
2872 * pedump.c: Fix CLI header dumping.
2874 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
2876 * metadata-verify.c: More CLI header verification.
2878 2009-03-19 Zoltan Varga <vargaz@gmail.com>
2880 * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
2882 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
2884 * metadata-verify.c: Initial verification of the CLI header.
2886 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
2888 * metadata-verify.c (verify_resources_table): Fix verification of zero
2889 sized resource section and id entries count.
2891 2009-03-18 Zoltan Varga <vargaz@gmail.com>
2893 * icall.c: Handle user types in many Type icalls. Fixes #486303.
2895 2009-03-17 Jb Evain <jbevain@novell.com>
2897 * profiler.c: call mono_gc_base_init from mono_profiler_load.
2899 2009-03-17 Zoltan Varga <vargaz@gmail.com>
2901 * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
2902 (mono_gc_make_descr_for_array): Ditto.
2904 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
2906 * verify.c (mono_verifier_is_class_full_trust): Add support for
2907 CoreCLR security mode where trusted assemblies are defined as
2910 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
2912 * metadata-verify.c: Add minimal PECOFF resource verification.
2914 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
2916 * metadata-verify.c: Be less restrictive with some coff fields.
2918 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
2920 * verify.c (init_stack_with_value_at_exception_boundary): Init generic
2921 params as boxed values on stack. Fixes #485706.
2923 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
2925 * console-io.c: the termios values may vary in different flavors of unix.
2927 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
2929 * console-io.[ch]: return the entire set of control characters when
2930 initializing the terminal.
2931 * appdomain.c: bump corlib version.
2933 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
2935 * mono-perfcounters.c: added support for in-process custom
2936 performance counters.
2938 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
2940 * metadata-verify.c: Small cleanup and add comment for IAT directory entry.
2942 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
2944 * metadata-verify.c: Verify the data pointed by the import table.
2946 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
2948 * metadata-verify.c (load_data_directories): Store data
2951 * metadata-verify.c: Verify the import table.
2953 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
2955 * metadata-verify.c: Verify data directories.
2957 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
2959 * metadata-verify.c: Check section header flags.
2961 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
2963 * appdomain.c: if the assembly name is a shadow-copied file, return
2964 TRUE from mono_is_shadow_copy_enabled but don't actually do anything
2965 in mono_make_shadow_copy.
2966 * icall.c: if the assembly name is a shadow-copied file, replace it
2967 with the original assembly path.
2969 Bug #484244 fixed. NUnit tests for corlib can be run without
2972 2009-03-12 Zoltan Varga <vargaz@gmail.com>
2974 * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
2975 entries when the table is reallocated.
2977 * icall.c: Allocate the memory used by the mono_ptr_array macros using
2978 mono_gc_alloc_fixed () since it contains GC refs.
2980 2009-03-10 Zoltan Varga <vargaz@gmail.com>
2982 * reflection.c (ensure_complete_type): New helper function to call
2983 type resolve handlers for unfinished dynamic types.
2984 (resolve_object): Call it for MonoClassFields. Fixes #483852.
2986 2009-03-09 Zoltan Varga <vargaz@gmail.com>
2988 * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
2991 2009-03-08 Rodrigo Kumpera <rkumpera@novell.com>
2993 * appdomain.c (get_shadow_assembly_location): Fix memleak.
2995 2009-03-08 Zoltan Varga <vargaz@gmail.com>
2997 * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
2998 between GCHandles of type WeakTrackResurrection and the objects they
3001 * gc.c: Partly implement the sematics of GCHandles of type
3002 WeakTrackResurrection: these handles should only be cleared after the
3003 finalizer of the object they are pointing to has ran.
3005 2009-03-06 Mark Probst <mark.probst@gmail.com>
3007 * icall.c: Partially revert r126631 because using the jump
3008 trampolines for generic shared methods makes it superfluous.
3010 2009-03-06 Zoltan Varga <vargaz@gmail.com>
3012 * threads.c (handle_store): Create the 'threads' hash table with the proper
3013 MONO_HASH_VALUE_GC type.
3015 2009-03-05 Zoltan Varga <vargaz@gmail.com>
3017 * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
3020 * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
3021 and LAST_GC_TRACKED as a GC root.
3023 * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
3025 * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
3026 the static data even if it consists of 1 reference.
3028 * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
3029 if there is a GC descriptor.
3031 * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
3032 instead of through the GC since they contain no object references.
3034 2009-03-05 Mark Probst <mark.probst@gmail.com>
3036 * generic-sharing.c (instantiate_other_info): Always return a jump
3037 trampoline for method code.
3039 2009-03-05 Marek Habersack <mhabersack@novell.com>
3041 * culture-info-tables.h: generated to include the en-tt culture.
3043 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3045 * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
3046 capture the thread context.
3048 * object.c (mono_async_result_new): Cache the invoke wrappers to
3049 ExecutionContext::Capture.
3051 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3053 * marshal.h: Add a prototype for what mono_compile_method returns
3054 for invoke wrappers.
3056 * gc.c: Use the new prototype declaration.
3058 2009-03-04 Geoff Norton <gnorton@novell.com>
3060 * boehm-gc.c: Add some MONO_LOG tracing for the GC
3062 * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
3064 2009-03-04 Martin Baulig <martin@ximian.com>
3067 (mono_debugger_runtime_invoke): Removed.
3069 * mono-debug-debugger.c
3070 (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
3072 2009-03-02 Martin Baulig <martin@ximian.com>
3075 (mono_debugger_unhandled_exception): Removed.
3076 (mono_debugger_handle_exception): Removed.
3077 (mono_debugger_throw_exception): Removed.
3080 (mono_debug_debugger_version): Bump to 5.
3082 * mono-debug-debugger.c: Moved the exception handling code to
3083 ../mini/debug-mini.c
3085 2009-03-03 Zoltan Varga <vargaz@gmail.com>
3087 * domain-internals.h (struct _MonoDomain): Add a separate lock for the
3088 finalize_objects_hash.
3090 * gc.c: Use the separate lock to access the finalize_objects_hash field.
3092 * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
3095 * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
3098 * image.c (mono_image_close): Free it.
3100 * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
3101 allowing a creation of a wrapper which invokes its method using a CALLVIRT
3102 on the this argument.
3104 * gc.c (run_finalize): Optimize the calling of the finalizers.
3106 2009-03-03 Martin Baulig <martin@ximian.com>
3108 * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
3109 of the `MonoGenericInst' changes.
3111 2009-03-03 Rodrigo Kumpera <rkumpera@novell.com>
3113 * icall.c (ves_icall_MonoType_GetGenericArguments): Use
3114 mono_array_class_get_cached to reduce locking contention. Extract
3117 * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
3118 intermediary managed arrays. Use caching version of mono_array_new
3119 to allocate the result array.
3121 * icall.c (ves_icall_Type_GetEvents_internal): Same.
3123 * icall.c (ves_icall_Type_GetNestedTypes): Same.
3125 * locales.c (create_names_array_idx): Use mono_array_new_cached
3126 to reduce locking contention.
3128 2009-03-03 Zoltan Varga <vargaz@gmail.com>
3130 * object.c (mono_method_add_generic_virtual_invocation): Put back the
3131 thunk builder code for the non-interface case.
3133 2009-03-02 Zoltan Varga <vargaz@gmail.com>
3135 * object.c (get_generic_virtual_entries): New helper function to collect
3136 the virtual generic method instances which need to be added to an IMT
3138 (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
3139 Instead of creating a new IMT thunk, reset the vtable slot to the
3140 trampoline, the thunk will be created the next time the trampoline is called.
3141 (build_imt_slots): Add support for virtual generic methods in interfaces by
3142 adding to the IMT thunk all the methods registered using
3143 mono_method_add_generic_virtual_invocation ().
3145 * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
3146 (struct _MonoIMTCheckItem): Ditto.
3148 * object.c (mono_method_add_generic_virtual_invocation): Take a
3149 MonoMethod argument instead of a MonoGenericInst. Fix the construction of
3150 the IMT thunk to include all items.
3152 * object.c (mono_class_create_runtime_vtable): Add a missing
3153 mono_loader_unlock ().
3155 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
3157 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3159 * object-internals.h (MonoReflectionEvent): Add cached_add_event.
3161 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
3163 * object-internals.h: Rename _MonoReflectionEvent to
3164 MonoReflectionMonoEvent so it reflects the right managed type.
3165 Add a MonoReflectionEvent that correctly represents System.EventInfo.
3168 * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
3171 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
3173 * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
3174 intermediary managed arrays. Use caching version of mono_array_new
3175 to allocate the result array.
3177 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
3179 * reflection.c: Use cached version of mono_array_new alongside
3180 the mono_reflection_get_custom_attrs_by_type call path.
3182 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
3184 * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
3185 intermediary managed arrays. Use caching version of mono_array_new
3186 to allocate the result array.
3188 * icall.c (ves_icall_Type_GetConstructors_internal): Same.
3190 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
3192 * icall.c: Add small implementation of a growable stack bound array.
3194 * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
3196 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
3197 intermediary managed arrays. Use caching version of mono_array_new
3198 to allocate the result array.
3200 2009-02-27 Rodrigo Kumpera <rkumpera@novell.com>
3202 * icall.c: New icall ves_icall_System_Enum_compare_value_to that
3203 helps Enum::CompareTo to be implemented without reboxing all enums
3204 to their underlying type.
3205 2009-02-27 Zoltan Varga <vargaz@gmail.com>
3207 * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
3208 since it acquires a global lock leading to scalability problems.
3210 * profiler.c: Make the stat profiler work with multiple appdomains, this
3211 currently only works when no appdomains are unloaded.
3213 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
3215 * appdomain.c: make the check to avoid copying when the assembly is
3216 already shadow copied actually work.
3218 2009-02-26 Zoltan Varga <vargaz@gmail.com>
3220 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3222 * object-internals.h (struct _MonoReflectionGenericClass): Sync with
3223 changes to the managed side.
3225 2009-02-25 Zoltan Varga <vargaz@gmail.com>
3227 * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
3228 classes + a separate lock for it, as it is used frequently at runtime, not
3229 just during metadata loading/JIT compilation.
3231 * class.c (mono_bounded_array_class_get): Use the separate cache + lock
3234 * object-internals.h (mono_class_from_name_cached): New macro to cache
3235 the results of the lookup locally without having to declare a static
3236 variable to hold it.
3237 (mono_class_get_field_from_name_cached): Ditto.
3238 (mono_array_class_get_cached): Ditto.
3240 * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
3243 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
3244 slower search in metadata.
3246 * pedump.c: Fix a warning.
3248 2009-02-23 Zoltan Varga <vargaz@gmail.com>
3250 * reflection.c (encode_locals): Add checks for user types.
3251 (method_encode_clauses): Ditto.
3252 (method_encode_code): Ditto.
3253 (mono_image_create_token): Ditto.
3255 * object-internals.h: Change the type of more fields from MonoReflectionType*
3258 2009-02-22 Zoltan Varga <vargaz@gmail.com>
3260 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
3261 the a thread does not suspend within 100ms.
3263 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
3264 in addition to StopRequested as well.
3266 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
3268 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
3269 search the method_hash before inserting a new entry, to avoid crashes when
3270 the same method is inserted multiple times, causing the old
3271 MonoDebugMethodInfo structure to be freed by the value dtor function.
3273 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3275 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
3276 SO_EXLUSIVEADDRUSE where available.
3278 2009-02-21 Zoltan Varga <vargaz@gmail.com>
3280 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
3281 runtime invoke wrappers, this time it is string ctor wrappers, which
3282 pass a dummy string as 'this' instead of their obj argument. Fixes
3285 2009-02-21 Jb Evain <jbevain@novell.com>
3287 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3288 only get create_culture once.
3290 2009-02-20 Zoltan Varga <vargaz@gmail.com>
3292 * reflection.c (mono_reflection_setup_internal_class): Move the user type
3293 check before the locking.
3295 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
3296 (mono_reflection_create_runtime_class): Ditto.
3297 (mono_reflection_sighelper_get_signature_local): Ditto.
3298 (mono_reflection_sighelper_get_signature_field): Ditto.
3300 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
3301 is a System.MonoType object or similar.
3302 (monotype_cast): New helper function to cast a MonoObject to a
3303 MonoReflectionType object.
3305 * object-internals.h: Change MonoReflectionType* members in structures to
3306 MonoObject* members to force the usage of the monotype_cast () function.
3308 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
3309 structures/arrays. This causes us to assert instead of crashing when
3310 instances of user defined subclasses of System.Type are encountered.
3312 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3316 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
3317 win32 resource loaded from a PE file.
3319 * image.c: fix mono_image_lookup_resource.
3321 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3325 * threads.c: added internal call for WaitHandle.SignalAndWait.
3327 2009-02-19 Bill Holmes <billholmes54@gmail.com>
3329 * cominterop.c : Adding cominterop_type_from_handle and
3330 registering it as an icall. Replacing all references
3331 to type_from_handle.
3333 Code is contributed under MIT/X11 license.
3335 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3337 * Makefile.am: Add lock-tracer.h and lock-trace.c.
3339 * appdomain.c: Call the tracer init function.
3341 * domain-internals.h: Enable the tracer for the domain locks.
3343 * image.c: Enable the tracer for image locks.
3345 * loader.c: Enable the trace for the loader lock.
3348 * lock-tracer.c: Initial implementation of the lock trace utility.
3349 The tracer requires a compile time define to be enabled and a env var
3350 to be enabled at runtime.
3352 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3354 * domain.c (mono_domain_code_foreach): Improve documentation.
3356 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3359 * generic-sharing.c:
3361 * reflection.c: Adjust locking order to the new semantics where the loader lock
3364 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
3366 * domain.c: Add mono_domain_code_* functions that perform locking
3367 around the domain codeman.
3369 * domain-internals.h: Export those functions.
3371 * object.c: Use new functions instead of acquiring the domain lock.
3373 2009-02-19 Zoltan Varga <vargaz@gmail.com>
3375 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
3376 delegate. Fixes #477396.
3378 2009-02-18 Zoltan Varga <vargaz@gmail.com>
3380 * reflection.c (create_custom_attr): Get rid of alloca.
3382 2009-02-18 Bill Holmes <billholmes54@gmail.com>
3384 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
3385 Adding exception handling for all CCW calls.
3387 Code is contributed under MIT/X11 license.
3389 2009-02-18 Zoltan Varga <vargaz@gmail.com>
3391 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
3393 * marshal.c (emit_marshal_boolean): Add null checks to the new
3394 native->managed marshalling code. Fixes #476247.
3396 2009-02-17 Zoltan Varga <vargaz@gmail.com>
3398 * class.c (mono_class_get_vtable_entry): Move the addition of
3399 static rgctx invoke wrappers for vtable methods here, this simplifies
3400 a lot of code and causes fewer rgctx wrappers to be created.
3402 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
3403 name of the statistics to begin with an uppercase.
3405 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
3407 * reflection.c: Revert previous change as it breaks the build.
3409 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
3411 * verify.c: Properly handle SZARRAY element type.
3415 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
3417 * reflection.c (mono_image_create_method_token): Correctly encode
3418 MethodDef MemberRefParent token.
3422 2009-02-17 Zoltan Varga <vargaz@gmail.com>
3424 * image.c (mono_image_close): Delete the critical section before
3425 freeing the memory holding it.
3427 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3429 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
3432 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3434 * pedump.c (main): Call mono_marshal_init so pedump
3437 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3439 * loader.c (method_from_memberref): Properly fix #474271 and
3440 don't break the runtime bad.
3442 2009-02-16 Zoltan Varga <vargaz@gmail.com>
3444 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
3445 (mono_domain_alloc0): Ditto.
3447 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3449 * loader.c (method_from_memberref): Don't abort if the array
3450 method is not found. A regular loader failure is more informative
3455 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3457 *loader.c: Guard MonoImage::method_cache/methodref_cache
3458 using the image lock instead of the loader lock.
3460 * metadata.h: Add comments about which fields are protected by
3463 2009-02-16 Zoltan Varga <vargaz@gmail.com>
3465 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
3467 * generic-sharing.c (mono_method_construct_object_context): Remove the
3468 wrapper_type == NONE assert, it is not needed.
3470 2009-02-15 Zoltan Varga <vargaz@gmail.com>
3472 * reflection.c (clear_cached_object): New helper function.
3473 (mono_method_clear_object): New function to clear the cached reflection
3474 objects for a dynamic method.
3476 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
3477 Partly fixes # 463323.
3479 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
3483 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
3485 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
3487 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
3488 take the image lock instead of the loader lock.
3490 * metadata-internals.h: Export new functions.
3492 2009-02-12 Miguel de Icaza <miguel@novell.com>
3494 * domain.c (app_config_parse): Remove another use of stat that is
3495 not necessary as g_file_get_contents already does the presence
3498 2009-02-13 Zoltan Varga <vargaz@gmail.com>
3500 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
3502 * marshal.c: Move the bstr handling code to cominterop.c.
3504 * marshal.c: Remove some COM interop code missed previously.
3506 2009-02-12 Miguel de Icaza <miguel@novell.com>
3508 More Paolo patches from the Wii port:
3510 * security.c: Remove ves_icall_System_Environment_get_UserName
3513 * icall.c: And put ves_icall_System_Environment_get_UserName
3516 * appdomain.c (mono_set_private_bin_path_from_config): Remove
3517 redundant call to stat that was only used to test for the file
3518 existence. Patch from Paolo.
3520 * gc.c (run_finalize): If COM is disabled, do not link in
3521 mono_marshal_free_ccw.
3523 * generic-sharing.c: Use alloca.h here as well.
3525 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
3527 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
3529 2009-02-13 Zoltan Varga <vargaz@gmail.com>
3531 * cominterop.c cominterop.h: New files.
3533 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
3534 function/typedefs which are needed by cominterop.c global.
3536 2009-02-12 Mark Probst <mark.probst@gmail.com>
3538 * generic-sharing.c: Don't take the loader lock to guard image
3541 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3543 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
3544 called without the loader lock which is required to guard MonoImage:tokens.
3546 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3552 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
3554 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3556 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
3557 Rework the code to use regular mono_image_alloc/0.
3559 * loader.c: Rework the code to use regular mono_image_alloc/0.
3561 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
3563 2009-02-12 Bill Holmes <billholmes54@gmail.com>
3565 * object-internals.h : Fixing a typo in the
3566 MonoReflectionComVisibleAttribute struct.
3568 * marshal.c (cominterop_com_visible): Check the implemented
3569 interfaces for ComImport.
3571 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
3572 assume that bools should be treated as VARIANTBOOLs.
3574 * marshal.c (emit_marshal_boolean): Adding cases for
3575 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
3577 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
3578 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
3580 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
3581 should be treated as VARIANTBOOLs.
3583 Code is contributed under MIT/X11 license.
3585 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3587 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
3588 allocation with the image lock.
3590 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3592 This patch is the last of a series to remove explicit reference of MonoImage::mempool
3593 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
3595 * object.c: Add mono_string_to_utf8_image.
3597 * object-internals.h: Export mono_string_to_utf8_image.
3599 * reflection.c: Rework all explicit references to the the image mempool to go thought
3600 the mono_image_alloc set of functions.
3602 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3604 This patch is the third of a series to remove explicit reference of MonoImage::mempool
3605 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
3606 and generics-sharing.c.
3608 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
3609 as first argument. Note that this function remains broken as it doesn't perform locking around the
3612 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
3614 * image.c: Add g_slist_append_image.
3616 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
3617 the supplied image for allocation. Move code into mono_metadata_field_info_full.
3619 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
3620 Fix all related code to do the same.
3622 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
3624 * metadata-internals.h: Fix the signatures.
3626 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3628 This patch is the second of a series to remove explicit reference of MonoImage::mempool
3629 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
3630 and similar to work using MonoImage.
3632 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
3635 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
3637 * class.c (mono_metadata_signature_deep_dup): Same.
3639 * class.c (inflate_generic_type): Same.
3641 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
3643 * metadata.c (mono_metadata_signature_dup_full): Same.
3645 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
3646 mono_metadata_signature_dup_full.
3648 * metadata.c (mono_metadata_type_dup): Same.
3650 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
3652 * reflection.c: Same.
3654 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
3656 * metadata-internals.h: Fix the signatures.
3658 * class-internals.h: Same.
3660 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
3662 This patch is the first of a series to remove explicit reference of MonoImage::mempool
3663 and use mono_image_alloc set of functions instead.
3665 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
3666 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
3669 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
3671 * class.c (g_list_prepend_mempool): Removed.
3673 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
3675 * image.c: Add g_list_prepend_image.
3677 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
3679 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
3682 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
3684 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
3687 * image.c (mono_image_init): Init the lock field.
3689 * image.c (mono_image_init): Cleanup the lock field.
3691 * image.c: Add mono_image_(un)lock functions.
3693 2009-02-11 Mark Probst <mark.probst@gmail.com>
3695 * class.c, class-internals.h: mono_method_get_context_general()
3696 combines the functionality of mono_method_get_context() and
3697 mini_method_get_context().
3699 * generic-sharing.c, domain-internals.h:
3700 mono_method_construct_object_context() and
3701 mono_domain_lookup_shared_generic() moved from mini.
3703 * icall.c (ves_icall_InternalInvoke): Handle the case where the
3704 method doesn't have the correct instantiation because it's shared
3705 generic code. Fixes #473999.
3707 2009-02-11 Zoltan Varga <vargaz@gmail.com>
3709 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
3711 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
3713 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
3715 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
3717 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
3719 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
3720 and recheck the cache for dups after it.
3722 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
3724 Fixes one of the deadlocks found in #473150.
3726 2009-02-11 Bill Holmes <billholmes54@gmail.com>
3728 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
3729 For Win32, add additional break conditions for accept.
3731 Code is contributed under MIT/X11 license.
3733 2009-02-10 Zoltan Varga <vargaz@gmail.com>
3735 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
3736 lazily initialize the native wrapper cache.
3737 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
3738 cache, since they are different from the normal wrappers.
3740 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
3742 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
3743 AOT compiled native wrappers.
3745 2009-02-09 Geoff Norton <gnorton@novell.com>
3748 * security-core-clr.c: Allow enabling core-clr from the embedding
3751 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3753 * socket-io.c: when requesting all the local ips, if there are no
3754 interfaces up and running, MS returns 127.0.0.1.
3756 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3758 * mono-perfcounters-def.h: processor time is an inverse time.
3761 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3763 * socket-io.c: an empty host name returns the list of local IPs.
3764 Fixes bug #386637 part 1/2.
3766 2009-02-07 Zoltan Varga <vargaz@gmail.com>
3768 * verify.c (mono_class_interface_implements_interface): Call
3769 mono_class_setup_interfaces ().
3770 (merge_stacks): Ditto.
3772 2009-02-06 Zoltan Varga <vargaz@gmail.com>
3774 * class.c (mono_class_setup_interfaces): New function to lazily initalize
3776 (mono_generic_class_get_class): Don't initalize klass->interfaces.
3777 (mono_generic_class_get_class): Ditto.
3779 2009-02-06 U-QUACK\miguel <miguel@quack>
3781 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
3782 they live in security.c
3784 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
3785 another bit from Paolo's code.
3787 2009-02-06 Zoltan Varga <vargaz@gmail.com>
3789 * object.c (build_imt_slots): Add a small optimization to avoid inflating
3790 methods which will be discarded by add_imt_builder_entry ().
3792 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
3795 * loader.c: Add a statistics for the size of the memberref signature cache.
3797 * loader.c (find_cached_memberref_sig): New helper function.
3798 (cache_memberref_sig): Ditto.
3800 * loader.c: Cache the result of parsing memberref signatures, since otherwise
3801 they will be parsed again for every generic instantiation, leading to unbounded
3804 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3806 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
3807 parameters of generic methods.
3809 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
3810 after the original method is copied to the inflated method.
3811 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
3813 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
3814 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
3816 * class.c metadata.c: Update after the changes above.
3818 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
3820 * metadata-verify.c: Simplified error handling and added
3821 section table validation.
3823 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3825 * class-internals.h (MonoClassExt): New structure containing rarely used
3826 fields of MonoClass.
3827 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
3828 through a new 'ext' field.
3830 * class.c (mono_class_alloc_ext): New helper function to allocate
3833 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
3835 2009-02-05 Mark Probst <mark.probst@gmail.com>
3837 * object.c (mono_object_get_virtual_method): Properly inflate
3838 generic methods. Fixes #472692.
3840 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
3842 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
3843 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
3844 for the parent type, the created type must be ready to be used on a generic
3846 We fill this_arg/byval_arg if the parent is a generic instance to make sure
3847 we won't have duplicated entries in generic_inst_cache.
3851 2009-02-05 Miguel De Icaza <miguel@novell.com>
3853 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
3854 replace with plain BSD per the comments on the bug MONO77637.
3856 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3858 * class.c (mono_class_get_generic_class): New accessor function.
3859 (mono_class_get_generic_container): Ditto.
3861 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
3862 fields, similar to the ones in MonoMethod.
3864 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
3865 (mono_class_create_from_typedef): Set klass->is_generic if needed.
3867 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
3869 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
3870 the same information as element_class->byval_arg.
3872 * class.c reflection.c: Remove references to class->byval_arg.
3874 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
3875 klass->enum_basetype directly.
3877 * verify.c metadata.c object.c icall.c reflection.c: Use
3878 mono_class_enum_basetype () instead of accessing klass->enum_basetype
3881 2009-02-04 Miguel de Icaza <miguel@novell.com>
3883 * icall-def.h: Remove internal calls for sockets when
3884 DISABLE_SOCKET is defined, file system writing features when the
3885 OS only support reading and not writing data and Policy support if
3886 the Policy is disabled.
3888 * image.c (do_mono_image_open): Apply Paolo's patches for using
3889 mono_file_map_ APIs here.
3891 * assembly.c: Add support for platforms to avoid prefix
3894 2009-02-04 Zoltan Varga <vargaz@gmail.com>
3896 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
3899 * class.c (mono_class_inflate_generic_class): New helper function.
3901 * class.c: Use mono_class_inflate_generic_class in a few places. Add
3902 statistics for inflated methods/classes.
3904 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
3906 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
3907 the call is made from Delegate.CreateDelegate () for the invoke method of
3910 * loader.c: Add a statistics for the memory occupied by inflated signatures.
3912 * metadata.c (mono_metadata_signature_size): New helper function.
3914 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
3917 * metadata.c (inflated_method_in_image): Avoid calling
3918 mono_method_signature () if the method does not already have a signature.
3920 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
3922 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
3923 valuetype is compatible with target type, check by inheritance as a
3924 VT is not really compatible with System.ValueType, for example.
3926 * verify.c (do_invoke_method): Improve error message.
3928 * verify.c (do_box_value): If boxing a nullable, use the type argument
3931 * verify.c (do_newobj): Improve error message.
3935 2009-02-03 Miguel de Icaza <miguel@novell.com>
3937 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
3939 2009-02-03 Mark Probst <mark.probst@gmail.com>
3941 * generic-sharing.c: Don't hold domain lock when calling
3942 instantiate_other_info(). Fixes #471958.
3944 * domain-internals.h, loader.c: Describe locking policy of domain
3945 lock vs loader lock.
3947 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
3949 * verify.c (mono_delegate_signature_equal): Make it possible to check
3950 first-arg-bound delegates to static method.
3952 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
3953 static methods with the first arg bound.
3957 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
3959 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
3962 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
3963 under strict mode. Any type, when boxed can be seen as a reference type.
3967 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
3969 * object.h: The lower bound of an array is a signed integer value.
3970 Introduce mono_array_lower_bound_t typedef. It should be used instead of
3971 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
3973 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
3974 calculate the upper bound.
3978 2009-02-02 Miguel de Icaza <miguel@novell.com>
3980 From Paolo's work, refactored, cleared up:
3982 * threadpool.c, icall.c: ifdef code that requires a working socket
3985 * metadata.c (mono_metadata_field_info): Do not attempt to return
3986 a value from a function declared as void.
3988 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
3989 from the console stack.
3991 * assembly.c: use strrchr instead of rindex.
3993 * class.c, object.c, marshal.c, icall.c, reflection.c: include
3994 alloca.h on systems that have it.
3996 * environment.c: Avoid code that uses stuff from
3999 * appdomain.c: Include sys/time.h.
4001 * console-io.c: include sys/ioctl.h if it is available.
4003 2009-02-03 Zoltan Varga <vargaz@gmail.com>
4005 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
4007 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
4010 * marshal.c: Set mb->skip_visibility instead of setting it on the method
4011 after it was created and cached, as the later is not thread safe.
4013 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4015 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
4016 called while the debugging module is not initialized. Fixes #471669.
4018 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
4020 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
4024 2009-02-02 Mark Probst <mark.probst@gmail.com>
4026 * generic-sharing.c (lookup_or_register_other_info): Make sure the
4027 loader lock is not taken while the templates lock is held. Fixes
4030 2009-02-02 Mark Probst <mark.probst@gmail.com>
4032 * metadata.c (type_in_image): Added a check to fix a monodis
4035 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4037 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
4040 * object.c (mono_runtime_invoke_array): Ditto.
4042 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
4043 freeing wrappers of dynamic methods.
4045 * loader.c (mono_free_method): Call it. Fixes #463323.
4047 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
4048 methods taking vtype/byref arguments, to fix yet another bug caused by
4049 the sharing of runtime invoke wrappers. Partly fixes #471259.
4051 2009-02-01 Zoltan Varga <vargaz@gmail.com>
4053 * debug-mono-symfile.c (check_line): Return NULL instead of returning
4054 <first file in file table>:1 when the IL offset does not have an associated
4057 2009-01-31 Zoltan Varga <vargaz@gmail.com>
4059 * mono-debug.c (mono_debug_lookup_locals): New function to return local
4060 variable info for a method.
4062 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
4064 2009-01-30 Jb Evain <jbevain@novell.com>
4066 * pedump.c: reuse code from monodis to make sure pedump honors
4067 MONO_PATH, which is needed to verify net_2_1 assemblies.
4069 2009-01-29 Zoltan Varga <vargaz@gmail.com>
4071 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
4072 there is no line number info.
4074 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
4076 Avoid some MonoType allocations
4077 * reflection.c (mono_reflection_initialize_generic_parameter):
4078 Reuse MonoType from param->pklass rather than allocating one.
4079 (mono_dynamic_image_free): Update to changes.
4081 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
4083 Rearrange some code to improve consistency
4084 * reflection.c (mono_reflection_setup_generic_class): Move body ...
4085 (mono_reflection_initialize_generic_parameter): ... here.
4087 2009-01-28 Zoltan Varga <vargaz@gmail.com>
4089 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
4090 with type constraints as an experiment.
4092 * boehm-gc.c (on_gc_notification): Update mono_stats.
4094 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
4096 Avoid some allocations
4097 * class-internals.h (_MonoGenericInst::type_argv): Convert from
4098 pointer to tail array to avoid extra allocation.
4099 * metadata.c (free_generic_inst): Update to changes.
4100 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
4103 2009-01-27 Zoltan Varga <vargaz@gmail.com>
4105 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
4106 return TRUE if the two type objects are the same.
4108 2009-01-26 Zoltan Varga <vargaz@gmail.com>
4110 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
4111 (mono_class_native_size): Use klass->marshal_info->min_align instead of
4112 klass->min_align, since klass->min_align contains the managed alignment,
4113 while the native alignment can be different, like for longs on x86.
4116 * class-internals.h (MonoMarshalType): Add a min_align field.
4118 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
4120 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
4123 2009-01-26 Zoltan Varga <vargaz@gmail.com>
4125 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
4126 some comments about the usage of the used_regs field.
4128 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
4131 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
4133 * appdomain.c: return NULL instead of throwing FileNotFoundException
4134 when LoadAssembly() fails.
4136 2009-01-23 Mark Probst <mark.probst@gmail.com>
4138 * metadata.c (mono_metadata_generic_param_equal): Only compare the
4139 image if the owner is NULL. Fixes the AOT failures.
4141 2009-01-23 Zoltan Varga <vargaz@gmail.com>
4143 * metadata.c (mono_metadata_load_generic_params): Initialize the
4144 MonoGenericParam structure using memset so the image field is initialized
4147 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4149 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
4152 2009-01-21 Zoltan Varga <vargaz@gmail.com>
4154 * class.c (mono_class_setup_vtable_general): In the generic instance
4155 optimization, set method->slot for abstract virtual methods. Fixes part of
4158 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4160 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
4161 which signals that the unloading has started but all appdomain services must
4164 * appdomain.c (mono_domain_unload): The initial state for unloading now
4165 is unloading_start and we switch to unloading after the managed call to
4166 AppDomain::DomainUnload has finished.
4168 The new unloading state has to be created because managed code in the
4169 DomainUnload event can depend on things like the threadpool still working.
4170 The domain must remain fully functional while the event executes.
4172 This shown as an issue due to Process::WaitForExit, which waits for
4173 async reads of stdout and stderr to complete. Since those are processed
4174 in the threadpool the code deadlocks because the DomainUnload callback
4175 waits for the async read finished event, which should have been set by a
4176 threadpool job but has been discarded due to the domain been in unload
4179 2009-01-21 Mark Probst <mark.probst@gmail.com>
4181 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
4184 2009-01-21 Mark Probst <mark.probst@gmail.com>
4186 * reflection.c (resolve_object): For fields, inflate the class and
4187 then get the field in the inflated class.
4189 2009-01-20 Mark Probst <mark.probst@gmail.com>
4191 * object-internals.h (struct _MonoException): Added a comment
4192 explaining the new use of trace_ips.
4194 2009-01-20 Mark Probst <mark.probst@gmail.com>
4196 * generic-sharing.c (inflate_other_data): Inflate array methods
4199 * loader.c, class-internals.h: Rename search_in_array_class() to
4200 mono_method_search_in_array_class() and make it non-static.
4202 2009-01-19 Zoltan Varga <vargaz@gmail.com>
4204 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
4205 Hopefully fixes #458168.
4207 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
4209 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
4210 as it is performed elsewhere.
4212 Code is contributed under MIT/X11 license
4214 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
4216 * mono-perfcounters-def.h: Add counters for asp.net requests total and
4218 * object.c (mono_raise_exception): Increment the exceptions total
4219 counter when an exception is thrown.
4220 * class-internals.h: Add a location for storing the total number of
4221 asp.net requests served.
4222 * mono-perfcounters.c: Implement update support for asp.net counters
4223 from the class libraries. Implement read support for asp.net counters
4224 and exceptions total counter.
4226 2009-01-19 Zoltan Varga <vargaz@gmail.com>
4228 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
4229 accessing klass->methods. Fixes #467385.
4231 2009-01-18 Zoltan Varga <vargaz@gmail.com>
4233 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
4234 for byval arguments without an [Out] attribute. Fixes #467212.
4236 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
4237 Fix compilation under android.
4239 * sgen-gc.c: Instead of scanning gray objects after all roots have been
4240 processed, scan them directly after they are copied, to achieve better locality
4243 * socket-io.c: Applied patch from Koushik Dutta
4244 (koush@koushikdutta.com). Disable IPV6 when running under android.
4246 2009-01-18 Zoltan Varga <vargaz@gmail.com>
4248 * icall.c (ves_icall_InternalExecute): Add write barriers.
4250 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
4253 * sgen-gc.c: Implement write barriers in IL code.
4255 2009-01-17 Geoff Norton <gnorton@novell.com>
4257 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
4259 2009-01-17 Geoff Norton <gnorton@novell.com>
4261 * image.c: When unloading the image->references table, there can be gaps
4262 in it. Ensure that we iterate every entry to avoid leaking assembly references
4263 when unloading an appdomain.
4265 2009-01-16 Zoltan Varga <vargaz@gmail.com>
4267 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
4268 speed up ptr-in-nursery checks.
4270 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
4271 threads_lock () to prevent deadlocks.
4273 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
4274 does not need to be scanned during minor collections, since writes to it
4275 must use write barriers.
4277 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
4279 * metadata-verify.c: Add pe nt header verification.
4281 2009-01-15 Zoltan Varga <vargaz@gmail.com>
4283 * gc.c: Fix a few warnings when using SGEN.
4285 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
4287 * metadata-verify.c: Add pe optional header verification.
4289 2009-01-15 Zoltan Varga <vargaz@gmail.com>
4291 * sgen-gc.c: Add support for user defined marker functions, used by
4292 MonoGHashTable to avoid registering a GC root for every hash node.
4294 2009-01-14 Zoltan Varga <vargaz@gmail.com>
4296 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
4297 non-pinned roots into separate hashes to avoid having to traverse them
4298 in functions which are only interested in one kind.
4300 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
4302 * metadata-verify.c: Add pe header machine field verification.
4304 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
4306 * metadata-verify.c: Add pe header size verification.
4308 2009-01-14 Zoltan Varga <vargaz@gmail.com>
4310 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
4311 using the GC, they don't contain references.
4313 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
4315 2009-01-13 Geoff Norton <gnorton@novell.com>
4317 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
4318 AppDomains created on the native side can be cleaned up on the native side.
4320 2009-01-13 Geoff Norton <gnorton@novell.com>
4322 * appdomain.c: Ensure that we call mono_context_init for the embedding api
4323 as well as the managed api.
4325 2009-01-13 Geoff Norton <gnorton@novell.com>
4327 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
4328 with a MonoAppDomain initialized against it.
4330 2009-01-13 Zoltan Varga <vargaz@gmail.com>
4332 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
4334 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
4336 * marshal.c: Avoid setting the exception clauses after a method has been entered
4337 into the wrapper caches. Fixes #465700.
4339 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
4341 (mono_mb_create_method): Set the clauses from the method builder.
4343 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
4345 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
4346 Patch from Makoto Kishimoto.
4348 2009-01-13 Zoltan Varga <vargaz@gmail.com>
4350 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
4351 encoding them as ROOT_DESC_COMPLEX.
4352 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
4354 2009-01-12 Zoltan Varga <vargaz@gmail.com>
4356 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
4357 no longer point to the nursery.
4359 * sgen-gc.c: Add a few comments/FIXMEs.
4361 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
4363 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
4364 initialization of the various _method variables thread safe. Fixes
4367 2009-01-12 Mark Probst <mark.probst@gmail.com>
4369 * domain.c, domain-internals.h: Remove the shared_generics_hash
4370 and its lookup functions.
4372 2009-01-12 Bill Holmes <billholmes54@gmail.com>
4374 * socket-io.c: Fixing the MSVC build.
4376 Code is contributed under MIT/X11 license.
4378 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
4380 * metadata-verify.c: Add pe header watermark verification.
4382 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
4384 * metadata-verify.c: Add lfanew verification.
4386 2009-01-12 Jb Evain <jbevain@novell.com>
4388 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
4389 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
4391 2009-01-10 Zoltan Varga <vargaz@gmail.com>
4393 * socket-io.c: Fix the build.
4395 * environment.c: Fix an #ifdef.
4397 2009-01-09 Zoltan Varga <vargaz@gmail.com>
4399 * threadpool.c (async_invoke_thread): Handle the wait function returning
4400 WAIT_IO_COMPLETION as well.
4401 (async_invoke_io_thread): Ditto.
4403 2009-01-09 Bill Holmes <billholmes54@gmail.com>
4405 * threads.c: Fixing the Windows build.
4407 Code is contributed under MIT/X11 license.
4409 2009-01-09 Zoltan Varga <vargaz@gmail.com>
4411 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
4413 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
4414 the thread to wait again.
4416 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
4418 * metadata-verify.c: Initial skeleton of the metadata verifier.
4420 * pedump.c: Add support for the metadata verifier.
4422 * verify-internal.h: Export the whole assembly metadata verifier function.
4424 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
4426 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
4428 2009-01-09 Zoltan Varga <vargaz@gmail.com>
4430 * Makefile.am: Upgrade dtrace-prelink.sh location.
4432 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
4434 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
4435 well. Otherwise the shutdown deadlock that happens on unix will can happen
4437 If the main thread code finishes too fast it's possible that the finalizer
4438 thread won't have executed yet, won't record itself as the finalizer thread
4439 and the shutdown sequence will wait on it forever.
4441 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
4443 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
4446 2009-01-08 Miguel de Icaza <miguel@novell.com>
4448 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
4449 Robert Jordan for pointing this out.
4451 2009-01-08 Christian Prochnow <cproch@seculogix.de>
4454 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
4455 ves_icall_System_IO_DriveInfo_GetDriveType.
4457 2009-01-07 Miguel de Icaza <miguel@novell.com>
4459 * icall.c: Wrap calls to mono_strtod in CriticalSection
4460 invocations when using eglib, to work around #464316.
4462 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
4464 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
4465 return value of GetCurrentDirectory to never access unitialized memory.
4467 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
4469 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
4470 return value of GetCurrentDirectory and expand the buffer if needed.
4474 2009-10-07 Tom Hindle <tom_hindle@sil.org>
4476 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
4477 Adding a call to mono_init_com_types.
4479 Code is contributed under MIT/X11 license.
4481 2009-01-07 Geoff Norton <gnorton@novell.com>
4483 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
4484 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
4485 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
4486 be the value of the ip buffer.
4488 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
4490 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
4491 interfaces_packed here.
4493 Fixes part of #463294.
4495 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
4497 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
4499 Fixes part of #463294.
4501 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
4503 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
4504 is a boxed complex as well.
4506 Fixes part of #463294.
4508 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
4510 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
4511 control if a methodspec should be created for the generic method definition from external assemblies.
4512 Caching of methodspec is done using the handleref hash table.
4516 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
4518 * loader.c (find_method): When searching the interfaces of a class
4519 check the transitive closure of implemented interfaces.
4523 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
4525 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
4527 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
4529 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
4530 interfaces calculation to fill_valuetype_array_derived_types.
4532 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
4533 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
4536 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
4537 interfaces for valuetypes if needed.
4539 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
4540 for their basetype as well. Types are array expanded if rank is > 0.
4544 2008-12-30 Bill Holmes <billholmes54@gmail.com>
4546 * socket-io.h : Changing the signature of
4547 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
4550 * icall-def.h : Changing the signature of
4551 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
4553 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
4554 For Windows only. Avoid blocking when calling accept by
4555 querying for a connection via select. The loop also queries
4556 the thread state every 1000 micro seconds for the thread
4557 stop state. This will avoid the process hanging on shutdown
4558 when using a TcpChannel that is never connected to.
4560 Code is contributed under MIT/X11 license.
4562 2008-12-30 Marek Safar <marek.safar@gmail.com>
4564 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
4566 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
4568 * class.c (get_implicit_generic_array_interfaces): Extract common
4569 code to a helper function making it a lot easier on the eyes.
4571 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
4573 * class.c (get_implicit_generic_array_interfaces): If the internal
4574 enumerator is an interface inflate System.Object instead of itself.
4578 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
4580 * object.c (mono_runtime_invoke_array): Don't assert with
4581 byref nullable types.
4583 * marshal.c (mono_marshal_get_runtime_invoke): To handle
4584 byref nullables we unbox the object and store it on the
4586 We can't use the boxed object since it is the T of Nullable<T>
4587 and the boxed representation of a nullable it's underlying type
4589 We could cheat and create a boxed nullable and use the same
4590 machinery of other byref VTs but this feels like a hack and
4591 using the stack has the bonus of reducing heap pressure.
4595 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
4597 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
4602 2008-12-19 Bill Holmes <billholmes54@gmail.com>
4604 * icall-def.h : Adding an internal call definition for
4605 System.Environment.internalBroadcastSettingChange.
4607 * icall.c : Adding a Windows only implementation to broadcast a
4608 WM_SETTINGCHANGE when an environment variable has changed.
4610 Code is contributed under MIT/X11 license.
4612 2008-12-19 Mark Probst <mark.probst@gmail.com>
4614 * class.c, class-internals.h: Made
4615 mono_class_has_parent_and_ignore_generics() non-static.
4617 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
4619 * image.c: deal with the mmap failing when loading an image.
4621 2008-12-17 Geoff Norton <gnorton@novell.com>
4623 * threadpool.c: Ensure that the io_queue_lock is initialized
4624 in all circumstances, as we always attempt to cleanup against it.
4626 2008-12-17 Miguel de Icaza <miguel@novell.com>
4628 * icall.c (ves_icall_System_Environment_get_Platform): For
4629 compatibility reasons for existing client code we will keep
4630 returning 4 for a while.
4632 For how long will depend on the documentation being updated, and
4633 for us to give client code a chance to be updated.
4635 This reverts the original decison on #433108 since we did not
4636 catch roughly 33 instances of the broken code in our own source
4637 code base, we did not catch failures on the buildbots, and QA did
4638 not bring this as a problem.
4640 Only today I found some customer's code breaking due to our own
4641 class libraries not being fully updated and tracked it down to
4642 this change. I am reverting it because if we could not even get
4643 our story straight in our own code base, how can we hope that our
4644 end user code be fixed?
4646 As of this morning, our Wiki page that documents how to detect
4647 Unix had not been fixed.
4649 2008-12-16 Zoltan Varga <vargaz@gmail.com>
4651 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
4653 * class.c (mono_class_get_fields): Handle loading errors.
4655 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4657 * 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.
4659 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
4661 * mono-perfcounters.c: avoid warning.
4663 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
4665 * reflection.c (ensure_runtime_vtable): Work on generic instances and
4666 make sure all interfaces have MonoClass::interface_id set.
4668 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
4669 method table is property set.
4671 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
4673 * class.c: New function mono_class_setup_interface_id that setup
4674 MonoClass::interface_id if needed.
4676 * class-internals.h: Export new function.
4678 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
4680 * class.c: Add code to sanity check the vtable after setup_vtable_general
4683 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
4685 * icall.c: make Assembly.GetExecutingAssembly work properly when
4686 reflection is used to invoke the method.
4689 2008-12-11 Mark Probst <mark.probst@gmail.com>
4691 * metadata/generic-sharing.c: Look for constraints in all type
4692 arguments, not just the first one.
4694 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
4696 * appdomain.c: return the correct CodeBase for an Assembly instance
4697 that was loaded from the shadow-copy directories.
4700 2008-12-10 Zoltan Varga <vargaz@gmail.com>
4702 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
4704 * sgen-gc.c (check_object): New debugging helper function.
4706 * object.c: Fix calls to mono_value_copy_array ().
4708 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
4710 * class.c (mono_class_setup_fields): If working on an inflated class
4711 first check if the generic definition did init with success.
4715 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
4717 pedump.c (main): Fix a warning.
4719 2008-12-10 Bill Holmes <billholmes54@gmail.com>
4721 * object-internals.h : Adding a definition for
4722 MonoReflectionComVisibleAttribute.
4724 * marshal.c (cominterop_com_visible) : Method added to check the
4725 ComVisible attribute of a class.
4727 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
4728 cominterop_raise_hr_exception added to consolidate common code
4729 to raise hr exceptions.
4731 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
4732 if a managed class should support IDispatch.
4735 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
4736 Added additional checks for managed object when getting
4737 an IDispatch interface.
4739 Code is contributed under MIT/X11 license.
4741 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
4743 pedump.c (main): Handle mono_get_method () returning NULL.
4745 2008-12-09 Zoltan Varga <vargaz@gmail.com>
4747 * marshal.h: Fix a warning.
4749 2008-12-09 Bill Holmes <billholmes54@gmail.com>
4751 * marshal.c : Adding cominterop_release_all_rcws to release all
4752 runtime callable wrappers held by the runtime.
4754 * marshal.h : Adding declaration for cominterop_release_all_rcws.
4756 Code is contributed under MIT/X11 license.
4758 2008-12-09 Zoltan Varga <vargaz@gmail.com>
4760 * metadata.c (mono_image_alloc_lock): New helper function.
4761 (mono_image_alloc0_lock): Ditto.
4763 * metadata.c: Use the alloc_lock () helper functions for allocating
4764 memory from the image mempool.
4766 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4768 * class.c (mono_class_from_generic_parameter): Document it's
4769 locking behavior. Fix double checked locking here, we stored in
4770 param->pklass a partially initialized MonoClass and no membar was used.
4772 2008-12-05 Marek Habersack <mhabersack@novell.com>
4774 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
4775 (3) functions are present in the C library use them to do the
4776 job. If they are absent, make sure that the sum of int_part and
4777 dec_part is rounded before returning. This is necessary due to the
4778 division of dec_part by the power of 10 before the final addition
4779 is performed - if the result is not rounded in some cases it will
4780 yield invalid results.
4782 2008-12-04 Zoltan Varga <vargaz@gmail.com>
4784 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
4785 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
4786 instruction instead of a pointer constant.
4788 2008-12-03 Zoltan Varga <vargaz@gmail.com>
4790 * loader.c (mono_method_get_header): Do most of the work outside the
4791 loader lock, to avoid assembly load hook deadlocks.
4793 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
4794 (mono_metadata_parse_type_full): Ditto.
4796 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
4798 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
4799 Make the stack depth fixed. Ensure proper argument passing to the backtrace
4800 funtions. Finally, use a lock to produce well ordered output.
4802 The lock looks silly, as all calls to the corlib mempool should be guarded
4803 with the loader lock, but for some reason this fact doesn't help.
4805 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
4807 2008-12-02 Mark Probst <mark.probst@gmail.com>
4809 * socket-io.c: 64 bit big-endian fixes.
4811 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
4813 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
4814 targets that require strict compatibility between the types.
4816 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
4817 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
4818 Kill the strict argument and create a new one valuetype_must_be_boxed.
4820 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
4821 state that all valuetypes must be boxed.
4825 2008-11-29 Kornél Pál <kornelpal@gmail.com>
4827 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
4828 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
4830 Contributed under MIT/X11 license.
4832 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
4834 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
4835 the inflate_generic_type machinery should handle it.
4837 This avoids a crash when the field's flags is zero and it's type is
4839 What happens is that mono_metadata_parse_type_full will see that opt_attrs
4840 is zero and will return one of the cached built-in primitive types. Since
4841 those types live in read-only memory, the code that copies it crashes.
4843 2008-11-28 Mark Probst <mark.probst@gmail.com>
4845 * object.c: Don't put function descriptors into generalized IMT
4848 2008-11-28 Mark Probst <mark.probst@gmail.com>
4850 * class.c: Enable generic code sharing on PPC64.
4852 2008-11-27 Mark Probst <mark.probst@gmail.com>
4854 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
4857 * generic-sharing.c: Allocate the method template slists from the
4858 image mempool so it doesn't leak.
4860 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
4862 * class.c (generic_array_methods): Release the linked list.
4864 2008-11-27 Mark Probst <mark.probst@gmail.com>
4866 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
4867 invocation to g_utf16_to_utf8().
4869 2008-11-26 Mark Probst <mark.probst@gmail.com>
4871 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
4872 arguments on big endian archs.
4874 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
4876 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
4877 the type name (test added in corlib).
4879 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
4881 * pedump.c: initialize perf. counters. Fixes a segv.
4883 2008-11-25 Martin Baulig <martin@ximian.com>
4885 * mono-debug-debugger.c
4886 (mono_debugger_runtime_invoke): Return the exception object if an
4887 exception was thrown. Visual Studio displays the exception object
4888 in the locals window.
4890 2008-11-24 Mark Probst <mark.probst@gmail.com>
4892 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
4895 2008-11-24 Mark Probst <mark.probst@gmail.com>
4897 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
4898 MONO_TYPE_U are sizeof (gpointer), too.
4900 2008-11-24 Mark Probst <mark.probst@gmail.com>
4902 * marshal.c (mono_type_native_stack_size): Fixed size and
4903 alignment for reference types.
4905 2008-11-23 Mark Probst <mark.probst@gmail.com>
4907 * class.c (mono_class_generic_sharing_enabled): Disable generic
4908 code sharing for PPC64.
4910 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
4912 * icall.c (mono_method_get_equivalent_method): Make sure
4913 method->klass->methods is inited before looping over it.
4915 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
4917 * object.c: when calling ExecuteAssembly in a newly created domain,
4918 the configuration file and application base are already set up.
4919 Bug #446353 take 2 fixed.
4921 2008-11-20 Zoltan Varga <vargaz@gmail.com>
4923 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
4924 Fixes #444715. Fix a warning.
4926 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
4928 * appdomain.c: write the full path of the assembly to the .ini file
4929 created when "shadow-copying"
4932 2008-11-18 Zoltan Varga <vargaz@gmail.com>
4934 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
4935 if signature==FALSE.
4937 2008-11-17 Bill Holmes <billholmes54@gmail.com>
4939 * marshal.h : Fix the cygwin build.
4940 marshal.c:12442: undefined reference to `_IID_IMarshal'
4942 Code is contributed under MIT/X11 license.
4944 2008-11-17 Bill Holmes <billholmes54@gmail.com>
4946 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
4947 free threaded marshaler when QueryInterface is called on a COM callable
4948 wrapper requesting the IMarshal interface.
4950 Code is contributed under MIT/X11 license.
4952 2008-11-14 Zoltan Varga <vargaz@gmail.com>
4954 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
4956 * reflection.c (mono_type_get_object): Special case the very common
4959 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
4962 2008-11-13 Bill Holmes <billholmes54@gmail.com>
4964 * process.h : Adding method declaration for
4965 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
4967 * process.c : Adding implementation for
4968 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
4970 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
4971 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
4973 Code is contributed under MIT/X11 license.
4975 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
4977 * appdomain.c (unload_thread_main): Clean up threadpool by
4978 calling mono_thread_pool_remove_domain_jobs.
4980 * domain-internals.h (struct _MonoDomain): Add new fields to
4981 help coordinate the cleanup of the threadpool.
4983 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
4984 that cleans up the threadpool of all jobs associated with an appdomain.
4985 It does that by cleaning up the queues and making sure all active
4986 threads are accounted.
4988 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
4989 unloaded or in the process of. Take this is such way that there is
4990 no race condition between another thread starting the unload and the
4991 current thread acknowledging it.
4993 * threadpool.c (async_invoke_thread): Same.
4995 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
4996 firing the new thread.
4998 * threadpool.c (start_tpthread): Same.
5000 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
5002 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
5004 2008-11-06 Jonathan Chambers <joncham@gmail.com>
5006 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
5007 Add support for DuplicateHandle.
5009 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5010 Add support for DuplicateHandle.
5012 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5013 Add support for DuplicateHandle.
5015 Code is contributed under MIT/X11 license.
5017 2008-11-06 Mark Probst <mark.probst@gmail.com>
5019 * class-internals.h: Make min_align into a whole byte.
5021 * class.c: Set min_align for SIMD types to 16.
5023 2008-11-05 Geoff Norton <gnorton@novell.com>
5025 * attach.c: Default the attacher to enabled for all cases including
5028 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5030 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
5033 2008-11-04 Mark Probst <mark.probst@gmail.com>
5035 * monitor.c, monitor.h: New function for querying offsets of
5036 members of MonoThreadsSync.
5038 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5040 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
5041 to speed up this function and to avoid the boundless memory growth caused by
5042 the signature_dup () calls.
5044 2008-11-02 Zoltan Varga <vargaz@gmail.com>
5046 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
5049 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
5052 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
5054 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5057 * domain-internals.h: made mono_set_private_bin_path_from_config()
5059 * object.c: call the above function after setting the configuration
5060 file path for the root domain.
5063 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5065 * assembly.c: when the assembly is loaded from an absolute path, end
5066 basedir with a directory separator.
5069 2008-10-30 Mark Probst <mark.probst@gmail.com>
5071 * monitor.c (mono_monitor_get_fast_enter_method): If
5072 CompareExchange is not available, don't create the fastpath
5073 instead of asserting. (The method is missing in the 1.1 profile.)
5075 2008-10-30 Mark Probst <mark.probst@gmail.com>
5077 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
5079 * monitor.c, monitor.h: Code for generating Monitor.Enter and
5080 Monitor.Exit IL fastpaths.
5082 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5084 * class.c (mono_class_create_from_typedef): Added Vector2ul.
5086 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5088 * class.c (mono_class_create_from_typedef): Added Vector2l.
5090 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5092 * class.c (mono_class_create_from_typedef): Added Vector2d.
5094 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5096 * appdomain.c: translate \ into / for cache_path.
5097 * domain-internals.h: new mono_is_shadow_copy_enabled().
5098 * icall.c: (fill_reflection_assembly_name) do the same path
5099 manipulations that get_code_base does.
5100 (get_code_base) use mono_is_shadow_copy_enabled.
5102 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
5104 * appdomain.c: shadow-copied assemblies go to CachePath +
5105 ApplicationName when both are set. DynamicBase has nothing to do with
5109 2008-10-26 Zoltan Varga <vargaz@gmail.com>
5111 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
5112 STANDALONESIG table.
5114 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
5115 standalone signatures.
5117 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
5118 comparison code: instead of comparing the signatures using a custom
5119 equals function, transform them to a common signature and compare that. This
5120 works better with AOT.
5122 2008-10-25 Zoltan Varga <vargaz@gmail.com>
5124 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
5126 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
5127 call for generic instances.
5128 (mono_class_setup_properties): Call setup_properties () before accessing
5131 * class.c (mono_class_get_virtual_methods): New helper function to iterate
5132 over the virtual methods of a class using metadata if possible, avoiding the
5133 creation of MonoMethod's for non-virtual methods.
5135 * class.c (mono_class_setup_vtable_general): Rewrite this to use
5136 get_virtual_methods () to iterate over the virtual methods of classes.
5138 2008-10-25 Martin Baulig <martin@ximian.com>
5140 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
5142 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5144 * class.c (mono_class_create_from_typedef): Added Vector4i.
5146 2008-10-24 Mark Probst <mark.probst@gmail.com>
5148 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
5149 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
5150 special-casing applies to eliminate the call completely.
5152 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5154 * class.c (mono_class_create_from_typedef): Added Vector8s.
5156 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
5158 * class.c (mono_class_create_from_typedef): Added Vector16sb.
5160 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5162 * icall.c: get rid of annoying warning.
5164 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5166 * threadpool.c: in 1.x, if you change the background status of the
5167 threadpool thread, it's not reset.
5168 Remove unnecessary calls to SetState.
5170 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5172 * threadpool.c: asynchronously create a set of idle threads upon first
5173 use of the threadpool. SetMinThreads will now start the appropriate
5174 number of idle threads if they are not already running. The default is
5175 1 threadpool thread per CPU. Increased the maximum number of threads
5178 2008-10-22 Martin Baulig <martin@ximian.com>
5180 Revert r116521 from Zoltan, it breaks the debugger:
5182 * class.c (mono_class_get_virtual_methods): New helper function to iterate
5183 over the virtual methods of a class using metadata if possible, avoiding the
5184 creation of MonoMethod's for non-virtual methods.
5186 * class.c (mono_class_setup_vtable_general): Rewrite this to use
5187 get_virtual_methods () to iterate over the virtual methods of classes.
5189 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5191 * threads.c: when creating a threadpool thread, set its state to
5193 * threadpool.c: reset the background state of a threadpool thread
5194 after finishing each work item
5197 2008-10-22 Zoltan Varga <vargaz@gmail.com>
5199 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
5201 * class.c (mono_class_setup_vtable_general): Add an optimized version for
5202 generic instances which works by inflating the methods in the container
5205 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
5206 variant which doesn't make a copy if no inflation was done.
5207 (mono_class_setup_fields): Use it.
5209 * metadata.c (mono_metadata_get_shared_type): New helper function to
5210 return a shared instance of a given MonoType.
5212 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
5213 a copy of most non-generic types.
5215 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
5217 * threadpool.c: remove one more GetSystemInfo () call.
5219 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
5221 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
5222 use the code in mono-proclib.h to get processor information.
5224 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5226 * appdomain.c: fixed the logic that determines whether assemblies in a
5227 directory are "shadow-copied" or not. Bug #433483 fixed.
5229 2008-10-22 Zoltan Varga <vargaz@gmail.com>
5231 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
5234 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5236 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
5239 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
5240 reflection.c: Use mono_field_get_name () for accessing a field's name.
5242 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
5245 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
5248 * loader.c (find_method_in_class): Reenable the metadata optimization by
5249 not using it for generic instances.
5251 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
5252 data/def_type fields from MonoClassField into a separate structure.
5253 (struct MonoClassField): Remove data/def_type fields.
5254 (struct _MonoClass): Add a 'field_def_values' array to store the default
5255 values/RVA for fields.
5257 * class.c reflection.c: Update after the changes.
5259 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
5260 for accessing field->data.
5262 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
5264 * loader.c (find_method_in_class): Revert the last change for now as
5265 it breaks Mono.C5 unit tests.
5267 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
5268 'field_generic_types' and 'field_objects' which contain the information
5269 previously stored in MonoInflatedField.
5270 (MonoInflatedField): Delete.
5271 (struct _MonoClassField): Delete 'generic_info' field.
5273 * reflection.c: Store the information which was previously in
5274 field->generic_info in MonoDynamicGenericClass instead.
5276 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
5277 MonoClassField changes.
5279 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
5281 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
5282 store the value inside the data array of the MonoMethodWrapper.
5283 This saves memory, is faster and fixes the lifetime issues (methods
5284 were never removed from the hash previously). May also fix bug#436996.
5286 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5288 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
5289 generic instances, compute the type from the generic definition instead of
5290 looking in field->generic_info.
5292 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
5293 for inflated fields, the only user was get_fieldref_token () which no
5296 * class.c (mono_class_init): Revert the last change as it seems to cause
5299 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
5300 bytes on 64 bit platforms.
5302 * object.c (mono_class_create_runtime_vtable): Fix a warning.
5304 * object.c (mono_class_create_runtime_vtable): Don't initalize
5305 field->data/field->def_type here, it is done lazily by
5306 mono_class_get_field_default_value ().
5308 * icall.c (ves_icall_get_enum_info): Call
5309 mono_class_get_field_default_value () instead of directly accessing
5310 field->data and field->def_type.
5312 * object.c (get_default_field_value): Ditto.
5314 * class.c (mono_field_get_data): Ditto.
5316 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
5317 call for generic instances.
5319 * loader.c (find_method_in_class): If klass != from_class, then inflate
5320 the method with the context of from_class, since the caller assumes this.
5322 2008-10-20 Zoltan Varga <vargaz@gmail.com>
5324 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
5325 for accessing method->slot.
5327 2008-10-20 Cedric Vivier <cedricv@neonux.com>
5329 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
5331 2008-10-19 Zoltan Varga <vargaz@gmail.com>
5333 * class.c (mono_method_get_vtable_index): Use
5334 mono_method_get_vtable_slot () for accessing method->slot.
5336 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
5337 accessing klass->methods.
5339 * class.c (mono_method_get_vtable_slot): New helper function.
5340 (mono_class_get_vtable_entry): Ditto.
5341 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
5342 accessing method->slot.
5344 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
5345 method to get_inflated_method ().
5347 * class.c (mono_class_get_inflated_method): New helper method to obtain
5348 a method of an inflated class without calling setup_methods ().
5349 (mono_class_get_cctor): Use get_inflated_method.
5351 * generic-sharing.c (mono_class_get_method_generic): Ditto.
5353 * marshal.c image.c: Lazily create all the marshal caches.
5355 * image.c (mono_image_init): Move initialization of runtime_invoke
5356 caches to marshal.c.
5358 * marshal.c (get_cache): New helper function to lazily initialize a
5360 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
5362 * debug-helpers.c (mono_method_full_name): Include generic arguments.
5364 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
5366 * loader.c: fixed check for interface type.
5368 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
5370 * appdomain.c: check for NULL setup before it's referenced.
5373 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
5375 * class.c: remove the unused old vtable setup code.
5377 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
5379 * class.c: don't depend on interface order in
5380 setup_interface_offsets (bug #435777).
5381 * reflection.c: sort the InterfaceImpl table (patch from
5382 Jb Evain <jbevain@novell.com>).
5384 2008-10-13 Zoltan Varga <vargaz@gmail.com>
5386 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
5387 the low level assemblies lock.
5389 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
5391 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
5392 object.c, reflection.c, socket-io.c, threads.c: introduced
5393 mono_framework_version () to return the major framewrok version,
5394 changed the code that was using more complex patterns to use it.
5395 Return the correct value for PlatformID for OSX.
5397 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
5399 * icall-def.h, process.h, process.c: added an icall to get info about
5400 processes using mono-proclib.
5402 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
5404 * mono-perfcounters.c: use the mono-proclib functions to
5405 access process information.
5407 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
5409 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
5410 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
5411 reflection.c: remove rawbuffer usage: mmap support is more sanely
5412 provided by utils/mono-mmap.
5414 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
5416 * gc.c: use posix semaphores when possible so that
5417 mono_gc_finalize_notify() is signal safe.
5419 2008-10-11 Zoltan Varga <vargaz@gmail.com>
5421 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
5422 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
5423 be #ifdef-ed out, the linker will remove the rest.
5425 * marshal.c: Implement DISABLE_COM.
5427 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
5429 2008-10-11 Miguel de Icaza <miguel@novell.com>
5431 * locales.c (string_invariant_compare_char): Optimization: do not
5432 call g_unichar_type unless we actually need the information.
5434 2008-10-10 Mark Probst <mark.probst@gmail.com>
5436 * object.c, class-internals.h: Also create remoting trampolines
5437 for generic methods. Pass the domain to the remoting trampoline
5438 creation function, too.
5440 2008-10-10 Zoltan Varga <vargaz@gmail.com>
5442 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
5444 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
5446 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
5449 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
5452 * locales.c: remove the use of g_strdown. Fixes bug #322313.
5454 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
5456 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
5457 for the least possible amount of time (extending the fix in r113458).
5459 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
5461 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
5463 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
5465 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
5466 as possible simd intrinsic types.
5467 Optimized the test to check for the common prefix first.
5469 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
5471 * class.c: back out part of a broken optimization committed on
5472 May 23th (bug #433908).
5474 2008-10-09 Mark Probst <mark.probst@gmail.com>
5476 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
5477 Win32. Should fix #432388 for most cases until we have the new
5480 2008-10-08 Zoltan Varga <vargaz@gmail.com>
5482 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
5483 instead of using inst->id so the hash is stable for AOT.
5485 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
5488 * icall.c: create a .ini file for shadow-copied assemblies that
5489 contains the location of the original assembly. Use this to return the
5490 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
5491 Also fix the number of '/' for windows when returning the CodeBase.
5494 2008-10-07 Bill Holmes <billholmes54@gmail.com>
5496 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
5498 Code is contributed under MIT/X11 license.
5500 2008-10-07 Bill Holmes <billholmes54@gmail.com>
5502 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
5503 if if the class vtable needs initialized.
5505 Code is contributed under MIT/X11 license.
5507 2008-10-07 Bill Holmes <billholmes54@gmail.com>
5509 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
5510 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
5511 STRING->BSTR, and CLASS->INTERFACE.
5513 Code is contributed under MIT/X11 license.
5515 2008-10-07 Marek Habersack <mhabersack@novell.com>
5517 * sysmath.h: changed the declaration of the
5518 ves_icall_System_Math_Round2 icall by adding an extra
5519 away_from_zero parameter.
5521 * sysmath.c (ves_icall_System_Math_Round2): added support for
5522 away from zero rounding. The icall now takes an extra boolean
5523 parameter to signal that away from zero operation is requested.
5525 2008-10-06 Zoltan Varga <vargaz@gmail.com>
5527 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
5528 the delegate klass so it can work with full-aot.
5529 (mono_marshal_get_delegate_end_invoke): Ditto.
5530 (mono_marshal_get_delegate_invoke): Ditto.
5532 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
5534 * gc.c, attach.h, attach.c: remove a bad pattern:
5535 add_finalizer_callback () is not implemented correctly, it can't
5536 without adding more overhead to the finalizer loop and it's not
5537 even needed, since we know exactly what we need to call, so there is
5538 no need to do so through an expensive function pointer.
5540 2008-10-04 Zoltan Varga <vargaz@gmail.com>
5542 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
5544 * attach.c (mono_attach_init): Remove the #ifdef.
5546 2008-10-04 Andreas Färber <andreas.faerber@web.de>
5548 * attach.c (mono_attach_init): Don't use
5549 mono_gc_add_finalizer_thread_callback when compiling without GC.
5552 Code is contributed under MIT/X11 license.
5554 2008-10-03 Zoltan Varga <vargaz@gmail.com>
5556 * class.c (mono_class_create_from_typedef): Remove the
5557 #ifndef DISABLE_SIMD stuff.
5559 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
5561 * class-internals.h (MonoClass): Added simd_type bit field.
5563 * class.c (mono_class_create_from_typedef): Check if type is a simd
5566 2008-10-03 Mark Probst <mark.probst@gmail.com>
5568 * object.c (mono_method_add_generic_virtual_invocation): Only add
5569 instantiations to the thunk whose count is at least as large as
5572 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
5574 * icall.c: changed the Type of the exception thrown when trying to
5575 invoke a constructor on an abstract class. Part of the fix for bug
5578 2008-10-02 Mark Probst <mark.probst@gmail.com>
5580 * class.c, class-internals.h (mono_method_get_vtable_index): New
5581 function which returns the index into the vtable and properly
5582 handles inflated virtual generic methods.
5584 2008-10-01 Mark Probst <mark.probst@gmail.com>
5586 * object.c, domain.c, object-internals.h, domain-internals.h:
5587 Generalize IMT thunk machinery to also handle thunks for virtual
5588 generic method invokes. When a virtual generic method is invoked
5589 more than a number of times we insert it into the thunk so that it
5590 can be called without lookup in unmanaged code.
5592 * generic-sharing.c, class-internals.h: Fetching a
5593 MonoGenericInst* for a method from an (M)RGCTX.
5595 2008-10-01 Zoltan Varga <vargaz@gmail.com>
5597 * marshal.c (emit_marshal_string): Applied a variant of a patch by
5598 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
5599 marshalling. Fixes #431304.
5601 2008-10-01 Bill Holmes <billholmes54@gmail.com>
5603 * marshal.c (emit_marshal_variant) : Change the attribute checks to
5604 handle when ref is specified without In or Out.
5606 Code is contributed under MIT/X11 license.
5608 2008-09-30 Mark Probst <mark.probst@gmail.com>
5610 * loader.c (mono_get_method_constrained): Don't expand method with
5611 the class's context, because it's already a method of that class.
5613 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
5615 * attach.c : should be correct build fix.
5617 2008-09-29 Zoltan Varga <vargaz@gmail.com>
5619 * attach.c: Fix the previous change.
5621 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
5623 * attach.c : quick w32 build fix.
5625 2008-09-27 Miguel de Icaza <miguel@novell.com>
5627 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
5628 crashes MonoDevelop: #430455.
5630 2008-09-27 Zoltan Varga <vargaz@gmail.com>
5632 * domain-internals.h (struct _MonoDomain): Move most fields used only by
5633 the JIT do MonoJitDomainInfo in ../mini/mini.h.
5635 * domain.c: Remove initialization/cleanup of the removed fields.
5637 2008-09-27 Mark Probst <mark.probst@gmail.com>
5639 * class.c (mono_class_generic_sharing_enabled): Enable generic
5640 code sharing for PPC.
5642 2008-09-26 Bill Holmes <billholmes54@gmail.com>
5644 * attach.c : Fixing the Windows builds.
5646 Code is contributed under MIT/X11 license.
5648 2008-09-25 Zoltan Varga <vargaz@gmail.com>
5650 * class.c (mono_class_generic_sharing_enabled): Experimentally change
5651 the default generic sharing mode to 'all'.
5653 2008-09-25 Mark Probst <mark.probst@gmail.com>
5655 * generic-sharing.c, class-internals.h: New function for checking
5656 whether a method needs a static RGCTX invoke wrapper. A few
5657 funtions moved from mini/generic-sharing.c.
5659 * icall.c: New function used.
5661 2008-09-25 Mark Probst <mark.probst@gmail.com>
5663 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
5664 Static RGCTX invoke wrapping applies to value type methods, too.
5666 * class.c (mono_class_setup_vtable_general): In generic-shared
5667 value types, wrap methods with a static RGCTX invoke wrapper.
5669 2008-09-25 Zoltan Varga <vargaz@gmail.com>
5671 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
5674 2008-09-24 Zoltan Varga <vargaz@gmail.com>
5676 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
5677 register a callback which is called when the finalizer thread is woken
5679 (finalizer_thread): Call the callback if it exists.
5681 * attach.h attach.c: New files, implementing the attach mechanism.
5683 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
5685 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
5686 by the previous change.
5688 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5690 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
5691 loader.c, marshal.c, metadata-internals.h, metadata.c,
5692 method-builder.c, object.c, reflection.c: introduced specific functions
5693 to allocate from the domain and image mempools and cleaned up most of
5694 the code to use them (still missing a few in reflection.c).
5695 Keep the loader bytes counter updated.
5697 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
5699 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
5700 loader-related counters.
5702 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
5704 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
5705 added more MS-compatible counters.
5707 2008-09-22 Zoltan Varga <vargaz@gmail.com>
5709 * class.c (mono_class_setup_fields): Call setup_fields before accessing
5710 class->blittable. Fixes #428217.
5712 2008-09-21 Zoltan Varga <vargaz@gmail.com>
5714 * reflection.c (mono_image_get_field_on_inst_token): Call
5715 field_encode_signature () since that handles custom modifiers too.
5718 2008-09-20 Zoltan Varga <vargaz@gmail.com>
5720 * reflection.c (add_custom_modifiers): New helper function to merge custom
5721 modifiers stored in objects to a MonoType.
5722 (fieldref_encode_signature): Encode custom modifiers.
5723 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
5724 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
5726 2008-09-19 Kornél Pál <kornelpal@gmail.com>
5728 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
5729 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
5730 64-bit IL only images because imports are not resolved for IL only images.
5731 Special thanks to Bill Holmes for finding this bug and testing the patch.
5732 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
5734 Contributed under MIT/X11 license.
5736 2008-09-19 Miguel de Icaza <miguel@novell.com>
5738 * mono-config.c (dllmap_start): Add support for the bits keyword
5739 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
5741 2008-09-19 Mark Probst <mark.probst@gmail.com>
5743 * reflection.c (inflate_mono_method): When the class the method is
5744 to be inflated for is itself not inflated, just return the method.
5746 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
5748 * mono-perfcounters.c: use more user friendly process instance names.
5750 2008-09-18 Bill Holmes <billholmes54@gmail.com>
5752 * marshal.c (emit_marshal_variant) : Change the attribute checks to
5753 handle "[in] ref" and "[in][out] ref" cases.
5755 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
5756 to mono_mb_create_method. This was causing problems calling native to
5757 managed passing Variants by value.
5759 Code is contributed under MIT/X11 license.
5761 2008-09-18 Zoltan Varga <vargaz@gmail.com>
5763 * class.c (can_access_internals): Call mono_assembly_load_friends ()
5764 before accessing the friend_assembly_names field.
5766 * assembly.c (mono_assembly_load_friends): Make this callable multiple
5768 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
5769 called lazily when it is needed.
5771 * metadata-internals.h (struct _MonoAssembly): Add
5772 'friend_assembly_names_inited' flag.
5774 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
5776 * mono-perfcounters-def.h: fix the types of a few counters.
5777 * mono-perfcounters.c: implemented the instance names getter
5780 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
5782 * culture-info-table.h : regenerated.
5784 2008-09-17 Robert Jordan <robertj@gmx.net>
5786 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
5787 context bound objects. Fixes #415577.
5789 Code is contributed under MIT/X11 license.
5791 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
5793 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
5794 implementation (bug #423582).
5796 2008-09-16 Zoltan Varga <vargaz@gmail.com>
5798 * object.c (mono_object_get_virtual_method): Handle the case method->slot
5799 is not set. Fixes #426309.
5801 2008-09-16 Jb Evain <jbevain@novell.com>
5803 * class.c (mono_class_from_name): fix the exported type look up
5804 when the type is defined in a referenced assembly.
5806 2008-09-16 Jb Evain <jbevain@novell.com>
5808 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
5809 increment the next index counter on each iteration to make that work
5810 for more than one type forwarder. Unmanaged part to fix #422929.
5812 2008-09-15 Mark Probst <mark.probst@gmail.com>
5814 * object-internals.h: enum ComInterfaceType in
5815 MonoInterfaceTypeAttribute is guint32, not guint16.
5817 2008-09-12 Mark Probst <mark.probst@gmail.com>
5819 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
5822 2008-09-11 Mark Probst <mark.probst@gmail.com>
5824 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
5827 2008-09-11 Mark Probst <mark.probst@gmail.com>
5829 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
5830 Endianness fixes for MonoSymbolFileOffsetTable.
5832 2008-09-10 Bill Holmes <billholmes54@gmail.com>
5834 * process.c (complete_path) : Removing quotes from the
5835 input path. The glib file routines do not handle file paths
5836 that have quotes around them.
5838 Code is contributed under MIT/X11 license.
5840 2008-09-10 Bill Holmes <billholmes54@gmail.com>
5842 * socket-io.h : Adding a comment to provide locations where
5843 changes to MonoSocketAsyncResult need to be synced.
5845 Code is contributed under MIT/X11 license.
5847 2008-09-10 Zoltan Varga <vargaz@gmail.com>
5849 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
5850 parameters as well. Fixes #425001.
5852 2008-09-08 Miguel de Icaza <miguel@novell.com>
5854 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
5857 2008-09-07 Miguel de Icaza <miguel@novell.com>
5859 * console-io.c: Add support for tracking the window size if it
5862 The setup is very simple: the TtySetup function will now return a
5863 pointer to a location in memory that tracks the current console
5864 size. The managed code checks its current value every time its
5865 queried against the last value set, and updates accordingly.
5867 With this setup we can work with multiple consoles, and we do not
5868 require to poke into managed code from a signal handler.
5870 Additionally, the environment for COLUMNS and LINES is now handled
5873 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
5875 2008-09-07 Mark Probst <mark.probst@gmail.com>
5877 * marshal.c (mono_type_native_stack_size): Treat
5878 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
5880 2008-09-04 Jb Evain <jbevain@novell.com>
5882 * class.c (mono_class_is_assignable_from): fix assignability of nullables
5885 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
5887 * verify.c (verify_type_compatibility_full): Revert change
5888 to allow converting a native int to unmanaged pointer be verifiable
5889 under non-strict mode.
5890 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
5892 * verify.c: Added some TODOs.
5894 2008-09-02 Bill Holmes <billholmes54@gmail.com>
5896 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
5897 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
5898 Changed to use GlobalAlloc for the memory returned on Windows platforms.
5900 Code is contributed under MIT/X11 license.
5902 2008-09-02 Jb Evain <jbevain@novell.com>
5904 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
5906 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
5908 reflection.c (typebuilder_setup_fields): Handle classes with
5911 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
5913 class.c (mono_class_setup_events): Add memory barrier due to
5914 double checked locking.
5916 class.c (mono_class_setup_properties): Same.
5918 2008-08-31 Zoltan Varga <vargaz@gmail.com>
5920 * class.c (mono_class_is_assignable_from): Fix the build.
5922 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
5923 before accessing klass->interface_bitmap. Fixes #421744.
5925 2008-08-28 Zoltan Varga <vargaz@gmail.com>
5927 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
5928 the runtime into no-exec mode, useful when running the AOT compiler.
5930 * appdomain.c gc.c object.c: Avoid executing managed code when running
5933 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
5935 * reflection.c (_mono_reflection_get_type_from_info): Handle the
5936 special case when the mono_assembly_loaded () returns NULL because the
5937 search hook is not installed.
5939 2008-08-25 Zoltan Varga <vargaz@gmail.com>
5941 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
5942 crashes in bstr marshalling on linux.
5944 2008-08-24 Zoltan Varga <vargaz@gmail.com>
5946 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
5947 with more than one parameter.
5949 2008-08-24 Miguel de Icaza <miguel@novell.com>
5951 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
5952 start/stop flow control as well when turning off ICANON (allows
5953 C-s and C-q to be read by Console.ReadKey).
5955 2008-08-24 Zoltan Varga <vargaz@gmail.com>
5957 * class.c (mono_class_init): Move the initialization of nested classes
5958 into mono_class_get_nested_types (). Fixes #418433.
5960 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
5963 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
5964 iterating tough the nested classes of a class.
5966 2008-08-23 Zoltan Varga <vargaz@gmail.com>
5968 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
5971 2008-08-22 Miguel de Icaza <miguel@novell.com>
5973 * console-io.c (sigcont_handler): Support signal chaining for
5976 (console_set_signal_handlers): Use best practices with sigaction,
5977 clear the structure before using it.
5979 2008-08-22 Robert Jordan <robertj@gmx.net>
5981 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
5982 Fix the Windows build.
5984 2008-08-22 Zoltan Varga <vargaz@gmail.com>
5986 * class.c (mono_class_generic_sharing_enabled): Make the default
5987 sharing mode 'corlib'.
5989 2008-08-21 Zoltan Varga <vargaz@gmail.com>
5991 * console-io.c (console_set_signal_handlers): Fix a warning.
5993 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
5994 method normally, the JIT will take care of avoiding recursion.
5996 2008-08-20 Bill Holmes <billholmes54@gmail.com>
5998 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
6000 Code is contributed under MIT/X11 license.
6002 2008-08-20 Miguel de Icaza <miguel@novell.com>
6004 * console-io.c (sigcont_handler): We need to restore the entire
6005 termios state, not only the original settings, as things like echo
6006 can be controlled after this (Booish exposes this issue with its
6007 own ReadLine implementation).
6009 Additionally, we need to set the terminal back into keypad_xmit
6012 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
6013 string as a paramter as well. Otherwise we get different
6016 2008-08-20 Zoltan Varga <vargaz@gmail.com>
6018 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
6019 delegates with byref out parameter passing. Fixes #351520.
6021 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
6023 (mono_type_get_desc): Add the type arguments for GENERICINST.
6024 (mono_method_full_name): Stringify the class name using mono_type_full_name
6025 so it picks up generic arguments.
6027 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
6029 * console-io.c: Removed debug output.
6031 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
6033 reflection.c (mono_reflection_create_runtime_class): Alloc
6034 the nested classes linked list using the dynamic image mempool.
6035 Fixes leak in corlib compilation.
6037 2008-08-19 Miguel de Icaza <miguel@novell.com>
6039 * console-io.c: Fix incredibly annoying behavior on the console
6040 after resuming execution after control-z. This affected every
6041 console application.
6043 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
6045 * mempool-internals.h: Header for mono private mempool functions. The first
6046 two function are for allocating glib linked lists using pools.
6048 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
6050 * Makefile.am: Added mempool-internals.h.
6052 2008-08-16 Zoltan Varga <vargaz@gmail.com>
6054 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
6055 (mono_domain_free): Ditto.
6057 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
6058 be used by the JIT to store its domain-specific information, instead of putting
6059 it directly into MonoDomain.
6061 * domain.c (mono_install_create_domain_hook): New helper function to install
6062 a hook which initializes domain->runtime_info.
6064 * domain.c (mono_install_free_domain_hook): Ditto.
6066 2008-08-15 Zoltan Varga <vargaz@gmail.com>
6068 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
6069 asserting if the ares parameter is null.
6071 * mono-perfcounters.c: Fix warnings.
6073 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
6074 is not needed, don't check for interruptions either.
6075 (mono_marshal_get_delegate_end_invoke): Ditto.
6077 2008-08-15 Marek Habersack <mhabersack@novell.com>
6079 * mono-perfcounters.c (predef_readonly_counter): added support for
6080 reading the ASP.NET Requests Queued counter from another process.
6082 2008-08-12 Zoltan Varga <vargaz@gmail.com>
6084 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
6085 MonoImage to simplify the AOT code.
6087 2008-08-10 Zoltan Varga <vargaz@gmail.com>
6089 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
6090 marshalling. Fixes #416078.
6092 2008-08-08 Zoltan Varga <vargaz@gmail.com>
6094 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
6095 it is set, looking up the icall address is deferred to the JIT, since
6096 in embedded scenarios, the icall might not be registered in the runtime
6097 doing the AOT compilation. Backported from the 2.0 branch.
6099 2008-08-08 Zoltan Varga <vargaz@gmail.com>
6101 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
6104 2008-08-05 Marek Habersack <mhabersack@novell.com>
6106 * Makefile.am: added support for cross-compilation.
6108 2008-08-04 Zoltan Varga <vargaz@gmail.com>
6110 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
6112 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
6114 * mono-perfcounters.c: jitted methods and jitted bytes counters.
6116 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
6118 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
6119 mono-perfcounters.c: performance counters implementation.
6121 2008-07-31 Zoltan Varga <vargaz@gmail.com>
6123 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
6124 to gpointer, letting the AOT code decide what to store in it.
6126 2008-07-31 Bill Holmes <billholmes54@gmail.com>
6128 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
6129 mono_class_setup_methods if the methods are not initialized.
6131 Code is contributed under MIT/X11 license.
6133 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
6135 * verify.c: Remove some debug code I commited by accident.
6137 * verify.c (mono_method_is_valid_in_context): Change the return value
6138 to make possible to distinguish between invalid and unverifiable.
6140 * verify.c (verifier_load_method): Don't return NULL for unverifiable
6143 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
6145 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
6146 constraints. Fixes regression in gtest-253.
6148 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
6150 * verify.c (mono_verifier_verify_class): Don't allow generic types
6151 with explicit layout.
6153 * verify.c (mono_method_verify): Check locals and argument types.
6155 2008-07-29 Zoltan Varga <vargaz@gmail.com>
6157 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
6158 wait if the thread is in StopRequested state.
6160 * class.c (mono_class_from_name): Refactor the module searching code into
6161 a separate function so it can be reused in the AOT case too.
6163 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
6165 * verify.c (mono_type_is_valid_in_context): Improve the error message.
6166 Check both the type and it's generic type definition for loader errors.
6168 * verify.c (mono_method_is_valid_in_context): Don't generate another
6169 error when a type errors occur, this leads to the wrong exception been
6172 2008-07-28 Dick Porter <dick@ximian.com>
6176 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
6177 New internal calls to duplicate and close a process handle.
6179 2008-07-27 Andreas Färber <andreas.faerber@web.de>
6181 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
6183 2008-07-27 Zoltan Varga <vargaz@gmail.com>
6185 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
6187 2008-07-27 Robert Jordan <robertj@gmx.net>
6189 * class.c (mono_class_init): Don't compute class.has_finalize for
6190 valuetypes. Fixes #412477.
6192 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
6194 * verify.c: Implement constraint equivalence checking.
6195 This is required when a generic parameter is used as
6196 argument to a constrained one.
6200 2008-07-24 Zoltan Varga <vargaz@gmail.com>
6202 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6204 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
6206 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
6207 synch with managed object layout.
6209 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
6211 * verify.c (do_branch_op): Handle valuetypes and generic
6214 * verify.c (do_cmp_op): Same.
6218 2008-07-24 Mark Probst <mark.probst@gmail.com>
6220 * generic-sharing.c: Fix memory leaks.
6222 * class.c, class-internals.h: Make
6223 mono_class_inflate_generic_type_with_mempool() non-static.
6225 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
6227 * pedump.c (dump_verify_info): Dump full class name.
6229 2008-07-24 Mark Probst <mark.probst@gmail.com>
6231 * generic-sharing.c: Removed some old code that didn't do anything.
6233 2008-07-24 Massimiliano Mantione <massi@ximian.com>
6234 * profiler.c: Added runtime_initialized_event,
6235 mono_profiler_install_runtime_initialized and
6236 mono_profiler_runtime_initialized. This new hook tells the profiler
6237 when the runtime is sufficiently initialized to be able to call
6238 mono_thread_attach on the root appdomain.
6239 * profiler.h, profiler-private.h: Likewise.
6241 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
6243 * verify.c (do_cast): Do boxing for generic arguments as well.
6245 * class.c (is_nesting_type): Drop generic instantiations before
6246 checking for nesting.
6248 * class.c (can_access_instantiation): Allow access to generic
6251 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
6253 * verify.c (verify_class_for_overlapping_reference_fields):
6254 On some cases, the field size might be zero, guard against that.
6255 Fix the explicit layout check to work as expected.
6257 2008-07-23 Zoltan Varga <vargaz@gmail.com>
6259 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
6260 mono_thread_resume () during shutdown, since the thread we want to abort
6263 2008-07-22 Zoltan Varga <vargaz@gmail.com>
6265 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
6268 * debug-mono-symfile.c: Fix a warning.
6270 * mono-perfcounters.c (get_cpu_times): Fix a warning.
6272 * object.c (mono_class_vtable): Check if exception_type is set, and return
6273 NULL as defined by the function comments.
6275 2008-07-22 Mark Probst <mark.probst@gmail.com>
6277 * mempool.c: Use malloc for every single mempool allocation if the
6278 configure option is set. This makes it easier to track mempool
6279 allocations with tools like Valgrind.
6281 2008-07-22 Jb Evain <jbevain@novell.com>
6283 * reflection.c (create_dynamic_mono_image): emit the same
6284 metadata version that SL2 does when creating a SL2 image.
6286 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
6289 * icall.c: New icall System.Enum:get_hashcode. This function
6290 avoids the overhead of boxing the enum to the underlying type.
6292 2008-07-21 Mark Probst <mark.probst@gmail.com>
6294 * reflection.c (mono_method_get_object): Don't let static RGCTX
6295 invoke wrappers get into MonoReflectionMethods.
6297 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
6299 * object-internals.h:
6300 * object.c: New mono_runtime_class_init_full function
6301 that makes throwing the exception optinal.
6303 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
6304 for the case where the exception object is supplied.
6306 2008-07-16 Kornél Pál <kornelpal@gmail.com>
6308 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
6311 Contributed under MIT/X11 license.
6313 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
6315 * string-icalls.c (ves_icall_System_String_InternalSplit):
6316 Optimize array allocation by caching the MonoClass of the
6319 * icall.c (ves_icall_Type_GetMethodsByName): Same.
6321 * reflection.c (mono_param_get_objects): Same.
6323 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
6326 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
6327 It inflates the given type using the class context.
6329 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
6331 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
6332 the vtable if it already exists.
6334 * object-internals.h: Add mono_class_try_get_vtable as part of the
6337 * reflection.c (mono_type_get_object): Use the MonoObject from the
6338 vtable when possible. Reduces locking contention on reflection heavy
6341 2008-07-15 Zoltan Varga <vargaz@gmail.com>
6343 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
6344 g_bit_nth_msf () since that macro is not implemented in eglib.
6346 2008-07-13 Zoltan Varga <vargaz@gmail.com>
6348 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
6349 on platforms which do not support it.
6351 2008-07-12 Zoltan Varga <vargaz@gmail.com>
6353 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
6355 2008-07-11 Martin Baulig <martin@ximian.com>
6357 * mono-debug-debugger.h
6358 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
6360 * mono-debug-debugger.c
6361 (_mono_debugger_interruption_request): New global volatile variable.
6362 (mono_debugger_check_interruption): New public function.
6365 (mono_thread_current_check_pending_interrupt): Call
6366 mono_debugger_check_interruption().
6367 (mono_thread_interruption_checkpoint_request): Likewise.
6369 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6371 * verify.c: Add more type checks for loaded types. Verify the result
6372 handle from ldtoken.
6374 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6376 * loader.c (field_from_memberref): Don't crash if the field
6379 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6381 * verify.c: Verify if type and method instantiations
6382 don't have invalid VAR or MVAR arguments.
6384 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6386 * verify.c: Fix double free of function pointer list.
6388 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6390 * object.c (mono_string_to_utf8): Comment the new code as it
6393 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
6395 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
6397 2008-07-07 Bill Holmes <billholmes54@gmail.com>
6399 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
6400 is not throw too many times.
6402 Code is contributed under MIT/X11 license.
6404 2008-07-07 Zoltan Varga <vargaz@gmail.com>
6406 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
6407 debugging is turned off.
6409 2008-07-06 Zoltan Varga <vargaz@gmail.com>
6411 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
6413 2008-07-04 Mark Probst <mark.probst@gmail.com>
6415 * class-internals.h, class.c: Added new generic sharing option:
6416 Share only stuff in System.Collections.Generic, which is now the
6419 2008-07-04 Mark Probst <mark.probst@gmail.com>
6421 * generic-sharing.c, class-internals.h: New function for getting a
6422 generic method in a generic class given the corresponding method
6423 for a different instantiation of the class. Partly refactored
6424 from mini-trampolines.c.
6426 * class.c: Make sure generic methods have a class_inst if they are
6427 part of a generic class.
6429 * metadata.c (mono_type_stack_size_internal): Handle type
6432 2008-07-04 Mark Probst <mark.probst@gmail.com>
6434 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
6435 Signifies whether information on the this/vtable/mrgctx variable
6438 2008-07-04 Mark Probst <mark.probst@gmail.com>
6440 * object.c, object-internals.h, icall.c: New function
6441 mono_delegate_ctor_with_method(), which does the same as
6442 mono_delegate_ctor(), but takes an explicit method argument
6443 instead of taking the method from the jit info.
6445 * marshal.c: When creating a delegate with an inflated method take
6446 the "this" argument as the target class for the castclass.
6448 2008-07-03 Mark Probst <mark.probst@gmail.com>
6450 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
6451 mono_jit_info_table_find() to perform very badly in some cases.
6453 2008-07-02 Zoltan Varga <vargaz@gmail.com>
6455 * icall.c (type_from_typename): Handle 'string'.
6457 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
6458 wrappers into the wrapper_hash, since the key is not a MonoMethod.
6460 2008-07-01 Zoltan Varga <vargaz@gmail.com>
6462 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
6464 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
6465 number of available managed allocator types.
6467 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
6468 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
6470 2008-06-30 Zoltan Varga <vargaz@gmail.com>
6472 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
6473 which is a low level lock protecting just the 'jit_code_hash' hash table.
6475 * domain.c: Initialize+cleanup jit_code_hash_lock.
6477 2008-06-30 Kornél Pál <kornelpal@gmail.com>
6479 * coree.c (mono_load_coree): Set coree_module_handle global variable only
6480 after initialization.
6482 * coree.h: Make MonoFixupExe internal.
6484 Contributed under MIT/X11 license.
6486 2008-06-30 Kornél Pál <kornelpal@gmail.com>
6488 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
6489 because that is platform independent. Check NumberOfRvaAndSizes in PE32
6491 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
6492 image being loaded is a CLI image and _CorValidateImage gets called.
6494 * coree.h: Add MonoLoadImage.
6496 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
6497 instead of LoadLibrary.
6499 Contributed under MIT/X11 license.
6501 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
6503 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
6504 for any primitive type.
6506 2008-06-29 Zoltan Varga <vargaz@gmail.com>
6508 * object.c (mono_array_new_specific): Optimize this and the other allocation
6511 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
6512 domains too if mono_dont_free_domains is set.
6514 * domain-internals.h (mono_dont_free_domains): New internal option controlling
6515 whenever to free appdomain data after it has been unloaded.
6517 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
6519 2008-06-28 Zoltan Varga <vargaz@gmail.com>
6521 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
6522 (mono_method_get_equivalent_method): Fix a warning.
6524 * object.c (mono_message_init): Avoid looking up array types for each call.
6526 2008-06-27 Zoltan Varga <vargaz@gmail.com>
6528 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
6531 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
6534 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
6537 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
6540 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
6542 * object.c (mono_value_box): Fix boxing of nullables.
6544 2008-06-26 Kornél Pál <kornelpal@gmail.com>
6546 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
6547 mono_module_handle that is defined by the linker; no initialization required.
6548 * coree.h: Remove mono_module_handle, add __ImageBase, update
6549 mono_image_open_from_module_handle.
6550 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
6551 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
6552 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
6553 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
6554 to 4 GB away from image base address. IA64 version is not tested but was very
6555 easy to implement and should work if we ever need it.
6556 * domain.c (mono_init_internal): Avoid system error message boxes.
6557 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
6558 with has_entry_point. Handle do_mono_image_load fauilre correctly.
6559 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
6560 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
6561 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
6563 Contributed under MIT/X11 license.
6565 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
6567 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
6568 as part of the private mono API.
6570 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
6571 Do proper argument checking for methods that belong to generic classes.
6572 Do proper type resolution for GMFH/2.
6575 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
6577 * verify.c (do_switch): Fix a memory corruption bug with
6578 the jump index is out of bound.
6580 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
6582 * verify.c: Disable debug code.
6584 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
6586 * reflection.c (mono_image_get_methodbuilder_token): Use
6587 mono_image_get_methodspec_token_for_generic_method_definition
6588 instead of mono_image_get_memberref_token. We cache more memberef
6591 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
6593 * verify.c: Inflate exception clause types.
6596 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
6598 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
6601 * reflection.c (mono_image_get_ctorbuilder_token): Same.
6603 * reflection.c (mono_image_create_method_token): Same.
6605 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
6607 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
6608 It does the same as mono_image_get_methodref_token but works on
6611 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
6612 and always generate a methodspec. This follows the old behavior and fixes
6613 the regressions in System.Core.
6615 2008-06-24 Zoltan Varga <vargaz@gmail.com>
6617 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
6618 don't event mono_class_get () succeeds. Fixes #402182.
6620 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
6622 * metadata-internals.h: Added MonoDynamicImage::methodspec
6623 hashtable to store methodspec tokens created for MethodBuilders.
6625 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
6626 MethodBuilders as open instantiations if a methodspec was requested.
6628 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
6630 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
6632 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
6636 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
6638 * loader.c (method_from_methodspec): Avoid crashing if the
6639 method lookup fails.
6641 2008-06-20 Dick Porter <dick@ximian.com>
6643 * socket-io.c (get_socket_assembly): Cope with Moonlight network
6644 classes being in a different assembly. Fixes bug 399184.
6646 2008-06-20 Zoltan Varga <vargaz@gmail.com>
6648 * loader.c (mono_loader_init): Make this callable multiple times.
6649 (mono_dllmap_insert): Call mono_loader_init () so this works even before
6650 the runtime is initialized. Fixes #401755.
6652 2008-06-19 Dick Porter <dick@ximian.com>
6654 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
6657 2008-06-19 Dick Porter <dick@ximian.com>
6660 * icall-def.h: Implement Socket generic Send() and Receive()
6661 methods. Fixes bug 395168.
6663 2008-06-19 Kornél Pál <kornelpal@gmail.com>
6665 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
6667 Contributed under MIT/X11 license.
6669 2008-06-18 Martin Baulig <martin@ximian.com>
6671 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
6672 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
6673 set to 80.0. The debugger <-> runtime interface is now frozen as
6677 (mono_debug_debugger_version): Bump to 4.
6679 2008-06-18 Martin Baulig <martin@ximian.com>
6681 * debug-mono-symfile.c
6682 (load_symfile): Don't check the minor version.
6684 * debug-mono-symfile.h: Bump the version number to 50.0.
6686 2008-06-18 Martin Baulig <martin@ximian.com>
6688 * debug-mono-symfile.c
6689 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
6690 minimum required version.
6692 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
6694 * reflection.c (mono_custom_attrs_from_property): Fix support for
6695 retriveving cattrs of dynamic inflated generic types.
6697 * reflection.c (mono_custom_attrs_from_event): Same.
6699 * reflection.c (mono_custom_attrs_from_field): Same;
6701 * reflection.c (typebuilder_setup_events): Same cattrs of events.
6703 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
6704 Moved to metadata.c.
6706 * metadata.c: New functions to retrive the equivalent field, event
6707 of property from the generic type definition.
6709 * metadata-internals.h: Added new functions from metadata.c.
6711 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
6713 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
6714 to cached in a mempool is used.
6716 * metadata.c (free_generic_class): In some situations field generic_info type
6717 is not properly dup'ed and leads to double free'ing.
6721 2008-06-17 Mark Probst <mark.probst@gmail.com>
6723 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
6724 this arguments (will be needed later for generic methods).
6727 2008-06-17 Mark Probst <mark.probst@gmail.com>
6729 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
6730 Create a static RGCTX invoke wrapper for methods which require it.
6732 2008-06-17 Mark Probst <mark.probst@gmail.com>
6734 * object.c, class-internals.h: New function for checking whether
6735 an individual field is special static.
6737 2008-06-15 Zoltan Varga <vargaz@gmail.com>
6739 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
6740 linear search since the table is sorted.
6742 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
6745 2008-06-14 Zoltan Varga <vargaz@gmail.com>
6747 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
6748 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
6750 * gc.c (mono_domain_finalize): Allow an infinite timeout.
6752 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
6754 * threads.c (mono_thread_request_interruption): Get rid of locking, use
6755 InterlockedCompareExchange to query and modify
6756 thread->interruption_requested.
6758 * object-internals.h (struct _MonoThread): Change interruption_requested
6759 to a gint32 so it can be modified by atomic operations. Add
6760 'critical_region_level' from the managed side, change small_id to a guint32,
6761 add new set of 'unused' fields.
6763 * appdomain.c: Bump corlib version.
6765 2008-06-13 Zoltan Varga <vargaz@gmail.com>
6767 * class.c (mono_class_from_name): Search modules as well. Fixes
6770 2008-06-13 Mark Probst <mark.probst@gmail.com>
6772 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
6773 templates. Templates are generalized with an additional type_argc
6774 argument. RGCTX templates have type_argc==0, MRGCTX templates
6777 * domain-internals.h, domain.c: New hash table for looking up
6780 * metadata.c, metadata-internals.h: Rename hash and equal
6781 functions for MonoGenericInst's and make them public.
6783 * class-internals.h: New data structures for the MRGCTX. Macros
6784 for distinguishing slots in the RGCTX and the MRGCTX.
6786 2008-06-13 Mark Probst <mark.probst@gmail.com>
6788 * object.c (mono_method_get_imt_slot): Put the same methods of
6789 different instantiations of the same generic interface in the same
6790 IMT slots, to make generic sharing simpler.
6792 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
6794 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
6796 * metadata.c (mono_metadata_field_info_with_mempool): Added.
6797 This function works just like mono_metadata_field_info, but
6798 accept a mempool as argument to be used allocating memory.
6800 * marshal.c (mono_marshal_load_type_info): Use new function
6801 to load marshal data into image mempool.
6803 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
6805 * class.c (mono_class_inflate_generic_type_with_mempool):
6806 This function allows to inflate a generic type using
6809 * class.c (inflate_generic_type): Take a mempool as argument
6810 and use it to do type dup'ing.
6812 * class.c (mono_class_setup_fields): Field type for generic
6813 generic classes are allocated from the image mempool.
6815 * metadata.c (free_generic_class): Inflated field type is
6816 now allocated in the image mempool.
6818 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
6820 * threads.c (thread_cleanup): Free MonoThread::name.
6822 2008-06-12 Marek Habersack <mhabersack@novell.com>
6824 * appdomain.c (ensure_directory_exists): avoid unnecessary
6825 mkdir(2) calls when the shadow directory already exists.
6826 (mono_make_shadow_copy): copy also satellite assemblies from the
6827 private bin directories.
6829 2008-06-11 Zoltan Varga <vargaz@gmail.com>
6831 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
6833 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
6834 a page boundary. Fixes #396219.
6836 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6838 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
6839 due to double-checked locking.
6841 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6843 * assembly.c (build_assembly_name): Release memory on failure.
6845 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
6847 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6849 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
6852 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6854 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
6857 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6859 * loader.c (field_from_memberref): Check if field signature type is equal
6860 to the non-inflated type of the field. Fixes #398980.
6862 2008-06-11 Zoltan Varga <vargaz@gmail.com>
6864 * assembly.c (mono_assembly_load_from_full): Call
6865 mono_assembly_load_friends () outside the assemblies lock, since it can
6866 acquire the loader lock. Fixes #323696.
6868 * reflection.c (resolve_object): Inflate the inst with the context for
6869 FieldOnTypeBuilderInst. Fixes #399010.
6871 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6873 * reflection.c (mono_image_get_field_on_inst_token): Don't
6874 inflate the field to encode it's signature. If it's a
6875 VAR or MVAR it should stay that way in the signature.
6878 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6880 * reflection.c (resolve_object): Release memory of inflated types.
6882 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6884 * loader.c (mono_method_get_signature_full): Remove assert about
6885 loading a methodspec to a generic method. We have such methods, such as
6886 System.Threading.Interlocked::CompareExchange<T>.
6887 This assert was removed since it crashes the verifier when it checks
6888 methods calling CompareExchange<T>.
6890 2008-06-10 Marek Safar <marek.safar@gmail.com>
6892 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
6893 of Type array and not MonoType.
6895 2008-06-10 Marek Habersack <mhabersack@novell.com>
6897 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
6900 2008-06-10 Martin Baulig <martin@ximian.com>
6902 * debug-mono-symfile.h
6903 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
6904 changes to the file format, but we were generating incorrect
6905 source file indices in the line number table due to a bug, which
6906 made backtraces report an incorrect source file.
6908 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6910 * mono-debug.c: Moved mono_debug_free_method_jit_info from
6911 mini/debug-mini.c to here.
6913 * mono-debug.c (il_offset_from_address): Free memory from find_method.
6915 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
6916 use it to release structs returned by mono_debug_find_method.
6918 2008-06-10 Zoltan Varga <vargaz@gmail.com>
6920 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
6921 since it needs to set method->slot for all interface methods.
6923 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
6925 * class-internals.h: Forgot to add.
6927 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
6929 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
6931 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
6932 Lookup the custom attributes from property_hash.
6934 * reflection.c (mono_save_custom_attrs): Save the custom attributes
6935 in property_hash. Allocate all data using the image mempool.
6937 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
6938 for dynamic_custom_attrs to checks if the image is dynamic.
6940 2008-06-09 Zoltan Varga <vargaz@gmail.com>
6942 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
6945 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
6946 runtime functions while holding the domain assemblies lock.
6948 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
6950 * verify.c: Reapplied the last bit of the reverted changes.
6952 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
6954 * verify.c: Reapplied more of the reverted changes.
6956 2008-06-09 Martin Baulig <martin@ximian.com>
6958 * debug-mono-symfile.c (load_symfile): Check the major version
6959 first; if it's wrong, don't print the minor version in the error message.
6961 2008-06-09 Zoltan Varga <vargaz@gmail.com>
6963 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
6964 lock instead of the domain lock to avoid deadlocks, since the thread might
6965 already hold the loader lock.
6967 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
6968 (mono_thread_attach): Ditto.
6970 * monitor.c: Use a TLS variable for holding the current thread id instead
6971 of calling pthread_self ().
6972 (mono_monitor_init_tls): New internal function to initialize the TLS
6974 (mono_monitor_try_enter_internal): Put the owner == id check after the
6977 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
6978 missed optimizations when using gcc-4.3.
6980 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
6982 * reflection.c (mono_dynamic_image_free): Free the memory
6983 used by MonoGenericParam in MonoDynamicImage::gen_param.
6985 * reflection.c (mono_reflection_setup_generic_class): Allocate
6986 container from mempool.
6988 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
6989 container from mempool.
6991 2008-06-07 Zoltan Varga <vargaz@gmail.com>
6993 * threads.c (mono_set_pending_exception): New internal function to set the
6994 pending exception of the current thread.
6995 (mono_thread_get_and_clear_pending_exception): Check for
6996 thread->pending_exception as well.
6998 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
7000 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
7001 it can trigger a collection.
7003 2008-06-06 Martin Baulig <martin@ximian.com>
7005 Merged the `debugger-kahalo' branch.
7008 (MONO_DEBUGGER_VERSION): Bumped to 72.
7010 * debug-mono-symfile.h
7011 (MonoSymbolFileMethodIndexEntry): Removed.
7012 (MonoSymbolFileMethodEntry): New public typedef.
7013 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
7014 (MonoSymbolFileSourceEntry): Remove everything except `index' and
7016 (MonoSymbolFileMethodEntry): Removed.
7017 (MonoSymbolFileLexicalBlockEntry): Removed.
7018 (MonoSymbolFileLineNumberEntry): Removed.
7019 (MonoDebugLexicalBlockEntry): Removed.
7020 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
7021 removed `num_il_offsets' and `il_offsets'.
7022 (MonoSymbolFile): Replace `version' with `major_version' and
7024 (MONO_SYMBOL_FILE_VERSION): Replace with
7025 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
7026 `MONO_SYMBOL_FILE_MINOR_VERSION'.
7028 * debug-mono-symfile.c
7029 (mono_debug_symfile_lookup_location): Add support for the new line
7030 number table format.
7032 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7034 * metadata.c (free_generic_class): Release the inflated
7035 MonoClass of dynamic generic classes if it's not a generic
7038 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7040 * verify.c: Reapplied more of the reverted changes.
7042 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7044 * reflection.c (lookup_custom_attr): Clean the cached flag or
7045 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
7048 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7050 * verify.c: Reapplied a small part of the reverted changes.
7052 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7054 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7056 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
7057 previously in managed code.
7058 (mono_monitor_exit): Ditto.
7059 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
7061 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
7062 the managed definition.
7064 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7066 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
7068 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7070 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
7072 * monitor.c: Add some micro optimizations.
7074 * icall.c (type_from_typename): Handle 'bool'.
7076 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7078 * verify.c: Implement constructor verification per P III 1.8.1.4.
7081 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7083 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
7084 holding the assemblies lock here too.
7086 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7088 * verify.c: Kill stack_top function.
7090 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7092 * verify.c: Kill stack_get function.
7094 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7096 * verify.c (mono_method_verify): Last change broke the build. Fixed.
7098 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7100 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
7103 * verify.c (mono_method_verify): Inflate params and locals to avoid
7104 mismatch when checking for compatibility.
7106 2008-06-05 Jonathan Chambers <joncham@gmail.com>
7108 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
7109 Length prefix should be size in bytes. Fix bug #339530.
7111 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
7112 Length prefix should be size in bytes. Fix bug #339530.
7114 Code is contributed under MIT/X11 license.
7116 2008-06-05 Bill Holmes <billholmes54@gmail.com>
7118 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
7120 Contributed under MIT/X11 license.
7122 2008-06-05 Martin Baulig <martin@ximian.com>
7124 * mono-debug-debugger.c
7125 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
7127 2008-06-05 Zoltan Varga <vargaz@gmail.com>
7129 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
7130 while holding the assemblies lock to prevent deadlocks. Handle the case
7131 where the search hook returns NULL but the assembly was still loaded.
7134 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
7135 modify domain state.
7137 2008-06-05 Andreas Färber <andreas.faerber@web.de>
7139 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
7140 * Makefile.am (pedump_LDADD): Post-process object files and
7141 add dtrace-generated object file, if necessary.
7143 Code is contributed under MIT/X11 license.
7145 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
7147 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
7149 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
7151 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
7153 2008-06-04 Mark Probst <mark.probst@gmail.com>
7155 * threads.c: Try to free everything from the delayed free table
7156 when shutting down threads, and set the variable to NULL after the
7157 table is freed so that calling
7158 mono_thread_hazardous_try_free_all() when shutting down the root
7159 domain doesn't crash.
7161 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
7163 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
7164 the caller if resulting type was inflated.
7166 * class.c (mono_class_create_from_typespec): Free the MonoType if it
7169 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
7172 2008-06-04 Zoltan Varga <vargaz@gmail.com>
7174 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
7175 class library tests.
7177 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
7178 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
7181 2008-06-04 Mark Probst <mark.probst@gmail.com>
7183 * domain.c, domain-internals.h: The JIT infos are now freed by the
7184 JIT info table code. They are freed immediately if there only a
7185 single JIT info table in circulation. If there is more, the free
7186 is delayed via a queue.
7188 * threads.c, threads-types.h: New hazard pointer function for
7189 freeing all freeable delayed items in one sitting.
7191 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7193 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
7195 * reflection.c (typebuilder_setup_properties): Same.
7197 * reflection.c (typebuilder_setup_events): Same.
7199 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7201 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
7202 and use it for allocating memory.
7204 * reflection.c (mono_marshal_spec_from_builder): Same.
7206 * reflection.c: Change code to use new signatures.
7208 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
7210 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7212 * decimal.c (rescale128): Put back one line which was accidently commented
7215 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
7218 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7220 * reflection.c (mono_reflection_generic_class_initialize): Name must
7221 be always malloc'ed so we can free it later on. Do this for field, property
7224 * metadata.c (free_generic_class): Free field, property and event names.
7226 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7228 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
7229 instead of g_memdup.
7231 * reflection.c (typebuilder_setup_fields): Same.
7233 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7235 * decimal.c (rescale128): Optimize this function a bit more.
7237 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7239 * metadata.c (free_generic_class): Release some memory from
7240 SRE generic classes.
7242 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7244 * reflection.c (mono_image_get_generic_field_token): No reference
7245 to name is kept, free it.
7247 * reflection.c (mono_reflection_generic_class_initialize): Free
7248 more memory of the inflated field.
7250 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7252 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
7255 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
7257 * reflection.c (mono_dynamic_image_free): Release memory used by
7258 MonoDynamicImage::array_methods elements.
7260 * reflection.c (assembly_add_win32_resources): Release memory after
7263 2008-06-02 Zoltan Varga <vargaz@gmail.com>
7265 * decimal.c (log2_32): Use an optimized version for this function too.
7267 * decimal.c (log2_64): Fix this on 32 bit machines.
7269 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
7271 * class.c (mono_dup_array_type): Implement allocation using a mempool.
7273 * class.c (mono_metadata_signature_deep_dup): Same.
7275 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
7278 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
7280 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
7282 * metadata-internals.h: Added mono_metadata_signature_dup_full.
7284 * class-internals.h: Update signatures to take a MonoMemPool.
7286 2008-06-02 Dick Porter <dick@ximian.com>
7288 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
7290 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
7291 FormatMessage API to get the error text. Fixes bug 321827.
7293 2008-06-02 Zoltan Varga <vargaz@gmail.com>
7295 * decimal.c: Add some micro optimizations to make decimal operations faster.
7297 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
7299 * reflection.c (method_encode_clauses): Take a mempool
7300 as parameter and use it to allocate the clause array.
7302 * reflection.c (mono_image_get_field_on_inst_token): Free
7303 the inflated type after encoding it.
7305 * reflection.c (mono_dynamic_image_free): Free each element
7306 of MonoDynamicImage::gen_params.
7308 * reflection.c (reflection_methodbuilder_to_mono_method):
7309 Allocate the generic param array from the mempool.
7310 Allocate signature params from the mempool.
7312 * reflection.c (mono_reflection_generic_class_initialize):
7313 Free inflated fields after been used.
7315 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
7317 * icall.c: Reapply the memory leak fixes as they no
7318 longer make mono crash.
7320 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
7322 * reflection.c (mono_type_get_object): Don't store the suplied
7323 MonoType with type_hash. A caller which pass a type that
7324 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
7325 might end with a pointer to freed memory.
7326 The solution is to use byval_arg or this_arg from the associated
7327 MonoClass of the supplied type.
7329 2008-05-29 Zoltan Varga <vargaz@gmail.com>
7331 * icall.c: Revert the rest of the last change as it breaks the build too.
7333 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7335 * icall.c: Revert a leak fix as it's breaking the build.
7337 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7339 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
7341 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7343 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
7345 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7347 * icall.c: Fix some memory leaks.
7349 2008-05-29 Dick Porter <dick@ximian.com>
7351 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
7352 async socket operations from the pending list when a socket
7353 closes. Leaving it until the threadpool services the event
7354 exposes a race condition when a socket descriptor is reused.
7357 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7359 * object.c: Fix negative index check for array alocation.
7361 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7363 * icall.c, marshal.c: Delegate wrappers should skip visibility.
7364 This check is performed by the verifier for IL created delegates
7365 and by Delegate::CreateDelegate for programatically created ones.
7368 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7370 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
7371 Fix code to use mono_array_size_t instead of int.
7373 Based on patch by Luis F. Ortiz.
7374 Contributed under X11 license.
7375 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7377 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7379 * icall.c: Added ves_icall_System_Array_GetLongLength and
7380 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
7383 * icall.h: Export both new functions.
7385 Based on patch by Luis F. Ortiz.
7386 Contributed under X11 license.
7387 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7389 2008-05-28 Martin Baulig <martin@ximian.com>
7391 The debugger now requires exactly r103463.
7393 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
7394 This version is not supported by the debugger, wait for 72.
7396 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7398 * object.h: Changed array related functions to use
7399 mono_array_size_t instead of guint32. Forgot to commit this file.
7401 Patch by Luis F. Ortiz.
7402 Contributed under X11 license.
7403 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7406 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7408 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
7409 don't define it. Use the number literal instead.
7411 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
7413 * icall.c: Changed array related functions to use
7414 mono_array_size_t instead of guint32.
7416 * icall.c (ves_icall_System_Array_GetLength): Check for length
7417 overflow under MONO_BIG_ARRAYS.
7419 Based on patch by Luis F. Ortiz.
7420 Contributed under X11 license.
7421 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7423 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
7425 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
7427 Based on patch by Luis F. Ortiz.
7428 Contributed under X11 license.
7429 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7431 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
7433 * object.c, object.h: Changed array related functions to use
7434 mono_array_size_t instead of guint32.
7436 Patch by Luis F. Ortiz.
7437 Contributed under X11 license.
7438 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7440 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
7442 * object.h: Introduced mono_array_size_t typedef. This must be used
7443 in all places an array length is expected. This is 64bits wide if
7444 MONO_BIG_ARRAYS is enabled.
7446 Patch by Luis F. Ortiz.
7447 Contributed under X11 license.
7448 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7450 2008-05-27 Zoltan Varga <vargaz@gmail.com>
7452 * security-manager.c class.c: Set the class exception info by calling
7453 mono_class_set_failure ().
7455 * class.c (mono_class_get_exception_data): New accessor function.
7456 (mono_class_set_failure): Store exception_data in the property hash.
7458 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
7459 the struct as a property.
7461 * loader.c (mono_get_method_full): Store the lookup result for method
7462 tokens in method_cache, the others in methodref_cache to decrease the memory
7463 usage of hash tables.
7465 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
7466 (mono_image_init): method_cache is lazy inited now.
7468 * metadata-internals.h (struct _MonoImage): Change method_cache to
7469 a MonoValueHashTable, add a separate methodref_cache.
7471 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
7473 * number-formatter.h: Fix tables to avoid arithemtic overflow in
7474 Double.ToString as exposed by Bug #383531.
7476 2008-05-26 Zoltan Varga <vargaz@gmail.com>
7478 * number-formatter.h: Make some tables static.
7480 * class.c (mono_method_set_generic_container): New accessor function.
7481 (mono_method_get_generic_container): Ditto.
7483 * class-internals.h (struct _MonoMethod): Remove rarely used
7484 'generic_container' field, store it in the property hash instead. Add
7485 'is_generic' boolean field instead.
7487 * image.c (mono_image_init): Initialize property_hash.
7488 (mono_image_close): Destroy property_hash.
7490 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
7491 hold rarely used fields of runtime structures belonging to this image.
7493 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
7494 to get/set method->generic_container.
7496 * loader.c (mono_get_method_from_token): Avoid loading the method header for
7499 2008-05-25 Zoltan Varga <vargaz@gmail.com>
7501 * class.c (mono_class_inflate_generic_method_full): Don't increase
7502 mono_stats.inflated_method_count for methods found in the cache.
7504 * threads.c (mono_thread_request_interruption): Add a comment about
7507 2008-05-24 Zoltan Varga <vargaz@gmail.com>
7509 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
7510 interface_offsets_packed table.
7512 * class.c (mono_class_init): Remove some dead code.
7514 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
7515 mono_class_setup_vtable () when CAS is active to detect security problems.
7517 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
7519 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
7521 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
7522 parameters as it's irrelevant for delegate checking.
7524 2008-05-23 Zoltan Varga <vargaz@gmail.com>
7526 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
7528 * class.c (mono_class_init): Control the creation of a generic vtable using
7529 a global which is true by default, but set to false by the runtime startup code.
7531 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
7532 Disabled for now since it breaks the embedding API.
7533 Move the setup of class->methods for arrays to mono_class_setup_methods ().
7534 (mono_class_setup_methods): Add a memory barrier.
7536 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
7537 when mono_class_init () doesn't compute the generic vtable.
7539 2008-05-23 Massimiliano Mantione <massi@ximian.com>
7540 * profiler.c: Added mono_profiler_install_statistical_call_chain,
7541 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
7542 to support call chains (backtrace) in the stat profiler.
7543 * profiler.c, profiler-private.h: Likewise.
7545 2008-05-22 Mark Probst <mark.probst@gmail.com>
7547 * generic-sharing.c: Init generic class when a method of it is
7548 requested via a runtime generic context.
7550 2008-05-22 Zoltan Varga <vargaz@gmail.com>
7552 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
7554 * reflection.c (mono_type_get_object): Add a FIXME.
7556 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
7558 * class.c (mono_class_get_method_by_index): New helper function, returning an
7559 entry in the class->methods array.
7561 2008-05-21 Zoltan Varga <vargaz@gmail.com>
7563 * class.c (mono_class_init): Only do the array optimization for szarrays.
7564 Avoid creating a generic vtable for generic instances as well.
7565 (mono_class_get_method_from_name_flags): Don't search in the metadata for
7568 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
7570 * loader.c (mono_get_method_constrained): Inflate the signature
7571 with class context. Fix #325283.
7573 2008-05-21 Zoltan Varga <vargaz@gmail.com>
7575 * object.c (mono_class_create_runtime_vtable): Add a comment.
7577 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
7579 (setup_interface_offsets): Handle the case when this is called twice for arrays.
7580 (mono_class_setup_vtable_general): Add an assert.
7581 (mono_class_init): Avoid creating a generic vtable for arrays.
7583 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
7584 here, let mono_class_init () do that.
7586 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
7587 interfaces in mscorlib.
7589 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
7590 interfaces. Add some comments.
7591 (mono_class_init): Call mono_class_setup_methods () here since it is no
7592 longer called by mono_class_setup_vtable ().
7594 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
7595 not set in class->vtable.
7596 (mono_class_create_runtime_vtable): Reenable the disabled code.
7598 * object.c (mono_class_create_runtime_vtable): Disable the last change for
7599 now as it causes some test failures.
7601 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
7602 if using the vtable trampoline. Also remove some strange code which put the
7603 generic methods themselves into the vtable slots. Remove the AOT init_vtable
7604 stuff as it is no longer needed.
7606 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
7608 * pedump.c: Give make --verify all option check code as well.
7609 Using --verify code won't check for metadata now.
7611 2008-05-19 Martin Baulig <martin@ximian.com>
7613 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
7616 (_mono_debug_using_mono_debugger): New global variable; it's set
7617 directly by the debugger, so mono_debug_using_mono_debugger() also
7618 works after attaching.
7620 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
7622 * object.c (mono_class_create_runtime_vtable): Use memory barriers
7623 as we do double checked locking on MonoClass::runtime_info and
7624 MonoClassRuntimeInfo::domain_vtables.
7626 2008-05-18 Zoltan Varga <vargaz@gmail.com>
7628 * debug-helpers.c (print_field_value): Fix a warning.
7630 2008-05-16 Zoltan Varga <vargaz@gmail.com>
7632 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
7633 set in the AOT case.
7635 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
7637 * class.c (mono_class_setup_vtable_general): Use memory barriers
7638 as we do double checked locking on MonoClass::vtable.
7640 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
7642 * reflection.c (resolve_object): Inflate only if the generic context
7643 is not null. Fixes #389886.
7645 2008-05-15 Jonathan Chambers <joncham@gmail.com>
7647 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
7650 Code is contributed under MIT/X11 license.
7652 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
7654 * class.c: Revert unrelated change.
7656 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
7658 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
7659 a generic instantiation, use mono_class_from_mono_type instead of playing
7660 with MonoType directly.
7662 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
7664 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
7665 checks must ignore generic instantiations, so mono_class_has_parent is not
7666 suitable. Fixes #390128.
7668 2008-05-14 Zoltan Varga <vargaz@gmail.com>
7670 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
7671 it to avoid registering tokens during metadata generation. Fixes #390023.
7673 2008-05-14 Kornél Pál <kornelpal@gmail.com>
7675 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
7678 Contributed under MIT/X11 license.
7680 2008-05-14 Kornél Pál <kornelpal@gmail.com>
7682 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
7683 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
7684 to fixup the EXE image.
7685 (mono_cleanup): Use mono_close_exe_image.
7686 (mono_close_exe_image): New function.
7687 * image.c: Include "marshal.h".
7688 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
7689 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
7690 counting when the image is loaded outside of mono_image_open_full. Set status
7691 based on GetLastError.
7692 * coree.c: Include required headers. Add init_from_coree.
7693 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
7694 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
7695 (_CorExeMain): Set init_from_coree.
7696 (CorExitProcess): Only call ExitProcess for now.
7697 (CorBindToRuntimeEx): New stub implementation.
7698 (CorBindToRuntime): New function.
7699 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
7700 (MonoFixupExe): ILONLY executables require no fixups.
7701 (mono_set_act_ctx): New function to set activation context.
7702 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
7703 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
7704 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
7705 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
7707 * domain-internals.h: Add mono_close_exe_image.
7709 Contributed under MIT/X11 license.
7711 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
7713 * metadata.c (mono_metadata_compute_size): Correctly calculate field
7714 size for generic param and event tables. Fixes #388977.
7716 2008-05-13 Zoltan Varga <vargaz@gmail.com>
7718 * loader.c (mono_method_signature): Use memory barriers because of the double
7719 checked locking pattern.
7721 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
7722 aborting or aborted as well. Fixes #376391.
7724 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
7725 existing runtime state in the Suspend handler during shutdown.
7727 2008-05-12 Zoltan Varga <vargaz@gmail.com>
7729 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
7731 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
7732 which are starting up or shutting down.
7734 * threads.c (mono_threads_set_shutting_down): Don't return a value since
7735 this function never returns if the runtime is already shutting down.
7737 * icall.c (ves_icall_System_Environment_Exit): Update after
7738 mono_threads_set_shutting_down () signature change.
7740 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
7742 * class.c: Added can_access_instantiation to verify if the instantiation
7743 is visible. Fix access check for nested types as they returned TRUE
7744 before doing type and generic instantiation visibility checks.
7746 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
7748 * reflection.c (mono_reflection_create_generic_class): The created type
7749 must have a different container from its TypeBuilder. Otherwise they
7750 will end sharing generic arguments, which is wrong.
7752 Due to the sharing, making a generic instance of the created type using
7753 the TypeBuider generic arguments resulted in the generic type definition
7754 been returned, which is wrong as well.
7756 As a bonus the code was leaking the type_params array. This memory should
7757 be allocated from the image mempool.
7759 This fixes bug #354047.
7761 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
7763 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
7764 to here as they are now used in assembly.c new code.
7765 Added a skipverification flag to MonoAssembly.
7766 New internal function mono_assembly_has_skip_verification.
7768 * assembly.c: New function mono_assembly_has_skip_verification. It checks
7769 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
7772 2008-05-07 Zoltan Varga <vargaz@gmail.com>
7774 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
7775 needed. Fixes #387034.
7777 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
7779 2008-05-06 Miguel de Icaza <miguel@novell.com>
7781 * assembly.c (mono_assembly_load_reference): Prevent crash while
7782 disassembling Silverlight 2.0 executables while we still do not
7783 have GACed libraries.
7785 2008-05-07 Zoltan Varga <vargaz@gmail.com>
7787 * reflection.c: Special case generic type definitions as well. Fixes #383444.
7789 2008-05-06 Zoltan Varga <vargaz@gmail.com>
7791 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
7792 of the dynamic case. Fixes #387404.
7794 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
7796 *verify.c (mono_verifier_is_class_full_trust): If under
7797 verify_all and the verifier mode was not set, only
7798 gac and corlib types are fulltrust. This makes --verify-all
7799 usable to detect unverifiable code, which is the expected
7802 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
7804 * verify.h: Ops, commited the header with debug
7807 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
7809 * verify.c (merge_stack): Use the new value on unverifiable
7812 * verify.c (verify_type_compatibility_full): Comparison
7813 of nullable types can't use mono_class_is_assignable_from.
7815 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
7816 that makes all verification errors be reported.
7818 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
7821 2008-05-05 Robert Jordan <robertj@gmx.net>
7823 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
7824 support for value types. See #386415.
7826 * object.c: comments.
7828 Code is contributed under MIT/X11 license.
7830 2008-05-05 Martin Baulig <martin@ximian.com>
7832 * debug-mono-symfile.h
7833 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
7834 for old pre-terrania symbol files.
7836 2008-05-05 Andreas Färber <andreas.faerber@web.de>
7838 * mono-config.c: Add ppc64 architecture.
7840 Code is contributed under MIT/X11 license.
7842 2008-05-05 Andreas Färber <andreas.faerber@web.de>
7844 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
7845 PPC64 uses function descriptors as well.
7847 Code is contributed under MIT/X11 license.
7849 2008-05-04 Zoltan Varga <vargaz@gmail.com>
7851 * object.c (compute_class_bitmap): Ignore literal static fields.
7853 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
7854 var has an invalid format.
7855 (describe_ptr): Add some sanity checks for the vtable.
7856 (add_nursery_frag): Clear unused nursery fragments.
7857 (major_collection): Clear all remaining nursery fragments.
7859 2008-05-03 Robert Jordan <robertj@gmx.net>
7861 * image.c, metadata-internals.h: add thunk_invoke_cache.
7863 * marshal.c, marshal.h: implement
7864 mono_marshal_get_thunk_invoke_wrapper ().
7866 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
7868 Code is contributed under MIT/X11 license.
7870 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
7872 * verify.c (do_leave): Empty the stack.
7874 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
7876 * class.c (mono_class_is_assignable_from): Variance
7877 doesn't work between reference and value types. For example,
7878 given type C<T+>, C<int32> is not assignable to C<object>.
7879 Break the argument checking loop on first error.
7881 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
7883 * icall.c : base64_to_byte_array() needs some more strict
7884 check for sequence of '=' characters. Patch by Santa
7885 Marta (http://deee.g.hatena.ne.jp/santamarta).
7887 Contributed under MIT/X11 license.
7888 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
7890 2008-05-02 Jonathan Chambers <joncham@gmail.com>
7892 * domain.c: Disable LoadLibrary support to fix Win32 build.
7894 Code is contributed under MIT/X11 license.
7896 2008-05-02 Zoltan Varga <vargaz@gmail.com>
7898 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
7899 to help with cache behaviour.
7901 2008-05-01 Miguel de Icaza <miguel@novell.com>
7903 * appdomain.c (mono_domain_from_appdomain): Add new accessor
7906 2008-05-01 Zoltan Varga <vargaz@gmail.com>
7908 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
7910 2008-05-01 Dick Porter <dick@ximian.com>
7912 * process.c (process_get_fileversion): Only pass 16 bits of
7913 language ID to VerLanguageName. Fixes bug 381204.
7915 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
7917 * verify.c (mono_method_verify): Fix the comparison
7918 operator for code bounds check.
7920 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
7922 * verify.c (mono_method_verify): Check the bounds of
7923 all access of the code array.
7925 2008-04-29 Kornél Pál <kornelpal@gmail.com>
7927 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
7929 2008-04-28 Zoltan Varga <vargaz@gmail.com>
7931 * image.c (mono_image_strong_name_position): Fix return value when the rva is
7934 2008-04-28 Kornél Pál <kornelpal@gmail.com>
7936 * loader.c (mono_get_method_from_token, mono_method_signature): Add
7937 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
7938 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
7939 fixup main EXE images when using mono.exe for mixed-mode assembly support.
7940 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
7942 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
7943 runtime initialization from metadata.
7944 * assembly.c: Remove obsolete ceGetModuleFileNameA.
7945 (mono_set_rootdir): Use mono_get_module_file_name.
7946 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
7948 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
7949 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
7950 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
7951 MonoCLIImageInfo. Add support for module handles.
7952 (load_cli_header): Update mono_cli_rva_image_map signature.
7953 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
7954 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
7955 (mono_image_rva_map): Add support for module handles.
7956 (mono_image_ensure_section_idx): Add support for module handles.
7957 (mono_image_close): Add support for module handles.
7958 (do_load_header): Add support for module handles.
7959 (mono_image_open_from_module_handle): New function for internal use.
7960 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
7961 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
7962 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
7964 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
7965 * image.h: Add mono_image_fixup_vtable.
7966 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
7968 * coree.h: New file.
7969 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
7970 unsupported native code.
7971 (mono_marshal_set_callconv_from_modopt): New function splitted from
7972 mono_marshal_get_managed_wrapper.
7973 (mono_marshal_get_managed_wrapper): Use
7974 mono_marshal_set_callconv_from_modopt.
7975 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
7976 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
7977 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
7978 that results in a deadlock when the runtime is loaded in _CorDllMain.
7979 * Makefile.am: Add coree.c and coree.h.
7981 Contributed under MIT/X11 license.
7983 2008-04-28 Mark Probst <mark.probst@gmail.com>
7985 * generic-sharing.c: Search for type arguments in array element
7988 2008-04-28 Mark Probst <mark.probst@gmail.com>
7990 * class-internals.h, generic-sharing.c: New, small runtime generic context.
7992 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
7994 * object.c: Don't setup the RGCTX when the vtable is created,
7995 because we're setting it up lazily now.
7997 2008-04-26 Zoltan Varga <vargaz@gmail.com>
7999 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
8002 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8004 * verify.c (verify_class_for_overlapping_reference_fields):
8005 If class is under fulltrust allow reference types to overllap
8006 if they have the same RVA.
8008 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8010 * pedump.c: Added new flag valid-only, that makes the verifier
8011 behaves just like --security=validil. It won't fail type load
8012 due to unverifiable restrictions.
8014 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8016 * class-internals.h (struct MonoMethod): Added a verification_success
8017 field to cache verifier executions. Reduced MonoMethod:slot size by
8020 2008-04-23 Zoltan Varga <vargaz@gmail.com>
8022 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
8023 instead of a 'vt' argument to save an indirection and to allow these to be used
8025 (scan_vtype): New helper function to scan an area using a gc descriptor.
8026 (mono_gc_wbarrier_value_copy): Implement this.
8027 (handle_remset): Add support for REMSET_VTYPE.
8028 (find_in_remset_loc): Ditto.
8029 (mono_gc_base_init): Allow some debugging options to be controlled through the
8030 use of the MONO_GC_DEBUG env variable.
8031 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
8032 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
8034 2008-04-23 Martin Baulig <martin@ximian.com>
8036 * domain.c (mono_domain_create): Move the call to
8037 mono_debug_domain_create() down, after allocating the domain id.
8039 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8041 verify.c (verify_class_for_overlapping_reference_fields): Skip
8042 static fields while verifying for overlapping fields as they
8043 don't matter at all.
8045 2008-04-23 Marek Habersack <mhabersack@novell.com>
8047 * domain-internals.h: added a declaration of
8048 mono_make_shadow_copy.
8050 * assembly.c (mono_assembly_open_full): shadow copying of
8051 assemblies moved to here, so that all the assemblies within the
8052 application domain's private binary directories can be
8053 processed. Fixes bug #380546
8055 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
8056 mono_make_shadow_copy and made non-static. The decision whether
8057 to shadow-copy an assembly is made based on its location - it's
8058 copied if it's in one of the private application domain binary
8059 directories and its different to the target file in the shadow
8060 directory. Fixes bug #380546
8062 2008-04-22 Zoltan Varga <vargaz@gmail.com>
8064 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
8066 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
8069 * reflection.c (mono_image_create_token): Handle
8070 Method/ConstructorOnTypeBuilderInst.
8071 (resolve_object): Ditto.
8072 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
8073 so it can be called from resolve_object. Also handle the case when the inflated
8074 class already has its methods setup.
8076 2008-04-21 Martin Baulig <martin@ximian.com>
8078 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
8080 2008-04-20 Geoff Norton <gnorton@novell.com>
8082 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
8083 pointer dereference.
8085 2008-04-15 Marek Habersack <mhabersack@novell.com>
8087 * appdomain.c (try_load_from): if IOMAP is in effect, call the
8088 portability API to look up the assembly file. Fixes behavior in
8089 situations when the application has a bin/ directory, but the
8090 assembly search patch refers to Bin/ (and thus the requested file
8091 name is Bin/SomeLibrary.dll). Fixes bug #379888
8093 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
8095 verify.c (mono_type_is_generic_argument): Extracted this check
8096 from a dozen places to here.
8098 verify.c: Fixed all issues related to boxing generic arguments
8099 and their constraints.
8101 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
8103 verify.c (mono_class_interface_implements_interface): Fix win32 build.
8105 2008-04-14 Zoltan Varga <vargaz@gmail.com>
8107 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
8108 isn't finished yet. Fixes #363447.
8110 2008-04-13 Zoltan Varga <vargaz@gmail.com>
8112 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
8115 2008-04-13 Jb Evain <jbevain@novell.com>
8117 * domain.c: update the 2.1 profile versions.
8118 Merged from the Moonlight 2 branch.
8120 2008-04-12 Zoltan Varga <vargaz@gmail.com>
8122 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
8123 mscorlibs for the non-refonly case as well.
8125 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
8126 in mono_assembly_load_from_full (). Fixes #378924.
8128 2008-04-11 Geoff Norton <gnorton@novell.com>
8130 * icall.c: The global extern environ doesn't exist on Mac. We
8131 need to call NSGetEnviron instead.
8133 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8135 verify.c: Add generic method constraint verification.
8137 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8139 class.c (mono_class_inflate_generic_method_full): Add a long
8140 explanation to the is_mb_open hack. Remove the FIXME.
8142 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8144 * verify.c (mono_method_verify): Mark all unknown opcodes
8145 as invalid. Mark jmp as unverifiable.
8147 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8149 * verify.c: Add code to do type constraint verification on class instances.
8151 * verify.c (mono_verifier_verify_class): Use the type constraint
8154 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8156 * class.c (mono_class_get_field_default_value): Don't pass cindex
8157 as hint to mono_metadata_get_constant_index. The local is not initialized
8158 and should contain garbage most of the time. This could only work
8161 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
8163 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
8165 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
8167 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
8169 * class.c (mono_class_from_generic_parameter): Save the token of the
8170 generic param in MonoClass::sizes.generic_param_token.
8172 * reflection.c (mono_custom_attrs_from_class): If the class type is
8173 VAR or MVAR retrieve the attributes of the generic param.
8175 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
8177 * class.c (mono_class_init): Do class verification if the verifier
8180 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
8182 * verify-internal.h: Added mono_verifier_verify_class.
8184 * verify.c: Added mono_verifier_verify_class. It checks for
8185 classes with explicit layout that have overlapping reference fields.
8187 * pedump.c: Init the verifier state prior to verification. Fixed
8188 command line arguments.
8190 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
8192 * Makefile.am: Added verify-internals.h, hopefully fix the build.
8194 2008-04-08 Zoltan Varga <vargaz@gmail.com>
8196 * verify-internals.h: Fix a warning.
8198 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
8200 * verify-internals.h: New header with the verifier configuration
8201 extracted from mini.c.
8203 * verify.c: Implemented the new functions exported by verify-internals.h.
8205 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
8207 * verify.c: Add proper verification of ckfinite.
8209 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
8211 * verify.c (do_conversion): Improved error message to something
8214 * verify.c (check_is_valid_type_for_field_ops): Fix to work
8215 with primitive types.
8217 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
8219 * verify.c: Added tail prefix checking. Marked icall
8222 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
8224 * verify.c: Fix the detection of branches to the middle
8227 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
8229 * verify.c: Implemented verification of volatile. and
8230 unaligned. prefix. Check if a type is valid after retrieving it.
8232 2008-04-01 Dick Porter <dick@ximian.com>
8234 * process.c (process_get_fileversion): If there's no string block,
8235 set the file language to en_US. Fixes the other new part of bug
8238 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
8240 * class.c: New functions mono_method_can_access_field_full and
8241 mono_method_can_access_method_full. They perform type visibility
8242 and type site check.
8244 * class-internal.h: Added exported functions.
8246 * verify.c: Use new functions to implement proper visibility checks.
8248 2008-03-29 Zoltan Varga <vargaz@gmail.com>
8250 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
8252 2008-03-28 Dick Porter <dick@ximian.com>
8254 * process.c (process_get_fileversion): Use the first language ID
8255 we see, rather than insisting on an invariant language. Fixes bug
8258 2008-03-28 Zoltan Varga <vargaz@gmail.com>
8260 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
8261 the streams to fix reading of invalid memory later.
8263 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
8266 2008-03-26 Zoltan Varga <vargaz@gmail.com>
8268 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
8269 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
8271 2008-03-26 Massimiliano Mantione <massi@ximian.com>
8272 * threads.h: Added MonoThreadManageCallback type and
8273 mono_thread_set_manage_callback prototype
8274 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
8275 (used to store the mono_thread_manage callback).
8276 * threads.c: Added mono_thread_set_manage_callback, and handle
8277 "MonoThread->manage_callback" in build_wait_tids.
8279 2008-03-26 Dick Porter <dick@ximian.com>
8281 * process.c (process_get_fileversion): Set FileVersionInfo strings
8282 to Empty when the resource doesn't have the particular info.
8285 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
8287 * verify.c (mono_method_verify): Proper prefix validation.
8289 2008-03-25 Zoltan Varga <vargaz@gmail.com>
8291 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
8292 itself in a separate argument instead of throwing them. Fixes #373448.
8294 * appdomain.c: Bump corlib version.
8296 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
8298 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
8300 2008-03-20 Kornél Pál <kornelpal@gmail.com>
8302 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
8305 2008-03-20 Mark Probst <mark.probst@gmail.com>
8307 * generic-sharing.c, class-internals.h: Code for putting
8308 reflection types into the runtime generic context.
8310 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
8312 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
8316 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
8318 * verify.c (VerifyContext): Added instruction prefix data to the struct.
8320 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
8322 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
8324 * verify.c (do_cast): Let the result value keep the boxed status.
8326 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
8328 2008-03-17 Jb Evain <jbevain@novell.com>
8330 * reflection.c: when running on a 2.0 runtime, emit
8331 unconditionally the #~ header version as 2.0, and the
8332 CLI header version as 2.5, for symmetry's sake with csc.
8334 2008-03-16 Zoltan Varga <vargaz@gmail.com>
8336 * class.c: Remove the unused cache_interface_offsets stuff.
8338 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
8339 profiler.c: Fix warnings.
8341 2008-03-16 Mark Probst <mark.probst@gmail.com>
8343 * generic-sharing.c, class-internals.h: Support for putting
8344 methods into the runtime generic context.
8346 2008-03-16 Zoltan Varga <vargaz@gmail.com>
8348 * class.c (mono_class_setup_fields): Ignore calls made to this function for
8349 classes which are generic instances of not-yet finished typebuilders. Fixes
8352 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
8354 2008-03-15 Zoltan Varga <vargaz@gmail.com>
8356 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
8358 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
8359 field, replace it with a hash table in MonoDynamicImage.
8361 * reflection.c (inflate_mono_method): Access the generic definition object from
8362 image->generic_def_objects instead of imethod->reflection_info.
8364 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
8366 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
8368 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
8369 function in reflection.c so it is easier to keep in sync with the dynamic image
8372 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
8373 mono_image_close ().
8375 2008-03-15 Mark Probst <mark.probst@gmail.com>
8377 * class.c (mono_class_generic_sharing_enabled): Disable generic
8378 sharing for all architectures except AMD64 and x86 to fix build.
8380 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
8382 * verify.c: Use the generic definition MonoGenericContext when available.
8383 Remove code for checking generics instance compatibility in favor of
8384 mono_class_is_assignable_from.
8386 2008-03-14 Mark Probst <mark.probst@gmail.com>
8388 * marshal.c, marshal.h, metadata-internals.h, image.c,
8389 wrapper-types.h: New wrapper for invoking a shared static method
8390 without having to pass the runtime generic context argument.
8392 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
8394 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
8396 2008-03-14 Zoltan Varga <vargaz@gmail.com>
8398 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
8400 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
8401 create a token from a FieldOnTypeBuilderInst.
8402 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
8403 (resolve_object): Ditto.
8405 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
8406 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
8408 2008-03-14 Martin Baulig <martin@ximian.com>
8410 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
8412 * debug-mono-symfile.h
8413 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
8414 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
8416 2008-03-10 Martin Baulig <martin@ximian.com>
8418 * debug-mono-symfile.h
8419 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
8420 `lexical_block_table_offset'.
8421 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
8423 (MonoSymbolFile): Added `version'.
8426 (MonoDebugLexicalBlockEntry): Removed.
8427 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
8430 * mono-debug.c (mono_debug_add_method): Don't compute lexical
8431 blocks here; the debugger now does this internally.
8433 2008-02-27 Martin Baulig <martin@ximian.com>
8435 * object.c (mono_runtime_exec_main): Call
8436 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
8437 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
8439 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
8441 * verify.c (verify_type_compatibility_full): Allow native int to be converted
8442 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
8444 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
8446 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
8447 ldftn with a virtual method.
8449 2008-03-13 Geoff Norton <gnorton@novell.com>
8451 * decimal.c: Only include memory.h if the platform has it.
8453 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
8455 * assembly.c, class.c, metadata-internals.h: make sure public key
8456 tokesns are compared in a case-insensitive way. Also, all
8457 the lookups in the GAC use a lowercase public key token
8458 (gaacutil already does the lowercasing on install). Fixes
8461 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
8463 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
8466 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
8468 * image.c: when someone loads a mscorlib from a file, return the
8469 currently loaded mscorlib (fixes bug #369253).
8471 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
8473 * class.c: handle types with no parents by forcing them to have
8474 System.Object as a parent and marking them as broken (this currently
8475 allows the first part of bug #369173 to work as well, likely because
8476 we don't check for typeload exceptions everywhere yet).
8478 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
8480 * class.c: more complete check that types belong to corlib
8481 (fixes second part of bug #369173).
8483 2007-03-10 Bill Holmes <billholmes54@gmail.com>
8485 * generic-sharing.c: Including glib.h for the MSVC builds to define
8486 "inline" to "__inline" before including mono-membar.h.
8488 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
8489 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
8492 Contributed under MIT/X11 license.
8494 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
8496 * verify.c (do_invoke_method): Remove return type validation.
8498 * verify.c (do_ret): Do return type validation at return site instead of
8501 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
8503 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
8505 * verify.c: Some todos cleaned and improved a few error messages.
8507 2008-03-08 Zoltan Varga <vargaz@gmail.com>
8509 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
8511 2008-03-07 Zoltan Varga <vargaz@gmail.com>
8513 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
8514 system types correctly.
8516 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
8519 2008-03-06 Zoltan Varga <vargaz@gmail.com>
8521 * assembly.c (build_assembly_name): Fix a warning.
8523 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8525 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
8526 the called function takes an object type argument. Fixes storing or
8527 valuetypes across remoting as well as reducing memory usage.
8528 * image.c, metadata-internals.h: remove now unused ldfld_remote and
8529 stfld_remote wrapper caches.
8531 2008-03-06 Zoltan Varga <vargaz@gmail.com>
8533 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
8536 * reflection.c (mono_image_register_token): New helper function to save
8537 a token->object mapping.
8539 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
8542 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
8543 one dimension arrays. Fixes #367670.
8544 (mono_reflection_get_type_internal): Ditto.
8546 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
8548 * marshal.c: mono_load_remote_field_new() always returns object.
8549 so use the proper signature (fixes bug #366445).
8551 2008-03-04 Zoltan Varga <vargaz@gmail.com>
8553 * class-internals.h (MonoMethod): Remove unused uses_this flag,
8554 add an 'inline_failure' flag instead.
8556 2008-03-04 Mark Probst <mark.probst@gmail.com>
8558 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
8559 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
8560 contains the location of "this", used for exception handling.
8562 2008-03-04 Zoltan Varga <vargaz@gmail.com>
8564 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
8565 their size on all platforms for perf reasons.
8567 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8569 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
8572 * object-internal.h: Same.
8574 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8576 * reflection.h: Fix the build I just broke.
8578 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8580 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
8581 Test if a token is valid, this remove explicit usage of
8582 MonoDynamicImage::tokens from the verifier code.
8584 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
8586 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
8587 instead of direct access to MonoDynamicImage::tokens.
8589 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8591 * verify.c (token_bounds_check): Fix the build I just broke.
8593 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8595 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
8597 * verify.c (verifier_load_method): Fixed the errors message.
8599 * verify.c (mono_method_verify): Fixed a debug message.
8601 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
8603 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
8604 mono-perfcounters.h, class-internals.h: support for predefined
8605 writable counters, query of categories and counters, bugfixes.
8607 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
8609 * verify.c (do_refanytype): Verify the refanytype opcode.
8611 * verify.c (mono_method_verify): Use do_refanytype.
8613 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
8615 * verify.c (do_mkrefany): Verify the mkrefany opcode.
8617 * verify.c (mono_method_verify): Use do_mkrefany.
8619 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
8621 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
8622 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
8625 2008-02-27 Zoltan Varga <vargaz@gmail.com>
8627 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
8628 the type load exception.
8630 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
8632 * verify.c: Added a few FIXME for method signatures
8634 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
8635 of mono_method_get_signature and get vararg call working. Removed unused
8636 checks for return value.
8638 * verify.c (do_refanyval): Verify the refanyval opcode.
8640 * verify.c (mono_method_verify): Implemented verification of arglist and
8643 2008-02-27 Zoltan Varga <vargaz@gmail.com>
8645 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
8646 vtypes to marshal.c.
8648 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
8649 it works for AOT as well.
8651 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
8653 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
8654 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
8655 the system time is adjusted.
8657 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
8659 * icall.c, icall-def.h: use the new time functions (fixes the
8660 non-monotonic behaviour of TickCount).
8662 2008-02-26 Zoltan Varga <vargaz@gmail.com>
8664 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
8665 it breaks the build.
8667 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
8668 cattr is not finished yet.
8670 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
8672 * verify.c: Proper token validation for field, method and type.
8674 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
8676 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
8678 * loader.c (method_from_memberref): Generate type load error instead of method missing
8679 if the type is not found.
8681 2008-02-23 Zoltan Varga <vargaz@gmail.com>
8683 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
8684 some of the conversions caused the generation of a marshal directive exception.
8686 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
8688 verify.c: Report which exception should be thrown by the JIT.
8689 Added a lot of FIXME notes.
8691 2008-02-22 Mark Probst <mark.probst@gmail.com>
8693 * generic-sharing.c: Runtime generic context slots are not
8694 instantiated on init anymore. Instead, provide function to do the
8695 instantiating on demand.
8697 * class-internals.h: Added vtable to runtime generic context.
8698 Macros for encoding direct and indirect slot offsets in one
8701 2008-02-21 Mark Probst <mark.probst@gmail.com>
8703 * object.c, generic-sharing.c: Moved some generic sharing code
8704 from object.c to generic-sharing.c.
8706 * generic-sharing.c: Added support for extensible runtime generic
8709 * metadata-internals.h: Two new hash tables in MonoImage for
8710 extensible runtime generic context support.
8712 * domain.c: Unregister generic vtables upon domain unloading.
8714 * image.c: Destroy new hash tables upon image unloading.
8716 * metadata.c: Unregister generic subclasses upon image unloading.
8718 * class-internals.h: New data structure for runtime generic
8719 context template. New fields in the runtime generic context for
8722 * Makefile.am: Added generic-sharing.c.
8724 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
8726 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
8727 there is a pending loader exception, raise it.
8729 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
8732 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
8737 2008-02-20 Zoltan Varga <vargaz@gmail.com>
8739 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
8741 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
8743 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
8744 ref-only requests for compatibility with MS.
8746 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
8748 * reflection.c (mono_custom_attrs_from_method): Don't silently
8749 return an empty list for generic method instances.
8750 (mono_custom_attrs_from_param): Likewise.
8752 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
8753 Raja R Harinath <harinath@hurrynot.org>
8756 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
8757 * class.c (mono_class_inflate_generic_method_full): Initialize it
8758 when a fully-open method is instantiated.
8759 * metadata.c (inflated_method_equal, inflated_method_hash): Update
8761 * reflection.c (inflate_mono_method): Don't create a temporary context.
8763 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
8765 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
8766 Compute correct value, to prepare for imethod->reflection_info going away.
8768 2008-02-19 Zoltan Varga <vargaz@gmail.com>
8770 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
8772 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
8774 * verify.c: Implement skip visibility flag.
8776 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
8778 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
8779 which contains an extra field to tell the kind of exception that should be thrown.
8781 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
8783 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
8785 * loader.c (mono_method_get_param_names): Initialize 'klass' after
8786 'method' is updated.
8788 2008-02-11 Zoltan Varga <vargaz@gmail.com>
8790 * class.c (mono_class_layout_fields): Set class->min_align for classes using
8791 explicit layout as well. Fixes #360375.
8793 2008-02-11 Geoff Norton <gnorton@novell.com>
8795 * loader.c: Guard and dereference against inflated generic methods
8797 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
8799 * class.c: Include Retargetable spec in assembly name.
8800 * assembly.c: Always include PublicKeyToken spec in assembly name
8801 (with value "null" if assembly is not signed), and include
8803 * icall-def.h: Added icall for Assembly.get_fullname.
8804 * icall.c: Added icall returning the fullname of an assembly.
8806 2008-02-09 Zoltan Varga <vargaz@gmail.com>
8808 * class.c (mono_class_setup_vtable_general): Add a missing call to
8809 mono_class_setup_methods () which is needed in the AOT case.
8811 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
8813 * verify.c (mono_type_get_stack_name): Added. Return the name for the
8814 stack type of the given MonoType.
8816 * verify.c (verify_type_compatibility_full): Handle the void type.
8818 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
8819 way stack merging works.
8821 * verify.c (store_local): Improved verification message.
8823 * verify.c (do_branch_op): If the merging is invalid, the method
8824 is unverifiable and not invalid. Improved error message.
8826 * verify.c (merge_stacks): Properly merge a boxed valuetype and
8827 a reference type diferent than System.Object. Improved error
8830 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
8832 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
8834 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
8835 type of an enum even if the argument is byref.
8837 * verify.c: Replace all explicit uses of enumtype and enum_basetype
8838 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
8840 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
8842 *verify.c (verify_type_compatibility_full): Make enum types
8843 compatible with their base types.
8845 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
8846 types are compatible for the special case of a boxed valuetype and
8849 * verify.c (verify_stack_type_compatibility): The function
8850 is_compatible_boxed_valuetype was extracted from here.
8852 * verify.c (push_arg): Only set ctx->has_this_store if the method
8855 * verify.c (do_ldelem): Fixed a typo in an error message and added
8856 strict check for mixing int32 and native int as the array type
8859 * verify.c (merge_stacks): Consider boxed valuetypes in the
8860 compatibility checks.
8862 2008-02-07 Massimiliano Mantione <massi@ximian.com>
8863 * profiler.h: (MonoGCEvent): Added start-stop the world events.
8865 2008-02-06 Massimiliano Mantione <massi@ximian.com>
8866 *class.c: use_new_interface_vtable_code: renamed the env var to have
8867 a "MONO_" prefix, and fix the logic to enable it by default.
8869 2008-02-06 Massimiliano Mantione <massi@ximian.com>
8871 mono_class_setup_vtable_general: rewrote the way in which interface
8872 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
8873 makes the code more maintainable.
8874 For now the old code is still there, and can be activated setting
8875 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
8877 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
8879 * verify.c: guarded some debug functions around and #ifdef.
8881 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
8883 2008-02-06 Zoltan Varga <vargaz@gmail.com>
8885 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
8886 changes for now since they seem to break too many things.
8888 2008-02-05 Mark Probst <mark.probst@gmail.com>
8890 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
8891 mono_marshal_find_nonzero_bit_offset): Added macro and function
8892 for finding the byte- and bit-offset of a bitfield within a
8895 2008-02-05 Zoltan Varga <vargaz@gmail.com>
8897 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
8898 (mono_marshal_get_struct_to_ptr): Ditto.
8900 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
8903 2008-02-03 Zoltan Varga <vargaz@gmail.com>
8905 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
8906 between methods for non-corlib types.
8908 2008-02-02 Geoff Norton <gnorton@novell.com>
8910 * loader.c (mono_method_get_param_names): Populate the parameter name for
8911 generic parameters as well. (Fixes #342536)
8913 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
8915 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
8917 * verify.c (do_invoke_method): Fix for calling with byref structs.
8919 * verify.c (do_cast): push a boxed value type based on the type token and not
8922 2008-01-31 William Holmes <billholmes54@gmail.com>
8924 * process.c (process_module_string_read): Check the size returned form
8925 VerQueryValue to avoid out of memory exception.
8927 2008-01-30 Zoltan Varga <vargaz@gmail.com>
8929 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8930 Handle properly modules which are not in the moduleref table. Fixes
8933 2008-01-29 Zoltan Varga <vargaz@gmail.com>
8935 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
8936 the dynamic case which is now in managed code.
8937 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
8939 * marshal.c (mono_string_to_bstr): Fix a warning.
8940 (init_com_provider_ms): Ditto.
8942 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
8944 * exception.c (mono_get_exception_out_of_memory): New helper function.
8946 2008-01-28 Jonathan Chambers <joncham@gmail.com>
8948 * marshal.c: Add support for BSTR marshalling
8949 using other COM systems.
8951 Code is contributed under MIT/X11 license.
8953 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
8955 * object.c (mono_runtime_invoke_array): reverted previous
8956 commit as it breaks the build.
8958 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
8960 * object.c (mono_runtime_invoke_array): Verify arguments for
8961 invalid types. Fixes #348522.
8963 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
8965 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
8966 non-final virtual calls using call.
8968 * verify.c (do_invoke): fixed some TODOs.
8970 * verify.c (push_arg): set has_this_store for "ldarga 0".
8972 2008-01-27 Zoltan Varga <vargaz@gmail.com>
8974 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
8975 which belong to an inflated class. Fixes #356531.
8977 2008-01-26 Robert Jordan <robertj@gmx.net>
8979 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
8980 which resort to FindFirstFile when a certain error condition
8981 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
8982 Code is contributed under MIT/X11 license.
8984 2008-01-24 Jonathan Chambers <joncham@gmail.com>
8986 * marshal.c (emit_marshal_string): Fix out string marshalling
8987 to use specified encoding. Fixes #323900.
8989 Code is contributed under MIT/X11 license.
8991 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
8993 * class.c (mono_class_inflate_generic_method_full): Don't modify
8994 iresult->context after cache check.
8996 2008-01-23 Zoltan Varga <vargaz@gmail.com>
8998 * class.c (mono_class_inflate_generic_method_full): Change the
8999 struct assignments to memcpy for better visibility and add some comments.
9001 2008-01-23 Dick Porter <dick@ximian.com>
9003 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
9004 procedure, and make it work on windows.
9006 2008-01-22 Zoltan Varga <vargaz@gmail.com>
9008 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
9009 a MonoReflectionTypeBuilder since it is always of that type.
9011 * reflection.c (mono_type_get_object): Remove an unneccesary check.
9013 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
9015 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
9017 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
9019 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
9021 * reflection.c (mono_reflection_create_runtime_class): Remove already created
9022 instantiations from the type cache.
9024 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9026 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
9028 * verify.c (do_unbox_value): push a controled mutability managed pointer.
9030 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9032 * verify.c (do_ldstr): added, verifies if the #US token is valid.
9034 * verify.c (mono_method_verify): removed old TODO
9036 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9038 * verify.c (do_newobj): add visibility check.
9040 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9042 * verify.c (do_load_function_ptr): add visibility check.
9044 2008-01-21 Massimiliano Mantione <massi@ximian.com>
9046 mono_generic_class_get_class: hook profiler events.
9047 mono_field_get_offset: added to support heap-shot in the new profiler.
9048 *class.h: exported mono_field_get_offset.
9050 mono_reflection_setup_internal_class: hook profiler events.
9052 2008-01-20 Zoltan Varga <vargaz@gmail.com>
9054 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
9055 argument here too and use it to avoid checking for pending exceptions if
9058 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
9060 * assembly.c (build_assembly_name): add arg for passing the assembly
9061 flags. Do not consider a PublicKey with value "null" valid.
9062 (mono_assembly_name_parse_full): added boolean argument that will be
9063 set if the assembly name contains a PublicKeyToken spec. Added support
9064 for the Retargetable spec for which only Yes or No are allowed as valid
9065 value. Consider assembly name invalid if Retargetable spec is set, but
9066 either version, culture or public key (token) are not specified.
9067 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
9068 with implementation in assembly.c.
9069 * icall.c (fill_reflection_assembly_name): also copy assembly flags
9070 from MonoAssemblyName.
9071 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
9072 introduced argument for mono_assembly_name_parse_full to know if the
9073 assembly name has a PublicKeyToken spec, and if it has instruct
9074 fill_reflection_assembly_name to use default value for keyToken (if
9075 PublicKeyToken is null).
9077 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9079 * verify.c (mono_method_verify): fixed ovf ops with
9080 float values. They are unverifiable now.
9082 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9084 * class.c (set_failure_from_loader_error): add BadImageException to the
9085 list of exceptions that can cause a type to fail to load.
9087 * class.c (mono_class_get_exception_for_failure): same.
9089 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
9091 * verify.c (in_any_exception_block): added, check if offset
9092 is part of any exception handling clause.
9094 * verify.c (get_stack_type): added VAR and MVAR types.
9096 * verify.c (do_stobj): better error messages.
9098 * verify.c (do_cpobj): added, check cpobj.
9100 * verify.c (do_initobj): added, check initobj.
9102 * verify.c (do_sizeof): added, check sizeof.
9104 * verify.c (do_localloc): added, check localloc.
9106 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
9108 2008-01-17 Zoltan Varga <vargaz@gmail.com>
9110 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
9111 save_lmf/restore_lmf opcodes.
9113 * threads.c (mono_threads_install_notify_pending_exc): New function to
9114 install a callback notifying the JIT there is a pending exception on a thread.
9115 (mono_thread_request_interruption): Call the new callback.
9116 (mono_thread_get_and_clear_pending_exception): New function to return the
9117 exception pending on a thread.
9119 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
9120 to turn off checking for pending exceptions.
9121 (mono_marshal_get_native_wrapper): Ditto.
9123 2008-01-16 Zoltan Varga <vargaz@gmail.com>
9125 * threads-types.h: Get rid of the unnecessary extern declarations.
9127 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
9129 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
9130 return field from parent class if not private.
9131 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
9132 returns fields from parent class if they are not private.
9133 (method_nonpublic): added function to determine if a given method
9134 should be considered non-public. Returns false for private methods
9135 on parent class, and internal methods from parent on the 1.0 profile.
9136 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
9137 use method_nonpublic function to determine whether method should be
9139 (property_accessor_public): use newly introduced method_nonpublic
9140 function to determine whether accessor is non-public.
9141 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
9142 event from parent class if not private. Only return static event if
9143 Static flag is set, and only return static event from parent class if
9144 FlattenHierarchy flag is set.
9145 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
9146 include non-private events from parent class.
9148 2008-01-16 Zoltan Varga <vargaz@gmail.com>
9150 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
9153 2008-01-16 Wade Berrier <wberrier@novell.com>
9155 * security.c: Add assembly.h header to appease some warnings
9157 2008-01-16 Dick Porter <dick@ximian.com>
9159 * process.c (process_module_string_read): Remove trailing null
9162 2008-01-16 Mark Probst <mark.probst@gmail.com>
9164 * class-internals.h: A new data structure describing the layout of
9165 a runtime generic context (MonoRuntimeGenericContextTemplate).
9167 * metadata-internals.h: Added a hash table to MonoDomain that maps
9168 from open generic classes to their runtime generic context
9171 * object.c: Building of the runtime generic context, including
9172 proper handling of generic type arguments of superclasses.
9173 Building of the runtime generic context according to the template.
9175 2008-01-15 Zoltan Varga <vargaz@gmail.com>
9177 * class.c (mono_class_setup_fields): Set field.count for generic instances.
9180 * image.c (do_mono_image_open): Pass TRUE as last_exists to
9181 mono_portability_find_file (). Fixes #325466.
9182 (mono_image_get_public_key): Fix a warning.
9184 2008-01-14 Zoltan Varga <vargaz@gmail.com>
9186 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
9188 (mono_class_from_name_case): Ditto.
9190 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
9192 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
9193 common storage for the tables used in the System/NumberFormatter class.
9195 2008-01-13 Zoltan Varga <vargaz@gmail.com>
9197 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
9199 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
9201 * verify.c (get_boxable_mono_type): check if the token is valid.
9203 * verify.c (set_stack_value): changed to add an error if an
9204 invalid type is set on stack. Changed all callers due to signature change.
9206 * verify.c (do_stobj): implement stobj validation.
9208 2008-01-11 Zoltan Varga <vargaz@gmail.com>
9210 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
9211 set container->is_method, it was set earlier.
9213 * metadata.c (type_in_image): Handle MVARs which belong to not finished
9216 * reflection.c (mono_reflection_initialize_generic_parameter): Set
9217 is_method of the generic container to TRUE for methods.
9219 2008-01-10 Zoltan Varga <vargaz@gmail.com>
9221 * metadata.c (type_in_image): Handle type parameters properly.
9223 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
9224 memory ownership of this structure.
9226 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
9228 * verify.c (get_boxable_mono_type): make typedref types been just
9229 unverifiable. check for void type.
9231 * verify.c (do_unbox_any): added, verify opcode unbox.any.
9233 * verify.c (do_load_function_ptr): accept method spec tokens.
9235 2008-01-10 Zoltan Varga <vargaz@gmail.com>
9237 * marshal.c (mono_class_native_size): Always set *align even if this is called
9240 2008-01-09 Zoltan Varga <vargaz@gmail.com>
9242 * verify.c (mono_verify_corlib): Remove this as it was not used and was
9245 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
9247 * verify.c: removed some old unused tables. A huge bunch of small fixes
9248 to things found while testing the verifier with mono basic.
9250 * verify.c (dump_stack_value): dump null literal flag to.
9252 * verify.c (verify_type_compatibility_full): fix comparison
9253 for types that have a generic super type.
9255 * verify.c (verify_stack_type_compatibility): fix compatibility
9256 between null literals and reference types. fix compatibility between
9257 boxed valuetypes and object. fix corner case test for enums.
9259 * verify.c (do_cmp_op): proper verification of cgt.un in case
9262 * verify.c (do_invoke_method): fix error message.
9264 * verify.c (do_store_indirect
9266 * verify.c (check_is_valid_type_for_field_ops): proper verification
9267 of managed pointers to valuetypes and boxed valuetypes. proper verification
9270 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
9271 allow token to be a reference type.
9273 * verify.c (do_cast): proper handling of boxes valuetypes.
9275 * verify.c (do_stelem): proper handling of storing a boxed valuetype
9278 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
9279 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
9280 fixed the decoding of unbox_any
9282 2008-01-08 Zoltan Varga <vargaz@gmail.com>
9284 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
9286 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
9288 * verify.c (do_newobj): do delegate verification.
9290 * verify.c (verify_delegate_compatibility): perform delegate
9293 * verify.c (verify_ldftn_delegate): perform tests related to
9296 * verify.c (mono_delegate_signature_equal): perform the
9297 slightly diferent signature comparison required by delegates.
9299 * metadata.c (mono_metadata_type_equal_full): added and exported
9300 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
9301 allows signature only comparison.
9303 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
9306 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
9308 * verify.c: added a bunch of stack_slot_* functions to
9309 make access to stack slot type easier. This is required to
9310 allow optional flags, like null literal, boxed value and
9312 All access paths to IlStackDesc::stype have been changed
9313 to use these new funcions.
9314 Removed a bunch of unused functions and cleared all warnings.
9315 This patch introduces the usage of the this pointer and
9318 2008-01-07 Zoltan Varga <vargaz@gmail.com>
9320 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
9322 2008-01-06 Zoltan Varga <vargaz@gmail.com>
9324 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
9325 match managed version.
9327 * appdomain.c: Bump corlib version.
9329 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
9332 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
9334 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
9335 Set public key token to zero-length byte array if assembly is not
9338 2008-01-05 Zoltan Varga <vargaz@gmail.com>
9340 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
9341 writing a vtype array elem.
9343 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
9345 * assembly.c (build_assembly_name): return FALSE if length of token is
9346 not 16 (if not "null").
9347 (mono_assembly_name_parse_full): return FALSE if value of version,
9348 culture, token or key is 0.
9349 * icall.c (fill_reflection_assembly_name): add boolean arguments to
9350 specify whether public key and public key token must be set to default
9351 value (zero-length byte array) if not available. Set versioncompat to
9352 SameMachine. If public key is available or the default is set, then
9354 (ves_icall_System_Reflection_Assembly_FillName): if no public key
9355 is available, use empty byte array as default value. On the 2.0
9356 profile, use default value for public key token if not set.
9357 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
9358 profile, use default value for public key if not set. On the 2.0
9359 profile, use default value for public key token if not set.
9360 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
9361 default values for public key and public key token.
9363 2008-01-05 Zoltan Varga <vargaz@gmail.com>
9365 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
9366 field to keep it in synch with the managed object.
9368 * marshal.c (emit_marshal_object): Add support for byref marshalling of
9369 delegates. Fixes #351520.
9371 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
9372 contains defined memory.
9374 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
9376 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
9378 * sgen-gc.c (check_consistency): New helper function to do a consistency check
9379 of the GC data structures.
9381 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
9383 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
9385 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
9387 (mono_array_clone_in_domain): Ditto.
9388 (mono_array_clone_in_domain): Ditto.
9390 * threads.c (start_wrapper): Register the thread start argument as a GC root.
9391 (cache_culture): Use a write barrier.
9393 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
9394 (ves_icall_get_property_info): Ditto.
9396 * object.h (MONO_STRUCT_SETREF): New macro.
9398 * class-internals.h (MonoStats): Add some GC statistics.
9400 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
9402 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
9404 * exception.c (mono_exception_from_name_two_strings):
9405 Break from loop after method is found.
9407 2008-01-04 Dick Porter <dick@ximian.com>
9409 * process.c (process_module_string_read): Rename variable to
9410 reflect correct usage, after fixing bug 345972.
9412 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
9414 * verify.c (mono_type_create_fnptr_from_mono_method):
9415 created a MonoType function pointer instance to be used during
9416 verification. The verifier releases this memory at end.
9418 * verify.c (mono_method_is_constructor): extracted repeated
9419 checks for constructor into a single class.
9421 * verify.c (do_push_field): use new extracted method
9422 for constructor check.
9424 * verify.c (do_newobj): same.
9426 * verify.c (do_ldftn): renamed to do_load_function_ptr
9427 and make it verify ldvirtftn too.
9429 * verify.c (mono_method_verify: proper verification
9430 of ldvirtftn. release created MonoMethod instances.
9432 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
9434 * verify.c (token_bounds_check): added.
9436 * verify.c (do_ldftn): added.
9438 * verify.c (mono_method_verify): proper verificartion of ldftn.
9440 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
9442 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
9443 than the table row count. It's the resposibility of the caller to
9444 make the bounds check and raise the correct error.
9446 * metadata.c (mono_metadata_decode_row_col): Same.
9448 * loader.c (mono_get_method_from_token): perform bounds check
9449 on token for methoddef table.
9451 2007-12-29 Miguel de Icaza <miguel@novell.com>
9454 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
9455 assert into a negative result, the managed code already coped with
9458 Some folks on Windows reported this error.
9460 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
9462 * appdomain.c: Bump corlib version.
9464 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
9465 CultureInfo.CreateCulture to create CultureInfo for name.
9466 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
9467 create CultureInfo for name. Fixes bug #347174.
9469 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
9471 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
9474 * verify.c (is_valid_branch_instruction): allow branching to the
9475 first instruction of the protected block.
9477 * verify.c (is_valid_cmp_branch_instruction): same.
9479 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
9480 avoid double initialization.
9482 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
9483 detect which cases the eval stack should just be copied.
9485 * verify.c (mono_method_verify): check if the eval stack
9486 is empty when entering a protected block.
9488 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
9490 * verify.c: added is_clause_in_range, is_clause_inside_range,
9491 is_clause_nested and verify_clause_relationship. They perform
9492 the verifications stated in P1 12.4.2.7.
9494 * verify.c (mono_method_verify): remove some unused variables,
9495 add the new exception clause checks, add instruction border
9496 checks for protected block start/end, improved some error
9497 messages and fixed a bug in the way invalid instruction access
9500 2007-12-26 Zoltan Varga <vargaz@gmail.com>
9502 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
9503 from GC 7.0 if available.
9505 * object.c: Remove an unused define.
9507 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
9509 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
9511 * null-gc.c (mono_gc_make_descr_for_array): Implement.
9513 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
9515 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
9516 to take the same arguments as the other make_descr functions.
9518 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
9520 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
9523 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
9526 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
9529 * boehm-gc.c (mono_gc_register_root): Fix a warning.
9531 * null-gc.c (mono_gc_register_root): Fix a warning.
9533 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
9535 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
9536 (mono_gc_base_init): Call GC_init ().
9538 * null-gc.c: Define mono_gc_register_root () as a no-op.
9540 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
9542 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
9544 * verify.c: add prototype for merge_stacks at top
9546 * verify.c (do_switch): added.
9548 * verify.c (merge_stacks): on some cases the stack merging
9549 was not happening properly. Unequal stack sizes at merge
9550 points should be invalid.
9552 * verify.c (mono_method_verify): added more debug info on stack state.
9553 verify switch properly.
9555 2007-12-24 Zoltan Varga <vargaz@gmail.com>
9557 * method-builder.h: New file, moved the mono_mb_ declarations here from
9560 * boehm-gc.c marshal.c: Include method-builder.h.
9562 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
9564 * marshal.c: Remove some code which is now in method-builder.c.
9566 2007-12-23 Zoltan Varga <vargaz@gmail.com>
9568 * method-builder.c: New file, extraction of the method builder functionality
9571 * marshal.c: Move the mb functions into method-builder.c.
9573 * marshal.h marshal.c: Export some mono_mb_... functions.
9575 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
9577 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
9580 * class.c (mono_class_get_full): Check the token type in the dynamic case.
9582 * loader.c (mono_field_from_token): Ditto.
9584 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
9587 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
9590 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
9591 a helper function for setting it.
9593 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
9596 * assembly.c: Significally simplify code now that referenced assemblies are
9597 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
9599 * threads.h: Don't include the internal threads-types.h header file. Fixes
9602 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
9604 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
9605 instructions that were target of branches or are at protected block boundaries.
9607 * verify.c (in_same_block): handle filter clauses.
9609 * verify.c (is_valid_branch_instruction): added. checks the target of
9610 instructions br or brtrue/false.
9612 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
9613 binary branch instructions such as beq and bge.
9615 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
9616 and made it pin the instruction as been part of the exception block.
9618 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
9621 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
9624 * verify.c (do_ret): ret from a protected block is unverifiable and
9627 * verify.c (do_static_branch): verify br and br.s instructions.
9629 * verify.c (merge_stacks): add extra param to support detection
9630 of branches in the middle of instructions.
9632 * verify.c (mono_method_verify): verify branches and exception blocks
9633 that target the middle of instructions. Proper verification of br and br.s.
9635 2007-12-21 Zoltan Varga <vargaz@gmail.com>
9637 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
9638 skip_visibility field.
9639 (reflection_methodbuilder_from_dynamic_method): Ditto.
9641 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
9642 registrations. Fixes #348193.
9644 * threads.h: Move the internal mono_thread_get_pending_exception () to
9645 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
9647 2007-12-20 Zoltan Varga <vargaz@gmail.com>
9649 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
9650 icall registration. Fixes #348193.
9652 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
9653 for corlib classes into object. Fixes #349621.
9655 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
9657 * icall.c (property_accessor_nonpublic): new function to determine
9658 whether an accessor allows a property to be considered non-public.
9659 Returns false for private accessor(s) from parent class, and internal
9660 accessor(s) from parent on 2.0 profile (and higher).
9661 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
9662 to determine whether property should be included if NonPublic flag
9663 is set. Fixes bug #349078.
9665 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
9667 * verify.c (init_stack_with_value): added.
9669 * verify.c (mono_method_verify): extracted common
9670 code for exception initialization into init_stack_with_value.
9672 * verify.c (mono_method_verify): initialize the exception
9673 for handler clauses as well.
9675 * verify.c (mono_method_verify): fix the exception clause
9676 ordering rules, it should use handler end offset and not
9679 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
9681 * rawbuffer.c: remove useless warning.
9683 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
9685 * threads.h, threads-types.h: move functions to the correct header
9688 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
9690 * verify.c (mono_method_verify): proper verification
9691 of exception handling clauses ranges and fallthru in
9692 and out of protected blocks.
9694 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
9696 * verify.c (mono_method_verify): fixed compilation issue.
9698 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
9700 * verify.c (mono_method_verify): a printf slipped in, changed
9701 to use verifier debug macro.
9703 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
9705 * verify.c (is_correct_leave): check for filter clauses.
9707 * verify.c (do_filter): added.
9709 * verify.c (mono_method_verify): property verification of leave.
9712 2007-12-18 Mark Probst <mark.probst@gmail.com>
9714 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
9715 Win32 build, until we figure out how to do the proper thing on
9718 2007-12-17 Zoltan Varga <vargaz@gmail.com>
9720 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
9721 by the previous patch.
9723 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
9724 the assembly resolve handler for refonly assemblies.
9726 2007-12-17 Mark Probst <mark.probst@gmail.com>
9728 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
9729 Make sure only one thread is allowed to commence shutdown, and
9730 don't allow new threads to be started once shutdown is in
9733 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
9735 * verify.c (is_correct_endfilter): added.
9737 * verify.c (is_unverifiable_endfilter): added.
9739 * verify.c (do_endfilter): added.
9741 * verify.c (mono_method_verify): property verification of endfilter
9742 and fixed a corner case or endfinally.
9744 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
9746 * verify.h: new flags to support fail fast of unverifiable code and
9747 do non-strict verification. Non-strict verification is required to
9748 have MS runtime compatibility. There are a huge amount of unverifiable
9749 code that it accepts as verifiable. The strict mode verifies the code
9751 Non-strict mode will be required in cases where code needs to be
9752 accepted as verifiable but fails under strict mode.
9754 * pedump.c: added support to fail fast and non-strict verification.
9756 * verify.c: added support for both fail fast and non-strict verification.
9758 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
9760 * verify.c (is_correct_endfinally): added.
9762 * verify.c (mono_method_verify): property verification of endfinally.
9764 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
9766 * verify.c (in_any_block): check for filter clauses.
9768 * verify.c (is_correct_rethrow): added.
9770 * verify.c (mono_method_verify): property verification of rethrow.
9772 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
9774 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
9776 * verify.c (do_throw): added.
9778 * verify.c (mono_method_verify): property verification of throw
9780 2007-12-11 Zoltan Varga <vargaz@gmail.com>
9782 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
9783 assemblies. Fixes #346425.
9785 2007-12-10 Zoltan Varga <vargaz@gmail.com>
9787 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
9790 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
9792 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
9793 prevent asserts when this is called with a token which might not be valid.
9795 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
9796 lookup_dynamic_token_class with valid_token == FALSE.
9798 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
9800 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
9802 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
9804 2007-12-10 Mark Probst <mark.probst@gmail.com>
9806 * gc.c: Don't delay threadpool thread finalization unless Mono is
9809 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9811 * threads.c: turn an assert into a non-fatal warning.
9813 2007-12-09 Robert Jordan <robertj@gmx.net>
9815 * icall.c (GetVirtualMethod): Add missing argument validation.
9817 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
9819 * verify.c (do_cast): added.
9821 * verify.c (mono_method_verify): property verification of castclass and isinst.
9824 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
9826 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
9828 * verify.c (do_stelem): added.
9830 * verify.c (mono_method_verify): property verification of stelem.X.
9832 2007-12-07 Mark Probst <mark.probst@gmail.com>
9834 * class.c, class-internals.h: Introduce an environment variable
9835 (MONO_GENERIC_SHARING) through which the extent of generic code
9836 sharing can be controlled (share all classes, share only corlib
9837 classes, or share nothing).
9839 * object.c: Only create runtime generic context for classes for
9840 which sharing is enabled.
9842 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
9844 * verify.c (do_ldelem): refactor it to work with ldelem.any.
9846 * verify.c (mono_method_verify): property verification of ldelem.any.
9848 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
9850 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
9851 added ldelem.X opcodes.
9853 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
9855 * verify.c: proper verification of ldelem.X
9857 2007-12-06 Zoltan Varga <vargaz@gmail.com>
9859 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
9861 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
9863 * verify.c (mono_method_verify): null literal requires special handling,
9864 the value pushed on stack need to be flagged as so.
9866 * verify.c (do_ldelema): Verify ldelema properly.
9868 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
9870 * verify.c: Verify ldlen properly.
9872 2007-12-05 Zoltan Varga <vargaz@gmail.com>
9874 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
9875 to the target object's type. Fixes #346160.
9877 2007-12-05 Dick Porter <dick@ximian.com>
9879 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
9880 Solaris needs the same workaround as BSD-derived systems. Fixes
9881 bug 323524, patch by Burkhard Linke
9882 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
9884 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
9886 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
9887 handle to use when error dialog is shown; otherwise, update mask
9888 to show no error dialog when an error occurs.
9890 2007-12-03 Zoltan Varga <vargaz@gmail.com>
9892 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
9894 * class.c (mono_class_get_field_default_value): New helper function to initialize
9895 field->def_type and field->data.
9897 2007-11-30 Zoltan Varga <vargaz@gmail.com>
9899 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
9902 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
9904 * marshal.c: Avoid depending on delegate->method_info being set.
9906 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
9908 * object.c (mono_delegate_ctor): Set delegate->method.
9910 * object-internals.h (struct _MonoDelegate): Add 'method' field.
9912 * appdomain.c: Bump corlib version.
9914 2007-11-27 Raja R Harinath <harinath@gmail.com>
9916 * metadata.c (mono_generic_inst_equal_full): Short-circuit
9917 equality check if we're comparing canonicalized MonoGenericInsts.
9919 2007-11-23 Zoltan Varga <vargaz@gmail.com>
9921 * class.c (generic_array_methods): Call mono_class_setup_methods () before
9922 accessing class->methods.
9924 2007-11-22 Dick Porter <dick@ximian.com>
9926 * threads.c: Ensure that the synch_cs is set before trying to use
9929 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
9931 * profiler.c: r89126 broke the statistial profiler, unbreak.
9933 2007-11-22 Martin Baulig <martin@ximian.com>
9935 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
9938 (mono_debug_debugger_version): Bump to 3.
9939 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
9940 -> mono_debugger_class_initialized().
9942 * mono-debug-debugger.c
9943 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
9946 (mono_debugger_start_class_init_func): Removed.
9947 (mono_debugger_class_loaded_methods_func): Added.
9948 (mono_class_setup_methods): Call it here.
9950 2007-11-22 Martin Baulig <martin@ximian.com>
9953 (mono_debug_add_delegate_trampoline): New public method.
9954 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
9957 (MonoSymbolTable): Added `global_data_table'.
9958 (MonoDebuggerTypeKind): Removed.
9960 2007-11-21 Zoltan Varga <vargaz@gmail.com>
9962 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
9965 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9967 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
9969 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
9971 2007-11-20 Martin Baulig <martin@ximian.com>
9973 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
9975 * mono-debug-debugger.c
9976 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
9977 (mono_debugger_remove_breakpoint): Likewise.
9978 (mono_debugger_check_breakpoints): Likewise.
9979 (mono_debugger_register_class_init_callback): New public method.
9980 (mono_debugger_remove_class_init_callback): Likewise.
9981 (mono_debugger_add_type): Likewise.
9983 * mono-debug-debugger.h
9984 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
9986 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
9988 * class.c: more interface implementations needed for the
9989 array enumerator (fixes bug #341112).
9991 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
9993 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
9994 fix ParamName of ArgumentNullExceptions.
9996 2007-11-17 Miguel de Icaza <miguel@novell.com>
9998 * reflection.c (mono_reflection_encode_sighelper): Generate the
9999 modopts and modreqs. I have a useless test that crashes monodis,
10000 but that shows the code working.
10002 2007-11-17 Zoltan Varga <vargaz@gmail.com>
10004 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
10005 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
10007 2007-11-15 Dick Porter <dick@ximian.com>
10009 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
10010 When joining a thread, it's the thread that's calling Join that
10011 gets WaitSleepJoin state not the target. Fixes the standalone
10012 test case in bug 334740, and hopefully the whole bug too.
10014 2007-11-15 Dick Porter <dick@ximian.com>
10016 * process.c: Read file version info from the files pointed at by
10017 process modules, not the current process. Fixes bug 315969.
10019 Use windows typedef names in some places to fix warnings on the
10022 2007-11-15 Mark Probst <mark.probst@gmail.com>
10024 * image.c, metadata-internals.h: Added a generic_class_cache hash
10025 to MonoImage for looking up generic classes when sharing generics.
10027 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10029 * sgen-gc.c: warning cleanups.
10031 2007-11-15 Zoltan Varga <vargaz@gmail.com>
10033 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
10034 inherited properties.
10036 2007-11-14 Mark Probst <mark.probst@gmail.com>
10038 * object.c, class-internals.h: Added more information to the
10039 runtime generic context.
10041 2007-11-13 Zoltan Varga <vargaz@gmail.com>
10043 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
10044 instead of just the target method. Generalize the abstract method handling to
10045 handle any non-static method.
10047 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10048 mono_marshal_get_delegate_invoke () signature change.
10050 2007-11-13 Mark Probst <mark.probst@gmail.com>
10052 * class.c, class-internals.h: Made
10053 mono_type_get_basic_type_from_generic () public. Fixed member
10054 access check for shared generics.
10056 * loader.c: Don't insert field into field cache if it's part of a
10057 non-inflated generic class.
10059 * domain.c, domain-internals.h: The generic sharing context is now
10060 part of the jit info data structure. Added two accessor
10063 2007-11-12 Zoltan Varga <vargaz@gmail.com>
10065 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
10066 the array Get/Set/Address methods, since the JIT inlines them.
10068 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
10070 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
10071 (mono_image_init): Initialize runtime_invoke_direct_cache.
10073 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10074 mono_marshal_get_delegate_invoke signature change.
10076 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
10077 an additional argument. Add support for invoking abstract methods.
10079 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
10081 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
10083 2007-11-09 Mark Probst <mark.probst@gmail.com>
10085 * class.c: Do field layout for open generic classes as well.
10087 2007-11-09 Mark Probst <mark.probst@gmail.com>
10089 * gc.c, gc-internal.h: Don't finalize threadpool threads with
10090 other objects, because the threadpool is still around. Put them
10091 in a list instead and after finalizing all other objects in the
10092 root domain shut down the thread pool and then finalize the
10093 threads. Fixes bug #337383.
10095 * threads.c, thread-types.h: New mono_thread_create_internal()
10096 function for marking a thread with the threadpool flag before it
10097 started. Set synch_cs to NULL after freeing it.
10099 * threadpool.c: Mark threadpool threads before they start.
10101 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10103 * reflection.h, reflection.c: don't export random functions
10104 and lazy load dbnull and missing objects.
10106 2007-11-07 Jonathan Chambers <joncham@gmail.com>
10108 * class.c: Initialize COM types if COM interfaces
10109 are present (not just COM classes).
10111 Code is contributed under MIT/X11 license.
10113 2007-11-07 Massimiliano Mantione <massi@ximian.com>
10115 create_dynamic_mono_image: hook module profiler events (dynamic case).
10116 mono_image_basic_init: hook assembly profiler events (dynamic case).
10118 2007-11-07 Massimiliano Mantione <massi@ximian.com>
10120 simple_appdomain_unload: completely terminate the profiler
10121 instead of only processing the statistical samples.
10122 simple_shutdown: make sure this is really called exactly once,
10123 even in multithreaded applications, and always listen to
10125 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
10126 here, the "[un]load" functions will do it.
10127 Fixes bugs #333791 and #325261.
10129 2007-11-07 Geoff Norton <gnorton@novell.com>
10131 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
10132 rather than depend on __APPLE__.
10134 2007-11-07 Mark Probst <mark.probst@gmail.com>
10136 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
10138 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
10140 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
10141 UTF16 MonoString. Fix the crash from bug #335488
10143 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
10145 * marshal.c: Correct (for non-Win32 OS) length != size in
10146 mono_string_from_bstr. Fix #339530.
10148 2007-11-06 Geoff Norton <gnorton@novell.com>
10150 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
10153 2007-11-05 Kornél Pál <kornelpal@gmail.com>
10155 * process.c: Added run-time GetProcessId API detection for Windows.
10157 2007-11-04 Miguel de Icaza <miguel@novell.com>
10159 * reflection.c (mono_param_get_objects): If a parameter has the
10160 attribute [System.Runtime.InteropServices.Optional] we should
10161 set the DefaultValue of the ParameterInfo to be
10162 System.Reflection.Missing instead of DBNull.
10166 (mono_get_reflection_missing_object): New method,
10167 returns the System.Reflection.Missing.Value singleton instance.
10169 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
10171 * culture-info-table.h : regenerated.
10173 2007-11-02 Jonathan Chambers <joncham@gmail.com>
10175 * icall.c: Use GetEnvironmentStrings on windows
10176 so we are using the same environment block as
10177 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
10180 Code is contributed under MIT/X11 license.
10182 2007-10-31 Martin Baulig <martin@ximian.com>
10184 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
10186 * mono-debug-debugger.h
10187 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
10189 2007-10-30 Zoltan Varga <vargaz@gmail.com>
10191 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
10194 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
10196 * culture-info-table.h : regenerated.
10198 2007-10-30 Robert Jordan <robertj@gmx.net>
10200 * icall-def.h, icall.c:
10201 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
10203 Code is contributed under MIT/X11 license.
10205 2007-10-29 Zoltan Varga <vargaz@gmail.com>
10207 * class.c (mono_class_setup_vtable): Find the inflated methods in the
10208 inflated class instead of inflating them again.
10210 * class.c (mono_class_setup_vtable): Inflate the override methods in the
10213 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
10214 Call setup_supertypes () after klass->parent is set.
10215 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
10217 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
10218 for inflated instances of not yet created dynamic generic classes.
10219 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
10220 times from inflated_method.
10221 (methodbuilder_to_mono_method): Ditto.
10223 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
10225 * gc.c: code cleanup and removed old untested option of not creating the
10228 2007-10-29 Zoltan Varga <vargaz@gmail.com>
10230 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
10231 creating a jump trampoline for dynamic methods.
10233 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
10235 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
10236 generic TypeBuilders when called from another method of the same type (bug #335131).
10239 2007-10-27 Zoltan Varga <vargaz@gmail.com>
10241 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
10242 doesn't seem to work perfectly.
10244 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
10245 called multiple times.
10246 (methodbuilder_to_mono_method): Ditto.
10247 (resolve_object): Inflate FieldBuilder's.
10249 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10251 * string-icalls.c, string-icalls.h, appdomain.c: patch from
10252 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
10253 RemoveEmptyEntries in the string.Split implementation (bug #322375).
10255 2007-10-26 Dick Porter <dick@ximian.com>
10257 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
10258 Thread initialisation changes
10260 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
10262 * verify.c: fix compatibility check between arrays and System.Array
10264 2007-10-26 Zoltan Varga <vargaz@gmail.com>
10266 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
10267 too. Fixes #336999.
10269 2007-10-25 Zoltan Varga <vargaz@gmail.com>
10271 * object.c (mono_value_box): Use typed allocation here.
10273 2007-10-23 Zoltan Varga <vargaz@gmail.com>
10275 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
10276 trampoline instead of compiling the method right away.
10278 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
10280 2007-10-21 Zoltan Varga <vargaz@gmail.com>
10282 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
10283 related fields for dynamic classes. Fixes #334493.
10285 2007-10-20 Zoltan Varga <vargaz@gmail.com>
10287 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
10289 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
10291 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
10292 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
10294 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
10296 * reflection.c (create_generic_typespec): Initialize klass->generic_container
10298 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
10300 2007-10-18 Jonathan Chambers <joncham@gmail.com>
10302 * marshal.c: Use correct key when removing item
10305 Code is contributed under MIT/X11 license.
10307 2007-10-17 William Holmes <billholmes54@gmail.com>
10309 *marshal.c: Adding a case to marshal booleans to U1
10311 Code is contributed under MIT/X11 license.
10313 2007-10-18 Zoltan Varga <vargaz@gmail.com>
10315 * class.c (mono_class_from_name): Search the modules compromising dynamic
10316 assemblies. Fixes #331601.
10318 2007-10-16 Zoltan Varga <vargaz@gmail.com>
10320 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
10321 exception if the type name contains an assembly component. Fixes #334203.
10323 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
10324 modules inside dynamic assemblies. Fixes #334200.
10326 * reflection.c: Set image->public_key and image->public_key_length;
10328 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
10331 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
10333 2007-10-16 Mark Probst <mark.probst@gmail.com>
10335 * metadata.c: Implemented correct comparing of generic classes.
10336 An inflated generic class can be equal to a non-inflated one if it
10337 is inflated with generic type variables as type arguments. Fixes
10340 2007-10-15 Dick Porter <dick@ximian.com>
10342 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
10343 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
10346 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
10347 instead of a monitor lock. This means that monitor_try_enter and
10348 co can set the thread state safely.
10349 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
10350 thread_interrupt_requested, so interrupt actually works.
10352 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
10353 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
10354 state accessor function
10356 2007-10-15 Martin Baulig <martin@ximian.com>
10359 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
10360 the debugger with the current runtime.
10362 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
10364 * object.c, object-internals.h: added the ability to set a single
10365 trampoline for all the slots in a vtable.
10367 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10369 * marshal.c: deal with a possible race condition during multicast
10370 delegate invocation.
10372 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10374 * class.c: ensure value type methods don't have the synchronized
10377 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
10379 * string-icalls.c, string-icalls.h: reverted unapproved patch that
10382 2007-10-11 Joel Reed <joelwreed@comcast.com>
10384 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
10385 to take an options parameter so that empty entries can be removed during
10386 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
10388 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10390 * marshal.c: make sure we don't store the signature from a dynamic
10391 method into the runtime invoke cache (bug #327189).
10393 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10395 * marshal.c: make sure the wrapper methods are properly initialized.
10397 2007-10-11 Mark Probst <mark.probst@gmail.com>
10399 * metadata.c, metadata-internals.h: Generalized
10400 mono_type_stack_size() to mono_type_stack_size_internal() which
10401 takes an additional argument specifying whether it allows open
10404 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
10406 * verify.c (do_invoke_method): handle typedbyref params
10407 correctly and check for unverifiable return values.
10409 * verify.c (do_newobj): fix a warning.
10411 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
10413 * verify.c: don't tread typedbyref as allways unverifable,
10414 so uses, like (ld/st)loc.0 are valid. verify for the cases
10415 that it matters, like boxing related operations.
10417 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
10419 * verify.c: add verification of the newobj opcode. verification
10420 of delegate instantation still missing due ldftn and virldftn not
10421 pushing the function type on stack
10423 2007-10-08 Mark Probst <mark.probst@gmail.com>
10425 * class-internals.h: Runtime generic context data structure
10428 * object.c: Initialization of runtime generic context at runtime
10429 vtable creation time.
10431 2007-10-08 Massimiliano Mantione <massi@ximian.com>
10432 * class.c (mono_class_create_from_typedef,
10433 mono_class_from_generic_parameter, mono_ptr_class_get,
10434 mono_fnptr_class_get, mono_bounded_array_class_get)
10435 * domain.c (mono_domain_create, mono_domain_free)
10436 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
10437 * image.c (do_mono_image_load, mono_image_close):
10438 Hooked up load-unload profiler events.
10440 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10442 * domain.c: track statistics about the actual amount of native code
10445 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
10447 * class.c: the valuetype enumerators don't have the additional
10448 supertypes interfaces.
10450 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10452 * class.c: need more interfaces setup for the IEnumerator<T>
10453 object created for arrays (tests/ienumerator-interfaces.2.cs).
10455 2007-10-05 Zoltan Varga <vargaz@gmail.com>
10457 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
10459 2007-10-05 Alp Toker <alp@atoker.com>
10461 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
10462 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
10465 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
10467 * verify.c (verify_type_compatibility_full): verification of
10468 compatibility improved, validates correctly non-strict checks between
10469 native int and I4 types different than (unsigned)int32.
10471 * verify.c (do_store_indirect): added, do all verification of
10474 * verify.c (get_load_indirect_mono_type): renamed to
10475 get_indirect_op_mono_type, as it now returns the MonoType for
10476 ldind.X and stind.X opcodes.
10478 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
10480 * reflection.c: Fix the encoding of generic type definition for
10483 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
10484 mono_image_typedef_or_ref but allows to specify if typespec lookups should
10485 be made. Typespec check is done prior to typeref cache lookup.
10487 * reflection.c (mono_image_typedef_or_ref): now just delegate to
10488 mono_image_typedef_or_ref_full.
10490 * reflection.c (encode_generic_class): encode the generic class
10491 directly instead of calling encode_type.
10493 * reflection.c (encode_type): encode the generic type definition
10494 MonoClass as a generic instantiation.
10496 * reflection.c (create_typespec): cache typespec tokens in
10497 the assembly->typespec cache. Don't create typespec for a generic
10498 instance MonoClass. Create typespec for the generic type defintion.
10500 * reflection.c (create_generic_typespec): encode the generic
10501 class directly instead of calling encode_type.
10503 * reflection.c (mono_image_create_token): encode the generic
10504 type definition not using a typespec for MonoType instances.
10507 2007-10-04 Raja R Harinath <rharinath@novell.com>
10510 * class.c (mono_image_init_name_cache): Don't return nested
10511 'protected internal' classes.
10512 (mono_class_from_name_case): Likewise.
10514 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
10516 * icall-def.h, icall.c : get_bundled_machine_config() is now the
10517 common function used by both DefaultConfig in System.dll and
10518 InternalConfigurationHost in System.Configuration.dll.
10520 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10522 * class.c: automatically add to vectors only a few essential explicit
10523 generic interfaces. The rest of the interfaces that arrays should
10524 provide are currently implicitly added (but still not lazily, see the
10525 design in the discussion of bug#325495 for the details of what is
10526 needed for that). Additionally, implicit interfaces are assigned the
10527 same vtable slot as the explicit interfaces (as they are compatible):
10528 this enables huge memory savings since we don't need to instantiate
10529 as many memthods and as large vtables anymore. Also, Since
10530 GetEnumerator<T> returns an instance of a type that is required to
10531 support a similarly large set of interfaces as arrays, we add
10532 implicit interfaces and interface offset sharing support to those
10533 types, too. This change adds all the required interfaces so that
10534 the anonarray.cs test case in the bug report works (we don't add
10535 all the interfaces to arrays of arrays 3-level deep and more because
10536 of the memory requirements explained in the bug and since they are much
10537 less common: the lazy-loading support will enabled them to work, too).
10539 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
10541 * verify.c (merge_stacks): major clean up, all type compatibility
10542 checks are done by verify_type_compatibility. This fix my earlier lack
10543 of understanding of the CLR type system and merge_stacks no longer looks
10546 * verify.c: fixed some bad spelling.
10548 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
10550 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
10551 a given stack slock.
10553 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
10554 verify_type_compatibility_full. This removed a near indentical function and fixed
10555 handling of Int32 and IntPtr across all opcodes.
10557 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
10559 * class.c: only vectors have the additional generic interfaces.
10561 2007-10-01 Jonathan Chambers <joncham@gmail.com>
10563 * mono-config.c: Use g_strcasecmp instead of
10564 strcasecmp like everywhere else to fix
10565 compilation with MSVC.
10567 Code is contributed under MIT/X11 license.
10569 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10571 * object.c, object-internals.h: refactored the IMT code to enable
10572 building a single slot at a time and lazily creating the IMT trampolines
10575 2007-09-29 Zoltan Varga <vargaz@gmail.com>
10577 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
10579 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
10582 2007-09-29 Raja R Harinath <harinath@gmail.com>
10584 * loader.c (method_from_methodspec): Rearrange to avoid
10585 un-necessary exposition. Don't assert out if the method's
10586 declaring type is a generic type definition.
10588 2007-09-28 Martin Baulig <martin@ximian.com>
10590 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
10592 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
10594 * class-internals.h: optimize field layout of MonoClass to
10595 requires less cachelines at runtime and save a few bytes on 64 bit
10598 2007-09-28 Jb Evain <jbevain@novell.com>
10600 * reflection.c: when encoding type names in custom attributes,
10601 if the type is a closed generic type, its generic arguments
10602 have to be serialized as AssemblyQualifiedName, so that when
10603 they are deserialized, it's possible to re-create them properly.
10607 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
10609 * object.c, class-internals.h: added delegate-creation counter.
10611 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
10613 * class.c: cleanup of the code that synthetizes interfaces for
10614 arrays in 2.0: saves quit a bit of corlib mempool memory.
10615 Code to fix bug #325495 ifdeffed out for now until the issues
10616 with memory usage and O(n^2) behaviour are fixed.
10618 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10620 * marshal.c: when possible, do not duplicate the name of the methods
10621 in the method builder and in the generated MonoMethod.
10623 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
10624 * verify.c: added support for type checking ldind_* opcodes.
10626 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
10628 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
10629 which is used to distinguish the fully open instantiation of a TypeBuilder
10630 with the rest. This temporary hack is required to restore the property that
10631 the fully open instantiation is the same type of the generic type definition.
10633 * class-internals.h (mono_generic_class_is_generic_type_definition):
10634 new function as part of the internal API.
10636 * class.c (inflate_generic_type): return NULL when the generic inst is
10637 fully open. The fully open generic type is now the same as the generic type
10638 definition for non TypeBuilder types.
10640 * class.c (mono_generic_class_get_class): removed assert since it is
10641 no longer valid, gklass->cached_class can point to the generic type definition.
10643 * class.c (mono_generic_class_is_generic_type_definition): new.
10645 * metadata.c (mono_generic_class_hash): added is_tb_open field
10646 to the hash calculation.
10648 * metadata.c (free_generic_class): if the generic class is associated
10649 with the generic type definition, its field will come from the mempool and
10652 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
10653 new, this function identifies the corner case of a TypeBuilder fully open
10656 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
10657 for lookup. Set gclass->cached_class to be the container class in case of
10658 the fully open instantiation of non TypeBuilder types.
10660 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
10661 to compare generic classes.
10663 * reflection.c (method_encode_methodspec): remove assert that
10664 no longer is valid.
10666 * reflection.c (mono_reflection_generic_class_initialize): add
10667 an aditional assert to ensure the proper type is used.
10669 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
10671 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
10674 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
10676 * verify.c (push_arg): Fixed support for ldarga
10677 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
10678 MonoType used as first arg in case of instance calls.
10680 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
10682 * verify.c: Support for verifying VAR and MVAR types,
10684 2007-09-25 Zoltan Varga <vargaz@gmail.com>
10686 * icall.c (ves_icall_get_property_info): Set the reflected type of the
10687 accessors correctly.
10689 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
10691 * threads.c: support OSX and other systems in
10692 mono_thread_get_stack_bounds (bug #328026).
10694 2007-09-25 Martin Baulig <martin@ximian.com>
10697 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
10699 2007-09-24 Martin Baulig <martin@ximian.com>
10702 (MonoDebugClassEntry): Moved the definition of this struct into
10703 mono-debug.c to make it private.
10706 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
10707 type table per symbol file, we don't need to store the symfile id
10710 2007-09-24 Martin Baulig <martin@ximian.com>
10712 Create one type table per symbol file, since a `MonoClass *' gets
10713 invalid when its image is unloaded.
10715 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
10716 (MonoDebugHandle): Added `type_table'.
10718 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
10720 * mempool.c, mempool.h: added mono_mempool_new_size () API
10721 to be able to specify a smaller initial size for the pool.
10722 Adjusted the code to slowly increase pool size before using
10723 the previous default size.
10724 * image.c: use a small initial size for image mempools.
10726 2007-09-23 Zoltan Varga <vargaz@gmail.com>
10728 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
10731 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
10732 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
10734 2007-09-22 Zoltan Varga <vargaz@gmail.com>
10736 * metadata.c (mono_type_create_from_typespec): Remove an invalid
10737 free. Fixes #327438.
10739 2007-09-21 Raja R Harinath <harinath@gmail.com>
10741 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
10742 generic instantiations, etc.
10743 <MONO_TYPE_ARRAY>: Likewise.
10745 2007-09-21 Martin Baulig <martin@ximian.com>
10747 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
10748 these structs were never defined.
10749 (MonoDebugHandle): Removed the `_priv' field, it was never used.
10751 2007-09-21 Martin Baulig <martin@ximian.com>
10753 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
10755 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
10757 * image.c: removed the guid hash tables: we can get the same info
10758 without the additional memory usage hit (partially fixes also bug #327052).
10760 2007-09-10 Massimiliano Mantione <massi@ximian.com>
10762 * profiler.h, profiler-private.h, profiler.c: add a new profiler
10763 event to handle unloading methods. After the event is called, the
10764 corresponding MonoMethod* must be considered invalid.
10765 * loader.c (mono_free_method): call the new mono_profiler_method_free
10768 2007-09-20 Mark Probst <mark.probst@gmail.com>
10770 * domain-internals.h: New flag in MonoJitInfo which marks shared
10771 generic methods. New hash table (shared_generics_hash) in
10772 MonoDomain to keep track of shared generic methods. Prototypes
10773 for functions to register and lookup shared generic methods.
10775 * domain.c: Support for registering and looking up shared generic
10776 methods via a hash table (shared_generics_hash) in MonoDomain.
10778 * class-internals.h: New exception to signal failure of shared
10779 compilation of a generic method. New counters for generics
10780 sharing in MonoStats.
10782 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
10784 * image.c, metadata-internals.h: don't keep a file descriptor open
10785 for loaded assemblies (bug#325988).
10787 2007-09-19 Raja R Harinath <rharinath@novell.com>
10789 * metadata.c (signature_in_image): New. Carve out of type_in_image.
10790 (ginst_in_image, gclass_in_image): Simplify. Change signature to
10791 use the corresponding datatypes.
10792 (type_in_image): Update to changes.
10793 (CleanForImageUserData): Simplify.
10794 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
10795 Avoid quadratic behaviour in handling the "stolen" list by
10796 separating the filter predicate out, and by prepending the stolen
10797 items rather than appending them.
10798 (steal_ginst_in_image): Likewise.
10799 (mono_metadata_clean_for_image): Update to changes.
10801 2007-09-19 Martin Baulig <martin@ximian.com>
10803 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
10805 2007-09-19 Martin Baulig <martin@ximian.com>
10807 * mono-debug.c (mono_debug_cleanup): Don't call
10808 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
10810 2007-09-19 Raja R Harinath <harinath@gmail.com>
10812 Fix crash on 'make run-test' in mcs/errors
10813 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
10814 Avoid more potential allocations in mono_class_from_mono_type.
10815 (ginst_in_image): Update to changes.
10816 (gclass_in_image): Rearrange slightly.
10818 2007-09-18 Zoltan Varga <vargaz@gmail.com>
10820 * class.c (mono_class_init): Move the code that sets up class->methods to
10821 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
10823 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
10824 canonical instance of an inflated generic signature.
10825 (mono_type_create_from_typespec): Remove an invalid free.
10827 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
10829 2007-09-18 Marek Habersack <mhabersack@novell.com>
10831 * domain-internals.h: added a declaration of the
10832 mono_assembly_load_full_nosearch internal function.
10834 * assembly.c (mono_assembly_load_with_partial_name): use
10835 mono_try_assembly_resolve return value properly.
10836 (mono_assembly_load_full_nosearch): copied the function body from
10837 mono_assembly_load_full, without the code to invoke assembly
10839 (mono_assembly_load_full): calls the above new function and if the
10840 assembly is not resolved, invokes the search hooks.
10842 * appdomain.c (mono_runtime_init): restore the global postload
10843 assembly search handlers.
10845 2007-09-18 Zoltan Varga <vargaz@gmail.com>
10847 * class.c (mono_class_init): Make sure class->methods and class->properties
10848 are never NULL in the generics case.
10850 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
10852 2007-09-17 Zoltan Varga <vargaz@gmail.com>
10854 * metadata.c (free_generic_class): Disable some code to fix the build.
10856 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
10858 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
10859 from the image mempool.
10861 * metadata.c (free_generic_class): Free more data from the inflated class.
10863 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
10865 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
10867 (mono_type_create_from_typespec): Ditto.
10869 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
10870 MonoImage to the caller.
10871 (mono_init_internal): Save the opened image in a global variable.
10872 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
10874 * reflection.c (resolve_object): Fix a leak.
10876 * metadata.c: Fix the freeing of data in the generics caches.
10878 * metadata.c (free_generic_inst): Comment this out to fix the build.
10879 (free_generic_class): Ditto.
10881 * metadata.c: Free cached generic methods, instantinations and classes when
10882 they are removed from the caches.
10883 (mono_metadata_free_type): Free the type itself.
10885 * class.c: Free the result of mono_class_inflate_generic_type () in a few
10888 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
10890 * boehm-gc.c: restrict managed allocs to __thread supporting
10893 2007-09-16 Zoltan Varga <vargaz@gmail.com>
10895 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
10896 (mono_generic_class_get_class): Fix a leak.
10898 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
10899 mono_metadata_free_type ().
10900 (mono_metadata_inflate_generic_inst): Fix a leak.
10902 2007-09-14 Zoltan Varga <vargaz@gmail.com>
10904 * mono-debug.c (free_header_data): Fix a leak missed earlier.
10906 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
10909 * mono-debug.c (mono_debug_close_image): Fix call to
10910 g_hash_table_remove ().
10912 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
10914 * icall-def.h: redirect all the string ctor to the managed
10915 CreateString () methods.
10916 * string-icalls.c, string-icalls.h: removed dead code for string
10919 2007-09-14 Zoltan Varga <vargaz@gmail.com>
10921 * mono-debug.c: Fix memory leaks.
10923 2007-09-14 Jonathan Chambers <joncham@gmail.com>
10925 * threads-types.h: Implement mono_hazard_pointer_set and
10926 mono_hazard_pointer_clear macros using do/while(0) to fix
10927 compilation with MSVC.
10929 Code is contributed under MIT/X11 license.
10931 2007-09-14 Zoltan Varga <vargaz@gmail.com>
10933 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
10934 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
10936 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10938 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
10941 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10943 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
10944 managed-code allocated as well.
10946 2007-09-13 Zoltan Varga <vargaz@gmail.com>
10948 * class.c (mono_class_is_assignable_from): Add support for generic variance.
10950 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
10952 * boehm-gc.c: fixed the build after the AOT changes.
10954 2007-09-13 Zoltan Varga <vargaz@gmail.com>
10956 * wrapper-types.h: Add an ALLOC wrapper type.
10958 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
10959 reference managed allocator methods.
10961 2007-09-12 Marek Safar <marek.safar@gmail.com>
10963 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
10964 of Type array and not MonoType, a fix suggested by Hari.
10966 2007-09-12 Jonathan Chambers <joncham@gmail.com>
10968 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
10969 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
10971 Code is contributed under MIT/X11 license.
10973 2007-09-10 Massimiliano Mantione <massi@ximian.com>
10975 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
10977 2007-09-12 Marek Habersack <mhabersack@novell.com>
10979 * image.c (do_mono_image_open): if assembly file fails to open and
10980 MONO_IOMAP is in effect, try to find the path in a
10981 case-insensitive way.
10983 * appdomain.c (mono_runtime_init): do not install postload hooks -
10984 tests show that MS.NET doesn't use anything of that sort to
10985 trigger the AppDomain.AssemblyResolve event.
10986 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
10988 (mono_runtime_init): init portability helpers here.
10990 * assembly.c (mono_assembly_load_with_partial_name): if other
10991 attempts fail, trigger the AppDomain.AssemblyResolve event handler
10992 to resolve the assembly.
10994 * domain-internals.h: added mono_try_assembly_resolve and marked
10997 2007-09-11 Jb Evain <jbevain@novell.com>
10999 * object-internals.h (MonoReflectionDynamicMethod): add
11000 a `MonoReflectionType *owner` field. The owner is used
11002 (mono_reflection_create_dynamic_method): use the owner of the dynamic
11003 method as the class declaring the dynamic method.
11004 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
11005 dynamic method to the declaring type of the methodbuilder.
11007 2007-09-11 Mark Probst <mark.probst@gmail.com>
11009 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
11010 rules for calling methods via reflection.
11012 2007-09-11 Zoltan Varga <vargaz@gmail.com>
11014 * reflection.c (resolve_object): Add support for MonoGenericClass.
11015 Inflate MonoType's.
11017 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11019 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
11020 provide a managed method that does fast allocations without needing
11021 a managed->unmanaged transition. Boehm GC implementation currently
11022 enabled for ptrfree objects on sane architectures.
11024 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11026 * marshal.c, marshal.h: exported a couple of useful functions and
11027 added mono_mb_get_label () to easily handle backward branches.
11029 2007-09-10 Zoltan Varga <vargaz@gmail.com>
11031 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
11033 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11035 * loader.c (find_method): Fixed the regression introduced while
11038 2007-09-09 Zoltan Varga <vargaz@gmail.com>
11040 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
11043 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
11044 icall.c reflection.c: Pass a MonoGenericContext argument to
11045 mono_lookup_dynamic_token ().
11047 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
11050 2007-09-09 Robert Jordan <robertj@gmx.net>
11052 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
11053 for generic methods.
11055 * object.c (mono_object_get_virtual_method): Handle generic methods.
11058 Code is contributed under MIT/X11 license.
11060 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11062 * image.c: fix locking in mono_image_load_file_for_image ().
11064 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
11066 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
11067 used only as a cache: added an icall to fill it.
11069 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
11071 * reflection.h: exposed mono_reflection_free_type_info
11072 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
11073 since mono_reflection_bind_generic_parameters makes a copy of it.
11074 * reflection.c (free_type_info): subinfos should be freed.
11075 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
11077 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
11078 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
11079 this fixes #82695 and #81726.
11082 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
11084 * process.h, process.c: added support for user profile/info in
11085 ProcessStartInfo. For now only Windows works.
11087 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11089 * metadata.c: consider the generic arguments when comparing
11090 signatures (bug #82614).
11092 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11094 * cil-coff.h, image.c: updated assembly loader to cope with the
11095 PE32+ 64 bit file format.
11097 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11099 * assembly.c, class.c, domain.c, loader.c: remove useless
11100 inclusion of cil-coff.h.
11102 2007-08-29 Jonathan Chambers <joncham@gmail.com>
11104 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
11105 if interface is marked with CoClassAttribute.
11107 Code is contributed under MIT/X11 license.
11109 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11111 * sgen-gc.c: ensure no object from the to space is copied again or finalized
11112 if it's seen twice in major collections.
11114 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11116 * sgen-gc.c: big objects are not copied to the gray area, but they
11117 need to be considered for scanning, too, if they are brought alive
11118 by an object ready for finalizations or a survived one.
11120 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11122 * sgen-gc.c: properly account the number of disappearing links when
11123 they are nullified.
11125 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11127 * sgen-gc.c: share the code to scan the registered roots between the
11128 different types of collections.
11130 2007-08-28 Zoltan Varga <vargaz@gmail.com>
11132 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
11134 2007-08-28 Zoltan Varga <vargaz@gmail.com>
11136 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
11137 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
11139 2007-08-28 Mark Probst <mark.probst@gmail.com>
11141 * security-manager.c (mono_security_manager_get_methods):
11142 LinkDemandSecurityException now has 2 arguments instead of 3.
11144 2007-08-27 Zoltan Varga <vargaz@gmail.com>
11146 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
11147 platforms which need it.
11149 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11151 * sgen-gc.c: unregister thread data structures with a pthread_key_t
11154 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11156 * threads.c: free the thread static data on thread exit.
11158 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
11160 * class.c: walk the hierarchy to find the generic definition for
11161 a class (fixes runtime part of bug #82498).
11163 2007-08-24 Zoltan Varga <vargaz@gmail.com>
11165 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
11168 * image.c (mono_image_close): Here. Hopefully fixes #82510.
11170 2007-08-24 Mark Probst <mark.probst@gmail.com>
11172 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
11174 2007-08-24 Robert Jordan <robertj@gmx.net>
11176 * appdomain.c: don't perform the ':'->';' substitution on Win32.
11178 2007-08-24 Jb Evain <jbevain@novell.com>
11180 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
11183 2007-08-24 Mark Probst <mark.probst@gmail.com>
11185 * threads.c: Make sure a thread gets cleaned up only once. Fixes
11188 2007-08-24 Zoltan Varga <vargaz@gmail.com>
11190 * assembly.c: Fix a warning.
11192 2007-08-23 Marek Habersack <mhabersack@novell.com>
11194 * appdomain.c: parse the <runtime> section looking for the probing
11195 element with the 'privatePath' attribute, which sets additional
11196 directories in which the runtime should look for assemblies.
11198 2007-08-23 Robert Jordan <robertj@gmx.net>
11200 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
11203 2007-08-23 Martin Baulig <martin@ximian.com>
11205 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
11206 _mono_debug_init_corlib() and remove it from the header file.
11208 2007-08-23 Martin Baulig <martin@ximian.com>
11210 * mono-debug-debugger.c
11211 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
11212 don't notify the debugger about it.
11214 * mono-debug-debugger.h
11215 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
11217 2007-08-23 Robert Jordan <robertj@gmx.net>
11219 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
11220 Code is contributed under MIT/X11 license.
11222 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11224 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
11226 2007-08-22 Martin Baulig <martin@ximian.com>
11228 * mono-debug.c: Store debugging info on a per-domain basis and
11229 free it on domain unload. Add support for unloading symbol files.
11232 (MonoDebugList): New typedef.
11234 - add `data_tables and `type_table'.
11235 - replace 'symbol_files' and `num_symbol_files' with a
11237 (mono_debug_data_table): Removed.
11238 (mono_debug_list_add): New public function.
11239 (mono_debug_list_remove): New public function.
11240 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
11241 (mono_debug_init_2_memory): Renamed into
11242 mono_debug_open_image_from_memory().
11243 (mono_debug_close_image): New public function.
11244 (mono_debug_domain_create): Likewise.
11245 (mono_debug_domain_unload): Likewise.
11246 (MONO_DEBUGGER_VERSION): Bump to 60.
11248 * mono-debug-debugger.h
11249 (MonoDebuggerEvent):
11250 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
11251 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
11252 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
11253 - rename `THREAD_CREATED' and `THREAD_EXITED' into
11254 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
11255 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
11257 (mono_debugger_add_symbol_file): Removed.
11258 (mono_debugger_add_type): Removed.
11259 (mono_debugger_lookup_type): Removed.
11260 (mono_debugger_lookup_assembly): Removed.
11263 (mono_domain_create): Call mono_debug_domain_create().
11264 (mono_init_internal): Call mono_debug_init_corlib().
11267 (mono_assembly_close): Call mono_debug_close_image().
11269 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11271 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
11274 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
11276 * sgen-gc.c: ensure section->pin_queue_end is initialized
11277 correctly when non pinning objects in the section have been found.
11279 2007-08-22 Marek Habersack <mhabersack@novell.com>
11281 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
11282 containing a list of directories separated by ':'. MSDN docs say
11283 the directories should be separated with ';'. Part of a bugfix for
11286 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
11288 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
11289 it should MonoType and not MonoClass.
11291 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
11293 * culture-info-table.h : regenerated.
11295 2007-08-20 William Holmes <billholmes54@gmail.com>
11297 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
11298 to call ReplaceFile Kernel32 on windows or in io-layer.
11299 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
11300 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
11301 as an internal call.
11303 Code is contributed under MIT/X11 license.
11305 2007-08-20 Jb Evain <jbevain@novell.com>
11307 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
11308 and MONO_EXCEPTION_FIELD_ACCESS.
11310 * debug-helpers.[c|h]: new mono_field_full_name function.
11312 2007-08-20 Mark Probst <mark.probst@gmail.com>
11314 * class.c: Removed class_security_level() and moved it to
11315 security-core-clr.c.
11317 * security-core-clr.c, security-core-clr.h: class_security_level()
11318 is now public and renamed to mono_security_core_clr_class_level().
11319 It also looks for security attributes in the classes a class is
11322 2007-08-20 Mark Probst <mark.probst@gmail.com>
11324 * security-core-clr.c, security-core-clr.h: CoreCLR security
11327 * Makefile.am: Added security-core-clr.[ch].
11329 * security-manager.c, security-manager.h: Functions and enum for
11330 setting and getting the security mode.
11332 * class.c: CoreCLR security checks.
11334 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11336 * icall-def.h, process.c, process.h: implemented icall to get
11337 user/system processor times.
11339 2007-08-17 Mark Probst <mark.probst@gmail.com>
11341 * domain.c, threads.c, class-internals.h, domain-internals.h: New
11342 reader-lock-free jit_info_table.
11344 2007-08-17 Zoltan Varga <vargaz@gmail.com>
11346 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
11348 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
11350 * object-internals.h (MonoException): Add missing _data member.
11352 2007-08-08 Massimiliano Mantione <massi@ximian.com>
11354 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
11355 checking that only methods with matching qname or fqname are picked
11356 from implemented interfaces.
11358 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
11360 * verify.c (do_newarr):added, do type verification of
11361 newarr ops, push the right value on the eval stack.
11362 * verify.c (mono_method_verify): use do_newarr
11365 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
11367 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
11368 factored the common code into get_boxable_mono_type, which
11369 is now using mono_type_get_full, this fixed byref related tests.
11371 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
11373 * class.c: added mono_type_get_full, this function has the same
11374 behavior of mono_class_get_full but the returned MonoType has
11375 all metadata of the associated token in case of a typespec token.
11376 * class.c: added mono_type_retrieve_from_typespec, used by
11377 mono_type_get_full to retrieve the token type.
11378 * class.c (mono_class_create_from_typespec): changed to use
11379 mono_type_retrieve_from_typespec.
11380 * class.c (mono_ldtoken): changed to use mono_type_get_full
11381 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
11382 * class-internals.h: exported mono_type_get_full for internal use.
11384 2007-08-16 Jb Evain <jbevain@novell.com>
11386 * domain.c (supported_runtimes): add entry for
11387 the 'moonlight' runtime version.
11389 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
11391 * verify.c (mono_method_verify): small typo sliped in.
11393 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
11395 * verify.c (do_unbox_value): added, do type verification of
11397 * verify.c (mono_method_verify): use do_unbox_value
11400 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
11402 * verify.c (dump_stack_value): fixed typo, was printing string
11403 instead of object on stack.
11404 * verify.c (do_box_value): moved the byref check up as it leads
11405 to invalid code and should be done earlier.
11406 * verify.c: improved error messages for and ldobj
11408 2007-08-15 William Holmes <billholmes54@gmail.com>
11410 * marshal.c (emit_marshal_custom): Omit the call to
11411 marshal_native_to_managed when calling native to managed
11412 and the argument is specified as an out argument.
11414 Code is contributed under MIT/X11 license.
11416 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
11418 * verify.c: fixed the type checks for generics, function pointers and vectors.
11419 Added type verification for ldobj and ldtoken. The verifier
11420 would segfault if header or signature of a method contained references
11421 to non-existant types.
11423 2007-08-15 Jonathan Chambers <joncham@gmail.com>
11425 * marshal.c (cominterop_get_ccw): Patch from
11426 Bill Holmes to no walk up interface hierarchy.
11427 All parent methods should be present in the interface for COM.
11429 Code is contributed under MIT/X11 license.
11431 2007-08-15 Jonathan Chambers <joncham@gmail.com>
11433 * marshal.c (emit_marshal_com_interface): Patch from
11434 Bill Holmes to handle COM Interfaces as return values
11435 for native->managed calls.
11437 Code is contributed under MIT/X11 license.
11439 2007-08-14 Jonathan Chambers <joncham@gmail.com>
11441 * marshal.c (cominterop_get_idispatch_for_object): Implement
11442 for runtime callable wrappers.
11444 Code is contributed under MIT/X11 license.
11446 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
11448 * pedump.c (main): changed from mono_init to mono_init_from_assembly
11449 so 2.0 types are accessible
11452 2007-08-13 Miguel de Icaza <miguel@novell.com>
11454 * domain.c (mono_init_internal): Call mono_assembly_load_friends
11455 once we load mscorlib. Due to the order in which we initialize,
11456 the mono_assembly_load_full routine that loads mscorlib did not
11457 load friends. We now load it once we load the
11458 mono_defaults.internals_visible_class class.
11460 * assembly.c: Expose the mono_load_friend_assemblies method.
11462 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
11464 * verify.c: improved the handling of boxing, better
11465 type checking for unary ops and conversion. Fix bug
11466 regarding managed pointer compatibility checking
11468 2007-08-11 Zoltan Varga <vargaz@gmail.com>
11470 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
11472 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
11474 2007-08-09 Raja R Harinath <rharinath@novell.com>
11476 * reflection.c (dup_type): Remove.
11477 * class.c (dup_type): Remove.
11478 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
11479 instead of the dodgy 'dup_type'.
11480 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
11481 handle the case where 'dup_type' needed the second argument.
11483 2007-08-08 Zoltan Varga <vargaz@gmail.com>
11485 * domain.c: Fix a warning.
11487 2007-08-08 Massimiliano Mantione <massi@ximian.com>
11489 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
11490 checking that methods with the same fqname are not overridden
11491 with a method from an ancestor.
11493 2007-08-07 Zoltan Varga <vargaz@gmail.com>
11495 * threads.c (free_thread_static_data_helper): Avoid a crash if
11496 thread->static_data is not yet set.
11498 2007-08-07 Jonathan Chambers <joncham@gmail.com>
11500 * marshal.c: Use correct image when emitting
11501 native wrapper for COM calls.
11503 Code is contributed under MIT/X11 license.
11505 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
11507 * icall-def.h, security.c, security.h :
11508 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
11510 2007-08-07 Martin Baulig <martin@ximian.com>
11512 * mono-debug-debugger.h
11513 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
11515 * domain.c (mono_domain_free): Call
11516 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
11518 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
11520 * verify.c (check_underflow, check_overflow): error message now returns IL offset
11521 * verify.c (in_same_block): code should test if either offset is inside the clauses
11522 * verify.c (mono_method_verify): push the exception into the eval stack of exception
11525 2007-08-03 Zoltan Varga <vargaz@gmail.com>
11527 * image.c (mono_image_close): Fix a leak.
11529 * object.c (mono_runtime_invoke_array): Avoid using alloca.
11531 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
11533 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11535 * domain.c, threads.c, threads-types.h: fix memory retention issue
11536 with thread static variables not being cleared on domain unload.
11537 Reuse thread static slots after domain unload.
11539 2007-08-03 Zoltan Varga <vargaz@gmail.com>
11541 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
11544 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
11545 now done in mono_runtime_invoke_array.
11547 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
11548 receiver is a nullable type.
11550 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
11553 2007-08-03 Jonathan Chambers <joncham@gmail.com>
11555 * marshal.c: Implement COM Objects as return type for
11556 managed->unmanaged calls. Added Release calls for COM Object
11557 out/return values in managed->unmanaged calls.
11559 Code is contributed under MIT/X11 license.
11561 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
11563 * threads.h, threads-type.h: move the hazard pointer declarations
11564 to the private header.
11566 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11568 * file-io.c, appdomain.c: memory leak fixes.
11570 2007-08-02 Dick Porter <dick@ximian.com>
11573 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
11574 SO_REUSEADDR setting into io-layer/sockets.c.
11576 2007-08-01 Zoltan Varga <vargaz@gmail.com>
11578 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
11579 from Object when called on a generic parameter. Fixes #82211.
11581 2007-08-01 Dick Porter <dick@ximian.com>
11583 * file-io.c (convert_share): Test FileShare values bit-by-bit.
11584 Fixes bug 79250 yet again.
11586 2007-07-30 Martin Baulig <martin@ximian.com>
11588 Merged the `debugger-dublin' branch.
11591 (MonoDebugDataTable): New typedef.
11592 (MonoDebugMethodAddressList): New typedef.
11593 (MonoDebugWrapperData): Removed.
11594 (MonoDebugSymbolTable): Removed `current_data_table',
11595 `current_data_table_size', `current_data_table_offset'.
11596 (MonoDebugDataItemType): Moved into mono-debug.c.
11597 (MonoDebugMethodJitInfo): Remove `address'.
11598 (mono_debug_data_table): New global variable.
11599 (mono_debug_lookup_method_addresses): New public function.
11600 (mono_debug_find_method): Take a `MonoMethod *', not a
11601 `MonoDebugMethodInfo *'.
11603 * mono-debug.c: Drop support for the old symbol tables.
11605 2007-06-28 Martin Baulig <martin@ximian.com>
11607 * mono-debug.c (mono_debug_debugger_version): New public variable.
11609 2007-07-31 William Holmes <billholmes54@gmail.com>
11611 * metadata.c Changed mono_type_create_from_typespec to not insert
11612 the type into the hash map until after
11613 do_mono_metadata_parse_type has completed.
11615 Code is contributed under MIT/X11 license.
11617 2007-07-31 Zoltan Varga <vargaz@gmail.com>
11619 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
11620 generic parameter. Fixes #82211.
11622 2007-07-27 Jb Evain <jbevain@novell.com>
11624 * pedump.c (dump_metadata, dump_metadata_header): dump
11625 versions contained in the metadata header.
11627 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11629 * threads.c: register small_id_table with the GC.
11631 2007-07-27 Mark Probst <mark.probst@gmail.com>
11633 * threads.c, threads.h, class-internals.h, object-internals.h:
11634 Hazard pointers, to be used by lock-free parallel algorithms.
11636 2007-07-26 Dick Porter <dick@ximian.com>
11638 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
11639 routine on non-windows platforms, as I've not managed to think of
11640 a non-kludgy way of doing this. Finishes off bug 78739.
11642 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
11644 * object.c: properly setup interface_bitmap in proxy vtables.
11646 2007-07-25 Marek Habersack <mhabersack@novell.com>
11648 * appdomain.c (get_shadow_assembly_location): do not use TickCount
11649 to create unique shadow copy target directories, use the domain's
11650 serial number instead. Each domain gets a unique target directory
11653 * domain.c (mono_domain_create): added code to increment domain
11654 shadow copy serial number and cache the value in the current
11657 * domain-internals.h (struct _MonoDomain): added a new field -
11658 shadow_serial to hold the serial number used in generation of
11659 shadow-copy directories. This is to make sure that the directory
11660 name is unique for each and every domain created. We avoid a race
11661 condition with overriding assemblies already in use by other app
11664 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
11666 * class.c (mono_bounded_array_class_get): fixed memory leak when
11667 binding generic parameters.
11669 2007-07-24 Raja R Harinath <rharinath@novell.com>
11671 * metadata.c (do_mono_metadata_parse_generic_class): Use
11672 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
11675 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11677 * loader.c, class-internals.h, reflection.c: removed the per-method
11678 generics hashtable: we use the global one through the call of
11679 mono_class_inflate_generic_method ().
11681 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
11683 * class.c, metadata.c, class-internals.h: introduce yet another
11684 generics global cache for inflated methods (fixes 98% of the perf
11685 issue in bug #81806).
11687 2007-07-23 Raja R Harinath <rharinath@novell.com>
11689 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
11690 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
11691 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
11692 return a MonoGenericInst containing (a copy) of those types.
11693 (mono_metadata_inflate_generic_inst): Update to changes.
11694 (mono_metadata_parse_generic_inst): Likewise.
11695 (mono_get_shared_generic_inst): Likewise.
11696 * reflection.c (mono_class_bind_generic_parameters): Likewise.
11697 (mono_reflection_bind_generic_method_parameters): Likewise.
11698 * metadata-internals.h: Likewise.
11699 * icall.c (free_generic_context): Kill.
11700 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
11702 * reflection.c (reflection_methodbuilder_to_mono_method): Use
11703 mono_metadata_type_dup.
11704 * marshal.c (mono_mb_create_method): Likewise.
11706 * metadata.c (mono_metadata_type_dup): Rename from
11707 mono_metadata_type_dup_mp. Take an optional mempool instead of a
11708 MonoImage. Handle a few more cases, esp. when no mempool is given.
11709 * marshal.c, metadata-internals.h: Update to changes.
11711 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11713 * class.c: fixed a small leak for array classes and removed warning.
11715 2007-07-22 Zoltan Varga <vargaz@gmail.com>
11717 * loader.c (mono_method_get_param_token): Make this work on generic methods.
11718 Return 0x8000000 for return parameters. Fixes #82161.
11720 2007-07-21 Marek Habersack <grendello@gmail.com>
11722 * appdomain.c (get_shadow_assembly_location): append the current
11723 ticks value to the path. Avoids overwriting the same assemblies by
11724 several threads at the same time.
11726 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
11727 and Raja R Harinath <rharinath@novell.com>
11729 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
11731 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
11732 property for testing if a method is a generic method definition.
11734 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
11736 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
11738 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11740 * verify.c: used function from private branch, reverted to the one in class.h
11742 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11744 * verify.c: a typo slipped in and the code wont compile
11746 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11748 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
11749 disabled box instruction as it is doing the wrong thing
11750 improved stack dump messages, now it is easier to debug type related issues
11753 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
11755 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
11757 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11759 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
11760 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
11761 grouped with class and valuetype. This change will simply
11762 the code as it should be handled just like unmanaged pointers.
11764 2007-07-19 Mark Probst <mark.probst@gmail.com>
11766 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
11768 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11770 * verify.c: several stack merge issues fixed, reference comparisons now
11771 check the type size. strict type check now works correctly.
11772 added more uses of IS_MANAGED_POINTER macro.
11773 fixed issues pointed by running the test suite against .net.
11776 2007-07-19 Mark Probst <mark.probst@gmail.com>
11778 * class.c, loader.c, class-internals.h: Removed the
11779 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
11782 * icall.c: Better error checking in some internal reflection
11785 2007-07-18 William Holmes <billholmes54@gmail.com>
11787 * filewatcher.c : removed unused variable 'filename' in
11788 ves_icall_System_IO_FSW_SupportsFSW
11790 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11792 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
11795 2007-07-15 Zoltan Varga <vargaz@gmail.com>
11797 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
11799 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
11801 2007-07-14 Zoltan Varga <vargaz@gmail.com>
11803 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
11804 Implement generics support.
11805 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
11807 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
11808 type_args and method_args arguments.
11809 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
11810 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
11811 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
11813 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
11815 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
11816 It adds a rootimage parameter to mono_reflection_get_type_internal,
11817 adds new function mono_reflection_get_type_with_rootimage and use
11818 the rootimage to resolve the types instead of the current image
11820 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
11822 * culture-info-table.h: Forgot to update after r78304.
11824 2007-07-13 Raja R Harinath <rharinath@novell.com>
11826 * class.c (mono_class_is_open_constructed_type)
11827 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
11829 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
11831 * class.c (mono_bounded_array_class_get): method fails if used with
11832 an incomplete TypeBuilder enum (no basetype field), fixed it by
11833 avoiding calculating the size for such array as it cannot be instantiated.
11836 2007-07-12 Raja R Harinath <rharinath@novell.com>
11838 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
11840 * metadata.c, reflection.c: Update to changes.
11842 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
11844 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
11845 mono_class_is_valid_enum, they are used to valide a enum when loading.
11846 * reflection.c: used new functions to throw TypeLoadException when and
11847 invalid enum is build with TypeBuilder. Fixes #82018
11849 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11851 * object.c: forgot commit of mono_class_setup_methods () to access
11853 * object-internals.h: added a few more handy fields to
11856 2007-07-11 Zoltan Varga <vargaz@gmail.com>
11858 * object.c (build_imt): Call mono_class_setup_methods () before accessing
11861 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11863 * class-internals.h, object-internals.h, object.c: IMT-based
11864 interface invocation core from Massimiliano Mantione
11865 (massi@ximian.com) with a reworked arch-specific interface,
11866 bsearch implementation and a few bugfixes and memory savings by me.
11868 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
11870 * class.c (mono_class_create_from_typedef): mono would segfault if
11871 an enum did not have a __value field. It now throws a TypeLoadException
11872 for such cases. Fix bug #82022
11874 2007-07-10 Zoltan Varga <vargaz@gmail.com>
11876 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
11878 2007-07-09 Mark Probst <mark.probst@gmail.com>
11880 * class.c (mono_class_init): If a class is already inited but has
11881 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
11883 2007-07-09 Mark Probst <mark.probst@gmail.com>
11885 * class.c: Properly handle the case of an unimplemented interface
11886 method. Fixes: 81673.
11888 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11890 * class-internals.h, object.c: cleanup patch from massi: use
11891 MonoVTable->interface_bitmap since the vtable interfaces offset array
11894 2007-07-10 Zoltan Varga <vargaz@gmail.com>
11896 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
11897 GetMDStreamVersion icall instead.
11899 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
11901 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
11902 not use mono_dl_build_path() with a full library name: makes
11903 fallbacks to libgaim and libfam work.
11905 2007-07-06 William Holmes <billholmes54@gmail.com>
11907 * assembly.c: Added a continue statement in probe_for_partial_name when
11908 parse_assembly_directory_name fails. Fixes : 82002
11910 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
11912 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
11913 and added a verification for TYPEDBYREF.
11914 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
11915 make native int interchangeable with int32 and some small cleanup and formating.
11916 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
11917 handle byref of byref.
11918 * verify.c (push_local): handle byref of byref.
11919 * verify.c (do_binop): invalid mix of values is unverifiable
11920 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
11921 added visibility checks
11922 * verify.c (field related method): added visibility checks
11923 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
11925 2007-07-06 Zoltan Varga <vargaz@gmail.com>
11927 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
11930 2007-07-05 Zoltan Varga <vargaz@gmail.com>
11932 * profiler.c (mono_profiler_load): Fix an off-by-one error.
11934 * marshal.c (emit_marshal_string): When returning a string from managed code,
11935 allways make a copy even for unicode strings. Fixes #81990.
11937 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
11939 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
11940 of byref generic inst types (bug #81997).
11942 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
11944 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
11945 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
11947 2007-07-02 Zoltan Varga <vargaz@gmail.com>
11949 * marshal.c (emit_marshal_string): Add support for unicode strings in
11950 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
11952 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
11954 * verify.c: field load/store are now verified, missing only access checks now
11956 2007-06-28 Martin Baulig <martin@ximian.com>
11958 * mono-debug.c (mono_debug_debugger_version): New public variable.
11960 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
11962 * locales.c: When constructing DateTimeFormat or NumberFormat for
11963 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
11964 MonoCultureInfo contructed from the current locale is always
11965 read-only and has UseUserOverride set to true. All MonoCultureInfo
11966 instances returned for GetCultures have both IsReadOnly and
11967 UseUserOverride set to true. Fixes part of bug #81930.
11969 2007-06-22 Jonathan Chambers <joncham@gmail.com>
11971 * icall-def.h: Update System.__ComObject icalls
11972 * marshal.c: Avoid managed transition (and object creation)
11973 when looking up COM interface in RCW.
11974 * marshal.h: Ditto.
11976 Code is contributed under MIT/X11 license.
11978 2007-06-22 Zoltan Varga <vargaz@gmail.com>
11980 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
11981 to avoid crashes during assembly unloading.
11983 2007-06-22 Raja R Harinath <rharinath@novell.com>
11985 Fix MethodInfo.IsGenericMethodDefinition
11986 * reflection.c (mono_reflection_bind_generic_method_parameters):
11987 Rearrange code to ensure we always uses a generic method definition.
11988 * class.c (mono_class_inflate_generic_method_full): Set
11989 'generic_container' field only for generic method definitions.
11990 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
11991 Use presense of 'generic_container' field as indication of being a
11992 generic method definition.
11994 2007-06-21 Zoltan Varga <vargaz@gmail.com>
11996 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11998 * object-internals.h: Reflect changes in the layout of the managed Delegate
12001 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
12002 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
12003 runtime memory used by the dynamic method. Fixes #77146.
12005 2007-06-21 Dick Porter <dick@ximian.com>
12008 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
12009 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
12012 2007-06-21 Raja R Harinath <rharinath@novell.com>
12014 * reflection.c (method_encode_methodspec): Add a tripwire.
12015 * class.c (inflate_generic_type): The fully open generic type is
12016 not the same as the generic type definition.
12018 2007-06-21 Martin Baulig <martin@ximian.com>
12020 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
12022 * mono-debug-debugger.h
12023 (MonoDebuggerBreakpointInfo): Removed.
12024 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
12025 (mono_debugger_remove_breakpoint): Likewise.
12026 (mono_debugger_breakpoint_callback): Likewise.
12027 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
12029 2007-06-21 Raja R Harinath <rharinath@novell.com>
12031 * metadata.c (mono_metadata_lookup_generic_class): The fully open
12032 generic type is not the same as the generic type definition.
12033 * class.c (mono_generic_class_get_class): Likewise.
12035 2007-06-20 Geoff Norton <gnorton@customerdna.com>
12037 * icall.c: The second argument to
12038 System.Reflection.MethodBase.GetMethodFromHandleInternalType
12039 is a MonoType not a MonoClass.
12041 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12043 * verify.c: support for function pointers in the verifier
12045 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12047 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
12049 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
12051 * assembly.c: removed Mono.Data.SqliteClient from the list of
12052 forward-compatible assemblies as it breaks the ABI (bug #81899).
12054 2007-06-19 Raja R Harinath <rharinath@novell.com>
12056 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
12057 lookup/update with the loader lock.
12058 * reflection.c (mono_class_bind_generic_parameters): No need to
12059 protect mono_metadata_lookup_* with the loader lock.
12060 * class.c (inflate_generic_type): Likewise.
12062 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
12063 on a generic instantiated type.
12065 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
12067 *verify.c: produce meanfull error messages on verification error
12068 *verify.c: fixed some cases of verification errors reported as validation errors
12069 *pedump.c: fixed the error name array, now it shows validation errors properly
12070 *verify.h: fixed the contant that should be used for verification errors
12072 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12074 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
12075 for bug #77596, 81858 and 80743 (generics data structures on domain
12078 2007-06-15 Raja R Harinath <rharinath@novell.com>
12080 Avoid allocating 'MonoGenericContext' on the heap.
12081 * class-internals (_MonoMethodInflated::context): Make field
12082 inline, not a pointer.
12083 * loader.c (method_from_methodspec): Allocate 'new_context' on the
12084 stack. Use the context embedded within the inflated method as the
12085 hash key, rather than 'new_context'.
12086 * class.c (inflate_generic_context): Simplify. Return a struct
12087 rather than allocating on the heap.
12088 (mono_class_inflate_generic_method_full): Update to changes. Now,
12089 doesn't salt away a copy of the context -- simplifying the
12090 lifetime rules of a 'MonoGenericContext *'.
12091 (mono_method_get_context): Return pointer to embedded context.
12092 (setup_generic_array_ifaces): Allocate temporary context on stack.
12093 * reflection.c (inflate_mono_method): Likewise.
12094 (mono_reflection_bind_generic_method_parameters): Likewise.
12095 Use the context embedded within the inflated method as the hash key.
12097 Avoid a source of allocation of 'MonoGenericContext'.
12098 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
12099 and 'cached_context' fields into embedded 'MonoGenericContext' field.
12100 * class.c: Update to changes.
12101 (mono_generic_class_get_context): Simplify drastically. Now just
12102 returns a pointer to the field.
12103 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
12104 argument as a const pointer.
12105 (mono_metadata_generic_context_equal): Likewise.
12106 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
12109 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
12111 * verify.c improved the handling of brtrue/brfalse, factored out common code
12113 2007-06-14 Raja R Harinath <rharinath@novell.com>
12115 Kill MonoGenericMethod.
12116 * class-internals.h (MonoGenericContext::method_inst): Rename from
12117 'gmethod' and convert to a MonoGenericInst.
12118 (MonoGenericMethod): Remove.
12119 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
12120 * loader.c (method_from_methodspec): Update to changes. Use a
12121 MonoGenericContext as the key to the hashtable.
12122 * metadata.c (mono_metadata_generic_context_equal): Rename from
12123 'mono_metadata_generic_method_equal' and take MonoGenericContext.
12124 (mono_metadata_generic_context_hash): Likewise from
12125 'mono_metadata_generic_method_hash'. Change hash function.
12126 (mono_metadata_load_generic_params): Update to changes.
12127 (mono_get_shared_generic_method): Remove.
12128 * metadata-internals.h (mono_get_shared_generic_method): Remove.
12129 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
12130 (inflate_generic_context): Likewise.
12131 (mono_class_inflate_generic_method_full): Likewise.
12132 (setup_generic_array_ifaces): Likewise.
12133 (mono_class_create_from_typespec): Likewise.
12134 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
12135 (method_encode_methodspec): Update callsite.
12136 (reflection_methodbuilder_to_mono_method): Update to changes.
12137 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
12138 MonoGenericContext as the key to the hashtable.
12139 (inflate_mono_method): Update to changes.
12141 * class-internals.h (MonoGenericMethod::container): Remove.
12142 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
12144 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
12146 * profiler-private.h, profiler.c, profiler.h: added API to profile
12149 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
12151 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
12153 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
12155 * verify.c: method invocation is now validated, now we verify parameter types on stack.
12156 Fixed overflow and underflow not aborting the verification process.
12158 2007-06-13 Mark Probst <mark.probst@gmail.com>
12160 * class-internals.h (MonoStats): Added stats entries for dynamic
12163 2007-06-12 Zoltan Varga <vargaz@gmail.com>
12165 * loader.c (mono_free_method): Free header->locals and header->clauses.
12167 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
12170 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
12172 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
12174 2007-06-12 Raja R Harinath <rharinath@novell.com>
12176 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
12179 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
12181 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
12183 2007-06-11 Raja R Harinath <harinath@gmail.com>
12185 MonoGenericMethod on a diet
12186 * class-internals.h (_MonoMethodInflated::reflection_info): Move
12188 (_MonoGenericMethod::reflection_info): ... from here.
12189 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
12191 * reflection.c (inflate_mono_method): Likewise.
12192 (mono_reflection_bind_generic_method_parameters): Likewise.
12194 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
12196 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
12197 *verify.c: factored long ldarg forms to share code with short forms
12199 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
12201 *verify.c: fixed code formating factored some duplicate code
12202 into a new function
12204 *verify.h: fixed binary incompatibility introduced earlier
12206 *pedump.c: fixed formating
12208 2007-06-11 Raja R Harinath <harinath@gmail.com>
12210 Fix assertion when disassembling Mono.C5.dll
12211 * loader.c (method_from_methodspec): Avoid inflating a method
12212 twice with the same context. If the methodref is inflated, use
12213 the declaring method instead.
12215 * class.c (mono_class_from_generic_parameter): Fix case similar to
12216 bug #81830 handled below, but for method containers.
12218 2007-06-10 Raja R Harinath <harinath@gmail.com>
12220 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
12221 get_shared_generic_class. Directly inflate the instance.
12222 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
12223 (inflate_generic_class): Delete.
12224 (get_shared_generic_class): Delete. Move setting of
12225 'cached_class' and 'cached_context' ...
12226 * metadata.c (mono_metadata_lookup_generic_class): ... here.
12228 * metadata.c (mono_metadata_lookup_generic_class): Change
12229 signature to take the components of a MonoGenericClass rather than
12230 an allocated MonoGenericClass. Change semantics to be intern-like.
12231 * reflection.c (mono_class_bind_generic_parameters): Update to
12232 changes. Make locking region tighter.
12233 * class.c (inflate_generic_class): Update to changes.
12234 (get_shared_generic_class): Likewise.
12235 * metadata-internals.h: Likewise.
12237 * reflection.c (mono_class_bind_generic_parameters): Take and
12238 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
12239 (mono_reflection_bind_generic_parameters): Use
12240 'mono_class_bind_generic_parameters' rather than duplicate the code.
12241 * class.c (mono_bounded_array_class_get): Update to changes.
12242 * object-internals.h: Likewise.
12244 * reflection.c (mono_class_bind_generic_parameters): Only support
12245 parameterizing generic type definitions. Remove support for other
12248 2007-06-08 Zoltan Varga <vargaz@gmail.com>
12250 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
12252 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
12253 in the dynamic case.
12255 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
12257 * threads.c: When cleaning up thread, reset the Background bit.
12260 2007-06-08 Jonathan Chambers <joncham@gmail.com>
12262 * metadata.c: Move variable declarations to top of scope.
12263 * verify.c: Move variable declarations to top of scope.
12265 Code is contributed under MIT/X11 license.
12267 2007-06-08 Raja R Harinath <rharinath@novell.com>
12269 * reflection.c (mono_class_bind_generic_parameters): Replace
12270 open-coded loop with mono_metadata_inflate_generic_inst.
12272 * class.c (get_shared_generic_class): Don't call
12273 mono_get_shared_generic_inst. Use the container's own
12276 * metadata.c (mono_metadata_load_generic_params): Move
12277 initialization of 'context' field here from ...
12278 * class.c (mono_class_create_from_typedef): ... here, and ...
12279 * loader.c (mono_get_method_from_token): ... here.
12281 * class.c (get_shared_generic_class): Rename from
12282 mono_get_shared_generic_class and make static.
12283 (mono_get_shared_generic_inst): Move to metadata.c.
12284 * loader.c (mono_get_shared_generic_method): Likewise.
12285 * class-internals.h, metadata-internals.h: Update to changes.
12288 * class.c (mono_class_from_generic_parameter): Don't assume a
12289 generic container owner exists. Generic containers from monodis
12292 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
12294 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
12295 * verify.h: new typedefs to returns the non-verifiable status
12296 * verify.c: initial implementation of generics, stack merging and object compatibility check
12298 2007-06-06 Mark Probst <mark.probst@gmail.com>
12300 * class.c, image.c, class-internals.h (MonoImage): class_cache is
12301 a MonoInternalHashTable again (fixed bug in internal hash table
12304 2007-06-06 Mark Probst <mark.probst@gmail.com>
12306 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12307 MonoInternalHashTable again (fixed bug in internal hash table
12310 2007-06-06 Mark Probst <mark.probst@gmail.com>
12312 * class.c, image.c, class-internals.h, domain.c,
12313 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
12314 changes. Have to figure out what makes them break the SWF
12317 2007-06-04 Mark Probst <mark.probst@gmail.com>
12319 * class.c, image.c, class-internals.h (MonoImage): class_cache is
12320 a MonoInternalHashTable now.
12322 2007-06-04 Mark Probst <mark.probst@gmail.com>
12324 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12325 MonoInternalHashTable now.
12327 2007-05-31 Zoltan Varga <vargaz@gmail.com>
12329 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
12332 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
12334 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
12335 dependent trampoline.
12337 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12339 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
12341 2007-05-29 Robert Jordan <robertj@gmx.net>
12343 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
12345 2007-05-28 Zoltan Varga <vargaz@gmail.com>
12347 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
12349 2007-05-25 Jonathan Chambers <joncham@gmail.com>
12351 * marshal.c: Fix interface lookup loops for
12352 cominterop_get_com_slot_for_method and
12353 cominterop_get_method_interface. Only need to lookup
12354 if type is a class, else use interface type method is on.
12356 Code is contributed under MIT/X11 license.
12358 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
12360 * reflection.c: HasSecurity can be present even if no specially
12361 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
12362 SecurityAttribute). Fix CAS regression tests on buildbot.
12364 2007-05-24 Jonathan Chambers <joncham@gmail.com>
12366 * appdomain.c: Add configure checks for header files.
12367 * image.c: Add configure checks for header files.
12368 * file-io.c: Add configure checks for header files.
12369 * debug-mono-symfile.c: Add configure checks for header files.
12370 * threadpool.c: Add configure checks for header files.
12371 * console-io.c: Add configure checks for header files.
12372 * profiler.c: Add configure checks for header files.
12373 * rawbuffer.c: Add configure checks for header files.
12374 * icall.c: Add configure checks for header files.
12375 * rand.c: Add configure checks for header files.
12376 * socket-io.c: Add configure checks for header files.
12378 Code is contributed under MIT/X11 license.
12380 2007-05-24 Zoltan Varga <vargaz@gmail.com>
12382 * reflection.c (mono_custom_attrs_from_builders): Remove the
12383 assertion as it breaks the build.
12385 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
12387 * reflection.c (lookup_custom_attr): Make a copy here too.
12389 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
12392 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
12395 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
12398 2007-05-22 Zoltan Varga <vargaz@gmail.com>
12400 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
12401 (load_cattr_value): Ditto.
12403 2007-05-20 Zoltan Varga <vargaz@gmail.com>
12405 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
12407 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
12409 * threads.c: In "start_wrapper", set apartment_state to MTA if
12410 apartment_state is Unknown and we're running on 2.0 profile or
12412 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
12413 to main method, then set apartment_state to Unknown on 1.0 profile,
12414 and MTA on 2.0 profile.
12416 2007-05-16 Jb Evain <jb@nurv.fr>
12418 * class-internals.h (MonoDefaults): Add an attribute_class and
12419 customattribute_data_class.
12420 * domain.c (mono_init_internal): Populate them.
12421 * reflection.c: Use them to remove duplicates. Make a vew
12422 MonoClass variables `static'.
12424 2007-05-15 Massimiliano Mantione <massi@ximian.com>
12426 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
12427 step in implementing IMT, so that all isinst checks now can go
12428 through the bitmap.
12429 This was needed because vtables for TransparentProxy need to look
12430 like the vtable of the "target" class, so they need to point to
12431 its interface bitmap directly.
12433 * object.c: inside "mono_class_create_runtime_vtable" and
12434 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
12436 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
12438 * object-internals.h
12439 culture-info.h : added territory field in MonoCulture and
12440 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
12441 * locales.c : fill territory field above too.
12442 * culture-info-table.h : regenerated.
12444 2007-05-12 Zoltan Varga <vargaz@gmail.com>
12446 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
12449 2007-05-11 Jonathan Chambers <joncham@gmail.com>
12451 * object.c: Always initialize apartment, even if
12452 there is no custom attributes on entry point.
12454 Code is contributed under MIT/X11 license.
12456 2007-05-10 Jonathan Chambers <joncham@gmail.com>
12458 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
12459 * metadata.c: If no encoding is set, check for unicode
12462 Code is contributed under MIT/X11 license.
12464 2007-05-09 Jonathan Chambers <joncham@gmail.com>
12466 * threads.c: Handle if mono_thread_current returns NULL
12468 Code is contributed under MIT/X11 license.
12470 2007-05-09 Jonathan Chambers <joncham@gmail.com>
12472 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
12473 in start_wrapper. Added mono_thread_init_apartment_state and
12474 mono_thread_cleanup_apartment_state.
12475 * object.c: Initialize thread apartment state on main thread
12476 by checking for STAThreadAttribute on entry point.
12477 * object-internals.h: Add apartment_state field to MonoThread.
12478 * threads-types.h: Add unmanaged definition of
12479 System.Threading.ApartmentState, MonoThreadApartmentState.
12481 Code is contributed under MIT/X11 license.
12483 2007-05-08 Jonathan Chambers <joncham@gmail.com>
12485 * class.c: Fix windows build.
12486 * class-internals.h: Fix windows build.
12488 Code is contributed under MIT/X11 license.
12490 2007-05-08 Robert Jordan <robertj@gmx.net>
12492 * process.c (CreateProcess_internal):
12493 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
12494 .CreateNoWindow was specified. Fixes #81496.
12496 2007-05-08 Massimiliano Mantione <massi@ximian.com>
12498 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
12499 step in implementing IMT, replaced it with two compact arrays
12500 (interfaces_packed and interface_offsets_packed) and a bitmap that
12501 is used for isinst checks (interface_bitmap).
12503 * class.c: (compare_interface_ids): compare function to pass to
12504 bsearch when looking for an interface with a given id.
12505 (mono_class_interface_offset): reimplemented using bsearch on
12506 interfaces_packed, getting the offset from interface_offsets_packed.
12507 (print_implemented_interfaces): utility debugging function.
12508 (setup_interface_offsets): reworked to initialize interfaces_packed,
12509 interface_offsets_packed and interface_bitmap.
12511 * object.c: replaced all accesses to "MonoClass.interface_offsets"
12512 with uses of interfaces_packed and interface_offsets_packed.
12514 2007-05-08 Massimiliano Mantione <massi@ximian.com>
12516 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
12517 mono_class_interface_offset prototype to wrap all accesses to
12518 "MonoClass.interface_offsets".
12520 * class.c: Implemented mono_class_interface_offset, and wrapped all
12521 accesses to "MonoClass.interface_offsets".
12523 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
12524 "MonoClass.interface_offsets".
12526 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
12528 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
12529 GetMethodFromHandle overloads (bug #78637).
12531 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12533 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
12534 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
12536 2007-05-01 Zoltan Varga <vargaz@gmail.com>
12538 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
12541 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
12543 (mono_custom_attrs_from_index): Ditto.
12545 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
12548 2007-04-30 Zoltan Varga <vargaz@gmail.com>
12550 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
12551 is now allocated from a mempool.
12553 2007-04-28 Zoltan Varga <vargaz@gmail.com>
12555 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
12556 caller holds threads_lock, leading to deadlocks. Fixes #81476.
12558 2007-04-26 Zoltan Varga <vargaz@gmail.com>
12560 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
12561 mono_loader_clear_error () too late. Fixes #81463.
12563 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
12565 * culture-info-table.h : regenerated.
12567 2007-04-25 Zoltan Varga <vargaz@gmail.com>
12569 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
12572 2007-04-25 Dick Porter <dick@ximian.com>
12574 * Makefile.am: Put the mingw enforced-optimisation back into the
12575 PLATFORM_WIN32 section.
12577 2007-04-24 Zoltan Varga <vargaz@gmail.com>
12579 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
12582 * image.c (mono_image_load_module): New API function to load a module reference.
12584 * image.c (load_modules): Load modules lazily. Fixes #80812.
12586 * class.c (mono_class_from_typeref): Use mono_image_load_module.
12588 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
12590 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
12591 to mono_image_load_module_dynamic.
12593 2007-04-23 Jonathan Chambers <joncham@gmail.com>
12595 * marshal.c: Fix calling convention for CCW on non-windows
12596 platforms. STDCALL on windows, CDECL everywhere else to work
12597 with XPCOM and MainWin COM.
12599 Code is contributed under MIT/X11 license.
12601 2007-04-23 Martin Baulig <martin@ximian.com>
12606 (method_from_memberref): Added `gboolean *used_context' argument.
12607 (mono_get_method_from_token): Likewise.
12608 (mono_get_method_full): Don't insert the method in the cache when
12609 `used_context' is true.
12611 2007-04-23 Raja R Harinath <rharinath@novell.com>
12613 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
12615 * reflection.c (mono_reflection_bind_generic_parameters): Don't
12616 create new MonoTypes for returned types.
12617 * class.c (mono_generic_class_get_class): Export mono-internal.
12618 * class-internals.h: Update to changes.
12620 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
12622 * threadpool.c, threadpool.h, icall-def.h: patch from
12623 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
12625 2007-04-18 Zoltan Varga <vargaz@gmail.com>
12627 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
12629 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
12631 * threads.c (mono_thread_get_stack_bounds): New helper function.
12633 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
12634 Correctly compute stack bounds when attaching. Fixes #81394.
12636 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
12638 * reflection.c: fix handling of doubles in custom attributes
12639 for the arm-fpa format (bug #81368).
12641 2007-04-18 Raja R Harinath <rharinath@novell.com>
12643 * reflection.c (assembly_add_win32_resources): Mildly relax an
12644 bounds check to let the end pointer point just past the end of the
12645 allocated buffer. (may fix #81384)
12647 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
12649 * culture-info-table.h : regenerated.
12651 2007-04-07 Zoltan Varga <vargaz@gmail.com>
12653 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
12654 the thread is aborted early.
12656 2007-04-05 Dick Porter <dick@ximian.com>
12658 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
12659 FindFirstFile()/FindNextFile() to find entries. This lets the
12660 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
12663 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
12665 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
12667 2007-04-04 Martin Baulig <martin@ximian.com>
12670 (mono_method_desc_full_match): Add support for nested classes.
12672 2007-04-02 Zoltan Varga <vargaz@gmail.com>
12674 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
12676 2007-04-01 Zoltan Varga <vargaz@gmail.com>
12678 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
12679 waiting for too many threads.
12681 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
12683 * environment.c: Fix return value check on uname so we can get the
12684 executing version on Solaris operating systems.
12686 2007-03-28 Jb Evain <jbevain@gmail.com>
12688 * class.c (mono_type_get_name_recurse): Complete the
12689 fix for the creation of assembly qualified names for
12690 pointer types. Fixes #81208.
12692 2007-03-27 Dick Porter <dick@ximian.com>
12694 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
12695 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
12699 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
12700 the value of ReleaseMutex().
12702 2007-03-27 Dick Porter <dick@ximian.com>
12704 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
12705 in little-endian order, not network endian, so must be converted
12706 to host endian here. Fixes bug 80593.
12708 2007-03-22 Jb Evain <jbevain@gmail.com>
12710 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
12711 qualified names for pointer types. Fixes #81208.
12713 2007-03-21 Jonathan Chambers <joncham@gmail.com>
12715 * marshal.c: Add support for PreserveSigAttribute.
12717 Code is contributed under MIT/X11 license.
12719 2007-03-14 Zoltan Varga <vargaz@gmail.com>
12721 * process.c: Fix endianness issues. Fixes #81126.
12723 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
12724 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
12726 * image.c (mono_image_lookup_resource): Make this work on big-endian
12727 machines.Change API contract so the caller needs to free the return value.
12729 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
12732 2007-03-14 Martin Baulig <martin@ximian.com>
12734 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
12735 mono_type_get_desc() as well.
12737 2007-03-13 Jonathan Chambers <joncham@gmail.com>
12739 * icall.c: Fix environ access in VS.
12741 2007-03-13 Alp Toker <alp@atoker.com>
12743 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
12744 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
12747 2007-03-12 Zoltan Varga <vargaz@gmail.com>
12749 * reflection.c (mono_reflection_create_dynamic_method): Add support for
12750 circular references among dynamic methods. Fixes #81091.
12752 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
12754 2007-03-09 Martin Baulig <martin@ximian.com>
12756 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
12758 2007-03-09 Jonathan Chambers <joncham@gmail.com>
12760 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
12761 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
12763 Code is contributed under MIT/X11 license.
12765 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
12767 * loader.c: Reapply patch for bug #79424.
12769 2007-03-06 Zoltan Varga <vargaz@gmail.com>
12771 * metadata.c (mono_type_to_unmanaged): Only convert object to
12772 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
12774 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
12776 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
12777 (and incorrectly set) is_reference field from MonoGenericInst.
12779 2007-03-06 Zoltan Varga <vargaz@gmail.com>
12781 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
12784 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
12786 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
12788 2007-03-05 Miguel de Icaza <miguel@novell.com>
12790 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
12791 FileOptions.1 value to mean "temporary", map that to
12792 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
12796 2007-03-03 Marek Habersack <mhabersack@novell.com>
12798 * appdomain.c: implement MS .Net style shadow copying. Copies of
12799 the assemblies are made in a subdirectory of the dynamic base
12800 directory, the assembly names are preserved.
12801 Copy .mdb and .config files along with the assemblies being shadowed.
12803 2007-02-28 Zoltan Varga <vargaz@gmail.com>
12805 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
12806 (emit_marshal_handleref): Ditto.
12808 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
12809 on Visual C++. Fixes #80671.
12811 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12813 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
12814 for clone operations.
12816 2007-02-28 Zoltan Varga <vargaz@gmail.com>
12818 * marshal.c: Fix warnings.
12820 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
12822 * loader.c: allow case-insensitive matching of the dll name
12823 in dllmap handling when prefixed with "i:".
12825 2007-02-20 Jonathan Chambers <joncham@gmail.com>
12827 * threads.c: Fix #ifdef for dummy_apc function for VS.
12829 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
12831 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
12833 2007-02-19 Massimiliano Mantione <massi@ximian.com>
12834 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
12835 giving precedence to the methods with a fully qualified name
12836 (InterfaceName.MethodName) when building the interface sections
12839 2007-02-16 Dick Porter <dick@ximian.com>
12841 * threadpool.c (append_job): Fix fast-path array handling, so it's
12842 less likely the array will grow exponentially when the load is
12845 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
12847 * metadata-internals.h, loader.c: fix dllmap lookup order
12848 for non-function maps, too, and prepare for fallback code.
12850 2007-02-12 Robert Jordan <robertj@gmx.net>
12852 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
12853 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
12854 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
12855 GlobalFree. Fixes a part of bug #77075.
12857 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
12859 * loader.c: implemented typedef parent in field memberref.
12861 2007-02-11 Jonathan Chambers <joncham@gmail.com>
12863 * marshal.c: Fix warnings and remember to call Release on
12866 Code is contributed under MIT/X11 license.
12868 2007-02-10 Miguel de Icaza <miguel@novell.com>
12870 * class-internals.h: Add MonoHandleRef definition, and
12871 handleref_class to mono_defaults.
12873 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
12874 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
12876 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
12877 (do nothing on this stage)
12878 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
12879 (emit_marshal_handleref): New method, used for argument handling
12882 2007-02-08 Jonathan Chambers <joncham@gmail.com>
12884 * class.c (mono_class_setup_parent): Lazily init com types.
12885 * domain.c (mono_init_internal, mono_init_com_types): Lazily
12887 * object.c (mono_remote_class_vtable): Lazily init com types.
12888 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
12889 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
12890 * domain-internals.h: Expose mono_init_com_types.
12891 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
12892 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
12893 Add support for COM Callable Wrapper marshalling.
12894 * marshal.h: Add icall definitions.
12895 * gc.c: Handle freeing of CCWs in finalizer code.
12897 Code is contributed under MIT/X11 license.
12899 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
12901 * reflection.c: changed all the signature encoding code to use
12902 a variable-sized buffer.
12904 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12906 * marshal.c: locking fixes: never take the loader lock
12907 or other runtime locks when holding the marshal lock
12910 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
12912 * marshal.c: make the delegate function pointer mapping
12913 work for the moving GC.
12915 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
12917 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
12920 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12922 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
12925 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12927 * threadpool.c: made the code moving-GC safe.
12929 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
12931 * assembly.c, boehm-gc.c, class-internals.h, class.c,
12932 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
12933 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
12935 * reflection.c: warning cleanup, some threading and moving GC fixes.
12937 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
12939 * class.c, loader.c: create the needed Set/Get/Address array methods
12940 as well as the .ctors in mono_class_init (), fixes bug #80567.
12942 2007-01-24 Zoltan Varga <vargaz@gmail.com>
12944 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
12945 we doesn't decrease its alignment. Should fix the sparc build.
12947 2007-01-24 Dick Porter <dick@ximian.com>
12950 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
12951 Create the returned object if we need to ignore an unsupported
12952 socket option. Fixes a segfault reported by Atsushi.
12954 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
12956 * class.c, object.c: restrict GC-tracked fields to
12957 UIntPtr fields used inside corlib, so we provide better
12958 type info to the GC and also allow broken packing as in
12961 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
12963 * sgen-gc.c: removed duplicated function.
12965 2007-01-19 Miguel de Icaza <miguel@novell.com>
12967 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
12968 value that means that the value is not supported, but that we
12969 should not return a failure, but instead report this as a
12970 successful operation.
12972 2007-01-19 Raja R Harinath <rharinath@novell.com>
12974 Fix tests/bug79956.2.il
12975 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
12976 (mono_generic_class_get_class): If the generic definition in an
12977 enum, copy over other fields related to it.
12979 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12981 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
12982 genericinst enums (bug #79215).
12984 2007-01-17 Massimiliano Mantione <massi@ximian.com>
12985 * class.c: Fix bug 80307.
12987 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
12989 * image.c: if the file table is not present, try to load
12990 all the modules, since we don't have info about them
12991 having or not metadata (bug #80517).
12992 * assembly.c: allow mono_assembly_load_references () to
12993 work for netmodules.
12995 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
12997 * image.c, metadata-internals.h, object.c: execute module
12998 cctors when running on the 2 runtime if present (bug #80487).
13000 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13002 * icall.c: optimized InitializeArray() on bigendian.
13004 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
13006 * icall.c: fix for the broken ARM FPA double format.
13008 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13010 * icall.c: handle endian issues for r4 and r8 types, too, in
13011 the InitializeArray() icall.
13013 2007-01-15 Miguel de Icaza <miguel@novell.com>
13015 * loader.c (mono_loader_error_prepare_exception): Clear the error
13016 once we have extracted the information from it, do this before we
13017 call into the JIT's class loading mechanisms.
13019 * object.c (mono_class_create_runtime_vtable): Do not clear the
13020 loader error before calling mono_class_get_exception_for_failure
13021 as the loader error is needed inside
13022 mono_class_get_exception_for_failure to throw the error (thinko).
13026 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13028 * reflection.c: align fields rva data so it's faster to load at
13031 2007-01-12 Raja R Harinath <rharinath@novell.com>
13033 Prepare to simplify GenericMethod handling.
13034 * class-internals.h (mono_method_get_context): New accessor function.
13035 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
13036 rather than directly accessing '->context' field.
13038 * class-internals.h (_MonoGenericParam.method): Move ...
13039 (_MonoGenericContainer): ... here. Add into union with klass field.
13040 * class.c, icall.c, loader.c, metadata.c, reflection.c:
13043 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
13045 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
13046 the wrapper type enum and reduce relocations.
13048 2007-01-12 Raja R Harinath <rharinath@novell.com>
13050 * reflection.c (inflate_mono_method): Reuse method instantiation
13051 from the generic method, if available.
13053 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13055 * marshal.c (emit_marshal_variant): Fix conv_arg
13056 type in last commit, based on whether parameter is byref.
13058 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13060 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
13062 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
13063 MONO_TYPE_OBJECT back for VARIANT support.
13065 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13067 * marshal.c, marshal.h, icall-def.h: Implement
13068 Marshal.ReAllocCoTaskMem.
13070 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
13072 * marshal.c: memory retention fixes: use the proper
13073 image cache for runtime_invoke method lookups.
13075 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13077 * mempool.c: added code to help debug mempool allocations.
13079 2007-01-11 Dick Porter <dick@ximian.com>
13081 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
13082 support (experimenting with faking it with IP_MTU_DISCOVER for
13083 systems that don't have IP_DONTFRAGMENT.)
13084 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
13087 * icall-def.h: new System.Net.Sockets.Disconnect icall.
13089 * socket-io.h: Add new fields to MonoSocketAsyncResult
13090 corresponding to the new ones in Socket.cs.
13092 2007-01-11 Raja R Harinath <rharinath@novell.com>
13094 Fix IronPython regression mentioned in #80249
13095 * metadata.c (do_mono_metadata_parse_generic_class): Clear
13096 'cached_context' field, since it may have been initialized as a
13097 side-effect of metadata parsing.
13099 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
13100 (_MonoGenericClass.cached_class): Move here and rename from lone
13101 remaining field of ...
13102 (_MonoInflatedGenericClass): ... this. Remove.
13103 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
13106 Fix mcs/tests/test-128.cs regression.
13107 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
13108 2007-01-10 change below.
13109 [MONO_TYPE_OBJECT]: Recurse into array case.
13111 2007-01-11 Raja R Harinath <harinath@gmail.com>
13113 * class-internals.h (mono_get_inflated_generic_class): Remove.
13114 * class.c (mono_get_inflated_generic_class): Remove.
13115 (mono_generic_class_get_class): Rename from
13116 mono_class_create_generic.
13117 (mono_class_from_mono_type) [GENERICINST]: Use it.
13118 * reflection.c, metadata.c: Update to changes. Use
13119 'mono_class_from_mono_type'.
13121 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
13123 * reflection.c: use passed type when encoding an array element
13124 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
13126 2007-01-09 Robert Jordan <robertj@gmx.net>
13128 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
13129 result arguments (someDelegate.EndInvoke (unrelatedAres)).
13132 2007-01-09 Raja R Harinath <rharinath@novell.com>
13134 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
13136 * object.c (set_value): Avoid aliasing between type->data.klass
13137 and type->data.generic_class.
13139 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
13141 2007-01-08 Raja R Harinath <rharinath@novell.com>
13143 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
13144 between type->data.klass and type->data.generic_class.
13146 2007-01-08 Lluis Sanchez <lluis@ximian.com>
13148 * marshal.c: In MS.NET, StringBuilder objects are not copied by
13149 value in out parameters.
13151 2007-01-08 Raja R Harinath <rharinath@novell.com>
13153 Simplify invariant for MonoGenericClass::klass field.
13154 * class.c (mono_class_create_generic): Verify 'klass' is null.
13155 * metadata.c (do_mono_metadata_parse_generic_class): Don't
13156 initialize 'klass' field.
13158 2007-01-05 Raja R Harinath <rharinath@novell.com>
13160 Ongoing work to avoid redundant data and simplify invariants.
13161 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
13162 'generic_class', and change type to a GenericInst.
13163 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
13164 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
13166 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
13168 * class.c : skip io-layer under PLATFORM_WIN32.
13170 2007-01-03 Tor Lillqvist <tml@novell.com>
13172 Fix #80305: In a bundled executable, look in the bundled exe
13173 assembly to determine the runtime version. Add the possibility to
13174 bundle also the machine.config file.
13176 * assembly.c (mono_assembly_open_from_bundle): Make
13177 non-static. Allow being called even if we have no bundled
13178 assemblies, and return NULL right away in that case.
13180 * domain-internals.h: Declare mono_assembly_open_from_bundle()
13183 * domain.c (app_config_parse): Take an assembly exe file name as
13184 parameter instead of a config file name. Check for a bundled
13185 config file for that assembly by calling
13186 mono_config_string_for_assembly_file() (see below) before looking
13187 for one in the file system.
13188 (get_runtimes_from_exe): Corrsponding change to call of
13189 app_config_parse().
13190 (get_runtimes_from_exe): Check for bundled assembly exe file first
13191 by calling mono_assembly_open_from_bundle(). If no bundled
13192 assembly exe file is found, call mono_image_open() as before to
13193 look it up in the file system.
13195 * mono-config.c: Add variable bundled_machinec_onfig.
13196 (mono_config_string_for_assembly_file): New function.
13197 (mono_config_for_assembly): Move code snippet that looks for a
13198 bundled assembly .config file into the above new function. Call
13200 (mono_register_machine_config, mono_get_machine_config): New
13201 functions to set and retrieve
13203 * assembly.h: Declare mono_register_machine_config().
13205 * mono-config.h: Declare mono_get_machine_config() and
13206 mono_config_string_for_assembly_file().
13208 * icall.c: No declaration of environ necessary on Win32. It is
13209 declared (as a macro expanding to a function call) in stdlib.h.
13210 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
13211 New internal mono function. Returns the value of
13212 mono_get_machine_config() as a Mono string.
13214 * icall-def.h: Add get_bundled_machine_config().
13216 2007-01-04 Raja R Harinath <rharinath@novell.com>
13218 Remove redundant field
13219 * class-internals.h (_MonoGenericContext.container): Remove field.
13220 * loader.c (mono_method_get_signature_full): Don't parse a
13221 "container" for a signature parse when the signature is inflated
13223 (method_from_methodspec): Likewise, for a generic_inst.
13224 * class.c, metadata.c, reflection.c: Update to changes.
13226 2006-01-04 Raja R Harinath <rharinath@novell.com>
13228 * class-internals.h (_MonoGenericClass): Rename 'context' field to
13229 'cached_context', and change semantics -- it starts off NULL, and
13230 is initialized on demand.
13231 * class.c (mono_generic_class_get_context): New accessor to
13232 replace 'context' field accesses.
13233 (mono_class_get_context): New helper.
13234 (*): Update to changes.
13235 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
13237 2007-01-03 Miguel de Icaza <miguel@novell.com>
13239 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
13240 before the memcpy. Fixes Marshal2 regression.
13242 2007-01-02 Jb Evain <jbevain@gmail.com>
13244 * blob.h: add a MONO_TYPE_ENUM definition
13245 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
13246 fix the encoding of arrays of enums in custom attributes.
13250 2007-01-01 Miguel de Icaza <miguel@novell.com>
13252 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
13253 string is null terminated, but only cut the string short if it
13254 overflows the buffer.
13256 (mono_string_to_byvalstr): Also fix this routine. The code here
13257 was not properly terminating a string (it was only terminated
13258 because of the previous catch-all memset).
13260 I left the memset, because I do not know if applications expect
13261 the runtime to clear this region.
13265 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13266 Clear the error before returning to unmanaged code to prevent the
13267 runtime from being confused later on (fixes 80420).
13268 (ves_icall_type_from_name): Always call mono_loader_clear_error
13269 after parsing a type that could have failed.
13270 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
13272 * loader.c (mono_loader_clear_error): Fix indentation.
13274 2006-12-28 Martin Baulig <martin@ximian.com>
13276 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
13278 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
13280 * reflection.c: patch from Rolf Bjarne Kvinge to fix
13281 getting a token for an EnumBuilder.
13283 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
13285 * reflection.c: be more careful in case resource generation
13286 fails to create the data array.
13288 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
13290 * sgen-gc.c: write barrier for clone and fix unregister handles.
13292 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
13294 * reflection.c: some fixes needed in the generics code for the moving GC.
13296 2006-12-22 Robert Jordan <robertj@gmx.net>
13298 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
13299 account. Fixes bug #80299.
13301 2006-12-21 Raja R Harinath <rharinath@novell.com>
13303 Fix WaitHandle usage in delegates.
13304 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
13305 * object.c (mono_wait_handle_new): Use the property set method to
13306 initialize the handle.
13307 (mono_wait_handle_get_handle): New.
13308 * threadpool.c (mono_async_invoke): Use it.
13309 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
13311 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
13313 2006-12-21 Jonathan Chambers <joncham@gmail.com>
13315 * marshal.c (emit_marshal): Call emit_marshal_variant and
13316 emit_marshal_com_interface when applicable.
13317 (emit_marshal_variant, emit_marshal_com_interface): Add
13318 methods for this case and remove if's from emit_marshal_object.
13320 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
13322 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
13324 2006-12-19 Jonathan Chambers <joncham@gmail.com>
13326 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
13327 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
13328 and GlobalFree on Windows. Remove FIXME.
13330 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
13332 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
13333 implementation for managed objects.
13335 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13337 * object.c: implemented code to be used for checking
13338 that no reference field overlaps with non-references.
13340 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13342 * threadpool.c: fix queue code to be compatible with the
13345 2006-12-18 Miguel de Icaza <miguel@novell.com>
13347 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
13348 in structures by throwing ArgumentNullException.
13350 (emit_marshal_safehandle): Also when they are null parameters.
13352 (emit_marshal_safehandle): Add support for ref
13353 SafeHandles parameters
13355 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13357 * profiler.c: updated to use the mono-dl API instead of
13360 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13362 * profiler.c: updated to use the mono-dl dynamic loading
13363 API instead of gmodule.
13365 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
13367 * profiler.c: use readlink, older versions of glib don't have
13368 g_file_read_link ().
13370 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13372 * profiler.c: try to detect the path to mono if libc fails to provide
13373 a useful name (bug #80286).
13375 2006-12-16 Raja R Harinath <rharinath@novell.com>
13378 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
13379 instance, use the generic type definition instead.
13380 (ves_icall_Type_GetNestedTypes): Likewise.
13381 * class.c (mono_class_create_generic): Always set the
13382 nested_classes of a generic instance to NULL, even if the generic
13383 type definition has nested types.
13385 2006-12-15 Jonathan Chambers <joncham@gmail.com>
13387 * marshal.c (mono_string_from_bstr): Revert previous Windows change
13390 2006-12-15 Miguel de Icaza <miguel@novell.com>
13392 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
13393 my arguments were in the wrong order. I also fixed the Windows
13394 version which seems to have had the same issue.
13396 (mono_free_bstr): On Unix, this is g_free.
13397 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
13398 conversions (for the tests in corlib to pass).
13400 2006-12-14 Miguel de Icaza <miguel@novell.com>
13402 * marshal.c (emit_ptr_to_object_conv): For now, ignore
13403 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
13404 exception if a ref SafeHandle in a struct has changed).
13406 (emit_struct_conv): Do not perform layout checks for classes
13407 derived from SafeHandle, as those are specially handled.
13409 (emit_object_to_ptr_conv): Add support for
13410 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
13412 (emit_marshal_safehandle): Implement conversion of return values
13413 of safehandles (MARSHAL_ACTION_CONV_RESULT).
13415 * threads.c: WaitHandle now is compiled with two different handles
13416 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
13419 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
13420 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
13421 these routines to cope with both kinds of fields.
13423 2006-12-12 Miguel de Icaza <miguel@novell.com>
13425 * metadata.c (mono_type_to_unmanaged): Handle the case where
13426 type->data.klass is a SafeHandle, and in that case, return the
13427 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
13428 MONO_MARSHAL_CONV_SAFEHANDLE.
13430 2006-12-11 Miguel de Icaza <miguel@novell.com>
13432 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
13433 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
13434 calling emit_marshal_object.
13436 (emit_marshal_safehandle): Implement marshalling of
13437 SafeHandle parameters (no ref support yet).
13439 (MarshalAction): Document the defines as I implement
13440 them for SafeHandle.
13442 (emit_marshal_object): indentation police.
13444 * class-internals.h: Define MonoSafeHandle.
13445 Add safehandle_class to MonoDefaults type.
13447 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
13448 list of classes to check for fields.
13450 * domain.c (mono_init_internal): Add SafeHandle to the list of
13451 mono_defaults loaded.
13453 2006-12-15 Raja R Harinath <rharinath@novell.com>
13456 * reflection.c (mono_reflection_bind_generic_parameters): If the
13457 generic type definition is a type builder, ensure that it is fully
13458 initialized before instantiating it. Kill some dead code.
13460 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
13462 * object.c: clear the loader_error () before loading
13463 more metadata stuff (bug #80258).
13465 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
13467 * icall.c, icall-defs.h: type modifiers icalls for
13468 parameters and properties.
13470 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
13472 * object.c, icall.c: fixed warnings.
13474 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
13476 * marshal.c: fixed a couple of leaks and coding style in a few places.
13478 2006-12-08 Dick Porter <dick@ximian.com>
13480 * process.c: Cope with NULL ProcessStartInfo arguments on windows
13481 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
13484 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
13486 * process.c: ProcessStartInfo may have only filename set and
13487 arguments can be NULL.
13489 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13491 * icall.c: fix leak found by Robert Jordan.
13493 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
13495 * marshal.c, marshal.h: generate managed method to access an element
13496 of a multi-dimensional array.
13498 2006-11-30 Paolo Molaro (lupus@ximian.com)
13500 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
13502 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13504 * icall.c: back out GetFields () fix until the serialization code is
13505 fixed to not depend on the incorrect behaviour.
13507 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
13509 * profiler.c: provide defaults if none are set.
13511 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13513 * Makefile.am, attrdefs.h: new public header file with
13514 constants for attributes for use by embedders.
13516 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
13518 * icall.c: GetFields () fix for bug #80064.
13520 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
13522 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
13523 removed long unused icalls.
13525 2006-11-27 Jonathan Chambers <joncham@gmail.com>
13528 (mono_marshal_emit_managed_wrapper): Level of indirection for
13529 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
13530 can be generated without a delegate class.
13531 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
13533 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
13535 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13537 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
13540 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13542 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
13543 icall-def.h: added icalls needed by System.GC.
13545 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
13547 * loader.c: ensure the class in catch clauses is handled
13548 correctly for generics methods (fixes bug#79980).
13550 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
13552 * monitor.h, monitor.c: added mono_locks_dump () function
13553 to help debug deadlocks involving managed locks.
13555 2006-11-13 Dick Porter <dick@ximian.com>
13557 * file-io.c (get_file_attributes): If the file is a symlink try
13558 and get the stat data for the target, but also add the
13559 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
13560 the specs for the windows symlink support, but will probably have
13561 to be reworked when I have test data from a vista machine. Fixes
13564 2006-11-13 Dick Porter <dick@ximian.com>
13566 * gc.c (mono_domain_finalize):
13567 * marshal.c (mono_delegate_begin_invoke):
13568 * threadpool.c (socket_io_init, mono_thread_pool_init)
13569 (mono_thread_pool_finish):
13570 * monitor.c (mono_monitor_try_enter_internal):
13571 * threads.c (mono_thread_resume, mono_thread_init)
13572 (mono_thread_suspend_all_other_threads)
13573 (mono_thread_execute_interruption):
13574 * appdomain.c (mono_domain_unload): Check for NULL error returns
13575 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
13578 2006-11-11 Miguel de Icaza <miguel@novell.com>
13581 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
13582 Only close the handle if the value of the handle is not
13583 INVALID_HANDLE_VALUE. This just makes the process a bit more
13586 Improvement for #75733, so that we do not run into this problem.
13589 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
13590 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
13591 internal variables. Fixes #79462
13594 2006-11-09 Dick Porter <dick@ximian.com>
13596 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
13597 Use poll() not select(). Fixes bug 79397.
13599 2006-11-09 Raja R Harinath <rharinath@novell.com>
13602 * assembly.c (mono_assembly_load_from_full): Check that the given
13603 image has an assembly manifest.
13605 2006-11-09 Ankit Jain <jankit@novell.com>
13607 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
13608 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
13609 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
13611 2006-11-07 Dick Porter <dick@ximian.com>
13613 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
13614 Put the old resolver behaviour back for pre-2.0 profiles.
13616 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
13618 * threadpool.c: precise GC and locking fixes.
13620 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
13622 * class.c: don't load types that have an explicit unaligned
13623 managed reference. Provide better info in the TypeLoad exception.
13624 Part of the fix for bug #79744.
13625 * object.c: use the correct check for class type load issues.
13627 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
13629 * class.c: enforce alignment of fields with managed references
13630 even when Pack=1 is forced by the user (bug #77788).
13632 2006-11-03 Dick Porter <dick@ximian.com>
13634 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
13635 If the address reverse lookup fails, return it as the hostname
13636 anyway. Fixes bug 79721.
13638 2006-11-03 Dick Porter <dick@ximian.com>
13640 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
13641 Fix build on Windows.
13643 2006-11-02 Dick Porter <dick@ximian.com>
13646 * object-internals.h:
13647 * exception.c (mono_get_exception_thread_interrupted):
13648 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
13651 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
13652 Check for pending Thread.Interrupt.
13654 2006-10-27 Massimiliano Mantione <massi@ximian.com>
13655 * loader.c: Fixed bug 79684.
13657 2006-10-27 Dick Porter <dick@ximian.com>
13659 * file-io.c (get_file_attributes): Force symlinks to directories
13660 to be returned as a regular file. Fixes bug 79733.
13661 2006-10-26 Dick Porter <dick@ximian.com>
13663 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
13664 CreateFile to open a directory then we need to set the
13665 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
13667 2006-10-23 Zoltan Varga <vargaz@gmail.com>
13669 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
13672 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
13674 * sgengc.c: small cleanup of timer code.
13676 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13678 * sgen-gc.c: fix some warnings and start adding support for
13679 complete object removal on domain unload.
13681 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
13683 * assembly.c: build_assembly_name should not consider a version
13684 number without build or revision number invalid. Fixes bug #79715.
13686 2006-10-18 Jonathan Chambers <joncham@gmail.com>
13688 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
13689 call kernel32 function OutputDebugString directly.
13691 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
13693 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
13695 * reflection.c: small cleanup, using a function to insert a MonoString
13696 in the string heap.
13698 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
13700 * reflection.c: moving GC fixes.
13702 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
13704 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
13705 all the objects with finalizers belonging to an unloading appdomain.
13707 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13709 * sgen-gc.c: added ability to allocate even when the nursery is fully
13710 pinned and fixed a couple of bugs.
13712 2006-10-15 Zoltan Varga <vargaz@gmail.com>
13714 * threads.h: Revert the last change for now.
13716 * threads.h (mono_thread_get_pending_exception): Rename this to
13717 mono_thread_get_undeniable_exception ().
13719 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
13721 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
13722 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
13723 when fname does not refer to valid assembly. This result in a more
13724 meaningful error message.
13725 * exception.c: added mono_get_exception_bad_image_format2 which
13726 constructs a BadImageFormatException using the ctor taking a custom
13727 message and the file name. Passing in a NULL msg results in a default
13729 * exception.h: define mono_get_exception_bad_image_format2 function.
13730 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
13731 when file name pointed to an invalid IL image. Use
13732 mono_get_exception_file_not_found2 to construct FileNotFoundException,
13733 as this results in a more meaningful error message.
13735 2006-10-15 Zoltan Varga <vargaz@gmail.com>
13737 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
13740 2006-10-12 Zoltan Varga <vargaz@gmail.com>
13742 * metadata.c (mono_type_size): Change the align parameter to guint32 for
13743 consistency with the other _size functions.
13744 (mono_type_stack_size): Ditto.
13746 * class.c object.c icall.c: Fix warnings caused by the above change.
13748 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
13750 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
13752 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
13754 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
13756 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
13757 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
13758 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
13759 threadpool.h, threads-types.h: mark more internal functions.
13761 2006-10-11 Dick Porter <dick@ximian.com>
13763 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
13764 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
13765 reproduce the bug even before applying the fix.)
13767 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
13769 * reflection.c: allow retrieving attributes for arguments in generic
13770 methods (bug #79241).
13772 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
13774 * debug-mono-symfile.c: properly check fopen () result (found by
13777 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
13779 * reflection.c: make error message clearer and fixed two
13780 issuelets found by Coverity.
13782 2006-10-10 Zoltan Varga <vargaz@gmail.com>
13784 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
13786 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
13788 * object-internals.h, gc-internal.h, profiler-private.h:
13789 mark internal functions.
13791 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
13793 * reflection.c: put data in the text section.
13794 * icall.c: recognize more types in type_from_typename ().
13795 * process.c, marshal.c: added some GC FIXMEs.
13797 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13799 * loader.c: check for NULL before initializing.
13801 2006-10-09 Zoltan Varga <vargaz@gmail.com>
13803 * gc.c (finalizer_thread): Use a non-alertable wait here.
13805 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
13806 until the correct solution is found.
13808 2006-10-06 Zoltan Varga <vargaz@gmail.com>
13810 * reflection.c (mono_module_get_object): Avoid an assert when operating on
13811 modules with no metadata. Fixes #79596.
13813 * image.c (load_metadata_ptrs): Put back the error message when
13814 the #- heap is encountered since the support is not complete yet.
13816 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13818 * gc.c: do not allow the user to SuppressFinalize () a
13819 delegate because it would leak the trampoline if present.
13821 2006-10-06 Zoltan Varga <vargaz@gmail.com>
13823 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
13826 2006-10-05 Zoltan Varga <vargaz@gmail.com>
13828 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
13830 * metadata.c (mono_metadata_get_param_attrs): Ditto.
13832 * row-indexes.h: Add definitions for *Ptr tables.
13834 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
13836 * metadata.c (mono_metadata_translate_token_index): New helper function to
13837 translate table indexes used in uncompressed metadata.
13838 (mono_metadata_decode_table_row): Ditto.
13839 (mono_metadata_decode_table_row_col): Ditto.
13841 * metadata.c: Add table schema for *Ptr tables.
13843 * class.c loader.c: Use the new helper function to access the affected metadata
13846 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
13849 2006-10-04 Zoltan Varga <vargaz@gmail.com>
13851 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
13852 sequences which can be unbounded in size. Fixes #79583.
13854 2006-10-02 Zoltan Varga <vargaz@gmail.com>
13856 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
13857 static initialization.
13859 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
13861 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
13863 * domain.c (mono_domain_free): Free up type_init_exception_hash.
13865 * object.c (mono_runtime_class_init): Implement correct semantics when a static
13866 ctor fails, i.e. throw the same exception on subsequent accesses.
13868 2006-09-0 Jonathan Chambers <joncham@gmail.com>
13870 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
13871 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
13872 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
13873 Handle marshalling of interfaces and VARIANTs contained in structs.
13875 Code is contributed under MIT/X11 license.
13877 2006-09-30 Zoltan Varga <vargaz@gmail.com>
13879 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
13881 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
13884 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13886 * console-io.c: ignore previous SIGINT handler.
13888 2006-09-27 Zoltan Varga <vargaz@gmail.com>
13890 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
13891 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
13892 #79460, #79461, #79485.
13894 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
13896 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
13899 2006-09-26 Zoltan Varga <vargaz@gmail.com>
13901 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
13902 could be generated from it.
13904 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
13906 * rand.c: fix read loop to correctly handle EINTR.
13908 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
13910 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
13911 internal calls are defined to keep methods closer to the declaring
13912 type and allow a significant reduction in runtime relocations and
13915 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
13917 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
13918 exception message to have FileNotFoundException use the default
13919 assembly load error message. Fixes bug #79426.
13920 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
13922 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13924 * threadpool.c: (start_thread_or_queue) use the root domain when
13925 creating the thread instead of the async object one.
13927 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
13929 * class.c, object.c, class-internals.h, reflection.c:
13930 for arrays, store element_size inside MonoClass (speedup
13931 for array object creation).
13933 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
13935 * icall.c: fixed CodeBase to use the file name and not the module
13938 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
13940 * mono-debug.c, mono-debug.h: export find_method as
13941 mono_debug_find_method ().
13943 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
13945 * debug-helpers.c, class-internals.h: added a few functions useful
13946 when debugging under gdb.
13948 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13950 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
13951 characters that need special handling.
13953 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
13955 * mono-config.c: make the os/cpu specification more flexible,
13956 allowing lists and negation.
13958 2006-09-18 Jonathan Chambers <joncham@gmail.com>
13960 * marshal.c: COM Interop fixes. Handle case where method->klass.
13961 is interface. Handle BSTR/MonoString when null. Use CDECL as
13962 calling convention on non-windows platforms. This is for
13963 compatibility with XPCOM and MainWin COM.
13965 Code is contributed under MIT/X11 license.
13968 2006-09-18 Zoltan Varga <vargaz@gmail.com>
13970 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
13971 correctly. Fixes #79217.
13973 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
13975 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
13977 * mono-config.c: allow both an os and cpu attribute for dllmap
13978 and dllentry elemnets to enable a single config file to be used
13979 for multiple architectures.
13981 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
13983 * loader.c: MonoLoaderError was cleared too soon on load failure.
13986 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
13988 * icall.c: use the defining class vtable when accessing a
13989 static field, not a pobblibly derived class.
13991 2006-09-17 Zoltan Varga <vargaz@gmail.com>
13993 * icall.c string-icalls.c: Remove references to unicode.h.
13995 * unicode.h unicode.c Makefile.am: Remove these unused source files.
13997 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
13999 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
14000 indicating the image where custom marshaller types should be looked up.
14001 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
14002 custom marshallers, instead of corlib. Fixes #79425.
14004 2006-09-14 Zoltan Varga <vargaz@gmail.com>
14006 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
14008 2006-09-14 Jonathan Chambers <joncham@gmail.com>
14010 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
14011 Implement Environment.ProcessorCount.
14013 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
14014 Implement Environment.ProcessorCount.
14017 Add Environment.ProcessorCount icall.
14019 Patch by Jason McFall.
14021 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14023 * assembly.c: don't append .exe/.dll when the filename already contains
14024 one of those extensions.
14026 2006-09-12 Martin Baulig <martin@ximian.com>
14028 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
14029 to array interfaces.
14031 2006-09-11 Martin Baulig <martin@ximian.com>
14033 * reflection.c (mono_image_build_metadata): Create the
14034 MethodImpl's after emitting all types and methods, so we don't
14035 need another fixup pass for them.
14037 2006-09-11 Zoltan Varga <vargaz@gmail.com>
14039 * class.c (mono_class_from_name_case): Fix regression introduced by the last
14042 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
14044 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
14047 2006-09-10 Zoltan Varga <vargaz@gmail.com>
14049 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
14050 args is not set. Fixes #78926.
14052 2006-09-08 Zoltan Varga <vargaz@gmail.com>
14054 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
14056 * image.c (load_class_names): Move this to class.c, and rename it to
14057 'mono_image_init_name_cache'.
14058 (load_modules): Fix a warning.
14060 * class.c icall.c image.c: Initialize image->name_cache lazily.
14062 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
14063 on its name using information in the AOT file.
14065 * class.c (mono_class_from_name): Use the new hook function.
14067 2006-09-06 Zoltan Varga <vargaz@gmail.com>
14069 * reflection.c (mono_param_get_objects): Handle enum default parameter values
14072 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
14075 2006-09-06 Martin Baulig <martin@ximian.com>
14077 * icall.c (mono_lookup_internal_call): Small fix.
14079 2006-09-05 Raja R Harinath <rharinath@novell.com>
14081 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
14084 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
14086 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
14087 when --debug is specified.
14089 2006-09-04 Zoltan Varga <vargaz@gmail.com>
14091 * class.c (setup_generic_array_ifaces): Fix a warning.
14093 2006-09-04 Miguel de Icaza <miguel@novell.com>
14095 * Temporarily remove the patch to assemly.c that checks the
14096 assembly versions as it breaks our gacutil.
14098 2006-09-03 Zoltan Varga <vargaz@gmail.com>
14100 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
14102 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
14105 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
14106 created using the default ctor. Fixes #79152.
14107 (mono_string_builder_to_utf16): Ditto.
14109 2006-09-01 Martin Baulig <martin@ximian.com>
14111 Fix handling of the generic array interfaces.
14113 * class-internals.h
14114 (MonoDefaults): Removed `generic_array_class' and added
14115 `generic_ilist' class.
14118 (mono_bounded_array_class_get): Add the new generic array interfaces.
14119 (setup_generic_array_ifaces): New static method; create vtable
14120 entries for each method in the generic array interfaces.
14123 (select_container): Allow "parent-less" generic methods.
14126 (mono_marshal_get_generic_array_helper): New public method.
14129 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
14130 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
14131 moved the interncall into System.Array.
14133 2006-09-01 Raja R Harinath <rharinath@novell.com>
14135 A few more cases of avoiding work on types with ->byref set.
14136 Has the real fix for #79238
14137 * icall.c (is_generic_parameter): New helper.
14138 (ves_icall_Type_GetGenericParameterPosition): Use it.
14139 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
14140 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
14141 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
14142 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
14144 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
14146 (ves_icall_Type_get_IsGenericInstance): Likewise.
14147 (ves_icall_Type_get_IsGenericType): Likewise.
14149 2006-09-01 Zoltan Varga <vargaz@gmail.com>
14151 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
14154 * mempool.h (mono_mempool_get_allocated): New helper function.
14156 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
14159 * mempool.c: Fix warnings and the calculation of stats.
14161 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
14163 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
14165 * loader.c (mono_get_method_from_token): Update method_count stat.
14167 * class-internals.h (MonoStats): Add some stats.
14169 2006-08-31 Robert Jordan <robertj@gmx.net>
14171 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
14172 with managed variants.
14173 All code is contributed under the MIT/X11 license.
14175 2006-08-31 Zoltan Varga <vargaz@gmail.com>
14177 * reflection.c (reflection_methodbuilder_to_mono_method): Set
14178 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
14180 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
14182 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
14183 with cycles in classes.
14185 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
14187 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
14188 missing a [MarshalAs] directive. Fixes #79203.
14190 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
14191 klass->marshal_info. Fixes #79217.
14193 2006-08-30 Martin Baulig <martin@ximian.com>
14195 Committing a patch from Joachim Ante <joe@otee.dk>:
14196 Add support for binary data symbol stores.
14198 * debug-mono-symfile.c
14199 (mono_debug_open_mono_symbol_file): Renamed into
14200 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
14204 (mono_debug_open_image): Added `raw_contents' and `size' args.
14205 (mono_debug_init_2_memory): New public function.
14207 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
14209 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
14211 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14213 * appdomain.c: implement support for ShadowCopyFiles.
14215 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
14217 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
14218 when value is NULL (and should remove CID #51).
14220 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14222 * image.c: moved 2 functions to ../utils.
14224 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
14226 * gc.c: cope with the target object of a GC handle being NULL
14229 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14231 * class.c: recursively check parent's explicit implementations
14232 of interface methods (fixes bug #79125).
14234 2006-08-19 Miguel de Icaza <miguel@novell.com>
14236 * filewatcher.c: Avoid warnings when building, do not redefine
14237 constants that are defined.
14241 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14243 * image.c: don't fail when the link points to an absolute path.
14245 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
14247 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
14250 2006-08-17 Miguel de Icaza <miguel@novell.com>
14252 * image.c (full_path): A new method used to obtain the actual path
14253 of an assembly even in the presence of symbolic links.
14255 This is necessary for the case where we are running a binary that
14256 has been GACed, but we are using the "published" path name
14257 ($prefix/mono/1.0/blah.exe) which happens to point to the real
14260 This was the source of the failure for the `xsp' command with the
14261 recent AppDomain changes, as far as the runtime was concerned,
14262 there were two different assemblies: $prefix/mono/1.0/blah.exe and
14263 $prefix/mono/gac/blah/version/blah.exe.
14265 (do_mono_image_open): use full path
14267 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14269 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
14271 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
14273 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
14274 domain_id is supplied. Fix CID #241 and corlib's unit tests.
14276 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14278 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
14279 small structures. Fixes #78990.
14281 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14283 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
14285 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
14287 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14290 * marshal.c: don't load all the assemblies from a domain into newly
14291 created ones. The new domains might have different rules and load
14292 assemblies from different locations. Fixes bug #76757.
14294 Patch by Lluis. Conflicts resolved by Brian Crowell.
14296 2006-08-16 Alp Toker <alp@atoker.com>
14298 * socket-io.c: First half of the fix for #79084.
14299 Set sa_size to the length of the content, not that of the struct.
14300 Don't add NULL suffix to the content, this should be done in
14301 managed code if needed.
14303 2006-08-14 Raja R Harinath <rharinath@novell.com>
14306 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
14307 mono_metadata_parse_type returns NULL.
14309 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
14311 * normalization-tables.h : new file for string normalization data.
14312 * locales.c, locales.h, icall.c :
14313 added load_normalization_resource() for string normalization,
14315 * Makefile.am : added normalization-tables.h to the sources.
14317 2006-08-13 Zoltan Varga <vargaz@gmail.com>
14319 * marshal.c: Add more helper functions to reduce code duplication and use them
14322 2006-08-12 Zoltan Varga <vargaz@gmail.com>
14324 * marshal.c: Fix non-x86 stdcall warnings.
14326 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
14329 2006-08-11 Jonathan Chambers <joncham@gmail.com>
14331 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
14332 type check on multi-dimensional arrays. Fixes #79000.
14334 2006-08-10 Jonathan Chambers <joncham@gmail.com>
14336 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
14337 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
14338 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
14339 * class-internals.h: add is_com_object to class structure.
14340 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
14341 null checks to COM object marshalling. Fix .ctor call on RCW.
14342 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
14344 All code is contributed under the MIT/X11 license.
14346 2006-08-09 Dick Porter <dick@ximian.com>
14348 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
14349 racing mono_monitor_allocator_lock() somewhere, so don't delete
14350 the critical section for now. Found by running and exiting
14353 2006-08-10 Zoltan Varga <vargaz@gmail.com>
14355 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
14356 (ves_icall_System_ComObject_FindInterface): Ditto.
14357 (ves_icall_System_ComObject_CacheInterface): Ditto.
14359 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
14360 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
14362 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14364 * threadpool.c: treat pipes from process asynchronous reads as sockets
14365 when reading from them, so we get select/poll or epoll to wait for
14368 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
14370 * loader.c: Fix a typo (CID #233) in the null check.
14372 2006-08-07 Zoltan Varga <vargaz@gmail.com>
14374 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
14375 Hopefully fixes #78949.
14377 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
14378 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
14379 bytes. Fixes #78972.
14381 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14383 * filewatcher.c: we need to set errno here.
14385 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14387 * filewatcher.c: let Win32Exception get the error value.
14389 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14391 * filewatcher.c: translate errno into win32 errors for Win32Exception
14392 to know what happened.
14394 2006-08-01 Zoltan Varga <vargaz@gmail.com>
14396 * threadpool.c: Fix more warnings.
14398 * assembly.c (search_loaded): Fix warnings.
14400 * threadpool.c (mono_thread_pool_finish): Fix warnings.
14401 (mono_async_invoke): Ditto.
14403 2006-07-28 Jonathan Chambers <joncham@gmail.com>
14405 * object.c (mono_remote_class_vtable): Need to create proxy vtable
14406 entries for __ComObject type in addition to ComImport types.
14407 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
14410 All code is contributed under the MIT/X11 license.
14412 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14414 * image.c: avoid tentative loading of modulerefs that contain
14415 no metadata (P/Invoke library names).
14417 2006-07-28 Dick Porter <dick@ximian.com>
14419 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
14420 mono_loader_lock() somewhere, so don't delete the critical section
14421 for now. Found by running and exiting monodevelop.
14423 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14425 * filewatcher.c: define the inotify syscalls when we're building on
14426 linux and have sys/syscall.h. The build system might not have support
14427 for inotify but the target system might have it.
14429 2006-07-26 Miguel de Icaza <miguel@novell.com>
14431 * domain.c: Documentation updates.
14433 * loader.c (mono_free_method): Do not release the method
14434 information if we are being profiled, as profilers will use this
14435 information at shut down to present some data to the user.
14437 This is needed so that the profiler does not crash, as the
14438 profiler tends to keep MonoMethods around, and they might become
14439 invalid if we free these.
14441 (mono_get_method_constrained): Return the original CIL stream
14442 method as well, so verification can be performed against it.
14444 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14446 * filewatcher.[ch]: support for inotify file system watcher.
14447 * icall.c: add new internal calls for the inotify file system watcher.
14449 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14451 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
14454 2006-07-20 Dick Porter <dick@ximian.com>
14456 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
14459 2006-07-20 Dick Porter <dick@ximian.com>
14461 * threads.c (start_wrapper): Do the thread cleanup while we still
14462 hold a reference to its object. Fixes bug 78123.
14464 2006-07-18 Kornél Pál <kornelpal@gmail.com>
14466 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
14467 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
14468 "managed-to-managed".
14469 * icall.c: Redirect string constructors that take sbyte* to
14470 ves_icall_System_String_ctor_RedirectToCreateString.
14471 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
14472 to CreateString () methods with matching signature.
14473 * reflection.c: Use original security informations for
14474 MONO_WRAPPER_MANAGED_TO_MANAGED.
14475 * security-manager.c: Use original security informations for
14476 MONO_WRAPPER_MANAGED_TO_MANAGED.
14477 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
14478 that is a placeholder and only its address should be used.
14479 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
14480 that is a placeholder and only its address should be used.
14482 2006-07-15 Jonathan Chambers <joncham@gmail.com>
14484 Begin implementing COM Interop.
14485 * appdomain.c: Increment corlib version.
14486 * class.c: Set ComImport classes' parent to __ComObject.
14487 * loader.c: Mark cominterop methods as such.
14488 * domain.c: Add __ComObject class to MonoDefaults structure.
14489 * image.c: Add 2 hashtables to the image for COM Interop related methods
14490 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
14491 using the mempool allocator
14493 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
14494 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
14495 declaration for mono_metadata_type_dup_mp.
14497 * debug-helpers.c: Added strings for two additional wrapper types
14498 * object.c: Create proxy objects for ComImport classes
14499 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
14500 and added __ComObject class to MonoDefaults structure.
14502 * object-internals.h: Finish MonoRealProxy definition, and add definition of
14503 MonoComInteropProxy and MonoComObject.
14505 * marshal.c: Added support for COM Interop
14506 (signature_cominterop): Converts managed signature to corresponding
14507 unmanaged COM signature.
14508 (cominterop_get_function_pointer): gets unmanaged function pointer via
14510 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
14511 (cominterop_get_method_interface): returns interface type that method is defined on
14512 (mono_mb_emit_cominterop_call): emits native call to function pointer
14514 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
14515 that matches signature of unmanaged function.
14516 (cominterop_get_native_wrapper): wrapper around adjusted method call.
14517 (cominterop_get_invoke): forwards call from proxy to __ComObject
14518 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
14519 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
14520 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
14522 * marshal.h: Added Marshal icall declarations.
14523 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
14524 so we can access them in finalizer
14526 2006-07-14 Dick Porter <dick@ximian.com>
14528 * object.c (mono_type_initialization_cleanup): Fix a race
14529 condition by temporarily commenting out the critical section
14532 2006-07-14 Zoltan Varga <vargaz@gmail.com>
14534 * reflection.c (create_custom_attr): Fix some warnings.
14535 (create_custom_attr_data): Ditto.
14536 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
14537 types. Fixes #78855.
14539 2006-07-11 Zoltan Varga <vargaz@gmail.com>
14541 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
14543 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
14545 2006-07-08 Zoltan Varga <vargaz@gmail.com>
14547 * reflection.c (resolve_object): Add support for DynamicMethod.
14549 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
14550 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
14552 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
14554 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
14555 don't leak GPtrArray's pdata has we have no use (nor free) for it.
14557 2006-07-01 Zoltan Varga <vargaz@gmail.com>
14559 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
14562 2006-06-30 Raja R Harinath <rharinath@novell.com>
14564 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
14565 slightly: remove a shadow local variable.
14567 2006-06-29 Raja R Harinath <rharinath@novell.com>
14569 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
14570 definition that introduces the virtual function slot.
14571 Also fix Coverity #105.
14573 2006-06-29 Zoltan Varga <vargaz@gmail.com>
14575 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
14576 for dynamic assemblies. Fixes #78724.
14578 2006-06-28 Zoltan Varga <vargaz@gmail.com>
14580 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
14583 2006-06-21 Martin Baulig <martin@ximian.com>
14586 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
14589 2006-06-21 Zoltan Varga <vargaz@gmail.com>
14591 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
14593 2006-06-20 Raja R Harinath <rharinath@novell.com>
14595 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
14597 * class.c (mono_class_create_from_typespec): Add 'context' argument.
14598 Inflate result if necessary.
14599 (mono_class_get_full): Remove old version. Rename from
14600 'mono_class_get' and add 'context' argument. Pass it to
14601 ..._create_from_typespec.
14602 (mono_class_get): New. Simple wrapper to mono_class_get_full.
14603 (mono_ldtoken): Revert change below.
14605 2006-06-20 Martin Baulig <martin@ximian.com>
14607 * class.c (mono_ldtoken): Don't pass the generic context to
14608 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
14610 2006-06-15 Zoltan Varga <vargaz@gmail.com>
14612 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
14613 and later freeing it. Fixes #78638.
14615 2006-06-15 Miguel de Icaza <miguel@novell.com>
14617 * icall.c (mono_class_get_throw): Revert over-zealous error
14618 throwing, the caller for mono_class_get_throw will cope with
14619 errors when classes are not properly initialized already.
14621 The code still copes with loader exceptions though.
14623 Fixes the regression in reftype1 and reftype3 from the CAS tests.
14625 2006-06-14 Miguel de Icaza <miguel@novell.com>
14627 Fixes the `make run1' version of RuntimeAbort (to be commited,
14628 source is in Bugzilla).
14630 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
14631 FALSE on class loading failure instead of returning true.
14633 * class.c (mono_class_create_from_typedef): It is possible for
14634 mono_metadata_interfaces_from_typedef_full to fail if a class is
14635 not found, cope with this.
14638 2006-06-14 Dick Porter <dick@ximian.com>
14641 * process.c: Fix a bunch of signed/unsigned warnings from gcc
14644 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
14646 * culture-info-table.h : oops, forgot to make it nsync with r61548.
14648 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
14650 * icall.c: Another fix for building mono in Visual Studio.
14652 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
14654 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
14656 2006-06-09 Martin Baulig <martin@ximian.com>
14658 * debug-mono-symfile.c: Put this back and really fix it this
14659 time. Sorry for all the trouble.
14661 2006-06-08 Zoltan Varga <vargaz@gmail.com>
14663 * icall.c (mono_class_get_throw): Fix a warning.
14664 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
14665 ReflectionTypeLoadException if needed. Fixes #78606.
14667 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
14668 (mono_class_init): Ditto.
14670 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
14671 ref_only exceptions.
14672 (mono_loader_clear_error): Make this work even if there is no error.
14674 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
14676 * object-internals.h marshal.c marshal.h icall.c: Implement method
14677 Marshal.GetComSlotForMethodInfo using internal call.
14679 2006-06-07 Zoltan Varga <vargaz@gmail.com>
14681 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
14682 a function for signalling it.
14684 * class.c (mono_class_from_typeref): Use the new kind of loader error when
14685 a referenced assembly is not found.
14687 * loader.c (mono_loader_error_prepare_exception): Add support for
14688 LOADER_ERROR_ASSEMBLY. Fix formatting.
14690 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
14692 * domain.c appdomain.c class-internals.h marshal.c: Add support
14693 for VARIANT marshalling on windows and increment corlib version
14694 since Variant struct was added.
14696 2006-06-03 Miguel de Icaza <miguel@novell.com>
14698 * debug-mono-symfile.c: Revert Martin's previous patch which broke
14699 stack trace line information:
14701 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
14702 (Martin) when looking up B which is between A and C, return A not C.
14706 Thanks to Alexander Olk for tracking this down.
14708 2006-06-02 Zoltan Varga <vargaz@gmail.com>
14710 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
14712 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
14713 avoid clobbering its value.
14714 (mono_string_to_lpstr): Fix a warning on windows.
14716 2006-05-31 Zoltan Varga <vargaz@gmail.com>
14718 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
14720 * reflection.c loader.c: Removed references to 'dummy' flag.
14722 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
14724 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
14725 it gets GC tracking.
14727 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
14730 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
14732 * marshal.c threadpool.c: Update callers of mono_async_result_new.
14734 * appdomain.c: Bump corlib version.
14736 2006-05-30 Zoltan Varga <vargaz@gmail.com>
14738 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
14739 CEE_STIND_REF when working with object references.
14741 2006-05-31 Zoltan Varga <vargaz@gmail.com>
14743 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
14746 2006-05-30 Miguel de Icaza <miguel@novell.com>
14748 * loader.c (method_from_memberref): Fix argument value for
14749 mono_loader_set_error_method_load (I was passing the MonoClass
14750 instead of the class name char *).
14752 2006-05-30 Zoltan Varga <vargaz@gmail.com>
14754 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
14755 CEE_STIND_REF when working with object references.
14757 2006-05-30 Martin Baulig <martin@ximian.com>
14759 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
14760 mono_method_full_name() change and replace the ':' with a '.'
14763 2006-05-30 Martin Baulig <martin@ximian.com>
14765 * debug-mono-symfile.c
14766 (mono_debug_symfile_lookup_location): Fix the algorithm:
14767 when looking up B which is between A and C, return A not C.
14769 2006-05-29 Martin Baulig <martin@ximian.com>
14772 (MonoDebugMethodInfo): Make the typedef public.
14773 (MonoDebugSourceLocation): New public struct.
14776 (mono_debug_source_location_from_address): Removed.
14777 (mono_debug_source_location_from_il_offset): Removed.
14778 (mono_debug_il_offset_from_address): Removed.
14779 (mono_debug_address_from_il_offset): Removed.
14780 (mono_debug_lookup_method): New public function.
14781 (mono_debug_lookup_source_location): New public function; replaces
14782 the old mono_debug_source_location_from_*() functions; see the
14783 inline documentation.
14784 (mono_debug_free_source_location): New public function.
14785 (mono_debug_print_stack_frame): New public function; see the
14786 inline documentation.
14788 * debug-mono-symfile.c
14789 (mono_debug_find_source_location): Renamed into
14790 mono_debug_symfile_lookup_location(); only take a
14791 `MonoDebugMethodInfo *' and an `offset' argument; added inline
14793 (mono_debug_find_method): Renamed into
14794 mono_debug_symfile_lookup_method().
14796 2006-05-27 Zoltan Varga <vargaz@gmail.com>
14798 * assembly.c (mono_assembly_open_full): Dont overwrite the status
14799 returned by mono_image_open_full ().
14801 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
14802 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
14805 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
14808 2006-05-27 Miguel de Icaza <miguel@novell.com>
14810 * class.c (mono_class_from_typeref): handle missing images
14811 earlier, deals with bug #78418. Refactor code;
14813 Fix a warning introduced in my previous commit (some stale code
14814 from before I revisited my patch).
14816 * class.c (mono_class_create_from_typedef): On failure, remove the
14817 class from the MonoImage->class_cache as the class is not
14818 initialized; Fixes the leak pointed out by Paolo.
14820 2006-05-25 Dick Porter <dick@ximian.com>
14822 * threads.c (mono_thread_cleanup): Build fix. Comment out the
14823 DeleteCriticalSections until I figure out which one may still be
14824 sometimes locked when mono_thread_cleanup is called.
14826 2006-05-24 Dick Porter <dick@ximian.com>
14828 * threads.c (mono_thread_cleanup): Move the threading cleanup out
14829 of mono_thread_manage and back into its own function, so it can be
14830 called after the finalizer thread has finished.
14832 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
14834 2006-05-24 Zoltan Varga <vargaz@gmail.com>
14836 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
14839 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
14840 with non-blittable elements.
14841 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
14843 2006-05-24 Martin Baulig <martin@ximian.com>
14845 * mono-debug-debugger.h (MonoDebuggerEvent): Added
14846 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
14848 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
14849 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
14850 `mono_debugger_event_handler' to NULL.
14852 2006-05-24 Martin Baulig <martin@ximian.com>
14854 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
14856 2006-05-24 Martin Baulig <martin@ximian.com>
14858 * mono-debug-debugger.h
14859 (mono_debugger_create_notification_function): Added
14860 `MonoCodeManager *' argument.
14862 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
14864 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
14866 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
14868 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
14869 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
14872 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
14874 * icall.c: precise GC support: objects can't be stored in unmanaged
14875 memory anymore, even if they are kept alive by other references: since
14876 they can move the GC needs to be able to always find them.
14878 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14880 * object.c: precise GC support for static fields. Support
14881 for moving GCs: write barriers and pinned allocation for interned
14884 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
14886 * domain.c, domain-internals.h: precise GC support for the MonoDomain
14889 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14891 * class.c, gc.c: sgen and precise GC updates.
14893 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
14895 * marshal.h, marshal.c: added write barrier wrapper and precise type
14898 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
14900 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
14903 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
14905 * reflection.c: precise and sgen GC updates.
14907 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
14909 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
14911 2006-05-22 Zoltan Varga <vargaz@gmail.com>
14913 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
14915 2006-05-20 Zoltan Varga <vargaz@gmail.com>
14917 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
14918 MONO_TYPE_OBJECT. Fixes #78462.
14920 2006-05-18 Zoltan Varga <vargaz@gmail.com>
14922 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
14923 and blittable types.
14925 2006-05-17 Miguel de Icaza <miguel@novell.com>
14927 * class.c (mono_class_get_exception_for_failure): Implement parts
14928 of a TODO: if the loader error is set (instead of the class
14929 error), we return a Loader exception that can be properly thrown
14932 This was exposed by some Winforms 2.0 code that I tried to run
14933 (Atsushi pointed me to it).
14935 2006-05-17 Zoltan Varga <vargaz@gmail.com>
14937 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
14938 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
14940 * marshal.c (emit_marshal_vtype): Add limited support for
14941 UnmanagedType.LPStruct. Fixes #78427.
14943 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
14944 Applied a patch from kangaroo to fix #77523.
14946 2006-05-17 Martin Baulig <martin@ximian.com>
14949 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
14950 (debugger_thread_created): Removed.
14951 (debugger_thread_exited): Removed.
14953 2006-05-15 Zoltan Varga <vargaz@gmail.com>
14955 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14957 * object-internals.h (MonoReflectionResource): Sync with managed version.
14959 2006-05-12 Wade Berrier <wberrier@novell.com>
14961 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
14963 2006-05-12 Zoltan Varga <vargaz@gmail.com>
14965 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
14966 functions try to allocate from the image mempool.
14968 2006-05-12 Dick Porter <dick@ximian.com>
14970 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
14972 2006-05-12 Lluis Sanchez <lluis@ximian.com>
14974 * object.c: The FieldGetter and FieldSetter methods require the full
14975 name of the class, not only the name. Fixes bug #78277.
14977 2006-05-11 Miguel de Icaza <miguel@novell.com>
14979 * loader.c (method_from_memberref): Do not pass the NULL klass to
14980 mono_loader_set_error_() methods. Pass the non-NULL value
14983 2006-05-11 Zoltan Varga <vargaz@gmail.com>
14985 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
14986 (mono_assembly_close): Null out assembly->image->references after freeing it.
14988 * image.c (mono_image_close): Free image->references.
14990 * reflection.c (mono_image_basic_init): Fix a small memory leak.
14992 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
14994 * marshal.c: In function mono_mb_add_local don't use the mb pointer
14995 before checking if it's NULL (g_assert).
14997 2006-05-10 Martin Baulig <martin@ximian.com>
14999 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
15000 I thought I already killed that two months ago, but now it somehow reappeared.
15002 2006-05-10 Martin Baulig <martin@ximian.com>
15004 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
15006 2006-05-10 Zoltan Varga <vargaz@gmail.com>
15008 * reflection.c: Allocate memory for dynamically created methods in the image
15011 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
15013 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
15014 don't use the ad pointer before checking if it's NULL (g_assert).
15016 2006-05-09 Zoltan Varga <vargaz@gmail.com>
15018 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
15019 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
15021 * marshal.c: Allocate all signatures from mempools.
15023 * marshal.c: Allocate some more signatures from mempools.
15025 2006-05-09 Miguel de Icaza <miguel@novell.com>
15027 * object.c (mono_load_remote_field): The code used to provide a
15028 temporary variable for returning results if the user did not
15029 provide a result pointer. But our temporary variable was allocted
15032 Fix calling code to always pass a result area. Coverity ID 103.
15034 2006-05-06 Zoltan Varga <vargaz@gmail.com>
15036 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
15037 value, not the old. Fixes #78312.
15038 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
15040 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
15041 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
15044 * assembly.c (mono_assembly_close): Free image->references.
15046 * assembly.c (mono_assembly_names_equal): Fix a warning.
15047 (mono_assemblies_cleanup): Cleanup more global data.
15049 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
15051 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
15052 ptr_cache and image->modules.
15054 * image.c (mono_image_init): Allocate array_cache lazily.
15056 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15058 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
15059 behavior was changed recently and has bad side effects.
15061 2006-05-05 Zoltan Varga <vargaz@gmail.com>
15063 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
15065 * assembly.c (mono_assembly_close): Remove a debug printf.
15067 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
15069 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
15070 to also allow for temporary references between mono_image_open ()/close ().
15072 * domain.c (get_runtimes_from_exe): Add a FIXME.
15074 2006-05-04 Zoltan Varga <vargaz@gmail.com>
15076 * marshal.c: Fix support for dynamic methods.
15078 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
15080 * marshal.c (mono_marshal_cleanup): New cleanup function.
15082 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
15085 * class.c (mono_class_init): Fix leaking class->nested_classes.
15087 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
15089 * image.c (mono_image_init): Initialize the new cashes.
15091 * image.c (mono_image_close): Destroy the new cashes.
15093 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
15095 * mempool.c (mono_mempool_strdup): New helper function.
15097 * class-internals.h: Add prototype for mono_loader_unlock ().
15099 * domain.c (mono_jit_info_table_find): Fix a warning.
15100 (mono_debugger_check_runtime_version): Ditto.
15102 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
15103 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
15104 functions to these modules.
15106 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
15109 * marshal.c (mono_free_bstr): Fix a warning.
15111 * assembly.c (mono_assembly_open_full): Fix another small leak.
15113 * object.c: Fix some unload leaks in the remoting code.
15115 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
15118 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
15120 * reflection.c: Fix some unload leaks in dynamic assemblies.
15122 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
15124 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
15125 * marshal.h: Add BSTR support on Win32
15126 * icall.c: Add BSTR icalls
15127 * metadata.h: Add BSTR enums
15129 2006-04-28 Miguel de Icaza <miguel@novell.com>
15131 Work to catch the crash from #76795 and turn it into an
15132 exception. As I stubbed out pieces of the VisualBasic support,
15133 I found a number of places where the code was failing and I added
15134 checks to those places.
15136 * metadata.c (do_mono_metadata_parse_generic_class): Make this
15137 function return a status code. If we fail to parse the signature
15138 from mono_metadata_parse_generic_inst, return FALSE.
15140 * loader.c (mono_get_method_from_token): If we fail to load the
15141 method (mono_class_get) return NULL.
15143 * (method_from_memberref): Return NULL if we are unable to parse
15144 the method signature
15146 (mono_loader_error_prepare_exception): Since we now use the
15147 loader_error flag internally to stop processing, and obtaining
15148 exceptions that might be thrown will walk this code path the
15149 proper way of going from a MonoLoaderError into a
15150 MonoException was convoluted. This new routine encapsulates the
15151 process of turning the error into an exception and *clearing* the
15154 2006-04-27 Miguel de Icaza <miguel@novell.com>
15156 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
15157 with missing assemblies), and to cope with:
15159 * Missing fieldref from a non-existing assembly.
15160 * Missing methodref from a non-existing assembly.
15162 The first batch of work to address *some* of the issues from 76661.
15164 * object.c (mono_class_create_runtime_vtable): If we fail to
15165 initialize the class raise the exception here.
15167 * metadata.c (mono_class_get_overrides_full): If any methods fail
15168 to load return the failure to the caller.
15170 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
15171 flagging assemblies that failed to load.
15173 Do not crash if we are unable to load the assembly.
15175 (mono_assembly_close): Do nothing with REFERENCE_MISSING
15178 * loader.c (mono_loader_set_error_type_load): Change the
15179 convention to always pass unallocated strings, so we make our own
15180 copies (I know our own code had duplicated strings before, but
15181 this keeps the normal conventions).
15182 (method_from_memberref): Call mono_loader_set_error_method_load
15183 for all possible failures of loading the class.
15184 Remove assert, turn into a loader error.
15186 (mono_loader_error_to_exception): Move this routine from mini
15187 (mini_loader_error_to_exception) there was no need to have that in
15190 * class.c (mono_class_from_typeref): If we were not able to load
15191 the assembly with mono_assembly_load_reference, call the
15192 mono_loader_set_error_type_load to register the problem.
15194 (mono_class_setup_fields): If we fail to load the type from
15195 mono_metadata_parse_type_full, call mono_class_set_failure and
15196 break from the loop.
15198 If class->exception_type is set, we do not layout the fields as
15199 that might crash the runtime, and instead return (from breaking
15200 from the previous loop).
15202 (mono_class_setup_vtable): This now returns a boolean indicating
15203 whether the table was properly setup. The decision is driven by
15204 mono_class_get_overrides_full which might run into non-existing
15207 (mono_class_init): Returns TRUE on success or FALSE if there was a
15208 problem in loading the type (incorrect assemblies, missing
15209 assemblies, methods, etc).
15211 When we call mono_class_setup_fields we also check for a potential
15212 error inside this call (either a class exception or a general
15215 (mono_class_create_from_typedef): If the parent fails to load
15216 (calling mono_class_get_full) return NULL.
15220 calls to mono_metadata_parse_type_full should be checked
15221 everywhere and set the mono_class_set_failure
15222 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
15224 The current patch checks the places where my manually constructed
15225 tests show the errors are showing up, but we should do it
15230 mono_class_init return values should be tested everywhere, like
15231 the previous case this is something that we should audit
15232 everywhere and not only on the cases exposed by the tests I
15235 2006-04-26 Miguel de Icaza <miguel@novell.com>
15237 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
15238 boolean parameter and instead pass the information on `options'
15239 parameter (FileOptions).
15241 * icall.c: Register the new signature for MonoIO.Open.
15243 * debug-helpers.c (dis_one): Trying to understand how coverity
15244 works. Fix Run 5, item 78.
15246 2006-04-26 Dick Porter <dick@ximian.com>
15248 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
15251 2006-04-25 Martin Baulig <martin@ximian.com>
15253 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
15255 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
15256 debugger_thread_created().
15257 (debugger_gc_push_all_stacks): Don't handle the main thread in any
15259 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
15260 (mono_debugger_finalize_threads): New function; undo the effects
15261 of mono_debugger_init_threads().
15262 (mono_debugger_create_all_threads): Removed.
15264 2006-04-24 Zoltan Varga <vargaz@gmail.com>
15266 * image.c (mono_image_close): Tidy up trace messages.
15268 * assembly.c (mono_assembly_close): Ditto.
15270 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
15271 no longer references an already freed assembly. Fixes #78168.
15273 2006-04-21 Dick Porter <dick@ximian.com>
15275 * threads.c (mono_thread_detach): Fix reference counting when
15278 2006-04-21 Zoltan Varga <vargaz@gmail.com>
15280 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
15283 2006-04-19 Zoltan Varga <vargaz@gmail.com>
15285 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
15286 (mono_type_to_stind): Ditto.
15288 * marshal.c: Use the new helper functions to simplify code.
15290 * image.c (mono_image_close): Add some code for help debug assembly unloading
15293 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
15296 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
15297 assembly was already loaded in another appdomain. Fixes #78083.
15299 2006-04-13 Zoltan Varga <vargaz@gmail.com>
15301 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
15302 referenced assemblies.
15303 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
15305 * domain.c (mono_domain_free): Add a trace message.
15307 * appdomain.c (add_assemblies_to_domain): Ditto.
15309 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
15312 2006-04-12 Zoltan Varga <vargaz@gmail.com>
15314 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
15316 2006-04-12 Martin Baulig <martin@ximian.com>
15318 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
15319 `USE_INCLUDED_LIBGC'.
15321 2006-04-12 Zoltan Varga <vargaz@gmail.com>
15323 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
15324 the patch contains ../ and a small directory name later. Hopefully fixes
15327 2006-04-10 Martin Baulig <martin@ximian.com>
15329 Clean up the debugger's thread-handling code.
15331 The debugger's thread-handling code has been moved from
15332 ../mini/debug-debugger.c to threads.c. We now iterate directly
15333 over the `threads' hash, keep track of exiting threads and also
15334 use proper locking.
15336 We can now debug XSP and XSP based applications with the debugger.
15338 * object-internals.h (MonoThread): Added `gpointer end_stack'.
15341 (MonoThreadCallbacks): Removed; this was only used by the debugger.
15342 (mono_install_thread_callbacks): Likewise.
15344 * threads.c (mono_thread_callbacks): Removed.
15345 (debugger_thread_created, debugger_thread_exited): New static functions.
15346 (start_wrapper): Call debugger_thread_created().
15347 (thread_cleanup): Call debugger_thread_exited().
15348 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
15349 (mono_debugger_init_threads): New public function.
15350 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
15351 iterate directly over the `threads' hash and also use proper locking.
15353 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
15355 * mono-debug-debugger.h
15356 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
15358 2006-04-10 Zoltan Varga <vargaz@gmail.com>
15360 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
15361 argument type=array. Fixes #78057.
15363 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
15365 * culture-info-table.h : regenerated. Fixed bug #69652.
15367 2006-04-07 Zoltan Varga <vargaz@gmail.com>
15369 * loader.c metadata.c: Reapply a variant r59116.
15371 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
15373 * class.c (mono_class_setup_interface_offsets): New internal function.
15375 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
15376 interfaces too. Fixes #77398.
15378 * reflection.c (encode_cattr_value): Add support for
15379 parameter type=object, argument type=array.
15380 (load_cattr_value): Ditto. Fixes #77916.
15382 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
15383 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
15385 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
15386 a byval char array and CharSet is Ansi.
15388 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
15390 2006-04-06 Zoltan Varga <vargaz@gmail.com>
15392 * metadata.c: Add some locking comments.
15394 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
15396 (mono_metadata_free_method_signature): Don't free the signature itself.
15398 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
15400 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
15401 reference the same MonoImage.
15402 (mono_assembly_load_from_full): Add an assert.
15404 2006-04-05 Zoltan Varga <vargaz@gmail.com>
15406 * image.c (mono_image_close): Don't put the image we are about to free into the
15407 loaded_images_guid_hash.
15409 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
15410 to reduce code duplication.
15412 * marshal.c: Register the native functions called by this module as icalls, to
15413 somewhat centralize the creation of MonoMethodSignature's.
15415 * loader.c (mono_method_signature): Add a cache for method signatures.
15417 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
15418 the parameter attributes of a method.
15419 (mono_metadata_parse_method_signature_full): Refactored the computation of
15420 parameter attributes into a separate function. Also avoid one allocation in
15423 * assembly.c (mono_assembly_close): Ditto.
15425 * image.c (mono_image_close): Log trace messages with INFO level.
15427 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
15429 * image.c reflection.c: Correct reference counting of image modules.
15431 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
15432 of this function from the image mempool.
15434 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
15435 to allow more cached types to be used.
15437 * mono-debug.c (mono_debug_add_method): Appled patch from
15438 David S. Miller <davem@sunset.davemloft.net>: Access
15439 minfo->lexical_blocks[] entry elements using read32().
15441 2006-04-04 Zoltan Varga <vargaz@gmail.com>
15443 * loader.c (mono_free_method): No longer free the method header for non-dynamic
15444 methods as it is allocated from the mempool.
15446 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
15449 * metadata-internals.h: Add comments describing the reference counting scheme
15450 used for MonoImage and MonoAssembly.
15452 * image.c assembly.c reflection.c: Rework reference counting of images and
15453 assemblies so they are freed when the runtime is shut down. Free some
15454 additional memory structures when an image is unloaded.
15456 2006-04-03 Zoltan Varga <vargaz@gmail.com>
15458 * class.c loader.c reflection.c: Allocate more data structures in
15461 2006-03-31 Miguel de Icaza <miguel@novell.com>
15464 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
15465 build on pre glib 2.4 systems.
15467 2006-03-31 Zoltan Varga <vargaz@gmail.com>
15469 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
15471 * icall.c: Fix some warnings.
15473 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
15475 * culture-info-table.h : regenerated.
15477 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
15479 * threads.c, object-internals.h, verify.c: changed the culture caching
15480 code to use a normal MonoArray for storage so the GC can keep track of
15481 them easily. Fixed bits of the cache logic, too and simplified the
15484 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
15486 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
15487 thread for non-Boehm GCs.
15489 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
15491 * domain.c, object.c, domain-internals.h: reduce the amount of memory
15492 needed to keep track of the data for static fields.
15494 2006-03-29 Raja R Harinath <rharinath@novell.com>
15497 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
15498 for interface classes. Use 'num_methods' instead.
15499 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
15500 before using '->vtable_size' field.
15502 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
15504 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
15505 doesn't contain managed pointers, so use a normal hashtable.
15507 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
15509 * reflection.c, class-internals.h, domain.c: fixed handling of types
15510 used as values for objects in custom attributes (bug #77915):
15512 2006-03-24 Martin Baulig <martin@ximian.com>
15514 * class.c (mono_class_setup_fields): Added support for generic
15515 instances; fixes #77580.
15517 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15519 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
15521 2006-03-24 Dick Porter <dick@ximian.com>
15523 * file-io.c (get_file_attributes): More stat macro breakage.
15526 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
15528 * profiler.c: added the file=filename option in the default profiler
15529 to output the profile data to filename.
15531 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15533 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
15536 2006-03-22 Martin Baulig <martin@ximian.com>
15538 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
15539 allocated `MonoClassField *' in `fb->handle'.
15541 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
15543 * class.c, image.c, metadata-internals.h: implemented new mechanism to
15544 allocate interface ID to save memory and allow better ID reuse on
15545 appdomain unload. setup_generic_vtable () removal from Martin.
15547 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
15549 * object.h, appdomain.c, domain.c, exception.c, icall.c,
15550 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
15551 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
15552 write barriers for reference stores with managed objects accessed with
15553 C structures in the runtime and in embedding programs.
15555 2006-03-20 Raja R Harinath <rharinath@novell.com>
15557 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
15558 'interface_id' and 'max_interface_id' fields of MonoClasses
15559 representing open generic types.
15561 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
15563 * object.h, object.c, icall.c: added functions to deal with
15564 storing valuetypes that contain references in managed objects.
15565 * reflection.c, string-icalls.c, threads.c, marshal.c: small
15566 fixes and comments around uses of mono_array_addr ().
15568 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
15570 * object.h, icall.c, monitor.c: object.GetHashCode ()
15571 implementation that supports the moving garbage collector.
15573 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
15575 * icall.c, threads-types.h, threads.c: implemented finalizer for
15576 LocalDataStoreSlot.
15578 2006-03-15 Zoltan Varga <vargaz@gmail.com>
15580 * metadata.c (mono_type_size): Add a fixme.
15581 (mono_type_stack_size): Ditto.
15583 * object-internals.h (MonoReflectionAssemblyBuilder): Added
15584 'type_forwarders' field.
15586 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
15587 attribute from net 2.0.
15589 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
15592 * class.c (mono_class_setup_fields): Fix a warning.
15594 * class.c (mono_class_from_name): Add support for assemblyref entries
15595 in the EXPORTEDTYPE table.
15597 * reflection.c: Add support for handling type forwarders under net 2.0.
15599 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15601 2006-03-14 Zoltan Varga <vargaz@gmail.com>
15603 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
15604 overwriting entries in ModuleBuild->types, also clean up the code
15605 a little. Fixes #77774.
15607 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
15609 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
15610 load friend assembly info when present.
15612 2006-03-14 Raja R Harinath <rharinath@novell.com>
15614 Fix crasher on gtest-158.cs.
15615 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
15616 the return value if the MonoClass we want is yet in an
15617 inconsistent state.
15618 * class.c (mono_class_create_from_typedef): Add an comment
15619 explaining an order dependency between mono_class_setup_parent and
15620 mono_class_setup_mono_type.
15622 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
15624 * class.c: documentation updates and events bug fix.
15626 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
15628 * class.c: some cleanup, locking fixes.
15630 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15632 * class.c: fix the generics code to setup nested
15633 type info to the instantiated type (bug #77770).
15635 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
15637 * marshal.c: fixed a few type correctness issues.
15639 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15641 * loader.c: the Set/Get/Addrtess array methods should be public.
15643 2006-03-11 Zoltan Varga <vargaz@gmail.com>
15645 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
15647 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
15650 2006-03-10 Zoltan Varga <vargaz@gmail.com>
15652 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
15654 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
15656 * mempool.c (mono_mempool_alloc): Speed this up a bit.
15657 (mono_mempool_alloc0): Ditto.
15659 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15662 (create_object_from_sockaddr): it was allocating 4 extra bytes
15663 for the AF_UNIX data. Fixes bug #77747.
15665 2006-03-09 Zoltan Varga <vargaz@gmail.com>
15667 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
15669 2006-03-09 Dick Porter <dick@ximian.com>
15671 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
15672 Fixes bug 76966 again.
15674 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
15676 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
15678 * appdomain.c: Bumped corlib version to 48 (due to r57532)
15680 2006-03-07 Martin Baulig <martin@ximian.com>
15683 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
15685 2006-03-07 Martin Baulig <martin@ximian.com>
15688 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
15689 regression introduced in r56970; see gtest-252.cs.
15691 * loader.c (mono_get_method_constrained): Correctly handle generic
15692 methods; see gtest-253.cs.
15694 2006-03-04 Zoltan Varga <vargaz@gmail.com>
15696 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
15698 2006-03-04 Martin Baulig <martin@ximian.com>
15700 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
15701 compute the parent type at runtime, just like we're already doing
15705 (mono_reflection_bind_generic_parameters): Don't compute the
15706 parent type anymore.
15708 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
15710 2006-03-04 Martin Baulig <martin@ximian.com>
15712 * mono-debug-debugger.h
15713 (mono_debugger_create_notification_function): Allocate memory at
15714 runtime and return a pointer to it.
15716 2006-03-03 Zoltan Varga <vargaz@gmail.com>
15718 * assembly.c: Fix windows build.
15720 * assembly.c: Fix build.
15722 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
15724 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
15726 2006-03-03 Dick Porter <dick@ximian.com>
15729 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
15730 Check parameters before dereferencing them. Fixes Aaron's part of
15733 2006-03-03 Raja R Harinath <rharinath@novell.com>
15735 Fix performance regression.
15736 * loader.c (find_method_in_class): Add 'from_class' argument.
15737 Rename 'klass' argument to 'in_class'. The signature is compared
15738 against the method in 'in_class', and the corresponding method is
15739 returned from 'from_class'.
15740 (find_method): Walk both 'in_class' and 'from_class' in parallel.
15741 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
15742 type definition and generic instantiation in parallel.
15743 (mono_get_method_constrained): Update to changes.
15745 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
15747 * threads.c: make sure the domain is correct, too when doing
15748 mono_thread_attach ().
15750 2006-03-01 Zoltan Varga <vargaz@gmail.com>
15752 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
15753 windows. Fixes #77683.
15755 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
15757 * object.h, *: introduced specific way to set elements of an array
15758 of references to be used as write barrier. Still need to audit the
15759 uses of mono_array_addr.
15761 2006-03-01 Miguel de Icaza <miguel@novell.com>
15763 * object-internals.h: New field to cache the assmebly name, patch
15764 from Tambet Ingo (tambet@ximian.com)
15766 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
15768 * decimal.h, class-internals.h, metadata-internals.h,
15769 file-io.h: mark a few function declarations as internal, to
15770 reduce the number of PLT entries.
15772 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15774 * file-io.c: fix typo in warning message.
15776 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
15778 * loader.c: on unix, lookup the "*A" version of a function
15779 if charset is auto as a second option before failing.
15781 2006-02-28 Raja R Harinath <rharinath@novell.com>
15783 * class.h (mono_class_inflate_generic_method): Revert to two
15785 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
15786 (mono_class_inflate_generic_method_full): Add.
15787 * class.c (mono_class_inflate_generic_method_full): Rename from
15788 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
15789 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
15790 * loader.c, reflection.c: Update to changes.
15792 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
15794 * icall.c: const fixes and small improvements.
15796 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15798 * threadpool.c: for asynchronous connect(), enable the same workaround
15799 for BSD 6 as for the Mac. Fixes bug #77637.
15801 2006-02-24 Zoltan Varga <vargaz@gmail.com>
15803 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
15804 formatted classes. Fixes #77524.
15806 2006-02-24 Raja R Harinath <rharinath@novell.com>
15808 * class.c (inflate_generic_type): Add a couple more
15809 micro-optimizations.
15810 (inflate_generic_context): Don't use the 'gmethod' from
15812 (mono_class_inflate_generic_method): If the method has generic
15813 parameters, but the passed-in context doesn't have a 'gmethod',
15814 create one. Use the possibly simplified generic instantiation
15815 from the declaring class instead of the one passed in.
15817 2006-02-24 Raja R Harinath <harinath@gmail.com>
15819 Make generic method signature and method header handling lazy.
15820 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
15821 (inflate_generic_header): Likewise.
15822 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
15823 parameter to avoid inflating types.
15824 (mono_get_inflated_method): Empty out.
15825 * class.h (mono_class_inflate_generic_method): Update to changes.
15826 * loader.c (mono_get_method_from_token): Don't parse signature for
15827 generic methods, nor methods of generic classes.
15828 (mono_method_signature): Rename from 'mono_method_signature'.
15829 Inflate signature on demand.
15830 (mono_method_get_header): Inflate method header on demand.
15831 * reflection.c: Update to changes.
15833 2006-02-23 Raja R Harinath <rharinath@novell.com>
15835 * metadata.c (mono_metadata_inflate_generic_inst): If the
15836 instantiation is closed, don't bother expanding it in the new
15838 * class.c (inflate_generic_class): If the generic instantiation
15839 doesn't change after inflation, return the argument itself.
15840 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
15842 (inflate_generic_context): If neither the generic class nor the
15843 generic method instantiations change, return the original context.
15844 * reflection.c (mono_method_get_object): Do
15845 'mono_get_inflated_method' before accessing the ->klass field.
15846 (inflate_mono_method): Don't create a MonoGenericMethod unless
15848 (inflate_method): Don't pass a constructed type as the declaring
15849 type of a methodbuilder.
15851 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
15853 * object.c: fix memory overwrite.
15855 2006-02-22 Dick Porter <dick@ximian.com>
15857 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
15858 it doesn't work any more.
15859 (mono_threads_request_thread_dump): Fix unused variable warnings.
15861 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15863 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
15864 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
15865 the public header file.
15867 2006-02-21 Zoltan Varga <vargaz@gmail.com>
15869 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
15871 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
15873 * class-internals.h, object.c: reduce the size of MonoVTable
15874 and store the interface_offsets array at negative offsets.
15876 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
15878 * metadata.c: tweak table descriptors data structures to reduce
15879 size and runtime relocations.
15881 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
15883 * marshal.c: fix some types and opcodes to be type-safe
15884 in marshaling wrappers.
15886 2006-02-21 Ankit Jain <jankit@novell.com>
15888 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
15890 2006-02-21 Raja R Harinath <rharinath@novell.com>
15892 * metadata.c (get_constraints): Relax debugging checks for monodis.
15894 2006-02-21 Ankit Jain <jankit@novell.com>
15896 * metadata.c (mono_metadata_load_generic_params): Move the code
15897 checking for ambiguous generic params from here to mono/dis/get.c
15898 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
15900 2006-02-21 Raja R Harinath <harinath@gmail.com>
15902 Fix assertion triggered when compiling nemerle.
15903 * class.c (mono_get_shared_generic_inst): Rename from
15904 get_shared_inst and make non-static.
15905 * loader.c (mono_get_shared_generic_method): New. Used to create
15906 the MonoGenericContext-equivalent of a MonoGenericContainer.
15907 (mono_get_method_from_token): Initialize the 'context' field of
15908 the created MonoGenericContainer.
15909 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
15910 * metadata.c (get_constraints): Add sanity check.
15911 * class-internals.h: Add new internal methods.
15913 * reflection.c (verify_safe_for_managed_space): New sanity check.
15914 Currently checks that owner-less generic parameters aren't allowed
15916 (mono_type_get_object): Use it.
15917 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
15918 that are now in mono_type_get_object.
15919 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
15921 2006-02-19 Raja R Harinath <harinath@gmail.com>
15923 * metadata.c (mono_type_create_from_typespec): Rename from
15924 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
15925 argument and caching of types in the generic container.
15926 (unwrap_arrays, find_generic_param): Remove.
15927 * metadata-internals.h: Update.
15928 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
15930 2006-02-18 Zoltan Varga <vargaz@gmail.com>
15932 * class.c (mono_class_get_exception_for_failure): Fix a warning.
15934 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
15935 return values. Fixes #77581.
15937 * class.c (mono_fnptr_class_get): Switch name and name_space.
15939 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
15940 classes and add support for [In, Out] attributes.
15941 (mono_marshal_free_asany): Ditto. Fixes #77524.
15943 2006-02-18 Raja R Harinath <harinath@gmail.com>
15945 * class.c (mono_class_from_generic_parameter): Make more robust to
15946 incomplete MonoGenericContainers from monodis.
15948 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
15950 * class-internals.h: added some more exception types.
15951 * class.c, metadata.c: added a few checks to handle missing
15954 2006-02-17 Raja R Harinath <rharinath@novell.com>
15956 Use owner-less generic-params some more.
15957 * class.c (my_mono_class_from_generic_parameter): Remove.
15958 (mono_class_from_generic_parameter): Handle null image,
15959 param->name and param->owner.
15960 (mono_class_from_mono_type): Update.
15961 (mono_class_create_from_typespec): Remove 'container' parameter.
15962 If that parameter is non-null, the result is always inflated by
15963 'mono_class_get_full' anyway.
15964 (mono_class_get): Rename from _mono_class_get. Remove 'container'
15966 (mono_class_get_full): Update.
15968 * class.c (inflate_generic_type) [GENERICINST]: If the generic
15969 instance is not open, don't bother inflating.
15970 (mono_class_setup_fields): Hoist some loop-invariants. Don't
15971 parse metadata for inflated classes.
15972 (_mono_class_get): Change GenericContext* parameter to
15974 (mono_class_create_from_typespec): Likewise. Simplify, and
15975 implement trivially. All the cases are handled in
15976 mono_class_from_mono_type. Don't inflate returned class.
15977 (mono_class_get_full): Delegate GENERICINST optimization to
15978 inflate_generic_type.
15979 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
15981 2006-02-16 Dick Porter <dick@ximian.com>
15983 * socket-io.c (create_object_from_sockaddr): Fix typo.
15984 (create_sockaddr_from_object): Check array lengths before
15985 potentially accessing items off the end.
15986 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
15987 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
15988 (ves_icall_System_Net_Sockets_Socket_Send_internal)
15989 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
15990 length checks to avoid wraparound overflows.
15991 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
15992 contents of the array of sockets
15993 (hostent_to_IPHostEntry2)
15994 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
15995 Check return value of inet_ntop ().
15996 (addrinfo_to_IPHostEntry): Fix typo
15998 2006-02-16 Raja R Harinath <rharinath@novell.com>
16000 Type metadata parsing doesn't use generic-instantiation information.
16001 * metadata.c (mono_metadata_parse_array_full): Change
16002 MonoGenericContext* parameter to MonoGenericContainer*.
16003 (mono_metadata_parse_type_full): Likewise.
16004 (mono_type_create_from_typespec_full): Likewise.
16005 (mono_metadata_parse_mh_full): Likewise.
16006 (mono_metadata_parse_generic_inst): Likewise.
16007 (do_mono_metadata_parse_generic_class): Likewise.
16008 (do_mono_metadata_parse_type): Likewise.
16009 * metadata-internals.h: Update to changes.
16010 * class.c (mono_class_find_enum_basetype): Likewise.
16011 (mono_class_setup_fields): Likewise.
16012 (mono_class_create_from_typespec): Likewise.
16013 * loader.c (method_from_methodspec): Likewise.
16014 (mono_get_method_from_token): Likewise.
16015 (mono_method_get_header): Likewise.
16017 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16019 * marshal.c: handle additional GENERICINST case (patch from
16020 Thong Nguyen <tum@veridicus.com>).
16021 Fix a few cases where LDIND_I/STIND_I was used for references.
16023 2006-02-16 Raja R Harinath <rharinath@novell.com>
16025 * reflection.c (mono_reflection_get_token): Remove unused variable.
16027 2006-02-16 Martin Baulig <martin@ximian.com>
16029 * reflection.c (mono_reflection_get_token): Add support for fields
16030 in instantiated generic types.
16033 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
16035 2006-02-15 Martin Baulig <martin@ximian.com>
16038 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
16039 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
16040 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
16041 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
16043 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16045 * class.c, metadata.c, metadata.h, object.c, icall.c,
16046 marshal.c: changed mono_type_get_underlying_type () to do
16047 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
16048 Fixed handling of instantiated generic valuetypes (bug #75479).
16050 2006-02-15 Raja R Harinath <rharinath@novell.com>
16052 * metadata.c (mono_metadata_decode_signed_value): Simplify.
16053 Delegate to mono_metadata_decode_value, and work on the returned value.
16055 * icall.c (ves_icall_MonoType_GetGenericArguments):
16056 Add consistency check here too.
16058 2006-02-15 Ankit Jain <jankit@novell.com>
16060 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
16063 2006-02-15 Ankit Jain <jankit@novell.com>
16065 * metadata.c (mono_metadata_decode_signed_value): New function to decode
16066 signed values, used only for representing lower bounds of arrays.
16067 (mono_metadata_parse_array_full): Use new
16068 mono_metadata_decode_signed_value to decode lower bounds.
16070 2006-02-14 Martin Baulig <martin@ximian.com>
16073 (mono_reflection_get_token): Support "MonoGenericMethod" and
16074 "MonoGenericCMethod" and allow generic instances / methods.
16076 2006-02-11 Zoltan Varga <vargaz@gmail.com>
16078 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
16079 to obtain the terminal size using an ioctl.
16081 * object.c (mono_nullable_init): Revert this as nullable reference
16082 types are not valid.
16083 (mono_nullable_box): Ditto.
16085 2006-02-09 Dick Porter <dick@ximian.com>
16087 * threads.c (mono_thread_detach): Drop a reference to the thread
16090 2006-02-09 Zoltan Varga <vargaz@gmail.com>
16092 * object.c (mono_nullable_init): Handle nullable reference types.
16093 (mono_nullable_box): Ditto. Fixes #77446.
16095 2006-02-07 Martin Baulig <martin@ximian.com>
16097 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
16099 2006-02-07 Ankit Jain <jankit@novell.com>
16101 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
16102 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
16103 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
16104 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
16105 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
16106 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
16108 2006-02-02 Zoltan Varga <vargaz@gmail.com>
16110 * class.c (mono_class_create_generic): Set type_token as well.
16112 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
16113 compatible with MS.
16115 2006-02-02 Martin Baulig <martin@ximian.com>
16117 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
16118 has never been used so far.
16120 2006-02-02 Martin Baulig <martin@ximian.com>
16122 * mono-debug-debugger.h: Changed comment at the top of this file;
16123 the header is not installed, but it's safe to #include it from
16126 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
16127 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
16129 2006-02-02 Martin Baulig <martin@ximian.com>
16132 (MonoSymbolTable): Removed the `metadata_info' field.
16135 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
16137 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16138 (mono_debugger_add_builtin_types): Removed.
16139 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
16140 (mono_debugger_create_notification_function): We now operate on a
16141 pre-allocated area; take a `gpointer' and return `void'.
16143 * mono-debug-debugger.c
16144 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
16145 (mono_debugger_add_builtin_types): Removed.
16147 2006-02-02 Martin Baulig <martin@ximian.com>
16149 * threads.c (mono_debugger_create_all_threads): New public method.
16151 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16153 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
16154 breaks on several platforms.
16156 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
16158 * assembly.c: the VS.NET build doesn't supply default values for
16159 MONO_ASSEMBLIES and MONO_CFG_DIR.
16161 2006-02-01 Zoltan Varga <vargaz@gmail.com>
16163 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
16166 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
16168 * loader.c (method_from_memberref): Fix a warning.
16170 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
16172 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
16173 with explicit layout. Fixes #77433.
16175 2006-01-31 Zoltan Varga <vargaz@gmail.com>
16177 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
16178 max_interface_id is initialized before using it. Fixes #77398.
16179 (ves_icall_Type_GetInterfaces): Ditto.
16181 2006-01-30 Raja R Harinath <rharinath@novell.com>
16183 * metadata.c (mono_metadata_parse_method_signature_full): Don't
16184 allocate memory for parameter attributes when parsing memberref
16186 * loader.c (mono_loader_set_error_method_load): Don't warn.
16187 (method_from_memberref): Ensure MissingMethodException gets thrown
16188 if method is not found. Make warning more informative.
16190 2006-01-29 Raja R Harinath <harinath@gmail.com>
16193 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
16194 return true if is byref.
16195 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
16196 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
16197 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
16199 2006-01-27 Raja R Harinath <rharinath@novell.com>
16201 Fix tests/find-method.2.il
16202 * loader.c (find_method, find_method_in_class): Remove is_inflated
16203 argument. Revert 2006-01-18 change.
16204 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
16205 is generic, search for method in its generic definition.
16206 * class.c (mono_class_setup_vtable_general): Print generic
16207 arguments of generic types in debugging printf.
16209 2006-01-26 Zoltan Varga <vargaz@gmail.com>
16211 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
16213 * threads.c (mono_threads_request_thread_dump): New helper function.
16215 2006-01-25 Raja R Harinath <rharinath@novell.com>
16217 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
16219 2006-01-25 Ankit Jain <jankit@novell.com>
16221 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
16222 move definition to ..
16223 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
16225 2006-01-25 Ankit Jain <jankit@novell.com>
16226 Raja R Harinath <rharinath@novell.com>
16228 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
16229 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
16232 2006-01-25 Martin Baulig <martin@ximian.com>
16234 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
16235 `MonoDebuggerThread' into debug-debugger.c.
16237 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
16239 * profiler.c: fix printing of data.
16241 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
16243 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
16244 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
16246 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16248 * object.c: fix deadlock related to string interning.
16250 2006-01-23 Martin Baulig <martin@ximian.com>
16252 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16254 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
16256 2006-01-23 Martin Baulig <martin@ximian.com>
16258 * mono-debug.h: Moved the prototypes of some functions which are
16259 used by the JIT here from mono-debug-debugger.h.
16261 2006-01-21 Martin Baulig <martin@ximian.com>
16263 * Makefile.am: Don't install mono-debug-debugger.h.
16265 2006-01-21 Martin Baulig <martin@ximian.com>
16267 * mono-debug-debugger.h: Enforce the private status of this header
16268 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
16269 Moved some stuff from mono-debugger-jit-wrapper.h here.
16271 2006-01-20 Raja R Harinath <rharinath@novell.com>
16273 * class.c (mono_class_from_typeref): Add a sanity test to help
16274 catch lack of assembly load/search hooks.
16276 2006-01-19 Zoltan Varga <vargaz@gmail.com>
16278 * marshal.c (emit_struct_conv): Relax the fields with same offset
16279 check even more. Fixes #77230.
16281 2006-01-18 Martin Baulig <martin@ximian.com>
16283 * loader.c (find_method_in_class): Added `gboolean is_inflated'
16284 argument; if false, we compare the uninstantiated signatures.
16285 (method_from_memberref): Compare the uninstantiated signatures;
16288 2006-01-18 Robert Jordan <robertj@gmx.net>
16290 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
16291 Clear the weak link. Fixes bug #77170.
16293 * gc.c (mono_gchandle_free):
16294 Reflect *-gc.c changes (tiny optimization).
16296 2006-01-18 Zoltan Varga <vargaz@gmail.com>
16298 * metadata.c (mono_metadata_signature_dup): Applied patch from
16299 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
16302 2006-01-17 Zoltan Varga <vargaz@gmail.com>
16304 * marshal.c (emit_struct_conv): Allow fields with the same offset when
16305 marshalling from native to managed code. Fixes #77230.
16307 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16309 * threadpool.c: fix problem (Mac only) when more than one asynchronous
16310 connect. Fixes bug #77020.
16312 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16314 * class.c: fixed id assignement for nested interfaces (bug #77275).
16315 Added also better info for --print-vtable debugging.
16317 2006-01-12 Martin Baulig <martin@ximian.com>
16319 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
16320 interfaces on-the-fly; fixes #76625.
16322 * class-internals.h
16323 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
16324 don't need that anymore.
16326 2006-01-12 Miguel de Icaza <miguel@novell.com>
16329 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
16330 To avoid initing the nested_classes when not needed I turned the
16331 PeerCredData as a toplevel internal class, as it has to be shared
16334 Fixes the CASA issue.
16336 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
16338 * domain.c: Accessors for MonoJitInfo
16340 * profiler-private.h: Add jitinfo to the end jit hook
16342 * profiler.[ch]: Define new hooks, called after jitting which give
16343 the MonoJitInfo that was compiled
16345 2006-01-10 Martin Baulig <martin@ximian.com>
16347 * class.c (mono_class_setup_events): Add support for generic
16348 classes; fixes #76440.
16350 2006-01-06 Raja R Harinath <rharinath@novell.com>
16353 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
16354 on passed-in method.
16356 2006-01-03 Zoltan Varga <vargaz@gmail.com>
16358 * object.c (mono_runtime_invoke_array): Add Nullable support.
16360 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
16362 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
16364 * file-io.c: Don't consider sockets as directory and avoid an endless
16365 loop. Fix bug #76966.
16367 2006-01-03 Zoltan Varga <vargaz@gmail.com>
16369 * object.c (mono_nullable_init): New helper function.
16370 (mono_nullable_box): Ditto.
16372 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
16374 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
16376 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
16378 2006-01-02 Zoltan Varga <vargaz@gmail.com>
16380 * class.c (mono_class_is_assignable_from): Make T assignable to
16383 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
16385 * appdomain.c: Bump corlib version to 46.
16386 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
16387 serialization purpose) and changed ves_icall_System_Reflection_
16388 Assembly_get_code_base signature to accept a boolean (to escape, or
16389 not, the assembly code base).
16391 2005-12-23 Dick Porter <dick@ximian.com>
16395 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
16396 CreateEvent icall now returns "created" boolean parameter.
16398 2005-12-22 Zoltan Varga <vargaz@gmail.com>
16400 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
16403 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
16404 when attr_klass is an interface. Fixes #77045.
16406 2005-12-20 Zoltan Varga <vargaz@gmail.com>
16408 * marshal.c (emit_struct_conv): Fix previous patch.
16410 * marshal.c (emit_struct_conv): Add a check for fields with the same
16413 2005-12-20 Raja R Harinath <rharinath@novell.com>
16415 Fix regression in Mono.C5.
16416 * class.c (mono_class_create_generic): If 'klass' is an interface
16417 set up the interface offsets.
16418 (mono_class_is_assignable_from): Don't throw away generic arguments.
16420 2005-12-19 Raja R Harinath <rharinath@novell.com>
16422 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
16425 2005-12-15 Raja R Harinath <rharinath@novell.com>
16427 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
16429 (do_mono_metadata_parse_generic_class): Don't pass the current
16430 generic context when parsing the type being instantiated: it
16431 cannot use it, anyway.
16433 * loader.c (method_from_memberref): Don't inflate a signature if
16434 it doesn't contain any type parameters.
16436 2005-12-15 Zoltan Varga <vargaz@gmail.com>
16438 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
16440 2005-12-14 Martin Baulig <martin@ximian.com>
16443 (mono_type_get_name_recurse): Don't return null for type
16444 parameters and open generic classes.
16445 (mono_class_setup_methods): Don't exclude generic instances.
16446 (mono_get_unique_iid): Use different IDs for different
16447 instantiations of the same generic type.
16448 (mono_class_setup_vtable): Only use setup_generic_vtable() for
16449 open generic instances; create a normal vtable for closed generic
16451 (mono_class_setup_vtable_general): We're now also called for
16452 closed generic instances.
16455 (mono_reflection_bind_generic_parameters): Correctly use
16456 mono_metadata_lookup_generic_inst() everywhere.
16458 2005-12-14 Zoltan Varga <vargaz@gmail.com>
16460 * object.c (mono_class_create_runtime_vtable): Call
16461 mono_class_setup_vtable ().
16463 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
16465 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
16468 * loader.c (mono_loader_set_error_type_load): Print the type load
16469 warnings to the console so they are more visible to the user.
16470 (mono_loader_set_error_method_load): Ditto.
16472 * reflection.c (ensure_runtime_vtable): Revert the last change as it
16475 * reflection.c (ensure_runtime_vtable): Fix build.
16477 * reflection.c (ensure_runtime_vtable): Disable an optimization which
16478 doesn't work in all cases.
16480 2005-12-13 Zoltan Varga <vargaz@gmail.com>
16482 * object.c (mono_array_new_full): Treat a single dimensional array
16483 with 0 lower bounds as an szarray. Fixes #76973.
16485 * reflection.c (custom_attr_visible): Really fix this.
16487 2005-12-12 Zoltan Varga <vargaz@gmail.com>
16489 * reflection.c (custom_attr_visible): Allow nested public attributes
16492 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
16495 2005-12-12 Raja R Harinath <harinath@gmail.com>
16497 * class.c (set_generic_param_owner): Delete.
16498 (mono_class_create_from_typedef): Don't set ->owner field of
16499 generic parameters to "param containers" of enclosing classes.
16500 * reflection.c (mono_reflection_initialize_generic_parameter):
16503 2005-12-11 Zoltan Varga <vargaz@gmail.com>
16505 * reflection.c (custom_attr_visible): Fix build.
16507 2005-12-10 Zoltan Varga <vargaz@gmail.com>
16509 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
16510 private attributes.
16512 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
16513 handling of null parameter defaults.
16515 2005-12-09 Raja R Harinath <rharinath@novell.com>
16517 * class.c (mono_class_from_generic_parameter): Don't set
16518 klass->generic_container.
16519 (my_mono_class_from_generic_parameter): Likewise.
16521 2005-12-07 Zoltan Varga <vargaz@gmail.com>
16523 * reflection.c (load_public_key): Fix a warning.
16524 (method_encode_code): Fix unaligned accesses.
16526 2005-12-07 Martin Baulig <martin@ximian.com>
16528 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
16531 (write_generic_param_entry): Encode our custom attrs.
16533 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
16535 2005-12-07 Martin Baulig <martin@ximian.com>
16537 * reflection.c (encode_new_constraint): Removed; we don't use the
16538 `NewConstraintAttribute' anymore.
16540 2005-12-06 Zoltan Varga <vargaz@gmail.com>
16542 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
16543 not fire a TypeResolve event when Assembly.GetType () is called.
16545 2005-12-05 Ben Maurer <bmaurer@ximian.com>
16547 Beginning of support for nullable types in the runtime. Parts of
16548 this patch are from Martin.
16550 * appdomain.c (MONO_CORLIB_VERSION): Bump
16552 * domain.c (mono_init_internal): get the nullable type
16554 * class.c (mono_class_is_nullable): New method
16555 (mono_class_get_nullable_param): New mehod
16556 (mono_class_create_generic): In types T? set cast_class to T
16558 * class-internals.h (MonoDefaults): new nullable default class
16559 (mono_class_get_nullable_param, mono_class_get_nullable_param):
16562 2005-12-05 Raja R Harinath <rharinath@novell.com>
16564 * metadata.c (select_container): New. Refactor code to select the
16565 appropriate GenericContainer given the type of generic parameter
16566 we are looking for.
16567 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
16568 not a MonoGenericContext. Use select_container. Update parameters.
16569 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
16570 and MONO_TYPE_MVAR.
16571 (unwrap_arrays): Remove duplicate tests.
16572 (find_generic_param): Rename from 'has_same_context'. Now walks a
16573 generic instantiated class to find any arguments that are generic
16575 (mono_type_create_from_typespec_full): Use find_generic_param to
16576 avoid evicting some generic instantiations from the typespec
16579 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
16581 * reflection.c: fixed writing of doubles on ARM FPA.
16583 2005-12-02 Robert Jordan <robertj@gmx.net>
16585 * icall.c: Fixed EventInfo.ReflectedType (#76829).
16587 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16589 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
16590 least on SUSE 10 they are not the same (on debian, they are just the
16593 2005-12-01 Raja R Harinath <rharinath@novell.com>
16595 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
16596 DeclaringType for VARs and MVARs.
16597 * class.c (set_generic_param_owner): Fix initialization of owner
16600 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
16602 * icall.c: fixed Enum.ToObject() to correctly convert the values.
16604 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16606 * threadpool.c: workaround for a bug that shows up on the Mac:
16607 select()+connect() on a blocking socket is not like it should
16608 be, so we proceed to connect() in that case, wasting the I/O
16609 threadpool thread until connect succeedes. Fixes bug #75436.
16611 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16613 * threadpool.c: fix typo when setting file descriptor states.
16615 2005-11-28 Raja R Harinath <rharinath@novell.com>
16617 * class-internals.h (MonoGenericContainer.is_signature): Remove.
16618 * metadata.c (mono_metadata_parse_method_signature_full): Don't
16619 create a temporary signature container.
16620 (mono_metadata_parse_generic_param): Update to changes.
16621 (mono_type_create_from_typespec_full): Update to changes.
16622 * loader.c (method_from_memberref): Don't use a
16623 MonoGenericContainer while parsing a memberref signature.
16624 (method_from_methodspec): Remove dead-store of the 'container'
16625 variable. It's overwritten before use.
16627 * metadata.c (mono_type_create_from_typespec_full): Make debugging
16629 (mono_metadata_parse_generic_param): Likewise.
16630 * loader.c (find_method_in_class): Does not need a
16631 MonoGenericContainer. Use 'mono_method_signature' rather than
16632 'mono_method_signature_full'.
16633 (find_method, mono_get_method_constrained, method_from_memberref):
16636 * metadata.c (mono_type_create_from_typespec_full): Ensure that
16637 owner-less generic-parameters are never evicted from the typespec
16640 * loader.c (method_from_memberref): Don't use the current context
16641 when parsing signatures.
16642 (method_from_methodspec, mono_get_method_from_token): Update to changes.
16644 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
16645 side-effects in g_assert.
16646 * loader.c (mono_get_method_from_token): Resolve klass earlier so
16647 that we don't potentially lose information.
16649 2005-11-26 Dick Porter <dick@ximian.com>
16652 * threads.c: icalls to implement basic (ie, not named)
16653 System.Threading.Semaphore.
16655 2005-11-24 Dick Porter <dick@ximian.com>
16658 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
16659 Use GetProcessId() if it's available.
16661 2005-11-23 Zoltan Varga <vargaz@gmail.com>
16663 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
16665 2005-11-23 Raja R Harinath <rharinath@novell.com>
16666 Ankit Jain <jankit@novell.com>
16668 * loader.c (mono_get_method_from_token): Initialize 'method' field
16669 of all generic parameters before parsing the signature. Remove
16670 code that "fixed"-up MVAR references.
16672 2005-11-23 Ankit Jain <jankit@novell.com>
16674 * metadata.c (mono_metadata_has_generic_params):
16675 (mono_metadata_load_generic_param_constraints):
16676 (mono_metadata_load_generic_params): Move duplicate code ...
16677 (mono_metadata_get_generic_param_row): ... here. Returns the
16678 first row-id in GenericParam table for a given owner (token).
16679 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
16682 2005-11-23 Raja R Harinath <rharinath@novell.com>
16683 Ankit Jain <jankit@novell.com>
16685 * metadata.c (mono_metadata_class_equal): Pass signature_only when
16686 comparing VARs too.
16687 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
16688 type->data.generic_param only if the type is an MVAR.
16689 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
16690 leak owner-less VARs and MVARs into managed space.
16692 2005-11-21 Martin Baulig <martin@ximian.com>
16694 * class-internals.h
16695 (MonoMethod): Moved the `generic_container' here from
16696 `MonoMethodNormal' since we now also need it for
16697 `MonoMethodPInvoke';
16698 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
16699 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
16700 an union containing both `MonoMethodNormal' and
16701 `MonoMethodPInvoke'.
16704 (mono_get_method_from_token): Allow implementing generic methods
16708 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
16711 2005-11-17 Dick Porter <dick@ximian.com>
16715 * process.c: Split the Process Start_internal icall into
16716 ShellExecuteEx_internal and CreateProcess_internal, which are
16717 called depending on whether UseShellExecute is true. Fixes bug
16720 * appdomain.c (MONO_CORLIB_VERSION): Incremented
16722 2005-11-17 Zoltan Varga <vargaz@gmail.com>
16724 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
16725 'msize' parameters, use the information in 'mspec' instead.
16726 (emit_object_to_ptr_conv): Ditto.
16728 * marshal.c (emit_struct_conv): Handle explicit layout structs with
16729 fields out of order. Fixes #76733.
16731 2005-11-17 Ankit Jain <jankit@novell.com>
16733 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
16735 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
16737 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
16740 2005-11-16 Zoltan Varga <vargaz@gmail.com>
16742 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
16743 for types with non-auto layout. Fixes #76717.
16745 2005-11-16 Ankit Jain <jankit@novell.com>
16747 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
16748 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
16749 if generic_context is null.
16750 (mono_metadata_generic_param_equal): param->owner can be null.
16751 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
16754 2005-11-16 Zoltan Varga <vargaz@gmail.com>
16756 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
16759 2005-11-15 Martin Baulig <martin@ximian.com>
16761 * object.c (set_value): Use mono_class_from_mono_type() instead of
16762 the hack for generic instances; fixes #76136.
16764 2005-11-15 Zoltan Varga <vargaz@gmail.com>
16766 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
16769 * image.c (load_metadata_ptrs): Initialize the new fields.
16771 * reflection.c (create_dynamic_mono_image): Ditto.
16773 * reflection.c (build_compressed_metadata): Use the new fields.
16775 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
16778 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
16781 2005-11-15 Ankit Jain <jankit@novell.com>
16782 Raja R Harinath <harinath@gmail.com>
16784 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
16785 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
16786 new per-generic_container cache if the cached MonoType's context matches
16787 the current context.
16788 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
16789 to the expected context.
16790 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
16792 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
16794 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
16795 we changed the signature of an icall.
16796 * icall.c: Modify to mono_double_ParseImpl return true/false
16797 depending on the success, instead of throwing the exception. This will
16798 help us in Double.TryParse methods.
16800 2005-11-14 Zoltan Varga <vargaz@gmail.com>
16802 * marshal.c (emit_marshal_object): Throw an exception when
16803 marshalling 'object' instead of crashing. Fixes #76696.
16805 2005-11-11 Zoltan Varga <vargaz@gmail.com>
16807 * class-internals.h: Add prototype for mono_type_get_full_name ().
16809 2005-11-11 Dick Porter <dick@ximian.com>
16811 * threads.c (mono_thread_manage): Make sure the main thread has
16812 abandoned all its mutexes when cleaning up. Fixes bug 74680.
16814 2005-11-11 Zoltan Varga <vargaz@gmail.com>
16816 * loader.c (mono_loader_set_error_type_load): Log a warning to the
16817 console about the missing type.
16818 (mono_loader_set_error_method_load): Ditto.
16820 2005-11-09 Miguel de Icaza <miguel@novell.com>
16822 * mono-config.c (mono_get_config_dir): Set the system defaults if
16825 * assembly.c (mono_set_dirs): New API entry point to set the
16826 assembly and the config directory in one call
16828 2005-11-09 Zoltan Varga <vargaz@gmail.com>
16830 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
16831 the ftnptr was created from a delegate in a domain other than the
16832 current domain. Fixes #75377.
16834 * exception.h exception.c: Add mono_get_exception_not_supported ().
16836 2005-11-08 Martin Baulig <martin@ximian.com>
16838 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
16840 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
16842 * security-manager.h: Added definitions to deal with strongname key
16843 pairs bigger (and smaller) than 1024 bits.
16844 * reflection.c: Remove hardcoded strongname size (128 bytes) and
16845 adjust wrt the public key length being used.
16847 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
16849 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
16850 Windows build (r51396-51397).
16852 2005-11-03 Martin Baulig <martin@ximian.com>
16854 * class.c (mono_class_setup_vtable_general): Also add generic
16855 methods to the vtable; fixes #76581.
16857 2005-11-01 Miguel de Icaza <miguel@novell.com>
16859 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
16860 sure that we lookup GetString method from the System.Text.Encoding
16861 class, not the derived class or we get an empty method.
16863 Fixed class #76612.
16865 2005-10-25 Miguel de Icaza <miguel@novell.com>
16867 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
16868 if it has been previously set (embedders).
16870 Make mono_set_rootdir available also on Unix.
16872 005-10-24 Robert Jordan <robertj@gmx.net>
16874 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
16876 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
16878 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
16879 only calls which are made to native code use this flag.
16881 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
16883 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
16885 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
16886 Add support for FieldBuilders.
16888 2005-10-29 Martin Baulig <martin@ximian.com>
16891 (mono_debug_using_mono_debugger): New public method; returns
16892 whether we're running inside the debugger.
16894 2005-10-27 Zoltan Varga <vargaz@gmail.com>
16896 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
16897 for Method/Constructor/FieldBuilders.
16899 2005-10-26 Zoltan Varga <vargaz@gmail.com>
16901 * reflection.c (module_add_cattrs): Save custom attributes for global methods
16902 and fields as well.
16904 2005-10-26 Martin Baulig <martin@ximian.com>
16906 * mono-debug-debugger.c
16907 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
16909 2005-10-24 Raja R Harinath <harinath@gmail.com>
16911 * icall.c (base64_to_byte_array): Don't pass an out-of-range
16912 integer to isspace.
16914 2005-10-21 Zoltan Varga <vargaz@gmail.com>
16916 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
16917 when passing valuetypes byref. Fixes #76502.
16919 2005-10-19 Jackson Harper <jackson@ximian.com>
16921 * profiler.c: Don't put a . in front of types that are not in a
16924 2005-10-18 Zoltan Varga <vargaz@gmail.com>
16926 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
16928 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
16930 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
16932 (mono_marshal_get_ldflda_wrapper): Fix a warning.
16934 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
16936 * assembly.c metadata-internals.h icall.c: Define an additional
16937 parameter for mono_assembly_name_parse_full, so we can avoid creating
16938 S.R.AssemblyName.Version when no version info wasn't passed.
16940 2005-10-09 Miguel de Icaza <miguel@novell.com>
16942 * class.c (mono_type_get_full_name): Reimplement method that was
16945 * image.c: Some docs
16947 2005-10-10 Zoltan Varga <vargaz@gmail.com>
16949 * profiler.c (output_newobj_profile): Fix printing of Total memory
16952 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
16954 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
16956 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
16958 * threads.c: remove debug output.
16960 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
16962 * threads.c (mono_thread_manage): Fix crashes if more than 64
16963 threads need to be aborted. Hopefully fixes #75899.
16965 * assembly.c (mono_stringify_assembly_name): New helper function.
16967 * class.c: Use mono_stringify_assembly_name instead of the similar
16970 * assembly.h assembly.c: Add support for calling a postload search
16971 hook if an assembly cannot be loaded.
16973 * appdomain.c: Register new search hooks which call the AssemblyResolve
16974 events in AppDomain. Fixes #75231
16976 2005-10-07 Martin Baulig <martin@ximian.com>
16978 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
16979 methods without debug info.
16981 2005-10-07 Zoltan Varga <vargaz@gmail.com>
16983 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
16986 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16988 * file-io.c: now that we return symlinks, use lstat and, when the file
16989 is a symbolic link, stat, to get the file attributes. Also avoid the
16990 conversion to/from utf16/external.
16992 2005-10-06 Zoltan Varga <vargaz@gmail.com>
16994 * class.c (mono_class_layout_fields): Compute klass->has_references
16995 correctly if an embedded valuetype is not yet initialized. Fixes
16998 2005-10-04 Martin Baulig <martin@ximian.com>
17001 (mono_metadata_load_generic_param_constraints): New public
17002 function; splitted the constraints loading out from
17003 mono_metadata_load_generic_params().
17005 * class.c (mono_class_create_from_typedef): Call
17006 mono_metadata_load_generic_param_constraints() after setting up
17007 the type and creating our parent; fixes #75329.
17009 2005-10-04 Martin Baulig <martin@ximian.com>
17011 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
17012 non-dynamic parent classes.
17014 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
17016 * file-io.c : win32 build fix (ETXTBSY seems not found).
17018 2005-10-04 Martin Baulig <martin@ximian.com>
17021 (mono_image_get_methodspec_token): Make the cache actually work;
17024 2005-10-04 Martin Baulig <martin@ximian.com>
17026 * class.c (mono_class_name_from_token): Removed the unneccessary
17027 `MonoGenericContext *' argument.
17029 2005-10-04 Martin Baulig <martin@ximian.com>
17032 (method_from_methodspec): Make the caching work again; fixes the
17033 performance regression from #76262.
17035 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17039 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
17040 GetFileSystemEntries that performs the same work but without going
17041 into io-layer, locking, etc.
17043 2005-09-30 Zoltan Varga <vargaz@gmail.com>
17045 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
17046 ThreadState_Stopped as well. Fixes #76047.
17048 2005-09-29 Martin Baulig <martin@ximian.com>
17051 (inflate_generic_context): If the new context has a `gmethod', set
17052 its `container' that that gmethod's `container'.
17055 (mono_metadata_parse_generic_param): Simplify things;
17056 `generic_container = generic_context->container;' is just fine.
17058 * loader.c (method_from_methodspec): Code cleanups.
17060 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17062 * decimal.c: fix warning (and let gcc generate correct
17063 code on ARM with optimizations).
17065 2005-09-28 Martin Baulig <martin@ximian.com>
17068 (method_from_memberref): Added `MonoGenericContext *class_context'
17069 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
17070 (method_from_methodspec): If we're a memberref, use the enclosing
17071 context when parsing its parent. Fixes #76262; see gtest-206.cs.
17073 2005-09-28 Martin Baulig <martin@ximian.com>
17075 * object.c (mono_runtime_invoke_array): Added support for
17076 MONO_TYPE_GENERICINST; fixes #75917.
17078 2005-09-27 Martin Baulig <martin@ximian.com>
17080 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
17081 `k->byval_arg.type' to determine the actual type.
17083 * loader.c (method_from_methodspec): Removed some hacks.
17085 2005-09-27 Ben Maurer <bmaurer@ximian.com>
17087 * class-internals.h (mono_field_is_deleted): Do the test for
17088 rtspecialname before we check the actual name of the field. This
17089 prevents us from dereferencing a pointer into the string table,
17090 saving us from accessing a few pages
17092 * *.c: Replace the use of {Enter,Leave}CriticalSection with
17093 macros. This will allow a deadlock debugger to easily be plugged
17096 2005-09-27 Martin Baulig <martin@ximian.com>
17098 * loader.c (method_from_methodspec): Create a "signature"
17099 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
17101 2005-09-27 Martin Baulig <martin@ximian.com>
17104 (inflate_generic_class): Correctly set the new context's
17108 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
17109 instead of a `MonoGenericContext *'.
17110 (mono_method_signature_full): Take a `MonoGenericContainer *'
17111 instead of a `MonoGenericContext *'.
17114 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
17115 instead of a `MonoGenericContext *'.
17116 (mono_metadata_parse_method_signature_full): Likewise.
17118 2005-09-26 Martin Baulig <martin@ximian.com>
17121 (mono_class_from_generic_parameter): Set `klass->generic_container'
17122 (mono_class_from_generic_parameter): Likewise.
17123 (mono_bounded_array_class_get): We inherit the generic container
17124 from the element class.
17127 (find_method, find_method_in_class): Take a `MonoGenericContext *'
17128 argument rather than computing it here.
17129 (method_from_memberref): Correctly set the generic context before
17130 parsing the signature. Fixes #75681.
17132 2005-09-26 Zoltan Varga <vargaz@gmail.com>
17134 * object.c (mono_class_has_special_static_fields): Fix warnings.
17136 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17138 * assembly.c: Add parse_public_key function, to
17139 par the public keys. Also added mono_assembly_name_parse_full,
17140 to define it the parsed key should be freed or not.
17141 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
17142 to parse a long format assembly name.
17143 * metadata-internals.h: Keep mono_assembly_name_parse_full as
17144 private, since calling it to preserve the key requires
17145 freeing it manually.
17147 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
17149 * locales.c : removed HAVE_ICU part.
17151 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
17153 * object.c (mono_class_create_runtime_vtable): Avoid calling
17154 field_is_special_static if the klass has no special static fields.
17156 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
17157 (MonoCachedClassInfo): Likewise.
17159 * object.c (mono_class_has_special_static_fields): New helper function.
17161 2005-09-23 Zoltan Varga <vargaz@gmail.com>
17163 * class.c (mono_class_create_from_typedef): Don't call
17164 interfaces_from_typedef_full for enums.
17165 (mono_class_create_from_typedef): Compute the base types of enums directly
17166 without calling mono_class_setup_fields ().
17167 (mono_class_find_enum_basetype): New helper function.
17169 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
17170 one place inside the string heap.
17172 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
17174 * class.c: locking fixes, code cleanups, some docs added.
17175 Allocate some data structures in the image mempool.
17177 2005-09-23 Zoltan Varga <vargaz@gmail.com>
17179 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17182 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
17184 * class-internals.h, class.c, reflection.c: reduce memory taken by
17187 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
17189 * metadata.c, metadata.h, loader.h: documentation updates, code and
17192 2005-09-23 Zoltan Varga <vargaz@gmail.com>
17194 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17197 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
17198 page faults caused by the runtime while reading metadata.
17200 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17202 * socket-io.c: the field names were changed 3 months ago and no one
17203 realized until bug #76077 got filed!
17205 2005-09-20 Martin Baulig <martin@ximian.com>
17207 * icall.c (assembly_icalls): Removed some unused debugger icalls.
17209 2005-09-20 Martin Baulig <martin@ximian.com>
17211 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
17212 write the rank into the class entry.
17214 2005-09-20 Martin Baulig <martin@ximian.com>
17216 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
17218 2005-09-19 Zoltan Varga <vargaz@gmail.com>
17220 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17222 * icall.c (custom_attrs_defined_internal): New icall.
17224 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
17226 (mono_custom_attrs_construct_by_type): New helper function.
17228 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
17230 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
17231 terminate the resulting string. Fixes #76123.
17233 2005-09-16 Martin Baulig <martin@ximian.com>
17236 (mono_debug_add_method): Ignore inflated methods for the moment.
17238 2005-09-14 Martin Baulig <martin@ximian.com>
17240 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
17242 2005-09-13 Zoltan Varga <vargaz@gmail.com>
17244 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
17245 return a success/failure indication.
17246 (mono_metadata_interfaces_from_typedef_full): Ditto.
17247 (get_constraints): Ditto.
17249 2005-09-12 Zoltan Varga <vargaz@gmail.com>
17251 * marshal.c (emit_marshal_array): Fix handling of null arrays.
17253 * marshal.c (emit_marshal_array): Add support for returning string
17254 arrays from delegates. Fixes #76063.
17256 * marshal.c: Use the emit_ldloc/stloc macros where possible.
17258 2005-09-11 Zoltan Varga <vargaz@gmail.com>
17260 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
17263 2005-09-09 Zoltan Varga <vargaz@gmail.com>
17265 * reflection.c icall.c: Fix after mono_get_exception_type_load
17268 * assembly.c (mono_assembly_get_assemblyref): New helper function.
17269 (mono_assembly_load_reference): Use the new helper.
17271 * class-internals.h (MonoLoaderError): New structure containing
17272 information about type loading errors.
17274 * class-internals.h loader.c: Add APIs to store per-thread loader
17277 * loader.c class.c: Set the loader error if needed.
17279 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
17281 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
17283 * decimal.c: fixed to handle the broken ARM fp format.
17285 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
17287 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
17290 2005-09-06 Martin Baulig <martin@ximian.com>
17292 * domain.c (supported_runtimes): Added v2.0.50727.
17294 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
17296 * culture-info.h: reduce the size of some structures.
17298 2005-09-05 Martin Baulig <martin@ximian.com>
17300 Reflect latest API changes in the August CTP.
17303 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
17304 ("MonoType.HasGenericArguments"): Removed.
17305 ("MonoMethod.BindGenericParameters"): Renamed to
17306 "MakeGenericMethod".
17307 ("MethodBuilder.BindGenericParameters"): Renamed to
17308 "MakeGenericMethod".
17310 2005-09-05 Martin Baulig <martin@ximian.com>
17312 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
17314 2005-09-05 Martin Baulig <martin@ximian.com>
17316 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17318 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
17319 generic_container is non-NULL.
17321 2005-09-05 Martin Baulig <martin@ximian.com>
17323 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17325 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
17327 2005-08-29 Michal Moskal <malekith@nemerle.org>
17329 * reflection.c (encode_locals,
17330 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
17331 for large generic types.
17333 2005-09-05 Martin Baulig <martin@ximian.com>
17335 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17337 * class.c (mono_dup_array_type): New public method.
17338 (mono_metadata_signature_deep_dup): New public method.
17339 (dup_type): Correctly duplicate array and function types.
17341 2005-09-05 Martin Baulig <martin@ximian.com>
17343 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17345 * reflection.c (get_default_param_value_blobs): Handle generic types
17346 and generic methods.
17348 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
17350 * class.c: Fixed error reporting (method/class were inversed) for
17351 inheritance demands.
17352 * security-manager.c|h: Added the AppDomain when calling the managed
17353 System.Security.SecurityManager.InheritanceDemand method.
17355 2005-09-01 Raja R Harinath <rharinath@novell.com>
17357 * reflection.c (encode_marshal_blob): 'marshaltype' and
17358 'marshaltyperef' are alternate sources for the custom marshaler
17361 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
17363 * class.c: fix creation of array classes with rank == 1
17364 (patch by Ankit Jain <jankit@novell.com>).
17366 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
17368 * object.c: fix check for creating the bound data for arrays vs
17371 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17373 * object.c: configuration file name is now based on the executable name,
17374 not the image name. Fixes bug #75931.
17376 2005-08-29 Zoltan Varga <vargaz@gmail.com>
17378 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
17379 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
17381 2005-08-25 Zoltan Varga <vargaz@gmail.com>
17383 * rand.c: Use wincrypt.h instead of WinCrypt.h.
17385 2005-08-24 Ankit Jain <jankit@novell.com>
17386 Raja R Harinath <rharinath@novell.com>
17388 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
17389 called by it recursively.
17390 (mono_class_init): Remove special case in pending_init handling, since it's
17391 superseded by the fix to mono_class_from_typeref.
17393 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
17395 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
17396 BROKEN_THREAD_START stuff.
17398 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
17400 * class-internals.h object.c: Add a new kind of trampoline called a delegate
17403 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
17405 * object.c (mono_delegate_ctor): Replace the original function address with
17406 a delegate trampoline.
17408 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
17410 * icall.c: add boolean argument to base64_to_byte_array and
17411 InternalFromBase64String to control whether a whitespace-only string
17412 is allowed (or should casue a FormatException to be thrown). We need
17413 this as the behavior has changed between MS.NET 1.x and 2.0, and we
17414 to match the MS behaviour in both profiles.
17415 * appdomain.c: Bump corlib version.
17417 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17419 This patch implements a big portion of publisher policy
17420 support, used to bind assembly versions and redirect
17421 one assembly from version A to version B.
17424 New GSList loaded_assembly_bindings, for storing the cached
17426 (assembly_binding_maps_name): New static function for checking if a
17427 assembly binding information maps an assembly name.
17428 (mono_assembly_binding_info_free): New function for freeing
17429 assembly binding information resources.
17430 (get_publisher_policy_info): New static function for retrieving
17431 assembly binding information from a MonoImage.
17432 (compare_versions): New static function for comparing an assembly
17433 binding information data and the version of an assembly name.
17434 (check_policy_versions): New static function for checking if an
17435 assembly binding info mapping an assembly name is valid for it.
17436 (mono_assembly_load_publisher_policy): New static function for
17437 loading the 'policy.major.minor.MyAssembly' image for an assembly
17438 with an assembly name 'aname'.
17439 (mono_assembly_bind_version): New static function for updating
17440 assembly redirection.
17441 (mono_assembly_apply_binding): New static function for applying
17443 (search_binding_loaded): New static function for searching
17444 loaded assembly binding infos in the cache domain.
17445 (mono_assembly_load_full): Don't apply assembly binding for
17446 reflection only assemblies.
17448 * metadata-internals.h: Add MonoAssemblyBindingInfo,
17449 which contains information about assembly binding. Also
17450 declare signature for mono_config_parse_publisher_policy ()
17451 function, used to retrieve pub policy info.
17454 (publisher_policy_start): New static function used to parse publisher
17455 policy config files.
17456 (publisher_policy_parser): New static MonoParseHandler containing
17457 the functions used when parsing config files.
17458 (mono_config_parse_publisher_policy): New function for parsing
17459 publisher policy files.
17461 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
17463 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
17465 * marshal.c (mono_delegate_free_ftnptr): Ditto.
17467 * object.c (mono_get_addr_from_ftnptr): New helper function.
17469 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
17471 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17473 2005-08-19 Dick Porter <dick@ximian.com>
17475 * threads.c, threads.h, appdomain.c, appdomain.h,
17476 profiler-private.h, monitor.c, object.c, object-internals.h,
17477 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
17478 store the thread ID, so it can hold a 64 bit value if needed.
17480 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
17482 * reflection.c (mono_reflection_create_dynamic_method): Store the
17483 handle class into the method references as well so ldtoken works in
17486 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
17489 2005-08-19 Ankit Jain <jankit@novell.com>
17492 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
17493 here rather than using the method signature of a arbitrary function
17494 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
17496 Hack done with Harinath.
17498 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17500 * threadpool.c: disable printing stack traces when we get a exception
17501 in a threadpool thread. I need to do more testing to figure out which
17502 cases actually print this. Fixes bug #75828.
17504 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17506 * icall.c: there might be ignored whitespace after the last '='. This
17507 fixes length computation and bug #75840.
17509 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
17511 * assembly.c (mono_assembly_load_full): Consider .exe extension as
17512 well. Fixes #75809.
17514 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
17517 * reflection.c (create_custom_attr_data): Ditto.
17519 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
17521 * locales.c, culture-info.h : removed RegionLCIDMap.
17522 * culture-info-tables.h : regenerated.
17524 2005-08-16 Martin Baulig <martin@ximian.com>
17526 * class.c (mono_type_get_name_recurse): Small fix.
17528 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
17530 * locales.c : indentation fixie.
17532 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
17534 * object-internals.h,
17538 icall.c : added RegionInfo table support.
17539 * culture-info-table.h : regenerated for region support.
17541 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
17543 * reflection.c (resolve_object): handle all kinds of MonoMethod
17544 including generic ones
17546 2005-08-12 Ankit Jain <jankit@novell.com>
17548 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
17549 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
17551 2005-09-12 Lluis Sanchez <lluis@ximian.com>
17553 * process.c: Don't close a thread handle when it's NULL. This is a
17554 workaround for bug #75733.
17556 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
17558 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
17560 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
17562 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
17564 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17566 * threadpool.c: if a work item in the thread pool has a callback that
17567 catches a exception, don't propagate it after invoking the callback.
17570 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
17572 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
17574 * class-internals.h (MonoCachedClassInfo): Add some new fields.
17576 * class.c (mono_class_init): Load field info lazily in the AOT case.
17578 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
17580 2005-08-03 Ankit Jain <jankit@novell.com>
17583 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
17584 PInvoke calling convention is 0.
17586 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
17588 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
17589 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
17591 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
17593 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
17594 to handle threads not started by the GC (patch by Michael Meeks
17595 <michael.meeks@novell.com>).
17597 2005-07-31 Kamil Skalski <nazgul@omega.pl>
17599 * reflection.c: Make buffer used in emitting types larger for some
17600 big generic types (patch by Michal Moskal).
17602 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
17604 * mono-debug.c: Fix some (not all) alignment problems.
17606 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17608 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
17609 Invoke mono_image_load_from_data_full passing the refonly
17613 (mono_assembly_open_from_bundle): Add the refonly argument,
17614 in order to pass it to other methods it calls to.
17615 (do_mono_assembly_open): Add the refonly argument, in order
17616 to pass it to other methods it calls to.
17617 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
17618 the refonly parameter to it.
17620 * image.c: Add loaded_images_refonly_hash and
17621 loaded_images_refonly_guid_hash to cache the reflection
17622 only loaded images.
17623 (mono_images_init): Initialize the hash tables used for
17624 caching the reflection only images.
17625 (load_modules): Invoke mono_image_open_full passing the refonly
17626 parameter to load the modules the correct way.
17627 (build_guid_table): Add the refonly argument, to re-build the
17628 correct hash table.
17629 (do_mono_image_open): Added the refonly argument, in order to
17630 define it for the loaded image.
17631 (mono_image_loaded_full): New function, which receives an
17632 additional parameter to look for the image in the refonly or
17633 non-refonly section.
17634 (mono_image_loaded): Updated, using mono_image_loaded_full.
17635 (mono_image_loaded_by_guid_full): The same case that happens
17636 with mono_image_loaded_full.
17637 (mono_image_loaded_by_guid): Likewise.
17638 (register_image): Use the ref_only variable inside MonoImage
17639 to decide in which hash table store the current image.
17640 (mono_image_open_from_data_full): Rename
17641 mono_image_open_from_data to mono_image_open_from_data_full,
17642 adding the refonly argument, to define the ref_only variable
17644 (mono_image_open_from_data): Return
17645 mono_image_open_from_data_full.
17646 (mono_image_open_full): Rename mono_image_open to
17647 mono_image_open_full, receiving the new refonly argument,
17648 to pass it to inner methods.
17649 (mono_pe_file_open): Update this function, to open
17650 a MonoImage as a non-refonly image.
17651 (mono_image_close): Use the refonly variable inside
17652 MonoImage to remove the image from the correct caches.
17654 * image.h: Add the signatures of mono_image_open_full,
17655 mono_image_open_from_data_full, mono_image_loaded_full,
17656 mono_image_loaded_by_guid_full.
17658 * metadata-internals.h: Add the ref_only field to
17661 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17663 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
17664 Fix the last behavior, which used to load the assemblies and
17665 extract MonoReflectionAssemblyName information, instead of
17666 extract it from the metadata tables. Needed for Reflection
17669 2005-07-29 Martin Baulig <martin@ximian.com>
17671 * mono-debug-debugger.c
17672 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
17676 (mono_debug_address_from_il_offset): Check whether we have
17677 debugging support before attempting to take the lock.
17678 (mono_debug_source_location_from_address): Likewise.
17679 (mono_debug_source_location_from_il_offset): Likewise.
17680 (mono_debug_il_offset_from_address): Likewise.
17681 (mono_debug_address_from_il_offset): Likewise.
17683 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
17685 * class.c (mono_class_from_name_case): Add support for dynamic images.
17688 * object.c (mono_class_compute_gc_descriptor): Add a workaround
17691 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
17693 * reflection.c (mono_method_get_object): Fix warning.
17695 2005-07-28 Martin Baulig <martin@ximian.com>
17698 (mono_debug_add_wrapper): Also write the wrapper type.
17700 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
17702 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
17704 * class.c (mono_class_init): Avoid reading nested classes if the AOT
17705 data indicates the class has none.
17707 2005-07-26 Ben Maurer <bmaurer@ximian.com>
17709 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
17710 loader lock with the debugger lock. Prevents deadlocks for beagle.
17712 Beagle can now run on an smp box for a weekend without any
17715 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
17717 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
17718 in a module. Fixes #75629.
17720 2005-07-26 Martin Baulig <martin@ximian.com>
17722 * mono-debug.c (mono_debug_add_wrapper): New static method.
17723 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
17724 interncall or a wrapper.
17726 * mono-debug.h (MonoDebugWrapperData): New public typedef.
17727 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
17728 (MONO_DEBUGGER_VERSION): Bump to 51.
17730 * mono-debug-debugger.c
17731 (mono_debugger_add_type): Removed this empty function.
17732 (mono_debugger_add_method): Likewise.
17734 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
17736 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
17737 before accessing method->slot.
17739 2005-07-21 Jb Evain <jbevain@gmail.com>
17741 * reflection.c (method_encode_clauses/class): Handle filters clauses.
17744 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
17746 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
17749 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
17751 * image.h image.c: Add mono_image_get_guid () API function.
17753 2005-07-19 Ben Maurer <bmaurer@ximian.com>
17755 There were issues when multiple threads tried to load
17756 assemblies. A deadlock was created between assemblies_mutex and
17757 mono_domain_assemblies_lock. This fixes the issue by making the
17758 assembly ref counting be lock free. See bug 75586.
17760 * image.c (mono_image_close): The add ref function here was using
17761 Interlocked operations while the unref was using a mutex and a
17762 --. I don't think this was ever a bug that would be exposed in a
17763 non-pendantic way (ie, by an embedder doing a ref on one thread
17764 and an unref on another), but for the sake of correctness, this is
17767 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
17768 (mono_assembly_load_reference): Call mono_assembly_addref rather
17769 than touching the refcount ourselves.
17770 (mono_assembly_close): Use InterlockedDecrement to unref the
17771 assembly. Don't acquire the lock unless it is actually needed.
17773 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
17775 * class.c (mono_class_layout_fields): Fix calculation of has_references
17778 2005-07-12 Martin Baulig <martin@ximian.com>
17780 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17783 (mono_type_hash): Provide better hashing for generic instances.
17784 (mono_generic_inst_hash): Improve hashing.
17785 (mono_generic_class_hash): Likewise.
17787 * reflection.c (mymono_metadata_type_hash): Improve hashing for
17790 2005-07-12 Martin Baulig <martin@ximian.com>
17792 * reflection.c (mono_reflection_create_runtime_class): Remove the
17793 hack for generic type definitions and non-`Run' assemblies.
17794 (mono_reflection_bind_generic_parameters): Also use
17795 `klass->wastypebuilder' to check for TypeBuilders.
17797 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
17799 * class.c (mono_class_layout_fields): Fix calculation of has_references
17802 * class.c (inflate_generic_class): Fix a leak.
17803 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
17806 2005-07-11 Martin Baulig <martin@ximian.com>
17808 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
17811 2005-07-11 Martin Baulig <martin@ximian.com>
17813 * loader.c (find_method): Also lookup in
17814 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
17816 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
17818 * appdomain.c (mono_domain_unload): Don't free the error message
17819 before passing it to mono_get_exception_...
17821 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
17823 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
17825 * threads.c: try to better guess an available RT signal (bug #75387).
17827 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
17829 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
17832 2005-07-07 Martin Baulig <martin@ximian.com>
17834 * class.c (mono_type_get_name_full): Return NULL for
17835 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
17838 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
17840 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
17841 exit the appdomain as well being aborted.
17843 * threadpool.c: Create all threadpool threads inside the root appdomain, and
17844 change back to the root domain after calling managed code. This enables
17845 appdomains using threadpools to be unloaded.
17847 2005-07-07 Martin Baulig <martin@ximian.com>
17849 * class-internals.h
17850 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
17851 into `MonoDynamicGenericClass' since we only need it for dynamic
17854 * reflection.c (mono_class_bind_generic_parameters): We don't need
17855 to compute the `parent' here.
17857 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
17859 * culture-info-table.h : regenerated.
17861 2005-07-06 Martin Baulig <martin@ximian.com>
17864 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
17866 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
17868 2005-07-06 Martin Baulig <martin@ximian.com>
17870 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
17871 we're doing a signature-only comparision; fixes #74945.
17873 2005-07-06 Martin Baulig <martin@ximian.com>
17875 * class-internals.h (MonoGenericClass): Moved some things out into
17876 a new `MonoInflatedGenericClass' type.
17877 (MonoInflatedGenericClass): New type; the `klass' of a
17878 `MonoGenericClass' is now computed lazyly in
17879 mono_get_inflated_generic_class().
17881 * class.c (mono_get_inflated_generic_class): New public function.
17882 (mono_class_inflate_generic_method): Removed the unused
17883 `MonoClass *' argument.
17884 (setup_generic_vtable): Don't call mono_get_inflated_method() on
17886 (mono_class_create_generic): Make this static and merge it with
17887 mono_class_create_generic_2(); we're now called automatically from
17888 mono_get_inflated_generic_class().
17890 * loader.c (mono_method_signature): Call
17891 mono_get_inflated_method() here.
17893 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
17895 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
17896 type of fields with RVA.
17898 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
17899 for this pseudo class.
17900 (my_mono_class_from_generic_parameter): Likewise.
17901 (mono_class_init): Allow interfaces to have cctors.
17903 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
17905 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
17906 lazily for AOT methods.
17908 2005-07-05 Martin Baulig <martin@ximian.com>
17910 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
17911 returns FALSE for a successful match, not TRUE.
17913 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
17915 * loader.c (mono_method_get_index): Optimize this a bit.
17917 2005-07-04 Martin Baulig <martin@ximian.com>
17920 (class_compute_field_layout): Move the check for generic type
17921 definitions into mono_class_layout_fields(). Fixes #74684.
17922 (mono_class_from_generic_parameter): Correctly compute
17923 `klass->parent'; fixes #75457.
17925 * reflection.c (register_assembly, register_module): Make sure
17926 `domain->rejobject_hash' is already created.
17928 2005-07-02 Martin Baulig <martin@ximian.com>
17930 * class-internals.h
17931 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
17932 `MonoDynamicGenericClass'.
17934 2005-07-01 Lluis Sanchez <lluis@ximian.com>
17936 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
17937 returned by a field getter is null, since null is a valid value.
17939 2005-07-01 Martin Baulig <martin@ximian.com>
17941 * reflection.c (mono_reflection_generic_class_initialize): Update
17942 the `dgclass->fields [i].parent' to the correct class.
17943 (mono_image_get_fieldref_token): Use the declaring type, not the
17946 2005-07-01 Martin Baulig <martin@ximian.com>
17948 * loader.c (find_method): Also look in the interfaces; fixes #75429.
17950 2005-06-30 Ben Maurer <bmaurer@ximian.com>
17952 * threads.c (thread_cleanup): assert that thread != NULL
17953 (wait_for_tids_or_state_change): We were using the wrong variable
17954 when accessing wait->threads. `i' was always out of the bounds of
17957 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17959 * loader.c: map user32 and kernel32 to libMonoSupportW
17961 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
17963 * appdomain.c (unload_thread_main): Mark this as WINAPI.
17965 2005-06-28 Martin Baulig <martin@ximian.com>
17967 * loader.c (method_from_methodspec): Fix #75334.
17969 2005-06-28 Martin Baulig <martin@ximian.com>
17971 Fix #74953 - Arrays now implement the generic IList<T> interface
17972 on the 2.0 platform.
17974 * class-internals.h (MonoDefaults): Added `generic_array_class'.
17976 * reflection.c (mono_class_bind_generic_parameters): New public
17977 function; similar to mono_reflection_bind_generic_parameters(),
17978 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
17980 * domain.c (mono_init_internal): Try to initialize.
17981 `mono_defaults.generic_array_class' here; this'll only succeed if
17982 we're using the 2.0 corlib.
17985 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
17986 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
17987 (mono_lookup_internal_call): Added support for nested classes.
17990 (mono_get_method_from_token): Set `result->signature->pinvoke' if
17991 we're an interncall and have generic arguments.
17994 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
17995 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
17996 instance of System.Array.InternalArray<T> for arrays, so they
17997 implement the generic IList<T> interface.
17999 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
18001 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
18002 (chastamar@yahoo.com). Fixes #75374.
18004 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
18006 * culture-info-table.h: regenerated.
18008 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18010 * icall.c: handle spaces correctly for base64 strings.
18012 2005-06-26 Ben Maurer <bmaurer@ximian.com>
18014 * *.c: Kill some warnings.
18016 2005-06-23 Duncan Mak <duncan@novell.com>
18018 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
18019 that this builds on Solaris 10 (x86).
18021 2005-06-23 Martin Baulig <martin@ximian.com>
18024 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
18025 generic type definitions.
18027 2005-06-23 Martin Baulig <martin@ximian.com>
18031 * metadata.c (mono_class_get_overrides): Renamed to
18032 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
18033 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
18034 pass it to mono_get_method_full().
18036 2005-06-22 Ben Maurer <bmaurer@ximian.com>
18038 * reflection.c (mono_reflection_create_runtime_class): take the
18039 mono_domain_lock in this method. Prevents deadlocks
18041 2005-06-22 Martin Baulig <martin@ximian.com>
18043 * loader.c (method_from_methodspec): Fix #75330.
18045 2005-06-22 Martin Baulig <martin@ximian.com>
18047 * reflection.c (type_get_qualified_name): Use
18048 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
18049 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
18050 argument; use it if we don't have an assembly name.
18052 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
18054 * object.c: In mono_message_init, set "copy out" flag for in
18055 parameters with the [Out] flag.
18057 2005-06-21 Martin Baulig <martin@ximian.com>
18060 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
18063 2005-06-21 Martin Baulig <martin@ximian.com>
18065 * class.c (mono_class_init): Don't initialize `class->fields' for
18066 generic instances since they're initialized again in
18067 compute_field_layout().
18068 (compute_field_layout): Set the field's `generic_info' here; fix
18071 2005-06-21 Martin Baulig <martin@ximian.com>
18073 * class-internals.h
18074 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
18076 * metadata.c (mono_metadata_generic_method_equal): Also
18077 distinguish the `generic_class'; fixes #75334.
18079 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18083 * domain-internals.h:
18084 * reflection.c: 'domain_assemblies' field is now protected by its own
18085 lock. Don't call into managed code to run the AssemblyLoad event if we
18086 now there are no registered delegates for it.
18088 2005-06-20 Martin Baulig <martin@ximian.com>
18090 * class.c (mono_class_is_assignable_from): Use a custom version of
18091 mono_class_has_parent() to make things work for generic instances;
18094 2005-06-20 Martin Baulig <martin@ximian.com>
18096 * loader.c (method_from_methodspec): Apply a patch from
18097 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
18099 2005-06-20 Martin Baulig <martin@ximian.com>
18101 * class.c (mono_class_init): Reverted Zoltan's last change; it
18104 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
18106 * threads.c (wait_for_tids_or_state_change): Add missing locking.
18108 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18110 * socket-io.c: fix the index in the socket array for writable/error
18111 sockets. Fixes bug #75306.
18113 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
18115 * class.c (mono_class_init): Allow interfaces to have static ctors.
18117 2005-06-17 Martin Baulig <martin@ximian.com>
18119 * loader.c (method_from_methodspec): Use `context->container' when
18120 parsing the `gmethod->inst'.
18122 2005-06-17 Martin Baulig <martin@ximian.com>
18124 * class.c (mono_type_get_name_recurse): Don't add the assembly
18125 name for type arguments.
18127 2005-06-15 Martin Baulig <martin@ximian.com>
18129 * reflection.c (mono_image_get_inflated_method_token): Encode
18130 correct klass; fixes #75260.
18132 2005-06-13 Michal Moskal <malekith@nemerle.org>
18134 * icall.c: Make GetCorrespondingMethod/Constructor take
18135 MonoReflectionMethod method not MonoMethod. Removed
18136 MonoType.GetCorrespondingField, and make
18137 MonoGenericType.GetCorrespondingField take name not
18140 2005-06-13 Michal Moskal <malekith@nemerle.org>
18142 * reflection.c (field_encode_signature, encode_locals):
18143 Make sizes of buffers for types larger (for big generic types).
18144 (create_generic_typespec,
18145 mono_reflection_sighelper_get_signature_local,
18146 mono_reflection_sighelper_get_signature_field):
18147 Add asserts for too small buffers.
18149 2005-06-15 Martin Baulig <martin@ximian.com>
18151 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
18152 if our parent is not a dynamic type.
18154 2005-06-15 Martin Baulig <martin@ximian.com>
18156 * class-internals.h (MonoTypeNameFormat): New enum.
18159 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
18160 (mono_type_get_full_name): Removed.
18161 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
18162 argument instead of the boolean's.
18164 * icall.c (ves_icall_System_MonoType_getFullName):
18165 Added `gboolean assembly_qualified'.
18168 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
18170 * reflection.c (mono_reflection_parse_type): Parse the new type
18173 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18175 * icall.c: no need to convert from utf16 to utf8 and then back again
18176 after the call to GetLogicalDrives.
18178 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18180 * icall.c: frombase64. Fix problems exposed by new tests.
18182 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18184 * icall.c: added internal calls for converting char [] and strings in
18185 base64 into byte [].
18187 2005-06-10 Martin Baulig <martin@ximian.com>
18189 * class.c (mono_class_create_generic_2): Read the nested classes
18190 from the metadata rather than from `gklass->nested_classes' since
18191 `gklass' might not be initialized yet.
18193 2005-06-09 Duncan Mak <duncan@novell.com>
18195 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
18196 all public headers. Fixes #74919.
18198 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
18200 * domain.c: The key for proxy_vtable_hash is now a pointer
18201 array. Added new GHashFunc and GCompareFunc functions for this.
18203 * class.h: The list of interfaces in MonoRemoteClass is known in
18204 advance and can't grow (we create a new MonoRemoteClass if needed),
18205 so now the interface array can be allocated together with
18208 * object.c: Added a new method create_remote_class_key.
18209 Fixed mono_remote_class so it does not depend on
18210 mono_upgrade_remote_class.
18211 Removed extend_interface_array.
18212 Added new method clone_remote_class(), which makes a copy of a remote
18213 class and adds a new interface or class to it.
18214 mono_upgrade_remote_class() now creates a new remote class (or gets
18215 it from the cache) if an vtable upgrade is needed. In this way
18216 we make sure that other objects sharing the same remote class
18217 don't get the new vtable with unwanted interfaces.
18219 * object-internals.h:
18220 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
18222 * marshal.c: Track changes in mono_upgrade_remote_class().
18224 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
18225 * icall.c: Add runtime methods for obtaining members of inflated
18226 class, which were created from supplied non-inflated members. It
18227 is used in internal Get{Method,Constructor,Field} methods in
18230 2005-06-09 Martin Baulig <martin@ximian.com>
18233 (mono_reflection_bind_generic_method_parameters): Fix #75169.
18235 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18236 * reflection.c (mono_image_basic_init): Define
18237 Version in MonoDynamicAssembly.
18239 2005-06-08 Martin Baulig <martin@ximian.com>
18244 (mono_method_signature_full): New public method; takes a
18245 `MonoGenericContext *'.
18246 (find_method): Use mono_method_signature_full() and pass the
18247 klass'es context to it.
18249 * class.c (mono_class_is_inflated_method): Use
18250 mono_method_signature_full() and pass the context to it.
18252 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
18254 * object.c: add proper locking in mono_remote_class_vtable(),
18255 fixes possible memory corruption.
18257 2005-06-08 Michael Meeks <michael.meeks@novell.com>
18259 * marshal.c (mono_remoting_marshal_init): set
18260 initialized after initialization.
18262 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
18264 * locales.c : hush.
18266 2005-06-06 Michael Meeks <michael.meeks@novell.com>
18268 * object.c (extend_interface_array): fix really silly
18269 memory corrupting / comparison bug.
18271 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18273 * reflection.c: Functions added to support the creation
18274 of CustomAttributeData, which includes Attribute data
18275 used by ReflectionOnly methods.
18277 * reflection.h: mono_reflection_get_custom_attrs_data and
18278 mono_custom_attrs_data_construct added (functions exposed).
18280 * icall.c: Added mono_reflection_get_custom_attrs_data
18283 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
18285 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
18288 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
18290 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
18292 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
18293 dynamic DllImportAttribute.
18295 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
18296 dynamic DllImportAttribute.
18298 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
18301 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18303 * threads.c: avoid segfault when an unstarted thread is aborted.
18305 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
18307 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
18308 Returns the name and version of the runtime for reporting.
18310 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18312 * appdomain.c: bump corlib version.
18313 * object-internals.h: new field in MonoReflectionAssembly.
18315 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18317 * object-internals.h: Carlos forgot to add this field.
18319 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18321 * icall.c: Added create_version to create instances
18322 of Version of MonoReflectionAssemblyName. This change helps
18323 the AssemblyName tests to keep running fine.
18325 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
18327 * object.c (mono_method_return_message_restore): A somehow less
18328 intrusive fix for #75138.
18330 2005-06-03 Raja R Harinath <rharinath@novell.com>
18332 * object.c (mono_method_return_message_restore): Fix computation
18333 of expected number of out args.
18335 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
18337 * reflection.c (mono_image_get_method_info): Fix the case when the
18340 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
18342 * object.c: Added missing null check in
18343 mono_method_return_message_restore.
18345 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
18347 * reflection.c (mono_image_get_method_info): Handle the case when
18350 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
18352 * object.c: When creating the vtable for a proxy, take into account
18353 all inherited interfaces, not only the ones registered in
18354 iclass->interfaces. This fixs bug #74996.
18355 Also, in mono_method_return_message_restore, verify that the array
18356 of out args has the expected lengh.
18358 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18360 * socket-io.c: update the timeout in Poll when the call is interrupte.
18362 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18364 * socket-io.c: support abort/suspend in Select_internal after last
18367 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18369 * threadpool.c: remove warning.
18371 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18374 * socket-io.[ch]: Select_internal uses poll() now when available, thus
18375 removing the 1024 limit from select(). Runtime part of the fix for
18378 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18380 * socket-io.c: when resolving the addresses for the same
18381 host returned by gethostname(), get the local IPs from the interface
18382 list. Loopback addresses are discarded if the are interfaces up with
18383 non-loopback ones. Fixes bug #63265.
18385 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
18387 * appdomain.c, verify.c, object-internals.h, reflection.c:
18388 bumped corlib number to 36, and added new extra_flags field
18389 to ReflectionMethodBuilder and friends. Fixes #75060.
18391 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
18393 * gc.c: register a new weak link only if the object is non-null
18396 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
18398 * culture-info.h : short time pattern too.
18400 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
18402 * culture-info.h : expand long time pattern string length.
18404 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
18406 * culture-info-table.h : update (more French date format; #72788).
18408 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
18410 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
18411 the method is static. Fixes #75029.
18413 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
18415 * reflection.c: Update the table_idx field of method builders after
18416 saving the module, since it can change. This is a workaround for
18419 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
18421 * culture-info-table.h : update (additional French date format).
18423 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
18425 * icall.c (ves_icall_type_Equals): Revert last change.
18427 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
18429 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
18431 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
18433 * class-internals.h: Added executioncontext_class field to
18434 MonoDefaults structure.
18435 * domain.c: Cache System.Threading.ExecutionContext class in
18437 * object.c: Capture the ExecutionContext for asynchroneous calls in
18438 mono_async_result_new.
18439 * object-internals.h: Added execution_context and original_context
18440 fields to MonoAsyncResult. Added execution_context to MonoThread.
18441 * security-manager.c|.h: Added mono_get_context_capture_method to
18442 return the capture method (if required by the security manager or by
18443 the framework version used).
18444 * threadpool.c: Apply capture (if present) ExecutionContext in
18445 mono_async_invoke and revert to original context after it completes.
18447 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
18449 * culture-info-table.h : updated (real hacky solution for zh-CHT).
18451 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
18453 * culture-info-table.h : zh-CHT related workaround.
18455 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
18457 * marshal.c (emit_marshal_custom): Add some error checking and call the
18458 methods in the ICustomMarshaler interface. Fixes #74875.
18460 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
18461 native->managed wrappers.
18463 2005-05-12 Martin Baulig <martin@ximian.com>
18465 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
18466 here and use the loader lock.
18468 * mono-debug.c: Properly lock when the debugger is not attached.
18469 (mono_debug_init): Release the initial lock if we're not running
18472 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
18474 * marshal.c (emit_marshal_custom): Pass through NULL values without
18475 calling the custom marshalling routines.
18477 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
18478 conversion in structures. Fixes #74882.
18480 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
18482 * culture-info-table.h : zh-* cultures were missing.
18484 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
18486 * threads.c: Added a new event background_change_event which is signaled
18487 when a thread changes its background mode.
18488 Moved here several checks previously done in managed code. The checks
18489 require the thread lock, and using the thread lock in managed code
18490 can result in deadlocks.
18491 Merged Start_internal and Thread_internal into a single method. Now
18492 Thread_internal does all work of creating and starting a thread.
18493 Added icalls for setting and getting the state of the object. Moved from
18494 managed code to avoid locking there.
18495 Added wait_for_tids_or_state_change() which is called instad of
18496 wait_for_tids when waiting for non-backround threads to end. This method
18497 will return if one of the threads ends or the background_change_event
18499 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
18500 the background mode. This method signals the background_change_event
18503 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
18504 removed Start_internal.
18506 2005-05-11 Martin Baulig <martin@ximian.com>
18508 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
18509 to order of some fields to get proper alignment on 64-bit machines.
18511 2005-05-11 Martin Baulig <martin@ximian.com>
18513 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
18514 changes as they're broken and completely fuck up the debugger.
18516 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
18518 2005-05-10 Martin Baulig <martin@ximian.com>
18520 * reflection.c (mono_reflection_generic_class_initialize): Don't
18521 call mono_class_setup_parent() here.
18523 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18525 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
18526 send/receive timeout use an integer in milliseconds. We were using a
18529 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18532 (internal_get_cultures): reserve the first slot of the array for the
18533 InvariantCulture, which will be filled in managed code.
18535 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
18537 * reflection.c (mono_image_fill_module_table): Initialize the
18538 GENERATION field as well.
18540 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18542 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
18543 Monitor.Enter on the object.
18545 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
18547 * threads.c: Enable the wait for running threads when exiting.
18548 * icall.c: Suspend all threads before exiting.
18550 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
18552 * assembly.c (mono_assembly_load_reference): Fix warning.
18554 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18556 * threadpool.c: changed the default number of threads per cpu. From now
18557 on, the default will be 20 + (5 * number of cpus) instead of 50.
18559 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
18561 * loader.c (mono_method_get_signature_full): Add locking here.
18563 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
18565 * appdomain.c: Moved methods for parsing and freeing assembly
18566 names to assembly.c.
18567 * assembly.c, domain-internals.h: Created public methods for parsing
18568 assembly names. Fixed mono_assembly_load_with_partial_name:
18569 it now finds the best match, taking into account the version,
18570 token and culture specified in the partial name. Also return
18571 the latest version if no version information is specified.
18573 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
18575 * threadpool.c: replace check for SocketAsyncCall class.
18577 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18579 * threadpool-internals.h:
18580 * Makefile.am: added threadpool-internals.h
18582 * threadpool.c: call mono_unhandled_exception on exceptions not handled
18583 that happen in threadpool threads (tested on MS).
18584 (mono_thread_pool_remove_socket): new function that dispatch any pending
18585 AIO call on a socket that is closing. By now only epoll really needs it,
18586 as select/poll wake up when the socket closes.
18589 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
18591 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
18593 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
18595 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
18597 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
18599 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
18601 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
18602 has an abort request, convert it into a suspend request.
18604 2005-04-30 Ben Maurer <bmaurer@ximian.com>
18606 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
18607 warning for the usage of `UnmanagedFunctionPointerAttribute' which
18608 is not supported yet.
18610 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18612 * image.c: register assemblies loaded from data (bundles) in the loaded
18613 assemblies hash. Fixes bug #74772.
18615 2005-04-29 Martin Baulig <martin@ximian.com>
18617 * class.c (mono_type_get_name_recurse): Update to the new naming
18618 schema from the latest .NET 2.x beta2.
18619 (mono_class_setup_vtable_general): If we're a generic instance,
18620 copy the vtable from our generic type definition and inflate all
18623 * loader.c (find_method): Update to the new naming schema from the
18624 latest .NET 2.x beta2.
18626 2005-04-29 Raja R Harinath <harinath@gmail.com>
18628 * class.c (mono_class_init): Add a mono_loader_unlock to the
18631 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
18633 * icall.c (ves_icall_System_Environment_Exit): Remove the
18634 suspend_all_other_threads () call for the time being, since it can hang.
18636 * threads.c (mono_thread_manage): Similarly, disable the waiting for
18637 the background threads to exit, since it can also hang.
18639 * class.c (mono_class_init): Applied patch from Ankit Jain
18640 (radical@gmail.com). Avoid pending init errors when a field refers
18641 to a nested class using a typeref. Fixes #74734.
18643 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
18644 this for dynamic modules.
18646 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18648 * threads.c: don't wait for threads that are in the process of aborting
18649 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
18650 and waiting for background threads to finish. This makes xsp and
18651 mod-mono-server exit without random length delays and/or hangs.
18653 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18655 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
18657 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
18659 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
18660 dynamic types to prevent infinite loops. Fixes #74727.
18662 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
18663 ..._is_assignable_to.
18665 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
18667 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
18669 2005-04-25 Martin Baulig <martin@ximian.com>
18671 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
18674 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
18676 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
18678 * reflection.c (build_compressed_metadata): Set metadata header
18681 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
18683 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
18684 number into an integral and a decimal part. Fixes #70473.
18686 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
18688 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
18690 * culture-info-table.h : reflected the latest locale-builder output.
18692 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18694 * threadpool.c: check for SuspendRequested too when deciding if
18695 mono_thread_interruption_checkpoint should be called.
18697 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18699 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
18700 * threads.c: remove interruption_mutex and use Interlocked instead. When
18701 suspending all the threads, wait for all the suspended events at once.
18702 If we're shutting down and get an APC that is going to be queued,
18703 call mono_thread_execute_interruption immediately, as the thread might
18704 be sleeping on a pthread condition or mutex.
18706 * icall.c: call mono_runtime_set_shutting_down before suspending the
18709 Fixes bug #74693. And now xsp is happier when exiting.
18711 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
18713 * loader.c (mono_stack_walk): Fix #74690.
18715 2005-04-22 Martin Baulig <martin@ximian.com>
18717 * mono-debug.h (MonoDebugMethodJitInfo): Added
18718 `MonoDebugMethodJitInfo *jit'.
18720 * mono-debug.c (mono_debug_read_method): Cache the
18721 MonoDebugMethodJitInfo in `address->jit'.
18722 (mono_debug_free_method_jit_info): New public method.
18724 2005-04-22 Martin Baulig <martin@ximian.com>
18726 * class.c (mono_class_is_assignable_from): Disallow
18727 type parameter -> interface.
18729 2005-04-21 Dick Porter <dick@ximian.com>
18731 * threads.c (mono_thread_create): Turn an assertion into an error.
18733 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
18735 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
18737 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
18738 Fix some gcc 4.0 warnings.
18740 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
18742 * file-io.c: fix alt dir separator char on unix systems
18743 and cleanup (fixes bug #71214).
18745 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
18747 * marshal.c: Use CALLVIRT instead of CALL when dispatching
18748 a call to a remote domain, since the method may be an
18749 interface method in the client domain. This fixes bug #74192.
18751 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18753 * threadpool.c: recv/send are now performed before going back to managed
18754 code to save one transition.
18756 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18758 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
18760 * metadata/threadpool.c: removed hack to workaround the bug above.
18764 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
18766 * reflection.c reflection.h: Fix handling of parameter defaults in
18767 dynamic methods. Also fixes handling of parameter attributes.
18770 * mono-debug.c (mono_debug_close_image): Fix warning.
18772 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18774 * socket-io.h: replaced old unused field with new 'blocking'.
18775 * threadpool.c: restore socket blocking state on windows(tm).
18777 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
18779 * icall.c: don't return the codebase in the AssemblyName[] returned by
18780 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
18781 * object-internals.h: Removed FIXME (fields were presents) and fixed
18782 versioncompat declaration.
18784 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18786 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
18787 not closed, so don't cleanup when it happens.
18789 2005-04-13 Chris Toshok <toshok@ximian.com>
18791 * mono-debug-debugger.h: change prototype for
18792 mono_debugger_lookup_type.
18794 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
18795 this function, although it should probably be named
18796 mono_debugger_init_type.
18798 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18800 * threadpool.c: fix non-AIO case.
18802 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
18804 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
18805 the built-in profiler to measure just JIT compilation times.
18807 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18809 * threadpool.c: the epollfd might be closed by another thread at
18810 any time, so ignore EBADF at treat it as a "we're closing" sign.
18812 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18814 * threadpool.c: release the semaphores with a count equals to the number
18815 of working threads in both IO and regular pools. Fixed typo that messed
18816 up the count of IO pool threads. Don't initialize the pipe handles if
18819 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18821 * threadpool.c: some systems don't like a NULL when deleting the socket
18824 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18826 * threadpool.c: fix semaphore allocation.
18828 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18830 * threadpool.c: added epoll() based implementation for asynchronous IO
18831 that is used instead of the default poll() when available.
18832 It can be disabled by setting MONO_DISABLE_AIO.
18834 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18836 * threadpool.c: windows needs 'closesocket' and instead of returning
18837 0 when the stream is closed while in select, it returns -1. Fixes bug
18840 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
18842 * class.c (class_compute_field_layout): Fix the regression caused by
18845 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18847 * threadpool.c: separate pool for socket async. IO.
18848 * threadpool.h: mono_max_worker_threads is not a global any more.
18850 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
18852 * class.c (class_compute_field_layout): Fix #74549.
18854 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18856 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
18857 use 2 connected sockets instead.
18859 2005-04-08 Miguel de Icaza <miguel@novell.com>
18861 * mono-config.c: Add new entry point for mkbundle
18862 mono_config_parse_memory.
18864 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18866 * threadpool.c: removed another unused function.
18868 2005-04-08 Ankit Jain <radical@corewars.org>
18870 * reflection.c (get_default_param_value_blobs): Add 'types'
18871 parameter to get the types encoded in the constant table.
18872 (mono_param_get_objects): Use the type from the constant table,
18873 not the type of the parameter, when creating default values.
18874 Handle null default values correctly.
18876 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18883 * socket-io.c: removed dead code for async IO.
18885 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18887 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
18889 * threadpool.c: intercept socket async. calls and pass them to a thread
18890 that is polling and dispatching the job items to the threadpool as
18891 socket become ready. Fixes bugs #71217, #71933.
18893 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
18894 between char and short/ushort arrays.
18896 * socket-io.c: remove dead code.
18898 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
18901 icall.c : removed InternalToUpper_Comp() and
18902 InternalToLower_Comp().
18904 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
18906 * char-conversions.h : The tables were incorrectly generated. Should
18907 be generated against invariant culture.
18909 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
18911 * object.c (mono_runtime_invoke_array): Fix return value when
18912 passing pre-created valuetype objects to ctors.
18914 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
18915 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
18918 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
18920 * domain.c: removed g_assert for runtimesecurityframe_class. This is
18921 only used with --security and hides the wrong corlib version error.
18923 2005-03-30 Joshua Tauberer <tauberer@for.net>
18925 * class.c: Changed mono_class_name_from_token so that types
18926 outside of a namespace don't have an initial period. Improved
18927 the g_warning message used in _mono_class_get when loading
18929 * assembly.c: In mono_assembly_load_reference, when an assembly
18930 can't be found, "No such file or directory" is misleading and
18931 unhelpful because a few paths were checked for the presence of
18932 the assembly. When that happens (ENOENT), display a nicer
18933 message indicating the directories that were searched. In all
18934 cases, the warning is made easier to read for non-hackers.
18936 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
18938 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
18940 * appdomain.h|domain.c: Removed inline from functions.
18941 * appdomain.c: Reduced warnings when compiling on windows.
18942 * icall.c: Fixed output_debug declaration to gunichar2*.
18943 * mono-config.c: Reduced warnings when compiling on windows.
18944 * rand.c: Added missing "windows.h". Added missing return value.
18945 * rawbuffer.c: Added missing winsock2.h for windows.
18946 * sysmath.h: Added mono-compiler.h header to allow/ease
18947 compilation with non-GCC compilers.
18948 * threads.c: Fixed declarations to compile with VS.NET C compiler.
18949 Removed cast warnings.
18951 Adapted from the work of J Lothian (for VC6).
18953 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
18955 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
18958 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
18960 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
18963 2005-03-27 Raja R Harinath <harinath@gmail.com>
18965 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
18966 has to be in $(exec_prefix). $(prefix) is for arch-independent
18967 stuff, and it would probably use $(prefix)/share rather than
18970 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18972 * console-io.c: added 2 includes that might be missing.
18974 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
18976 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
18979 * reflection.c (create_custom_attr): Allocate the params array using
18980 alloca so it gets GC tracking.
18982 2005-03-23 Chris Toshok <toshok@ximian.com>
18984 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
18987 2005-03-24 Raja R Harinath <rharinath@novell.com>
18989 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
18990 changes to pick up any changes in prefix, etc.
18992 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
18994 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
18996 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
18997 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
18999 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19001 * class-internals.h object-internals.h class.c reflection.c: Extend the
19002 mono_lookup_dynamic_token () function to return the class of the
19005 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
19006 well. Fixes #73848.
19008 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
19010 * security-manager.c: Skip inheritance checks for intra-corlib
19011 class inheritance and method overrides. This skips a lot of checks
19012 and (anyway) permissions cannot work until corlib is loaded.
19014 2005-03-23 Martin Baulig <martin@ximian.com>
19016 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
19017 MONO_TYPE_GENERICINST.
19019 2005-03-23 Martin Baulig <martin@ximian.com>
19021 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
19023 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19025 * class.c: added locking comments to some functions.
19026 Cache the interface offsets arrays (saves about 20 KB
19027 of runtime memory in a typical app).
19028 Reduce the time overhead in mono_class_setup_supertypes ().
19030 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
19032 * icall.c: speedup and fix leaks in GetMethodsByName and
19033 GetPropertiesByName.
19035 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19037 * reflection.c: some locking fixes.
19039 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19041 * metadata.c: added missing break in case statement.
19043 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
19045 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19046 typedbyref return values. Fixes #73941.
19048 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
19050 * security-manager.c|h: Added demandunmanaged method and
19051 suppressunmanagedcodesecurity class to MonoSecurityManager.
19052 Renamed aptc class to allowpartiallytrustedcallers.
19054 2005-03-17 Martin Baulig <martin@ximian.com>
19056 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
19058 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19060 * file-io.c: disabled file async. IO using aio_*. It uses the
19061 threadpool now. Workaround for bug #73718.
19063 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19065 * assembly.h, mono-config.c: added code to deal with bundled configs
19066 for bundled assemblies.
19068 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
19070 * *.c, private.h: cleanup, removing old private.h header file.
19072 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
19074 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
19075 and throw_on_unmappable_char attributes.
19077 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
19079 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
19080 _ProcessName_internal.
19082 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
19084 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
19087 * icall.c threads.c threads-types.h: Remove slothash icalls as they
19088 are no longer used.
19090 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
19092 * object.c (compute_class_bitmap): Add support for generics. Fixes
19095 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
19097 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
19099 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19101 * filewatcher.c: commented out the code for windows watcher, as we don't
19102 use it (we use the managed implementation instead).
19104 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
19106 * object-internals.h (MonoThread): Remove 'unused1' field.
19108 * appdomain.c: Bump corlib version.
19110 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
19112 * reflection.c (mono_reflection_create_runtime_class): Remove the
19113 AssemblyBuilder.Save optimization since it causes too many problems.
19115 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
19117 * exception.c|h: Added mono_get_exception_reflection_type_load to
19118 create a ReflectionTypeLoadException object.
19119 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
19120 to return NULL is a InheritanceDemand fails during reflection. Updated
19121 ves_icall_System_Reflection_Assembly_GetTypes to throw a
19122 ReflectionTypeLoadException if an InheritanceDemand fails during
19123 reflection. Added icall mapping for GetLinkDemandSecurity.
19124 * security-manager.c|h: Added ves_icall_System_Security_
19125 SecurityManager_GetLinkDemandSecurity internal call to return the
19126 class and methods permissions set for a LinkDemand. Removed unused
19127 fields in MonoSecurityManager.
19129 2005-03-10 Martin Baulig <martin@ximian.com>
19131 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
19132 it's a generic instance.
19134 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
19136 * reflection.c (mono_get_object_from_blob): Applied patch from
19137 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
19139 * class.c (mono_class_is_assignable_from): Another try at fixing
19140 #73469 without breaking anything.
19142 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
19144 * class.c: (mono_class_is_assignable_from): Revert the last changes
19145 since they don't work with generics.
19147 * class.c (mono_class_is_assignable_from): Fix build bustage.
19149 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
19150 the managed IsAssignableFrom method. Fixes #73469.
19152 * reflection.c (mono_reflection_call_is_assignable_from): New helper
19155 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
19157 * object.c (mono_load_remote_field_new): Fix returning uninitialized
19158 memory when the remoting callback does not sets the out arguments.
19161 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
19164 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
19166 * object-internals.h (MonoStackFrame): Sync with managed object layout.
19168 * appdomain.c: Bump corlib version.
19170 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
19172 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
19175 * threads.c (mono_thread_attach): Detect threads which are not started
19176 by the GC pthread wrappers.
19178 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
19180 * icall.c: Added new icall for RNG.
19181 * rand.c|h: Added new icall to open the RNG. This allows to share a
19182 single handle on Linux to access /dev/urandom and fix #73183.
19184 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
19186 * object.c: setting the new vtable in a transparent proxy object must
19187 not change the GC descriptor.
19189 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19191 * object.c: fixed compilation without GCJ support.
19192 * reflection.c: for runtime-created types ensure klass->has_references
19193 is correct (bug #73215).
19195 2005-03-02 Martin Baulig <martin@ximian.com>
19197 * class.c (mono_class_is_assignable_from): Make this work if
19198 `oklass' is a generic instance; fixes #72831.
19200 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
19202 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
19205 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
19207 * marshal.c: Reorganize native->managed marshalling code to also use
19208 the emit_marshal_... functions.
19210 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19212 * object.c: typed allocs have issues with bitmap sizes > 30,
19213 so check for max_set >= 30.
19215 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
19217 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
19218 managed code. Fixes #73012.
19220 * metadata.h (MonoMarshalSpec): Add elem_mult field.
19222 * metadata.c reflection.c: Load/Emit elem_mult as well.
19224 * metadata.h (MonoMarshalSpec): Add comment.
19226 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
19228 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
19229 num_elem to -1 if not given.
19231 * object-internals.h (MonoReflectionMarshal): Add has_size field.
19233 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
19236 2005-03-01 Marek Safar <marek.safar@seznam.cz>
19238 * null-gc.c (mono_gc_free_fixed): Was not compilable.
19240 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
19242 * reflection.c (encode_marshal_blob): Encode param_num field as well.
19244 * object-internals.h (MonoReflectionMarshal): Add param_num field.
19246 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19248 * object.c: generalized the reference bitmap creation
19249 and added hooks for the new GC.
19250 * class-internals.c: removed the gc_bitmap field from MonoClass.
19252 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19254 * domain.c: help the compiler to produce better code
19255 in mono_jit_info_table_find ().
19257 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19259 * object.c: make all allocations look typed.
19261 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19263 * socket-io.c: load Mono.Posix if it's not loaded already
19266 2005-02-24 Martin Baulig <martin@ximian.com>
19268 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
19269 * reflection.c (dup_type): Likewise.
19271 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
19273 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
19274 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
19276 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19278 * domain.c, threads.c, object-internals.h: make the critical thread
19279 local vars use the fast access mode (even when we're compiled in
19280 a lib). Provide accessors to be used by the jit during codegen.
19282 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19284 * appdomain.c: Changed hook functios behavior to include
19285 support for the reflection only assemblies. Some icalls were changed
19286 to support the mentioned assemblies too. Signatures of static methods
19287 try_assembly_resolve and real_load now have an additional parameter:
19290 * assembly.c: General changes to mono_assembly_ methods to support
19291 reflection only api. Functions mono_assembly_open, mono_assembly_load,
19292 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
19293 suffix, to support an additional gbool parameter to specify whether
19294 the assembli is reflection only or not. Created some new hook functions
19295 to add support for reflection only assemblies. Signatures of static
19296 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
19297 have now an additional parameter: refonly.
19299 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
19300 indicating whether the assembly is reflection only or not.
19302 * exception.c: Add mono_get_exception_invalid_operation.
19304 * icall.c: Throw an InvalidOperationException when trying to invoke
19305 a property/method/event, or trying to set/get the value of a field.
19306 Also add an icall to retrieve the ref_only flag to the
19307 MonoReflectionAssembly.
19309 2005-02-23 Chris Toshok <toshok@ximian.com>
19311 Part of fix for #72827.
19312 * mono-debug.c (mono_debug_add_method): add lexical block data to
19313 the info we write. Kind of a hack at the moment - we copy the
19314 lexical block info from the MonoDebugMethodInfo to the
19315 MonoDebugMethodJitInfo here, before writing it.
19316 (mono_debug_read_method): read the lexical block info.
19318 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
19320 * debug-mono-symfile.h: add lexical block support.
19322 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
19325 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
19327 * loader.c (mono_lookup_pinvoke_call): Fix warning.
19329 * object.c (mono_runtime_free_method): Call mono_free_method () and
19330 put the TODOs there.
19332 * loader.c (mono_free_method): Free up most memory allocated for
19335 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
19337 * reflection.c: properly flag a Type argument to a
19338 named custom attr value (bug #72248).
19340 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19342 * reflection.c: reduce code duplication in named custom
19343 attribute encoding.
19345 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
19347 * reflection.c: properly encode custom attrs of type object
19350 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
19352 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
19354 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
19356 * socket-io.c: load System.dll if it's not loaded already
19357 (bug #72850 and #70477).
19359 2005-02-21 Martin Baulig <martin@ximian.com>
19361 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19364 2005-02-21 Martin Baulig <martin@ximian.com>
19366 * reflection.c (mono_image_build_metadata): We also need to
19367 "fixup" the MethodImpl table after we computed the final method
19368 indices. Call fixup_methodimpl() to do that.
19369 (fixup_methodimpl): New private method.
19371 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19373 * assembly.c: special case mscorlib.dll (bug#72536),
19374 patch from Carlos Alberto Cortez.
19376 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
19378 * threads-types.h threads.c: Fix build bustage.
19380 * threads.c: Use a union for long<->double conversions.
19382 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
19383 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
19385 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
19386 containing the checkpoint call with NOT_TAKEN.
19388 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
19389 checkpoint before pushing the arguments, so they won't have to be
19392 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19394 * domain.c, assembly.c, domain-internals.h: make some data
19395 const and relocation-free.
19397 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
19399 * object.c, appdomain.c, class-internals.h: introduce the
19400 MonoClassRuntimeInfo structure to hold the info needed to
19401 use a class at runtime. Made mono_class_vtable() lock-free
19402 for all the appdomains.
19404 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
19406 * metadata-internals.h, image.c: introduce a per-image mempool to
19407 be used for memory that has the same lifetime as the image.
19409 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
19411 * domain.c: In mono_init_internal(), instead of selecting the first
19412 runtime version supported by an executable, get a list of all
19413 supported versions and select the one for which an mscorlib exists
19414 (since even if the runtime supports a given version, it doesn't mean
19415 that the framework for that version is installed).
19416 Modified get_runtimes_from_exe to support this behavior.
19417 In supported_runtimes, added information about additional system
19420 * assembly.c: Added support for more than one system assembly version
19421 per runtime version. Updated the assembly list.
19422 In mono_assembly_remap_version, removed the initial version check,
19423 since we don't know to which version we need to compare until we
19424 get the version set on which the assembly is based.
19425 Moved the code for loading corlib into the new method
19426 mono_assembly_load_corlib(), so it can be used by the initialization
19429 * domain-internals.h: Updated data structures and added declaration
19430 for mono_assembly_load_corlib.
19432 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
19434 * reflection.c (resolve_object): Fix the creation of the signature in
19435 the SignatureHelper case.
19437 * assembly.c (mono_assembly_remap_version): Fix binary search.
19439 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
19441 * class.c: Added inheritance check when a method is overloaded (from a
19442 virtual method or when implementing an interface) and when a class is
19443 inherited. Added functions to set a failure for a class and to
19444 retreive the exception from a failure.
19445 * class-internals.h: Added fields to MonoClass to keep the exception
19446 information status for inheritance (or other exceptions) to be thrown
19447 later (i.e. not at load time).
19448 * object.c: Throw the inheritance SecurityException when a type is to
19449 be created with either class or method inheritance violations.
19450 * reflection.c|h: Fix when getting declsec from a class. Removed
19451 unrequired code for class. Improved sanity in parameter naming.
19452 * security-manager.c|h: Added functions to check for class and method
19455 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
19457 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
19458 and has_finalize in dynamic types as well.
19460 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
19462 * culture-info-table.h : fixed currency format for en-GB (and so on).
19464 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
19466 * gc.c: ensure the GC handles never have 0 as a value.
19468 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
19470 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
19471 a pointer to a struct to unmanaged code. Fixes #72625.
19473 2005-02-16 Martin Baulig <martin@ximian.com>
19475 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
19477 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
19479 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
19481 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
19483 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
19485 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
19486 UnmanagedFunctionPointerAttribute, use it for determining calling convention
19489 * reflection.c (mono_custom_attrs_get_attr): New helper function.
19491 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
19493 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
19495 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
19496 changes to make the current context a field in MonoThread.
19498 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
19500 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
19503 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
19504 extracted from mono_marshal_get_native_wrapper.
19506 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
19507 to create wrappers around native functions.
19509 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
19510 delegates for arbitrary function pointers. Fixes #71472.
19512 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
19514 * threads.c: cleaned up the code a little.
19516 2005-02-15 Martin Baulig <martin@ximian.com>
19518 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
19521 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
19522 allocate larger chunks if needed.
19524 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
19526 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
19529 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
19531 * domain.c: keep the domains in an array and ensure the domain ids
19532 are kept small, so they can be used as indexes to domain-specific data
19533 with a small memory overhead.
19535 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
19537 * icall.c: Handle byref types in Type icalls. Fixes #72544.
19539 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
19541 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
19543 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
19545 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
19547 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
19550 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
19552 2005-02-12 Ben Maurer <bmaurer@ximian.com>
19554 * domain-internals.h: add the hashtable here.
19556 * class-internals.h: Remove `info' from MonoMethod
19558 * domain.c: Add a new hashtable, jit_trampoline_hash
19560 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
19562 * object.c: don't set the value of static fields
19565 2005-02-11 Martin Baulig <martin@ximian.com>
19567 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
19568 (mono_debug_add_method): Silently ignore the method if it's too big.
19569 (mono_debug_add_type): Likewise.
19571 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
19573 * threads.c, appdomain.c: remove #ifdefs from the code.
19575 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
19577 * metadata-internals.h: Added flags to MonoAssembly to cache the most
19578 common security informations. This allows us to stay in unmanaged code
19579 when doing LinkDemand and it's special cases (except for the first
19580 time for initialization). The flags a very much used with --security.
19581 * reflection.c|h: Added code to get declarative security attributes
19582 for LinkDemand and InheritanceDemand. This required to refactor the
19583 existing code for Demand.
19584 * security-manager.c|h: Added new method fields for the special cases
19587 2005-02-10 Martin Baulig <martin@ximian.com>
19589 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
19590 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
19592 2005-02-10 Martin Baulig <martin@ximian.com>
19594 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
19595 debugging code; this is almost a complete rewrite.
19597 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
19599 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19601 * domain.c, object.h: expose mono_string_equal () and
19602 mono_string_hash ().
19603 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
19604 it's implemented in managed code.
19606 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19608 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
19609 lo leak objects between appdomains.
19611 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19613 * assembly.c: old compilers compilation fix from
19614 robertj@gmx.net (Robert Jordan).
19616 2005-02-09 Ben Maurer <bmaurer@ximian.com>
19618 * class-internals.h: Little reminder for the future.
19620 * debug-helpers.c: Fix up wrapper_type_names
19622 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19624 * image.c, metadata-internals.h: when loading an image from a file,
19625 mmap all of it and use the same codepaths as when using a
19626 in-memory image: the code is simpler and we use less memory
19627 (both writable and readonly).
19629 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
19631 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
19632 API to alloc runtime data structures that need to be tracked by the
19633 GC and contain pointers.
19634 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
19635 make the code more readable and eventually use a different GC.
19637 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
19639 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
19642 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
19644 * object.c: In release_type_locks(), don't release the cctor lock
19645 if it has already been released. This fixes a crash in the
19648 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19650 * gc.c, marshal.c, icall.c: register a delegate for finalization
19651 only when the native function pointer has been allocated for it.
19653 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
19655 * object.c: cleaned up some code, allocate objects that are
19656 pointer free with the atomic malloc variant. Allocate memory
19657 for static data from the mempool if it's pointer-free.
19658 Allocate the bounds array at the end of the array data, when needed.
19659 * object-internals.h, object.h: move a private function in a private
19661 * class.c: handle missing case in tracking references in fields.
19663 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
19665 * class.c, class-internals.h: keep track if a type has
19666 reference fields in either the instance or static fields.
19668 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
19670 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
19671 and renamed to MonoRuntimeInfo. Added fields to store the expected
19672 framework assembly version. Changed mono_get_framework_version and
19673 mono_get_runtime_version for a single mono_get_runtime_info method.
19675 * assembly.c: Added method to remap system assembly versions to the
19676 current executing runtime version. Removed old mapping code.
19677 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
19679 * icall.c, reflection.c: Track api changes.
19681 2005-02-06 Miguel de Icaza <miguel@novell.com>
19683 * loader.c (method_from_memberref): Improve error reporting,
19684 produce the class name instead of the typeref/typedef index.
19686 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
19688 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
19690 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
19692 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
19693 stdcall and charset name mangling. Reorganize the code and add
19694 some tracing stuff.
19696 2005-02-05 Ben Maurer <bmaurer@ximian.com>
19698 * monodiet.c: More iters!
19700 * marshal.c: Iter usage.
19702 * icall.c: Iter usage.
19704 * object.c: Use iters.
19706 * debug-helpers.c: More iters
19708 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
19710 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
19713 2005-02-05 Ben Maurer <bmaurer@ximian.com>
19715 * mono-debug-debugger.c: use iters
19717 * class.c, class-internals.h: mono_class_setup_events is static
19720 * All callers: use iters
19722 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
19724 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
19725 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
19727 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
19729 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
19731 * marshal.h: Add prototypes for ldfld/stfld_remote.
19733 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
19734 this is called during startup.
19736 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
19738 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
19739 MonoThreadsSync struct private in monitor.c. Changed the way
19740 MonoThreadsSync is allocated so it's faster and there is no
19741 need to keep track of it with a finalizer and it uses less memory.
19742 This also finally allows us to allocate mono objects as ptrfree when
19743 there are no reference fields.
19745 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
19747 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
19748 disappearing link to the GC interface and use them to simplify
19749 the gchandles code.
19751 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
19753 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
19754 stfld_remote which call mono_load/store_field_new. This allows methods
19755 calling ldfld/stfld wrappers to be AOTed.
19757 * console-io.c: Include sys/filio.h under solaris.
19759 * console-io.c: Include curses.h if needed correctly.
19761 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
19763 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
19764 method->klass as well.
19766 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
19768 * class.c (mono_class_init): Switch on lazy initialization of
19771 * class.c (mono_class_get_finalizer): Handle the case when the
19772 finalizer is inherited.
19774 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19776 * console-io.c: <curses.h> is needed by term.h on solaris.
19778 2005-02-03 Ben Maurer <bmaurer@ximian.com>
19780 * icall.c, class-internals.h, monodiet.c, class.c: Remove
19781 mono_class_setup_properties where possible. Remove this ftn from
19782 the header file, and make it static.
19784 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
19786 * loader.c: Add missing setup_... call.
19788 * class.c: Add missing setup_... calls.
19790 * class.c (mono_class_init): Switch on lazy initialization of
19791 the generic vtable.
19793 * class.c (mono_class_init): Fix generics broken by the recent changes.
19795 * monodiet.c (handle_type): Add missing setup_... calls.
19797 * class.c: Back out garbage in previous patch.
19799 * class.c: Add missing setup_... calls.
19801 * class.c (mono_class_get_method_from_name_flags): Avoid calling
19802 mono_class_setup_methods () if possible.
19804 * class-internals.h (MonoClass): Add 'has_cctor' flag.
19806 * class-internals.h (MonoCachedClassInfo): New structure.
19808 * class.c: Initialize properties and events fields of MonoClass lazily.
19810 * class.c: Add infrastructure for lazily initializing the methods and
19811 vtable fields of MonoClass. Not yet used.
19813 * class.c (mono_class_get_finalizer): New helper function.
19815 * class.c: Add infrastructure for loading some class related data from
19818 * object.c: Add infrastructure for initializing the vtable from data
19821 * gc.c (run_finalize): Use mono_class_get_finalizer ().
19823 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
19824 appropriate initialization function before accessing parts of the
19825 MonoClass structure.
19827 * marshal.c: Fix warnings.
19829 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
19831 * mono-debug-debugger.c (get_exception_message): Use
19832 mono_class_get_method_from_name_flags ().
19834 2005-02-02 Ben Maurer <bmaurer@ximian.com>
19836 * reflection.c, appdomain.c: Replace a few manual searches that
19837 Zoltan missed. (Paolo approved this part of my initial patch).
19839 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
19841 * profiler.c: disable recording statistical events at report time.
19843 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19845 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
19846 to byteswap arrays of enum values, too (bug #72080).
19848 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
19850 * appdomain.c (set_domain_search_path): Allow this to be called if
19851 domain->setup is not yet set.
19853 * loader.c (mono_method_get_index): New helper function.
19855 * loader.c reflection.c: Use mono_method_get_index ().
19857 * class.c (mono_class_get_method_from_name_flags): New helper method.
19859 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
19862 * class.c (mono_class_get_cctor): New helper method.
19864 * string-icalls.c object.c class.c marshal.c reflection.c: Use
19865 mono_class_get_method () to look up methods.
19867 2005-02-01 Miguel de Icaza <miguel@novell.com>
19869 * console-io.c: Fix the build, this should work on Windows.
19871 2005-01-31 Ben Maurer <bmaurer@ximian.com>
19873 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
19874 be set to null to keep things valid
19876 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19878 * icall.c: added Console 2.0 icalls.
19879 * Makefile.am: added console-io.[ch]
19880 * console-io.[ch]: internal calls for Console 2.0 API.
19882 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19884 * class.c: make sure we consider all the interfaces
19885 when calculating max_interface_id (bug found by
19886 Jeroen Frijters running ikvm).
19888 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
19890 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
19891 valuetype fields to null.
19893 * object.c (set_value): Ditto. Fixes #71669.
19895 2005-01-31 Martin Baulig <martin@ximian.com>
19897 * metadata.c (mono_metadata_has_generic_params): New public
19898 function; checks whether something is a generic method.
19900 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
19902 * appdomain.c: fix infinite recursion when adding assemblies.
19904 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
19906 * object.c: Fix small typo to return all items for Environment.
19907 GetCommandLineArgs.
19909 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19911 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
19912 reflection.c: more domain and assembly-unload related fixes
19913 and memory leaks plugs.
19915 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
19917 * 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.
19919 2005-01-29 Ben Maurer <bmaurer@ximian.com>
19921 * loader.c (mono_method_signature): Make this method lazy
19922 (mono_get_method_from_token): Don't computate the signature here.
19924 Doing this saves quite a bit of memory. I got 90 kb on starting up
19925 monodoc. It should also save some disk reads on startup.
19927 * *: MonoMethod->signature might be NULL now. You *MUST* use
19928 mono_method_signature.
19930 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
19932 * object.c (mono_runtime_get_main_args): Return an array from the
19933 current domain here. Fixes #71938.
19935 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
19937 * monitor.c: formatting changes to comply with the
19938 mono coding style and remove #ifdefs from the code.
19940 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19942 * metadata.c, private.h: remove some unneeded data
19943 and use a more compact representation for table schemas.
19945 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
19947 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
19948 to get a better distribution in hash tables.
19949 * *.c: use mono_aligned_addr_hash() where appropriate.
19950 * assembly.c: make var static.
19952 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
19954 * domain-internals.h: Put MonoJitInfo on a diet.
19956 * domain.c: Fix a warning.
19958 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19960 * gc.c: rework the gc handles code to reuse handles
19963 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
19965 * domain.c: fixed long standing bug in mono_string_equal() which
19966 was brought to light with the ldstr changes.
19968 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
19970 * reflection.c: Remove warning by adding missing include for marshal.h
19972 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19974 * domain.c, object.c: change the ldstr_table to hold
19975 MonoString* as keys: makes the runtime isinterned lookup
19976 faster and simplifies memory management.
19978 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
19980 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
19981 possible to add imperative security checks before calling the icall.
19982 * reflection.c: Return security attributes on the original MonoMethod
19983 (and not the wrapped one). This fix permissions on icalls.
19985 2005-01-25 Dick Porter <dick@ximian.com>
19987 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
19988 the check for mktime() support actually test the mktime() return
19989 value. "Fixes" bug 71682, though the output is still different to
19992 2005-01-25 Martin Baulig <martin@ximian.com>
19994 * class.c (mono_class_is_assignable_from): Make this work for
19997 2005-01-24 Ben Maurer <bmaurer@ximian.com>
19999 * marshal.c (mono_string_utf8_to_builder)
20000 (mono_string_builder_to_utf16): We might not have ownership of the
20001 string. In thise case, we need to create a new buffer.
20003 * object-internals.h (mono_stringbuilder_capacity): sb->str might
20004 be null, in which case, use the default capacity.
20006 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20008 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
20009 GC events to the profiler.
20011 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20013 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
20014 if you don't want the GC to run.
20016 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
20018 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
20019 start providing a GC API and keeping different implementations in
20021 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
20023 2005-01-22 Ben Maurer <bmaurer@ximian.com>
20025 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
20026 mmap rather than allocating a huge buffer.
20027 (mono_debug_close_mono_symbol_file): Free the buffer allocated
20030 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
20032 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
20033 and CheckExecutionRights.
20034 * reflection.c|h: Keep the index of the declarative security to be
20035 used, instead of the pointer, when AOT compiler is used. Also add
20036 class initialization when requesting demands.
20037 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
20038 CheckExecutionRights. Both properties are now FALSE by default, and
20039 unmodifiable, unless the --security option is used.
20041 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20043 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
20044 reflection.c: properly refcount images and assemblies, many leaks fixed.
20046 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20048 * threadpool.c: increase the timeout for threads in the thread pool to
20049 10s. Fixes bug #67159.
20051 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
20053 * class-internals.h: Sun's compiler insists on explicit
20054 signed on bit fields to handle then correctly.
20056 2005-01-19 Miguel de Icaza <miguel@ximian.com>
20058 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
20059 Make the size of the array fit only the number of invalid path
20060 chars that we have.
20062 * class.c (_mono_class_get): Improve the error reporting when a
20063 class referenced is not found, to assist debugging.
20065 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
20067 * threads.c: fix off-by-one error.
20068 * domain.c: free data allocated in the domain.
20070 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20072 * reflection.c (mono_method_body_get_object): Fill out exception info
20075 * object-internals.h: Add MonoReflectionExceptionHandlingClause
20078 2005-01-19 Martin Baulig <martin@ximian.com>
20080 * loader.c (mono_get_method_constrained): Make this work again.
20082 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20084 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
20085 guint16 to match the managed side.
20087 * reflection.c (mono_reflection_body_get_object): Fill out local
20090 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
20093 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
20094 'local_var_sig_token'.
20096 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
20098 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
20101 * reflection.c (mono_method_body_get_object): Handle abstract and
20104 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
20106 * marshal.c, loader.c, class-internals.h, reflection.c:
20107 store the emthod data for a wrapper in an array instead of a list.
20109 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
20111 * marshal.c: change the code to allocate memory more
20112 conservatively for method wrappers.
20114 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
20116 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
20117 fields from MonoClass to the marshal info structure where they belong.
20119 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20121 * class.c, object.c, class-internals.h, marshal.c: rearrange
20122 some fields and tweak some types to lower memory usage.
20124 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
20126 * threads.c (signal_thread_state_change): Handle the case when the
20127 target thread is the current thread.
20129 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
20131 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
20132 emit_ptr_to_object_conv.
20134 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
20135 marshalling. Fixes #71352.
20137 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20139 * metadata.h, blob.h: move table enum to blob.h so it can be included
20141 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
20142 cut the size of MonoImage/MonoDynamicImage.
20144 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
20146 * profiler.c (mono_profiler_install_simple): Fix default arguments.
20148 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
20150 * reflection.c, reflection.h, icall.c: add a function to check
20151 if an attribute type is defined for a metadata object.
20153 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
20155 * object-internals.h: Added some needed fields from StringBuilder class.
20156 * marshal.c: Set the maxCapacity when creating a StringBuilder.
20158 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
20160 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
20161 threads before shutting down the runtime.
20163 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
20165 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20167 * object-internal.h, threads.c: implement stacksize and
20168 parameterized thread start functionality (requires
20169 matching corlib). Marked broken code for later removal.
20171 2005-01-12 Martin Baulig <martin@ximian.com>
20173 * class-internals.h (MonoGenericClass): Moved the `initialized'
20174 flag to MonoDynamicGenericClass, removed `init_pending'.
20175 (MonoGenericInst): Added `is_reference' flag.
20177 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
20179 * reflection.c (mono_image_create_pefile): Only set the pe_offset
20180 inside the MSDOS header. Fixes #71201.
20182 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
20184 (mono_domain_finalize): Ditto.
20186 2005-01-12 Martin Baulig <martin@ximian.com>
20188 * class.c (mono_get_shared_generic_class): Use the cache for
20189 non-dynamic generic classes.
20191 * class-internals.h (mono_class_create_generic_2): Removed
20192 function prototype, this function is now static inside class.c.
20194 * class.c (mono_class_create_generic_2): Made this static, only
20195 call it from mono_class_init() and mono_class_setup_parent().
20196 (collect_implemented_interfaces_aux): Call mono_class_init() on
20197 the interfaces we collect.
20198 (mono_class_setup_vtable): Call mono_class_init (class->parent).
20200 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
20202 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
20203 it a real thread handle.
20205 * domain-internals.h: Move exvar_offset from MonoJitInfo to
20206 MonoJitExceptionInfo, since each catch clause needs its own variable.
20208 2005-01-11 Dick Porter <dick@ximian.com>
20210 * image.c (mono_pe_file_open): New variant on mono_image_open()
20211 that does not set up the CLI metadata; used for FileVersionInfo so
20212 it can get the data for windows binaries too.
20214 * process.c (process_read_string_block): Don't read off the end of
20215 the StringTable block.
20217 These both fix bug 70766.
20219 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
20221 * gc.c: set some fields to NULL at GC cleanup time.
20222 * threads.c: if we quit the main thread, call exit ().
20224 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
20226 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
20228 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
20230 * threads.h, threads.c, object.c: added accessor and settor for
20231 main_thread. Handle it specially when exiting from it: wait
20232 for other foreground threads to exit.
20234 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
20236 * process.c, verify.c: remove some bloat.
20238 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
20240 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
20241 the calling convention to cdecl under win32.
20243 2005-01-08 Ben Maurer <bmaurer@ximian.com>
20245 * object.c (mono_object_get_size): New function to get the size of
20246 an object instance.
20248 * profiler.c (simple_allocation): Use above.
20250 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
20252 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
20253 ves_icall_System_AppDomain_getRootDomain (as it's not required to
20254 get an appdomain by it's id and we can't assume the root's id is 0).
20255 * domain-internals.h: Change the function prototype to match.
20256 * icall.c: Change the icall table for AppDomain.
20258 2005-01-08 Miguel de Icaza <miguel@ximian.com>
20260 * locales.c (string_invariant_compare_char): Only compute
20261 GUnicodeTypes in the case where we need them. Test for ordinality
20262 first and return if so.
20267 * FIXME: here we must use the information from c1type and c2type
20268 * to find out the proper collation, even on the InvariantCulture, the
20269 * sorting is not done by computing the unicode values, but their
20270 * actual sort order.
20273 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20275 * loader.c: for P/Invoke methods, allow the "Internal" shared
20276 library name to refer to the calling process symbol namespace.
20278 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
20280 * Makefile.am: Add the security manager to the build.
20281 * security-manager.c|h: New. Initialization of the security manager.
20283 2005-01-07 Dick Porter <dick@ximian.com>
20286 * monitor.c: Update thread state during Monitor and WaitHandle
20287 waits. Fixes bug 71031.
20289 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
20291 * reflection.c (property_encode_signature): Correctly handle when the
20292 property has no methods.
20294 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
20296 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
20298 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
20299 fields from mb, not rmb. Fixes #71017.
20301 * marshal.c (emit_ptr_to_str_conv): Add support for
20302 ByValTStr -> string conversion. Fixes #71015.
20304 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
20306 * mempool.c (mono_mempool_contains_addr): New helper function.
20308 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
20310 * metadata.c (mono_metadata_compute_size): Fix size calculation of
20311 HasSematics encoded fields.
20313 * metadata.c (mono_type_to_unmanaged): Improve error message for
20314 invalid string marshalling.
20316 * metadata.c: Fix warnings.
20318 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20320 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
20323 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
20325 * domain.c object.c domain-internals.h: Revert part of r38077 since the
20326 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
20329 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
20331 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
20332 so methods containing these can be AOTed.
20334 2005-01-03 Martin Baulig <martin@ximian.com>
20336 * loader.c (find_method): Removed the hack for generic instances.
20337 (method_from_memberref): If our parent is a generic instance, pass
20338 its generic type definition to find_method() and then inflate the
20340 (mono_get_method_constrained): Pass the generic type definition to
20341 find_method() and inflate the method later.
20343 * class-internals.h (MonoStats): Added `generic_class_count'.
20345 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
20346 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
20348 * reflection.c (mono_custom_attrs_from_params): Don't ignore
20349 generic type definitions.
20351 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
20353 * loader.c icall.c: Fix warnings.
20355 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
20357 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
20358 blittable types. Fixes #70864.
20360 2004-12-29 Martin Baulig <martin@ximian.com>
20363 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
20365 * reflection.c (mono_method_get_object): Create a
20366 "System.Reflection.MonoGenericMethod" for inflated methods; don't
20367 call mono_get_inflated_method().
20369 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
20371 2004-12-27 Martin Baulig <martin@ximian.com>
20373 * class-internals.h (MonoMethod): Added `is_inflated' flag.
20374 (MonoMethodInflated): Added `inflated' field.
20376 * class.c (mono_class_inflate_generic_method): Don't really
20377 inflate the method here; just set the `is_inflated' flag in the
20379 (mono_class_get_inflated_method): Actually inflate the method here
20380 if it's not already inflated; we use the MonoMethodInflated's new
20381 `inflated' field as a cache.
20383 2004-12-26 Martin Baulig <martin@ximian.com>
20386 (inflate_generic_class): Moved some code out of inflate_generic_type().
20387 (mono_class_inflate_generic_method): If we're already inflated,
20388 inflate the context and use the declaring method; ie. make sure
20389 the declaring method of an inflated method is always the generic
20391 (mono_class_create_from_typedef): Create
20392 `class->generic_container->context->gclass'.
20394 2004-12-24 Ben Maurer <bmaurer@ximian.com>
20396 * metadata-internals.h, marshal.c, reflection.c: More
20397 MonoGHashTable->GHashTable.
20399 * domain-internals.h, class.c: Change MonoGHashTable's into
20400 GHashTables for some cases where no gc stuff is used
20402 All users: update apis
20404 2004-12-23 Ben Maurer <bmaurer@ximian.com>
20406 * metadata.c (builtin_types): Make this `const'. Makes this get
20407 put into the shareable section.
20408 (mono_metadata_init): Casts to make gcc happy.
20410 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
20412 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
20414 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
20416 * icall.c: Added an internal call to retrieve the position and length
20417 of assembly-level declarative security attributes (RequestMinimum,
20418 RequestOptional and RequestRefuse). This is used by the Assembly class
20419 to re-create the corresponding permission sets.
20421 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
20423 * marshal.c: fix the stelemref wrapper to be type correct
20426 2004-12-20 Ben Maurer <bmaurer@ximian.com>
20428 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
20429 to do key & 0x7fffffff. Hashtable already does this. It just
20430 results in longer code.
20432 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
20434 * appdomain.c: Bump corlib version.
20435 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
20436 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
20437 * reflection.c|h: Add functions to get declarative security infos
20438 (blob position and length) for assemblies, classes and methods.
20440 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
20442 * reflection.c: sort the constant table (bug #70693).
20444 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
20446 * object-internals.h, threads.c, domain.c: add accessors for
20447 the MonoThread and MonoDomain tls keys.
20449 2004-12-18 Martin Baulig <martin@ximian.com>
20451 * class.c (inflate_generic_type): If we're inflating a generic
20452 instance, set `ngclass->context->container = context->container';
20453 ie. the container we inflated into.
20455 * metadata.c (mono_metadata_parse_generic_param): Reflect above
20456 inflate_generic_type() changes.
20458 2004-12-17 Martin Baulig <martin@ximian.com>
20460 * class-internals.h
20461 (MonoGenericClass): Replaced `MonoType *generic_type' with
20462 `MonoClass *generic_class'. Removed `dynamic_info'; if
20463 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
20464 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
20466 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
20468 * exception.c (mono_exception_from_token): New helper function.
20470 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
20472 * assembly.c (mono_assembly_load_with_partial_name): Call
20473 mono_assembly_loaded before invoking the preload hooks. Fixes
20476 * object-internals.h (MonoThread): Change culture_info and
20477 ui_culture_info into an array.
20479 * threads.c: Cache culture info objects from more than one appdomain.
20481 * threads.c threads-types.h icall.c: Add icalls for manipulating the
20482 current UI culture.
20484 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
20486 * threads.h threads.c appdomain.c: Clear the culture_info field of
20487 all threads during unloading if they point to an object in the dying
20490 2004-12-13 Ben Maurer <bmaurer@ximian.com>
20492 * culture-info.h (TextInfoEntry): New struct
20493 * object-internals.h: sync with managed
20494 * locales.c: fill the `text_info_data' field
20495 * culture-info-tables.h: update
20497 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20499 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
20502 2004-12-12 Ben Maurer <bmaurer@ximian.com>
20504 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
20505 (ves_icall_ModuleBuilder_getMethodToken): Ditto
20507 2004-12-12 Martin Baulig <martin@ximian.com>
20509 * mono-debug-debugger.c (write_type): If we're an enum and the
20510 builtin types have already been initialized, call mono_class_init().
20512 2004-12-11 Martin Baulig <martin@ximian.com>
20514 * metadata.c (mono_metadata_load_generic_params): Added
20515 `MonoGenericContainer *parent_container' argument; automatically
20516 compute `container->is_method'; pass the correct owner to
20519 * reflection.c (compare_genericparam): Sort the GenericParam table
20520 according to increasing owners.
20522 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
20524 * profiler.c: allow disabling the default profiler.
20526 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
20528 * decimal.c, icall.c: allow disabling System.Decimal support.
20530 2004-12-09 Marek Safar <marek.safar@seznam.cz>
20532 * reflection.c: Add support for null attribute arguments.
20534 2004-12-09 Martin Baulig <martin@ximian.com>
20536 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
20537 names to get rid of compiler warnings.
20539 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
20541 * marshal.c (mono_marshal_get_struct_to_ptr): Call
20542 mono_marshal_load_type_info (). Fixes #69625.
20543 (mono_marshal_get_ptr_to_struct): Likewise.
20545 2004-12-08 Martin Baulig <martin@ximian.com>
20547 * mono-debug.h: Bumped version number to 47.
20549 * mono-debug-debugger.c
20550 (mono_debugger_event_handler, mono_debugger_event): Take two
20551 guint64 arguments insteed of a gpointer and a guint32.
20553 2004-12-08 Martin Baulig <martin@ximian.com>
20555 * debug-mono-symfile.h
20556 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
20557 `address' to `native_offset'.
20559 2004-12-08 Martin Baulig <martin@ximian.com>
20561 * class.c (mono_class_create_from_typespec): Only inflate if we
20562 either have `context->gclass' or `context->gmethod'.
20564 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
20566 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
20568 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
20570 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
20572 * reflection.c (mono_assembly_get_object): Remove the workaround put
20573 in for the release.
20575 * appdomain.c: Use the corlib_internal field from MonoAssembly.
20577 * appdomain.c: Bump corlib version.
20579 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
20580 be visible in other appdomains.
20582 2004-12-07 Ben Maurer <bmaurer@ximian.com>
20584 * threads.c: Interlocked inc and dec for longs were messed up,
20585 use a KISS based impl for this. Fixes 70234
20587 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
20589 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
20591 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
20593 * icall.c: fix to follow policy not to allow struct
20594 arguments in icalls.
20596 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20598 * process.c: make the patch that handles spaces in file paths work
20599 on mono/windows too.
20601 2004-12-06 Martin Baulig <martin@ximian.com>
20603 * class.c (mono_class_create_generic): Call
20604 mono_class_setup_supertypes() if we're dynamic.
20605 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
20607 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
20609 * object-internals.h: Add new fields to MonoThread.
20611 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20613 * icall.c threads-types.h threads.c: Add new icalls.
20615 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
20617 * object-internals.h (MonoReflectionAssembly): Sync object layout with
20620 * appdomain.c: Bump corlib version.
20622 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
20623 internal assemblies. Fixes #69181.
20625 2004-12-05 Martin Baulig <martin@ximian.com>
20627 * class.c (mono_class_inflate_generic_signature): Make this a
20628 no-op if `context' is NULL or we don't have any type parameters;
20629 also copy `sentinelpos'.
20631 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
20633 * image.c: Add unbox_wrapper_cache.
20635 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
20637 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
20638 function generator.
20640 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
20643 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
20645 2004-12-04 Martin Baulig <martin@ximian.com>
20647 * loader.c (mono_method_get_signature_full): New public function;
20648 like mono_method_get_signature(), but with an additional
20649 `MonoGenericContext *' argument.
20651 * class.c (mono_class_inflate_generic_signature): Formerly known
20652 as inflate_generic_signature(); make this public.
20654 2004-12-04 Martin Baulig <martin@ximian.com>
20657 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
20658 instead of a `MonoGenericContainer *'.
20659 (mono_metadata_parse_array_full): Likewise.
20660 (mono_metadata_parse_signature_full): Likewise.
20661 (mono_metadata_parse_method_signature_full): Likewise.
20662 (mono_metadata_parse_generic_inst): Likewise.
20663 (mono_metadata_parse_generic_param): Likewise.
20664 (mono_metadata_parse_mh_full): Likewise.
20665 (mono_type_create_from_typespec_full): Likewise.
20667 2004-12-03 Martin Baulig <martin@ximian.com>
20669 * class-internals.h (MonoGenericContainer): Replaced the
20670 `MonoGenericContext * pointer with a `MonoGenericContext'
20671 structure and made it the first element.
20673 2004-12-03 Martin Baulig <martin@ximian.com>
20676 (inflate_generic_type): Set the `context->container' when creating
20677 a new MonoGenericContext.
20678 (mono_class_inflate_generic_method): Likewise.
20679 (mono_class_create_from_typespec): Just use `context->container'
20680 to get the container.
20682 * loader.c (method_from_methodspec): Set `context->parent' from
20683 `context->container' - and if that's a method container, use its
20684 parent. Also set the `context->container' when creating a new
20685 MonoGenericContext.
20686 (mono_get_method_from_token): Use just `context->container' to get
20689 * metadata.c (do_mono_metadata_parse_generic_class): Also set
20690 `gclass->context->container'.
20692 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
20693 the `context->container' when creating a new MonoGenericContext.
20695 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
20697 * reflection.c (compare_genericparam): Sort params with identical
20698 owner by their number. Fixes gen-111 on sparc.
20700 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
20702 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
20703 around the domain changes.
20705 * appdomain.c (mono_domain_unload): Handle the case when the thread
20706 calling Unload is itself being aborted during unloading. Fixes #70022.
20708 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
20710 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
20711 checkpoint_func as an icall so it gets a wrapper.
20712 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
20713 in the cross-appdomain wrappers too.
20715 * threads.c (mono_thread_has_appdomain_ref): Make this public.
20717 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
20719 * reflection.c: Fix some memory leaks.
20721 2004-12-02 Martin Baulig <martin@ximian.com>
20723 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
20725 * metadata.c (generic_class_cache): New static hashtable.
20726 (mono_metadata_lookup_generic_class): New public method.
20728 2004-12-02 Martin Baulig <martin@ximian.com>
20730 * class.c (mono_class_create_from_typedef): Call
20731 mono_class_setup_parent() and mono_class_create_mono_type() before
20732 parsing the interfaces.
20734 2004-12-02 Martin Baulig <martin@ximian.com>
20736 * metadata.c (generic_inst_cache): New static hashtable.
20737 (mono_metadata_lookup_generic_inst): New public function.
20738 (mono_metadata_inflate_generic_inst): New public function.
20739 (mono_metadata_parse_generic_inst): New public function.
20740 (do_mono_metadata_parse_generic_class): Use the new
20741 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
20742 since this'll also use the cache.
20744 * reflection.c (mono_reflection_bind_generic_method_parameters):
20745 Use mono_metadata_lookup_generic_inst() to use the new cache.
20747 * class.c (inflate_mono_type): Use
20748 mono_metadata_inflate_generic_inst() to inflate a generic
20749 instance; this'll also use the new cache.
20751 * loader.c (method_from_methodspec): Use
20752 mono_metadata_parse_generic_inst() and
20753 mono_metadata_inflate_generic_inst() rather than parsing it
20754 manually, so we can use the new cache.
20756 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
20758 * threads.c (wait_for_tids): Do not incorrectly free threads when
20759 the wait times out.
20761 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20763 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
20764 iter->args based on whether parameters are passed in registers (i.e.
20765 MONO_ARCH_REGPARMS is defined)
20767 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
20769 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
20770 the exception message. Fixes #70070.
20771 (method_from_methodspec): Fix warnings.
20773 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20775 * process.c: (complete_path) return the path quoted
20777 2004-12-01 Martin Baulig <martin@ximian.com>
20779 * class-internals.h (MonoGenericInst): New structure.
20780 (MonoGenericClass): Replaced `type_argc', `type_argv' and
20781 `is_open' with `MonoGenericInst *inst'.
20782 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
20783 `is_open' with `MonoGenericInst *inst'.
20785 2004-11-30 Martin Baulig <martin@ximian.com>
20787 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
20789 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
20790 to `generic_class_cache'.
20793 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
20794 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
20795 (mono_generic_inst_is_valuetype): Renamed to
20796 mono_generic_class_is_valuetype().
20798 * class-internals.h
20799 (MonoGenericInst): Renamed to MonoGenericClass.
20800 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
20801 (MonoClass): Renamed `generic_inst' to `generic_class'.
20802 (MonoGenericContext): Renamed `ginst' to `gclass'.
20804 * object-internals.h
20805 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
20807 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
20808 mono_reflection_generic_class_initialize().
20810 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
20811 now known as "System.Reflection.MonoGenericClass".
20812 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
20814 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
20816 * class-internals.h: Added a flag field to MonoClass to cache the
20817 declarative security attributes actions associated with the class.
20818 * domain-internals.h: Added booleans to MonoJitInfo to cache the
20819 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
20820 applicable to the JITted method.
20821 * reflection.c|h: Added functions to extract (as flags) which security
20822 actions are available (declaratively) for a method, class or assembly.
20823 * metadata.c|h: Added functions to search the declarative security
20824 table in the metadata.
20826 2004-11-29 Ben Maurer <bmaurer@ximian.com>
20828 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
20829 EXPORTEDTYPES are already in the class name cache, so there is no
20830 need to add extra code here to look at them. Just removes a bit of
20833 (ves_icall_System_Environment_get_TickCount): No need for #if
20834 WINDOWS. We already have the code in io-layer.
20836 2004-11-28 Martin Baulig <martin@ximian.com>
20839 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
20842 2004-11-27 Miguel de Icaza <miguel@ximian.com>
20844 * assembly.c (do_mono_assembly_open): Instead of having a
20845 conditional WITH_BUNDLE, incorporate support for bundles here, by
20846 having a global `bundles' variable holding a pointer to the actual
20849 (mono_register_bundled_assemblies): New API call used by the
20852 See mkbundle.1 for details.
20854 2004-11-27 Martin Baulig <martin@ximian.com>
20856 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
20857 the vtable for generic methods.
20859 2004-11-26 Martin Baulig <martin@ximian.com>
20862 (mono_metadata_generic_method_hash): New public function.
20863 (mono_metadata_generic_method_equal): Likewise.
20865 * class-internals.h
20866 (MonoGenericContainer): Added `GHashTable *method_hash'.
20868 * reflection.c (ReflectionMethodBuilder): Added
20869 `MonoGenericContainer *generic_container'.
20870 (reflection_methodbuilder_to_mono_method): Don't create a new
20871 MonoGenericContainer each time we're called.
20872 (mono_reflection_bind_generic_method_parameters): Use
20873 `container->method_hash' to cache the results so we don't create a
20874 different method if we're called several times with the same
20877 * loader.c (method_from_methodspec): Use the new
20878 `container->method_hash' here, too.
20880 2004-11-26 Martin Baulig <martin@ximian.com>
20882 * class.c (inflate_generic_signature): Correctly compute
20883 `res->has_type_parameters'.
20884 (mono_class_vtable): Use the `has_type_parameters' flag to
20885 determine whether we're a generic method.
20887 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
20889 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
20891 * object.c (mono_runtime_run_main): Fix a small memory leak.
20893 2004-11-25 Martin Baulig <martin@ximian.com>
20895 * class.c (set_generic_param_owner): Fixed the loop.
20897 2004-11-25 Martin Baulig <martin@ximian.com>
20899 * object.c (mono_class_vtable): Don't create any JIT wrappers for
20902 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
20904 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
20905 names. Fixes #69787.
20907 2004-11-24 Martin Baulig <martin@ximian.com>
20909 * class.c (mono_class_create_generic_2): If we don't have a
20910 `ginst->parent', inflate `gklass->parent' to get our parent.
20912 2004-11-24 Martin Baulig <martin@ximian.com>
20914 * reflection.c (compare_genericparam): Correctly sort the
20915 GenericParam table; fixes #69779.
20917 2004-11-23 Ben Maurer <bmaurer@ximian.com>
20919 * reflection.c: When writing a PE file, don't create a huge
20920 buffer in memory. Just write the arrays we have to the file.
20921 This reduces memory usage.
20923 * metadata-internals.h: MonoDynamicStream pefile is no longer used
20926 2004-11-17 Martin Baulig <martin@ximian.com>
20928 * class.c (mono_class_init): Don't setup `class->parent' for
20929 dynamic instances; moved this to mono_class_generic_2().
20930 (mono_class_create_generic): Also set `klass->inited' for dynamic
20932 (mono_class_create_generic_2): Don't do anything for dynamic
20933 generic instances. Set `klass->parent' here and also call
20934 mono_class_setup_parent() here.
20936 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
20937 `MonoType *parent' argument; set `ginst->parent' before calling
20938 mono_class_create_generic_2(), so we set the correct parent.
20940 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
20942 * reflection.c: allow getting attributes from ModuleBuilder
20945 2004-11-17 Martin Baulig <martin@ximian.com>
20947 * class.c (mono_class_create_from_typedef): If a type parameter is
20948 inherited from an outer class, set its owner to that class.
20950 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
20952 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
20953 for (int*) written size. This fixes bug #69592.
20955 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
20957 * icall.c: Added IsAuthenticodePresnet internal call.
20958 * image.c|h: New function that check a MonoImage for an Authenticode
20959 signature in the certificate PE data directory.
20960 * security.c|h: New internal call to ask the runtime if an
20961 Authenticode signature seems referenced in the PE header.
20963 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
20965 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
20967 * reflection.c (mono_image_create_pefile): Free the assembly streams
20968 after writing out the assembly file.
20970 * object.c (mono_runtime_run_main): Fix small memory leak.
20972 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
20973 property access modifiers. Fixes #69389.
20975 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
20977 * domain.c, object.c, object-internals.h, domain-internals.h,
20978 object.h, marshal.c: keep dynamic code info per domain.
20980 2004-11-15 Martin Baulig <martin@ximian.com>
20982 * class.c (mono_type_get_name_recurse): Put type arguments in
20983 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
20986 2004-11-15 Martin Baulig <martin@ximian.com>
20988 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
20989 (mono_class_setup_vtable): When computing `the_cname' for a
20990 generic instance, don't include the namespace since we'd otherwise
20993 2004-11-15 Martin Baulig <martin@ximian.com>
20995 * class.c (mono_class_create_generic): Changed return type to void.
20996 (mono_class_create_generic_2): New public function; setup
20997 `class->method', `class->field' and `class->interfaces' here
20998 instead of in mono_class_init().
21000 * class.h (mono_class_create_generic): Moved to class-internals.h.
21002 2004-11-14 Ben Maurer <bmaurer@ximian.com>
21004 * reflection.c (mono_image_create_pefile): take a file HANDLE.
21005 rather than writing to memory, write to this file. Right now,
21006 we are just writting into a buffer, and copying that. However
21007 we can avoid the buffer later.
21009 (mono_dynamic_stream_reset): new function
21011 * icall.c, object-internals.h: update for the above.
21013 2004-11-13 Ben Maurer <bmaurer@ximian.com>
21015 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
21016 have been using gc'd memory. First it is slower, unlikely
21017 the comment in the source code said, secondly, it increases
21018 our footprint to do it in the gc.
21020 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
21021 the method so that it does not have to copy to managed code.
21023 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
21025 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
21027 2004-11-12 Martin Baulig <martin@localhost>
21029 * reflection.c (mono_image_create_token): Allow generic method
21030 definitions here, since they may appear in an `.override'; see
21031 gen-98/gen-99 for an example.
21033 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
21035 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
21038 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
21041 2004-11-11 Martin Baulig <martin@ximian.com>
21043 * class.c (mono_class_setup_vtable): In an explicit interface
21044 implementation, the method name now includes the arity.
21046 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
21048 * object.c (mono_array_full_copy): Fix warning.
21050 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
21052 * appdomain.c: Removed look_for_method_by_name(). Use the new method
21053 mono_class_get_method_from_name() instead.
21055 * class-internals.h: Added two new types of wrappers.
21056 Added MonoRemotingTarget enum. Added new trampoline function type, which
21057 takes an additional MonoRemotingTarget value as parameter, so it is
21058 possible to request a trampoline for a specific target.
21060 * class.c: Added new mono_class_get_method_from_name() method.
21062 * class.h: In MonoRemoteClass, we can have now to vtables, one for
21063 general remoting sinks and one specific for cross domain calls.
21065 * debug-helpers.c: Added new wrapper names.
21067 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
21070 * image.c: Porperly delete value objects form the remoting invoke hashtable.
21072 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
21073 with several other methods (mono_marshal_get_xappdomain_dispatch,
21074 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
21075 and others) can generate a fast remoting wrapper for cross domain calls.
21076 More information can be found in docs/remoting.
21077 Other changes: Removed mono_find_method_by_name, and used
21078 mono_class_get_method_from_name instead.
21079 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
21080 is stored in the remoting invoke hashtable.
21082 * marshal.h: published the new method for getting the xdomain wrapper,
21083 and also added a method for getting the adequate wrapper for a given
21086 * object-internals.h, object.c: Added a couple of methods for capying and
21088 Modified mono_install_remoting_trampoline, which takes the new remoting
21089 trampoline that has a remoting target as parameter.
21090 mono_class_proxy_vtable now also takes a remoting target as parameter, and
21091 will return the most suitable vtable for the target.
21092 Added mono_remote_class_vtable, which returns the vtable of a remote class
21093 (which can be the normal remoting vtable or the xdomain vtable).
21095 * threads.c: the xdomain invoke and dispatch wrappers must also be
21096 protected against interruptions.
21098 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21100 * icall.c: use memmove in BlockCopyInternal when the source and
21101 destination arrays are the same.
21103 2004-11-09 Martin Baulig <martin@ximian.com>
21105 * class-internals.h (MonoGenericContainer): Removed `method' and
21106 `signature', replaced them with `is_method' and `is_signature'
21107 flags. Added `context'.
21109 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
21110 instead of a `MonoGenericContainer *'.
21112 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
21113 for dynamic type parameters.
21114 (mono_metadata_load_generic_params): Setup `container->context'.
21116 * reflection.c (mono_reflection_setup_generic_class): Setup
21117 `tb->generic_container->context'.
21118 (do_mono_reflection_bind_generic_parameters): Use
21119 mono_class_inflate_generic_type() to correctly inflate types,
21120 rather than using our own hack just for MONO_TYPE_VAR.
21122 2004-11-09 Martin Baulig <martin@ximian.com>
21124 * class.c (mono_class_inflate_generic_method): Small fix; don't
21128 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
21129 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
21130 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
21131 (ves_icall_Type_BindGenericParameters): Likewise.
21132 (ves_icall_Type_get_IsGenericInstance): Likewise.
21133 (ves_icall_Type_GetGenericParameterPosition): Likewise.
21134 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
21135 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
21136 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
21138 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
21140 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
21141 assembly versions and public key tokens. Fixes #69113.
21143 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
21145 * metadata.c: fix bug introduced with the type cache changes
21148 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
21150 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
21151 the MonoClass pointer instead of the token in exception clauses.
21152 * reflection.c: updates for the above and make the code not depend
21153 on the structure of MonoExceptionClause.
21155 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
21157 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21158 Add support for dynamic assemblies. Fixes #69114.
21160 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
21162 2004-11-07 Ben Maurer <bmaurer@ximian.com>
21164 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
21165 since most only those methods use it. the code member of
21166 MonoMethodPInvoke was dead, so that can be removed too. Also,
21167 remove inline_count (again, not used), and move slot so that it
21168 can share bits with some other flags. This saves 8 bytes in the
21169 structure and gives us about 50 kb back for mcs helloworld.cs
21171 * *.[ch]: Do naming changes for the above.
21173 * loader.c (mono_method_get_header): Lazily init the header
21175 (mono_get_method_from_token): don't init the header here
21176 (mono_free_method): the header may never be allocated
21178 Overall, this saves 150 kb of unmanaged allocations
21179 for mcs helloworld.cs. That accounts for 10% of the unmanaged
21182 * loader.c, loader.h (mono_method_get_header): new accessor.
21184 * *.[ch]: use the above method. Prepares us to lazily load
21187 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
21188 three warnings, which are actual bugs (see 69206).
21190 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
21191 unused. Saves a cool 4 bytes / method.
21193 2004-11-06 Ben Maurer <bmaurer@ximian.com>
21195 * metadata.c (builtin_types): Add types for System.Object here.
21196 (mono_metadata_parse_type_full): Cache MonoType*'s that are
21197 for a class or valuetype from klass->this_arg or klass->byval_arg.
21199 On mcs for a hello world, this gets us down from 21836 MonoType's
21202 (mono_metadata_free_type): Account for the above change.
21204 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
21206 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
21207 exception instead of asserting if name is null.
21208 (ves_icall_System_AppDomain_GetData): Ditto.
21210 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
21212 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
21215 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
21216 Return NULL when the domain does not have entry_assembly set.
21218 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
21219 Add a 'resource_modules' argument.
21220 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
21222 * reflection.c (mono_reflection_create_runtime_class): Move setting
21223 of wastypebuilder here, so mono_get_type_object () returns a MonoType
21226 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
21227 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
21228 Throw an ArgumentNullException if 'ptr' is null.
21230 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
21231 assemblies here. Fixes #69020.
21233 2004-11-05 Geoff Norton <gnorton@customerdna.com>
21235 * reflection.c (build_compressed_metadata): Fix the previous patch for
21236 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
21239 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
21241 * assembly.c (mono_assembly_names_equal): Allow a match if one of
21242 the cultures is false. Fixes #69090.
21244 * reflection.c (build_compressed_metadata): Fix invalid memory read
21245 detected by valgrind.
21247 * reflection.c (mono_reflection_get_type): Avoid triggering a
21248 TypeResolve multiple times for the same type. Fixes #65577.
21250 2004-11-04 Ben Maurer <bmaurer@ximian.com>
21252 * marshal.c: Avoid using ldftn to call managed functions. It is
21253 much slower than just a call.
21255 * reflection.c (mono_module_get_object): free the basename we
21256 allocate here from glib.
21258 * reflection.c (ensure_runtime_vtable): make sure to free
21259 overrides. Also, we were allocating an array of MonoMethod not an
21260 array of MonoMethod*.
21262 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
21264 * image.c (mono_image_close): free image->guid here.
21266 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
21268 * reflection.c: Fix some spec conformance issues with the PE file
21269 structures so mcs compiled apps run on the Net 2.0 beta.
21271 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
21273 * string-icalls.c (ves_icall_System_String_ctor_encoding):
21274 Implement this. Fixes #67264.
21276 * debug-helpers.h debug-helpers.c marshal.c: Move
21277 mono_find_method_by_name to debug-helpers.c.
21279 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
21281 * object.c (mono_release_type_locks): type_initialization_hash is
21284 * reflection.c object.c object-internals.h: Fix warnings.
21286 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
21287 without accessors. Fixes #61561.
21289 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
21290 application base from the root domain if not set. Fixes #65641.
21291 (mono_runtime_init): Fix warning.
21293 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21295 * appdomain.c: call mono_thread_pool_init.
21296 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
21297 of worker threads based on the number of CPUs and the environment
21298 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
21299 for non-windows (windows) systems.
21301 2004-10-27 Chris Toshok <toshok@ximian.com>
21303 * mono-debug-debugger.c (write_class): don't call mono_class_init
21304 here, as even with the check for (!klass->init_pending), we get
21305 into a situation where we're hitting cycles in class
21306 initialization. Fixes #68816.
21308 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
21310 * image.c: Avoid overwriting values in the loaded_images_hash when an
21311 assembly is loaded multiple times. Fixes #61152.
21313 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
21314 so multiple satellite assemblies for the same name can be loaded.
21317 * mono_domain_assembly_preload: Actually return the loaded assembly,
21320 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
21321 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
21323 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
21324 pending finalizers are not invoked after the appdomain has been
21325 unloaded. Fixes #67862.
21327 2004-10-22 Martin Baulig <martin@ximian.com>
21329 * mono-debug-debugger.c
21330 (mono_debugger_runtime_invoke): Don't box valuetypes.
21332 2004-10-22 Chris Toshok <toshok@ximian.com>
21334 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
21335 don't hide private methods.
21337 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
21339 * icall.c: Allows the runtime to "share" (when known) the public key
21340 token of an assembly. This avoid the need to recalculate the token
21341 (from the public key) in managed code.
21343 2004-10-21 Chris Toshok <toshok@ximian.com>
21345 * debug-helpers.c (append_class_name): argh, revert last patch.
21347 2004-10-21 Chris Toshok <toshok@ximian.com>
21349 * debug-helpers.c (append_class_name): use '+' as the delimiter,
21350 not '/', so that it matches what the debugger uses to look up
21353 2004-10-21 Martin Baulig <martin@ximian.com>
21355 * mono-debug-debugger.c (mono_debugger_throw_exception): New
21356 public method; this is called each time an exception is thrown and
21357 allows the debugger to use exception catch points.
21359 2004-10-21 Martin Baulig <martin@ximian.com>
21361 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
21362 the stack pointer and the exception object in some struct and pass
21363 that to the debugger.
21365 2004-10-21 Chris Toshok <toshok@ximian.com>
21367 * mono-debug-debugger.c (do_write_class): add instance/static
21368 event support. We don't expose "raise" or "other" yet.
21369 (event_is_static): new method.
21371 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
21373 * mono-debug-debugger.c
21374 (mono_debugger_handle_exception): Remove
21375 bogus return value for fussy compilers.
21377 2004-10-20 Martin Baulig <martin@ximian.com>
21379 * mono-debug-debugger.c
21380 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
21381 (mono_debugger_handled_exception): Likewise.
21383 2004-10-20 Martin Baulig <martin@ximian.com>
21385 * mono-debug-debugger.h (MonoDebuggerEvent): Added
21386 MONO_DEBUGGER_EVENT_EXCEPTION.
21388 * mono-debug-debugger.c (mono_debugger_handle_exception): New
21389 public function to send the debugger a notification for an
21390 exception and inform it about a catch/finally clause.
21392 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
21394 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
21395 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
21398 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
21400 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
21402 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
21403 marshalled as [In,Out]. Fixes #58325.
21405 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
21407 * reflection.c (mono_method_body_get_object): Implement some fields.
21409 2004-10-12 Martin Baulig <martin@ximian.com>
21411 * reflection.c (mono_reflection_bind_generic_parameters): Small
21412 fix, correctly retrieve our parent from a generic instance.
21414 2004-10-12 Martin Baulig <martin@ximian.com>
21416 * metadata.c (mono_metadata_generic_param_equal): We always have
21420 (mono_class_from_generic_parameter): We need to have an owner.
21421 (my_mono_class_from_generic_parameter): Likewise.
21423 * reflection.c (mono_reflection_setup_generic_class): Renamed to
21424 mono_reflection_create_generic_class() and added a new
21425 mono_reflection_setup_generic_class().
21426 (mono_reflection_initialize_generic_param): If we're a nested
21427 generic type and inherited from the containing class, set our
21428 owner to the outer class.
21430 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
21432 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
21434 * reflection.c (mono_method_body_get_object): New function to create
21435 a MethodBody object.
21437 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
21439 2004-10-11 Martin Baulig <martin@ximian.com>
21441 * metadata.c (_mono_metadata_type_equal): Renamed to
21442 do_mono_metadata_type_equal() and made static.
21444 2004-10-11 Martin Baulig <martin@ximian.com>
21446 * appdomain.c: Bump corlib version number to 28.
21448 2004-10-10 Martin Baulig <martin@ximian.com>
21450 * class-internals.h
21451 (MonoGenericInst): Added `MonoGenericContainer *container'.
21452 (MonoGenericMethod): Likewise.
21453 (MonoGenericContext): Likewise.
21454 (MonoGenericParam): Added `MonoGenericContainer *owner'.
21457 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
21458 (do_mono_metadata_parse_generic_inst): Likewise.
21459 (mono_metadata_parse_type_full): New public method. This is the actual
21460 mono_metadata_parse_type() implementation - with an additional
21461 `MonoGenericContainer *' argument.
21462 (mono_metadata_parse_array_full): Likewise.
21463 (mono_metadata_parse_signature_full): Likewise.
21464 (mono_metadata_parse_method_signature_full): Likewise.
21465 (mono_metadata_parse_mh_full): Likewise.
21466 (mono_type_create_from_typespec): Likewise.
21467 (mono_metadata_interfaces_from_typedef_full): New public method;
21468 this is similar to the other _full() methods, but we take a
21469 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
21470 (mono_metadata_parse_generic_param): Take an additional
21471 `MonoGenericContainer *' argument and lookup the MonoGenericParam
21472 from that container.
21473 (mono_metadata_generic_param_equal): New static method to compare
21474 two type parameters.
21475 (_mono_metadata_type_equal): New static method; takes an
21476 additional `gboolean signature_only' argument - if true, we don't
21477 compare the owners of generic parameters.
21478 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
21479 with a TRUE argument - do a signature-only comparision.
21481 * loader.c: Use the new _full() methods and pass the
21482 MonoGenericContainer to them.
21484 * object-internals.h (MonoReflectionTypeBuilder): Added
21485 `MonoGenericContainer *generic_container' field.
21486 (MonoReflectionMethodBuilder): Likewise.
21488 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
21490 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
21491 case initial images of dynamic assemblies.
21493 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
21495 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
21497 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
21498 length of event->other array.
21499 (typebuilder_setup_events): Ditto.
21501 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
21502 'assembly_by_name' and add an 'assemblies' list.
21504 * assembly.h assembly.c: Add a new search hook for determining whenever
21505 an assembly is already loaded. Use this instead of searching in the
21506 loaded_assemblies list.
21508 * domain.c appdomain.c: Implement the new search hook so loaded
21509 assemblies are now scoped by appdomain. Fixes #67727.
21511 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
21513 * threads.c (mono_thread_attach): Initialize synch_lock field so
21514 mono_thread_detach works again.
21516 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
21517 'lib' too. Fixes #63130.
21519 2004-10-06 Jackson Harper <jackson@ximian.com>
21521 * culture-info-tables.h: regenerated.
21523 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
21525 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
21526 implemented by other interfaces in the result. Fixes #65764.
21528 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21529 Handle unloadable modules without crashing.
21531 * image.c (load_modules): Revert the previous patch since modules must
21532 have a fixed index inside the array.
21534 * image.c (load_modules): Don't include native modules in the modules
21537 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
21539 * reflection.h: Add param_defaults field.
21541 * reflection.c: Add support for parameter defaults in dynamic methods.
21544 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
21545 an empty string when a type has no namespace. Fixes #64230.
21547 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
21549 * tabledefs.h: Added "internal" security actions to support non-CAS
21550 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
21551 Note: they do not seems to be used anymore in 2.0 (new metadata format)
21553 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
21555 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
21556 constructor of abstract class. Fixes #61689.
21558 2004-10-04 Martin Baulig <martin@ximian.com>
21560 * class-internals.h (MonoGenericContainer): New type.
21561 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
21562 `MonoGenericContainer *generic_container'.
21563 (MonoClass): Replaced `gen_params' and `num_gen_params' with
21564 `MonoGenericContainer *generic_container'.
21566 * metadata.c (mono_metadata_load_generic_params): Return a
21567 `MonoGenericContainer *' instead of a `MonoGenericParam *';
21568 removed the `num' argument.
21570 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
21572 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
21573 for dynamic images.
21575 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
21578 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
21580 * reflection.c: Save pe_kind and machine values into the generated
21583 * appdomain.c: Bump corlib version number.
21585 * object-internals.h: Reorganize layout of LocalBuilder.
21587 * class-internals.h class.c (mono_class_get_implemented_interfaces):
21588 New helper function.
21590 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
21591 created MonoType for dynamic types. Fixes #66180.
21593 2004-10-02 Ben Maurer <bmaurer@ximian.com>
21595 * threadpool.c: the ares hashtable needs a critical section around it.
21596 this prevents some nasty segfaults
21598 2004-10-02 Massimiliano Mantione <massi@ximian.com>
21600 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
21601 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
21604 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
21606 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
21608 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
21610 * image.c: Always canonicalize image file names, to avoid loading
21611 the same assembly twice when referenced using a relative path.
21613 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
21615 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
21617 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
21619 * marshal.c: Fix warnings.
21621 2004-09-29 Geoff Norton <gnorton@customerdna.com>
21623 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
21624 attempting to marshal the delegate_trampoline as the method_addr.
21625 This patch has a static hashtable of marshalled delegates so that
21626 we can map delegate_trampoline addresses back to delegates. This
21627 allows a delegate passed to managed code to be passed back into native
21630 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
21632 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
21634 * reflection.c (method_encode_code): Align method headers properly.
21637 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
21639 * marshal.c: In the runtime invoke wrapper, reset the abort
21640 exception if it is cached. This avoids the automatic rethrowal of
21641 the exception after the catch of the wrapper. Also check for pending
21642 interruptions before calling the managed method. This is done using
21643 the new method emit_thread_force_interrupt_checkpoint, since the
21644 normal checkpoint method is ignored when running the invoke wrapper.
21645 * object.c: If the abort exception is rethrown, set the abort_exc
21646 field of the thread, so it will be rethrown aftere every catch.
21647 * threadpool.c: Only run an interruption checkpoint if what has been
21648 requested is a stop of the thread (aborts will be ignored).
21649 * threads.c: By default, a thread will now never be interrumped while
21650 running the runtime invoke wrapper (this ensures that runtime_invoke
21651 will always return to the caller if an exception pointer is provided).
21652 There is a new special method mono_thread_force_interruption_checkpoint()
21653 to force an interruption checkpoint even if running a protected
21654 wrapper, which is used by the same runtime invoke wrapper to do a check
21657 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
21659 * object.c, object-internals.h: Implemented mono_release_type_locks,
21660 which releases the cctor locks held by a thread.
21661 * threads.c, threads.h: In thread_cleanup, release cctor locks held
21662 by a thread. Added mono_thread_exit() method to be used to safely stop
21665 2004-09-28 Raja R Harinath <rharinath@novell.com>
21667 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21668 Move null check before dereference. Avoid indexing beyond the end
21669 of the 'modules' array.
21671 2004-09-28 Raja R Harinath <rharinath@novell.com>
21673 * metadata-internals.h (MonoImage): Add module_count field.
21674 * image.c (load_modules): Set image->module_count.
21675 (mono_image_load_file_for_image): Use image->module_count.
21676 * reflection.c (mono_image_load_module): Append to image->modules array
21677 of dynamic assembly.
21678 (mono_module_get_object): Fix loop to actually increment index.
21679 Use image->module_count.
21680 * assembly.c (mono_assembly_load_references): Use image->module_count.
21681 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21684 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
21686 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
21687 Avoid assert on generic types.
21689 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
21691 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
21693 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
21695 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
21696 function to convert a MarshalSpec structure to its managed counterpart.
21698 * reflection.c: Fix warnings.
21700 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
21703 * icall.c (mono_create_icall_signature): Fix build.
21705 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
21707 * icall.c: Add MakePointType icall.
21709 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
21712 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21714 * threadpool.c: reuse allocated slots in the queue.
21716 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
21718 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
21720 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
21722 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
21725 * tabledefs.h: Add constants for pinvoke attributes BestFit and
21726 ThrowOnUnmappableChar.
21728 * icall.c (ves_icall_Type_GetPacking): New icall.
21730 2004-09-24 Martin Baulig <martin@ximian.com>
21732 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
21734 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21737 (mono_domain_set): allow setting a domain that is being unloaded.
21738 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
21741 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
21743 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
21744 the GetCustomAttributes icall.
21746 2004-09-23 Martin Baulig <martin@ximian.com>
21748 * object-internals.h (MonoReflectionGenericParam): Replaced
21749 'has_ctor_constraint', `has_reference_type' and `has_value_type'
21750 with `guint32 attrs'.
21752 2004-09-23 Martin Baulig <martin@ximian.com>
21754 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
21756 2004-09-23 Martin Baulig <martin@ximian.com>
21758 * object-internals.h (GenericParameterAttributes): New enum.
21760 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
21762 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
21764 * class.c (init_events): Fill out event->other field.
21766 * class.c: Fix warnings.
21768 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
21770 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
21772 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
21773 walk which doesn't supply the IL offset.
21775 2004-09-22 Martin Baulig <martin@ximian.com>
21777 * reflection.c (mono_reflection_setup_internal_class): If we're
21778 System.ValueType, System.Object or System.Enum, set
21779 `klass->instance_size' and create the vtable.
21780 (mono_reflection_create_internal_class): If we're an enum type,
21781 get the base class from our current corlib.
21783 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
21785 * reflection.h (MonoResolveTokenError): New type.
21787 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
21790 * icall.c: Add an 'error' argument to the ResolveToken icalls.
21792 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
21794 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
21795 Support also calling constructors, but only for already allocated objects.
21797 2004-09-17 Geoff Norton <gnorton@customerdna.com>
21799 * reflection.c (type_get_qualified_name): If the klass is null
21800 return the typename to avoid a NullRefEx.
21801 (encode_cattr_value): Get the qualified name of the boxed type,
21802 not the underlying enumtype. Fixes #62984.
21804 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
21806 * marshal.c: Fix problems with previous checkin.
21808 2004-09-21 <vargaz@freemail.hu>
21810 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
21811 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
21813 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
21815 2004-09-21 Geoff Norton <gnorton@customerdna.com>
21817 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
21818 should only return a type for pointers, arrays, and passbyref types.
21821 2004-09-21 Martin Baulig <martin@ximian.com>
21823 * domain.c (mono_debugger_check_runtime_version): New public
21826 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
21828 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
21830 * reflection.c: Added missing sort to the declarative security
21831 attributes table. MS implementation stops seeing the attributes if the
21832 token number regress in the table (as shown by ildasm and permview).
21834 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
21836 * object-internals.h (MonoReflectionModule): Add 'token' field.
21838 * reflection.c (mono_reflection_get_token): Add support for Module
21840 (mono_module_get_object): Set 'token' field.
21841 (mono_module_file_get_object): Set 'token' field.
21843 * icall.c: Add new Assembly and Module icalls.
21845 * appdomain.c: Bump corlib version.
21847 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
21849 * loader.h loader.c class.h class.c: Add helper functions for obtaining
21850 tokens of metadata objects.
21852 * reflection.h reflection.c (mono_reflection_get_token): New function
21853 to obtain the token of a metadata object.
21855 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
21857 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
21859 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
21861 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
21863 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
21865 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
21866 * object-internals.h: Added 3 MonoArray* members to MonoReflection
21867 AssemblyBuilder to access the permissions set in the class lib.
21868 * reflection.c: Added security attributes encoding step in
21869 mono_image_build_metadata.
21870 * tabledefs.h: Added new security actions defined in 2.0:
21871 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
21873 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
21875 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
21878 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
21880 * locales.c: nullify the ICU_collator member of CompareInfo when it is
21881 finalized. There where random SIGSEVs at program termination, when
21882 an object being finalized was trying to do a string comparison and
21883 the current culture was already finalized.
21885 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21887 * threads.c: call thread_cleanup before finishing the thread if we get
21890 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
21892 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
21893 assemblies from the parent. Fixes #65665.
21895 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
21897 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
21900 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
21902 * reflection.h: add prototype for mono_get_dbnull_object
21903 * reflection.c: add prototypes for get_default_param_value_blobs
21904 and mono_get_object_from_blob for fussier compilers
21906 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
21908 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
21909 false deadlock checks in class initialization.
21911 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
21913 * image.c (mono_image_addref): Fix comment.
21915 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
21918 2004-09-12 Jambunathan K <kjambunathan@novell.com>
21920 * reflection.c (mono_param_get_objects): Modified to return
21921 ParameterInfo.DefaultValue object.
21923 (get_default_param_value_blobs):
21924 (mono_get_object_from_blob):
21925 (mono_get_dbnull_object): New helper routines.
21927 * object.c (mono_get_constant_value_from_blob): New helper routine
21928 carved out from get_default_field_value ()
21930 * object-internals.h (mono_get_constant_value_from_blob): Added
21931 function declaration.
21933 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
21935 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
21936 referenced assemblies. Fixes #62135.
21938 * exception.h exception.c (mono_get_exception_file_not_found2): New
21941 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
21943 * class.h class.c: Add mono_type_get_underlying_type ().
21945 2004-09-09 Geoff Norton <gnorton@customerndna.com>
21947 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
21948 Fix GetTypes() to support dynamically created assemblies.
21950 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
21952 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
21954 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
21957 * reflection.h reflection.c loader.c: Allow dynamic construction of
21958 pinvoke methods. Fixes #65571.
21960 * reflection.c (mono_reflection_get_type): Revert previous change since
21961 it causes regressions.
21963 2004-09-08 Martin Baulig <martin@ximian.com>
21965 * class.c (class_compute_field_layout): Don't call
21966 mono_class_layout_fields() for open generic instances.
21968 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
21969 * threads.c appdomain.c: fix typo in GC macro
21971 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21973 * threads.c: don't call mono_thread_detach() in start_wrapper(),
21974 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
21976 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
21978 * image.c (mono_image_close): Applied patch from
21979 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
21980 assembly is loaded multiple times from data.
21982 * image.c (mono_image_open): Fix warning.
21984 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
21986 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
21987 once. Fixes #58334.
21989 * reflection.c (mono_reflection_create_runtime_class): Initialize
21990 klass->nested_classes. Fixes #61224.
21992 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
21994 * threads.c: sched_yield() on exit, to allow threads to quit.
21996 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
21998 * object.c (mono_unhandled_exception): Remove leftover debug code.
22000 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
22002 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
22004 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22006 * marshal.c (emit_marshal_array): Really null terminate string arrays.
22008 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
22010 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22012 * marshal.c (emit_marshal_array): Null terminate string arrays.
22014 * marshal.c (raise_auto_layout_exception): Fix warning.
22016 * reflection.c (mono_param_get_objects): Initialize the default value
22017 with DBNull.Value, not null. Fixes #62123.
22019 2004-09-01 Miguel de Icaza <miguel@ximian.com>
22021 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
22022 throw an exception with a cute explanation.
22024 2004-09-06 Dick Porter <dick@ximian.com>
22026 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
22027 Close the new process's thread handle, as we don't use it. The
22028 handle stays around forever otherwise.
22030 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22032 * object.c (arith_overflow): Fix warning.
22034 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
22035 calling conventions in method refs. Fixes #65352.
22037 * reflection.c: Fix warnings.
22039 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22041 * icall.c: Add a new icall for Array.Clear
22043 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22045 * object.c: When allocating an array, we have to throw
22046 an overflow exception if any of the lengths are < 0.
22048 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22050 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
22051 properly. Also move implementation of string array marshalling to
22052 managed code. Fixes #42316.
22054 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22056 * assembly.c: provide more information when loading an assembly fails.
22058 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22060 * filewatcher.c: don't expect the development fam package to be
22063 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
22065 * marshal.c: Make a copy of the signature cookie since it will be
22066 freed by the caller.
22068 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
22070 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
22072 * metadata.c (mono_metadata_free_marshal_spec): New function to free
22075 * marshal.c: More refactoring.
22077 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
22080 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
22082 * object.c: In mono_message_invoke, fill the output parameter array after
22083 calling the managed method (it was done before the call). This fixes
22086 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
22088 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
22091 2004-09-02 Martin Baulig <martin@ximian.com>
22093 * class.c (mono_class_instance_size): Don't allow generic type
22094 definitions or open generic instances.
22095 (mono_class_array_element_size): If we're a value type, call
22096 mono_class_instance_size() on the original class.
22098 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
22099 handle generic instances.
22101 * mono-debug-debugger.c (write_type): Handle generic instances
22104 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
22106 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
22107 the allocation request fails. Fixes #65089.
22109 * object.c (mono_runtime_free_method): Do not call mono_free_method.
22111 * object.c (mono_runtime_free_method): New function to free a dynamic
22114 * marshal.c (mono_delegate_free_ftnptr): New function to free the
22115 delegate trampoline.
22117 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
22118 with hasthis as dynamic,
22120 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
22122 * domain.c (mono_jit_info_table_remove): New function to remove an
22123 entry from the jit info table.
22125 * class-internals.h (MonoMethod): Add 'dynamic' field.
22127 * loader.c: Fix warnings.
22129 2004-09-01 Martin Baulig <martin@ximian.com>
22131 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
22132 instead of mono_debugger_lock() because the latter one is a no-op
22133 unless running in the debugger.
22135 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
22137 * class.c (class_compute_field_layout): Classes with auto-layout or
22138 reference fields are not blittable.
22140 2004-09-01 Dick Porter <dick@ximian.com>
22142 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
22143 mono_image_get_filename() to get the assembly location.
22146 * metadata.h: Fix compile warnings
22148 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
22150 * class.c (class_compute_field_layout): System.Object is blittable.
22152 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
22153 as in/out. Fixes #59909.
22155 2004-09-01 Martin Baulig <martin@ximian.com>
22157 * metadata.h (MONO_TYPE_ISREFERENCE): Call
22158 mono_metadata_generic_inst_is_valuetype() if we're a generic
22159 instance to check whether our underlying type is a reference type.
22161 2004-09-01 Martin Baulig <martin@ximian.com>
22163 * metadata.c (mono_type_size): If we're a generic instance, call
22164 mono_class_value_size() for value types.
22166 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
22168 * marshal.c: Implement more custom marshalling functionality. Fixes
22171 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22173 * mono-debug.c, debug-mono-symfile.c: add some locking love.
22175 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
22177 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
22179 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
22181 * icall.c: Fix some warnings.
22183 * threads.c (abort_appdomain_thread): Fix unref errors.
22184 (mono_thread_current): Fix THREAD_DEBUG define.
22186 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
22188 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
22190 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
22192 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
22194 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
22197 2004-08-28 Martin Baulig <martin@ximian.com>
22200 (mono_metadata_generic_inst_is_valuetype): New public function.
22202 * metadata.h (MONO_TYPE_ISSTRUCT): Call
22203 mono_metadata_generic_inst_is_valuetype() if we're a generic
22204 instance to check whether our underlying type is a valuetype.
22206 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
22208 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
22211 2004-08-25 Martin Baulig <martin@ximian.com>
22213 * loader.c (mono_get_method_from_token): Abstract methods can also
22214 be generic and thus have type parameters.
22216 * metadata-internals.h
22217 (MonoDynamicImage): Added `GPtrArray *gen_params'.
22219 * reflection.c (mono_image_get_generic_param_info): Don't create a
22220 metadata row, just add an entry to the `gen_params' array.
22221 (build_compressed_metadata): Sort the `gen_params' array and then
22222 actually create the metadata.
22224 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22226 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
22228 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
22230 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
22232 2004-08-24 Martin Baulig <martin@ximian.com>
22234 * class.cs (mono_class_is_subclass_of): Like an interface, a
22235 generic instance also derives from System.Object.
22237 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
22239 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
22240 custom modifiers to be in any order. Fixes #61990.
22242 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
22244 * object.c: Register mono_object_new_fast icall.
22246 * object.c (mono_class_get_allocation_ftn): Return to calling
22247 mono_object_new_fast, since it seems faster to compute the object
22248 size in unmanaged code than passing it as a parameter.
22250 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
22252 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
22253 this function with Boehm as the oom handler, so we don't have to check
22254 the result of GC_malloc.
22256 * object.c: Remove checks for oom.
22258 * object.h object.c (mono_class_get_allocation_ftn): New function to
22259 return the icall which can be used to allocate an instance of a given
22262 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
22264 * class-internals.h: Add 'enabled' field.
22266 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
22268 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
22270 2004-08-18 Jambunathan K <kjambunathan@novell.com>
22271 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
22274 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
22276 * appdomain.c: use the Tls function for appdomain too,
22277 at Zoltan's request. Actually return in mono_context_get
22279 * appdomain.c, profiler.c, threads.c: use __thread
22281 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
22283 * appdomain.c threads.c: Call GC_CreateThread on windows.
22285 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
22286 multiple libraries since this don't work on windows.
22288 2004-08-18 Martin Baulig <martin@ximian.com>
22290 * class-internals.h
22291 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
22294 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
22295 MonoMethodNormal since we also need it for abstract and interface
22299 (build_compressed_metadata): Sort the GenericParam table.
22300 (mono_image_create_token): Added `gboolean create_methodspec'
22301 argument; this is false when generating a MethodImpl token.
22302 (reflection_methodbuilder_to_mono_method): Abstract and interface
22303 methods may also have generic parameters.
22305 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
22307 * appdomain.c: thread local alloc
22309 2004-08-17 Martin Baulig <martin@ximian.com>
22311 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
22314 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
22317 * class.c (mono_type_get_full_name): New public function.
22318 (mono_type_get_name): Don't include the type arguments.
22320 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
22322 * Makefile.am: Build static versions of libmetadata and libmonoruntime
22323 for inclusion into the mono executable.
22325 2004-08-16 Martin Baulig <martin@ximian.com>
22327 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
22328 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
22330 2004-08-14 Martin Baulig <martin@ximian.com>
22332 * class.c (dup_type): Also copy the `byref' field.
22334 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
22336 * reflection.c (create_dynamic_mono_image): Revert the last change
22337 since it breaks bootstrap.
22339 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
22341 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
22343 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
22344 not free them with g_free.
22346 2004-08-11 Martin Baulig <martin@ximian.com>
22348 * reflection.c (mono_reflection_setup_internal_class): Also call
22349 mono_class_setup_mono_type() if we already have a `tb->type.type'.
22351 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
22353 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
22354 called during default (first) AppDomain creation. Keep track of
22355 Evidence when loading assemblies.
22357 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22359 * opcodes.c, opcodes.h: reduce runtime relocations.
22361 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
22363 * culture-info.h, locales.c: fixes and chages to sue the new
22364 optimized format of the locale data.
22365 * culture-info-tables.h: regenerated.
22367 2004-08-06 Geoff Norton <gnorton@customerdna.com>
22369 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
22371 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
22373 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
22374 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
22375 * domain-internals.h: icall declaration.
22376 * icall.c: icall registration.
22377 * object-internals.h: New fields in MonoAssembly for CAS.
22379 2004-08-05 Duncan Mak <duncan@ximian.com>
22381 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
22384 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
22386 * reflection.c: fix to deal with object[] arrays in custom ctors
22389 2004-08-05 Martin Baulig <martin@ximian.com>
22391 * class.c (mono_class_array_element_size): Added support for
22392 generic instances and correctly handle "recursive" types.
22394 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
22396 * assembly.c: Fix warnings.
22398 2004-08-04 Martin Baulig <martin@ximian.com>
22401 (mono_type_get_name_recurse): Added `gboolean include_arity'
22402 argument specifying whether or not we should include the generic
22403 arity in the type name.
22404 (_mono_type_get_name): New static function.
22405 (mono_class_setup_vtable): If we're a generic instance, don't
22406 include the generic arity in the names of explicit method
22409 2004-08-03 Martin Baulig <martin@ximian.com>
22411 * class.c (mono_type_get_name_recurse): Enclose the generic type
22412 arguments in `<', '>'.
22414 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
22416 * gc.c: make GC warning messages use the trace API, they are just
22417 noise to most of the users.
22419 2004-08-03 Martin Baulig <martin@ximian.com>
22421 * debug-mono-symfile.c (read_string): Correctly read the string.
22423 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
22425 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
22427 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
22429 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
22431 2004-07-30 Martin Baulig <martin@ximian.com>
22433 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
22434 Reflect latest symbol writer changes.
22436 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
22438 * object.c: always create an object if null is passed
22439 to Invoke() where a valuetype is expected.
22441 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
22443 * marshal.c (mono_marshal_init): make managed
22444 signatures match native ones better for 64bits.
22446 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22448 * appdomain.c: hack to build correctly the private bin path on windows.
22451 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
22453 * assembly.c: Load mscorlib from the correct framework directory
22454 (mono/<version>/mscorlib.dll).
22455 * appdomain.h: Added prototypes for new functions.
22456 * internals.h: Added some prototypes.
22457 * domain.c: When initializing the runtime, get from the executable and
22458 the configuration files the runtime version that the app supports.
22459 Added support methods for reading app.exe.config. Added list of versions
22460 supported by the JIT. Added two new methods: mono_init_from_assembly,
22461 which initializes the runtime and determines the required version from
22462 the provided exe file, and mono_init_version, which initializes
22463 the runtime using the provided version.
22464 * icall.c: Get machine.config from version-specific directory.
22465 * reflection.c: When generating an image, embed the version number
22466 of the current runtime.
22468 2004-07-28 Dick Porter <dick@ximian.com>
22471 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
22472 returned sockaddr size before creating the remote address object.
22473 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
22476 2004-07-28 Dick Porter <dick@ximian.com>
22478 * locales.c (string_invariant_compare_char): Fix invariant char
22479 compares between upper and lower cases. Fixes bug 61458.
22481 2004-07-27 Ben Maurer <bmaurer@ximain.com>
22483 * marshal.c: actually cache stelem.ref wrappers.
22485 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
22487 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
22488 sections and remove the mono_cli_rva_map () function.
22490 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
22492 * debug-mono-symfile.c: fix one more endianess issue, from a patch
22493 by Geoff Norton (<gnorton@customerdna.com>).
22495 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
22497 * class.c: fix class loads for pointer types (typeof(int) !=
22500 2004-07-27 Martin Baulig <martin@ximian.com>
22502 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
22503 reading the debugging information from an external ".mdb" file.
22505 2004-07-24 Martin Baulig <martin@ximian.com>
22507 * reflection.c (mono_image_get_type_info): Only write a class
22508 layout entry if we actually have a size or a packing size.
22510 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
22512 * reflection.c (type_get_fully_qualified_name):
22513 insert cast to get type checking of ?: with non-gcc compilers
22515 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
22517 * rand.c: use g_getenv for both lookups of
22520 2004-07-17 Martin Baulig <martin@ximian.com>
22522 * reflection.c (mono_reflection_bind_generic_method_parameters):
22523 Set `gmethod->reflection_info'.
22525 2004-07-17 Martin Baulig <martin@ximian.com>
22527 * class.c (mono_class_create_from_typedef): Insert the newly
22528 created class into the hash table before computing the interfaces
22529 since we could be called recursively.
22531 2004-07-16 Ben Maurer <bmaurer@ximain.com>
22533 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
22534 function to implement stelem.ref in managed code
22535 * class-internals.h, debug-helpers.c: a new wrapper type
22538 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
22540 * gc.c: allow GC handles to work even when no GC is compiled in.
22541 Fix part of bug #61134 (GetAddrOfPinnedObject).
22543 2004-07-13 Peter Williams <peter@newton.cx>
22545 * process.c (complete_path): Make sure we don't attempt to execute
22548 2004-07-12 Geoff Norton <gnorton@customerdna.com>
22550 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
22551 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
22552 and will add/subtract the hour if needed
22554 2004-07-12 Martin Baulig <martin@ximian.com>
22556 * reflection.c (mono_field_get_object): If we have
22557 `field->generic_info', take the attributes from
22558 `field->generic_info->generic_type'.
22560 2004-07-12 Martin Baulig <martin@ximian.com>
22562 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
22563 This function must be called before initializing the runtime.
22564 (mono_debug_init_1): New function; call this after initializing
22565 the runtime, but before loading the assembly. It tells the
22566 debugger to load corlib and the builtin types.
22568 * mono-debug-debugger.c: Did some larger changes in the debugging
22569 code; support recursive class declarations, make sure we actually
22572 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22574 * debug-helpers.c: undo my previous patch and fixed the real issue in
22575 ../mini/exceptions-x86.c
22577 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22579 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
22580 when no HOME env. variable was set and a NullRef was thrown in a .cctor
22581 called from other .cctors.
22583 2004-07-09 Miguel de Icaza <miguel@ximian.com>
22585 * loader.c: Removed the mono_loader_wine_init hack now that we are
22586 doing a managed version of Windows.Forms.
22588 2004-07-09 Ben Maurer <bmaurer@ximian.com>
22590 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
22591 threadpool.c, threads.c: remove static data from rootset.
22593 2004-07-09 Dick Porter <dick@ximian.com>
22595 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
22596 Don't do any more processing if the matched length was 0. It was
22597 increasing the size of the string before. Fixes bug 61167.
22599 2004-07-09 Dick Porter <dick@ximian.com>
22603 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
22604 Add support for SO_PEERCRED if its available.
22606 2004-07-09 Peter Bartok <pbartok@novell.com>
22607 * loader.c: winelib.exe.so error message is now only displayed if
22608 MONO_DEBUG is set. To help us avoid questions when people are trying
22609 out the new Managed.Windows.Forms.
22611 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
22613 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
22614 for isinst and castclass wrappers.
22616 * class-internals.h icall.c: Move registration and lookup of JIT icalls
22617 to libmetadata from the JIT, so they could be used by the marshalling
22618 code and the interpreter.
22620 * marshal.c: Register marshalling related JIT icalls here instead of
22621 in mini.c. Use CEE_MONO_ICALL instead of the family of
22622 CEE_MONO_PROC<x> opcodes to call marshalling functions.
22624 * metadata.h: Remove unneeded marshalling conversions.
22626 * opcodes.c: Update for new opcodes.
22628 2004-07-08 Martin Baulig <martin@ximian.com>
22630 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
22631 (mono_debug_get_domain_data): Make this function static.
22633 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
22635 * gc.c, object.h: add nice GC handle API for embedders.
22637 2004-07-06 Ben Maurer <bmaurer@ximian.com>
22639 * reflection.c: more changes for the new api
22641 * object.c: When we reflect on a field w/ a constant value, it
22642 will not have a memory location, so we must access metadata. Also,
22643 allow easier reading of strings so that we can read them from
22646 * class.c (mono_class_layout_fields): no need for literal fields here.
22648 * class-internals.h: api changes for const fields
22650 * icall.c (ves_icall_get_enum_info): use new apis for const fields
22652 2004-07-06 Martin Baulig <martin@ximian.com>
22654 * mono-debug.h: Increment version number to 44.
22656 * mono-debug.c (mono_debug_add_wrapper): The second argument is
22657 now a gpointer, rewrote this whole method.
22659 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
22660 function. Add information about the wrapper in a new "misc table".
22662 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
22663 for the new misc table.
22665 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
22667 * metadata-internals.h image.c: Add a cache for helper signatures.
22669 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
22671 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
22673 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
22674 delegates from a delegate. Fixes #61033.
22676 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
22677 marshalling of stringbuilder arrays. Fixes #59900.
22679 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
22681 * icall.c: Add EnumBuilder:setup_enum_type icall.
22683 2004-06-30 Ben Maurer <bmaurer@ximian.com>
22685 * icall.c: Added a new icall for the property version of
22686 OffsetOfStringData.
22688 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
22690 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
22691 it has a constant size across platforms.
22693 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
22696 2004-06-29 Martin Baulig <martin@ximian.com>
22698 * mono-debug.c (mono_debug_add_method): Protect the whole function
22699 in mono_debugger_lock(), not just parts of it.
22701 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22703 * reflection.c: make sure padding bytes in heaps are zeroed.
22705 2004-06-24 David Waite <mass@akuma.org>
22707 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
22708 image.c, loader.c, locales.c, marshal.c, metadata.c,
22709 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
22710 string-icalls.c, threads.c: change to C90-style comments from C99 /
22713 2004-06-24 Dick Porter <dick@ximian.com>
22716 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
22717 return createdNew. Fixes bug 60412.
22720 * icall.c: Add createdNew parameter to CreateMutex icall
22722 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22724 * reflection.c, object-internals.h: save default value in params.
22726 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22728 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
22729 no need to build a new path combining that with the application base.
22732 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
22734 * reflection.c: fixed minor standard compliance issues.
22736 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
22738 * reflection.c: fixed issue with encoding some custom attributes
22739 (arrays in properties and fields, bug #60411).
22741 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22743 * reflection.c: fix start address when copying the public key token.
22745 2004-06-23 Martin Baulig <martin@ximian.com>
22747 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
22748 the `exc' object in a static object to put it into the GC's root set.
22750 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
22752 * reflection.c: make mono_reflection_setup_internal_class ()
22753 callable a second time to setup a new parent class.
22755 2004-06-23 Dick Porter <dick@ximian.com>
22757 * threads.c: Check for WAIT_IO_COMPLETION return values.
22759 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
22761 * appdomain.c: Removed the g_free on the public key token. Now copy
22762 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
22763 * assembly.c: Added public key token string value when loading
22764 assemblies. Fix bug #60439.
22765 * icall.c: Added missing informations (like public key) in
22766 GetReferencedAssemblies. Fix #60519.
22767 * image.h: Changed definition for public key token from const char*
22768 public_tok_value to guchar public_key_token [17];
22769 * reflection.c: Updated for changes to public key token.
22771 2004-06-22 Lluis Sanchez Gual
22773 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
22774 for the field in base classes.
22776 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
22778 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
22779 mark headers as not supported, they are installed only for use by the
22782 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
22784 * *.c, *.h: avoid namespace pollution in public headers.
22786 2004-06-21 Martin Baulig <martin@ximian.com>
22788 * exception.c (mono_get_exception_security): It's in
22789 "System.Security", not in "System".
22791 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
22792 the exception classes.
22794 2004-06-21 Martin Baulig <martin@ximian.com>
22796 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
22797 Protect the exception object from being finalized.
22799 2004-06-21 Martin Baulig <martin@ximian.com>
22801 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
22804 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
22806 * reflection.c: Load the assembly in mono_reflection_type_from_name,
22807 if it was not loaded before. Fix parts of #60439.
22809 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
22811 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
22812 code that was broken since Ben's change: wrappers are now
22813 dependent on the method signature only again.
22815 2004-06-21 Martin Baulig <martin@ximian.com>
22817 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
22818 added interface support.
22820 2004-06-21 Martin Baulig <martin@ximian.com>
22822 * class.c (mono_vtable_get_static_field_data): New public method.
22824 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
22826 * filewatcher.c : Windows build fix to be compliant with API changes.
22828 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22830 * class.h, class.c: more accessors.
22831 * metadata.h, metadata.c: prepare for hiding MonoType and
22832 MonoMethodSignature: people should use the accessors from now on
22833 outside of the tree.
22835 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22837 * *.c, *.h: more API cleanups.
22839 2004-06-18 Jackson Harper <jackson@ximian.com>
22841 * assembly.c: Trace loading assemblies.
22842 * loader.c: Trace loading native libraries.
22843 * mono-config.c: Trace loading config files.
22845 2004-06-18 Dick Porter <dick@ximian.com>
22847 * locales.c: Tell ICU the lengths of strings, it can cope with
22848 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
22850 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
22852 * image.c: swapped name/filename;
22854 2004-06-18 Martin Baulig <martin@ximian.com>
22856 * mono-debug-debugger.c (write_class): Write the parent class at
22857 the end of the header.
22859 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
22861 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
22863 2004-06-17 Raja R Harinath <rharinath@novell.com>
22865 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
22866 (bundle_obj): New conditional define.
22867 (BUILT_SOURCES): Remove.
22868 ($(bundle_srcs)): Make parallel-make safe.
22869 (libmonoruntime_la_LIBADD): Make unconditional.
22870 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
22871 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
22873 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
22875 * culture-info-tables.h: It was inconsistent with the latest
22878 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
22880 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
22883 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
22886 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22888 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
22889 cleaned up public header threads.h.
22891 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22893 * Makefile.am, *.c, *.h: more API cleanups.
22895 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22897 * Makefile.am: removed monosn from compilation.
22898 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
22899 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
22900 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
22901 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
22902 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
22903 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
22905 2004-06-15 Jackson Harper <jackson@ximian.com>
22907 * assembly.c: Make locales lower case when searching the GAC for
22908 assemblies. gacutil will always make locales lowercase when
22909 installing so this effectively makes them case insensitive.
22911 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
22913 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
22914 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
22915 parameter which allows to choose whether the wait can be interrupted or
22916 not. Also added the method mono_monitor_enter(), which locks the monitor
22917 using an infinite wait and without allowing interruption.
22918 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
22920 * object.h: Added new fields in MonoThread. suspend_event holds the event
22921 used to susped/resume the thread. synch_lock is the lock object to use for
22922 modifying the thread state.
22923 * threads.c: Use the new synch_lock object for locking, instead of "this",
22924 which can generate deadlocks.
22925 Moved thread state change in Thread.Sleep and Thread.Join from managed
22926 to unmanaged code. This avoids a deadlock when the thread was suspended
22927 just after acquiring the thread lock.
22928 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
22929 Implemented Thread.Suspend using an event instead of ThreadSuspend,
22930 which is not fully implemented in the io-layer.
22931 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
22933 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
22935 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
22936 threads-types.h: more API cleanups.
22938 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
22940 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
22941 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
22942 threadpool.c, threads.c: first pass at the exported API cleanup.
22944 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
22946 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
22948 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22950 * icall.c: added internalGetHome.
22952 2004-06-14 Dick Porter <dick@ximian.com>
22954 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
22955 possible to return successfully when '.' or '..' were the only
22956 entries in a directory, but were skipped. The MonoIOStat was not
22957 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
22960 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22962 * reflection.c: make binaries run on .Net 1.1 by default.
22964 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
22966 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
22968 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
22970 * marshal.c: keep track of struct size with explicit layout
22973 2004-06-12 Martin Baulig <martin@ximian.com>
22975 * mono-debug-debugger.c: Comment out a debugging g_message().
22977 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
22979 * reflection.c, reflection.h: do not free custom attrs that are cached.
22980 * icall.c: use braces to make code clearer.
22982 2004-06-11 Martin Baulig <martin@ximian.com>
22984 * class.h (MonoInflatedField): New type.
22985 (MonoClassField): Replaced `MonoType *generic_type' with
22986 `MonoInflatedField *generic_info'.
22989 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
22991 2004-06-11 Martin Baulig <martin@ximian.com>
22993 * reflection.c (mono_image_create_method_token): Correctly encode
22996 2004-06-11 Martin Baulig <martin@ximian.com>
22998 * metadata.c (mono_metadata_parse_method_signature): When parsing
22999 a MethodDef which has VarArgs, also set sentinelpos if we don't
23000 have any parameters.
23002 2004-06-11 Martin Baulig <martin@ximian.com>
23004 * verify.c (mono_method_verify): In CEE_CALL, use
23005 mono_method_get_signature() to get the method's signature, unless
23006 we're a PInvoke method.
23008 2004-06-10 Jackson Harper <jackson@ximian.com>
23010 * assembly.c: Use <path>/lib/mono/gac for the extra paths
23011 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
23012 logical name as the supplied path is just a prefix to the gac not
23013 the direct path to it.
23015 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
23017 * reflection.c: make the token for a created method match
23018 the token of the MethodBuilder it was created from
23019 (IKVM requires this behaviour now).
23021 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
23023 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
23024 reflection.c, socket-io.c: leak fixes.
23026 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23028 * icall.c: handle sentinel pos in vararg methods in position different
23031 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23033 * culture-info-tables.h: freshly generated.
23035 2004-06-09 Martin Baulig <martin@ximian.com>
23037 * loader.c (mono_get_method_constrained): Call `mono_class_init
23038 (constrained_class)'.
23040 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
23042 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
23043 any methods. Fixes #59629.
23045 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23047 * culture-info-tables.h: reflecting locale-builder updates.
23049 2004-06-08 Dick Porter <dick@ximian.com>
23052 * locales.c: Fixed compile warnings, including a real bug in
23053 CompareInfo_internal_compare.
23055 2004-06-08 Dick Porter <dick@ximian.com>
23058 (ves_icall_System_Globalization_CompareInfo_internal_index):
23059 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23060 Double-check the resuls of usearches, because ICU currently
23061 ignores most of the collator settings here. Fixes bug 59720.
23063 2004-06-08 Dick Porter <dick@ximian.com>
23066 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23067 Fix memory leak and segfault-causing typo. No idea how this one
23068 lasted so long without being noticed.
23070 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
23072 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
23073 any methods. Fixes #59629.
23075 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23078 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
23079 own the critical section before). Removed dead code (that's done
23080 in the preload hook).
23082 (mono_assembly_load_with_partial_name): call the preload hook.
23084 2004-06-08 Martin Baulig <martin@ximian.com>
23086 * metadata.c (mono_metadata_signature_alloc): Default
23087 `sentinelpos' to -1.
23089 * reflection.c (mono_image_get_array_token): Likewise.
23091 2004-06-08 Martin Baulig <martin@ximian.com>
23093 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
23095 * metadata.c (mono_metadata_parse_method_signature): When parsing
23096 a MethodDef which has VarArgs, set sentinelpos.
23098 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
23099 `gint16' since we're using -1 for non-varargs methods.
23102 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
23103 (method_encode_signature): Added varargs support.
23104 (method_builder_encode_signature): Likewise.
23105 (mono_image_get_varargs_method_token): New static method.
23106 (mono_image_create_method_token): New public method; this is
23107 called via an icall instead of mono_image_create_token() when
23108 calling a varargs method.
23110 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
23112 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
23114 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23116 * culture-info-tables.h : Reflecting the latest locale-builder that
23117 fixed empty array representation ({} to {0}).
23119 2004-06-07 Jackson Harper <jackson@ximian.com>
23121 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
23122 looking up extra gac paths. This allows MONO_GAC_PATH to act
23123 exactly like a prefix.
23125 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
23127 * reflection.c (mono_reflection_type_from_name): Make a copy of the
23128 type name before modifying it. Fixes #59405.
23130 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23132 * culture-info.h: added fields for "all datetime patterns".
23133 * locales.c: ( ves_icall_System_Globalization_CultureInfo
23134 _construct_datetime_format ()): fill xxx_patterns fields.
23135 * object.h: added fields for "all datetime patterns" to
23136 MonoDateTimeFormatInfo.
23137 * culture-info-tables.h: reflecting locale-builder updates.
23139 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
23141 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
23142 the event has no add and remove methods. Fixes #59629.
23144 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
23146 * object.c: Fixed possible integer overflow when allocating large
23149 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
23151 * culture-info-tables.h: reflecting locale-builder updates.
23153 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
23155 * culture-info-tables.h: reflecting locale-builder updates.
23157 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
23159 * culture-info-tables.h: reflecting locale-builder updates.
23161 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
23163 * threads.c: Made Thread.Sleep abortable.
23165 2004-06-02 Martin Baulig <martin@ximian.com>
23167 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
23169 * debug-mono-symfile.h: Bumped symbol file version number to 37.
23171 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
23173 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
23175 2004-05-30 Jackson Harper <jackson@ximian.com>
23177 * reflection.c: Do not hardcode assembly versions or public key
23178 tokens anymore. All of this except the corlib section was dead
23181 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
23183 * object.c (mono_runtime_invoke_array): Automatically create boxed
23184 objects for byref valuetypes if needed. Fixes #59300.
23186 * object.c (mono_method_return_message_restore): Handle
23187 MONO_TYPE_OBJECT as well.
23189 2004-05-28 Jackson Harper <jackson@ximian.com>
23191 * reflection.c: The modified type encoding was causing build
23192 problems. Reverted for now.
23194 2004-05-28 Jackson Harper <jackson@ximian.com>
23196 * reflection.c/h: Take an assembly ref so that we dont create
23197 fully qualified names when encoding types in the same assembly as
23198 the custom attribute being emitted.
23199 * appdomain.c: Increment version number.
23201 2004-05-26 Duncan Mak <duncan@ximian.com>
23204 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
23205 Set the full version number (major, minor, build, revision).
23207 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
23209 * marshal.c (emit_struct_conv): increment src/dst after blit
23210 (mono_marshal_get_managed_wrapper,
23211 mono_marshal_get_native_wrapper): make sure we have marshalling
23212 info before marshalling params (info computation affects
23215 * class.c (class_compute_field_layout): correctly deal with
23217 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
23218 value types (as per what windows dows by default)
23219 (mono_class_setup_mono_type): System.ValueType is blittable
23220 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
23223 * marshal.c (mono_marshal_load_type_info): flag types as
23224 non-blittable if the native layout doesn't match the managed
23227 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23229 * appdomain.c: don't add stuff in the private search path that is
23230 above the application base. If application base is not set, there's
23231 no private search path.
23233 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
23235 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
23236 byref struct arguments in native->managed marshalling.
23238 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
23240 * marshal.c (mono_marshal_get_runtime_invoke): correctly
23241 cache methods using signature (special case for methods
23242 that are value type or string class)
23244 * image.c (mono_image_close): clean up allocated GSList's
23245 in runtime_invoke_cache.
23247 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23249 * mono-config.c: set the correct path for mono_cfg_dir on windows when
23250 there's no MONO_CFG_DIR environment variable defined.
23252 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23254 * threads.c: windows version must be >= 0x0500 to include OpenThread.
23256 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
23258 * threadpool.c: Really wait for 500ms after the async call, even if the wait
23260 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
23261 before waiting for it, and call CloseHandle after the wait to unref it.
23262 This will make sure that handles are not disposed too early.
23264 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23269 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
23272 * object.c: se the application_base only for the domain that runs
23273 Main. Fixes bug #59216,
23275 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23278 * object.c: only the domain in which Main is run have
23279 SetupInformation.ConfigurationFile set, so moved a few lines from
23280 appdomain.c to object.c.
23282 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23284 * appdomain.c: we tried to load [name].(dll|exe), but according
23285 to bug #57710, we must also try [culture]/[name].(dll|exe) and
23286 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
23287 There's a test case attached to bug #58922.
23289 2004-05-27 Dick Porter <dick@ximian.com>
23292 * file-io.c: Implemented icalls for locking and unlocking regions
23294 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
23295 FALSE on error (fixes both compiler warning and real bug.)
23297 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
23299 * culture-info-tables.h: reflecting locale-builder updates.
23301 (Added missing ChangeLog entry for 05/26)
23303 2004-05-27 Jackson Harper <jackson@ximian.com>
23305 * locales.c: Fix some cut and paste errors.
23307 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23309 * mono-config.c: set the correct path for config. directory on windows.
23311 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
23313 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
23316 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
23318 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
23319 from pinvoke functions.
23321 * marshal.c (mono_ftnptr_to_delegate): Implement this.
23323 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
23325 * culture-info-tables.h: reflecting locale-builder updates.
23327 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
23329 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
23332 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
23334 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
23335 * icall.c: Modified icalls for RNG.
23336 * rand.c|h: Changed RNG interface to allow thread-safe usage under
23337 Windows (CryptoAPI).
23339 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
23341 * locales.c: Fix build.
23343 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
23345 * culture-info-tables.h: reflecting locale-builder updates.
23347 2004-05-25 Jackson Harper <jackson@ximian.com>
23349 * locales.c: When creating the current culture use the $LANGs
23350 specific culture. So DateTimeFormat and NumberFormat entries are created.
23352 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
23354 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
23355 a char array as parameter.
23357 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
23359 * image.c: In mono_image_open(), always use an absolute path name to
23360 look for already loaded images.
23362 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
23364 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
23365 missing in the windows build (like older cygwin include files).
23367 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
23369 * icall.c: Fixed check for possible integer overflow in Buffer_
23370 BlockCopy icall. Replaced comments style // by /* */.
23372 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
23374 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
23376 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
23377 check after MONO_VTADDR. Fixes pinvoke2.exe.
23379 * marshal.h marshal.c metadata.h: Add beginnings of support for
23380 ftnptr -> delegate marshalling.
23382 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
23384 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
23385 * threads.c: Fix warnings.
23387 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
23389 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
23390 * icall.c: Registered icalls for Suspend and Resume.
23391 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
23393 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
23394 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
23395 * process.c: Use WaitForSingleObjectEx.
23396 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
23398 * threads.c, threads.h: Make use of new Ex wait methods. Improved
23399 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
23400 for Suspend and Resume. Added new mono_thread_stop, used for stoping
23401 background threads. Added basic support for Abort in Windows.
23402 Start new threads using a managed delegate invoke wrapper. This wrapper
23403 has an interruption checkpoint that is needed since an interruption
23404 can be requested before the thread leaves the unmanaged code that starts
23406 * marshal.c: Added interruption checkpoint after every native call, and
23407 also before managed calls for wrappers called from unmanaged code to
23408 go into managed code.
23409 * object.h: Added new field in MonoThread to keep track of interruption
23412 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
23414 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
23417 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23424 * rand.c: getenv -> g_getenv (windows!)
23426 * process.c: complete_path is also used on non-windows platforms.
23428 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23430 * icall.c: new signature for Process_Start.
23432 * process.[ch]: new signature for Process_Start. If we're on windows
23433 and UseShellExecute is false, we have to search for the program by
23434 ourselves if we don't get a full path.
23436 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
23438 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
23439 marshalling and call CleanUpNativeData if needed. Fixes #58646.
23441 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23443 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
23446 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23448 * process.c: use double quotes to quote program name and arguments on
23449 windows. Fixes bug #58575.
23451 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23453 * file-io.c: don't return "." and ".." when using windows Find*File.
23455 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
23457 * marshal.c: Don't pass wrappers to message init because method
23458 addressed used to lookup metadata. part of remoting[2|3] fix.
23460 2004-05-15 Jackson Harper <jackson@ximian.com>
23462 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
23463 path is essentially the same as MONO_PATH except that it points to
23464 GACs instead of lib directories.
23465 * loader.h: The user gac is gone so we dont need function to
23467 * mono-config.c: user gac option is now gone.
23469 2004-05-15 Jackson Harper <jackson@ximian.com>
23471 * culture-info.h: Make defines more consistent, add calendar data
23472 to the culture info table.
23473 * culture-info-tables.h: Add basic calendar data. Basically
23474 everyone gets default gregorian until all the data is
23476 * locales.c: Use the new consistent defines. Set calendar data for
23477 culture info objects.
23478 * object.h: add a field for calendar data to CultureInfo
23480 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
23482 * image.c: image->runtime_invoke_cache is keyed on signatures now.
23483 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
23485 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
23486 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
23487 an extra param that is the pointer of the method to invoke. The IL for
23488 the invoke method is no longer specific to the method, but to the
23489 signature of the method. Thus, we can share the same code for multiple
23490 methods. This reduces the number of methods that have to be compiled.
23492 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
23494 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
23496 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23498 * icall.c: Optimize Buffer.BlockCopy.
23500 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23502 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
23503 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
23504 quote). Changed them to "MMMM yyyy".
23506 2004-05-12 Miguel de Icaza <miguel@ximian.com>
23509 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
23511 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
23513 * reflection.h: Updated after changes to managed structures.
23515 * appdomain.c: Bump corlib version.
23517 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23519 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
23522 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23524 * Makefile.am: link to ../os/libmonoos.la on windows.
23527 -If MONO_DEBUG, warn about non-existing directories in
23529 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
23530 compile time variable.
23531 -Removed init_default_path and call mono_set_rootdir from
23532 libmonoos.a instead (windows only).
23534 * assembly.h: declare mono_assembly_getrootdir().
23537 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
23539 * loader.c: s/getenv/g_getenv/
23541 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
23543 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
23545 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
23547 * metadata.h: Add new marshalling conversions.
23549 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
23552 * reflection.c (mono_reflection_get_type): Lookup the type in all
23553 modules of a multi-module assembly. Fixes #58291.
23555 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
23557 * threads.c: Before aborting a background, set the StopRequested
23558 state. This avoids throwing the Abort exception.
23559 In mono_thread_manage, don't continue with the shutdown until all
23560 aborted threads have actually stopped.
23562 2004-05-10 Jackson Harper <jackson@ximian.com>
23564 * locales.c: Remove the modifier from culture names.
23566 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23568 * Makefile.am: monosn is not installed any more. It has been deprecated
23571 2004-05-07 Jackson Harper <jackson@ximian.com>
23574 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
23575 Fix array construction, add bailout if the length is 0.
23577 2004-05-07 Dick Porter <dick@ximian.com>
23579 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
23580 machine doesn't have a DNS entry. Patch by Urs Muff
23581 (umuff@quark.com), fixes bug 57928.
23583 2004-05-06 Jackson Harper <jackson@ximian.com>
23585 * reflection.c: Handle null PublicTokens properly. alloc mem for
23586 assembly names culture so we dont crash when freeing it.
23588 2004-05-06 Jackson Harper <jackson@ximian.com>
23590 * assembly.c: Check the usergac when loading with partial names.
23592 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
23594 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
23595 does nothing for now (not required for Linux/Windows) but the class
23596 library can call it (and a newer or modified runtime could need it).
23597 * icall.c: Registred icall.
23599 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23601 * loader.c: prints a message on module loading error we set MONO_DEBUG
23602 environment variable.
23604 2004-05-05 Jackson Harper <jackson@ximian.com>
23606 * appdomain.c: Handle PublicKeyToken=null properly.
23608 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
23610 * environment.c|h: Added icall ves_icall_System_Environment_
23611 GetOSVersionString to get the current OS version as a string.
23612 * icall.c: Registred icall.
23614 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
23616 * object.c: in mono_object_get_virtual_method(), take into account that
23617 non-virtual methods don't have a slot in the vtable. Check needed when
23618 the object is a proxy.
23620 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
23622 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
23623 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
23625 * object.c (mono_class_compute_gc_descriptor): Fix warning.
23627 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
23628 passed when a valuetype is expected.
23630 * object.c (mono_unhandled_exception): Only set the exit code if the
23631 exception happens in the main thread. Fixes thread5.exe.
23633 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
23634 invalid names. Fixes #58047.
23636 2004-05-03 Jackson Harper <jackson@ximian.com>
23638 * assembly.c: This line was committed accidently and is unneeded.
23640 2004-05-03 Jackson Harper <jackson@ximian.com>
23642 * icall.c: Add new icall for Assembly::LoadWithPartialName
23643 * assembly.c/.h: new function that probes the GAC to load partial
23644 assembly names by Paolo Molaro.
23646 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23648 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
23649 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
23650 (type_get_fully_qualified_name): Added PublicKeyToken when building a
23653 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23655 * appdomain.c: fixed check for 'neutral' culture and removed warning.
23656 * reflection.c: fix bug when parsing a full type name and Version is not
23657 the last thing in the string.
23659 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
23661 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
23662 crashes when it is freed.
23664 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23666 * assembly.c: print the compat warning to stderr.
23668 2004-05-01 Miguel de Icaza <miguel@ximian.com>
23670 * assembly.c (mono_assembly_load_references): Add a compatibility
23671 hack to run old applications that might be still referencing the
23672 3300-based assemblies, only do this for System.xxx.
23674 2004-05-01 Jackson Harper <jackson@ximian.com>
23676 * appdomain.c: If the culture is neutral we set it to "".
23678 2004-04-29 Jackson Harper <jackson@ximian.com>
23680 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
23682 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
23684 * string-icalls.c: added low overhead function for copying chars
23685 * icall.c: added needed icall for the above function
23687 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23689 * icall.c: fix return value of get_global_assembly_cache. Implemented
23690 Environment.GetLogicalDrives.
23692 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
23694 * rand.c: try and talk to egd or prngd
23695 for random bytes if opening devices fail.
23697 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
23699 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
23700 alignment for the type using the native alignment of its members
23701 instead of using klass->min_align.
23703 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
23705 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23708 * socket-io.c: added check for sys/aio.h.
23710 2004-04-28 Dick Porter <dick@ximian.com>
23712 * threads.c: Don't abort a thread thats already aborting, when
23713 terminating everything.
23715 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23717 * icall.c: added 2 new async calls for Socket.
23719 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
23720 IO on *nix systems.
23722 * threadpool.c: removed unused variable.
23724 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
23726 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
23728 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23730 * locales.c: put back string_invariant_tolower () and
23731 string_invariant_toupper ().
23733 2004-04-26 David Waite <mass@akuma.org>
23738 * unicode.h: remove comma from end of enumeration declarations
23740 2004-04-26 David Waite <mass@akuma.org>
23742 * debug-mono-symfile.h:
23745 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
23748 2004-04-26 Jackson Harper <jackson@ximian.com>
23750 * appdomain.c: Increment version number.
23752 2004-04-26 Jackson Harper <jackson@ximian.com>
23754 * appdomain.c: Set assembly references public token value when
23755 PublicKeyToken is specified, not the hash_value. Free public token
23756 values when free assembly name data. Previously the public key
23757 token was hex decoded, however we are using hex encoded public key
23758 tokens, so this is not neccasary.
23759 * assembly.c: Lookup assemblies in the gac if their public token
23760 value is set. Add function to allow enabling user gac
23761 lookups. Specify whether or not the assembly was loaded from the
23762 GAC. Compare full assembly names when checking the cache for
23763 assemblies (Temporarily disabled see comment in code). Remove
23764 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
23765 specifies trace-loader they get extra info to stdout on the
23766 loading of assemblies.
23767 * image.h: Add a field for an assembly references public token
23768 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
23769 whether an assembly has been loaded from the GAC.
23770 * image.c: Remove a corlib -> mscorlib name mapping.
23771 * loader.h: Add function to enable/disable the user gac.
23772 * mono-config.c: Check if the usergac is enabled in the config
23774 * icall.c: New icall to determine whether or not an assembly has
23775 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
23776 * tabldefs.h: Add constant for assemblyref flag that specifies a
23777 full public key is used instead of a public token.
23778 * reflection.c: Remove mscorlib -> corlib mappings. Set
23779 PublicTokenValue instead of hash value. This value is a hex
23780 string so it does not need to be expanded.
23782 2004-04-26 Martin Baulig <martin@ximian.com>
23784 * mono-debug-debugger.c (mono_debugger_initialize): Set
23785 `mono_debugger_initialized' before calling mono_debug_lock().
23787 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
23789 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
23790 InternalToUpper/InternalToLower.
23791 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
23792 removed invariant culture shortcut. This is now done in managed code.
23793 * locales.c: (string_invariant_toupper/tolower) removed.
23795 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23797 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
23798 Added Poll internal call.
23800 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
23801 call for Poll. Select was too heavy for polling a single socket.
23803 * threadpool.[ch]: added mono_threadpool_cleanup.
23804 * threads.c: use it. Don't use Thread_Abort on windows.
23806 2004-04-23 Martin Baulig <martin@ximian.com>
23808 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
23810 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
23812 * icall.c: Registred new icalls for key pair protection and added an
23813 icall for Environment.GetFolderPath on Windows.
23814 * security.c|h: Added new icalls for key pair protection.
23816 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23818 * socket-io.c: don't display the non-supported family warning for known
23819 families. Now this is not displayed on windows when checking support
23822 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23824 * class.c: don't display the layout warning for static fields.
23826 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
23828 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
23829 * locales.c, locales.h: Added new icalls for culture-specific
23830 Char.ToLower and Char.ToUpper.
23832 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23834 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
23837 2004-04-20 Martin Baulig <martin@ximian.com>
23839 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
23840 of the type name before passing it to mono_reflection_type_from_name().
23842 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
23844 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
23845 encodings here. Fixes #56965.
23847 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
23849 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
23850 fix test on strstr result not that I can see anything that
23851 relies on the result.
23853 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
23855 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
23858 * marshal.c (mono_marshal_get_string_encoding): New helper function.
23860 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
23861 function to determine which marshalling to use for strings. Fixes
23864 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
23866 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
23868 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
23870 * icall.c: #include mono-config.h
23872 2004-04-15 Jackson Harper <jackson@ximian.com>
23874 * culture-info-tables.h: Fix date formats for en-US culture.
23876 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
23878 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
23879 ThreadPool.SetMinThreads.
23880 * threadpool.c: Implemented ThreadPool.GetMinThreads and
23881 ThreadPool.SetMinThreads.
23883 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
23885 * mono-config.c: also load the .config file in the directory
23886 where the assembly was found.
23888 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
23890 * assembly.c: load per-assembly config files.
23891 * icall.c: decrapified code to get the config dir and moved to
23893 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
23894 per-assembly config files. When doing a dll map lookup give precedence
23895 to the per-assembly data.
23897 2004-04-14 Martin Baulig <martin@ximian.com>
23899 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
23900 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
23901 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
23903 * mono-debugger-debugger.c: While the debugger is locked, remember
23904 whether the symbol tables have changes and send one single
23905 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
23907 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
23909 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
23911 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
23914 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
23915 account when marshalling string arrays. Fixes #56965.
23917 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
23919 * icall.c: Add new icalls mapping for security.
23920 * security.c|h: Add internal calls for WindowsIdentity,
23921 WindowsImpersonationContext and WindowsPrincipal.
23923 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
23925 * class.c: Added comment to ensure the System.MonoDummy class
23926 is removed when no longer necessary
23928 2004-04-13 Miguel de Icaza <miguel@ximian.com>
23930 * appdomain.c: Pass arguments to the bootstraping exceptions to
23931 minimize JITed methods at boot
23933 * metadata.c (mono_exception_from_name_two_strings): Allow for the
23934 second string to be null.
23936 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
23937 Change the protocol to minimize the JIT methods at startup. Now
23938 it Returns the internal codepage, if the value of "int_code_page"
23939 is 1 at entry, and we can not compute a suitable code page
23940 number, returns the code page as a string.
23942 2004-04-13 Jackson Harper <jackson@ximian.com>
23944 * culture-info-tables.h: Fix number of decimal digits for all
23947 2004-04-13 Jackson Harper <jackson@ximian.com>
23949 * icall.c: Clairfy out of sync error message. It is not always
23950 your corlib that is out of sync.
23952 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
23954 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
23955 properties when only the set accessor is overriden. Fixes #55874.
23957 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
23959 * assembly.c (mono_assembly_load_references): Make this thread safe.
23962 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
23964 * monosn.c: Add missing initialization calls.
23966 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
23969 ves_icall_System_Globalization_CultureInfo_construct_number_format
23970 Fix g_assert so it compiles on fussier compilers re int/ptr
23973 2004-04-08 Dick Porter <dick@ximian.com>
23976 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
23977 53992. Also rearrange the code so that the internal calls return
23978 an error value and exceptions are thrown from managed code.
23980 * icall.c: Add type info to the socket icalls.
23982 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23984 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
23987 2004-04-07 Martin Baulig <martin@ximian.com>
23989 * class.c (mono_class_from_generic_parameter): Don't default
23990 `klass->parent' to `mono_defaults.object_type'.
23992 2004-04-07 Martin Baulig <martin@ximian.com>
23994 * reflection.c (mono_reflection_initialize_generic_parameter): Set
23995 `param->pklass->reflection_info'.
23997 2004-04-07 Jackson Harper <jackson@ximian.com>
23999 * culture-info-tables.h: Fix date separator symbol.
24001 2004-04-07 Martin Baulig <martin@ximian.com>
24003 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
24004 from System.Type to System.MonoType.
24006 2004-04-07 Martin Baulig <martin@ximian.com>
24009 (MonoReflectionGenericParam): Added `has_reference_type' and
24010 `has_value_type' fields.
24012 * reflection.c (mono_image_get_generic_param_info): Encode the
24013 correct flags if we have the `class' or `struct' constraint.
24015 2004-04-07 Martin Baulig <martin@ximian.com>
24018 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
24020 2004-04-07 Jackson Harper <jackson@ximian.com>
24022 * appdomain.c: Revert extra patches, just wanted to bump the
24025 2004-04-07 Jackson Harper <jackson@ximian.com>
24027 * Makefile.am: Add culture-info private headers.
24028 * icall.c: Add new icalls for contructing locales.
24029 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
24030 * locales.h: Declare new culture info construction methods.
24031 * object.h: Add new fields used to avoid the CultureMap to
24033 * culture-info.h: Definition of structs used in the culture info
24035 * culture-info-tables.h: Autogenerated tables that contain culture
24036 info data. This file was generated with the locale-builder tool.
24037 * appdomain.c: Incement corlib version number.
24039 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
24041 * appdomain.c: (mono_runtime_init) move mono_thread_init
24042 to before mono_object_new calls so critical sections
24043 are initialized before use.
24045 2004-04-07 Martin Baulig <martin@ximian.com>
24048 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
24049 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
24050 (ves_icall_MonoGenericParam_initialize): Removed.
24051 (monogenericparam_icalls): Removed.
24052 (generictypeparambuilder_icalls): Added new table for
24053 System.Reflection.Emit.GenericTypeParameterBuilder.
24056 (mono_reflection_define_generic_parameter): Removed.
24057 (mono_reflection_initialize_generic_parameter): This is now called
24058 from GenericTypeParameterBuilder's .ctor.
24060 2004-04-06 Martin Baulig <martin@ximian.com>
24062 * class.c (mono_class_init): Don't inflate nested classes in a
24064 (mono_type_get_name_recurse): Include the generic arguments for
24065 generic instances and generic type declarations.
24066 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
24067 (_mono_class_get_instantiation_name): Removed.
24068 (mono_class_create_generic): Always use `gklass->name' as our name.
24070 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
24072 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
24073 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
24074 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
24075 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
24076 closed generic methods here.
24079 (mono_reflection_generic_inst_get_nested_types): Removed.
24080 (inflate_mono_method): Copy the generic parameters from the
24081 MonoMethodHeader into out MonoGenericMethod.
24083 2004-04-06 Martin Baulig <martin@ximian.com>
24086 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
24088 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
24090 * reflection.c (build_compressed_metadata): If we have any entries
24091 in the GenericParam, MethodSpec or GenericParamConstraint tables,
24092 set the header version to 1.1.
24094 2004-04-06 Martin Baulig <martin@ximian.com>
24096 * class.c (mono_class_init): If we're a generic instance,
24097 initialize our nested classes, too.
24098 (_mono_class_get_instantiation_name): Deal with the new `!%d'
24101 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24103 * process.c: quote the argument passed to the shell on windows.
24105 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
24107 * threads.c (mono_alloc_special_static_data): Allow this to be
24108 called during startup.
24110 2004-04-02 Martin Baulig <martin@ximian.com>
24113 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
24115 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
24117 * icall.c: Fix build.
24119 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
24121 * Makefile.am: Added security.c|h.
24122 * icall.c: Added icall for get_UserName;
24123 * security.c: New file for security related icalls. Added function
24124 get_UserName for System.Environment (fix #56144).
24125 * security.h: New. Header file for security.c
24127 2004-04-02 Dick Porter <dick@ximian.com>
24129 * icall.c: Deleted the icalls that were obsoleted some time ago
24130 by the ICU string code, and which were mixed into the icall
24131 rearranging. Fixes bug 55969.
24134 * string-icalls.c: Deleted the code that those icalls reference.
24136 2004-04-01 Martin Baulig <martin@ximian.com>
24138 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
24140 * class.c (mono_class_from_generic_parameter): Don't set
24141 TYPE_ATTRIBUTE_INTERFACE.
24142 (my_mono_class_from_generic_parameter): Likewise.
24144 2004-04-01 Martin Baulig <martin@ximian.com>
24146 * loader.c (find_method): Added an optional `MonoClass *ic'
24147 argument to search in a specific interface.
24148 (mono_get_method_constrained): New public function.
24150 2004-04-01 Martin Baulig <martin@ximian.com>
24152 * reflection.c (mono_image_get_generic_field_token): Use the
24153 `handleref' cache here.
24155 2004-04-01 Martin Baulig <martin@ximian.com>
24157 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
24159 * reflection.c (create_generic_typespec): Use the `typespec' hash
24160 here, not the `typeref' one.
24162 2004-04-01 Martin Baulig <martin@ximian.com>
24164 * class.c (mono_class_inflate_generic_type): Moved the
24165 functionality into a new static inflate_generic_type() which
24166 returns NULL if it didn't do anything. Only increment the
24167 `mono_stats.inflated_type_count' if we actually inflated
24169 (mono_class_get_full): Check the classes type to see whether we
24170 need to inflate it; also inflate MONO_TYPE_(M)VAR.
24172 2004-04-01 Jackson Harper <jackson@ximian.com>
24174 * reflection.c: Set culture for assembly references.
24176 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
24178 * reflection.[ch], icall.[ch], Fix support for pinning variables.
24180 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24183 (do_mono_assembly_open): the critical section also covers
24184 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
24186 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24189 (mono_manage_threads): abort the background threads when finishing.
24192 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24194 * gc.c: only close the done_event handle if there was no timeout.
24197 2004-03-30 Martin Baulig <martin@ximian.com>
24199 * icall.c (icall_entries): It's called "System.Activator", not
24200 "System.Activation".
24202 2004-03-30 Martin Baulig <martin@ximian.com>
24204 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
24205 (mono_class_create_from_typespec): Likewise.
24207 2004-03-30 Martin Baulig <martin@ximian.com>
24209 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
24210 `has_ctor_constraint' and `initialized'.
24212 2004-03-30 Martin Baulig <martin@ximian.com>
24214 * reflection.c (encode_new_constraint): New static function to add
24215 the constructor constraint attribute to a type parameter.
24216 (encode_constraints): Call encode_new_constraint() if necessary.
24219 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
24221 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
24223 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
24225 * reflection.c, icall.c: add support for pinning variables.
24227 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
24229 * marshal.c (mono_marshal_get_managed_wrapper):
24230 init bool local with zero rather than null.
24232 2004-03-29 Martin Baulig <martin@ximian.com>
24234 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
24235 the "official" behavior here.
24236 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
24238 2004-03-29 Martin Baulig <martin@ximian.com>
24240 * icall.c: Reflect latest API changes.
24242 2004-03-29 Martin Baulig <martin@ximian.com>
24244 * loader.c (mono_get_method_from_token): Also call
24245 mono_metadata_load_generic_params () for abstract and interface
24246 methods; replace the type arguments in the method signature with
24247 the ones which are loaded from the metadata.
24249 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
24251 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
24252 of the lock is not the current thread. MS.NET don't do it, in spite of
24253 what the documentation says. See bug #56157.
24255 2004-03-28 Martin Baulig <martin@ximian.com>
24257 * class.c (mono_class_init): Don't call init_properties() and
24258 init_events() for generic instances; set `prop->parent' when
24259 inflating properties.
24261 * reflection.c (mono_generic_inst_get_object): Call
24262 `mono_class_init (ginst->klass)'.
24263 (mono_type_get_object): Only create a MonoGenericInst if your
24264 generic type is a TypeBuilder.
24265 (do_mono_reflection_bind_generic_parameters): Only set
24266 `ginst->is_dynamic' if our generic type is a TypeBuilder.
24268 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
24270 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
24273 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24275 * icall.c: added Kill_internal icall.
24276 * process.[ch]: added Kill_internal icall.
24278 2004-03-25 Martin Baulig <martin@ximian.com>
24280 * class.h (MonoStats): Added `generic_instance_count',
24281 `inflated_method_count', `inflated_type_count' and
24282 `generics_metadata_size'.
24284 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24286 * reflection.c: no warnings now.
24288 2004-03-25 Martin Baulig <martin@ximian.com>
24290 * class.c (mono_class_get_full): New public function; does a
24291 mono_class_get(), but also takes a `MonoGenericContext *'.
24293 * loader.c (mono_field_from_memberref): Renamed to
24294 `field_from_memberref', made static and added `MonoGenericContext *'
24296 (mono_field_from_token): Added `MonoGenericInst *' argument.
24297 (method_from_memberef): Likewise.
24298 (mono_get_method_from_token): Likewise.
24299 (mono_get_method_full): New public function; does a
24300 mono_get_method(), but also takes a `MonoGenericContext *'.
24302 * verify.c (mono_method_verify): Get the method's generic context
24303 and pass it to mono_field_from_token(), mono_get_method_full() and
24304 mono_class_get_full().
24306 2004-03-25 Martin Baulig <martin@ximian.com>
24308 * class.c (mono_class_inflate_generic_type): Take a
24309 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
24310 `MonoGenericMethod *'.
24312 2004-03-25 Martin Baulig <martin@ximian.com>
24314 * loader.h (MonoMethodInflated): Store the MonoGenericContext
24315 instead of the MonoGenericMethod here.
24317 2004-03-25 Martin Baulig <martin@ximian.com>
24319 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
24320 each time we create a new MonoGenericInst, we also create a new
24321 context which points back to us.
24323 * class.c (inflate_method): Use `ginst->context' instead of
24324 creating a new context.
24326 * loader.c (method_from_memberref): Use
24327 `klass->generic_inst->context' instead of creating a new context.
24329 2004-03-25 Martin Baulig <martin@ximian.com>
24331 * class.h (MonoGenericContext): New struct.
24332 (MonoGenericMethod): Removed `generic_inst'.
24334 * class.c (mono_class_inflate_generic_method): Take a
24335 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
24337 2004-03-25 Martin Baulig <martin@ximian.com>
24339 * loader.h (MonoMethodInflated): New typedef.
24341 * metadata.h (MonoMethodSignature): Removed `gen_method', make
24342 `generic_param_count' consume just 30 bits, added `is_inflated'
24343 and `has_type_parameters' flags (one bit each).
24345 * class.c (mono_class_inflate_generic_method): Create a
24346 MonoMethodInflated instead of a MonoMethodNormal and set
24347 `is_inflated' in the method signature.
24349 * class.h (MonoGenericMethod): Removed `generic_method'.
24351 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
24353 * image.c: Make sure the name of a MonoImage is always an absolute path.
24354 This fixes bug #54415.
24356 2004-03-24 Martin Baulig <martin@ximian.com>
24358 * class.c (mono_class_setup_vtable): If we're a generic instance,
24359 use our generic type's vtable size.
24361 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
24363 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
24364 MONO_NO_UNLOAD env var as a temporary workaround for unloading
24367 2004-03-23 Martin Baulig <martin@ximian.com>
24369 * class.h (MonoDynamicGenericInst): Added `int count_events' and
24370 `MonoEvent *events'.
24372 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
24373 (typebuilder_icalls): Added "get_event_info"; calls
24374 mono_reflection_event_builder_get_event_info().
24376 * reflection.c (mono_reflection_generic_inst_initialize): Added
24377 `MonoArray *events'.
24378 (mono_reflection_event_builder_get_event_info): New function.
24380 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
24382 * object.h: add mono_type_initialization_init
24384 * object.c (mono_runtime_class_init):
24385 implement class constructor synchronization rules
24386 to cope with threading issues.
24387 add mono_type_initialization_init
24389 * appdomain.c (mono_runtime_init): call
24390 mono_type_initialization_init
24392 * class.h: removing initializing field from MonoVTable
24394 2004-03-23 Martin Baulig <martin@ximian.com>
24396 * class.c (my_mono_class_from_generic_parameter): Use
24397 `param->name' if it's not NULL.
24399 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
24401 * class.c: do not insert non-virtual methods in the vtable.
24402 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
24403 that means the method is non-virtual. This never would have
24406 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
24408 * profiler.c: Added lock for accessing coverage_hash.
24410 2004-03-22 Martin Baulig <martin@ximian.com>
24412 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
24413 `method->method->signature->generic_param_count != 0' to make it
24414 work for interface methods.
24416 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24418 * process.c: quote the string passed to the shell using g_shell_quote.
24420 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24423 (mono_threads_manage): don't remove the finalizer thread and self
24424 from the threads hash table so that mono_thread_manage can be called
24427 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24429 * process.c: quote the arguments when UseShellExecute is true. Fixes
24432 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24434 * threads.c: set mono_thread_detach as a cleanup routine for every
24435 thread. This way it's always executed upon thread termination, either
24436 aborted or finished normally. No more xsp hangs!
24438 2004-03-17 Martin Baulig <martin@ximian.com>
24440 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
24441 `int count_nested' and a `MonoType **nested'.
24443 * reflection.c (mono_reflection_bind_generic_parameters): Moved
24444 most of the functionality into a new static
24445 do_mono_reflection_bind_generic_parameters() and don't take a
24446 `MonoType *nested_in' argument any more. Don't compute nested
24448 (mono_reflection_generic_inst_get_nested_types): New public method
24449 to get nested types.
24451 * class.c (mono_class_create_generic): Set `klass->nested_in' if
24452 we're a nested class.
24454 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
24455 mono_reflection_generic_inst_get_nested_types() to compute the
24458 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
24460 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
24461 descriptive error message under windows.
24463 2004-03-17 Martin Baulig <martin@ximian.com>
24465 * class.c (dup_type): Added `const MonoType *original' argument;
24466 copy the attrs from the original type.
24468 2004-03-17 Martin Baulig <martin@ximian.com>
24470 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
24471 `m->generic_inst_cache' here.
24473 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
24475 * exception.h exception.c: Add stack_overflow_exception.
24477 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24480 (overlapped_callback): call SetEvent *after* invoking the callback.
24481 No need to call CloseHandle.
24483 2004-03-16 Martin Baulig <martin@ximian.com>
24485 * reflection.c (mono_image_get_fieldref_token): Take a
24486 `MonoReflectionField *' instead of a `MonoClassField *' and a
24487 `MonoClass *'; store the `MonoReflectionField *' in the hash.
24489 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24491 * appdomain.c: don't add the culture to the filename we're looking for
24492 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
24494 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24496 * locales.c: don't ignore symbols when doing case insensitive compares.
24497 Thanks Dick! Fixes bug #54046.
24499 * threads.c: surround 'threads' usage with enter/leave in
24500 mono_thread_manage.
24502 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
24504 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
24505 implicitly marshalled as [Out]. Fixes #55450.
24507 (mono_marshal_get_runtime_invoke): Zero out the result if there is
24510 2004-03-16 Martin Baulig <martin@ximian.com>
24512 * class.c (mono_class_from_generic_parameter): Use the actual
24515 2004-03-16 Martin Baulig <martin@ximian.com>
24517 * reflection.c (type_get_signature_size): New static function.
24518 Compues the size of the type in a method signature.
24519 (method_get_signature_size): New static function; calls
24520 type_get_signature_size() to compute the actual size of the
24521 method's signature.
24522 (method_encode_signature): Use method_get_signature_size() to get
24523 the signature's size rather than using `nparams * 10'.
24525 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24527 * file-io.h: define here WapiOverlapped on windows. I don't want the
24528 regular OVERLAPPED one.
24531 * threadpool.c: somehow, BindIoCompletionCallback is not found.
24532 Disabling AIO on windows.
24534 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24536 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
24539 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24541 * appdomain.c: upgraded corlib version.
24543 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
24544 and BeginWrite. Allow opening files for asynchrnous operations.
24546 * file-io.h: new struct that maps FileStreamAsyncResult.
24547 * icall.c: added new icalls.
24548 * process.[ch]: support setting child process environment variables
24549 and use the SHELL or COMSPEC when UseShellExecute is true.
24551 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
24552 callback for async. IO is here and also BindHandle.
24554 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
24557 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
24559 * reflection.c (create_custom_attr): Allow len == 0.
24561 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
24562 computation on big-endian machines.
24564 2004-03-13 Martin Baulig <martin@ximian.com>
24566 * class.h (MonoGenericInst): Added `int count_ifaces'.
24568 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
24569 `ginst->count_ifaces' instead `klass->interface_count' since we
24570 may get called before the vtable is created.
24572 * loader.c (mono_method_get_param_names): If we're a generic
24573 instance, return and don't initialize the class.
24575 * reflection.c (mono_reflection_setup_generic_class): Don't call
24576 ensure_runtime_vtable().
24577 (mono_reflection_bind_generic_parameters): Set
24578 `ginst->count_ifaces'.
24580 2004-03-11 Jackson Harper <jackson@ximian.com>
24584 * unicode.h: Remove unused System.Char icalls.
24586 2004-03-11 Miguel de Icaza <miguel@ximian.com>
24588 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
24589 code when we P/Invoke the first library in Windows.Forms, instead
24590 of when we first open the assembly.
24592 * assembly.c: Drop the lookup from here.
24594 2004-03-10 Martin Baulig <martin@ximian.com>
24596 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
24597 class for properties, fields and events. Finally fixes #54945.
24599 2004-03-10 Martin Baulig <martin@ximian.com>
24601 * metadata.c (mono_metadata_class_equal): New static function;
24602 checks whether two generic instances or two generic parameters are
24604 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
24607 2004-03-10 Martin Baulig <martin@ximian.com>
24609 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
24611 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
24612 argument and write it into the `reflection_info' field.
24615 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
24616 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
24618 2004-03-09 Jackson Harper <jackson@ximian.com>
24620 * char-conversions.h: use 8 bits for numeric data its all we need
24621 * icall.c: numeric data is only 8 bits now.
24623 2004-03-09 Martin Baulig <martin@ximian.com>
24625 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
24627 * class.c (init_properties, init_events): Initialize the new
24630 * reflection.c (typebuilder_setup_properties): Likewise.
24631 (typebuilder_setup_events): Likewise.
24633 * reflection.h (MonoEventInfo): Replaced `parent with
24634 `declaring_type' and `reflected_type'.
24636 * icall.c (ves_icall_get_property_info): Distinguish between
24637 declaring and reflected type.
24638 (ves_icall_get_event_info): Likewise.
24640 2004-03-09 Martin Baulig <martin@ximian.com>
24642 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
24643 (ves_icall_Type_GetField): Correctly set field->klass.
24645 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
24647 * loader.h: Fix warning.
24649 2004-03-08 Miguel de Icaza <miguel@ximian.com>
24651 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
24652 library routine if present. Notice that it will still continue
24653 executing even if its missing, for those working on the Gtk#
24654 edition of Windows.Forms.
24656 * assembly.c (do_mono_assembly_open): If loading the
24657 System.Windows.Forms call mono_loader_wini_init.
24659 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
24661 * class.h: Added MonoRemoteClass struct.
24662 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
24663 function for MonoStrings.
24664 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
24665 Added internal call for getting the proxy type.
24666 * marshal.c: Get the type of transparent proxies from its remote_class.
24667 Added methods that generate the IL for type checks and casts:
24668 mono_marshal_get_isinst, mono_marshal_get_castclass,
24669 mono_marshal_get_proxy_cancast.
24670 * marshal.h: Declaration of the previous new methods.
24671 * object.c: Added new moethods for creating and updating MonoRemoteClass
24672 instances: mono_remote_class, mono_upgrade_remote_class,
24673 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
24674 * verify.c: FIx transparent_proxy_fields layout.
24675 * appdomain.c: Bump corlib version.
24677 2004-03-04 Jackson Harper <jackson@ximian.com>
24679 * icall.c: Add icall to access char conversion tables.
24680 * char-conversions.h: Character conversion tables.
24681 * Makefile.am: Add char-conversions.h private header file.
24683 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
24685 * appdomain.c (unload_thread_main): Increase unloading timeout to
24686 10 sec as a temporary workaround for Nant problems.
24688 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
24690 * gc.c: Add checks for GC_enable and GC_disable.
24692 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
24693 (jaak@zd.com.pl). Fix memory corruption in String.Replace
24696 2004-02-27 Martin Baulig <martin@ximian.com>
24698 * reflection.c (mono_reflection_bind_generic_parameters): Take a
24699 `MonoReflectionType *' instead of a `MonoType *'.
24701 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
24703 * gc.c (run_finalize): Avoid finalizing the object representing the
24705 (finalizer_thread): Fix warning.
24707 2004-02-25 Martin Baulig <martin@ximian.com>
24709 * class.c (_mono_class_get_instantiation_name): Added `int offset'
24710 argument for nested types.
24711 (mono_class_create_generic): Added support for nested generictypes.
24713 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
24716 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
24718 * reflection.c (method_encode_signature): Increase the minimum
24719 value of `size' from 10 to 11.
24720 (mono_reflection_bind_generic_parameters): Take `int type_argc'
24721 and `MonoType **types' arguments instead of the `MonoArray
24722 *types'; added `MonoType *nested_in'. Recursively instantiate
24725 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
24727 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
24728 stack_overflow_ex members which are used by exception handling.
24730 * appdomain.c (mono_runtime_init): Initialize the new members.
24732 * gc.c (mono_gc_enable): New helper function.
24733 * gc.c (mono_gc_disable): New helper function.
24735 2004-02-23 Martin Baulig <martin@ximian.com>
24737 * icall.c: I must have been really stupid - make it actually work
24740 2004-02-23 Martin Baulig <martin@ximian.com>
24742 * loader.c (method_from_memberref): Only inflate the method if
24743 it's in another klass.
24745 2004-02-23 Martin Baulig <martin@ximian.com>
24747 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
24748 (mono_class_init): If we're a generic instance and an interface,
24749 compute `class->interface_id'; also create `class->interfaces'
24750 here and inflate them.
24752 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
24754 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
24756 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
24758 2004-02-15 Miguel de Icaza <miguel@ximian.com>
24760 * reflection.c (method_encode_code): Improved the error message
24761 generated by the exception.
24763 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24765 * icall.c: Martin did not do what he said in the ChangeLog for
24766 2004-02-18, but put back the changes for properties and events.
24767 Commenting those changes out again and adding comment to bug #54518.
24769 * process.c: removed warning.
24771 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
24773 * marshal.c (emit_struct_conv): Print an error message instead of
24774 asserting when a type does not have the StructLayout attribute.
24776 2004-02-20 Martin Baulig <martin@ximian.com>
24778 * reflection.c (mono_type_get_object): Also use the cache for
24780 (mono_reflection_bind_generic_parameters): Always compute
24783 2004-02-20 Martin Baulig <martin@ximian.com>
24785 * class.h (MonoGenericMethod): Removed `klass'.
24787 * class.c (mono_class_inflate_generic_method): Added `MonoClass
24790 2004-02-20 Martin Baulig <martin@ximian.com>
24792 * reflection.c (method_encode_methodspec): Actually use the
24793 uninflated signature for the memberref.
24795 2004-02-20 Martin Baulig <martin@ximian.com>
24797 * class.h (MonoGenericMethod): Removed `declaring'.
24799 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
24800 is NULL, compute it here.
24802 2004-02-20 Martin Baulig <martin@ximian.com>
24804 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
24806 * metadata.c (mono_metadata_generic_inst_hash): New method.
24807 (mono_metadata_generic_inst_equal): New method.
24809 * reflection.c (mono_reflection_bind_generic_parameters): Use the
24810 `klass->image->generic_inst_cache' cache to avoid creating
24811 duplicate MonoGenericInst's.
24813 * class.c (mono_class_inflate_generic_type): Use the cache.
24815 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
24817 * object.c: fixed gc descriptor calculation for embedded valuetypes.
24819 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24821 * icall.c: added Socket.WSAIoctl icall.
24823 * socket-io.[ch]: implemented
24824 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
24826 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
24828 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
24830 2004-02-18 Urs C Muff <umuff@quark.com>
24832 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
24833 this work on PPC and other big-endian architectures.
24835 * debug-mono-symfile.h: Prepended the names of all the `guint32'
24836 fields with an underscore to make sure they're only accessed by
24837 the read32() macro.
24839 2004-02-18 Martin Baulig <martin@ximian.com>
24841 * icall.c: Put the klass->refclass changes back for methods and
24842 fields, but not for properties and events. We're currently not
24843 distinguishing between DeclaringType and ReflectedType for
24844 properties and events, that's what caused the regressions.
24846 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24849 (mono_async_result_new): the handle can be NULL.
24851 * threadpool.c: Use an event instead of a semaphore, don't initialize
24852 it until needed. This saves quite a few semaphores from being created
24853 when using the threadpool.
24855 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
24857 * object.c (mono_string_is_interned_lookup): Fix interning of long
24858 strings. Fixes #54473.
24860 * domain.c (ldstr_equal): Optimize if the two strings are equal.
24862 * icall.c: Revert the klass->refclass changes since they introduce
24863 regressions (bug #54518).
24865 2004-02-18 Martin Baulig <martin@ximian.com>
24867 * class.c (mono_class_init): If we're a generic instance and don't
24868 come from a TypeBuilder, inflate our members here.
24869 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
24870 (mono_class_create_generic): New public method.
24871 (mono_class_initialize_generic): Removed.
24872 (get_instantiation_name): Renamed to
24873 _mono_class_get_instantiation_name() and made it public.
24875 2004-02-18 Martin Baulig <martin@ximian.com>
24877 * class.c (mono_class_inflate_generic_type): Clear the new
24878 instance's `nginst->klass' when inflating a generic instance.
24879 (mono_class_is_subclass_of): Added (basic) support for generic
24882 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
24884 * appdomain.h, domain.c: use a MonoCodeManager instead of a
24885 MonoMempool to hold compiled native code.
24887 2004-02-17 Martin Baulig <martin@ximian.com>
24889 * class.h (MonoDynamicGenericInst): Added `count_properties' and
24892 * reflection.c (mono_reflection_generic_inst_initialize): Added
24893 `MonoArray *properties' argument.
24895 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
24897 2004-02-17 Martin Baulig <martin@ximian.com>
24899 * icall.c (ves_icall_Type_GetFields): Renamed to
24900 ves_icall_Type_GetFields_internal() and added a
24901 `MonoReflectionType *rtype' argument; pass it to
24902 mono_field_get_object() to set the field's "reflected" type.
24903 (ves_icall_Type_GetConstructors): Likewise.
24904 (ves_icall_Type_GetEvents): Likewise.
24905 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
24906 argument; pass it to mono_method_get_object() to set the method's
24909 2004-02-17 Martin Baulig <martin@ximian.com>
24911 * class.h (MonoDynamicGenericInst): New type.
24912 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
24914 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
24915 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
24916 (ves_icall_MonoGenericInst_GetFields): New interncall.
24918 * class.c (mono_class_from_generic): Don't call
24919 mono_class_initialize_generic() if this is a dynamic instance;
24920 ie. it's being created from a TypeBuilder.
24921 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
24922 `class->byval_arg.type'.
24924 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
24925 to `inflate_method' and made static.
24926 (mono_reflection_inflate_field): Removed.
24927 (mono_reflection_generic_inst_initialize): New public method.
24929 * reflection.h (MonoReflectionGenericInst): Removed `methods',
24930 `ctors' and `fields'; added `initialized'.
24932 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
24934 * debug-helpers.c (mono_method_full_name): Fix output for empty
24937 2004-02-12 Martin Baulig <martin@ximian.com>
24939 * class.h (MonoClassField): Added `MonoType *generic_type'.
24941 * reflection.c (mono_image_get_fieldref_token): Added support for
24942 instantiated generic types.
24943 (field_encode_inflated_field): Removed.
24944 (mono_image_get_inflated_field_token): Removed.
24945 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
24947 * reflection.h (MonoReflectionInflatedField): Removed.
24949 2004-02-12 Martin Baulig <martin@ximian.com>
24951 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
24952 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
24954 * reflection.c (mono_image_get_methodspec_token): Take a
24955 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
24956 (mono_image_create_token): Check whether we have a
24957 `method->signature->gen_method' and call
24958 mono_image_get_methodspec_token() if appropriate.
24959 (inflated_method_get_object): Removed.
24960 (mono_reflection_bind_generic_method_parameters): Return a
24961 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
24962 (mono_reflection_inflate_method_or_ctor): Likewise.
24964 * reflection.h (MonoReflectionInflatedMethod): Removed.
24966 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
24968 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
24969 for custom valuetype marshalling.
24971 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
24973 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24975 * icall.c: fixed WSAGetLastError_internal name.
24977 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
24979 * threads.c (mono_thread_attach): Allow this to be called multiple
24980 times for a thread.
24982 * threads.c (build_wait_tids): Do not wait for ourselves.
24984 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
24985 appdomain list is empty.
24987 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
24988 memory returned by mono_string_builder_to_utf16, since it points into
24989 managed memory. Thanks to Bernie Solomon for noticing this.
24991 * icall.c: Add AppDomainSetup icalls.
24993 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
24995 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
24998 * reflection.c (reflection_methodbuilder_to_mono_method): Save
24999 custom attributes to the method_aux struct. Also fix array indexes etc.
25001 * loader.c (mono_method_get_param_names): Make dynamic case work again.
25003 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
25005 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
25006 (both static and runtime) and reduce startup time.
25008 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
25010 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
25011 AsAny marshalling conversion instead of crashing.
25013 * marshal.c: Fix warnings.
25015 2004-02-09 Martin Baulig <martin@ximian.com>
25017 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
25019 * reflection.h (MonoReflectionInflatedMethod): Removed the
25020 `declaring' field, it's now in the unmanaged MonoGenericMethod.
25022 * reflection.c (method_encode_methodspec): Removed the `method'
25023 argument; we get it from `gmethod->declaring'.
25024 (inflated_method_get_object): Removed the `declaring' argument.
25026 2004-02-09 Martin Baulig <martin@ximian.com>
25028 * class.h (MonoGenericMethod): New type.
25029 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
25032 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
25033 a `MonoGenericMethod *gen_method' one.
25035 * class.c (mono_class_inflate_generic_type): Take an additional
25036 `MonoGenericMethod * argument. This is only non-NULL if we're
25037 inflating types for a generic method.
25038 (mono_class_inflate_generic_signature): Renamed to
25039 inflate_generic_signature() and made static; take a
25040 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25041 (inflate_generic_header): Take a `MonoGenericMethod *' argument
25042 instead of a `MonoGenericInst *' one.
25043 (mono_class_inflate_generic_method): Likewise.
25045 * reflection.c (encode_generic_method_sig): Take a
25046 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25047 (method_encode_methodspec): Likewise.
25048 (inflated_method_get_object): Likewise.
25050 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
25051 field with a `MonoGenericMethod *gmethod' one.
25053 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
25055 * class.h (mono_class_has_parent): add parens to expansion
25058 2004-02-08 Martin Baulig <martin@ximian.com>
25060 * image.h (MonoImage): Removed `generics_cache'.
25062 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
25063 instead of a `MonoType *' argument; removed the `inflate_methods'
25064 argument. Don't inflate methods here.
25066 * loader.c (find_method): If it's a generic instance, call
25067 mono_class_init() on the `sclass->generic_inst->generic_type'.
25069 * metadata.c (mono_type_size): Make this work on uninitialized
25070 generic instances; call it on the `ginst->generic_type's class.
25072 * reflection.c (mono_reflection_bind_generic_parameters): Call
25073 mono_class_from_generic() to create the `ginst->klass'.
25075 2004-02-08 Martin Baulig <martin@ximian.com>
25077 * class.h (MonoClass): Changed type of `generic_inst' from
25078 `MonoType *' to `MonoGenericInst *'.
25080 2004-02-08 Martin Baulig <martin@ximian.com>
25082 * icall.c (ves_icall_Type_BindGenericParameters): Just call
25083 mono_type_get_object(), this is now creating a `MonoGenericInst'
25084 for MONO_TYPE_GENERICINST.
25085 (ves_icall_MonoGenericInst_GetParentType): Likewise.
25086 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25088 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
25089 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
25090 (inflated_method_get_object): Added `MonoClass *refclass' argument.
25091 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
25092 and reflected type.
25094 * reflection.h (MonoReflectionInflatedMethod): Removed
25095 `declaring_type' and `reflected_type'.
25097 2004-02-08 Martin Baulig <martin@ximian.com>
25099 * class.h (MonoGenericInst): Added `MonoType *parent' and
25100 `MonoType **ifaces'.
25102 * reflection.h (MonoReflectionGenericInst): Removed `klass',
25103 `parent' and `interfaces'.
25105 * reflection.c (mono_reflection_bind_generic_parameters): Take a
25106 `MonoType *' argument and return a `MonoType *'.
25109 (ves_icall_MonoGenericInst_GetParentType): New interncall.
25110 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25112 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
25114 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
25115 valuetype marshalling.
25117 2004-02-06 Martin Baulig <martin@ximian.com>
25120 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
25121 (my_mono_class_from_generic_parameter): Likewise.
25123 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
25125 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
25126 contents of the symbol files lazily.
25128 * object.h (MonoThread): Add 'name' and 'name_len' fields.
25130 * threads.h threads.c icall.c: New icalls for getting and setting the
25133 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
25135 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
25136 Raise an exception when the domain is not found.
25138 2004-02-03 Martin Baulig <martin@ximian.com>
25140 * reflection.c (mono_image_get_methodspec_token): Use the
25141 uninflated signature; fixes gen-33.
25143 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
25145 * gc.c threads.c: Make the finalizer thread a normal managed thread so
25146 the finalizer code can use thread functionality.
25148 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
25149 the finalizer thread.
25151 * threads.c: Make some functions more robust.
25153 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
25155 * metadata.h: Add new marshalling conventions.
25157 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
25158 stringbuilder marshalling. Fixes #53700.
25160 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
25162 * reflection.c (mono_image_get_type_info): Save declarative security
25165 * reflection.c (mono_image_get_field_info): Handle uninitialized
25166 unmanaged fields as well.
25168 * appdomain.c: Bump corlib version.
25170 2004-02-01 Martin Baulig <martin@ximian.com>
25172 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
25173 method type arguments.
25175 2004-01-30 Duncan Mak <duncan@ximian.com>
25177 * marshal.h: Add prototype for
25178 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
25180 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
25183 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
25185 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
25186 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
25188 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
25190 * marshal.c (mono_marshal_get_native_wrapper): Add support for
25191 custom marshalling of valuetypes.
25193 * marshal.c: Fix some warnings.
25195 2004-01-29 Martin Baulig <martin@ximian.com>
25197 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
25198 for generic method parameters.
25200 * reflection.c (method_encode_methodspec): Write the uninflated
25201 signature into the methodspec table.
25202 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
25203 is always the uninflated method.
25204 (reflection_methodbuilder_to_mono_method): Copy the generic
25205 parameters from the MethodBuilder into `header->gen_params'.
25207 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
25209 * class.c (mono_class_from_generic_parameter): Fix warning.
25211 2004-01-27 Martin Baulig <martin@ximian.com>
25213 * class.c (mono_class_from_generic_parameter): Don't create
25214 `klass->methods' here.
25216 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
25218 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
25219 extension since it does not work with libraries named lib<FOO>.dll.so.
25221 2004-01-25 Martin Baulig <martin@ximian.com>
25223 * class.c (mono_class_inflate_generic_type): Added support for
25224 MONO_TYPE_GENERICINST.
25226 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
25227 inflate methods on open constructed types.
25229 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25231 * object.c: fire ProcessExit event in the root AppDomain after running
25232 Main. Fixes bug #53299.
25234 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
25236 * socket-io.c: include the new socket-wrappers.h header.
25237 Use the wrappers instead of the unix socket functions to make the code
25240 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
25242 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
25244 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25247 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
25249 * reflection.c (mono_image_create_pefile): Handle the case when the
25250 entry point is not a MethodBuilder.
25252 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25253 field to ReflectionMethod since it is not allways a builder.
25255 * reflection.c (type_get_fully_qualified_name): New helper function to
25256 return the fully qualified name of a type.
25258 * reflection.c (encode_marshal_blob): Always emit the fully qualified
25259 type name for custom marshallers.
25261 * reflection.c (mono_marshal_spec_from_builder): Ditto.
25263 * class.c (mono_class_setup_vtable): If a parent class already
25264 implements an interface, use the implementing methods from that class.
25267 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25269 * threadpool.c: just return instead of ExitThread to allow for thread
25272 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
25274 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
25275 when closing resource modules.
25277 * reflection.c (mono_image_create_pefile): Handle the case when the
25278 entry point is not a MethodBuilder.
25280 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25281 field to ReflectionMethod since it is not allways a builder.
25283 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
25285 * marshal.c (mono_marshal_get_managed_wrapper):
25286 mono_marshal_alloc takes native int so CONV_I
25287 the arg for 64bits.
25289 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
25291 * reflection.c (fixup_cattrs): New function to fixup the methoddef
25292 tokens in the cattr table. Fixes #53108.
25294 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25296 * loader.c: don't trim ".dll" before looking up in the config file.
25297 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
25299 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
25301 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
25302 Return the module which contains the resource as well.
25303 (ves_icall_System_Reflection_Module_Close): New icall.
25305 * appdomain.c: Bump corlib version number.
25307 * image.c (mono_image_addref): New public function.
25309 * assembly.c: Call mono_image_addref.
25311 * reflection.c (mono_module_get_object): Increase reference count of
25314 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25317 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
25318 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
25319 proper exceptions on DllImport problems.
25321 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
25323 * class.c, metadata.c: eliminate CSIZE macro.
25325 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
25327 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
25328 * object.h: Added async_callback field in MonoAsyncResult.
25329 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
25330 * verify.c: Added async_callback in MonoAsyncResult layout.
25332 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
25334 * reflection.c (mono_reflection_get_custom_attrs): Add support
25337 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
25339 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
25341 (mono_marshal_method_from_wrapper): Add null pointer check.
25343 2004-01-16 Martin Baulig <martin@ximian.com>
25345 * debug-mono-symfile.h: Set version number to 36 and reflect
25346 latest symbol writer changes.
25348 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
25350 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
25351 multi-dimensional arrays.
25352 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
25353 (mono_class_from_mono_type): Use bounded_array_class_get.
25355 * class.c (mono_bounded_array_class_get): New function which takes
25356 a 'bounded' bool argument to distinguish vectors from one dimensional
25359 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
25360 bounded_array_class_get if the array has bounds.
25362 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
25363 Search modules loaded using AssemblyBuilder:AddModule as well.
25365 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25367 * appdomain.c: increased corlib version.
25368 * filewatcher.c: removed g_print.
25370 (get_property_info): only allocate what is actually requested.
25371 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
25373 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25375 * Makefile.am: added filewatcher.[ch]
25376 * filewatcher.[ch]: FileSystemWatcher runtime support.
25377 * icall.c: added new FSW icalls.
25379 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
25381 * string-icalls.c: fix stringbuilder regression as suggested by
25382 Iain McCoy <iain@mccoy.id.au>.
25384 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
25386 * process.c (process_read_stringtable_block): Recognize '007f' as
25387 a language neutral stringtable block.
25389 2004-01-12 Patrik Torstensson
25391 * object.h (MonoStringBuilder) : Changed layout to support our
25392 new stringbuilder class.
25393 * marshal.c: Change marshalling to support the new layout of
25395 * appdomain.c: increased version number because new layout of
25398 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
25400 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
25401 assembly name as an string instead of an AssemblyName, since it is
25402 easier to extract info from it.
25404 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
25405 the culture subdirectories too. Fixes #52231.
25407 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25409 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
25410 It takes 2 new parameters with an optional name for the method to look
25411 for and case ignoring info.
25413 * threadpool.c: removed unused variable.
25415 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25417 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
25418 It takes 2 new parameters with an optional name for the property to look
25419 for and case ignoring info.
25422 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
25424 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
25427 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25430 * assembly.c: escape the uri before passing it to g_filename_from_uri.
25433 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
25435 * reflection.c: Add support for more than one unmanaged resource.
25437 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
25438 in field->def_value, as done in all other cases.
25440 * reflection.c (mono_reflection_get_custom_attrs): Add support for
25443 * reflection.c (mono_reflection_create_runtime_class): Remove
25444 errorneous assignment to klass->element_class, since it is already
25445 done in mono_reflection_setup_internal_class.
25447 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25449 * gc.c: added missing LeaveCriticalSection.
25450 * icall.c: indented a couple of lines.
25451 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
25452 if we call EndInvoke inside a callback. Fixes bug #52601.
25454 2004-01-07 Martin Baulig <martin@ximian.com>
25456 * mono-debug-debugger.h
25457 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
25459 2004-01-06 Miguel de Icaza <miguel@ximian.com>
25461 * appdomain.c: Use messages in NotImplementedException.
25463 * exception.c (mono_get_exception_not_implemented): Now this takes
25464 a message argument.
25466 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
25467 exception instead of g_asserting an aborting when something is not
25470 Add some inline docs.
25472 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
25474 * reflection.h: Update after changes to object layout.
25476 * reflection.c: Implement saving of unmanaged aka win32 resources.
25478 * appdomain.c: Bump version number.
25480 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
25481 Handle missing domains gracefully.
25483 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
25485 * file-io.c : On Windows, there are much more invalid_path_chars.
25487 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
25489 * class.h, object.c: prepare for GetType () speedup.
25491 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
25493 * profiler.c: workaround for --profile null reference exception on
25494 cygwin. Patch by Patrik Torstensson.
25496 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
25498 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
25499 make work for unaligned access.
25501 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
25503 * class.c: small cleanup (class->fields [i] -> field).
25504 * image.c: check address of metadata is valid.
25506 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
25508 * assembly.h assembly.c (mono_assembly_loaded): New public function to
25509 search the list of loaded assemblies.
25511 * reflection.c (mono_reflection_type_from_name): Use
25512 mono_assembly_loaded instead of mono_image_loaded.
25514 * reflection.c: Fix warnings.
25516 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
25518 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
25519 is dynamic. This is needed since an assembly can contain both dynamic and
25520 non-dynamic images.
25522 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
25525 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
25527 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
25528 to store modules loaded using AddModule.
25530 * reflection.c (mono_image_fill_file_table): Generalize this so it works
25533 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
25535 * reflection.c (mono_image_fill_export_table_from_module): New function to
25536 fill out the EXPORTEDTYPES table from a module.
25538 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
25539 into a separate function. Also handle loaded non-dynamic modules.
25541 * reflection.c (mono_image_basic_init): Fix memory allocation.
25543 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
25545 * assembly.c (mono_assembly_load_references): Make this public.
25547 2003-12-19 Martin Baulig <martin@ximian.com>
25549 * class.c (mono_class_initialize_generic): Made this static, take
25550 a `MonoGenericInst *' instead of a `MonoClass *'.
25551 (mono_class_from_generic): Call mono_class_initialize_generic()
25552 unless we're already initialized or being called from
25553 do_mono_metadata_parse_generic_inst().
25555 * class.h (MonoGenericInst): Added `initialized' and
25556 `init_pending' flags.
25558 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
25559 `mono_class_init (gklass)' or mono_class_initialize_generic()
25560 here; set `generic_inst->init_pending' while parsing the
25563 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
25565 * locales.c: include string.h for memxxx prototypes
25567 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
25569 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
25570 constructor when accessing literal fields.
25572 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
25574 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
25576 * reflection.c (assembly_add_resource_manifest): New function to fill
25577 the MANIFESTRESOURCE table.
25579 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
25581 * reflection.h: Update to changes in class layout.
25583 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
25584 Reenable call to mono_runtime_is_shutting_down ().
25586 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
25587 determine if the runtime is shutting down.
25589 2003-12-16 Jackson Harper <jackson@ximian.com>
25591 * icall.c: comment out call to mono_runtime_is_shutting_down to
25594 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
25596 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
25597 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
25599 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
25601 * reflection.c: move definition of swap_with_size
25602 to before its first call
25604 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
25606 * appdomain.c (mono_runtime_is_shutting_down): New public function.
25608 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
25611 * object.c: Fix warnings.
25613 * icall.c (ves_icall_Type_Get...): Only consider inherited static
25614 members if FlattenHierarchy is set.
25616 * reflection.c (mono_image_add_decl_security): New function to emit
25617 declarative security.
25619 * reflection.h reflection.c: Add support for declarative security.
25621 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
25623 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
25625 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
25627 * appdomain.c verify.c: Moved corlib version checking into its own
25628 function in appdomain.c since it needs to create vtables etc.
25630 2003-12-13 Patrik Torstensson <p@rxc.se>
25632 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
25633 instead of unwrapped server.
25635 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
25637 * verify.c (check_corlib): Fix field index.
25639 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
25641 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
25644 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
25646 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
25647 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
25648 cope with sizeof(size_t) != sizeof(guint32).
25650 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25652 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
25653 in case of failure.
25655 2003-12-10 Mark Crichton <crichton@gimp.org>
25657 * icall.c: removed the GetNonZeroBytes. We now handle this case
25660 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
25662 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
25664 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
25667 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
25669 * verify.c (check_corlib): Handle the case when the version field is
25670 initialized by a static constructor.
25672 2003-12-08 Patrik Torstensson <p@rxc.se>
25674 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
25676 2003-12-08 Martin Baulig <martin@ximian.com>
25678 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
25679 a MonoReflectionGenericParameter, also take the parameter index
25680 and name as arguments.
25681 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
25682 (ves_icall_MonoGenericParam_initialize): New interncall.
25683 (ves_icall_Type_make_byref_type): New interncall.
25685 * reflection.h (MonoReflectionGenericParam): Derive from
25686 MonoReflectionType, not just from MonoObject. Added `refobj' and
25689 * reflection.c (mono_reflection_define_generic_parameter): Create
25690 and return a new MonoReflectionGenericParam; don't initialize the
25692 (mono_reflection_initialize_generic_parameter): New public method;
25693 initializes the constraints and creates the `param->pklass'.
25695 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
25697 * reflection.h reflection.c: Use the new fields 'num_types',
25698 'num_fields' and 'num_methods' to track the number of types etc.
25700 * verify.c (check_corlib): Check corlib version number.
25702 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
25704 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
25705 function works on all methods.
25707 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
25709 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
25710 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
25711 the custom_type_info flag of the transparent proxy.
25712 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
25713 objects that supports IRemotingTypeInfo.
25714 * object.h: Added custom_type_info field in transparent proxy.
25716 2003-12-06 Martin Baulig <martin@ximian.com>
25718 * class.c (mono_class_create_from_generic): Removed.
25719 (mono_class_from_generic): Check `ginst->klass' before doing
25720 anything else. This is important to fully support "recursive"
25723 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
25724 empty `generic_inst->klass' before doing anything else.
25726 2003-12-06 Dick Porter <dick@ximian.com>
25731 * locales.c: Use C structs to access class fields. Don't do a
25732 conversion between MonoString and UChar because both are
25733 platform-endian UTF-16. Compare now takes startindex and count
25734 parameters. Add a char overload for IndexOf. Speed up the
25735 invariant string IndexOf.
25737 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
25739 * Makefile.am (monosn_LDADD): Fix parallel build.
25741 2003-12-04 Martin Baulig <martin@ximian.com>
25744 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
25745 (ves_icall_Type_make_array_type): New interncall.
25747 2003-12-04 Martin Baulig <martin@ximian.com>
25749 * locales.c: also change it in the !HAVE_ICU case.
25751 2003-12-04 Dick Porter <dick@ximian.com>
25754 * locales.c: construct_compareinfo is now in CompareInfo, not
25757 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
25759 * image.c (mono_image_load_file_for_image): Cache loaded images in the
25760 image->files array.
25762 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
25765 * assembly.c (mono_assembly_load_references): Only load references
25768 * class.c (mono_class_from_name): Avoid linear search of the
25769 EXPORTEDTYPE table.
25771 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
25773 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
25775 * image.h (MonoImage): Add 'field_cache' field.
25777 * loader.c (mono_field_from_token): Cache field lookups.
25779 * reflection.c (mono_module_get_object): Fix name property.
25781 * icall.c (ves_icall_get_enum_info): Update after changes to
25782 mono_metadata_get_constant_index ().
25784 * icall.c: Get rid of get_type_info icall, use a separate icall for
25785 each type property to avoid needless memory allocations. Fixes #51514.
25787 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
25788 to avoid needless binary searches.
25790 * class.c (class_compute_field_layout): Move the initialization of
25791 field->def_value to mono_class_vtable ().
25793 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
25796 * object.c (mono_object_allocate): Make it inline.
25798 * object.c (mono_object_allocate_spec): Make it inline.
25800 2003-12-02 Dick Porter <dick@ximian.com>
25802 * locales.c (create_NumberFormat): NumberFormatInfo construction.
25803 Patch by Mohammad DAMT (mdamt@cdl2000.com).
25805 2003-12-01 Dick Porter <dick@ximian.com>
25807 * threads.c: Fix signature and call in CreateMutex and
25810 2003-12-01 Dick Porter <dick@ximian.com>
25813 * locales.c: Implement string compares and searching
25815 * object.h: Add extra Thread field
25817 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
25819 * reflection.c (fixup_method): Add support for MonoCMethod.
25821 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
25823 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
25825 * reflection.c (assembly_name_to_aname): Allow extra characters in
25826 assembly names. Fixes #51468.
25828 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
25830 * exception.c (mono_exception_from_name_domain): New helper function.
25832 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
25833 exception object in the correct domain.
25835 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
25836 formatting + make a copy a the input data.
25838 * loader.c (mono_get_method_from_token): Methods which contain
25839 native code do not have entries in the ImplMap.
25841 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
25842 Thanks to Gonzalo for spotting this.
25844 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
25845 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
25847 * assembly.h (mono_assembly_load_from): Split the second part of
25848 assembly loading into a new public function.
25850 * exception.h (mono_get_exception_bad_image_format): New function.
25852 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
25854 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
25855 Enumerate all modules inside a dynamic assembly. Fixes #51293.
25857 * icall.c: Add new icall for creating dynamic methods.
25859 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
25861 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
25863 * reflection.c (mono_reflection_create_dynamic_method): New icall to
25864 create a dynamic method.
25866 * reflection.c (resolve_object): New helper function.
25868 * reflection.c: Generalize ReflectionMethodBuilder and the functions
25869 which manipulate it so they can also work on dynamic methods.
25871 * reflection.c (reflection_method_builder_to_mono_method): Avoid
25872 creating the MonoReflectionMethodAux structure if it is not needed.
25874 * reflection.h verify.c: Update after changes to object layout.
25876 * reflection.c (method_builder_encode_signature): Fix compilation on
25879 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
25881 * appdomain.h: Added support for context static fields. Added static_data
25882 field to MonoAppContext and renamed thread_static_fields to a more
25883 generic special_static_fields in MonoAppDomain, since it can now contain
25884 context static fields.
25885 * domain.c: Updated hashtable name.
25886 * object.c: Replaced field_is_thread_static() for a more generic
25887 field_is_special_static() which also checks for context static attribute.
25888 In mono_class_vtable(), added support for static context fields.
25889 * threads.c: Changed methods that manage thread static fields to more
25890 generic methods so they can be reused both for thread and context static
25892 * threads.h: Declared some new methods.
25894 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
25896 * reflection.h: Update after changes to the managed types.
25898 * reflection.c (encode_custom_modifiers): New helper function.
25900 * reflection.c (method_encode_signature): Emit custom modifiers.
25902 * reflection.c (field_encode_signature): Emit custom modifiers.
25904 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
25906 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
25908 * icall.c (ves_icall_System_ValueType_Equals): New optimized
25911 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
25914 * object.c (mono_field_get_value_object): New function.
25916 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
25919 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
25921 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
25922 return a preallocated out-of-memory exception instance.
25924 * object.c (out_of_memory): Use the new function.
25926 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
25927 flag is before the custom modifiers. Fixes #49802.
25929 2003-11-16 Martin Baulig <martin@ximian.com>
25931 * class.c (mono_class_is_open_constructed_type): Implemented the
25932 MONO_TYPE_GENERICINST case.
25934 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
25936 * assembly.c (mono_assembly_fill_assembly_name): New function to
25937 fill out the MonoAssemblyName structure.
25938 (mono_assembly_open): Use the new function.
25940 * icall.c (fill_reflection_assembly_name): New helper function.
25942 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
25945 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
25947 2003-11-15 Martin Baulig <martin@ximian.com>
25949 * class.c (mono_class_is_open_constructed_type): New public
25950 function; checks whether a type is an open constructed type,
25951 ie. whether it still contains type parameters.
25952 (mono_class_inflate_generic_type): If we're a type parameter and
25953 the inflated type is also a MONO_TYPE_(M)VAR, return the original
25956 * class.h (MonoGenericInst): Added `guint32 is_open'.
25958 * loader.c (method_from_methodspec): Check whether we're an open
25959 or closed constructed type and set `ginst->is_open'.
25961 * reflection.c (mono_reflection_bind_generic_parameters): Check
25962 whether we're an open or closed constructed type and set
25964 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
25965 from open constructed types.
25967 2003-11-15 Martin Baulig <martin@ximian.com>
25969 * reflection.c (mono_reflection_bind_generic_parameters): If we're
25970 a generic instance (instead of a generic type declaration) with
25971 unbound generic parameters, bind them to our actual types.
25973 2003-11-14 Martin Baulig <martin@ximian.com>
25975 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
25977 * reflection.c (mono_reflection_bind_generic_parameters): If we're
25978 an interface type, populate `res->interfaces' with instantiated
25979 versions of all the interfaces we inherit.
25981 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
25983 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
25984 when MONO_PATH is set but doesn't contain the install dir.
25986 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25989 (ves_icall_Type_GetInterfaces): don't return an interface twice when
25990 it's also implemented in base classes. Fixes bug #50927.
25992 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
25994 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
25995 if this method is called from a finalizer. Fixes #50913.
25997 2003-11-12 Miguel de Icaza <miguel@ximian.com>
25999 * threads.c: Implement VolatileRead/VolatileWrite
26001 * icall.c: Add new icalls for VolatileRead/VolatileWrite
26003 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26005 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
26006 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
26009 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
26010 from Peter Ross (pro@missioncriticalit.com).
26012 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
26014 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
26016 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26018 * assembly.c (mono_assembly_load_references): Disable check because it
26019 triggers on older corlibs which lots of people have.
26021 2003-11-12 Jackson Harper <jackson@ximian.com>
26023 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
26024 load corlib.dll if mscorlib.dll is not found.
26025 * assembly.h: Remove corlib name define.
26028 * image.c: Change corlib name to mscorlib.
26030 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26032 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
26034 2003-11-11 Miguel de Icaza <miguel@ximian.com>
26036 * appdomain.h: Added loader_optimization here to sync with the C#
26037 code, and add disallow_binding_redirects field.
26039 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26041 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
26043 * reflection.c (mono_image_build_metadata): Fix crash on modules
26046 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
26048 * icall.c (ves_icall_get_method_info): Return callingConvention as
26051 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
26052 namespaces from the EXPORTEDTYPE table as well.
26054 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
26055 from all modules inside the assembly.
26057 2003-11-11 Martin Baulig <martin@ximian.com>
26059 * reflection.c (mono_reflection_bind_generic_parameters): Make
26060 this work for interfaces.
26062 2003-11-11 Martin Baulig <martin@ximian.com>
26064 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
26066 2003-11-11 Martin Baulig <martin@ximian.com>
26068 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
26069 "MonoInflatedMethod" and "MonoInflatedCtor".
26071 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26073 * reflection.c (resolution_scope_from_image): Use the assembly table
26074 from the manifest module, since other modules don't have it.
26076 * debug-helpers.c (mono_type_full_name): New helper function.
26078 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
26080 * image.c (mono_image_load_file_for_image): New public function which
26081 is a replacement for the load_file_for_image in class.c.
26083 * assembly.c (mono_assembly_load_module): A wrapper for the function
26084 above which does assembly association and reference loading too.
26086 * class.c (mono_class_from_name): Call mono_assembly_load_module.
26088 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26090 * appdomain.c: not all of the attributes for the full assembly name
26091 are required and the order doesn't matter. Fixes bug #50787.
26093 2003-11-10 Dick Porter <dick@ximian.com>
26095 * locales.c: Use platform-endian UTF16
26097 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
26099 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26101 2003-11-10 Martin Baulig <martin@ximian.com>
26104 (mono_metadata_load_generic_params): Make this actually work.
26106 * reflection.c (mono_reflection_bind_generic_parameters): If our
26107 parent is a generic instance, pass all the `types' to it, no
26108 matter whether it has the same number of type parameters or not.
26110 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
26112 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26114 * assembly.c (mono_assembly_load_references): Move the image<->assembly
26115 assignment code to this function so it gets called recursively for all
26118 * image.c (load_modules): Remove the assembly assignment since it is
26119 now done by mono_assembly_load_references.
26121 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26122 Add 'module' argument.
26123 (mono_module_get_types): New helper function.
26124 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
26126 2003-11-08 Martin Baulig <martin@ximian.com>
26128 * class.c (mono_class_inflate_generic_method): Interface method
26129 don't have a header.
26131 * reflection.c (mono_image_get_methodspec_token): Take an
26132 additional `MonoGenericInst *' argument instead of reading it from
26133 the header; this is necessary to support interfaces.
26134 (mono_image_create_token): Pass the `MonoGenericInst *' from the
26135 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
26136 (inflated_method_get_object): Take an additional `MonoGenericInst *'
26139 * reflection.h (MonoReflectionInflatedMethod): Added
26140 `MonoGenericInst *ginst'.
26142 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
26144 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
26146 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
26148 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
26150 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
26153 (reflection_methodbuilder_from_method_builder):
26154 (reflection_methodbuilder_from_ctor_builder): New helper functions to
26155 initialize a ReflectionMethodBuilder structure.
26156 (mono_image_get_methodbuilder_token):
26157 (mono_image_get_ctorbuilder_token): New functions to emit memberref
26158 tokens which point to types in another module inside the same assembly.
26160 * reflection.c: Use the new helper functions.
26162 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
26164 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
26165 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
26167 * reflection.c (resolution_scope_from_image): Emit a moduleref if
26170 * reflection.c (mono_image_build_metadata): Emit metadata only for the
26171 current module. Emit the manifest only for the main module.
26173 * reflection.c (mono_image_create_token): Add assertion when a
26174 memberref needs to be created.
26176 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
26178 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
26179 larger buffer for the custom attribute blob. Fixes #50637.
26181 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26183 * threadpool.c: notify listener on async processing handles after
26184 invoking the async callback. Thanks to Zoltan.
26186 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
26188 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
26189 avoid code duplication.
26191 * reflection.h (MonoDynamicImage): New type which is currently unused,
26192 but will be used through the ref.emit code in place of
26193 MonoDynamicAssembly.
26195 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26198 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
26199 a MonoDynamicImage instead of just a MonoImage.
26201 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
26202 icalls to ModuleBuilder but keep their semantics, so they will work
26203 with moduleb->assemblyb. This will change later.
26205 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
26207 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26210 * reflection.c (mono_image_build_metadata): Avoid creation of a default
26211 main module, since it is now done by the managed code.
26213 2003-11-03 Martin Baulig <martin@ximian.com>
26215 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
26216 `ginst->klass' here.
26217 (method_encode_methodspec): Don't use the `ginst->generic_method's
26218 klass if it's a generic instance, use `ginst->klass' in this case.
26220 2003-11-03 Martin Baulig <martin@ximian.com>
26222 * reflection.c (mono_image_get_generic_method_param_info):
26223 Removed, use mono_image_get_generic_param_info() instead.
26224 (mono_image_get_type_info): Write the GenericParam table before
26225 the Method table. This is neccessary because in the GenericParam
26226 table, type parameters of the class (ie. '!0' etc.) must come
26227 before the ones from its generic methods (ie. '!!0' etc).
26229 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
26231 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
26233 2003-11-02 Martin Baulig <martin@ximian.com>
26235 * reflection.c (create_generic_typespec): Take a
26236 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
26237 the generic parameters from it.
26239 2003-11-02 Martin Baulig <martin@ximian.com>
26241 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
26242 instead of a `MonoClassField *' since we just need the type.
26243 (create_generic_typespec): New static function. Creates a
26244 TypeSpec token for a generic type declaration.
26245 (mono_image_get_generic_field_token): New static function.
26246 (mono_image_create_token): If we're a FieldBuilder in a generic
26247 type declaration, call mono_image_get_generic_field_token() to get
26250 2003-11-02 Martin Baulig <martin@ximian.com>
26253 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
26254 `MonoReflectionGenericInst *declaring_type' and
26255 `MonoReflectionGenericInst *reflected_type' fields.
26257 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
26258 `MonoReflectionGenericInst *declaring_type' and a
26259 `MonoReflectionGenericInst *reflected_type' argument instead of a
26260 single `MonoReflectionGenericInst *type' one. Set
26261 `res->declaring_type' and `res->reflected_type' from them.
26262 (mono_reflection_inflate_field): Likewise.
26264 2003-11-02 Martin Baulig <martin@ximian.com>
26266 * class.c (mono_class_setup_vtable): Don't store generic methods
26269 2003-11-02 Martin Baulig <martin@ximian.com>
26271 * reflection.h (MonoReflectionGenericInst): Added
26272 `MonoReflectionType *declaring_type'.
26274 * reflection.c (mono_reflection_bind_generic_parameters): Use
26275 `if (tb->parent)' instead of `klass->parent'.
26277 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
26279 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
26280 with an empty ASSEMBLY table.
26282 * reflection.c (mono_image_build_metadata): Avoid using the same loop
26283 variable in the inner and outer loops.
26285 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
26287 * metadata.h (mono_metadata_make_token): Put parentheses around macro
26290 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
26292 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
26293 icalls. Instead, do everything in managed code. This is needed since
26294 it is hard to restore the original domain etc. in unmanaged code in the
26295 presence of undeniable exceptions.
26297 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
26298 New icalls to push and pop appdomain refs.
26300 2003-10-31 Martin Baulig <martin@ximian.com>
26302 * class.c (inflate_generic_type): Renamed to
26303 mono_class_inflate_generic_type() and made it public.
26305 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
26308 * loader.c (mono_field_from_memberref): Also set the retklass for
26311 * fielder.c (mono_image_get_inflated_field_token): New static
26312 method; creates a metadata token for an inflated field.
26313 (mono_image_create_token, fixup_method): Added support for
26314 "MonoInflatedField".
26315 (fieldbuilder_to_mono_class_field): New static function.
26316 (mono_reflection_inflate_field): New public function.
26319 (MonoReflectionGenericInst): Added `MonoArray *fields'.
26320 (MonoReflectionInflatedField): New typedef.
26322 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
26324 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
26325 for Solaris and other platforms without s6_addr16
26327 2003-10-30 Martin Baulig <martin@ximian.com>
26329 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
26330 argument instead of two.
26331 (mono_class_inflate_generic_signature): Likewise.
26332 (inflate_generic_header): Likewise.
26333 (mono_class_inflate_generic_method): Likewise. In addition, if
26334 `ginst->klass' is set, it becomes the new `method->klass'.
26336 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
26339 * reflection.c (encode_generic_method_sig): Write a 0xa as the
26340 first byte. [FIXME]
26341 (method_encode_methodspec): If we have generic parameters, create
26342 a MethodSpec instead of a MethodRef.
26343 (fixup_method): Added support for "MonoInflatedMethod" and
26344 "MonoInflatedCtor".
26345 (mono_image_create_token): Added support for "MonoInflatedMethod"
26346 and "MonoInflatedCtor".
26347 (inflated_method_get_object): New static function; returns a
26348 managed "System.Reflection.MonoInflatedMethod" object.
26349 (mono_reflection_bind_generic_method_parameters): Return a
26350 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
26351 (mono_reflection_inflate_method_or_ctor): Likewise.
26352 (mono_image_get_generic_method_param_info): Initialize unused
26354 (mono_image_get_generic_param_info): Likewise.
26356 * reflection.h (MonoReflectionInflatedMethod): New public
26357 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
26358 "S.R.MonoInflatedCtor" classes.
26360 * loader.c (method_from_memberref): If we're a TypeSpec and it
26361 resolves to a generic instance, inflate the method.
26363 2003-10-28 Dick Porter <dick@ximian.com>
26365 * object.c (mono_runtime_run_main): Convert command-line arguments
26366 into utf8, falling back to the user's locale encoding to do so.
26368 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
26370 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
26373 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
26375 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
26376 up icalls at method definition time. Partially fixes #33569.
26378 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
26380 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
26381 marshalling of arrays. Fixes #50116.
26383 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
26385 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
26386 points to a vtable in the dying appdomain.
26388 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
26389 listeners into unmanaged code inside the lock.
26391 * object.c (mono_class_vtable): Turn off typed allocation in non-root
26392 domains and add some comments.
26394 2003-10-25 Martin Baulig <martin@ximian.com>
26396 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
26398 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
26400 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
26401 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
26402 currently parsing. Create the generic class and store it in
26403 `generic_inst->klass' before parsing the type arguments. This is
26404 required to support "recursive" definitions; see mcs/tests/gen-23.cs
26406 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
26407 to support recursive typespec entries.
26409 * class.c (mono_class_setup_parent): If our parent is a generic
26410 instance, we may get called before it has its name set.
26411 (mono_class_from_generic): Splitted into
26412 mono_class_create_from_generic() and mono_class_initialize_generic().
26414 2003-10-25 Martin Baulig <martin@ximian.com>
26416 * icall.c (ves_icall_Type_BindGenericParameters): Return a
26417 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
26418 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
26419 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
26421 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
26422 (create_typespec): Likewise.
26423 (mono_reflection_bind_generic_parameters): Return a
26424 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
26425 (mono_reflection_inflate_method_or_ctor): New public function.
26427 * reflection.h (MonoReflectionGenericInst): New typedef.
26429 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
26431 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
26432 inside the domain lock. Fixes #49993.
26434 * object.c (mono_class_vtable): When typed allocation is used,
26435 allocate vtables in the GC heap instead of in the mempool, since the
26436 vtables contain GC descriptors which are used by the collector even
26437 after the domain owning the mempool is unloaded.
26439 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
26441 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
26442 reflect what it does. Also invalidate mempools instead of freeing
26443 them if a define is set.
26445 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
26448 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
26449 hold the finalizable objects in this domain.
26451 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
26454 * appdomain.c (mono_domain_set): New function to set the current
26455 appdomain, but only if it is not being unloaded.
26457 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
26458 appdomain which is being unloaded.
26460 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
26461 unloading of the root appdomain.
26463 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
26464 icall to execute a method in another appdomain. Intended as a
26465 replacement for InternalSetDomain, which can confuse the code
26466 generation in the JIT.
26468 * appdomain.c (mono_domain_is_unloading): New function to determine
26469 whenever an appdomain is unloading.
26471 * appdomain.c (mono_domain_unload): New function to correctly unload
26474 * assembly.c (mono_assembly_load_references): Check that an assembly
26475 does not references itself.
26477 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
26478 domain manually, it asks the finalizer thread to do it, then waits for
26479 the result. Also added a timeout.
26481 * icall.c: Register the new icalls.
26483 * threads.h threads.c: Export the mono_gc_stop_world and
26484 mono_gc_start_world functions.
26486 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
26487 function to fill out the mempool with 0x2a.
26489 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
26491 * reflection.h (MonoReflectionMethodAux): New structure to store
26492 information which is rarely used, thus is not in the MonoMethod
26495 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
26496 store the aux info.
26498 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
26499 and marshalling info into the aux structure.
26501 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
26502 from the aux structure.
26504 * loader.c (mono_method_get_param_names): Retrieve the param names from
26507 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
26509 * exception.h exception.c: Add AppDomainUnloadedException && fix
26512 2003-10-21 Dick Porter <dick@ximian.com>
26515 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
26516 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
26518 2003-10-21 Martin Baulig <martin@ximian.com>
26520 * reflection.c (mono_reflection_bind_generic_parameters):
26521 `klass->parent' is NULL for interfaces.
26523 2003-10-21 Martin Baulig <martin@ximian.com>
26525 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
26527 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
26529 * exception.c (mono_exception_from_name_msg): New helper function for
26530 creating exceptions and initializing their message field.
26532 * exception.c: Simplify functions using the new helper.
26534 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
26537 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
26538 mono_raise_exception, since otherwise gcc doesn't generate the function
26539 epilog for raise_exception, confusing the stack unwinding in the JIT.
26542 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
26543 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
26546 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26548 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
26551 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
26553 * icall.c: Removed GetUninitializedObject method because
26554 AllocateUninitializedClassInstance does the same.
26556 2003-10-18 Martin Baulig <martin@ximian.com>
26558 * class.c (inflate_generic_signature): Renamed to
26559 mono_class_inflate_generic_signature() and made it public.
26560 (my_mono_class_from_generic_parameter): New static function; if we
26561 don't already have the generic parameter's MonoClass, create a
26562 very simple one which is just used internally in the runtime and
26563 not passed back to managed code.
26565 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
26567 * metadata.h (MonoMethodSignature): Moved the
26568 `MonoGenericParam *gen_params' to the MonoMethodHeader.
26569 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
26571 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
26572 ves_icall_MonoMethod_GetGenericArguments(); this is now an
26573 interncall on the MonoMethod class, not on MethodInfo.
26574 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
26575 calling mono_reflection_bind_generic_method_parameters() directly.
26577 * loader.c (mono_method_get_signature): If this is a MethodSpec;
26578 return the already computed `method->signature'.
26579 (method_from_methodspec): New static function to load a method
26580 from a MethodSpec entry.
26581 (mono_get_method_from_token): Call the new method_from_methodspec()
26582 for MethodSpec tokens.
26583 (mono_get_method_from_token): If we're a generic method, load the
26586 * reflection.c (mono_image_get_memberref_token): Allow
26587 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
26589 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
26590 (mono_image_create_token): First check whether it's a generic
26591 method (so we'd need to create a MethodSpec), then do the other
26593 (mono_reflection_bind_generic_method_parameters): Return a
26594 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
26595 called directly from the interncall.
26597 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
26599 * reflection.c (load_public_key): Move loading of the public key
26602 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
26604 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
26607 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
26608 culture, hash_alg and public_key. Fixes #49555.
26610 2003-10-17 Martin Baulig <martin@ximian.com>
26612 * class.h (MonoGenericInst): Moved this declaration here and added
26613 `MonoMethod *generic_method'.
26616 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
26617 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
26619 * metadata.c (mono_metadata_type_equal): Two types of
26620 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
26621 index; ie. don't compare the address of the `MonoGenericParam'
26623 (mono_metadata_load_generic_params): Removed the `MonoMethod
26626 * metadata.h (MonoGenericInst): Moved declaration to class.h.
26627 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
26629 * reflection.c (method_encode_signature): Encode the number of
26630 generic parameters.
26631 (encode_generic_method_sig): New static function.
26632 (method_encode_methodspec): New static function; creates an entry
26633 in the MethodSpec table for a generic method.
26634 (mono_image_get_methodspec_token): New static function.
26635 (mono_image_create_token): Call mono_image_get_methodspec_token()
26636 for generic methods.
26637 (mono_reflection_bind_generic_method_parameters): New public
26638 function. Instantiates a generic method.
26640 2003-10-16 Martin Baulig <martin@ximian.com>
26642 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
26643 *gen_params' here from MonoMethodHeader.
26645 * metadata.c (mono_metadata_parse_method_signature): If we have
26646 generic parameters, initialize `method->gen_params' and then set
26647 the correct `type->data.generic_param' in all the parameters.
26649 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
26651 * threads.c (mono_threads_get_default_stacksize): New function to
26652 return the default stacksize.
26654 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
26655 termination of the finalizer thread, since the previous method had
26656 race conditions. Fixes #49628.
26658 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
26659 as for the other managed threads.
26661 2003-10-16 Martin Baulig <martin@ximian.com>
26663 * class.c (inflate_generic_signature): Copy `generic_param_count'
26666 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
26669 * metadata.c (mono_metadata_parse_method_signature): Actually set
26670 the `method->generic_param_count' here.
26671 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
26673 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
26675 * object.h: Add a new field to TypedRef to simplify the implementation
26676 of the REFANY opcodes in the JIT.
26678 * icall.c: Make use of the new field.
26680 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
26683 2003-10-15 Martin Baulig <martin@ximian.com>
26685 * class.c (mono_class_from_gen_param): Renamed to
26686 mono_class_from_generic_parameter() and moved most of the
26687 functionality from mono_reflection_define_generic_parameter()
26688 here; ie. we create a "real" class here.
26689 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
26690 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
26691 previously been called.
26693 * class.h (MonoGenericParam): Moved the declaration of this struct
26694 here from metadata.h and added `MonoMethod *method'.
26696 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
26699 * loader.c (mono_get_method_from_token): If we have any generic
26700 parameters, call mono_metadata_load_generic_params() to read them
26701 from the MONO_TABLE_GENERICPAR.
26703 * metadata.c (mono_metadata_load_generic_params): Added
26704 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
26706 * metadata.h (MonoMethodSignature): Replaced
26707 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
26708 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
26710 * reflection.c (mono_reflection_define_generic_parameter): Moved
26711 most of the functionality into the new
26712 mono_class_from_generic_parameter(); set the `method' field if
26713 we're a method parameter.
26715 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
26717 * marshal.c (emit_struct_conv): if native size is 0
26720 2003-10-14 Martin Baulig <martin@ximian.com>
26722 * icall.c: The generics API has changed in the spec since it was
26723 added to System.Type; these modifications make it match the spec
26725 (ves_icall_Type_GetGenericParameters): Renamed to
26726 `ves_icall_Type_GetGenericArguments'.
26727 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
26728 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
26729 `ves_icall_MonoType_get_HasGenericArguments'.
26730 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
26731 `ves_icall_MonoType_get_IsGenericParameter'.
26732 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
26733 this is no interncall anymore.
26734 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
26735 `ves_icall_TypeBuilder_get_IsGenericParameter'.
26737 2003-10-14 Martin Baulig <martin@ximian.com>
26739 * reflection.c (mono_reflection_bind_generic_parameters): Also
26740 inflate generic methods if we're reading the class from IL.
26742 2003-10-13 Martin Baulig <martin@ximian.com>
26744 * reflection.c (mono_reflection_define_generic_parameter): This
26745 method isn't called directly from the icall anymore; take a
26746 `MonoReflectionAssemblyBuilder *' so we can use this for type and
26747 method generic parameters.
26748 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
26749 (method_builder_encode_signature): Encode generic parameters.
26750 (mono_image_get_method_info): Write generic params to the
26751 MONO_TABLE_GENERICPARAM table.
26753 * reflection.h (MonoReflectionMethodBuilder): Added
26754 `MonoArray *generic_params'.
26756 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
26758 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
26759 wrapper for mono_reflection_define_generic_parameter().
26760 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
26762 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
26764 * marshal.h: Add missing function to fix build.
26766 * marshal.c (mono_marshal_get_native_wrapper): Add support for
26767 the SetLastError pinvoke attribute.
26769 * marshal.c (mono_marshal_set_last_error): New helper function called
26770 by the generated code.
26772 * marshal.c (mono_mb_emit_branch): New helper function.
26774 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
26776 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
26777 classes as parameters and return values of delegates. Fixes #29256.
26779 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
26781 * locales.c: use gint32 in non HAVE_ICU case
26783 2003-10-11 Martin Baulig <martin@ximian.com>
26785 * mono-debug.c (mono_debug_add_method): Added a workaround for
26788 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
26790 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
26791 delegates passed to native code must use the STDCALL calling
26792 convention. Fixes #35987.
26794 2003-10-10 Martin Baulig <martin@ximian.com>
26796 * class.c (inflate_generic_type): If we're inflating for a generic
26797 type instance (and not for a generic method), return
26798 MONO_TYPE_MVAR unchanged.
26800 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26802 * string-icalls.c: Join ignores null strings in the source array.
26803 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
26804 * threads.c: GetAvailableTheads is slightly more accurate.
26806 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
26808 * threads.h threads.c : add mono_threads_set_default_stacksize
26809 and pass default to CreateThread calls.
26811 2003-10-09 Dick Porter <dick@ximian.com>
26815 * locales.c: Internal calls for constructing CultureInfo and
26816 related objects from libicu (if its available.)
26818 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
26820 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
26822 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26824 * threadpool.c: added an argument to async_invoke_thread that is the
26825 item to process, pass the MonoAsyncResult to the thread start function
26826 when creating a new thread. This way we don't need to acquire any lock
26827 when we're creating a new thread. Readded a semaphore for faster
26828 response times (instead of that Sleep i added).
26830 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
26832 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
26833 get daylight change dates better on Windows, fix handling
26834 of platforms without tm_gmtoff.
26836 2003-10-06 Martin Baulig <martin@ximian.com>
26838 * class.c (inflate_generic_method): Renamed to
26839 mono_class_inflate_generic_method() and made public.
26840 (mono_class_init): Don't inflate the generic methods here.
26841 (mono_class_from_generic): Added `gboolean inflate_methods'
26842 argument. Inflate the methods here.
26844 * loader.c (mono_method_get_param_names): Ignore instances of
26845 generic types for the moment.
26847 * reflection.c (fixup_method): Added support for inflated methods.
26848 (mono_image_create_token): Use mono_image_get_methodref_token()
26849 for inflated methods.
26850 (mono_custom_attrs_from_param): Ignore instances of generic types
26852 (mono_reflection_bind_generic_parameters): New public function.
26853 Moved all the functionality from
26854 ves_icall_Type_BindGenericParameters() here and added support for
26856 (mono_reflection_define_generic_parameter): Initialize
26857 `klass->methods' here.
26859 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
26860 functionality into mono_reflection_define_generic_parameter().
26861 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
26862 TypeBuilder, return that TypeBuilder.
26864 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26866 * appdomain.c: removed mono_delegate_semaphore.
26869 (mono_thread_pool_add): moved hash table creation inside and the thread
26870 creation outside of the critical region.
26871 (mono_thread_pool_finish): removed obsolete code.
26872 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
26873 continue or exit the thread depending on the queue.
26875 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
26877 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
26878 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
26879 handle more bool marshalling options
26881 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
26883 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
26884 arrays of structs. Also add a more descriptive error message when
26885 a structure member is marshalled as LPArray.
26887 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
26889 * marshal.c (mono_marshal_get_native_wrapper): Add support for
26890 marshalling arrays of complex types. Fixes #29098. Also remove an
26891 usused and incomplete function.
26893 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
26895 * gc.c: report heap_size - free_bytes as total memory allocated
26898 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
26900 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
26901 fix timezone handling problems on Windows.
26903 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
26904 asserts when the year is outside the range handled by ms the functions.
26906 * class.c (setup_interface_offsets): If the class is an interface,
26907 fill out its interface_offsets slot.
26909 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26911 * threadpool.c: mark threadpool threads as background.
26913 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
26915 * decimal.c - define DECINLINE to nothing if not using GCC
26917 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
26919 * assembly.c: More refcount fixes.
26921 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26923 * string-icalls.c: if we're not trimming, return the same string.
26924 When not splitting, don't create a new string.
26926 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26929 (mono_image_open): increment the ref_count inside the critical section.
26931 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
26933 * image.c (mono_image_open): Fix reference counting bug.
26935 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
26937 * marshal.c (mono_marshal_type_size) struct alignment changed for
26938 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
26939 64bits. Avoid leak in mono_marshal_get_native_wrapper when
26940 mono_lookup_pinvoke_call throws.
26942 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
26944 * reflection.c (mono_reflection_parse_type): Fix #49114.
26946 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
26947 temporary workaround for cygwin header problem.
26949 * object.c (mono_object_isinst): Synchronize this with the code
26950 generated by the JIT for casts.
26952 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
26954 * reflection.c (encode_type): Fix #38332.
26956 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
26958 * marshal.c (mono_marshal_method_from_wrapper): New function to return
26959 the original method from the wrapper method.
26961 2003-09-25 Martin Baulig <martin@ximian.com>
26963 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
26964 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
26965 (ves_icall_Type_get_IsGenericInstance): New interncall.
26967 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
26969 * object.c: fix cast warning in big endian code.
26971 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
26973 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
26975 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26977 * assembly.c: don't call check_env from mono_assembly_load. It's
26978 already done once in mono_assemblies_init and may cause headaches when
26979 multiple threads are loading assemblies.
26981 2003-09-19 Martin Baulig <martin@ximian.com>
26983 * reflection.c (mono_reflection_define_generic_parameter): Don't
26984 allocate `klass->methods', set `klass->flags' to
26985 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
26987 2003-09-18 Martin Baulig <martin@ximian.com>
26989 * class.c (mono_class_init): Don't create `class->methods' if it's
26990 already initialized.
26992 * metadata.c (mono_metadata_load_generic_params): Make this
26995 * reflection.c (mono_reflection_define_generic_parameter): Set
26996 parent class and interfaces from the constraints.
26998 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
26999 to keep this struct in sync with the declaration in TypeBuilder.cs.
27001 2003-09-17 Martin Baulig <martin@ximian.com>
27003 * metadata.h (MonoType): Replaced the data's `int type_param'
27004 field with `MonoGenericParam *generic_param'.
27005 (MonoGenericParam): Added `MonoClass *klass'.
27007 * class.c (mono_class_from_gen_param): Removed the
27008 `MonoImage *image' and `int type_num' arguments.
27010 * metadata.c (mono_metadata_parse_generic_param): New static
27011 method; creates a MonoGenericParam which just contains the index.
27012 (do_mono_metadata_parse_type): Call
27013 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
27016 * reflection.c (mono_image_typedef_or_ref): Generic type
27017 parameters may be in the same assembly, but never use a typedef
27019 (mono_reflection_define_generic_parameter): We're now creating a
27020 "real" class for the type parameter; it's now safe to call
27021 mono_class_from_mono_type() on the class'es type, it'll do the
27024 2003-09-16 Martin Baulig <martin@ximian.com>
27026 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
27027 `symfile->range_entry_size' and `symfile->class_entry_size' here;
27028 the `symfile' data structure must be fully initialized before it
27029 gets added to the table.
27031 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
27033 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
27035 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
27036 class init trampolines.
27038 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
27040 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
27041 to the built-in profiler to turn off time and allocation profiling
27044 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
27046 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
27049 * debug-helpers.c (mono_method_full_name): Print the wrapper type
27050 in human readable form.
27052 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
27054 * reflection.c icall.c: Fixed warnings.
27056 * image.c (load_class_names): Use a temporary hash table to hold the
27057 namespaces in order to avoid doing many string comparisons.
27059 * image.h: Fix typo.
27061 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
27062 Pass NULL instead of g_direct_equal to the GHashTable constructor
27063 since the NULL case is short-circuited inside g_hash_table_lookup,
27064 leading to better performance.
27066 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
27067 obtain the first custom attribute for a given index. Depends on the
27068 CustomAttribute table being sorted by the parent field.
27070 * reflection.c (mono_custom_attrs_from_index): Use the new function
27071 for better performance.
27073 2003-09-07 Martin Baulig <martin@ximian.com>
27075 * class.c (mono_class_init): If we're a generic instance, inflate
27076 all our methods instead of loading them from the image.
27077 (mono_class_from_generic): Set `class->methods = gklass->methods'.
27079 2003-09-07 Martin Baulig <martin@ximian.com>
27081 * mono-debug-debugger.c: Added support for constructors.
27083 2003-09-06 Martin Baulig <martin@ximian.com>
27085 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
27088 * reflection.c (mono_reflection_setup_generic_class): Call
27089 ensure_runtime_vtable() to create the vtable.
27091 2003-09-05 Martin Baulig <martin@ximian.com>
27093 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
27096 2003-09-04 Martin Baulig <martin@ximian.com>
27098 * reflection.c (mono_reflection_define_generic_parameter): Generic
27099 parameters start with zero.
27101 2003-09-04 Martin Baulig <martin@ximian.com>
27103 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27105 * reflection.h (MonoReflectionGenericParam): New typedef.
27106 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
27107 the generic parameters from the managed TypeBuilder.
27109 * reflection.c (mono_reflection_define_generic_parameter): New function.
27110 (mono_reflection_create_runtime_class): Encode generic parameters.
27111 (mono_reflection_setup_generic_class): New function; this is
27112 called after adding adding all generic params to the TypeBuilder.
27113 (encode_type): Added MONO_TYPE_VAR.
27115 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
27117 * class.h class.c (mono_class_needs_cctor_run): Moved this method
27120 * assembly.h assembly.c: Moved the AOT loading code into an assembly
27123 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
27125 * reflection.h reflection.c class.h class.c: Delete duplicate
27126 definition of mono_type_get_name () from reflection.c and export the
27129 * class.c: Class loading fixes from Bernie Solomon
27130 (bernard@ugsolutions.com).
27132 * reflection.c: Endianness fixes from Bernie Solomon
27133 (bernard@ugsolutions.com).
27135 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
27137 * assembly.h assembly.c: Define a file format version for AOT
27140 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
27142 * appdomain.h (MonoJitInfo): New field to determine whenever the
27143 code is domain neutral.
27145 2003-08-31 Miguel de Icaza <miguel@ximian.com>
27147 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
27149 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
27151 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
27152 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
27153 Avoid caching the result since strings must be domain specific. Fixes
27156 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
27158 * marshal.c (mono_marshal_init): Make this callable multiple times
27159 since it is hard to find a correct place to call it.
27161 * object.c (mono_runtime_class_init): Execute static constructors in
27162 the correct appdomain.
27164 * image.c (build_guid_table): Handle the case when multiple images have
27167 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27169 * icall.c: added a couple of icalls for System.Web.
27171 2003-08-28 Martin Baulig <martin@ximian.com>
27173 * icall.c (ves_icall_Type_BindGenericParameters): Use
27174 `klass->generic_inst' instead of `&klass->byval_arg' in the
27175 mono_type_get_object() call. The returned type must be
27176 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
27178 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
27182 * object.c (mono_class_proxy_vtable): Make it thread safe.
27184 * pedump.c: Fix warning.
27186 * object.c appdomain.h: Get rid of metadata_section.
27187 It is no longer needed and it was causing deadlocks with domain->lock.
27189 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
27191 2003-08-26 Martin Baulig <martin@ximian.com>
27193 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
27195 2003-08-26 Martin Baulig <martin@ximian.com>
27197 * pedump.c (main): Call mono_metadata_init(),
27198 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
27199 and mono_loader_init().
27201 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
27203 * loader.h: Add missing include to fix build.
27205 * image.h: mono_image_load_references is no more.
27207 * assembly.c: Reworked assembly loading to make it really thread safe.
27208 After these changes, the assembly returned by mono_assembly_open is
27209 fully initialized, i.e. all its references assemblies are loaded.
27211 * assembly.c (mono_image_load_references): Renamed to
27212 mono_assembly_load_references, and made private, since clients no
27213 longer need to call it.
27215 * class.c: Removed calls to mono_assembly_load_references, since it was
27216 a source of deadlocks.
27218 * loader.h loader.c class.h class.c: Protect data structures using a
27219 new lock, the loader lock.
27221 * class.c (mono_class_setup_vtable): Create temporary hash tables and
27222 GPtrArrays only when needed.
27224 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
27225 into empty structures by mcs. Fixes pinvoke7.cs.
27227 * domain.c (mono_init): Call a new initialization function.
27229 * appdomain.c (mono_runtime_init): Call the new initializer function
27230 of the marshal module.
27232 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
27233 inserted into empty structures by mcs. Fixes pinvoke7.cs.
27235 * marshal.h marshal.c: Added locks around the wrapper caches to make
27236 this module thread safe.
27238 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
27239 this argument. Fixes pinvoke1.exe.
27241 2003-08-25 Lluis Sanchez <lluis@ximian.com>
27243 * object.h: Added call_type field to MonoMethodMessage and the corresponding
27244 enumeration of values. Removed fields to store remote call output values in
27245 MonoAsyncResult. Not needed any more.
27246 * object.c: Initialize call_type and async_result fields in mono_message_init.
27247 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
27248 dispatching the message.
27249 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
27250 async call to finish. To do it use a message with EndInvoke call type.
27252 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
27254 * loader.h loader.c (mono_method_hash_marhal_info): New function which
27255 determines whenever a method has marshalling info.
27257 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27259 * assembly.c: fix the build on windows.
27261 2003-08-22 Lluis Sanchez <lluis@ximian.com>
27263 * object.cs: Fixed bug #47785.
27265 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
27267 * string-icalls.c (StringReplace): If their are no occurances of
27268 the old string found return a reference to the supplied
27269 string. This saves some memory and matches MS behavoir.
27271 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27273 * socket-io.c: fixed compilation for systems that define AF_INET6
27274 and don't define SOL_IP/SOL_IPV6.
27276 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
27278 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
27279 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
27281 * rawbuffer.c rawbuffer.h: Make this module thread safe.
27283 * domain.c: Make this module thread safe.
27285 * domain.c (mono_init): Call new initialization function.
27287 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
27288 reference types too. Fixes #38812.
27290 * image.c (mono_image_init): Fixed warnings.
27292 * class.c (mono_class_from_typeref): Handle assembly load failure
27295 * appdomain.c (add_assemblies_to_domain): Handle the case when
27296 the references of an assembly are not yet loaded.
27298 * metadata.c image.c assembly.c: Moved initialization of global
27299 variables to a separate function called at startup since lazy
27300 initialization of these variables is not thread safe.
27302 * image.c assembly.c: Made this module thread safe by adding locks in
27303 the appropriate places.
27305 * domain.c (mono_init): Call the new initialization functions of the
27308 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
27310 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
27311 make a direct call. It is proxy's work to make the call asynchronous.
27312 mono_delegate_end_invoke(): If the targe is a proxy, just collect
27314 * object.cs: mono_method_call_message_new(): read AsyncResult and
27315 state object from parameters list, if this info is requested.
27316 * object.h: Added fields to store remote call output values in
27317 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
27319 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27321 * object.h: add needed fields to MonoThread.
27322 * threads.c, threads.h: allow registering a function to cleanup data
27323 allocated per thread by the JIT.
27325 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
27327 * loader.h: portability fix by Bernie Solomon
27328 * <bernard@ugsolutions.com>.
27330 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
27332 * reflection.h reflection.c (mono_param_get_objects): Changed this to
27333 return a MonoArray. This simplifies the code and also ensures that
27334 the cache allways contains an object reference as a value.
27336 * icall.c (ves_icall_get_parameter_info): Simplified using the new
27339 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27341 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
27342 fixes a problem with byte ordering when getting the address family for
27345 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
27347 * .cvsignore: Added monosn.
27349 * reflection.h reflection.c loader.c: Added support for parameter
27350 marshalling to dynamically created types. Fixes #47295.
27352 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
27354 * rand.c: remove useless warnings.
27356 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
27358 * class.c: implemented ldtoken for methods and fieldrefs.
27360 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27362 * threadpool.c: when mono_async_invoke was called, no one took care of
27363 monitoring the queue. So if the method invoked took some time and we
27364 got new async invoke requests after 500 ms (the thread created waited
27365 that long in WaitForSingleObject), the new async invoke was not called
27366 until the previous one finished.
27368 This is fixed now. Thanks to Totte for helping with it.
27370 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27372 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
27374 2003-08-11 Martin Baulig <martin@ximian.com>
27376 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
27378 2003-08-06 Martin Baulig <martin@ximian.com>
27380 * mono-debug-debugger.c: Added support for static fields,
27381 properties and methods.
27383 2003-08-06 Martin Baulig <martin@ximian.com>
27385 * mono-debug-debugger.c: Don't store the MonoString's vtable to
27386 make this work for applications with multiple application domains.
27388 2003-08-04 Martin Baulig <martin@ximian.com>
27390 * mono-debug-debugger.c: Completely reworked the type support; the
27391 most important thing is that we're now just using one single
27392 `MonoType' instance per type.
27394 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
27396 * mono-endian.h, mono-endian.c, icall.c: Added icall
27397 ves_icall_System_Double_AssertEndianity to assert double word endianity
27398 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
27400 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27402 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
27403 support, icalls and fixes.
27405 2003-07-31 Miguel de Icaza <miguel@ximian.com>
27407 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
27408 classes that are a punctuation character in .NET is not the same a
27411 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
27413 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
27415 2003-07-29 Miguel de Icaza <miguel@ximian.com>
27417 * icall.c: Add new MemCopy internalcall.
27418 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
27419 Simplified code; It is not necessary to handle all the cases here,
27420 as the C# code takes care of it. Only handle the case of the name
27421 resource embedded into the assembly.
27423 Changed signature to return the data pointer and the size of the
27426 2003-07-26 Miguel de Icaza <miguel@ximian.com>
27428 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
27429 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
27431 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
27433 * socket-io.c: ignore EINTR error in select.
27435 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
27437 * class.h, class.c: removed unused subclasses field in MonoClass.
27439 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
27441 * icall.c: improve fix of get_base_definition(). If the parent class
27442 doesn't have the mehod, look at the parent of the parent.
27443 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
27444 to check if a parameter is an in or out parameter
27445 (PARAM_ATTRIBUTE_IN is not set by default).
27446 mono_method_return_message_restore(): Use mono_class_value_size to
27447 get the size of a value type. mono_type_stack_size (parameterType)
27448 does not return the correct value if parameterType is byRef.
27449 mono_load_remote_field(), mono_load_remote_field_new(),
27450 mono_store_remote_field(), mono_store_remote_field_new():
27451 raise exception if the remote call returns an exception.
27453 2003-07-28 Martin Baulig <martin@ximian.com>
27455 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
27456 method. This is a wrapper around mono_runtime_invoke() which
27457 boxes the instance object if neccessary.
27459 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27461 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
27462 metadata.h, row-indexes.h, verify.c: first cut of generics support.
27464 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27466 * icall.c: disable mcs bug workaround.
27468 2003-07-21 Miguel de Icaza <miguel@ximian.com>
27470 * object.c (mono_runtime_class_init): Take the metadata_section
27471 mutex before obtaining the domain mutex.
27473 * appdomain.h: Added definition of metadata_section mutex here.
27475 * object.c: define metadata_mutex here.
27477 2003-07-24 Ravi Pratap <ravi@ximian.com>
27479 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
27482 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
27484 * reflection.c: Fix bug #46669
27486 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27491 * object.h: fill in the type name for TypeLoadException.
27493 2003-07-23 Ravi Pratap <ravi@ximian.com>
27495 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
27496 relationship between TypeBuilders while compiling corlib) and bug
27497 45993 (Array types returned from the runtime while compiling
27498 corlib were from the loaded corlib).
27500 2003-07-22 Martin Baulig <martin@ximian.com>
27502 * mono-debug-debugger.c: Reworked the type support a bit more;
27503 distinguish between types and classes.
27505 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
27507 * icall.c: add IsArrayImpl icall.
27509 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
27511 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
27512 initializing real_size only once. Also fix bug #46602.
27514 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
27516 * object.c: Renamed mono_metadata_section to metadata_section.
27518 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
27520 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
27521 empty array if the type is an array. Fixed.
27522 ves_icall_MonoMethod_get_base_definition: if the base method
27523 is abstract, get the MethodInfo from the list of methods of
27525 * reflection.c: ParameterInfo.PositionImpl should be zero-based
27526 and it was 1-based. Fixed in mono_param_get_objects.
27528 2003-07-20 Martin Baulig <martin@ximian.com>
27530 * mono-debug.h: Set version number to 31.
27531 (mono_debug_init): Added `MonoDomain *' argument.
27533 * mono-debug-debugger.c: Reworked the type support; explicitly
27534 tell the debugger about builtin types; pass the `klass' address to
27537 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
27539 * image.c: Allow new metadata tables to be loaded without a
27540 warning. Also update the warning message to give the new constant value.
27542 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
27544 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
27545 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
27546 array type representation changes.
27548 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
27550 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
27551 on Environment.Exit () call.
27553 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
27555 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
27556 requires a matching corlib.
27558 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
27560 * Changelog: My editor decided to add a CR to each line. Sorry about that.
27561 Committed again without the CRs.
27563 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
27565 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
27566 getting it from the "this" socket instance. Did not work
27567 if the socket is a subclass of Socket.
27568 Also fixed bug #35371.
27570 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
27572 * metadata.c: fixed size for TypedByRef.
27573 * loader.c: when searching for a method, consider the vararg amrker.
27574 * unicode.c, decimal.c: constify some arrays.
27576 2003-07-15 Dick Porter <dick@ximian.com>
27578 * socket-io.c: Fixed compilation for gcc < 3.2.
27580 Fixed compilation for machines that don't have AF_INET6 (thanks to
27581 Bernie Solomon <bernard@ugsolutions.com> for that part.)
27583 Fixed compile warnings.
27585 Fixed formatting and line endings.
27587 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
27590 * socket-io.c: Added IPv6 support.
27592 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
27594 * class.c (mono_class_is_assignable_from): New function to implement
27595 the is_assignable_from logic. Used by mono_object_isinst,
27596 Type::IsAssignableFrom () and the interpreter.
27598 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
27599 Object, even interfaces.
27601 * object.c (mono_object_isinst): Implement in terms of
27602 is_assignable_from.
27604 * icall.c (ves_icall_type_is_assignable_from): New icall.
27606 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
27608 * domain.c (foreach_domain): fix compiler warning.
27610 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
27612 * image.c (load_metadata_ptrs): use g_strndup because strndup is
27613 not available on all plattforms
27615 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
27617 * image.h image.c: Store the metadata version string in MonoImage.
27618 * icall.c: New icall to retrieve the image version.
27619 * reflection.c (create_dynamic_image): Fill in the image version field
27620 * reflection.c (build_compressed_metadata): Use the image version
27621 from the image structure.
27623 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27625 * appdomain.c: modified comment.
27626 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
27627 That will be its last iteration when mono_gc_cleanup is called from
27628 mono_runtime_cleanup and before the domain is unloaded.
27632 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
27634 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
27637 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27639 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
27640 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
27641 Bernie Solomon <bernard@ugsolutions.com>.
27643 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
27645 * object.c, object.h: provide mono_object_new_fast() for faster
27646 allocation in some special cases.
27648 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
27650 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
27651 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
27653 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
27655 * threadpool.c: fix leaks.
27657 2003-07-01 Dick Porter <dick@ximian.com>
27659 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
27660 using MonoGHashTables. Fixes threadpool bug posted to list.
27662 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27664 * image.h, image.c: added support to load an assembly from a byte array.
27665 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
27666 assembly bundle support.
27668 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
27670 * threadpool.c (mono_thread_pool_add): keep a reference to the
27671 AsyncResult to prevent GC
27673 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
27675 * class.c: leak fix.
27677 2003-06-25 Dick Porter <dick@ximian.com>
27679 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
27680 for the async object, the WaitHandle object will close the handle.
27683 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
27685 * class.c: in mono_array_class_get (), lookup from the hash with the
27686 same type we insert: this works around a bug in
27687 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
27688 lluis. The real fix will have to wait for after the release.
27690 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
27692 * icall.c: fix memory leak when getting type members.
27694 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
27696 * reflection.c: added more pubtoken special cases.
27698 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
27700 * class.c: handle field offset correctly when class size
27701 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
27703 2003-06-20 Martin Baulig <martin@ximian.com>
27705 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
27708 2003-06-20 Martin Baulig <martin@ximian.com>
27710 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
27712 2003-06-20 Martin Baulig <martin@ximian.com>
27714 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
27715 just distinguish between variables in registers and variables at
27716 an offset relative to a register.
27718 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27720 * icall.c: #ifdef out latest changes until mcs is fixed.
27722 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27724 * icall.c: return members in metadata order.
27726 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
27728 * icall.c: avoid infinite loop in GetTimeZoneData.
27730 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
27732 * icall.c: added Marshal.Prelink/All icalls.
27734 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
27736 * object.c, object.h: fix warnings and do some overflow checking
27737 when creating arrays.
27739 2003-06-17 Dick Porter <dick@ximian.com>
27742 * file-io.c: File attributes need to be tweaked slightly when
27743 passed from the managed to the w32 world.
27745 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
27746 * profiler.h profiler-private.h profiler.c: Rework last patch
27747 based on suggestion by Paolo.
27749 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
27751 * profiler.h profiler-private.h profiler.c: Added infrastructure for
27752 instruction level coverage data collection.
27753 * profiler.h profiler.c (: Added new callback function which can be
27754 used by the profiler to limit which functions should have coverage
27756 * profiler.c (mono_profiler_load): Call g_module_build_path to
27757 generate the file name of the profiler library.
27759 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27761 * profiler.c, profiler.h, profiler-private.h: added basic block
27762 coverage profiling API.
27764 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
27766 * reflection.c (mono_reflection_create_runtime_class): Add support
27767 for events in dynamically generated code.
27769 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
27772 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
27774 * icall.c: when getting timezone info, return reasonable values if we
27775 can't get the actual data.
27777 2003-06-14 Dick Porter <dick@ximian.com>
27779 * threads.c (start_wrapper): Remove the reference to the thread
27780 object in the TLS data, so the thread object can be finalized.
27781 This won't be reached if the thread threw an uncaught exception,
27782 so those thread handles will stay referenced :-( (This is due to
27783 missing support for scanning thread-specific data in the Boehm GC
27784 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
27786 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
27788 * reflection.c: ensure streams and tables are first allocated with
27789 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
27791 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27793 * icall.c: fixed GetElementType for byrefs (bug# 44792).
27795 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
27797 * reflection.c (mono_reflection_create_runtime_class): Add support for
27798 properties to dynamically created classes.
27799 * reflection.c: Fix a few places where non-MonoObjects were inserted
27800 into the tokens hashtable.
27802 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
27804 * object.c: some support to handle out of memory exceptions.
27806 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
27808 * marshal.c (mono_marshal_get_native_wrapper): support reference
27811 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
27813 * object.h, object.c: more portability stuff from Bernie Solomon.
27814 Unexport mono_object_allocate(). Added mono_object_unbox ().
27815 Set exitcode when an unhandled exception is thrown.
27817 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
27819 * marshal.c (mono_marshal_get_native_wrapper): use custom
27820 marshaler for return types.
27822 2003-06-10 Dick Porter <dick@ximian.com>
27824 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
27825 ip_mreq is available
27827 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
27829 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
27830 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
27831 by Bernie Solomon <bernard@ugsolutions.com>.
27833 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
27835 * gc.c (mono_gc_init): Avoid error message on shutdown when
27836 GC_DONT_GC=1 is used.
27838 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
27839 New icall to return the GUID of a module.
27841 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
27843 * class.c: ensure instance size always includes the parent's size
27844 even whem class size is set explicitly (fixes bug#44294).
27846 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
27848 * profiler.h, profiler.c: made the simple profiler thread-safe,
27849 get more accurate timing info. Allow the loading of an
27850 externally-developed profiler module.
27852 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
27854 * marshal.c (mono_marshal_get_native_wrapper): improved
27855 class/byref arguments.
27856 (mono_marshal_get_native_wrapper): better string marshaling support.
27858 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
27860 * class.c: ensure .pack and .size are handled correctly and
27861 simplified layout of static fields.
27863 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
27866 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
27868 * loader.c (mono_lookup_pinvoke_call): look for modules in the
27869 current directory (fix bug 44008)
27871 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
27873 * marshal.c (mono_marshal_get_native_wrapper): started support for
27875 (mono_delegate_to_ftnptr): consider marshalling specifications
27877 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
27879 * reflection.c, reflection.h: emit custom marshal info.
27881 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27883 * object.c: free the GError.
27884 * icall.c: added CloseEvent_internal.
27886 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
27889 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
27891 * loader.c (mono_method_get_signature): Add support for dynamic
27894 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
27896 * reflection.c: fixed bug #43905.
27898 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
27900 * class.c, domain.c, icall.c, metadata.h, object.h: support for
27901 handling TypedReference and ArgIterator.
27902 * loader.c, loader.h: added function to get signature at call site.
27904 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
27906 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
27907 data readonly. Buglets and warning fixes. Some MethodSpec support.
27909 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
27911 * class.h, class.c, object.c: remove relative numbering support.
27913 2003-05-26 Miguel de Icaza <miguel@ximian.com>
27915 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
27916 free the string, until we get a chance to fix Gtk#
27918 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27920 * marshal.c: revert last patch.
27922 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
27924 * icall.c: updates for new mono_class_vtable() not calling
27925 the type constructor anymore.
27927 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
27929 * object.h, object.c: separate vtable creation from type
27930 initialization. Make running the .cctor thread safe.
27932 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
27934 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
27936 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
27938 * loader.c (mono_get_method): consider calling convention
27940 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
27942 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
27943 to return the invisible global type for a module.
27945 * reflection.c (mono_image_build_metadata): Emit global fields too.
27947 2003-05-20 Peter Williams <peterw@ximian.com>
27949 * loader.c (mono_lookup_internal_call): Add a few newlines.
27951 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
27953 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
27956 * appdomain.c (set_domain_search_path): Recalculate search path when
27957 AppDomainSetup.PrivateBinPath changes.
27959 * object.c (mono_class_compute_gc_descriptor): It turns out some
27960 parts of the class libs (like System.Thread) holds pointers to
27961 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
27962 to treat native int a pointer type here.
27964 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
27966 * appdomain.h, domain.c: add hashtable for jump target resolution.
27968 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
27970 * reflection.h reflection.c icall.c: Added new icalls
27971 GetManifestResourceInfoInternal, GetModulesInternal and support
27974 2003-05-16 Dick Porter <dick@ximian.com>
27978 * file-io.c: Implement System.IO.MonoIO::GetTempPath
27980 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
27982 * object.c: mono_store_remote_field: little fix to previous patch.
27984 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27986 * class.c: add constructors to array classes.
27987 * icall.c: special case array construction for InternalInvoke (),
27989 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
27991 * class.h class.c reflection.c object.c: Added support for field
27992 defaults in dynamically generated classes.
27994 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
27996 * reflection.c: properly encode charset for ddlimport.
27998 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
28000 * threads.c: allow compiling without GC.
28002 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28004 * appdomain.h, object.c, object.h, threads.c, threads.h: added
28005 handling of thread static data.
28007 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28009 * reflection.h, reflection.c: added mono_custom_attrs_free ().
28011 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
28013 * class.c (mono_array_class_get): always set the serializable flags
28014 (mono_array_class_get): always set the SEALED attribute for array types
28016 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
28018 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
28019 attributes (fix for bug 42021).
28021 2003-05-12 Dick Porter <dick@ximian.com>
28023 * gc.c: Don't run finalizers when the finalizer thread is
28024 finishing up, because the default domain has already been
28027 2003-05-11 Miguel de Icaza <miguel@ximian.com>
28029 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
28030 value is null, we should throw an exception. This is slightly
28031 different than the other conventions used for the constructor.
28033 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28035 * socket-io.c: fixed windows build.
28037 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28039 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
28041 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
28043 * object.c (mono_string_new_wrapper): Compatibility fix for MS
28046 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
28048 * class.c (mono_class_layout_fields): Add experimental GC aware
28049 auto layout facility. Requires class library changes to work correctly.
28051 (mono_class_setup_vtable): Avoid overriding explicit interface
28052 method implementations. Fixes iface3.exe test.
28054 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
28056 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
28057 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
28059 * metadata.h: Add new type classification macro which determines
28060 whenever the type holds an object reference.
28062 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
28064 * marshal.c (mono_marshal_get_native_wrapper): cleanups
28066 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
28068 * gc.c (finalizer_thread): Work around a GC bug.
28070 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
28072 * marshal.c (emit_struct_conv): allow unions
28074 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
28076 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
28078 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
28080 2003-05-06 Martin Baulig <martin@ximian.com>
28082 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
28084 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28087 (Select_internal): allow NULLs, don't create arrays if not needed.
28088 Coupled with Socket.cs changes.
28091 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
28092 register a finalizer for it that will close the semaphore handle. This
28093 fixes the leak and make Lupus' test run with > 4080 loops.
28095 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
28097 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
28098 Jerome Laban (bug #42287)
28100 2003-05-02 Martin Baulig <martin@ximian.com>
28102 * debug-mono-symfile.h
28103 (MonoSymbolFile): Moved declaration into mono-debug.h.
28104 (MonoDebugMethodJitInfo): Likewise.
28105 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
28107 (_mono_debug_address_from_il_offset): Take a
28108 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
28111 (MonoDebugDomainData): New struct.
28112 (mono_debug_get_domain_data): New function.
28113 (mono_debug_add_method): Take an additional `MonoDomain *'
28115 (mono_debug_source_location_from_address): Likewise.
28116 (mono_debug_il_offset_from_address): Likewise.
28117 (mono_debug_address_from_il_offset): Likewise.
28119 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
28121 * reflection.c: one more check for null type in custom attrs.
28123 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28125 * reflection.c: avoid warning (comparison is always false due to limited
28126 range of data type).
28128 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28130 * icall.c: throw an exception in Type.GetField if the argument 'name'
28133 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
28135 * reflection.c: fixed handling of enums in named arguments to custom
28136 attributes (bug #42123).
28138 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
28140 * reflection.c: use the right array element type and handle
28141 a null for a Type argument, too.
28143 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
28145 * reflection.c: handle arrays as arguments to custom attributes.
28147 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
28149 * reflection.c: handle a string value in a custom attr
28150 ctor that takes an object.
28152 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
28154 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
28157 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
28159 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
28161 2003-04-27 Martin Baulig <martin@ximian.com>
28163 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
28164 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
28165 MONO_DEBUGGER_EVENT_BREAKPOINT.
28166 (mono_breakpoint_trampoline_code): Removed.
28167 (mono_debugger_event_handler): The last argument is now a
28169 (mono_debugger_insert_breakpoint_full): Removed the
28170 `use_trampoline' argument.
28171 (mono_debugger_method_has_breakpoint): Likewise.
28172 (mono_debugger_trampoline_breakpoint_callback): Renamed to
28173 mono_debugger_breakpoint_callback(); take the method and
28174 breakpoint number as arguments.
28176 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
28178 * metadata.c: fix off by one when loading parameters attributes.
28180 2003-04-24 Martin Baulig <martin@ximian.com>
28182 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
28184 2003-04-24 Martin Baulig <martin@ximian.com>
28186 * mono-debug-debugger.c: Moved all code which interacts with the
28187 Mono Debugger here.
28189 * debug-mono-symfile.c: This code now just deals with the symbol
28190 file itself, the debugger code is now in mono-debug-debugger.c.
28192 2003-04-23 Martin Baulig <martin@ximian.com>
28194 * mono-debug.c (mono_debug_source_location_from_il_offset):
28195 New method; like mono_debug_source_location_from_address(), but
28196 takes an IL offset instead of a machine address.
28198 2003-04-23 Martin Baulig <martin@ximian.com>
28200 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
28201 `line' field; this is now computed by the debugger.
28203 2003-04-23 Martin Baulig <martin@ximian.com>
28205 * mono-debug.[ch]: New files. This is the new debugging interface.
28207 * mono-debug-debugger.[ch]: New files. Moved all code which
28208 interacts with the Mono Debugger here.
28210 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
28212 * domain.c (mono_init): initialize mono_defaults.monitor_class
28214 2003-04-21 Miguel de Icaza <miguel@ximian.com>
28216 * reflection.c (method_encode_code): Add a spicy exception to help
28217 future compiler authors.
28219 2003-04-21 Martin Baulig <martin@ximian.com>
28222 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
28223 Make this work with relative pathnames; g_filename_to_uri() needs
28224 an absolute filename.
28226 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
28228 * icall.c: Track name changes in Object and ValueType.
28230 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
28232 * metadata.c (mono_type_stack_size): size should be a multiple of
28235 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28238 (internal_domain_finalize): moved into mono_domain_finalize. No need
28239 to create another thread because the finalizers will be run in the
28242 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
28243 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
28244 to be run (MS does this too).
28246 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
28248 * object.c (mono_class_compute_gc_descriptor): Update comment.
28250 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
28252 * image.h: Add synchronized wrapper cache.
28254 * image.c (do_mono_image_open): Initialize cache.
28256 * reflection.c (create_dynamic_mono_image): Initialize cache.
28258 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28260 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
28261 ves_icall_System_Buffer_ByteLengthInternal.
28263 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28265 * reflection.c: setup klass->nested_in earlier. Allow
28266 a dash in the assembly name.
28268 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
28270 * metadata.c (mono_type_to_unmanaged): dont access
28271 type->data.klass for MONO_TYPE_OBJECT
28272 (mono_type_to_unmanaged): consider System.Delegate class
28274 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
28276 * class.c: just setup supertypes in the proper place instead of
28277 initializing the full element class for arrays.
28279 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
28281 * class.c: ensure the element class of arrays is initialized.
28282 Setup the supertype info for array classes, too.
28284 2003-04-14 Miguel de Icaza <miguel@ximian.com>
28286 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
28288 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28290 * Makefile.am: re-added -m option when running cygpath. This way,
28291 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
28293 * mono-config.c: same codepath for locating mono config file for WIN32
28295 * assembly.c: if mono_assembly_setrootdir is called, don't override
28298 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28300 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
28301 MONO_ASSEMBLIES variable.
28303 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
28305 * icall.c: added Assembly::GetNamespaces() icall.
28307 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28309 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
28311 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
28313 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
28314 * object.c: fixed bug in the construction of vtable for proxies
28316 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
28318 * object.c (mono_array_new): Mark mono_array_new as an icall.
28320 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28322 * class.c: fixed test for public method when overriding interfaces.
28325 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28327 * appdomain.h, domain.c: added mono_domain_foreach() to
28328 be able to access the currently loaded appdomains.
28329 * object.c: make string interning work across sppdomains.
28330 Mark some functions for use as icalls.
28332 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
28334 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
28336 * reflection.h reflection.c: Allocate long living data using
28337 GC_MALLOC_ATOMIC so the collector does not need to scan it.
28339 * reflection.c: Double the allocation size in streams instead of
28340 increasing it, to prevent unneccesary copying on large assemblies.
28342 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
28343 creation if the assembly does not have the Run flag set.
28345 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
28347 * class.h: avoid the C++ keywords in header files (Jerome Laban
28348 spotted and fixed this).
28350 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28353 (mono_unhandled_exception): fill in the arguments for the
28354 UnhandledException event. Only trigger that event for the default
28355 domain (as MS does).
28357 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
28359 * object.c: Improve typed allocation stuff based on suggestions from
28360 Paolo. Also turn it on if the GC library supports it.
28362 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
28364 * object.c object.h class.h: Added experimental typed allocation
28365 facility using the interfaces in gc_gcj.h.
28367 * os/gc_wrapper.h: Added new include files.
28369 2003-04-03 Martin Baulig <martin@ximian.com>
28371 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
28372 which is not yet enabled by default.
28374 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
28376 (mono_gc_lock, mono_gc_unlock): New static functions.
28378 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
28379 functions; stop/start the world for the garbage collector. This
28380 is using the windows API; we need to complete the SuspendThread()/
28381 ResumeThread() implementation in the io-layer to make this work on Unix.
28382 (mono_gc_push_all_stacks): New public function; tells the garbage
28383 collector about the stack pointers from all managed threads.
28385 2003-04-03 Martin Baulig <martin@ximian.com>
28387 * object.h (MonoThread): Added `gpointer stack_ptr'.
28389 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
28391 2003-04-03 Martin Baulig <martin@ximian.com>
28393 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
28395 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
28397 * reflection.c (typebuilder_setup_fields): Initialize field.first and
28400 2003-04-02 Miguel de Icaza <miguel@ximian.com>
28402 * loader.c (mono_lookup_internal_call): Report the corlib that is
28405 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
28407 * icall.c (ves_icall_type_GetTypeCode): fixed check for
28408 System.DBNull (it's class not valuetype).
28410 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28412 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
28413 if the array method was already assigned a token (fixes bug#40646).
28415 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
28417 * reflection.c (mono_reflection_get_type): Attempt type resolve even
28418 if no assembly is given.
28420 2003-04-01 Miguel de Icaza <miguel@ximian.com>
28422 * metadata.h: Added the new tables.
28424 * row-indexes.h: Added definitions for new tables.
28426 * metadata.c: Add schemas for new tables, and add support for
28427 computing the sizes of them.
28429 * class.c: Update for handling the new type cases.
28431 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
28433 * metadata.h (MONO_TYPE_IS_VOID): new macro
28435 2003-03-31 Martin Baulig <martin@ximian.com>
28437 * threads.h (MonoThreadCallbacks): Added `thread_created'.
28439 * threads.c (mono_thread_new_init): Call `thread_created' in the
28440 mono_thread_callbacks.
28442 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
28444 * loader.h: added marshalbyrefobject_class to mono_defaults
28445 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
28446 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
28447 generation of output parameters.
28448 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
28449 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
28450 contextbound and the target object belongs to the context of the caller.
28451 * object.h: added context and unwrapped_server variables in MonoRealProxy.
28452 * object.c: Implemented support for interfaces and abstract classes
28453 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
28454 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
28456 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
28458 * class.h class.c (mono_class_is_subclass_of): New function.
28460 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
28461 routines for most common case (calls from ArrayList::ToArray).
28463 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
28464 routine so programs which call Environment::Exit() can be profiled.
28466 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
28467 Added MONO_ARCH_SAVE_REGS.
28469 * icall.c (ves_icall_type_is_subtype_of): Use new function.
28471 2003-03-29 Miguel de Icaza <miguel@ximian.com>
28473 * blob.h: Add a couple of new MonoType types definitions.
28475 * tabledefs.h: Add a couple of new call convs.
28477 2003-03-27 Zoltan Varga <vargaz@freemail.h>
28479 * reflection.h (MonoReflectionDynamicAssembly): track changes in
28480 the layout of the class.
28482 * reflection.c (alloc_table): double the size on overflow to avoid
28483 unnecessary copying.
28485 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
28486 avoid filling out metadata tables and blobs. Also set mb->ilgen to
28487 null so it can be garbage collected.
28489 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
28491 * reflection.c (mono_reflection_get_type): Return the resolved type
28492 only if it is in the assembly we searched.
28494 * reflection.c (ensure_runtime_vtable): Initialize method slots.
28496 * class.c (mono_class_setup_vtable): Set the slot of the overriding
28499 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28502 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
28503 the right one is 'file:///blah', but MS allows it.
28505 (mono_assembly_open): allow 'file://blah'
28507 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
28509 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
28511 * socket-io.c: fixes bug #40310.
28513 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
28515 * reflection.c (mono_reflection_parse_type): handle deeply nested
28518 * reflection.c (mono_image_create_token): Use unique token values
28519 since they will be put into a hash table.
28521 * class.c (mono_class_setup_vtable): If a method occurs in more than
28522 one place in the vtable, and it gets overriden, then change the
28523 other occurances too.
28525 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
28526 object as return type.
28528 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
28530 * icall.c: Deleted "ToString" implementation for double and float
28531 because they are full implemented in managed code.
28533 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
28535 * reflection.c, reflection.h: implemented and exported functions
28536 to retrieve info about custom attributes.
28538 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28540 * appdomain.c: moved Uri handling to assembly.c
28541 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
28542 work when using a file Uri in *nix and windows.
28544 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
28545 GetReferencedAssemblies.
28547 2003-03-18 Dick Porter <dick@ximian.com>
28549 * icall.c: Rename a couple of internal calls
28551 * threads.c: Set the thread state to Stopped when a thread exits.
28554 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
28556 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
28559 * object.c (mono_class_vtable): fix warning.
28561 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
28563 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
28565 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
28567 (method_encode_clauses): Create exception info structures in the right
28569 (mono_reflection_setup_internal_class): Initialize supertypes field.
28571 * class.c object.c: Handle interfaces which implement other interfaces
28574 * class.h class.c: Move the supertypes array initialization code into
28575 a separate function so it can be used for dynamic types too. Also call
28576 it earlier, in mono_class_init(), since it can be used before the
28577 type is initialized.
28579 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28583 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
28588 * object.c: remove warnings.
28590 2003-03-13 Martin Baulig <martin@ximian.com>
28592 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
28593 (MonoDebugLexicalBlockEntry): New types.
28595 * debug-mono-symfile.c
28596 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
28598 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28600 * process.c: ret can be any non-zero value accroding to MS doc.
28602 2003-03-07 Miguel de Icaza <miguel@ximian.com>
28604 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
28605 fixing a warning for a miss-used prototype, would have cause
28606 random memory corruption.
28608 2003-03-07 Martin Baulig <martin@ximian.com>
28610 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
28611 getting really annoying ....
28613 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
28615 * reflection.c (fixup_method): added support for array methods.
28617 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
28619 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
28620 (pointed out by Michael Adams).
28622 2003-03-04 Dick Porter <dick@ximian.com>
28624 * icall.c: Temporarily reverted the Double and Single ToString()
28625 change, because it broke nunit.
28627 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
28629 * object.h, threads.h: make include files compatible with C++
28630 (patch by Jerome Laban <jlaban@wanadoo.fr>).
28632 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
28634 * icall.c: Erased ToString helper functions for Double and Single.
28635 Now, that implementations ar all in managed code (Double and Single
28638 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
28640 * appdomain.c: Added method for initializing the default context of
28641 a domain. Added internal call for getting the default context.
28642 * appdomain.h: Added context variable in MonoDomain struct.
28643 * domain.c: mono_domain_set also sets the default context of the domain
28644 * icall.c: Mapped internal method InternalGetDefaultContext.
28645 * object.c: mono_object_get_virtual_method returns always a remoting
28646 wrapper if the object is a transparent proxy.
28647 mono_runtime_invoke_array: when creating an object by calling the
28648 constructor, if the created object is a proxy, then the constructor should
28649 be called using the a remoting wrapper.
28651 2003-03-03 Dick Porter <dick@ximian.com>
28653 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
28654 variable so it compiles on solaris. Problem spotted by
28655 Christopher Taylor <ct@cs.clemson.edu>
28657 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28660 (get_info_from_assembly_name): don't leak value.
28663 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
28666 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
28668 * assembly.c: export mono_image_load_references ().
28669 * class.c: handle function pointers. mono_class_from_name() now
28670 supports nested type names directly.
28672 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
28674 * reflection.h reflection.c: Encode already created dynamic methods
28675 and fields correctly as a DEF instead of a REF.
28677 * reflection.c: Get rid of the force_ref argument to
28678 mono_image_typedef_or_ref since it was wrong in the first place.
28680 * string-icalls.c: add error checking to string constructors according
28683 * reflection.c: Emit types in the order their TypeBuilders were
28684 created. Previously, a new table index was assigned to each type before
28685 the tables were emitted. This was wrong because the signature blob
28686 might already refer to a type by its original table index.
28688 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
28690 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
28693 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28695 * Makefile.am: make assemblies dir have \ instead of / on windows.
28697 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
28699 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
28700 iterate over the NESTEDCLASS table using a linear search since the
28701 table is not guaranteed to be sorted by the secondary key.
28703 * class.c (mono_class_create_from_typedef): fixed up call to
28704 mono_metadata_nesting_typedef.
28706 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
28708 * marshal.c (mono_string_to_byvalstr): clear the memory as
28709 suggested by Jerome Laban <jlaban@wanadoo.fr>
28711 2003-02-26 Dick Porter <dick@ximian.com>
28713 * process.c: Cope with padding in .rsrc blocks
28715 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
28717 * metadata.h: reverted the filter_len change, it breaks reflection
28719 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
28721 * metadata.h: added a new field to store the filter_len
28724 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
28726 * reflection.c: handle custom attributes for types and members
28727 created with Reflection.Emit (bug#38422).
28729 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
28731 * reflection.c: define RTSpecialName automatically for constructors for
28732 compatibility with MS.NET.
28734 * reflection.c (mono_reflection_create_runtime_class): initialize
28735 nested_in field of dynamically created classes.
28737 2003-02-22 Martin Baulig <martin@ximian.com>
28739 * debug-mono-symfile.h: Incremented version number.
28741 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
28743 * object.h icall.c process.c: fix warnings.
28745 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
28747 * appdomain.h appdomain.c:
28748 (mono_domain_try_type_resolve): split the
28749 name_or_tb argument into a name and a tb argument.
28750 (mono_domain_has_type_resolve): new function to check whenever the
28751 application has registered a TypeResolve event handler.
28753 * icall.c reflection.h reflection.c: move the type resolve logic into
28754 mono_reflection_get_type () so it will be invoked when
28755 Assembly::GetType () is called.
28758 (mono_reflection_get_type): renamed to get_type_internal.
28759 (mono_reflection_get_type): fixed type name generation so it works
28760 for nested types too.
28761 (mono_reflection_get_type): call has_type_resolve () to avoid the
28762 costly type name generation if there is no resolve event handler.
28764 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
28766 * class.c, image.c: load exported types from file references.
28768 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
28770 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
28771 used to cache the managed methods used to create proxies and make
28772 remote invocation of methods.
28773 * class.h: Added in MonoVTable a flag to indicate that a class needs
28774 to be remotely created.
28775 * object.c: Modified the method mono_class_vtable(). It now initializes
28776 the remote flag of the vtable. Modified mono_object_new_specific(),
28777 so now it checks the remote flag.
28778 * icall.c: Added a couple of internal methods, one for enabling instance
28779 creation interception for a type, and one for creating objects bypassing
28782 2003-02-18 Martin Baulig <martin@ximian.com>
28784 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
28785 New interncall to get a method's metadata token.
28787 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
28788 New interncall for the debugger.
28790 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
28792 * class.c (mono_class_setup_vtable): allocate supertype array
28794 2003-02-18 Martin Baulig <martin@ximian.com>
28796 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
28798 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28801 (assembly_name_to_aname): jump over unknown properties (i've found
28802 something like: 'type, assembly, version=xxx, custom=null, public...',
28803 so now will ignore custom=null and still get the rest of the values).
28805 2003-02-17 Dick Porter <dick@ximian.com>
28807 * threads.c: Have Thread.Start() wait for a semaphore to signal
28808 that the thread has set up all its local data. This fixes bug
28809 34323, where Abort() raced the new thread's TLS data.
28811 Also removes the handle_store() call from start_wrapper, because
28812 threads are now always created suspended and there is no longer a
28813 race between the parent and child threads to store the info.
28815 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
28817 * image.c: explain the #- heap issue in a message, hopefully
28818 avoiding FAQs on mono-list.
28820 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28823 (GetEntryAssembly): if the domain has not invoked
28824 AppDomain.ExecuteAssembly yet, return the assembly of the default
28827 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
28829 * class.c (mono_ldtoken): make it work in dynamic assemblies.
28831 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
28833 * metadata.c, reflection.c: simple speedup to type hash
28836 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
28838 * image.c, image.h, class.c, assembly.c: move module loading
28839 to MonoImage. When loading metadata, consider alignemnet from
28840 the start of metadata, not from the metadata address in memory.
28842 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
28844 * reflection.c (mono_reflection_get_custom_attrs): Added support for
28845 AssemblyBuilder objects. Factored out custom attribute creation into
28846 a separate function.
28847 (create_custom_attr): new function to create custom attributes.
28849 2003-02-12 Miguel de Icaza <miguel@ximian.com>
28851 * Makefile.am: Got tired of typing the full pathname to pedump.
28852 Until there is another option, am installing this.
28854 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
28856 * class.c (class_compute_field_layout): always set field->parent
28857 (mono_ldtoken): use mono_defaults.fieldhandle_class;
28859 2003-02-11 Dick Porter <dick@ximian.com>
28862 * monitor.c: Rewrote Monitor, making lock much faster and
28863 Pulse/Wait work as specified. Also uses much fewer handles, and only
28864 creates them as needed.
28866 * exception.c: Added SynchronizationLockException
28868 * threads.c: Deleted old Monitor implementation. The new one is
28871 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
28873 * class.c: handled TypedReference type code. Set the correct size for
28874 class data. Setup interface_offsets for interface classes, too.
28876 2003-02-09 Martin Baulig <martin@ximian.com>
28878 * debug-mono-symfile.h: Reflect latest symbol writer changes.
28880 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
28882 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
28883 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
28884 * object.c: fixed mono_object_get_virtual_method () for interfaces.
28885 * verify.c: check for code that runs after the end of the method.
28887 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
28889 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
28890 "System.Math::Round2".
28891 * sysmath.h: Added Floor, Round and Round2 definitions.
28892 * sysmath.c: Modified certain functions that were not 100% compliant
28893 with MS.NET (math precision) and added the implementation of Floor,
28896 2003-02-07 Martin Baulig <martin@ximian.com>
28898 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
28900 2003-02-07 Martin Baulig <martin@ximian.com>
28902 * debug-mono-symfile.c: Reflected latest symwriter changes.
28903 (mono_debug_create_mono_symbol_file): Removed.
28904 (mono_debug_open_mono_symbol_file): Take an argument which
28905 specifies whether to create a dynamic symbol file.
28907 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
28909 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
28911 2003-02-05 Martin Baulig <martin@ximian.com>
28913 * reflection.c (mono_image_build_metadata): Make this public,
28914 protect it against being called multiple times, don't create
28915 resources and don't build the compressed metadata here.
28916 (mono_image_create_pefile): Do this here.
28919 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
28921 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28923 * socket-io.c: fixed bug #36322.
28925 2003-02-06 Piers Haken <piersh@friskit.com>
28929 * debug-mono-symfile.c:
28935 * socket-io.c: warning cleanups
28937 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
28939 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
28940 function. works like remoting invoke, but does a check for the Proxy first.
28942 2003-02-05 Miguel de Icaza <miguel@ximian.com>
28944 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
28946 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
28948 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
28950 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
28951 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
28953 * object.c (mono_store_remote_field_new): used by the new jit
28954 instead of mono_store_remote_field
28955 (mono_load_remote_field_new): used by the new jit
28956 instead of mono_load_remote_field
28958 2003-02-05 Patrik Torstensson
28960 * appdomain.c: changed unload to take the domain id instead
28963 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
28966 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28968 * appdomain.c: don't look for assemblies in ApplicationBase if
28969 PrivateBinPathProbe is set.
28971 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28973 * object.c: make the first argument in main_args contain the absolute
28974 path to the assembly. Fixes bug #37511.
28976 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28978 * icall.c: get correct UTC offset for countries not using daylight
28979 time saving. Fixes bug #30030.
28981 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28983 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
28984 and 1 are the family).
28986 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
28988 * icall.c (ves_icall_InternalExecute): removed wrong assertion
28990 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
28992 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
28994 * reflection.c: added support for SignatureHelper tokens, which is
28995 needed by the Calli opcode.
28997 * reflection.h: track changes to SignatureHelper class.
28999 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
29001 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29003 * appdomain.c: fixed loading assemblies from PrivateBinPath.
29005 2003-02-03 Patrik Torstensson
29006 * appdomain.[c|h], domain.c :
29007 - Added support for getting a domain via domain id
29008 - Support for setting and getting domain from System.AppDomain
29009 (used in cross appdomain channel)
29010 - Added support for get/set for a MonoAppContext on a thread
29011 (Context class in System.Runtime.Remoting.Contexts),
29012 - Removed hack in Get/SetData and ExecuteAssembly.
29014 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
29015 the managed world to get control when a proxy is created.
29017 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
29019 2003-02-03 Miguel de Icaza <miguel@ximian.com>
29022 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29023 Populate the codebase field as well.
29025 2003-02-02 Martin Baulig <martin@ximian.com>
29027 * debug-mono-symfile.c
29028 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
29029 (mono_debug_symfile_add_method): Allow interncalls.
29031 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29033 * icall.c: throw parse exception if strtod fails or the string is empty.
29035 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
29037 * marshal.c: handle object type separately from defined
29040 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
29042 * marshal.c: handle NATIVE_LPSTR for strings when it's
29043 explicitly specified.
29045 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
29047 * reflection.c, reflection.h, icall.c: setup the reflection
29048 handle cache for ModuleBuilders and AssemblyBuilders.
29050 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
29052 * reflection.c (reflection_methodbuilder_to_mono_method): set
29055 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29057 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
29059 2003-01-29 Dick Porter <dick@ximian.com>
29061 * threads.c: No need for the fake_thread kludge now that Thread
29062 doesn't run a class constructor
29064 2003-01-29 Dick Porter <dick@ximian.com>
29066 * threads.c: Use g_direct_hash instead of the rather bogus
29069 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
29071 * marshal.c (mono_marshal_get_native_wrapper): add check for null
29072 (fix pinvoke12.exe)
29073 (mono_marshal_get_struct_to_ptr): generate valid IL code
29074 (mono_marshal_get_ptr_to_struct): generate valid IL code
29075 (*): correctly set sig->pinvoke, we need to memdup the signature
29078 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29080 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
29081 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
29083 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29085 * profiler.c: provide more callers information.
29087 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
29089 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
29091 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
29093 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
29095 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29097 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
29098 exception instead of going into an infinite loop on dates which it
29101 * string-icalls.c (ves_icall_System_String_get_Chars): raise
29102 out-of-range exception if needed.
29104 * class.c (mono_class_setup_vtable): allow a virtual method to provide
29105 an implementation for an interface method and to override an inherited
29106 method at the same time.
29107 Imagine a scenario when a virtual method is used to override a
29108 virtual abstract method in a parent class, and this same method
29109 provides an implementation for an method inherited from an interface.
29110 In this case, the interface resolution code will set im->slot, which
29111 means that the virtual method override pass will skip this method
29112 which means a pointer to the abstract method inherited from the parent
29113 will remain in the vtable of this non-abstract class.
29115 * class.c: (mono_class_setup_vtable): continue search for a real
29116 method if only an abstract method is found.
29118 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29120 * reflection.c: add size to encoding for ByValStr and ByValArray
29121 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
29123 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29125 * class.c (mono_class_setup_vtable): pass the override info as an
29128 * class.c (mono_class_setup_vtable): set the slot of overriding methods
29131 * reflection.c (ensure_runtime_vtable); add support for method
29134 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29136 * reflection.c (resolution_scope_from_image): Hack to work to work with
29137 dynamic assemblies.
29139 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
29140 added a 'force_ref' argument to force this function to allways return
29141 a TypeRef. This is needed by mono_image_get_memberref_token ().
29143 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29145 * reflection.c (mono_image_get_type_info): interfaces really don't have
29148 * reflection.c (mono_image_basic_init): fill out missing fields of
29151 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
29152 dynamic assemblies. This is required so dynamic assemblies show up in
29153 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
29154 Type::GetType() etc. This is consistent with MS behaviour.
29156 * image.c image.h reflection.c: add newly created classes to the name
29157 cache so mono_class_get () will find them.
29159 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29161 First part of changes to get IKVM.NET running under mono.
29163 * appdomain.h, appdomain.c: added new function
29164 mono_domain_try_type_resolve() which will emit TypeResolve events.
29165 This function will call AppDomain::DoTypeResolve to do the actual work.
29167 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
29168 moved existing code dealing with dynamic tokens to a new function
29169 called mono_reflection_lookup_dynamic_token (). This function will
29170 raise TypeResolve events when appropriate. Since reflection.c is not
29171 part of libmetadata, a new hook function called
29172 mono_lookup_dynamic_token() is added to class.c which will call this.
29174 * assembly.h assembly.c: make the invoke_load_hook function public,
29175 so it can be called for dynamic assemblies.
29177 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
29179 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
29182 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
29183 MonoGHashTable, since it contains pointers to objects which the GC
29186 * assembly.c (search_loaded): remove unused variable.
29188 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
29190 * object.c: fixed issue exposed by gcc-generated IL programs
29191 that use RVA data for pointers.
29193 2003-01-25 Martin Baulig <martin@ximian.com>
29195 * threads.c (start_wrapper): Moved the initialization of
29196 `start_func' above the mono_new_thread_init() call to which we
29197 pass it as argument.
29199 2003-01-24 Martin Baulig <martin@ximian.com>
29201 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
29202 the MonoThread pointer.
29204 2003-01-21 Miguel de Icaza <miguel@ximian.com>
29206 * icall.c: Rename `PowImpl' to Pow.
29208 2003-01-23 Dick Porter <dick@ximian.com>
29210 * threads.c (start_wrapper): Create a Thread object if needed, so
29211 the Main() thread can do the class initialisation in a subthread
29212 that has been set up to allow managed code execution.
29214 Pass the thread ID instead of the MonoThread pointer to the thread
29215 start and attach callbacks. This change is required, because the
29216 jit thread start callback must be called _before_ the Thread
29217 object can be created.
29219 (mono_thread_init): Removed much object creation code that is no
29220 longer needed. No managed code is called from here now.
29222 * object.c (mono_runtime_exec_managed_code): Create a subthread
29223 for Main, and call back to the runtime to use it.
29224 Set the exit code when Main exits.
29226 * gc.c: Make sure domain finalisation happens in a subthread.
29227 Re-enable threaded GC, fixing bug 31333 (again).
29229 * environment.c: System.Environment internall calls (so far just
29230 ExitCode is here, the others are still in icall.c)
29232 * appdomain.c (mono_runtime_cleanup): All threads running managed
29233 code should have finished before mono_runtime_cleanup() is
29234 reached, so no need to clean up threads.
29236 2003-01-22 Martin Baulig <martin@ximian.com>
29238 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
29239 `gpointer func' arguments.
29240 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
29241 but added `MonoThread *thread' argument.
29242 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
29244 * threads.c (mono_new_thread_init): Added `gpointer func' argument
29245 and pass it to the mono_thread_start_cb callback.
29246 (mono_install_thread_callbacks): New public function to install a
29247 set of callbacks which are set by the debugger.
29248 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
29250 2003-01-22 Martin Baulig <martin@ximian.com>
29252 * Makefile.am: Install debug-mono-symfile.h.
29254 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
29256 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
29258 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
29260 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
29261 * class.c (mono_ptr_class_get): correctly set access levels of pointers
29262 (mono_array_class_get): correctly set access levels of arrays
29264 2003-01-20 Patrik Torstensson
29265 * image.h (MonoAssemblyName): changed major, minor, build, revision
29266 from signed to unsigned.
29268 2003-01-20 sean kasun <skasun@azstarnet.com>
29270 * reflection.c (load_cattr_value): Now this handles
29271 MONO_TYPE_SZARRAY. Fixes bug #35629
29273 2003-01-20 Miguel de Icaza <miguel@ximian.com>
29275 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
29278 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29280 * decimal.c: fixed bug #26056.
29282 2003-01-17 Martin Baulig <martin@ximian.com>
29284 * gc.c: Raise an ExecutionEngineException instead of using g_error().
29286 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29289 (mono_get_exception_type_initialization): new function.
29291 * object.c: throw a TypeInitializationException when an exception is
29292 thrown invoking the class constructor.
29294 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29296 * reflection.c: fixed attribute reading.
29298 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29301 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
29302 provided, look for the type in the calling assembly and then in
29303 mscorlib; if the assembly name is provided, only try that one.
29305 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
29307 * object.c: register the vtable before there is a chance it's
29308 queried again recursively.
29310 2003-01-13 Duncan Mak <duncan@ximian.com>
29312 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
29315 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
29317 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
29319 2003-01-11 Martin Baulig <martin@ximian.com>
29321 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
29322 this to 20 for the release.
29324 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
29326 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
29328 * loader.c (mono_method_get_marshal_info): bug fix
29330 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
29331 structures with explicit layout
29333 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
29335 * profiler.c: made the output more readable (and sorted).
29336 Added caller information for the allocation profiler.
29338 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
29340 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
29342 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29344 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
29345 to get value types.
29347 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
29349 * object.c, profiler.h, profiler.c, profiler-private.h:
29350 Added object allocation profiler.
29352 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
29354 * reflection.h, reflection.c: handle global methods.
29355 Compress blob entries.
29357 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
29359 * marshal.c: fix compilation.
29361 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
29363 * loader.c (mono_method_get_marshal_info): impl.
29365 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
29367 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29369 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
29370 for reference types.
29372 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
29374 * loader.c: fixed off by one error in loaded parameter names.
29376 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
29378 * marshal.c (mono_marshal_get_icall_wrapper): like
29379 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
29380 instead of a MonoMethod.
29382 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29384 * decimal.c: fixed bug #36537.
29386 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
29388 * marshal.c: throw a missing method exception if a
29389 P/Invoke method is not found.
29391 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
29393 * icall.c: allow a null this for constructors.
29395 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
29397 * icall.c: raise the proper exceptions if the arguments to the
29398 internal Invoke are incorrect.
29400 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
29402 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
29404 2003-01-03 Martin Baulig <martin@ximian.com>
29406 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
29408 2002-12-31 Martin Baulig <martin@ximian.com>
29410 * debug-mono-symfile.c: Completely rewrote the type section.
29411 Instead of using individual malloc()ed fields, we use one big
29412 continuous memory area and offsets into this area.
29413 See the comments in the source code for details.
29415 2002-12-30 Martin Baulig <martin@ximian.com>
29417 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
29419 2002-12-30 Martin Baulig <martin@ximian.com>
29421 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
29422 line number table in this data blob instead of using an external
29425 2002-12-28 Martin Baulig <martin@ximian.com>
29427 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
29429 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
29431 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
29432 as a boxed return type.
29434 2002-12-21 Miguel de Icaza <miguel@ximian.com>
29437 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
29438 g_build_filename to properly get separators on the filename created.
29440 * object.h: Small change, introduce MonoMarshalByRefObject to
29441 track the layout of that structure in the C# universe as we make
29444 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
29446 * object.c: removed assert to allow static fields on interfaces.
29447 * loader.c: a TypeSpec may be used for any type, not just arrays.
29449 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29451 * class.c, class.h: added mono_class_array_element_size ().
29452 Ignore static methods in interfaces.
29454 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29456 * threads.c: fixed the build under cygwin.
29458 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
29460 * reflection.c: handle nullref constants. Allocate keys for
29461 reflection handles with the GC.
29463 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29465 * threads.c, threads.h: added mono_thread_get_abort_signal()
29466 to get a suitable signal for thread abort.
29468 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29470 * metadata.c: fix handling of ExportedType table.
29472 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29474 * icall.c: added WriteWindowsDebugString internal call.
29476 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29478 * reflection.h: added fields to match C# implementation.
29480 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29482 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
29484 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
29486 * gc.h, gc-internal.h: Rename header for GC internal calls to
29487 gc-internal.h from gc.h as to not clash with Boehm GC having its
29488 header installed as <gc.h> in outside include paths.
29489 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
29490 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
29492 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29494 * icall.c: assign minor, build and revision in FillName.
29496 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
29498 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
29499 Added support for running code generated by Reflection.Emit.
29501 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29503 * appdomain.c: check for NULL argument in LoadFrom.
29505 2002-12-10 Dick Porter <dick@ximian.com>
29507 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
29509 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29511 * appdomain.c: fix buglet when building exe file name. Handle full
29512 assembly name (needed after latest changes to AssemblyName).
29514 (mono_image_close): free some hashtables.
29516 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
29518 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
29519 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
29520 on some systems (redhat 7.3)
29522 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
29524 * threads.c: delete the critical section of a sync block,
29525 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
29527 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
29529 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
29531 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29533 * appdomain.[ch]: handle the assembly preload event to try loading the
29534 assemblies using the paths we have in the current domain.
29536 * assembly.[ch]: created an assembly preload hook that is called to try
29537 loading the assembly by other means that the ones provided here.
29539 * domain.c: initialize the domain search path.
29541 From now on, assemblies (TODO: except corlib and System) are loaded
29542 according to these rules when using mono_assembly_load ():
29544 1. It tries to load the assembly from the ApplicationBase
29545 of the current domain appending .dll and .exe (TODO: have to
29546 try loading from name/name.dll and name/name.exe).
29548 2. It tries the search path specified in PrivateBinPath for the
29549 current domain (if any).
29551 3. Previous behavior.
29553 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
29555 * icall.c: implemented GetInterfaceMap() related icall.
29556 * domain.c, loader.h: load MethodInfo in mono_defaults.
29558 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
29560 * gc.c: disable the finalizer thread for now, untill all the issues
29561 with it are resolved.
29563 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29565 * string-icalls.c: handle embedded nulls in string ctor when the
29566 length is specified.
29568 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
29570 * class.c: look for explicit interface implementation in parent
29573 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
29575 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
29577 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
29579 * gc.c: protect handles with a critical section.
29581 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29584 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
29585 parameters. If no assembly specified, try getting the type from all
29586 the assemblies in the current domain, else, load the assembly and get
29589 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29591 * marshal.c: applied patch from Aleksey Demakov that fixes
29592 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
29594 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29596 * icall.c: fixed get_location.
29598 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
29600 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
29601 declarations to make it work with older gcc.
29603 * loader.c (mono_get_method): set signature->pinvoke for native calls
29605 2002-11-20 Dick Porter <dick@ximian.com>
29607 * threads.c (mono_thread_init): Set the main thread's handle
29609 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
29611 * gc.c: allow compilation without GC support. Changed to match the
29614 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29616 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
29618 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
29620 * reflection.c: set a public key token on the core assemblies.
29622 2002-11-18 Dick Porter <dick@ximian.com>
29624 * threads.c: Split out some thread initialisation so that other
29625 files can set the start callback function.
29627 * gc.c: Run finalisers in a separate thread, to avoid stack
29628 overflow. Fixes bug 31333.
29630 * appdomain.c: Set up GC finalisation thread.
29634 * domain.c: Use gc.h macros for GC_malloc
29636 2002-11-15 Dick Porter <dick@ximian.com>
29640 * appdomain.c: Removed mono_runtime_init_with_attach(),
29641 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
29642 merging the extra parameter with the existing function. Removed
29643 unneeded code in mono_thread_attach().
29645 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
29647 * image.c (mono_image_loaded_by_guid): a method to get loaded
29649 (load_metadata_ptrs): we store the guid as string.
29651 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
29653 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
29655 * metadata.c (mono_guid_to_string): imported method form Zoltan
29656 Varga (slightly modified)
29658 * assembly.c (mono_assembly_open): load precompiled code
29660 * loader.h (MonoMethod): we store the method token for use in the
29663 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29665 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
29666 the hook function called when an assembly is loaded.
29668 * domain.c: Modified file.
29669 (mono_domain_assembly_load): removed hash table insertion of assemblies.
29673 2002-11-07 Miguel de Icaza <miguel@ximian.com>
29675 * reflection.c: Map PEFileKind to the value expected by the WinNT
29678 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29680 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
29681 Read until the buffer is filled completely.
29683 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29685 * icall.c: implemented MonoType.InternalGetEvent ().
29687 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29689 * appdomain.c: implemented InitAppDomainSetup. Delayed
29690 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
29691 the entry_assembly.
29693 * assembly.c: base_dir is now an absolute path ending with
29696 * icall.c: modified get_location according to the above changes.
29698 * object.c: init AppDomain.SetupInformation for the default domain after
29699 we have the entry assembly.
29701 * domain.c: when unloading a domain, setup = NULL.
29703 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
29705 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
29707 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
29709 * object.h, object.c: introduced mono_object_get_virtual_method ()
29710 to lookup the method invoked on an object when a callvirt is done on
29712 * icall.c: make MethodInfo::Invoke() always do a virtual call.
29714 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29716 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
29717 current domain when loaded an assembly and failed to load it.
29719 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
29721 2002-10-31 Dick Porter <dick@ximian.com>
29725 * file-io.c: Return the error status in a parameter, as the
29726 GetLastError() value has long since been blown away if we try and
29727 look it up in a subsequent internal call invocation. Delete the
29728 GetLastError() internal call, because it's useless.
29730 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
29732 * class.[ch]: added cast_class to fix bug 29517
29734 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
29736 * marshal.c: create valid IL code in the filter clause:
29737 the new JIT is less forgiving:-)
29739 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29741 * icall.c: removed get_property internal call.
29743 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
29745 * appdomain.h domain.c: Added an ID to appdomains.
29747 * threads.c threads.h icall.c: Implement icall
29748 Thread:GetDomainID(), and remove unused icall
29749 CurrentThreadDomain_internal.
29751 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29753 * icall.c: Don't recurse through the base types in GetConstructor.
29756 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
29758 * mempool.h, mempool.c: added mono_mempool_empty() and
29759 mono_mempool_stats().
29761 2002-10-23 Dick Porter <dick@ximian.com>
29765 * icall.c: Added MonoIO.GetFileType internal call
29767 2002-10-17 Dick Porter <dick@ximian.com>
29769 * appdomain.c (mono_runtime_cleanup): Don't signal the async
29770 delegate semaphore before waiting for all threads to finish,
29771 because new threads can also call async delegates. Fixes bug
29774 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
29775 of 3 seconds, in case another async job is queued. (This part is
29776 needed because the bug fix reintroduced the 3s exit lag.) This
29777 makes the mono_runtime_shutdown flag superfluous.
29779 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
29781 * reflection.c: include ehader size in method section headers.
29782 Really check for suplicated modules entries.
29784 2002-10-17 Martin Baulig <martin@gnome.org>
29786 * debug-mono-symfile.c: Added back support for locals.
29788 2002-10-14 Martin Baulig <martin@gnome.org>
29790 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
29793 2002-10-14 Martin Baulig <martin@gnome.org>
29795 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
29796 mono_class_get() instead of looking in the class cache.
29798 2002-10-13 Martin Baulig <martin@gnome.org>
29800 * debug-mono-symfile.c: Set version number to 28, include the
29801 signature in method names.
29803 2002-10-13 Martin Baulig <martin@gnome.org>
29805 * debug-mono-symfile.h: Set version number to 27.
29807 2002-10-11 Martin Baulig <martin@gnome.org>
29809 * gc.c: Don't register/unregister NULL pointers as disappearing links.
29811 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
29813 * metadata.c, metadata.h: added helper function to allocate signatures.
29815 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29817 * icall.c: added internal call to get the location of machine.config.
29819 2002-10-08 Martin Baulig <martin@gnome.org>
29821 * debug-mono-symfile.c: Ignore classes with a pending init for the
29824 2002-10-03 Dick Porter <dick@ximian.com>
29826 * threads.c: Freebsd pthread_t is a pointer
29828 2002-10-03 Dick Porter <dick@ximian.com>
29830 * socket-io.c: Implemented GetHostName_internal
29832 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29835 (mono_config_parse_file): don't leak the text.
29837 2002-10-02 Martin Baulig <martin@gnome.org>
29839 * debug-mono-symfile.c: Added support for methods.
29841 2002-10-01 Martin Baulig <martin@gnome.org>
29843 * debug-mono-symfile.c: Don't emit methods and line numbers for
29844 the dynamic symbol file, just write the type table. We can easily
29845 have an external helper program which creates a symbol file for an
29848 2002-10-01 Dick Porter <dick@ximian.com>
29850 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
29851 Only add the handle to the cleanup array when we're about to
29852 launch the thread. Bug 31425 deadlocked when the test was run on
29855 2002-10-01 Martin Baulig <martin@gnome.org>
29857 * debug-mono-symfile.c: Added support for properties.
29859 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
29861 * reflection.c: unaligned store fix from Mark Crichton
29862 <crichton@gimp.org>.
29864 2002-09-27 Martin Baulig <martin@gnome.org>
29866 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
29869 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
29871 * assembly.h, assembly.c: use a sane API to hook into the assembly
29872 loading process instead of a useless special-purpouse hack
29873 (ngen needs a hook, too, for example).
29875 2002-09-27 Dick Porter <dick@ximian.com>
29877 * threads.c (mono_thread_init): Call GetCurrentProcess() so
29878 io-layer can set up some process handle info. Not needed on w32,
29879 but doesn't hurt either.
29881 * process.c: Pass the program name in the second parameter to
29882 CreateProcess, so the path is searched. Include the working
29883 directory. Implemented process name, process enumeration, and some
29884 process detail internal calls.
29886 * icall.c: Added internal calls for process lookup, and some
29889 2002-09-26 Martin Baulig <martin@gnome.org>
29891 * assembly.c (mono_install_open_assembly_hook): New global
29892 function to install a function to be invoked each time a new
29893 assembly is loaded.
29894 (mono_assembly_open): Run this callback function if set.
29896 * debug-mono-symfile.c: Put back line numbers for the dynamic
29897 symbol file and also record the .il file as source file. This
29898 allows us to install the temporary symbol file as `file.dbg' just
29899 like a compiler-generated one.
29901 2002-09-26 Nick Zigarovich <nick@chemlab.org>
29903 * Corrected typo in gc.c (BOHEM vs BOEHM).
29905 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29907 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
29908 GetProperties. Also avoid calling g_slist_length in GetProperties and
29911 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
29913 * reflection.c: avoid unaligned stores (bug spotted by
29914 Mark Crichton <crichton@gimp.org>).
29916 2002-09-25 Martin Baulig <martin@gnome.org>
29918 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
29919 instead of guint64 for addresses and added prologue/epilogue info.
29921 2002-09-25 Martin Baulig <martin@gnome.org>
29923 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
29924 store line number info. For the dynamic symbol file, we only need
29925 to provide the JIT generated dynamic line number info for the dynamic
29928 2002-09-25 Martin Baulig <martin@gnome.org>
29930 * debug-mono-symfile.h: Incremented version number.
29932 2002-09-24 Martin Baulig <martin@gnome.org>
29934 * class.c (mono_debugger_class_init_func): New global function
29936 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
29939 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
29940 function. This is called via the mono_debugger_class_init_func
29941 hook to add all types to the dynamic type table.
29942 (ves_icall_MonoDebugger_GetType): New interncall to get a class
29943 from its metadata token.
29945 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
29946 New interncall for the debugger.
29948 2002-09-24 Nick Drochak <ndrochak@gol.com>
29950 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
29951 before using it in case it is null.
29953 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
29955 * metadata.c: allow custom modifiers in local var signatures
29956 (bug spotted by Zoltan Varga).
29958 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
29960 * class.c: deal with the <Module> class that may have a NULL vtable.
29961 Eliminate warnings.
29963 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
29965 * image.c, image.h: more strong name helpers.
29966 * monosn.c: more work: convert pem keys to cryptoapi format.
29968 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
29970 * string-icalls.c: speedup IndexOf.
29972 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
29974 * icall.c: updates from Zoltan.2.Varga@nokia.com.
29976 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
29978 * icall.c: cleanup: use mono_object_domain ().
29980 2002-09-23 Martin Baulig <martin@gnome.org>
29982 * debug-mono-symfile.c: Improved type support.
29984 2002-09-22 Martin Baulig <martin@gnome.org>
29986 * debug-mono-symfile.c: Added support for reference types and strings.
29988 2002-09-22 Martin Baulig <martin@gnome.org>
29990 * debug-mono-symfile.c: Started to work on the type table.
29992 2002-09-21 Martin Baulig <martin@gnome.org>
29994 * debug-mono-symfile.c: Largely reworked the symbol table format.
29995 The symbol table is now incrementally updated each time a new
29996 method is added. We're now also using our own magic and version
29997 so that you don't need to recompile all your classes if the
29998 dynamic table changes.
29999 (mono_debug_update_mono_symbol_file): Removed.
30000 (mono_debug_symfile_add_method): New function to add a method.
30002 2002-09-21 Martin Baulig <martin@gnome.org>
30005 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
30008 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
30009 New interncall to get a method from its metadata token.
30011 2002-09-21 Martin Baulig <martin@gnome.org>
30013 * debug-mono-symfile.c: Create type table.
30015 2002-09-20 Martin Baulig <martin@gnome.org>
30017 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
30019 2002-09-20 Martin Baulig <martin@gnome.org>
30021 * debug-mono-symfile.c: Provide information about params and locals.
30023 2002-09-20 Martin Baulig <martin@gnome.org>
30025 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
30028 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
30029 interncall to get a method from its metadata token.
30031 2002-09-20 Martin Baulig <martin@gnome.org>
30033 * debug-mono-symfile.c: Added a few checks for method->header
30034 being non-NULL. This should never happen, but for the moment
30035 let's use a g_warning() rather than a g_assert().
30037 2002-09-19 Mark Crichton <crichton@gimp.org>
30039 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
30040 even if support for it isn't present. Added an #ifdef to fix this.
30042 * socket-io.c: Added checks back for Solaris support.
30044 2002-09-19 Martin Baulig <martin@gnome.org>
30046 * debug-mono-symfile.c (read_string, write_string): Reflect latest
30047 changes in the symbol file format.
30049 2002-09-18 Martin Baulig <martin@gnome.org>
30051 * debug-mono-symfile.c: Set version number to 21.
30053 2002-09-18 Dick Porter <dick@ximian.com>
30055 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
30056 on netbsd. Fixes bug 30051.
30058 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30061 (set_version_from_string): little fix.
30063 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30065 * monosn.c, Makefile.am: added strong name utility.
30066 * reflection.h, reflection.c: implemented delayed signing,
30067 locale, version and hash id assembly attributes.
30069 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30071 * loader.c, metadata.c: load param attributes in signatures.
30073 2002-09-16 Martin Baulig <martin@gnome.org>
30075 * debug-mono-symfile.c: Added string table with all method names.
30077 2002-09-14 Martin Baulig <martin@gnome.org>
30079 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
30080 fast method lookup.
30082 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30084 * reflection.c: record the public key token of referenced assemblies.
30086 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30088 * image.c, image.h: added functions to get the strong name and the
30089 public key of an assembly.
30090 * pedump.c: use them.
30092 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
30094 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
30096 2002-09-12 Miguel de Icaza <miguel@ximian.com>
30098 * marshal.c (mono_marshal_get_managed_wrapper): Added
30101 2002-09-11 Martin Baulig <martin@gnome.org>
30103 * gc.c: Call GC_unregister_disappearing_link() on all links when
30104 finalizing them, this is necessary to aviod a crash in boehm's
30107 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30109 * gc.c: handle GetTarget for finalized objects spotted and fixed by
30112 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
30114 * icall.c: implemented MonoType::Module.
30115 * reflection.c, reflection.h: mono_module_get_object () from
30116 Tomi Pakarinen <tomi.pakarinen@welho.com>.
30118 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
30120 * icall.c: ignore overridden methods in GetMethods ().
30121 Fix for FieldInfo::SetValue().
30122 * object.c: handle float/double in runtime invoke.
30124 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
30126 * object.c: allow a constructor to be called again on an object.
30128 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30130 * class.h, class.c: move field layout code to it's own function and
30131 export it. Get an interface id earlier. Move fields in MonoClass
30132 so they are more cache friendly and align the bitfields.
30133 * loader.c: temporary handle get_param_names() for a runtime method.
30134 * reflection.c, reflection.h: more code to handle runtime creation of
30137 2002-09-09 Martin Baulig <martin@gnome.org>
30139 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
30140 signature with the pinvoke field being set for the actual call.
30142 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
30144 * icall.c: removed some unused icalls. Start of map of glib charsets
30145 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
30147 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
30149 * debug-helpers.c: break infinite loop (found and fixed by
30150 Holger Arnold <harnold@gmx.de>).
30152 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30154 * icall.c: target may be null in create_delegate.
30156 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30158 * marshal.c: handle a boolean return type.
30160 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30162 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
30164 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30166 * gc.c: fix weakreferences.
30168 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
30170 * icall.c: added icall to get default codepage.
30172 2002-09-03 Dick Porter <dick@ximian.com>
30175 * threads.c: Use MonoThread instead of MonoObject where
30178 Store running thread objects in a hash table, so that we have all
30179 the info to hand when waiting for them to finish
30180 (means we don't need OpenThread() any more, so mingw builds should
30181 be fully functional again.)
30184 * object.h: Added thread ID to MonoThread
30186 2002-09-03 Martin Baulig <martin@gnome.org>
30188 * icall.c (System.Reflection.Assembly::get_location): New interncall.
30190 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30192 * icall.c: fixed leak in get_temp_path. Thanks lupus.
30194 2002-09-03 Martin Baulig <martin@gnome.org>
30196 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
30197 argument to store the end address of the disassembled instruction.
30199 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
30200 here from debug-symfile.h.
30201 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
30202 JIT into this struct.
30203 (MonoSymbolFile): Added `char *image_file' field.
30204 (MonoDebugGetMethodFunc): Removed.
30205 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
30206 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
30207 (mono_debug_find_method): New method.
30209 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
30210 create a full symbol file.
30211 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
30212 and static symbol files.
30213 (mono_debug_find_method): The symbol file keeps an internal method hash,
30214 call this to get a MonoDebugMethodInfo from a MonoMethod.
30216 * debug-symfile.[ch]: Removed.
30218 2002-08-29 Miguel de Icaza <miguel@ximian.com>
30220 * image.c (do_mono_image_open): Remove linker version check.
30222 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
30224 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
30225 wrappers for instance methods.
30227 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30229 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
30231 2002-08-28 Dick Porter <dick@ximian.com>
30233 * Makefile.am: Export HOST_CC for w32 builds
30235 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30237 * file-io.c process.c: MonoString are null terminated, no
30238 need for mono_string_to_utf16() anymore.
30240 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30242 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
30244 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
30246 * icall.c, reflection.h: speedup System.MonoType.
30248 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30250 * reflection.c: allow null as the value of a string argument in
30251 custom attributes constructors.
30253 2002-08-27 Martin Baulig <martin@gnome.org>
30255 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
30256 `trampoline_address' field.
30258 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
30260 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
30261 check (fixes bug #29486)
30263 2002-08-27 Martin Baulig <martin@gnome.org>
30265 * debug-mono-symfile.c: Changed the file format in a way that allows us
30266 open it read-only and to use a specially malloced area for all the
30267 dynamic data. We can now also generate a symbol file on-the-fly if we're
30268 debugging IL code and there is no MCS generated symbol file for it.
30270 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
30272 * object.c: added a define for a good string and array
30273 creation speedup (not enabled by default because we need to deal with
30276 2002-08-26 Martin Baulig <martin@gnome.org>
30278 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
30279 function to create a dynamic symbol file. This is used by the
30280 debugger to create a symbol file for IL code on-the-fly.
30282 2002-08-26 Martin Baulig <martin@gnome.org>
30284 * loader.c (mono_lookup_pinvoke_call): Include the error message
30285 from g_module_error() in the error message.
30287 2002-08-24 Martin Baulig <martin@gnome.org>
30289 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
30290 function to update the symbol file. The symbol file is mmap()ed
30291 writable, but private. This allows us to install the symbol file
30292 together with the assembly.
30294 2002-08-24 Martin Baulig <martin@gnome.org>
30296 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
30297 but they can read the new symbol file format which mcs is now creating.
30299 * debug-symfile.c (mono_debug_find_source_location): Moved to
30300 debug-mono-symfile.c; this is now operating on the new symbol file.
30302 2002-08-23 Martin Baulig <martin@gnome.org>
30304 * debug-helpers.c (mono_method_desc_from_method): New function to get
30305 a MonoMethodDesc from a MonoMethod.
30307 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30309 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
30310 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
30312 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
30314 * string-icalls.[ch]: make helper methods static.
30316 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30318 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
30319 types to it and to SetValueInternal.
30321 * object.c: Moved handle_enum label to its proper place. This was the
30324 This time i compiled mcs and gtk-sharp and they both work.
30326 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30328 * icall.c: reverted partially my previous patch until
30329 object.c:set_value handles enums correcly.
30331 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30334 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
30335 (ves_icall_System_Environment_get_MachineName): removed warning when
30336 compiling under cygwin.
30338 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
30340 * object.c: fixed field_get_value() for reference types.
30342 2002-08-22 Dick Porter <dick@ximian.com>
30344 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
30345 Don't free a buffer while it's still needed. Patch from Jonathan
30346 Liger <Jonathan.liger@wanadoo.fr>
30348 2002-08-21 Miguel de Icaza <miguel@ximian.com>
30350 * icall.c (ves_icall_System_Environment_get_Platform): Add new
30353 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
30355 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
30356 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
30358 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
30359 we call unmanaged code which throws exceptions.
30361 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30363 * appdomain.h: added per-domain entry_assembly.
30364 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
30366 * icall.c: Assembly::GetEntryAssembly icall.
30367 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
30368 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
30370 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30372 * appdomain.h, gc.c: added mono_domain_finalize ().
30374 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30377 (mono_print_unhandled_exception): changed g_warning by g_printerr
30378 because g_log has a 1024 characters limit (yeah, i got a big stack
30379 trace). Don't print exception name, that should be in ToString
30382 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30384 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
30385 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
30387 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30390 (mono_print_unhandled_exception): after previous commit, i realized
30391 that MS calls ToString on the exception. I changed this function to
30392 do that. This way we get stack_trace for free.
30394 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30397 (mono_print_unhandled_exception): invoke Message property instead of
30398 getting 'message' field from Exception. Don't allocate memory for
30399 'trace' and 'message' if not needed.
30401 2002-08-18 Dick Porter <dick@ximian.com>
30403 * unicode.c: Fix asserts to match Encoder.cs checks
30405 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30407 * marshal.c: fix unaligned store issue and a few wrong
30408 opcode argument types.
30410 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30412 * icall.c: added GetUninitializedObjectInternal internal call.
30414 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
30416 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
30417 to the right domain.
30419 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
30421 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
30423 * class.c (class_compute_field_layout): set blittable to false for Strings
30425 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
30427 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30429 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
30430 first chunk of code to create types at runtime. Code to
30431 handle ReflectedType/DeclaringType. Make reflection handles
30434 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
30436 * class.c: set correct name in arrays.
30438 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
30440 * appdomain.c (mono_domain_transfer_object): make it work with
30441 valuetypes. bug fixes.
30443 2002-08-12 Dick Porter <dick@ximian.com>
30445 * object.h: Rename some parameters to avoid c++ keywords (Patch
30446 from Joseph Wenninger <kde@jowenn.at>)
30448 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
30450 * icall.c: added icall to implement Assembly.GetFile*.
30452 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30454 * reflection.h, reflection.c: code to embed managed resources.
30456 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
30458 * class.c: move all the type size stuff into
30459 class_compute_field_layout().
30461 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30463 * class.c: ensure enums have always the correct instance size.
30464 * unicode.c: remove wrong assert.
30466 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
30468 * assembly.c: fix mem corruption issue.
30469 * image.h, image.c: added mono_image_get_resource () to access
30471 * icall.c: implemented Assembly.EntryPoint property and some
30472 Managed Resources related internalcalls.
30475 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30477 * image.c, image.h: impemented mono_image_get_entry_point ().
30478 * appdomain.c: use mono_image_get_entry_point.
30480 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30482 * reflection.c: support the object type argument when loading
30485 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
30487 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
30488 String as return type.
30490 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
30492 * reflection.c: fix encoding of named args for custom attrs to match
30493 the ms implementation. Read them back when instantiating custom
30496 2002-08-02 Radek Doulik <rodo@ximian.com>
30498 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
30499 by Dietmar as quick fix
30500 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
30501 16 as stack size, used on more places as quick fix before Dietmar
30502 will fix it properly
30504 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30506 * object.h, object.c: added accessors for fields and properties.
30508 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30510 * class.c, class.h: made mono_class_get_field_from_name ()
30511 loop on parent types.
30512 Added mono_class_get_property_from_name ().
30514 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
30516 * class.c, class.h: move the code to setup the type vtable in its own
30517 function so that it can be reused also for types created at runtime.
30518 Eliminate the "class" identifier from the header file.
30519 * reflection.c: setup the vtable for enums so that we can create
30520 objects for use in SetConstant ().
30522 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
30524 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
30525 instead of the delegate itself as this pointer (bug #28383)
30527 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
30529 * marshal.c (mono_marshal_get_managed_wrapper): added return type
30532 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30534 * loader.c: don't set the pinvoke bit on icalls.
30536 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
30538 * debug-helpers.c (mono_method_full_name): only print a number to
30539 indicate wrapper type (so that the output is more readable in traces).
30541 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
30543 * class.c (mono_class_init): include method override patch from Paolo
30545 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
30547 * icall.c: fixed GetTypeCode().
30549 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
30551 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
30552 use real delegate invoke function to make it work with multicast
30553 delegates (fix bug# 28291).
30555 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
30557 * object.c: load constant strings.
30559 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
30561 * reflection.c: no magic numbers.
30562 * tabledefs.h: security action enum.
30564 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
30566 * assembly.c: fix possible memory corruption.
30568 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30570 * reflection.h, reflection.c: added support for linking resources.
30571 * verify.c: check we have an updated corlib.
30573 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
30575 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
30577 (mono_marshal_string_array): null terminate unmanaged string arrays.
30578 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
30580 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
30582 * icall.c: Type.GetType () can now return also types from the
30585 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
30587 * loader.h, loader.c: stack walking support.
30588 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
30589 GetCallingAssembly.
30591 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
30593 * marshal.c: added optimisations for blittable types
30595 * class.c (mono_array_class_get): do not set blittable attribute on arrays
30596 (mono_class_setup_mono_type): set blittable attribute for single
30599 * marshal.c (mono_string_utf8_to_builder): impl.
30600 (mono_string_builder_to_utf8): impl.
30601 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
30603 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
30605 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
30606 (mono_marshal_get_managed_wrapper): impl. byref types
30608 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30611 (search_method): don't display debug message.
30613 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
30615 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
30617 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
30619 * appdomain.c: set the missing filename when throwing exception.
30621 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
30623 * metadata.c (mono_type_size): code cleanup
30624 (mono_type_stack_size): removed some test code
30626 2002-07-21 Miguel de Icaza <miguel@ximian.com>
30628 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
30629 mono_get_exception_file_not_found now.
30631 * exception.c (mono_exception_from_name_two_strings): New version
30632 that will call a constructor with two string arguments.
30633 (mono_get_exception_file_not_found): New helper routine, used to
30634 report file-not-found errors.
30636 2002-07-20 Dick Porter <dick@ximian.com>
30639 * process.c: Pass file handles to CreateProcess
30643 * file-io.c: Implemented CreatePipe
30645 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
30647 * metadata.c (mono_get_param_info): set alignment for value types
30649 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30651 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
30652 Constify mono_domain_assembly_open().
30653 * loader.c: handle null namespace in icalls.
30655 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
30657 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
30658 (emit_str_to_ptr_conv): marshal object as structs
30660 * metadata.c (mono_type_to_unmanaged): marshal object as structs
30662 * marshal.c (mono_marshal_get_runtime_invoke): support value types
30664 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
30666 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
30667 (mono_marshal_get_native_wrapper): we an now return value types
30669 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30671 * verify.c: more checks implemented.
30673 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
30675 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
30677 (mono_marshal_get_native_wrapper): allow byref arguments
30678 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
30679 impl. PtrToStringXXX methods
30680 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
30681 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
30682 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
30683 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
30684 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
30686 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30688 * reflection.c: fix buglet in parsing an assembly name.
30690 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
30692 * marshal.c (emit_ptr_to_str_conv): first impl.
30694 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
30696 * object.c, class.h: cache the vtable in the class as suggested by
30697 vargaz@freemail.hu (Zoltan Varga).
30699 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30701 * class.h, loader.c: added mono_field_from_token().
30702 * verify.c: first cut of type checking code.
30704 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
30706 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
30708 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
30710 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
30712 (mono_marshal_get_remoting_invoke): impl.
30713 (mono_delegate_begin_invoke): impl.
30714 (mono_mb_emit_save_args): impl.
30715 (mono_delegate_end_invoke): impl.
30716 (mono_marshal_get_delegate_begin_invoke):
30717 (mono_marshal_get_delegate_end_invoke):
30718 (mono_marshal_get_delegate_invoke): generate a special name for
30719 those methods (including the signature) and associate them whith
30720 the delegate class.
30722 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
30725 (mono_reflection_type_from_name): now it has a MonoImage parameter
30726 which is used as the default image to search the type in. If the image
30727 is NULL or getting the type from it fails, it defaults to corlib.
30729 * icall.c: changed 1 call to mono_reflection_type_from_name to match
30732 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
30734 * reflection.c: update the parameter table index.
30736 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
30738 * domain.c: don't include the mark byte in the string hash.
30740 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
30742 * icall.cs: icall for Type.GetTypeCode ().
30743 * verify: a couple of fixes and disabled local initialization checks.
30745 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
30747 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
30749 * debug-helpers.c (mono_method_full_name): print the type of the
30752 * metadata.c (mono_signature_hash): a hash function for signatures
30753 (mono_signature_hash): better hash algorithm
30755 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
30757 * debug-helpers.c (mono_method_full_name): this can now generate
30758 method names with signatures
30760 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
30761 method dont have this pointers.
30763 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
30765 * reflection.c: fixup typebuilder tokens.
30766 * image.c: fix buglet.
30767 * marshal.h: remove whitespace.
30768 * metadata.h, metadata.c: reinstate code that was removed.
30769 * verify.c: handle catch directives and fix another couple of bugs.
30771 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
30773 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
30774 (mono_marshal_get_native_wrapper): make it comp. with the old code
30775 (mono_marshal_get_native_wrapper): support boolean
30776 (mono_marshal_get_managed_wrapper): support more types
30778 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
30780 * class.c (class_compute_field_layout): compute class->blittable attribute.
30782 2002-07-09 Dick Porter <dick@ximian.com>
30784 * threads.c: Make the thread cleaning up cope with threads that
30787 2002-07-08 Radek Doulik <rodo@ximian.com>
30789 * reflection.c (method_encode_code): use non-translated values to
30790 compute finally_start, this fixes exception handling on ppc, yay!
30792 * decimal.h (struct signscale): fix endianess
30794 2002-07-07 Radek Doulik <rodo@ximian.com>
30796 * reflection.c: swap box_val and not val
30798 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
30800 * reflection.c, reflection.h: handle full assembly info in type name.
30801 Handle Type arguments when loading custom attributes.
30802 * icall.c: updated to use new mono_reflection_type_from_name () method.
30804 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30807 (method_from_memberref): also print assembly name when method not found.
30809 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30812 (ves_icall_TypeGetProperties): fixed bug #27473.
30814 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30816 * reflection.c: display image name and token when cannot find the
30817 .ctor for an attribute.
30819 2002-07-05 Martin Baulig <martin@gnome.org>
30821 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
30823 2002-07-04 Dick Porter <dick@ximian.com>
30825 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
30826 compile on mingw. This will cause mingw builds to not wait for
30827 subthreads to terminate after the main thread does. I've lodged a
30828 bug with the mingw developers for them to wrap OpenThread().
30830 2002-07-03 Dick Porter <dick@ximian.com>
30832 * threads.c: Store thread IDs instead of handles, because
30833 GetCurrentThread() returns a pseudohandle and therefore stores
30834 useless values. mono_thread_cleanup() continues checking the
30835 array of threads until it is empty, to cope with subthreads
30836 spawning new threads after the main thread has finished.
30840 * profiler-private.h: Pass the thread ID to thread profiler
30841 functions, instead of a handle
30843 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
30845 * verify.c: fixes to make it more usable.
30846 * pedump.c: added --verify code to verify IL code in an assembly.
30848 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30850 * reflection.c: turn errors into warnings to allow compiling corlib.
30852 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
30854 * reflection.c: add special cases to compile corlib.
30856 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30858 * reflection.c: handle properties with only a set method.
30860 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
30862 * opcodes.h: add enum with opcodes in opval order.
30864 2002-07-01 Dick Porter <dick@ximian.com>
30867 * object.c (mono_runtime_run_main): Removed unneeded argument
30869 2002-06-28 Martin Baulig <martin@gnome.org>
30871 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
30873 2002-06-27 Dick Porter <dick@ximian.com>
30875 * threads.c: Store the handle in both the parent thread and in the
30876 subthread, to minimise the time between starting a new thread and
30879 2002-06-26 Dick Porter <dick@ximian.com>
30881 * appdomain.c (mono_runtime_cleanup): Close the socket library
30882 after all the threads have finished, not before
30884 2002-06-26 Martin Baulig <martin@gnome.org>
30886 * debug-symfile.c (mono_debug_find_source_location): Added
30887 `guint32 *line_number' argument. If it's not NULL, store the line number
30888 there and return the file name without the line number.
30890 2002-06-25 Dick Porter <dick@ximian.com>
30894 * process.c: Process forking and other support functions
30896 2002-06-25 Dick Porter <dick@ximian.com>
30898 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
30899 things dont happen when the image is closed.
30900 (mono_image_lookup_resource): Walk the resource section looking
30901 for a particular entry
30903 * cil-coff.h: PE resource section decoding
30905 2002-06-25 Dick Porter <dick@ximian.com>
30909 (mono_assembly_foreach): Accessor functions to walk the list of
30911 (mono_assembly_set_main):
30912 (mono_assembly_get_main): Process methods need to know which
30913 assembly is the "main" one
30915 * object.c (mono_runtime_run_main): Record the main assembly
30917 * debug-helpers.c: Fix typo
30919 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
30921 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
30922 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
30924 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
30926 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
30928 2002-06-21 Miguel de Icaza <miguel@ximian.com>
30930 * image.c (do_mono_image_open): Initialize reference count,
30931 otherwise we leak the MonoImage.
30933 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30935 * reflection.c: small tweak to handle self-hosting.
30937 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30939 * reflection.c: fix type name parse code.
30941 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
30943 * reflection.c: break out of the loop.
30944 * image.c: special case corlib.
30946 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30948 * reflection.c: add all the custom attrs at the end to ensure the
30949 ctors have been properly initialized when the attributes are defined
30950 in the current assembly.
30952 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30954 * reflection.c: handle correctly multiple-nested types.
30956 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
30958 * row-indexes.h: fix typos.
30959 * reflection.c: adjust for typos and fix method_def_or_ref
30960 encoding in MethodImpl table.
30962 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
30964 * reflection.c: fix entry point patching (thanks Serge!).
30966 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
30968 * verify.c: add check for System.Exception
30970 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
30972 * image.c, class.c: minifix for code just c&p'ed.
30973 * reflection.c: warning fix.
30974 * object.h, loader.h, domain.c: load also StringBuilder.
30976 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30978 * marshal.h, marshal.c: some support code to handle complex marshaling.
30980 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30982 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
30983 Better signatures with vtable error dump.
30985 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
30987 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
30989 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
30991 * icall.c (ves_icall_Type_GetField): impl.
30993 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30995 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
30996 to retrieve a marshal description blob for a field or param.
30998 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31000 * reflection.h, reflection.c: change order of nested type emission
31001 to avoid table corruption. The NestedTypes table is sorted.
31002 * icall.c: change order of GetConstructor results to workaround mcs bug.
31004 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31006 * reflection.h, reflection.c: handle field and param marshal
31009 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31011 * icall.c, marshal.c marshal.h: more Marshal class implementation.
31013 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31015 * reflection.c: fix call convention.
31017 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31019 * reflection.h, reflection.c: mono_image_get_memberref_token()
31020 takes a type instead of a class, now. Added
31021 mono_image_get_array_token() to create tokens for the special
31022 multi-dim array methods.
31024 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31026 * assembly.c: handle modules (no assembly table). Split
31027 loading references in its own function.
31028 * class.c: handle moduleref resolution scope.
31029 * image.c, image.h: cache module name in image.
31031 2002-06-07 Martin Baulig <martin@gnome.org>
31033 * reflection.c (mono_image_get_type_info): Only add a class layout entry
31034 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
31036 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31038 * icall.c: more signature fixes that used uint instead of int.
31040 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31042 * reflection.c: fixed signature of field refs.
31044 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31046 * class.c, reflection.c: handle typerefs of nested types
31047 (both on read and when writing files).
31049 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31051 * icall.c: fix method signatures that tried to workaround the previous
31054 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31056 * debug-helpers.c: fix typo.
31058 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31060 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
31061 rewrote the PE/COFF writing code (our programs are understood by the
31064 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31066 * gc.c, gc.h, icall.c: weakreference support.
31068 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31070 * Makefile.am, mono-config.c: use $(sysconfdir).
31072 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31074 * icall.c: changed default precision of Double.ToString() to 15.
31075 Fixed memory leak. Unified with Single.ToString.
31077 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31079 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
31081 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31083 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
31084 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
31085 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
31088 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31090 * debug-symfile.c, sysmath.c: yet more compilation fixes.
31092 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31094 * reflection.c, socket-io.c: more compilation fixes.
31096 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31098 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
31099 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
31100 unicode.c: warning and compiler compatibility fixes.
31102 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31104 * class.h, metadata.c: fixed warnings/compilation errors.
31106 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31108 * Makefile.am, mono-config.c, mono-config.h: configuration file
31110 * loader.c, loader.h: make Dll mapping configurable at runtime in the
31111 config file. Export methods to insert and lookup mappings.
31113 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
31115 * reflection.c: handle types and boxed objects in custom attr
31118 2002-05-30 Martin Baulig <martin@gnome.org>
31121 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
31123 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
31125 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
31126 to lookup the implmap row for a P/Invoke method.
31127 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
31128 P/Invoke method from the runtime on an as needed basis.
31130 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
31132 * metadata.c (mono_metadata_parse_signature): impl.
31134 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31136 * class.c: handle .pack directive.
31138 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31140 * object.c: initialize static fields with RVA data.
31142 2002-05-25 Martin Baulig <martin@gnome.org>
31145 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
31147 2002-05-24 Martin Baulig <martin@gnome.org>
31150 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
31151 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
31152 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
31154 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31156 * object.c: special case string ctros in invoke.
31157 * gc.c: silly whitespace changes.
31159 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
31161 * threadpool.[ch]: impl. a threadpool that can
31162 be used by mint and mono.
31164 2002-05-22 Martin Baulig <martin@gnome.org>
31166 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
31167 The first argument is now a `MonoReflectionModuleBuilder *', the return
31168 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
31169 `methods' field to get the method builder. The `token' argument is the
31172 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
31173 invalid characters instead of g_assert_not_reached()ing. This seems
31174 to be the behaviour of mscorlib.
31176 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
31178 * object.c (mono_runtime_invoke_array): applied patch from Rachel
31179 Hestilow to fix bug #25104
31181 2002-05-21 Martin Baulig <martin@gnome.org>
31183 * debug-symfile.c (mono_debug_find_source_location): New function.
31184 Looks up an IL offset in the line number table and returns the source
31185 location as a string.
31187 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31190 (mono_double_ToStringImpl): changed %f by %g until we have something
31193 2002-05-21 Nick Drochak <ndrochak@gol.com>
31195 * icall.c : Use different name for Math.Pow's icall. Needed to check
31196 parameters first in C#.
31198 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31200 * icall.c, reflection.h: added icall to get info about an event.
31202 2002-05-20 Radek Doulik <rodo@ximian.com>
31204 * object.c (mono_value_box): don't use memcpy for boxing on BIG
31206 (mono_value_box): don't use memcpy for small sizes on
31207 architectures with unaligned access
31209 2002-05-20 Martin Baulig <martin@gnome.org>
31211 * reflection.c (mono_reflection_setup_internal_class): Don't crash
31212 if `tb->parent == NULL'.
31213 (mono_reflection_create_internal_class): New function. This is
31214 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
31217 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
31220 2002-05-19 Martin Baulig <martin@gnome.org>
31222 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
31223 argument to get the length, don't default to the array length.
31225 2002-05-18 Miguel de Icaza <miguel@ximian.com>
31227 * assembly.c (mono_assembly_setrootdir): New function used to
31228 override the MONO_ASSEMBLIES directory.
31230 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31232 * icall.c: ValueType_GetHashCode() initialize local var.
31234 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31236 * reflection.c: sort custom attributes table.
31238 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31240 * reflection.c: support named args in custom attributes (write support).
31242 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31244 * reflection.c: fix finally position calculation.
31246 2002-05-15 Radek Doulik <rodo@ximian.com>
31248 * reflection.c: fixed endianess at many places
31250 * icall.c (ves_icall_InitializeArray): comment out debug msg
31252 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
31254 * object.c (mono_unhandled_exception): new function to handle
31255 unhandled exceptions.
31256 (mono_unhandled_exception): call the UnhandledException event.
31257 (mono_runtime_delegate_invoke): impl.
31259 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
31261 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
31262 returns the RVA, not the direct pointer to the data. Handle the case
31263 when the class size is fixed.
31265 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31267 * reflection.c: fix some endianess issues.
31269 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
31271 * object.c (mono_runtime_invoke): is now able to catch exceptions.
31273 * threads.c (mono_thread_init): added a callback which is invoked
31276 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
31278 * icall.c: make GetHashCode return non-negative values.
31280 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
31282 * object.c, icall.c, gc.c: revert to address-based hashcode.
31284 2002-05-13 Miguel de Icaza <miguel@ximian.com>
31286 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
31288 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31290 * icall.c, class.c: special case <Module>.
31292 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
31294 * icall.c: fix bug in GetNow().
31296 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
31298 * object.c (mono_runtime_class_init): make sure that we call all
31299 static class constructors.
31301 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31303 * reflection.c: sort methodsemantics table.
31305 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31307 * reflection.h, reflection.c: honour init locals setting.
31309 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
31311 * icall.c: copied Double ToStringImpl for Single ToStringImpl
31313 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31315 * reflection.c: support ContructorBuilders in attribute blob creation.
31317 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31319 * reflection.c: some changes to build a binary that can be run
31320 directly in windows.
31322 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
31324 * loader.c: print a big message when an icall can't be found.
31326 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31328 * string-icalls.c: fix bug 24248.
31330 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
31332 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
31333 icall.c, reflection.h: separate assembly loading by pathname and by
31334 assembly name. Use the MONO_PATH env var to search for assemblies.
31336 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31338 * assembly.c, image.h: add some support for assemblies
31339 with multiple modules.
31340 * class.c, class.h: export mono_class_from_typeref().
31341 * loader.c: remove duplicated code and use mono_class_from_typeref(),
31344 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31346 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
31347 documentation says (the ECMA one is correct).
31349 2002-05-02 Dick Porter <dick@ximian.com>
31351 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
31352 Don't name the synchronisation mutex.
31354 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
31357 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
31358 Make the prototypes match.
31359 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
31363 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
31364 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
31365 all systems have tm.tm_zone, so use strftime() with %Z to print
31366 the timezone abreviation into a temp string.
31368 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
31369 rather than mono_array_addr() on a MonoString on Big Endian
31372 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
31374 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
31377 2002-04-30 Dick Porter <dick@ximian.com>
31379 * socket-io.c: Cope with SOCKET being an integer rather than a
31382 * threads.c: Added Thread_free_internal, to deal with thread
31383 handle cleanup. Moved calls to handle_store() and handle_remove()
31384 to start_wrapper(), so each can only be called once. Allocate
31385 synchronisation blocks with GC_malloc(), and use GC finalisation
31386 to close the handles.
31388 * icall.c: added System.Threading.Thread::Thread_free_internal
31390 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31392 * icall.c: support Environment.Exit, CommandLineArgs().
31394 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31396 * object.c, object.h: added mono_runtime_run_main () and
31397 mono_runtime_get_main_args () for use in System.Environment.
31399 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31401 * gc.c: fix thinko, enable actual finalization since the jit is now
31404 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31406 * gc.c, object.c: take into account that an object may be offset wrt the address
31407 returned by GC_malloc().
31409 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
31411 * image.c: handle files without entries in the assembly table (modules).
31413 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
31415 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
31416 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
31417 allowed to be null when it's System.Object class setup.
31419 2002-04-27 Martin Baulig <martin@gnome.org>
31421 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
31422 if `tb->parent == NULL' rather than crashing.
31424 2002-04-28 Nick Drochak <ndrochak@gol.com>
31426 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
31427 calling acos() where asin() should have been called.
31429 2002-04-26 Martin Baulig <martin@gnome.org>
31431 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
31432 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
31433 there's a subdirectory called `System', but we don't want to read that
31434 subdirectory as an assembly.
31436 2002-04-25 Martin Baulig <martin@gnome.org>
31438 * debug-symfile.c: Reflect latest MonoString changes.
31440 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31442 * rand.c, rand.h: instance method icalls need to have an explicit
31443 this pointer as first argument in the C implementation.
31445 2002-04-25 Nick Drochak <ndrochak@gol.com>
31447 * icall.c: Fix typo in map for GetNonZeroBytes
31449 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
31451 * string-icalls.c : String does now passes unit tests without any
31452 errors, the following changes has been made:
31454 Implemented replace methods.
31455 Renaming of methods to (try) follow the standard.
31456 Fixed compare ordinal
31457 Made all memory allocated directly to function instead of via icall function.
31458 Small performance fix in is_in_array function
31460 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
31462 c (mono_string_Internal_ctor_charp_int_int):
31463 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
31464 sindex < 0, throw ArgumentOutOfRangeException instead of
31465 ArgumentNullException.
31467 Added new check for length == 0, however
31468 I need to make it return String.Empty from the C code.
31470 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
31471 that calculate the length for us here.
31473 (mono_string_Internal_ctor_sbytep_int_int): Replaced
31474 mono_string_new_utf16 with mono_string_new, since value is utf8.
31476 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31478 * object.c: register the object for finalization if needed.
31479 Allocate one more char in the string for the terminating 0 char.
31481 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31483 * class.c, class.h, image.c: check if a type implemenst a destructor.
31484 Use the proper key for array class lookups.
31485 * icall.c: register the icalls in the System.GC class.
31486 * gc.c, gc.h: GC-related functions and icalls.
31488 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31492 * unicode.c: free some strings gotten from mono_string_to_utf8 and
31493 changed a couple of free () by g_free ().
31495 * decimal.c: one-liner in the comments for decimal2string ().
31497 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
31499 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
31501 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
31503 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
31504 * object.c (mono_runtime_invoke_array) : handle null in params
31506 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
31508 * string-icalls.c: fixed bug in split (one off bug)
31510 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
31512 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
31513 * icalls.c: added String::Equals as internal method
31515 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
31517 * threads.c: fixed bug in the double interlocked functions
31519 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
31521 * threads.c: implemented all of the new interlocked icalls.
31522 * string-icalls.c: fix a bug in insert.
31523 * icalls.c: added the icalls for interlocked, removed old string functions.
31525 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
31527 * loader.c: fix off-by-one error when reading argument names.
31529 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31531 * profiler.c: win32 counter implementation (untested).
31532 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
31533 (the latter needs testing and more complete impl. from win32 folks).
31535 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
31537 * object.c: mono_array_new_full workaround mono_array_class_get
31540 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
31542 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
31543 * object.h (mono_string_chars): Changed casting type.
31545 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
31547 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
31548 method signatures to use gunichar2 instead of gint16.
31550 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
31552 * object.h, object.c: domain-specific versions of mono_object_new and
31555 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
31557 * object.c: changed String layout
31559 * string-icalls.c (mono_string_Internal_ctor_chara): added
31560 internal string constructors.
31562 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
31564 * threads.c: pass 'this' to the thread start routine.
31566 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31568 * string-icalls.c: fix IndexOf and LastIndexOf. Now
31569 InternalCompareStr don't call twice mono_string_cmp_char for the last
31570 character. Improved performance in mono_string_cmp_char.
31572 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31574 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
31575 code into its own library: libmonoruntime.
31577 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
31579 * object.h, object.c: changed array format so that szarrays do not
31580 require a bounds structure.
31581 * icall.c, appdomain.c: support for new szarray format.
31583 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
31585 * metadata.c: compare also the retuns type when comparing signatures:
31586 we didn't do this as an optimization since really overloaded methods
31587 must differ also in the arguments, but this doesn't work with
31588 low-level IL code (or when using explicit conversion operators: see
31589 bug#23498 for an example).
31591 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31593 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
31595 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31597 * icall.c: make MonoType::GetElementType its own icall.
31599 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31601 * icall.c: remove MonoMethod_get_Name().
31602 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
31605 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
31607 * string-icalls.c: optimized a few methods.
31609 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
31611 * icall.c: added all new string internal calls
31612 * string-icalls.c: added, new string internal call implementation.
31613 * object.c: added mono_string_new_size for allocating a string a size
31615 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
31617 * object.c (mono_object_isinst): use the same code as in the
31618 optimized x86 version.
31620 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31622 * profiler.c: TSC-based timer code (faster and more accurate).
31623 Not hooked up in configure, yet (set USE_X86TSC to 1).
31625 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
31627 * profiler.c, profiler.h: track time spent compiling methods.
31628 * threads.c: track thread creation/destruction.
31630 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
31632 * profiler.c, profiler.h, profiler-private.h: profiling interface
31633 and sample implementation. Moved here so that it can be used also by
31636 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
31638 * reflection.c, reflection.h: keep types and other handles separate in
31639 the hash tables for referred tokens. Add guid for modules.
31641 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31643 * assembly.c: fix bugs found with valgrind.
31644 * metadata.h, metadata.c: added mono_metadata_guid_heap().
31646 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
31648 * threads: added icall support for getting current domain for
31651 2002-04-13 Martin Baulig <martin@gnome.org>
31653 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
31654 (MonoDebugVarInfo): Added `index' field for register based addresses.
31655 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
31656 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
31657 `MonoDebugVarInfo *params' and `guint32 this_offset' with
31658 `MonoDebugVarInfo *this_var'.
31660 * debug-symfile.c (relocate_variable): New static function to write
31661 a location description for a local variable or method parameter.
31663 2002-04-12 Martin Baulig <martin@gnome.org>
31665 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
31666 stack offset and begin/end scope address of a local variable.
31667 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
31668 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
31669 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
31671 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
31672 Added new relocation types for start/end scope of a local variable.
31674 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31676 * object.h: add mono_object_domain() macro.
31677 * reflection.c: handle typespecs.
31678 * icall.c: MonoMethod::get_Name() implementation.
31680 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31682 * icall.c: String::GetHashCode() icall implementation.
31684 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31686 * icall.c: String::IndexOfAny icall.
31687 * object.c, object.h: make array->max_length more useful.
31688 Intrduced mono_object_class() and mono_string_length() macros.
31690 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31692 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
31693 instead of g_unichar_isdigit.
31695 2002-04-11 Nick Drochak <ndrochak@gol.com>
31697 * icall.c: Implement a simple Double.ToString().
31699 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
31701 * appdomain.h: only io-layer.h is supposed to be included.
31702 * icall.c: explicitly import environ. Fix warning.
31704 2002-04-10 Nick Drochak <ndrochak@gol.com>
31706 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
31707 return true even if it's not Daylight Savings time.
31708 Only return false for the case where the function isn't
31709 implemented for a plaform (read Windows).
31711 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31713 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
31716 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
31718 * mempool.c (mono_mempool_alloc): only use g_malloc when
31719 absolutely necessary.
31721 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
31723 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
31725 * class.c (mono_class_vtable): use domain mempool to allocate vtable
31726 (mono_class_proxy_vtable): use domain mempool
31728 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31730 * appdomain.h, appdomain.c: split initialization that requires the
31731 execution engine support into mono_runtime_init().
31733 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
31735 * class.c (mono_class_init): don't include vtable inside MonoClass
31736 to save some memory, gather some statistics.
31737 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
31739 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31741 * icall.c: internalcall implementation for ValueType.Equals().
31743 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
31745 * object.c (mono_message_init): moved
31746 (mono_runtime_exec_main): new arch. independent impl.
31747 (mono_runtime_invoke_array): new method - like
31748 mono_runtime_invoke, but you can pass an array of objects.
31749 (mono_remoting_invoke): new arch. independent impl.
31750 (mono_message_invoke): new arch. independent impl.
31751 (mono_runtime_class_init): new arch. independent impl.
31752 (mono_runtime_object_init): new arch. independent impl.
31754 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31756 * metadata.c, object.c, reflection.c: documented the exported
31759 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
31761 * icall.c: simpler code to pass the assembly builder data to corlib.
31762 Implement GetNestedTypes() internalcall.
31764 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31766 * class.c: warn if a type can't be loaded.
31768 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
31770 * image.h: typedef MonoImageOpenStatus
31771 * types.h: removed unused file
31773 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
31775 * icall.c: Enum_ToObject accepts enum value arguments.
31777 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31779 * class.c: move initialization of properties, events and nested
31780 classes, so that they happen for interfaces, too.
31782 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31784 * icall.c: cleanup some ugly casts in Array_SetValue*.
31786 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31788 * icall.c: the values array fro enums is of the correct type, now.
31789 Implement (correctly) getFullName instead of assQualifiedName for
31791 * reflection.h, reflection.c: added mono_type_get_name ().
31793 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31795 * assembly.c, image.h: for each MonoImage, record from wich assembly
31797 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
31798 Make Type.Assembly work.
31800 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
31802 * debug-symfile.h: use char* instead of gpointer to avoid
31805 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
31807 * icall.c (ves_icall_InternalExecute): impl. FielSetter
31808 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
31810 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
31812 * icall.c (mono_message_init): impl. (code cleanup)
31813 (ves_icall_InternalExecute): impl. FieldGetter
31815 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
31816 defined we call all (non-static)methods through the vtable.
31818 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
31820 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
31821 finalizer even though the memory is still referenced (and the chunk of
31822 memory is not freed).
31824 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
31826 * assembly.c: fix brokeness.
31828 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
31830 * class.c: kill some warnings. Check explicit interface method
31831 implementation also without considering the namespace.
31832 Load also literal strings in static class data.
31834 2002-03-29 Miguel de Icaza <miguel@ximian.com>
31836 * assembly.c (default_assembly_name_resolver): Kill memory leak.
31837 (default_assembly_name_resolver): Make the resolver take the
31838 "base" directory where the assembly was originally defined, so we
31839 can load DLLs that are in the same directory as the assembly that
31840 is being referenced.
31842 2002-03-28 Dick Porter <dick@ximian.com>
31848 * unicode.c: Warning cleanups
31850 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
31852 * object.h, reflection.h: use the correct type instead of MonoObject.
31854 2002-03-28 Martin Baulig <martin@gnome.org>
31856 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
31857 (mono_debug_update_symbol_file): Initialize classes if necessary.
31859 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
31861 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
31862 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
31864 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
31866 * assembly.h: fix function prototype.
31867 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
31868 * mono-endian.h: use const cast.
31870 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
31872 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
31874 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
31876 * loader.c: don't assert when a typeref can't be loaded, give
31877 a chance to the runtime to trow an exception instead.
31878 * loader.h: fix warning.
31880 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
31882 * class.c (mono_class_proxy_vtable): added proxy support
31884 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
31886 * icall.c: removed last of PAL calls, added System.Environment
31887 * file-io.h, file-io.c: MonoIO implementation
31888 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
31890 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
31892 * appdomain.c: do not use the byte marker in ldstr table lookup.
31893 * debug-helpers.c: allow two ':' to separate class and method name.
31894 * object.c: allocate arrays bounds with the GC, too.
31895 * verify: add a few more checks.
31897 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
31899 * reflection.c: output also literal strings. Allocate parameter data
31900 with GC_malloc() (thanks, Martin, for catching this!).
31902 2002-03-26 Martin Baulig <martin@gnome.org>
31904 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
31905 include the `this' offset in the `param_offsets'.
31907 2002-03-25 Martin Baulig <martin@gnome.org>
31909 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
31910 mono_debug_get_class() function to get the classes. Added new
31911 relocation types for arrays and strings.
31912 (mono_debug_get_class): New static function to search in all
31913 referenced assemblies for a metadata token.
31915 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
31917 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
31919 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
31920 hold gc-allocated objects. Make the string heap a stream like the
31921 others. Removed duplicated code when writing stream info.
31922 Added asserts to catch possible buffer overflows. Set the sorted map
31923 for tables that need sorting. Added some documentation.
31925 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
31927 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
31928 for interned strings and vtables.
31930 2002-03-24 Martin Baulig <martin@gnome.org>
31932 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
31933 it in the array since it was created with g_slist_prepend().
31935 2002-03-24 Martin Baulig <martin@gnome.org>
31937 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
31938 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
31939 (mono_debug_method_from_token): Renamed to
31940 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
31941 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
31943 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
31946 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
31948 2002-03-24 Martin Baulig <martin@gnome.org>
31950 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
31951 (mono_debug_method_from_token): New func.
31953 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
31954 New interncall, calls mono_debug_local_type_from_signature().
31955 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
31956 calls mono_debug_method_from_token().
31958 2002-03-23 Martin Baulig <martin@gnome.org>
31960 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
31961 specifies the number of bytes to be converted, not the array size.
31962 Return the number of chars, not the number of bytes.
31963 (ves_icall_iconv_get_chars): The `byteCount' argument
31964 specifies the number of bytes to be converted, not the array size.
31966 2002-03-23 Martin Baulig <martin@gnome.org>
31968 * reflection.h (MonoReflectionSigHelper): New type.
31970 * reflection.c (mono_reflection_sighelper_get_signature_local),
31971 (mono_reflection_sighelper_get_signature_local): New functions.
31973 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
31974 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
31977 2002-03-23 Martin Baulig <martin@gnome.org>
31979 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
31980 is_writeable is set.
31981 (mono_raw_buffer_update): New function to write the modified map
31984 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
31986 * debug-symfile.c (mono_debug_update_symbol_file): Call
31987 mono_raw_buffer_update() when done writing.
31989 2002-03-23 Martin Baulig <martin@gnome.org>
31991 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
31993 * debug-symfile.c: Added support for arguments and local variables.
31995 2002-03-23 Dick Porter <dick@ximian.com>
31997 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
31998 protected by ifdefs, hence breaking the w32 build.
32000 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32002 * object.c: implement is_interned() the right way.
32004 2002-03-21 Martin Baulig <martin@gnome.org>
32006 * debug-symfile.[ch]: New files to handle debugging information
32007 files. There's also support to dynamically update these symbol
32008 files to include machine dependent information.
32010 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
32012 * threads.c (mono_thread_create): new function to create thread
32015 2002-03-20 Martin Baulig <martin@gnome.org>
32017 * icall.c (ves_icall_InternalInvoke): Create a new object if the
32018 method is a constructor.
32019 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
32020 points to ves_icall_InternalInvoke().
32022 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
32024 * file-io.c: Flush shouldn't throw exceptions.
32026 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
32028 * file-io.c: FileStream flush support; FileSetLength now
32029 restores file pointer.
32031 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32033 * class.c: set image for pointer classes.
32035 2002/03/19 Nick Drochak <ndrochak@gol.com>
32037 * sysmath.c: Forgot one.
32039 2002-03-18 Miguel de Icaza <miguel@ximian.com>
32041 * sysmath.c: Avoid redefining existing names.
32043 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
32045 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
32046 handled by runtime as icall rather than dllimport from libm.so
32047 * file-io.c, file-io.h: fixed handle argument type.
32049 2002-03-18 Dick Porter <dick@ximian.com>
32051 * reflection.c (mono_image_get_type_info): rename interface to
32052 iface, because of "#define interface struct" on windows.
32054 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
32056 * class.c, class.h: rename and export mono_ptr_class_get().
32057 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
32058 * reflection.c, reflection.h, icall.c: better/saner type name
32059 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
32062 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
32064 * class.c (mono_class_init): removed hardcoded GHC_SLOT
32066 * icall.c (ves_icall_InternalInvoke): impl.
32068 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32070 * reflection.c: output the interface map table, too.
32072 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32074 * class.c (class_compute_field_layout): separate computation of
32075 static field layout
32077 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
32079 * icall.c: added System.Buffer support.
32080 * file-io.c: moved file icalls from PAL to FileStream.
32082 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32084 * icall.c (ves_icall_System_Object_GetHashCode): impl.
32086 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
32088 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
32090 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32092 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
32094 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32096 * debug-helpers.{c,h}: moved here from monograph some useful functions
32097 to locate a method by name/signature in a class or image. Included
32098 also a small and flexible IL disassembler.
32100 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32102 * reflection.c: fixup tokens in methods with small header size, too.
32104 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
32106 * object.c (mono_string_to_utf8): remove assert(!error), instead
32109 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
32111 * icall.c: update to the new mono_Array_class_get interface.
32113 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32115 * appdomain.c, object.c: Boehm-GC enable.
32116 * icall.c: make get_data_chunk() support split data requests.
32117 Ensure a class is initialized in more cases. Return only the first
32118 property found in GetProperties() or the compiler gets confused.
32119 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
32120 * reflection.h, reflection.c: add fixup mechanism for field and method
32121 tokens. Initialize assembly->typeref in a single place. Output
32122 properties after events. Support custom attributes for events, too.
32123 Typo fix for paramter custom attrs.
32125 2002-03-07 Martin Baulig <martin@gnome.org>
32127 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
32129 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
32131 * class.c (mono_array_class_get): fix. for multi. dim. arrays
32133 2002-03-06 Martin Baulig <martin@gnome.org>
32135 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
32136 non-zero lower bounds. See testcases #F10-#F13.
32138 2002-03-05 Martin Baulig <martin@gnome.org>
32140 * exception.c (mono_get_exception_argument_out_of_range): New exception.
32142 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
32143 ves_icall_System_Array_GetValue(), only calculate the absolute array position
32145 (ves_icall_System_Array_SetValue): Likewise.
32146 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
32147 as argument and does the actual work. This function is used when copying a
32148 multi-dimensional array.
32149 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
32150 now do all the widening conversions of value types.
32151 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
32153 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32155 * class.c: remove some magic numbers and use the smbolic names,
32156 instead. Added init_events() to load event info at class init time.
32157 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
32158 and mono_metadata_methods_from_event().
32159 * reflection.h, reflection.c: added support for writing out the evnets
32160 related information.
32162 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32164 * reflection.h, icall.c: use a different method (GetInterfaces)
32165 to gather interface info and add isbyref, isprimitive and
32166 ispointer to the ves_icall_get_type_info() return value.
32168 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32170 * class.h: stared adding support for events.
32171 * icall.c: split find_members implementation. Added debug icall to get
32172 the address of an object.
32173 * reflection.c: handle TypeBuilders in mono_type_get_object().
32175 2002-03-01 Martin Baulig <martin@gnome.org>
32177 * icall.c (ves_icall_System_Array_GetLength): This must throw an
32178 ArgumentOutOfRangeException(), not an ArgumentException().
32179 (ves_icall_System_Array_GetLowerBound): Likewise.
32180 (ves_icall_System_Array_GetValue): Improved argument checking.
32181 (ves_icall_System_Array_SetValue): Improved argument checking.
32183 2002-03-01 Martin Baulig <martin@gnome.org>
32185 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
32186 called with invalid arguments rather than just dying with g_assert().
32187 (ves_icall_System_Array_SetValue): Likewise.
32188 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
32189 raise a NotImplementedException instead.
32190 (ves_icall_System_Array_GetLength): Added argument checking.
32191 (ves_icall_System_Array_GetLowerBound): Added argument checking.
32193 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
32195 * object.h (mono_assert): new macros mono_assert and
32196 mono_assert_not_reached
32198 2002-02-28 Martin Baulig <martin@gnome.org>
32200 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
32201 and "System::String::IsInterned" to "System::String::_IsInterned".
32203 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
32205 * icall.c: remove hacks for typebuilder. Added icall to create a
32206 modified type from a tybebuilder.
32207 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
32208 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
32209 to create a backing MonoClass for a TypeBuilder.
32211 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32213 * class.c, class.h: more refactoring of class init.
32214 Export mono_class_setup_mono_type() and mono_class_setup_parent().
32216 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
32218 * marshal.c, marshal.h: start of marshaling interface.
32220 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
32222 * icall.c: fix order in assembly qualified name icall.
32224 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
32226 * class.c: do not free str, since we store it in the hash table.
32227 * reflection.h: add label field to MonoILExceptionInfo.
32228 * reflection.c: handle references to more than one assembly. Handle
32229 case when there isn't a module created in the assembly.
32231 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32233 * class.c: Fix typo. Start refactoring of class init code.
32235 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32237 * appdomain.c: exit with 1 on error.
32238 * class.c: we already have the name in MonoClassField.
32239 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
32240 MonoStreamHeader instead of an offset of image->raw_metadata.
32242 2002-02-26 Miguel de Icaza <miguel@ximian.com>
32244 * appdomain.c (mono_init): Be even more descriptive about the error.
32246 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
32248 * appdomain.c: give the user an informative message when corlib can't
32251 2002-02-26 Martin Baulig <martin@gnome.org>
32253 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
32254 New icall to get the time zone data.
32256 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32258 * reflection.c: set virtual and raw size of section correctly.
32259 * threads.c: transfer domain information to newly created threads.
32261 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
32263 * class.c: when instancing a class in a domain, load the default
32264 vaules for static fields from the constant table. Fix System.Enum to
32266 * icall.c: implement Object::GetType() internalcall. Implemented
32267 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
32268 Fixed checking of binding flags in find_members().
32269 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
32270 * reflection.c: handle enumerations when writing to the constant
32271 table. Use a different object cache for types.
32274 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
32276 * object.c (mono_object_isinst): fix for arrays
32278 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
32280 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
32282 * object.c: don't use mprotect () and fix intern pool hash table
32283 lookup for big endian systems.
32285 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32287 * icall.c: change type_is_subtype_of () signature.
32289 2002-02-21 Mark Crichton <crichton@gimp.org>
32291 * rand.c, rand.h: Added random number generator for
32292 System.Security.Cryptography classes.
32294 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
32296 * icall.c: Added System.Security.Cryptography calls.
32298 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
32300 * class.c, icall.c, metadata.c: better support for pointer types.
32301 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
32302 * reflection.c: Add support for getting custom attrs for properties
32303 and simplify some code.
32305 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32307 * icall.c: change getToken () and add custom attribute GetBlob()helper
32309 * reflection.h: add custom attrs array to the reflection builder structures.
32310 * reflection.c: encode and emit custom attributes for all the relevant
32311 reflection objects. Cache fieldref and methodref tokens. Change
32312 mono_image_create_token() interface to take a MonoDynamicAssembly.
32313 More complete custom attributes decoder. Load custom attributes for
32314 Assembly, Field, Method and Constructor objects, too. Make the
32315 returned array an Attribute[] one, not object[]. Added
32316 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
32317 custom attribute constructor.
32319 2002-02-20 Dick Porter <dick@ximian.com>
32323 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
32324 problem code out for now).
32326 2002-02-19 Radek Doulik <rodo@ximian.com>
32328 * object.c (mono_ldstr): use hash table to avoid multiple swapping
32330 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
32332 * icall.c: register the GetCustomAttributes method.
32333 * object.c, object.h: add mono_string_new_len ().
32334 * reflection.h, reflection.c: added mono_runtime_invoke(),
32335 mono_install_runtime_invoke(). Added
32336 mono_reflection_get_custom_attrs () to load custom attributes and
32337 create the attribute objects.
32339 2002-02-19 Dick Porter <dick@ximian.com>
32340 * threads-dummy-types.c:
32341 * threads-dummy-types.h:
32344 * threads-pthread-types.c:
32345 * threads-pthread-types.h:
32346 * threads-pthread.c:
32347 * threads-pthread.h: Deleted obsolete files
32349 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
32351 * class.c (mono_class_vtable): runtime init the class when we
32352 allocate static class data.
32354 * icall.c (ves_icall_System_Array_SetValue): check for null values.
32356 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
32357 and String - but we will need generic marshalling support in the
32359 (mono_init): set the domain name in a ms compatible way
32361 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
32364 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
32366 * object.c (mono_array_clone): use alloca() instead of g_malloc
32369 * appdomain.c (mono_domain_unload): impl.
32371 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32373 * appdomain.c, object.c: fix intern pool implementation.
32374 * class.c: fix alignment code.
32376 2002-02-16 Radek Doulik <rodo@ximian.com>
32378 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
32379 and s2 > s1, just copy lower bytes to be compatible with little
32380 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
32381 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
32383 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
32384 force big_endian to be 1 for big endian machines
32385 (ves_icall_iconv_new_decoder): ditto
32387 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
32389 * socket-io.c (convert_sockopt_level_and_name): If the system
32390 doesn't define SOL_IP or SOL_TCP, get them by hand using
32391 getprotobyname() and caching the values (because this could be a
32393 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
32394 Use the appropriate struct when the system does support it. Ie,
32395 not all systems have struct ip_mreqn so use struct ip_mreq when
32398 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
32400 * reflection.c: handle finally clauses.
32402 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
32404 * socket-io.c: use g_snprintf() instead of snprintf.
32406 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
32408 * reflection.c (mono_param_get_objects): Cast second argument to
32409 mono_method_get_param_names to a const char** to silence the
32412 * appdomain.c (mono_domain_assembly_open): Put parens around the
32413 truth statement in the for-loop.
32415 * unicode.c (iconv_convert): Got rid of a compiler warning about
32416 int i being unused when the system has a new iconv.
32417 (iconv_get_length): Same.
32419 * image.c (load_class_names): Cast the second argument to
32420 g_hash_table_insert() to char* to hush compiler warnings about the
32422 (mono_image_open): Same here.
32424 * socket-io.c: Don't conditionally include sys/filio.h or
32425 sys/sockio.h here anymore since we now get them from
32426 io-layer/io-layer.h
32427 (inet_pton): If the system doesn't support inet_aton, implement
32428 using inet_addr and also #define INADDR_NONE if it isn't defined
32431 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
32433 * metadata.c, metadata.h: added function to get packing and size info
32435 * reflection.h, reflection.c: handle field RVA data. Save info about
32436 the table layout if needed. Assign typedef indexes to all the types
32437 before dumping the info about them to avoid forward reference problems.
32439 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
32441 * socket-io.c (convert_sockopt_level_and_name): ifdef
32442 SO_ACCEPTCONN because it is not defined on my system (old debian)
32444 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32446 * opcode.c: use stddef.h to get NULL.
32448 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
32450 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
32451 for FIONBIO, FIONREAD and SIOCATMARK.
32452 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
32453 define INADDR_NONE and besides, inet_addr() is deprecated and
32454 should not be used. Use inet_pton() instead - it also has the
32455 added bonus that it can easily handle IPv6 addresses as well.
32456 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
32458 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32460 * decimal.c: remove _MSC_VER conditional.
32462 2002-02-13 Dick Porter <dick@ximian.com>
32465 * icall.c: Internal calls for Blocking, Select, Shutdown,
32466 GetSocketOption and SetSocketOption
32468 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32470 * assembly.cs: better resolver: use it instead of some kludgy
32473 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
32475 * reflection.c: the best way to speed-up the compiler is to avoid
32478 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
32480 * class.c (mono_class_vtable): changed the object layout
32481 (obj->vtable->class).
32482 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
32484 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32486 * assembly.c: look for assemblies in the assembly dir, too.
32488 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32490 * class.c: fix thinko in mono_class_from_type().
32492 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32494 * exception.h, exception.c: added TypeLoadException.
32495 * object.h, object.c: added mono_array_clone ().
32496 * icall.c: handle throwOnError in AssemblyGetType().
32497 Added Array.Clone().
32498 * opcode.h, opcode.c: use a single value for the opcode val.
32499 Compile fix for non-gcc compilers.
32501 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
32503 * opcodes.c, opcodes.h: export interesting info about opcodes.
32505 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
32507 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
32510 * class.c (class_compute_field_layout): set element_class for enums
32511 (mono_class_create_from_typedef): set element_class for normal classes
32513 * icall.c (ves_icall_System_Enum_get_value): impl.
32515 * class.c (mono_class_create_from_typedef): do not set valuetype
32516 flag for System.ValueType and System.Enum
32518 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
32520 * unicode.c (iconv_convert): fix big endian problem.
32522 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32524 * class.c: add asserts if we are ever going to scribble over memory.
32525 * socket-io.c: not all systems have AF_IRDA defined.
32527 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
32529 * class.c (class_compute_field_layout): do not consider static
32530 fields to compute alignment
32532 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
32534 * appdomain.c (mono_appdomain_get): impl.
32535 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
32537 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32539 * icall.c: ignore "file://" prefix when loading an assembly.
32541 2002-01-23 Dick Porter <dick@ximian.com>
32545 * Makefile.am: Added socket support
32547 2002-01-23 Miguel de Icaza <miguel@ximian.com>
32549 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
32550 code back. This should return the assemblies that are loaded by
32551 the runtime on behalf of an application domain.
32553 The current implementation is still broken, it just returns every
32554 assembly loaded, but until we get real applications domain this
32557 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
32559 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
32562 2002-01-23 Miguel de Icaza <miguel@ximian.com>
32564 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
32565 the mono_class_from_name lookup.
32566 (ves_icall_get_parameter_info): ditto.
32567 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
32569 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
32571 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
32573 * class.c: load also nested classes on class init.
32574 System.ValueType instance methods gets passed boxed
32575 values, unless methods in derived classed that get a pointer to the
32577 * icall.c: use better name parsing code in GetType().
32578 * image.c, image.h: add mono_image_loaded ().
32579 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
32580 * reflection.c, reflection.h: added mono_reflection_parse_type().
32582 2002-01-22 Veronica De Santis <veron78@interfree.it>
32584 * icall.c : Added mapping of internal calls for Manual and Auto reset events
32585 * threads.c : Added the implementation of internal calls for events
32586 * threads.h : Added prototypes of internal calls for events
32588 2002-01-21 Radek Doulik <rodo@ximian.com>
32590 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
32592 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
32594 * class.c (mono_class_init): set min_align to 1 (instead of 0)
32595 (mono_class_value_size): use min_align
32597 2002-01-20 Dick Porter <dick@ximian.com>
32600 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
32601 so it compiles on w32.
32603 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
32605 * metadata.c (mono_type_stack_size): impl.
32607 * class.c (mono_class_get_field): impl. memberref token
32609 2002-01-16 Veronica De Santis <veron78@@interfree.it>
32611 * icall.h : Added the internal calls mapping for CreateMutex_internal
32612 and ReleaseMutex_internal.
32613 * threads.h : Added the prototype of mutexes internal calls.
32614 * threads.c : Added the implementations of mutexes internal calls.
32616 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
32618 * metaparse.h: removed unused file.
32619 * reflection.c, reflection.h: added stream_data_align () function
32620 to align data in streams and keep stream aligned. Add support for
32621 exception support in method headers.
32623 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
32625 * unicode.c: make iconv_convert () return the number of bytess written
32626 in the output buffer.
32628 2002-01-15 Dick Porter <dick@ximian.com>
32629 * threads.c: Make the runtime's idea of infinite timeouts coincide
32630 with the class library's
32632 Fix a particularly egregious bug in mono_thread_cleanup(). That
32633 code was so utterly bogus it must have been written on a Monday.
32635 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
32637 * reflection.h: add subtypes field to TypeBuilder.
32638 * reflection.c: encode constants for literal fields.
32639 Handle subtypes. Fix user string token (and add a zero byte)
32642 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
32644 * class.c (mono_class_init): bug fix: assign slot numbers for
32647 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32649 * reflection.c: don't try to output a code RVA for abstract methods.
32650 Small fixes for method header format. Output parameter info to the
32651 ParamDef table. Save method overriding info to MethodImpl table.
32652 Fix property support. Allow typedef.extends to be a type in the
32654 * verify.c: fix off-by-one error.
32656 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
32658 * class.c: fix mono_class_from_mono_type () for szarray types.
32659 Remove unused cache check in mono_class_from_type_spec().
32660 * icall.c: *type_from_name () functions handle simple arrays and byref.
32661 * reflection.c: handle byref and szarray types. Handle methods without
32662 body (gets P/Invoke compilation working). Handle types and fields in
32664 * reflection.h: add rank to MonoTypeInfo.
32666 2002-01-10 Dick Porter <dick@ximian.com>
32668 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
32671 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
32673 * icall.c: initialize class in type_from_handle ().
32674 Loop also in parent classes for get_method ().
32675 * reflection.c: properly encode class and valuetype types.
32676 Start on encoding TypeBuilder types. Handle fieldrefs.
32677 Use correct length when registering a user string.
32678 Handle ConstructorBuilder and MonoMethod in get_token ().
32679 Make mono_type_get_object () aware of cached types.
32680 * object.c: back out change to mono_string_new ().
32682 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
32683 * object.c: mono_string_new should return a NULL when the string
32684 passed in is NULL -- not try to deference it.
32686 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
32688 * icall.c: hack to make IsSubType work for TypeBuilders.
32689 * reflection.c: emit constructors before methods.
32690 Retrieve param names in mono_param_get_objects().
32692 2002/01/05 Nick Drochak <ndrochak@gol.com>
32694 * Makefile.am: fix list of headers and sources so automake 1.5
32695 doesn't complain. Removed \# at end of list.
32697 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
32699 * reflection.c: get token for a method ref. Set return type of
32700 constructor to void.
32701 * loader.c: debug message.
32702 * class.c: typo fix.
32704 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
32706 * icall.c: fix array init with rank > 1. FindMembers
32707 loops in parent class as well.
32708 * image.c: do not insert nested types in name cache.
32709 * reflection.c: warning fix.
32710 * reflection.h: add override method (for interface impl).
32712 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
32714 * metadata.c: fix customattr decoding.
32716 2001-12-21 Miguel de Icaza <miguel@ximian.com>
32718 * rawbuffer.cs: Added native Win32 implementation, avoids using
32719 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
32721 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
32723 * class.c: make the low-level routines handle the cache.
32725 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
32727 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
32729 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
32731 * class.c: fix mono_array_element_size() for objects.
32732 * class.h, class.c: add properties to MonoClass and load them
32734 * icall.c: check with isinst() when assigning a value to an array
32735 instead of requiring the classes to match exactly.
32736 Implemented icall for System.Type::GetType().
32737 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
32738 enums. Handle bindingflags when looking for methods and fields.
32739 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
32740 and mono_metadata_methods_from_property().
32741 * reflection.h, reflection.c: added structures for propreties,
32742 parameters and enums. Implemented mono_property_get_object() and
32743 mono_param_get_objects().
32745 2001-12-18 Dick Porter <dick@ximian.com>
32747 * file-io.c: Use mono_string_to_utf16() instead of
32748 mono_string_chars()
32750 * object.c: Added mono_string_to_utf16(), which copies the non
32751 NULL-terminated MonoString into a new double-null-terminated
32754 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
32756 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
32758 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
32760 * file-io.c: raise exceptions if handle is invalid.
32762 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
32764 * assembly.c: yet another check for mscorlib.
32765 * class.c, class.h: load nesting info for classes.
32766 * icall.c: many new functions to support the Reflection classes.
32767 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
32768 * reflection.h, reflection.c: mono_image_create_token(),
32769 mono_assembly_get_object(), mono_type_get_object(),
32770 mono_method_get_object(), mono_field_get_object(): methods to return
32771 objects that parallel the C representation of assemblies, types,
32774 2001-12-11 Dick Porter <dick@ximian.com>
32777 * file-io.c: Internal calls for file IO.
32779 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
32781 * tabledefs.h: missing FileAttributes.
32782 * verify.h, verify.c: use is_valid_string () to simplify and check for
32783 valid strings more correctly. Fix warnings and speeling.
32784 Check more tables: Filed, File, ModuleRef, StandAloneSig.
32785 Check code: branches, maxstack, method calls.
32787 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
32789 * object.c (mono_object_allocate): removed static, so that the jit
32790 can allocate value types.
32792 * icall.c (ves_icall_System_DateTime_GetNow): impl.
32794 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
32796 * class.c: init enum types right away and register the
32797 token->MonoClass map in mono_class_create_from_typedef ().
32798 * verify.h, verify.c: first cut of the verifier.
32799 * pedump.c: add --verify switch to verify metadata tables.
32800 * tabledefs.h: add some missing enums.
32802 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
32804 * class.c (mono_install_runtime_class_init): impl.
32805 (mono_class_init): renamed mono_class_metadata_init to
32806 mono_class_init, also removed the metadata_inited flag
32808 * object.c (mono_object_isinst): use faster algorithm
32810 2001-11-30 Radek Doulik <rodo@ximian.com>
32812 * mono-endian.h: reverted last change
32813 added function prototypes
32815 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
32816 add mono-endian.c back
32818 * mono-endian.c: returned back, as Paolo pointed out, it's needed
32819 for unaligned access, I've mistaked it with endianess. I am
32821 (mono_read16): fix reverted endianess
32822 (mono_read64): ditto
32823 (mono_read32): ditto
32825 2001-11-30 Dick Porter <dick@ximian.com>
32827 * exception.c: Implement mono_exception_from_name()
32829 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
32831 * metadata.h, metadata.c: remove params_size and locals_size and their
32832 calculation from the metadata code: they are only usefult to the
32835 2001-11-29 Radek Doulik <rodo@ximian.com>
32837 * object.c (mono_ldstr): swap bytes here, it's probably not the
32838 best place, but works for me now, I'll redo it once I know mono
32839 better, also note that I add PROT_WRITE and don't reset back, also
32840 note that it's only affects big endians, so x86 should be OK
32842 * mono-endian.h (read16): use just glib macros for both endians
32844 * mono-endian.c: removed as glib macros are used in in
32845 mono-endian.h so we don't need to care about endianess for read
32846 macros as glib does that for us already
32848 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
32850 * class.h, class.h: take minimum alignment into consideration so
32851 that the fields of a class remain aligned also when in an array.
32853 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
32855 * loader.h, loader.c: add mono_method_get_param_names().
32856 * class.c: 0-init class fields.
32858 2001-11-26 Dick Porter <dick@ximian.com>
32862 * threads.c: New file that handles System.Threading on all platforms
32865 * object.h: Remove the synchronisation struct from MonoObject,
32866 replace it with a pointer that gets initialised on demand
32868 * Makefile.am: Replace all the system-specific threading code with
32869 a single file that uses the new wrapper library
32871 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
32873 * class.c, class.h: add mono_install_trampoline() so that the runtime
32874 can register a function to create a trampoline: removes the ugly
32875 requirement that a runtime needed to export arch_create_jit_trampoline.
32876 * object.h, object.c: added mono_install_handler() so that the runtime
32877 can install an handler for exceptions generated in C code (with
32878 mono_raise_exception()). Added C struct for System.Delegate.
32879 * pedump.c: removed arch_create_jit_trampoline.
32880 * reflection.c: some cleanups to allow registering user strings and
32881 later getting a token for methodrefs and fieldrefs before the assembly
32883 * row-indexes.h: updates and fixes from the new ECMA specs.
32885 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
32887 * class.h, class.c: add enum_basetype field to MonoClass.
32888 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
32889 to get index in the constant table reated to a field, param or
32891 * reflection.h, reflection.c: handle constructors. Set public-key and
32892 version number of the built assembly to 0.
32893 * row-indexes.h: update from new ECMA spec.
32895 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
32897 * class.h, class.c: add a max_interface_id to MonoClass.
32898 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
32899 since it's used to do that. Added mono_type_type_from_obj().
32900 Make GetType() return NULL instead of segfaulting if the type was not
32901 found. Handle simple arrays in assQualifiedName.
32902 * object.h: add a struct to represent an Exception.
32903 * reflection.c: output call convention in method signature.
32904 Add code to support P/Invoke methods and fixed offsets for fields.
32906 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
32908 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
32910 * icall.c: use mono_array_addr instead of array->vector: fixes the
32911 reflection image writing.
32912 * reflection.c: init call convention byte to 0 in method signature.
32913 Encode the property signature. Don't output property-related methods
32914 twice. Really process the properties for a type (don't cast a field to
32915 a property, my mom always told me that).
32916 Fix 64 bit issues in pointer alignment in a different and more
32919 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
32921 * loader.h: Removed type class from MonoDefaults, added monotype
32923 * loader.c: Loaded MonoType, removed loading of Type
32925 * icall.c (my_mono_new_object): Now returns a System.MonoType,
32926 and fills in System.Type._impl with a RuntimeTypeHandle rather
32927 than the actual MonoClass *
32929 (ves_icall_type_from_handle): change from type_class to
32932 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
32935 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
32938 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
32940 (ves_icall_System_Reflection_Assembly_GetType): implemented
32942 (ves_icall_System_MonoType_assQualifiedName): implemented
32944 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
32946 2001-11-09 Miguel de Icaza <miguel@ximian.com>
32948 * assembly.c (mono_assembly_open): Implement a cache for the
32951 (mono_assembly_close): only destroy the assembly when the last
32954 2001-11-09 Dick Porter <dick@ximian.com>
32956 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
32958 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
32960 * class.c (mono_class_metadata_init): bug fix: compute the right slot
32962 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
32964 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
32965 from Martin Weindel.
32966 * object.h: add mono_string_chars ().
32968 2001-11-07 Miguel de Icaza <miguel@ximian.com>
32970 * reflection.c (build_compressed_metadata): Eliminates warnings
32971 and uses 64-bit clean code.
32973 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
32974 (mono_type_equal): Change signature to eliminate warnings.
32976 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
32978 * icall.c, loader.c: remove the internalcall array constructors.
32979 Changes to match the new MonoArray structure.
32980 * object.h, object.c: an array object doesn't allocate an extra
32981 vector. Add mono_array_new_full () to create jagged arrays easily.
32983 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
32985 * metadata.h, metadata.c: add mono_metadata_field_info () to
32986 retreive all the info about a field from vairous tables.
32987 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
32988 * class.h, class.c: augment MonoClassField with more info.
32989 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
32990 policy and load a field's RVA if needed.
32992 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
32994 * class.c (mono_class_metadata_init): create a trampoline for all
32995 virtual functions instead of actually compiling them.
32997 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
32999 * class.h, class.c: include name in MonoClassField.
33000 * class.c: fix fundamental type of System.Object and System.String.
33001 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
33003 * icall.c: remove internalcalls for the Reflection stuff that is now
33005 * loader.c: mono_field_from_memberref () implementation.
33006 * mono-endian.c: thinko (s/struct/union/g).
33007 * object.c, object.h: make the mono_string_* prototypes actually use
33008 MonoString instead of MonoObject.
33009 * reflection.c, reflection.h: updates for changes in the reflection
33010 code in corlib: we use C structures that map to the actual C# classes.
33011 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
33012 fat method header if needed and use the info from the ILGenerator for
33013 methods. Handle fields in types. Misc fixes.
33015 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
33017 * class.c (mono_class_metadata_init): bug fix: always allocate
33018 space for static class data
33020 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
33022 * class.c (mono_compute_relative_numbering): use relative
33023 numbering to support fast runtime type checks.
33025 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
33027 * class.c (mono_class_create_from_typeref): added debugging output
33028 to print class name when MonoDummy is returned instead of real class
33030 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
33032 * class.c (mono_class_metadata_init): interface offset table now
33033 contains pointers into the vtable - this is more efficient for the jit
33035 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
33037 * class.c (mono_class_metadata_init): use a temporary vtable (the
33038 old algorithm only worked for the interpreter, but not for the jit)
33040 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
33042 * loader.c (method_from_memberref): use mono_class_get to get the
33043 class of an array instead of using System.Array directly.
33044 (mono_get_method): also add MEMBERREF methods to the method cache
33045 which usefull for arrays.
33047 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
33049 * pedump.c (arch_compile_method): added to compute vtable entry
33051 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
33052 number of interfaces.
33054 * class.h: merged MonoArrayClass into MonoClass
33056 * class.c (mono_class_create_from_typedef): compute the vtable size and
33057 allocate space to include the vtable inside MonoClass
33058 (mono_class_metadata_init): initialize the vtable
33060 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
33062 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
33063 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
33064 * image.c: endian fixes by Laurent Rioux.
33065 * object.h, object.c: rename MonoStringObject to MonoString and
33066 MonoArrayObject to MonoArray. Change some function names to conform to
33067 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
33068 guint16* as first argument, so don't use char*.
33069 Provide macros to do the interesting things on arrays in a portable way.
33070 * threads-pthread.c: updates for the API changes and #include <sched.h>
33071 (required for sched_yield()).
33072 * icall.c: updates for the API changes above.
33073 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
33074 platforms that need them.
33076 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33078 * class.c: set the correct type for all the fundamental
33079 type when loading the class.
33081 2001-10-05 Dick Porter <dick@ximian.com>
33083 * threads-pthread.c (pthread_mutex_timedlock): Simple
33084 compatibility version for C libraries that lack this call.
33086 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33088 * class.c: MonoTypes stored in MonoClass are stored as
33089 fundamental MonoTypes when the class represents a
33090 fundamental type (System.Int32, ...).
33091 The TypeHandle return by ldtoken is a MonoType*.
33092 * icall.c: ves_icall_get_data_chunk () write out all the
33093 PE/COFF stuff. Implement ves_icall_define_method (),
33094 ves_icall_set_method_body (), ves_icall_type_from_handle ().
33095 * image.c: properly skip unknown streams.
33096 * loader.h, loader.c: add type_class to mono_defaults.
33097 * metadata.c, metadata.h: export compute_size () as
33098 mono_metadata_compute_size () with a better interface.
33099 Typo and C&P fixes.
33100 * pedump.c: don't try to print the entry point RVA if there is no entry point.
33101 * reflection.c, reflection.h: many cleanups, fixes, output method
33102 signatures and headers, typedef and typeref info, compress the metadata
33103 tables, output all the heap streams, cli header etc.
33104 * row-indexes.h: typo fixes.
33106 2001-10-04 Dick Porter <dick@ximian.com>
33108 * object.h: Add a synchronisation mutex struct to MonoObject
33110 * object.c (mono_new_object): Initialise the object
33111 synchronisation mutexes
33113 * icall.c: System.Threading.Monitor internal calls
33115 * threads-pthread.h:
33116 * threads-pthread.c: System.Threading.Monitor internal calls
33118 * threads-types.h: New file, includes the system-specific thread
33121 * threads-pthread-types.h:
33122 * threads-pthread-types.c: New files, handle pthread-specific
33123 synchronisation types
33125 * threads-dummy-types.h:
33126 * threads-dummy-types.c: New files of dummy support for
33127 thread-specific types
33131 * pedump.c: include mono-endian.h not endian.h
33133 * Makefile.am: More threads files.
33134 Name mono-endian.h not endian.h
33136 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
33138 * Makefile.am, reflection.h, reflection.c: move here the reflection related
33139 stuff and implement a few more bits.
33140 * icall.c: a field needs to be dereferenced twice. Do not use the same
33141 name for two variables in the same scope.
33142 * image.c, image.h: cleanups.
33144 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
33146 * class.c (mono_class_metadata_init): bug fix: compute the right size
33148 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
33150 * icall.c: implemented some of the Reflection internalcalls.
33151 * image.c, image.h: start writing out the PE/COFF image.
33152 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
33153 that does the reverse than decode_blob_size ().
33154 * object.c: use mono_metadata_encode_value (). Move here
33155 temporary implementation of mono_string_to_utf8 ().
33156 * rawbuffer.c: make malloc_map static.
33158 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33160 * metadata.c: fix type comparison for arrays.
33161 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
33162 Added a couple of new classes to monodefaults.
33163 * icall.c: added a couple of Reflection-related internalcalls.
33164 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
33165 Added a byval_arg MonoType to MonoClass.
33167 2001-09-28 Dick Porter <dick@ximian.com>
33170 * threads-pthread.h:
33171 * threads-pthread.c: Implemented internal calls for
33172 LocalDataStoreSlot operations. Applied mutexes around all shared
33173 data. Reworked the thread creation and Start() operations to
33174 avoid a race condition.
33177 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
33179 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
33181 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
33183 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
33185 * class.c, loader.c: warn and return NULL instead of erroring out.
33186 * icall.c: added System.AppDomain::getCurDomain().
33187 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
33189 2001-09-25 Dick Porter <dick@ximian.com>
33191 * threads-pthread.h:
33192 * threads-pthread.c: Implemented timed thread joining and added
33193 System.Threading.Thread::Join_internal internal call
33195 * icall.c: Added System.Threading.Thread::Join_internal internal call
33198 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
33200 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
33202 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
33203 mono_string_intern () to implement the semantics of the ldstr opcode
33204 and the interning of System.Strings.
33205 * icall.c: provide hooks to make String::IsIntern and String::Intern
33208 2001-09-23 Dick Porter <dick@ximian.com>
33211 * threads-dummy.h: New files of dummy threading routines
33213 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
33214 support code based on system specifics
33216 Rename PTHREAD_LIBS to THREAD_LIBS
33218 2001-09-23 Dick Porter <dick@ximian.com>
33220 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
33221 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
33223 (mono_thread_init): Set up a Thread object instance to return when
33224 the main thread calls Thread.CurrentThread
33225 (mono_thread_cleanup): Wait for all subthreads to exit
33227 * icall.c: New internal calls for System.Threading.Thread::Sleep
33228 (including Schedule) and CurrentThread
33230 * threads.h: New file, to insulate thread-specific stuff from the
33233 2001-09-21 Dick Porter <dick@ximian.com>
33235 * threads-pthread.h:
33236 * threads-pthread.c: New file, for handling pthreads-style
33237 threading support. Start() now starts a new thread and executes
33238 the ThreadStart delegate instance.
33240 * icall.c: Added the internalcall for
33241 System.Threading.Thread::Start_internal
33243 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
33245 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
33247 * loader.c: work around the different signatures for delegates
33248 constructors csc generates in compiled code vs the ones compiled in mscorlib.
33250 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
33252 * class.h, class.c: add mono_class_get_field_from_name ().
33253 * *: Fix C comments and other ANSI C issues.
33255 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
33257 * endian.h, assembly.c: fix some endianness issues.
33259 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
33261 * loader.h, load.c: add delegate_class to mono_defaults.
33262 Handle runtime provided methods in mono_get_method ().
33264 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
33266 * loader.c (mono_get_method): use pinvoke for internal call
33268 * icall.c: use pinvoke for internal call
33270 * loader.c (method_from_memberref): set the method name
33272 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
33274 * metadata.c: help the compiler generate better code for
33275 mono_class_from_mono_type ().
33277 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
33279 * class.c (mono_class_metadata_init): delayed computing of the
33280 class size to mono_class_metadata_init ()
33282 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
33284 * class.c, class.h: add an interfaces member to MonoClass.
33285 * image.c, image.h: add assembly_name field to MonoImage
33286 from the assembly table.
33287 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
33289 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
33291 * class.c: Handle Array in mono_class_from_mono_type ().
33292 * metadata.c, pedump.c: some endian fixes.
33294 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33296 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
33297 * metadata.c: fix small problem introduced with the latest commit.
33299 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
33301 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
33302 We don't need a MonoMetadata pointer anymore to compare signatures in
33303 mono_metadata_signature_equal (), update callers.
33304 Reduced memory usage an number of allocations for MonoMethodHeader and
33305 MonoMethodSignature.
33307 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
33309 * metadata.c: added compare for szarray.
33311 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
33313 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
33314 and add a couple more types to it and mono_defaults. Give an hint on
33315 classes that need implementing in our corlib and are referenced
33318 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
33320 * class.h, class.c: keep track if a class is also an Enum.
33321 * loader.c: Implement a couple more types for use in libffi
33322 marshalling. Gives better diagnostics when failing to dlopen
33323 a library. Set method->klass for P/Invoke methods, too.
33325 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
33327 * class.c, class.h: add a MonoType this_arg to MonoClass that
33328 represents a pointer to an object of the class' type that
33329 can be used by the interpreter and later the type cache.
33330 Add best guess alignment info for valuetype objects.
33332 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
33334 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
33335 into MonoType: one less level of indirection and allocation and
33336 simplifies quite a bit of code. Added cache for MonoTypes that are
33337 used frequently, so that we don't need to allocate them all the time.
33339 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
33341 * class.c (mono_class_create_from_typedef): System.Enum is also a
33342 value type, although it does not derive from System.ValueType
33343 (maybe a bug in the ms compiler?)
33345 * metadata.c (mono_type_size): return the right size for value types
33347 * loader.c (mono_get_method): only initialize method header if not abstract
33349 * class.c (mono_class_from_mono_type): use mono_default values.
33351 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
33353 * *: use MonoClass pointers instead of <type_tokens>
33355 * class.h: new flag: metadata_inited.
33357 * class.c (mono_class_metadata_init): impl.
33358 (mono_class_instance_size): impl.
33359 (mono_class_data_size): impl.
33361 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33363 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
33364 MonoClass now has the name and name_space fields.
33365 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
33366 mono_get_method () takes and optional MonoClass as argument.
33367 Removed mono_typedef_from_name() and added mono_class_token_from_name()
33368 instead that takes advantage of a map from class names to typedef
33369 tokens in MonoImage.
33371 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
33373 * metadata.c: zero is not a valid alignment boundary.
33374 Merge MONO_TYPE_VOID in default decoding code.
33376 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
33378 * image.h: merged MonoMetadata into MonoImage
33380 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
33381 identify the type of elements.
33383 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
33385 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
33386 * cil-coff.h: split MonoMSDOSHeader and add size info.
33387 * image.c: add some consistency checks.
33388 * metadata.c: fix row size computation: one programmer
33389 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
33390 add explanation for the locator routine.
33391 Fix decoding of size in method header.
33393 2001-08-20 Miguel de Icaza <miguel@ximian.com>
33395 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
33396 (g_concat_dir_and_file): Bring g_concat_dir_and_file
33397 function from gnome-libs. This uses the right path separator
33398 based on the OS, and also works around a bug in some systems where
33399 a double slash is not allowed.
33400 (default_assembly_name_resolver): Use g_concat_dir_and_file
33401 (mono_assembly_open): ditto.
33403 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
33405 * metadata.c (mono_metadata_signature_equal): impl.
33407 * *: void is now a realy MonoType (instead of using NULL)
33409 * metadata.c (do_mono_metadata_parse_type): use
33410 mono_metadata_parse_type to parse void value.
33412 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
33414 * metadata.c, metadata.h: in the signature and method header store
33415 only the space required for holding the loca vars and incoming arguments.
33417 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
33419 * metadata.c (do_mono_metadata_parse_type): treat void like any
33420 other type (instead of assigning NULL);
33422 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
33424 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
33426 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
33428 * image.c (do_mono_image_open): added a cache for arrays.
33430 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
33432 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
33433 decode a single column from a row in a metadata table and changes
33434 to take advantage of it in the typedef locator (gives a nice speed up).
33435 Store offset info for function params.
33437 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
33439 * image.h (MONO_IMAGE_IS_CORLIB): removed
33441 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
33443 * assembly.c: how could mono_assembly_close () had ever worked?
33444 * metadata.c, metadata.h: provide offset info for local vars.
33445 Implement mono_type_size () to take care of alignment as well
33446 as size (it was mono_field_type_size in cli/class.c before).
33448 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
33450 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
33452 * assembly.h (CORLIB_NAME): set to corlib.dll
33454 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
33456 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
33458 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
33459 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
33460 tokentype.h: massive namespace cleanup.
33462 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
33464 * metadata.h, metadata.c: decode exception clauses when parsing method header.
33466 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
33468 * metadata.c (mono_metadata_free_type): added check for type !=
33469 NULL (void) before calling mono_metadata_free_type()
33471 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
33473 * metadata.h, row_indexes.h: added header with enumerations to use
33474 to index in the columns from tables in metadata and to decode coded
33475 tokens: we should start using this instead of embedding magic numbers
33478 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
33480 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
33481 Move metadata_t info from cli_image_info_t to MonoImage, where
33482 it's easily accessible. Changed all the uses accordingly.
33483 Added the method and class caches to MonoImage.
33484 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
33485 and mono_metadata_decode_value () signature to be more consistent
33486 with the other parse functions (and simplify code). Taken advantage
33487 of zero-length array allocation with GCC. Removed reduntant (and
33488 wrong) MonoFieldType struct and use MonoParam instead. Changed
33489 mono_metadata_parse_field_type () to use common code for parsing.
33490 Added mono_metadata_typedef_from_field () and
33491 mono_metadata_typedef_from_method () to lookup a typedef index from a
33492 field or method token.
33493 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
33495 2001-07-23 Miguel de Icaza <miguel@ximian.com>
33497 * metadata.c (mono_metadata_parse_field_type): Implement.
33498 (do_mono_metadata_parse_type): Split engine from
33499 mono_metadata_parse_type, so that we can create smaller structures
33500 for things that just have one pointer to the MonoType (look at
33503 2001-07-20 Miguel de Icaza <miguel@ximian.com>
33505 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
33506 as Jan Gray found out, it is incorrect.
33508 2001-07-18 Miguel de Icaza <miguel@ximian.com>
33510 * assembly.c: Implement asssembly loading. This loads an image
33511 and loads all the referenced assemblies. Come to think of it, we
33512 could always do lazy loading of the assemblies.
33514 * image.c (mono_image_open): Keep loaded images in a hashtable.
33516 * image.h (MonoImage): Add reference count.
33518 2001-07-17 Miguel de Icaza <miguel@ximian.com>
33520 * assembly.c (mono_assembly_open): Keep track of the file name in
33521 case the assembly has no ASSEMBLY table.
33523 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
33526 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
33528 * metadata.c, metadata.h: decode local vars in method header
33529 parse function. Change callers accordingly.
33531 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
33533 * metadata.h, cil-coff.h: protect against multiple inclusion.
33534 Added some new structures to hold information decoded from metadata:
33535 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
33536 and relevant decoding/free functions.
33537 * metadata.c: implement decoding functions. Add warning for out of bounds
33538 index in mono_metadata_locate(). Implement mono_get_method () to retreive
33539 all the info about a method signature and invocation. Remove check on
33540 uninitialized local var in parse_mh() and fix memory leak.
33542 2001-07-12 Miguel de Icaza <miguel@ximian.com>
33544 * metadata.h: More macros.
33546 * tokentype.h: New file.
33548 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
33550 * assembly.c: added a consistency check and initialize
33551 some structures with g_new0().
33552 * metadata.c: fixed a couple more bugs in table size computation
33553 and add other checks for out-of bound access to metadata.
33555 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
33557 * metatada.c: fix bugs computing table sizes. Spew a
33558 warning when index in string heap is out of bounds.
33560 2001-07-04 Miguel de Icaza <miguel@ximian.com>
33562 * metadata.h: Add a couple of macros to manipulate tokens.
33564 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
33566 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
33567 cli_section_tables).
33569 2001-07-01 Miguel de Icaza <miguel@ximian.com>
33571 * metadata.c (mono_metadata_user_string): New function, provides
33572 access to the UserString heap.
33574 2001-06-27 Miguel de Icaza <miguel@ximian.com>
33576 * metadata.c: Add inline documentation.
33578 2001-06-26 Miguel de Icaza <miguel@ximian.com>
33580 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
33583 2001-06-22 Miguel de Icaza <miguel@ximian.com>
33585 * typeattr.h: New file, TypeAttribute flags.
33587 2001-06-21 Miguel de Icaza <miguel@ximian.com>
33589 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
33590 mono_assembly_ensure_section): Section loading code.
33591 (load_section_tables): Load the sections.
33593 * mono/metadata/metadata.c (mono_metadata_locate_token,
33594 mono_metadata_locate): Functions to locate the information
33595 definition given a token or a table and an index.
33596 (mono_metadata_compute_table_bases): New.
33597 (compute_size): New function to compute the sizes of the various
33600 * mono/metadata/metadata.h: Finish listing the different index
33603 * mono/metadata/pedump.c: Improve to dump new information.
33605 2001-06-19 Miguel de Icaza <miguel@ximian.com>
33607 * mono/metadata/metadata.c: Entered all the tables matching
33610 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2