1 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3 * class-internals.h: Add mono_class_vtable_full function that allows control
4 if an exception should be raised or not.
6 * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
7 to do what its documentation say, that is to return NULL and set exception_type on
10 * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
11 and change the code to honor it.
13 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
15 * verify.c: Fix typo in error message.
17 2009-09-10 Sebastien Pouliot <sebastien@ximian.com>
19 * security-core-clr.c: Fix default_platform_check so it can run
20 the runtime coreclr tests (without an infinite recursion when
21 throwing an exception).
23 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
25 object.c (mono_delegate_ctor_with_method): Guard against null method.
27 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
29 * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
30 that should be replaced with error handling later.
32 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
34 * marshal.c (mono_delegate_end_invoke): Fix warning.
36 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
38 * loader.c (mono_field_from_token): Properly handle invalid
41 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
43 * pedump.c (verify_image_file): Skip types that can't be
46 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
48 * verify.c: Look for recursive valuetypes only against the
49 type been initialized as this is a lot simpler and works.
51 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
53 * verify.c: Ensure that fields are properly loaded before
56 2009-09-10 Bill Holmes <billholmes54@gmail.com>
58 * object.c (mono_object_get_virtual_method) : Call
59 mono_cominterop_get_invoke if the object is a COM object.
61 Code is contributed under MIT/X11 license.
63 2009-09-09 Rodrigo Kumpera <rkumpera@novell.com>
65 * verify.c: Check for recursive valuetype definitions.
67 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
69 Use inheritance-aware interface offsets. Inherited types use the same offsets
70 of their parents. This reduce offset duplication in case more than one type in
71 the inheritance tree explicitly implements the same interface.
73 This also removes a source of vtable bubbles found in #532409. An abstract type
74 isn't required to provide abstract methods to all interfaces it implements, which
75 resulted in a bubble with the previous scheme as the child would get a non-full
76 vtable from its parent. We fail all concrete types with vtable bubbles, so this
79 This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
80 it's expected to not cause any significant increase beyond that.
82 * class.c (setup_interface_offsets): Compute super class iface offsets
83 first to force sharing.
85 * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
86 dumping only the relevant ones.
88 * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
89 methods a new slot regardless if they belong to an interface or not. This allows
90 an inherited type to override the iface method separately from the class one.
92 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
94 * threadpool.c: make the Sleep() alertable to prevent delays exiting
95 applications that take less than 2s to execute.
98 2009-09-04 Zoltan Varga <vargaz@gmail.com>
100 * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
102 * object.c (mono_get_runtime_callbacks): New helper function to return
103 the runtime callbacks.
105 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
106 mono_get_runtime_build_info () as the display name.
108 2009-09-03 Zoltan Varga <vargaz@gmail.com>
110 * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
111 argument, since NEWARR expects a native int. Fixes #481559.
113 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
115 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
116 against broken SRE methods.
118 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
120 * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
121 a NULL variable. Abort early on failure.
123 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
125 * class.c (can_access_type): Fail visibility test for non nested
126 types with nested visibility.
128 2009-09-02 Sebastien Pouliot <sebastien@ximian.com>
130 * assembly.c (parse_public_key): Avoid allocating (and not
131 freeing) the public key array when it's not requested by the
133 * threads.c (mono_thread_manage, mono_thread_create_internal,
134 ves_icall_System_Threading_Thread_Thread_internal): Free
135 allocated memory on error.
137 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
139 * icall.c, icall-def.h: Remove some dead code from early SRE changes.
141 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
143 * class.c (mono_class_setup_fields): Remove duplicated local variable
145 Rename gklass to gtd to reflect the fact that it points to the generic
147 Remove the duplicated call to mono_class_setup_fields on gtd and move
148 the error check to the beginning.
150 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
152 * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
153 Remove cruft of the previous patch.
155 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
157 * metadata-verify.c (verify_method_table): Check for abstract + final.
160 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
162 * verify.c (verify_class_fields): Check for duplicate fields.
164 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
166 * metadata-verify.c: Verify the typeref table for duplicates.
168 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
170 This reverts r140936 and properly handles interfaces with static methods. The
171 right fix is to ensure vtables without bubles which is an easier to verify
172 constraint. We should avoid such special cases as of the reverted patch as those
173 only make the runtime more brittle.
175 * class.c (mono_class_setup_vtable_general): Revert previous change that handle
176 static methods on interfaces.
178 * class.c (setup_interface_offsets): Use the number of virtual methods when
179 calculating interface offsets instead of the number of methods. This way we
180 avoid bubles on the layout.
182 2009-08-31 Rodrigo Kumpera <rkumpera@novell.com>
184 * metadata-verify.c (verify_metadata_header): Some very smart
185 obfuscators like to add extra stream headers. Ignore them.
187 2009-08-30 Zoltan Varga <vargaz@gmail.com>
189 * class.c (mono_class_setup_vtable_general): Verify interfaces with static
192 2009-08-29 Rodrigo Kumpera <rkumpera@novell.com>
194 * metadata-verify.c: Verify for duplicated types.
196 2009-08-28 Rodrigo Kumpera <rkumpera@novell.com>
198 * metadata-verify.c (verify_typedef_table): Verify for nested types
199 without an entry on the nested class table.
201 2009-08-28 Zoltan Varga <vargaz@gmail.com>
203 * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
204 <tom_hindle@sil.org>. Add locking around hash table accesses.
206 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
208 * verify.c (mono_verifier_verify_class): Verify all interface if
209 really are interfaces. Fixes #534184.
211 2009-08-27 Rodrigo Kumpera <rkumpera@novell.com>
213 * pedump.c: Initialize all types during metadata validation so we report
214 errors only detected as part of class initialization.
216 2009-08-26 Rodrigo Kumpera <rkumpera@novell.com>
218 * metadata-verify.c (verify_method_table): PInvoke requires method to
219 be static. Fixes #534189
221 2009-08-26 Zoltan Varga <vargaz@gmail.com>
223 * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
226 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
228 * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
229 for holes or bad methods. Fixes #525314.
231 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
233 * class.c (setup_interface_offsets): Don't allocate slot
234 for the same interface multiple times. This creates bubbles
235 that waster space and make vtable verification harder.
237 The same interface get a slot multiple times since we need
238 to get the closure of all implemented interfaces, which means
239 the same interface is reported multiple times.
241 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
243 * verify.c (mono_verifier_verify_class): Don't check the fields
244 of generic instances since the context on which they got expanded
245 might lead to false positives.
247 Such thing happens when a generic type is inflated in the context
248 of a generic method and the inflated type of a field turns into a
249 generic method argument, which causes the checking code to think
250 it's an invalid class when it's not.
252 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
254 * verify.c (mono_type_is_valid_in_context): Verify if type
255 is NULL and remove duplicate test.
257 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
259 * verify.c (mono_verifier_verify_class): Check fields for
260 invalid generic arguments.
262 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
264 * class.c (verify_class_overrides): Verify if for static
265 and non virtual methods.
267 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
269 * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
270 Check for errors after retrieving the vtable.
272 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
274 * class.c (mono_class_setup_vtable_general): Verify
275 if method overrides are valid before processing them.
277 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
279 * marshal.c (mono_array_to_lparray): Fix minimal build with
282 * marshal.c (mono_free_lparray): Same.
284 2009-08-21 Mark Probst <mark.probst@gmail.com>
286 * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
287 the hash function for the ares_htable.
289 2009-08-20 Rodrigo Kumpera <rkumpera@novell.com>
291 * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
292 bit for assembly flags. MS is ok with it but there is no spec anywhere
295 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
297 * class.c (mono_class_create_from_typedef): Emit profiler events
300 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
302 * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
303 Release memory on failure.
305 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
307 * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
310 * metadata.c (get_constraints): Use a single-linked table as we don't
311 traverse it backward. Fail and return FALSE if only of the contraint types
314 * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
315 to mono_metadata_load_generic_param_constraints except for having a return value.
316 This has to be done since the later is part of the public API.
318 * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
321 * loader.c (mono_get_method_from_token): Properly check the loading of constraints
324 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
326 * metadata-verify.c (is_valid_method_header): Add work-around to deal
327 with MS broken behavior of emmitting EH section sizes without the
330 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
332 * metadata.c (mono_type_create_from_typespec): Don't allocate image
333 memory until we're sure that we'll need it. This avoids leaking for
334 broken types or duplicated instantiation.
336 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
338 * metadata-verify.c (is_valid_method_header): Fix stupid formating
341 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
343 * metadata-verify.c (is_valid_method_header): Fix number of clauses
344 and expected size calculation.
346 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
348 * class.c (mono_class_get_field_idx): Add fixme for broken
349 behavior for types with multiple fields with the same name.
350 I would rather fix it, but have no idea on how to generate
351 such artifact for testing.
353 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
355 * verify.c (verifier_load_field): We should allow references to
356 fields to be made using the generic type definition. It's up to
357 the loader system to fail invalid ops.
359 * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
362 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
364 * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
366 * metadata-internals.h: Fix declaration of
367 mono_metadata_interfaces_from_typedef_full.
369 * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
370 heap_alloc_result parameter that controls if the result should be
373 * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
374 array be g_malloc'd and properly document this public API function.
376 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
378 * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
379 remove METHOD_HEADER_TINY_FORMAT1.
381 * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
383 * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
385 Both spec and MS uses only 2 bits to enumerate the kind of header.
386 So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
387 is superfluous, only used for tiny headers with odd code lengths.
389 This change also make sure that mono doesn't wronly interpret bit 2
390 of fat header flags, which is currently reserved.
392 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
394 * metadata.c (do_mono_metadata_parse_type): Do error
395 checking for element types. Don't abort if presented
396 with a broken type kind.
398 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
400 * metadata.c (mono_metadata_parse_method_signature_full):
401 Gracefully fail bad vararg signatures.
403 2009-08-18 Christian Hergert <chris@dronelabs.com>
406 * class.c: Fix warnings for uninitialized variables.
408 2009-08-18 Christian Hergert <chris@dronelabs.com>
410 * icall.c: Fix _NSGetEnviron method declaration warning.
412 2009-08-18 Christian Hergert <chris@dronelabs.com>
415 * reflection.c: Make bitwise checks explicit.
417 2009-08-18 Christian Hergert <chris@dronelabs.com>
420 * marshal.c: Fix printf warnings.
422 2009-08-18 Zoltan Varga <vargaz@gmail.com>
424 * reflection.c (encode_cattr_value): Fix a warning.
426 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
428 * metadata.c (mono_metadata_parse_array_full): Fix memory leak
431 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
433 * loader.c (mono_method_signature): Don't assert on broken
434 signature. Print a more useful error message.
436 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
438 * loader.c (mono_method_get_marshal_info): Assert if
439 signature is invalid. Bounds check stores to the
442 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
444 * loader.c (field_from_memberref): Fix warning.
446 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
448 * loader.c (mono_method_get_param_names): Check if signature
449 is null. Don't store beyond the size of the name array.
451 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
453 * loader.c (mono_get_method_constrained): Check if signature
456 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
458 * loader.c (mono_loader_set_error_bad_image): Improve
461 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
463 * loader.c (mono_get_method_full): Convert an assertion
466 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
468 * class-internals.h, class.c: Better naming and documentation.
470 2009-08-17 Zoltan Varga <vargaz@gmail.com>
472 * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
475 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
477 * loader.c (mono_method_get_signature_full): Fail gracefully if signature
480 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
482 * loader.c (mono_loader_error_prepare_exception): Handle missing field
483 errors with no class set.
485 * loader.c (field_from_memberref): If the field signature is of the wrong
486 type fail with a MissingFieldException instead of a BadImageException as
487 this is the behavior observed on MS.
489 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
491 * loader.c (field_from_memberref): Don't crash if either the field
492 signature or the typespec class are invalid.
494 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
496 * verify.c (verifier_load_field): Don't allow field related
497 ops to reference fields on generic type definition.
499 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
501 * metadata-verify.c: Add new warning level for errors specified
502 by ECMA 335 but that MS ignores.
504 * metadata-verify.c (verify_method_table): Make compiler controled
505 visibility + (rt)specialname error a warning as MS ignores this. Ignoring
506 this check is safe because the end result will only be some visibility
507 exceptions been thrown.
509 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
511 * verify.c (get_boxable_mono_type): Don't allow the
512 use of the generic type definition on boxed type positions.
516 2009-08-14 Mark Probst <mark.probst@gmail.com>
518 * threadpool.c: Make sure no cross-domain references remain in
519 ares_htable or the arrays that are thrown away when resizing.
521 2009-08-14 Mark Probst <mark.probst@gmail.com>
523 * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
524 list of classes for which we have to unregister reflection_info
525 with the GC and which are not in the namespace cache.
527 * reflection.c (mono_reflection_initialize_generic_parameter): Add
528 the class to the list.
530 2009-08-14 Mark Probst <mark.probst@gmail.com>
532 * domain.c (mono_domain_free): Unregister the GC roots in
535 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
537 * reflection.c (mono_reflection_type_get_handle): Fix typo.
539 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
541 * class.c: Add mono_class_get_field_from_name_full which does
542 the same as mono_class_get_field_from_name but does check field
545 * class-internals.h: Export mono_class_get_field_from_name_full as
546 part of the internal API.
548 * loader.c (field_from_memberref): Search fields by name and signature
549 as it's valid to have two fields with same name but different types.
553 2009-08-10 Rodrigo Kumpera <rkumpera@novell.com>
555 * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
557 * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
559 * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
562 2009-08-13 Zoltan Varga <vargaz@gmail.com>
564 * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
566 * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
568 2009-08-12 Mark Probst <mark.probst@gmail.com>
570 * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
571 to sgen-scan-object.h, which can be included and parameterized via
574 * Makefile.am: sgen-scan-object.h added.
576 2009-08-12 Mark Probst <mark.probst@gmail.com>
578 * gc.c: #define GC_dont_gc if we're compiling with SGen.
580 2009-08-12 Mark Probst <mark.probst@gmail.com>
582 * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
583 before clearing a domain in the GC.
585 2009-08-12 Mark Probst <mark.probst@gmail.com>
587 * exception.c (mono_exception_from_name_domain): Actually create
588 the exception in the specified domain.
590 * appdomain.c (mono_domain_create_appdomain_internal): Create the
591 OutOfMemoryException a bit later so that the domain is inialized
592 "enough" that it works.
594 2009-08-12 Mark Probst <mark.probst@gmail.com>
596 * threads.c (thread_cleanup): Clean up the cached_culture_info
597 array to prevent cross-domain references.
599 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
601 * metadata.c: more documentation for MonoType accessors.
603 2009-08-11 Raja R Harinath <harinath@hurrynot.org>
605 Fix incorrect size definitions where the tail array isn't a list
607 * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
609 * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
610 * metadata.h (MONO_SIZEOF_TYPE): Likewise.
611 * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
613 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
616 * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
618 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
622 * metadata-internals.h:
624 * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
626 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
633 * reflection.c: #define for sizeof in MonoType and
636 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
639 * domain-internals.h: add and use #define's instead of sizeof()
640 for MonoJitInfo and MonoJitInfoTable.
642 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
645 * class.h: use #define instead of sizeof() for MonoRemoteClass.
647 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
654 * marshal.c: use a #define instead of sizeof() for a few
655 structures that use a zero-length array.
657 2009-08-06 Rodrigo Kumpera <rkumpera@novell.com>
659 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
660 to handle inflated generic methods.
662 * appdomain.c: Bump corlib version.
664 * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
667 * reflection.c (fixup_method): Same
669 * reflection.c (resolve_object): Same.
671 * reflection.c (inflate_method): Replace a g_assert_not_reached with a
672 g_error and a decent message.
674 2009-08-06 Massimiliano Mantione <massi@ximian.com>
676 * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
677 from the object because it could not yet be available globally
678 (it happens if the profiler tries to create a gchandle on the
679 MonoThread object of a thread that is still registering itself
682 2009-08-04 Rodrigo Kumpera <rkumpera@novell.com>
684 * reflection.c (mono_generic_class_get_object): Initialized the
685 managed type arguments array.
687 * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
689 * appdomain.c: Bump corlib version.
691 2009-08-04 Zoltan Varga <vargaz@gmail.com>
693 * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
696 2009-08-03 Zoltan Varga <vargaz@gmail.com>
698 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
699 Avoid a crash if synch_cs is not set.
701 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
702 Handle the case when the handle is 0.
704 * appdomain.c: Bump corlib version.
706 2009-08-02 Zoltan Varga <vargaz@gmail.com>
708 * reflection.c (mono_type_get_object): Fix a warning.
710 2009-08-01 Mark Probst <mark.probst@gmail.com>
712 * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
713 descriptor here. We assume it's already been computed.
715 * generic-sharing.c (instantiate_other_info): Compute the GC
716 descriptor for info type MONO_RGCTX_INFO_KLASS.
718 2009-08-01 Mark Probst <mark.probst@gmail.com>
720 * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
721 type, so don't use MONO_OBJECT_SETREF to set a field.
723 2009-08-01 Mark Probst <mark.probst@gmail.com>
725 * gc.c: We were missing one case where invoking a finalizer would
726 not reset the domain. Also, in the finalizer thread loop, assert
727 that we're in the root domain.
729 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
731 * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
732 if the type is not an array.
734 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
736 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
737 method bound to the declaring type of the method. Raise an exception
738 if the type is not a generic param.
740 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
742 * class.c (print_unimplemented_interface_method_info): Print the
745 * class.c (mono_class_setup_vtable_general): When dealing with a
746 generic instance first check if the generic type definition is
749 2009-02-11 Tom Hindke <tom_hindle@sil.org>
751 * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
753 * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
755 * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
757 * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
759 * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
761 Code is contributed under MIT/X11 license
763 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
765 * verify.c: Fix naming of stelem and ldelem.
767 2009-07-30 Mark Probst <mark.probst@gmail.com>
769 * generic-sharing.c: Replace the templates lock with the loader
770 lock because of very hard to resolve deadlock issues.
772 2009-07-30 Zoltan Varga <vargaz@gmail.com>
774 * icall.c (ves_icall_Type_GetMethodsByName): Use
775 mono_class_get_vtable_size () instead of accessing klass->vtable_size
776 directly. Fixes #525338.
778 * class.c (mono_class_get_vtable_size): New helper function.
780 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
781 the field belongs to the type. Fixes #525733.
783 2009-07-30 Mark Probst <mark.probst@gmail.com>
785 * sgen-gc.c: When we stop a thread and its stack top is not within
786 its allocated stack (because it's in an altstack signal handler),
787 restart it and stop it again, until it is.
789 2009-07-30 Mark Probst <mark.probst@gmail.com>
791 * sgen-gc.c: Take a thread's stack top and registers from the
792 sigcontext in the suspend signal handler.
794 * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
795 stuff to sgen-archdep.h.
797 * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
798 caller, because have code in sgen-archdep.h to acquire that data.
800 2009-07-29 Massimiliano Mantione <massi@ximian.com>
802 * profiler.c, profiler.h, profiler-private.h:
803 Added support for keeping track of code chunks and buffers.
805 2009-07-29 Rodrigo Kumpera <rkumpera@novell.com>
807 * metadata-verify.c: Fix endianness problems on decoding functions.
808 Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
810 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
812 * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
813 schema for vectors and one dimension SZARRAY.
815 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
817 * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
818 schema for vectors and one dimension SZARRAY.
820 2009-07-27 Mark Probst <mark.probst@gmail.com>
822 * icall-def.h, thread-types.h, threads.c: New separate icalls for
823 Interlocked.(Compare)Exchange with object arguments, which invoke
826 2009-07-26 Miguel de Icaza <miguel@novell.com>
828 * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
829 passed invalid arguments. Fixes another crasher in the
830 Silverlight test suite.
832 * class.c (mono_class_array_element_size): Return 0 for the size
833 of the class; This fixes the crasher exposed by :
835 typeof (void).MakeArrayType ();
837 * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
838 if there is no method to dereference. Put all the code that
839 depends on this inside the if (method) block.
841 This fixes the crasher exposed by Microsoft's Silvelright CLR test
842 suite ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
844 With this change, we pass the test.
846 * reflection.c (mono_reflection_sighelper_get_signature_local):
847 Only dereference the assembly if it has been set. Fixes a
848 crasher exposed by #525328
850 2009-07-25 Mark Probst <mark.probst@gmail.com>
852 * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
853 don't perform the store in mono_gc_wbarrier_generic_nostore().
854 Remove the second argument (value), which is not needed.
856 2009-07-24 Zoltan Varga <vargaz@gmail.com>
858 * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
863 2009-07-24 Mark Probst <mark.probst@gmail.com>
865 * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
866 not perform the store itself. Introduce
867 mono_gc_wbarrier_generic_nostore(), which is the same as
868 mono_gc_wbarrier_generic_store(), except it doesn't perform the
871 2009-07-24 Mark Probst <mark.probst@gmail.com>
873 * icall.c (ves_icall_System_Array_SetGenericValueImpl):
874 mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
875 we still need the memcpy().
877 2009-07-22 Mark Probst <mark.probst@gmail.com>
879 * sgen-gc.c: Align array bounds calculation to mono_array_size_t
880 so that big arrays are handled correctly. Always use
881 safe_object_get_size() to calculate array object sizes, which
882 takes bounds into account.
884 2009-07-22 Mark Probst <mark.probst@gmail.com>
886 * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
887 GC descriptor is computed before we use it.
889 2009-07-22 Mark Probst <mark.probst@gmail.com>
891 * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
892 write barrier if necessary.
894 2009-07-22 Mark Probst <mark.probst@gmail.com>
896 * icall-def.h, icall.c, thread-types.h: New separate icall for
897 VolatileWrite(object&,object) that uses a write barrier.
899 * console-unix.c, file-io.c, icall.c, threads.c: Use write
900 barriers in icalls which write to "ref" or "out" arguments.
902 2009-07-21 Zoltan Varga <vargaz@gmail.com>
904 * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
905 handler in a separate icall, to reduce the size of the wrappers.
907 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
909 * metadata-verify.c (is_valid_typespec_blob): Fix error message.
911 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
913 * metadata-verify.c (parse_field): Allow byref field.
915 * metadata-verify.c (parse_locals_signature): Allow byref locals.
917 * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
919 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
921 * verify.c (do_cast): Fail for any non reference type that isn't boxed.
924 2009-07-20 Robert Jordan <robertj@gmx.net>
926 * cominterop.c (cominterop_get_managed_wrapper_adjusted):
927 Fix invalid IL in valuetype handling (STOBJ must push the
928 corresponding class). Fixes bug #523149.
930 Code is contributed under MIT/X11 license.
932 2009-07-20 Geoff Norton <gnorton@novell.com>
934 * gc.c: Use proper semaphores where available on posix and darwin.
936 2009-07-19 Geoff Norton <gnorton@novell.com>
938 * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
940 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
942 * refletion.c (is_sre_usertype): Change name to is_usertype and
943 invert it's result so it returns true if the type is an user type
944 and not the opposite.
946 * reflection.c (is_*_type): Change all of those to use new macro
947 check_corlib_type_cached that cached the type lookup so we don't
948 need to do string comparisons all the type. Changed the signature
949 to take a MonoClass instead.
951 * reflection.c: Change mono_image_create_token and resolve_object
952 to use is_sre_* functions.
954 2009-07-18 Mark Probst <mark.probst@gmail.com>
956 * sgen-gc.c: Check for writes to the stack in the managed
959 2009-07-18 Mark Probst <mark.probst@gmail.com>
961 * sgen-gc.c: When a thread is unregistered, don't free its remsets
962 but put them on a list which is processed with the other thread's
965 2009-07-18 Mark Probst <mark.probst@gmail.com>
967 * sgen-gc.c: Fix and enable the internal allocator instead of
968 using malloc/free (which causes deadlocks).
970 2009-07-16 Rodrigo Kumpera <rkumpera@novell.com>
972 * refletion.c: Fix builds with SRE disabled by adding a minimal
973 implementation of mono_reflection_type_get_handle.
975 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
977 * refletion.c: Make mono_reflection_type_get_handle non static.
979 * object-internals.h: Export mono_reflection_type_get_handle.
981 * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
982 unmanaged handle using mono_reflection_type_get_handle.
984 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
986 * refletion.c: Replace all reads of MonoReflectionType::type with
987 calls to mono_reflection_type_get_handle. Only the functions that
988 deal with constructing TypeBuilder::type have not been changed
989 because they have to deal with NULL values.
991 This is a first step into supporting reflection types that don't
992 map directly into their unmanaged counterpart.
994 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
996 * metadata-verify.c (parse_locals_signature): Don't complain
997 on signature with zero locals since MS generates it and doesn't
1000 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
1002 * reflection.c (mono_image_get_array_token): Resolve return
1003 type using mono_reflection_type_get_handle.
1005 * reflection.c (mono_image_get_array_token): Resolve array method
1006 parent type using mono_reflection_type_get_handle.
1008 2009-07-14 Zoltan Varga <vargaz@gmail.com>
1010 * reflection.c (mono_image_basic_init): Applied patch from
1011 <Dax@daxxfiles.net>. Set the public key token from the assembly
1012 builder. Fixes #518909.
1014 * appdomain.c: Bump corlib version.
1016 2009-07-13 Zoltan Varga <vargaz@gmail.com>
1018 * class.c (mono_class_needs_cctor_run): Make this return false if
1019 the class has no cctor.
1021 2009-07-13 Mark Probst <mark.probst@gmail.com>
1023 * sgen-gc.c: When the minor GC needs to allocate a new section,
1024 invoke the major GC afterwards.
1026 2009-07-14 Bill Holmes <billholmes54@gmail.com>
1028 * process.c (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
1029 Applying the window_style field to the SHELLEXECUTEINFO struct.
1031 Code is contributed under MIT/X11 license.
1033 2009-07-13 Mark Probst <mark.probst@gmail.com>
1035 * sgen-gc.c: Fix the race condition in the unmanaged allocator by
1036 locking earlier. Fix it in the managed allocator by making sure
1037 that no thread is stopped there before the GC runs. If we do stop
1038 a thread there, we restart it and let it run a but, until it stops
1041 * gc-internal.h, gc.c: Function for getting the IP from a signal
1042 context via a function registered by mini.
1044 2009-07-11 Zoltan Varga <vargaz@gmail.com>
1046 * object-internals.h (MonoIntPtr): New structure describing a boxed
1049 * object.c (mono_runtime_invoke_array): Handle ptr arguments and
1050 returns. Fixes #519953.
1052 * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
1054 2009-07-09 Mark Probst <mark.probst@gmail.com>
1056 * class-internals.h, generic-sharing.c: New RGCTX info type for
1057 getting a remoting invoke with check wrapper.
1059 2009-07-07 Geoff Norton <gnorton@novell.com>
1061 * icall-def.h: Fix the enable-minimal build.
1063 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1065 * object-internals.h: Add MonoReflectionDerivedType.
1067 * reflection.c: Implement support for PointerType.
1068 Fixed tons of warnings.
1070 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1072 * object-internals.h: Add MonoReflectionByRefType.
1074 * reflection.c: Implement support for ByRefType.
1076 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1078 * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
1080 * object-internals.h: Add MonoReflectionArrayType and
1081 mono_reflection_create_unmanaged_type.
1083 * reflection.c: Implement support for ArrayType.
1085 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1087 * metadata-verify.c (is_valid_method_header): Parse EH block
1090 2009-07-03 Mark Probst <mark.probst@gmail.com>
1092 * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
1093 processing the disappearing links, and process disappearing links
1094 in a loop until no new objects are copied.
1096 2009-07-03 Mark Probst <mark.probst@gmail.com>
1098 * object.c (handle_enum): Invoke the write barrier when copying
1099 value type instances.
1101 * sgen-gc.c: Register remsets for unmanaged write barriers only
1102 when the address written to is actually on the heap. This makes
1103 set_value() in object.c work without requiring that the result be
1106 2009-07-02 Rodrigo Kumpera <rkumpera@novell.com>
1108 The runtime wrappers are all bound to a given type that must
1109 exist in the same image. For regular images we use the <Module>
1110 type, which is required to exist for all images.
1112 The <Module> type can't be used for dynamic images because it
1113 might not exist at the time the wrapper is required, so we create
1114 a synthetic type to use instead.
1116 The current code works because of the 2 stage setup of MonoClass,
1117 but once this is gone it will no longer work.
1119 * icall-def.h: Add ModuleBuilder::set_wrappers_type.
1121 * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
1123 * object-internals.h: Export mono_image_set_wrappers_type icall
1124 as part of the internal API.
1126 * marshal.c (get_wrapper_target_class): If the image is dynamic,
1127 use MonoDynamicImage::wrappers_type instead of the <Module> type.
1129 reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
1130 image wrappers_type to the provided value.
1132 2009-07-01 Rodrigo Kumpera <rkumpera@novell.com>
1134 * appdomain.c (deregister_reflection_info_roots): No need
1135 to use the image lock here.
1137 2009-07-02 Mark Probst <mark.probst@gmail.com>
1139 * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
1141 2009-06-29 Zoltan Varga <vargaz@gmail.com>
1143 * threads.c: Store the thread start argument in a hash table instead of
1144 registering it as a root, as libgc doesn't support unregistering roots
1145 under windows, leading to 'too many root sets' errors when many threads
1148 * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
1149 shutdown, they can still be referenced by the other dying objects.
1152 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1154 * socket-io.c: DontLinger does not allow LingerOptions.
1156 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1158 * metadata-verify.c: The spec doesn't mention that it's possible to add
1159 custom attribute to a generic parameter. Fixed.
1161 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1163 * class.c (inflate_generic_type): Don't crash while trying to output a message
1164 on why we're aborting.
1166 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1168 * socket-io.c: DontLinger can take an int or a boolean too.
1170 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
1172 * gc.c: check for a null argument to SuppressFinalize () and
1173 ReRegisterForFinalize ().
1175 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1177 * loader.c (method_from_methodspec): Call into the verifier to check
1180 * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
1182 * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
1183 part of the internal API.
1185 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1187 * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
1190 * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
1192 * verify-internals.h: Export mono_verifier_verify_typespec_signature as
1193 part of the internal API.
1195 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1197 * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
1200 * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
1203 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1204 part of the internal API.
1206 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1208 * metadata-verify.c: Use is_valid_blob_object to verify blob validity
1209 when doing basic verification.
1211 This check must be done since the runtime peeks into signatures in much
1212 more places than it does decoding so it makes sense to ensure that all
1213 pointers to blob objects are well formed.
1215 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1217 * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
1218 Use proper overflow dectection. Fix usage of it.
1220 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1222 * loader.c (field_from_memberref): Call into the verifier to check
1225 * loader.c (mono_method_get_signature_full): Same.
1227 * loader.c (method_from_memberref): Same.
1229 * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
1231 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1232 part of the internal API.
1234 2009-06-25 Mark Probst <mark.probst@gmail.com>
1236 * threadpool.c (mono_thread_pool_add): If the domain is unloading
1237 or unloaded, still return an AsyncResult, but don't add it to the
1240 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1242 * threads.c: fix missing colon when DEBUG is defined.
1244 2009-06-25 Mark Probst <mark.probst@gmail.com>
1246 * threadpool.c: Don't add new calls to a threadpool if the domain
1247 of the call is unloading or unloaded. When dequeuing a job, null
1248 the reference in the queue.
1250 2009-06-25 Mark Probst <mark.probst@gmail.com>
1252 * sgen-gc.c (null_link_in_range): Add the dislink for the old
1253 generation if an object was moved.
1255 2009-06-25 Sylvain Dupont <duposyl@gmail.com>
1257 * cominterop.h cominterop.c marshal.c: Added support for marshalling out
1258 parameters of type SAFEARRAY[VARIANT].
1260 * reflection.c (encode_marshal_blob): Properly generate element type
1261 (SafeArraySubType marshal attribute option).
1263 Code is contributed under MIT/X11 license.
1265 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
1267 * reflection.c: in mono_method_clear_object () really ensure all the
1268 objects are removed.
1270 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1272 * loader.c (mono_method_signature): Call into the verifier to check
1273 the method signature.
1275 * metadata-verify.c (verify_method_table): Move signature verification
1276 to verify_method_table_full.
1278 * metadata-verify.c: Add mono_verifier_verify_method_signature.
1280 * verify-internals.h: Export mono_verifier_verify_method_signature as
1281 part of the internal API.
1283 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1285 * loader.c (mono_method_get_header): Call into the verifier to
1286 check the method header.
1288 * metadata-verify.c: Add mono_verifier_verify_method_header.
1290 * verify-internals.h: Export mono_verifier_verify_method_header as
1291 part of the internal API.
1293 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1295 * class.c (mono_class_find_enum_basetype): Call into the verifier to
1296 check the field signature. Replace an assert with an explicit check.
1298 * class.c (mono_class_setup_fields): Call into the verifier to check
1299 the field signature.
1301 * metadata-verify.c: Add mono_verifier_verify_field_signature.
1303 * verify-internals.h: Export mono_verifier_verify_field_signature as
1304 part of the internal API.
1306 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1308 * class.c (mono_class_find_enum_basetype): Simplify this function
1309 by moving code outside of the loop and not decoding static fields.
1311 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1313 * metadata-verify.c (verify_typedef_table): Check the extends
1314 token here. Move to here a flags check from verify_typedef_table_full.
1316 2009-06-24 Zoltan Varga <vargaz@gmail.com>
1318 * metadata-verify.c (is_valid_method_header): Fix a warning.
1320 * metadata-internals.h (MonoImage): Remove the unused
1321 static_rgctx_invoke_wrapper_cache.
1323 * image.c marshal.c: Ditto.
1325 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
1327 * image.c (do_mono_image_load): Enable table data verification.
1329 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
1331 * metadata-verify.c (is_valid_constant): Fix nullref check.
1333 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
1335 * metadata-verify.c (is_valid_constant): Fix string bounds check.
1337 2009-06-22 Mark Probst <mark.probst@gmail.com>
1339 * sgen-gc.c: Managed allocation with pthreads TLS.
1341 * threads.c, threads-types.h: Functions for the JIT to tell the
1342 runtime whether it supports the MONO_TLS opcode.
1344 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1346 * metadata-verify.c (verify_param_table): Fix a crash for assemblies
1349 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1351 * metadata-verify.c (is_valid_constant): Fix the string length check.
1352 Use safe overflow checking. Add decent error messages.
1354 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1356 * metadata-verify.c: Move remaininh blob checks to the offline
1359 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1361 * metadata-verify.c: Move more blob checks to the offline verification
1364 2009-06-22 Bill Holmes <billholmes54@gmail.com>
1366 * object-internals.h : Adding interrupt_on_stop field.
1368 * threads.c (mono_thread_request_interruption) : On Windows exit the
1369 thread if interrupt_on_stop is set.
1371 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
1372 Removing old interrupt logic and setting the interrupt_on_stop for the
1373 thread when calling accept.
1375 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
1376 setting the interrupt_on_stop for the thread when calling accept.
1378 Contributed under MIT/X11 license.
1380 2009-06-20 Martin Baulig <martin@ximian.com>
1382 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
1384 2009-06-21 Zoltan Varga <vargaz@gmail.com>
1386 * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
1387 running in no-exec mode.
1389 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1391 * metadata-verify.c (verify_method_table): Move header
1392 checking to verify_method_table_full.
1394 * metata-verify.c (mono_verifier_verify_full_table_data):
1395 Call verify_method_table_full.
1397 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1399 * metadata-verify.c (verify_field_table): Move signature
1400 checking to verify_field_table_full.
1402 * metata-verify.c (mono_verifier_verify_full_table_data):
1403 Call verify_field_table_full.
1405 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1407 * metadata-verify.c (verify_typedef_table): Move remaining
1408 stuff to verify_typedef_table_full.
1410 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1412 * metadata-verify.c: Kill is_corlib from VerifyContext.
1413 It is only used by the offline mode.
1414 So we better remove it from the runtime path.
1416 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1418 * metadata-verify.c: Add new mono_verifier_verify_full_table_data
1419 function that perform the offline metadata verification steps.
1421 * metadata-verify.c (verify_typedef_table): Move some checks to
1422 verify_typedef_table_full and make it been called by new function
1423 mono_verifier_verify_full_table_data.
1425 * pedump.c: Call mono_verifier_verify_full_table_data.
1427 * verify-internals.h: Export mono_verifier_verify_full_table_data as
1428 part of the internal API.
1430 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1432 * metadata-verify.c (typedef_is_system_object): Fix System.Object
1435 * metadata-verify.c (verify_implmap_table): Fix implmap invalid
1436 flags bits. SupportLastError was confused as bit 7 instead of 6.
1438 * metadata-verify.c (verify_implmap_table): Fix import scope verification
1439 to check against the module ref table instead of module.
1441 * metadata-verify.c (verify_implmap_table): Fix corlib check.
1443 * pedump.c: Call mono_image_load_names.
1445 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1447 * image.c: Extract mono_image_load_names from do_mono_image_load.
1449 * metadata-internals.h: Export mono_image_load_names as part of
1452 2009-06-19 Zoltan Varga <vargaz@gmail.com>
1454 * metadata.c (mono_metadata_cleanup): Free the generic method cache
1455 first, as it could reference data in the other caches.
1457 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
1459 * metadata-verify.c: Finished with method header verification.
1461 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
1463 * metadata-verify.c: Added more header verification code.
1464 Now only EH clauses are missing.
1466 2009-06-17 Zoltan Varga <vargaz@gmail.com>
1468 * marshal.c (get_runtime_invoke_type): Don't share primitive types
1471 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
1473 * metadata-verify.c: Initial method header verification.
1475 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
1477 * metadata-verify.c (verify_import_table): The IAT contents
1478 might end been patched by the windows DL when running with
1481 2009-06-15 Rodrigo Kumpera <rkumpera@novell.com>
1483 * class.c (mono_class_from_typeref): If the enclosing type is not
1484 found return null instead of crashing. Fixes #508487.
1486 2009-06-15 Atsushi Enomoto <atsushi@ximian.com>
1488 * normalization-tables.h : updated to the latest unicode charcter
1490 * appdomain.c : bump corlib version.
1492 2009-06-14 Zoltan Varga <vargaz@gmail.com>
1494 * class.c (mono_class_from_name): Fix support for assembly references
1495 in the EXPORTEDTYPE table. Fixes #511704.
1497 2009-06-13 Geoff Norton <gnorton@novell.com>
1499 * domain.c: Ensure that mono_domain_assembly_open actually opens the
1500 assembly in the target domain.
1502 2009-06-12 Robert Jordan <robertj@gmx.net>
1504 * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
1505 because "this" of the managed signature has become an
1506 ordinary parameter in the unmanaged signature.
1508 2009-06-12 Zoltan Varga <vargaz@gmail.com>
1510 * class-internals.h (struct _MonoGenericContainer): Add an 'image'
1511 field for owner-less generic containers.
1513 * reflection.c (mono_reflection_initialize_generic_parameter): Set the
1514 image field of the owner-less generic containers created here.
1516 * metadata.c (mono_metadata_load_generic_params): Ditto, the
1517 contain is ownerless until the caller sets its owner.
1519 * metadata.c (type_in_image): Handle owner-less generic containers
1522 2009-06-11 Zoltan Varga <vargaz@gmail.com>
1524 * image.c (mono_image_close): Support debug_assembly_unload for
1527 2009-06-11 Andrés G. Aragoneses <aaragoneses@novell.com>
1529 * class.c: Fix some typos in comments.
1531 2009-06-11 Zoltan Varga <vargaz@gmail.com>
1533 * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
1535 * threads.c (mono_thread_execute_interruption): Avoid creating the
1536 abort exception object while holding the synch_cs lock.
1538 2009-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1540 * metadata-verify.c: Verify basic cattr content.
1542 2009-06-10 Zoltan Varga <vargaz@gmail.com>
1544 * reflection.c (add_exported_type): Don't set the FORWARDER flag on
1547 * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
1548 support for nested types. Fixes #511704.
1550 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
1552 * metadata-verify.c: Verify methodspec signatures.
1554 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
1556 * metadata-verify.c: Verify typespec signatures.
1558 2009-06-09 Zoltan Varga <vargaz@gmail.com>
1560 * metadata.c (free_inflated_method): Call
1561 mono_marshal_free_inflated_wrappers (), which was missed earlier.
1563 2009-06-08 Miguel de Icaza <miguel@novell.com>
1565 * mono-config.c: Small change to report the PPC64/ILP32 model.
1567 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
1569 * metadata-verify.c (parse_type): Check szarray.
1571 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
1573 * metadata-verify.c (parse_type): Check fnptr.
1575 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
1577 * metadata-verify.c (parse_type): Check generic instances.
1579 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
1581 * metadata-verify.c (parse_type): Check array shape.
1583 2009-06-05 Robert Jordan <robertj@gmx.net>
1585 * class.c (mono_class_create_from_typedef): Check only for
1586 mscorlib's System.Array.
1588 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
1590 * metadata-verify.c (parse_type): Check pointer, class/valuetype
1593 * metadata-verify.c (parse_field): Check the signature.
1595 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
1597 * metadata-verify.c: Implement locals signature check.
1599 2009-06-04 Marek Safar <marek.safar@gmail.com>
1601 * domain.c: Add .NET 4.0 Beta 1 version.
1603 2009-06-04 Bill Holmes <billholmes54@gmail.com>
1605 * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
1606 For QueryInterface on CCWs consider the base class
1609 Code is contributed under MIT/X11 license.
1611 2009-06-04 Zoltan Varga <vargaz@gmail.com>
1613 * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
1615 * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
1618 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
1619 adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
1621 * generic-sharing.c (inflate_other_data): Ditto.
1623 2009-06-03 Rodrigo Kumpera <rkumpera@novell.com>
1625 * metadata-verify.c: Implement property signature check.
1627 2009-06-04 Mark Probst <mark.probst@gmail.com>
1629 * sgen-gc.h: Register saving support for PPC.
1631 2009-06-04 Mark Probst <mark.probst@gmail.com>
1633 * sgen-gc.c: Fixed a pthread TLS screwup.
1635 2009-06-04 Mark Probst <mark.probst@gmail.com>
1637 * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
1640 2009-06-04 Mark Probst <mark.probst@gmail.com>
1642 * sgen-gc.c: Disable TLA and managed allocation if the __thread
1643 keyword is not supported.
1645 2009-06-04 Zoltan Varga <vargaz@gmail.com>
1647 * marshal.c metadata.c: Applied patch from Ulrich Weigand
1648 <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
1649 the inflated method is freed. Fixes #508389.
1651 The code is contributed under the MIT/X11 license.
1653 2009-06-03 Zoltan Varga <vargaz@gmail.com>
1655 * marshal.c (get_wrapper_target_class): New helper function.
1656 (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
1657 the <Module> class of the image. Fixes #509049.
1659 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1661 * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
1662 Check if the thread was interrupted and proccess it straight away.
1663 Makes abortion much more responsive.
1665 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1667 * threads.c (mono_thread_execute_interruption): Use atomic cas with
1668 MonoThread::interruption_requested to match it's counterpart.
1670 Fixes a hang in abort-stress-1 on a 2 core x86.
1672 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
1675 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1677 Change MonoImage::name_cache to be protected by the image lock
1678 instead of the loader lock.
1680 * appdomain.c (deregister_reflection_info_roots): Protect access
1683 * class.c (mono_image_init_name_cache): Change from the loader lock
1684 to the image lock. Check if the cache wasn't already created.
1686 * class.c: Change from the loader to the image lock.
1688 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
1689 the code to hold the image lock while iterating over name_cache and
1690 not go into mono_array_new holding it.
1692 * metadata-internals.h: Add a comment about this change.
1694 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1696 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1697 Under the 2.0 profile raise the loader error.
1701 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
1703 * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
1704 of ldind opcode for generic instances so we don't fail for direct wrappers.
1705 This only affect direct calls.
1707 2009-05-31 Zoltan Varga <vargaz@gmail.com>
1709 * reflection.c (create_dynamic_mono_image): Fix warnings.
1711 * generic-sharing.c (other_info_equal): Ditto.
1713 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
1715 * metadata-verify.c: Implement field signature check.
1717 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
1719 * metadata-verify.c: Implement standalone signature check.
1721 2009-05-28 Rodrigo Kumpera <rkumpera@novell.com>
1723 * metadata-verify.c: Implement methodref signature check.
1725 2009-05-28 Zoltan Varga <vargaz@gmail.com>
1727 * object-internals.h (MonoRuntimeCallbacks): New structure containing
1728 callbacks supplied by the runtime.
1730 * object.c (mono_install_callbacks): New internal function to install
1733 * object.c (mono_create_ftnptr): Move the implementation of this to
1736 * object.c (mono_get_addr_from_ftnptr): Ditto.
1738 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
1740 * metadata-verify.c (parse_return_type): Proper byref check.
1741 * metadata-verify.c (is_valid_method_signature): Check for zero arity
1742 generic signatures and method params.
1744 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
1746 * metadata-verify.c (decode_signature_header): Fix bounds check.
1748 * metadata-verify.c (parse_custom_mods): Check custom mods.
1750 * metadata-verify.c (parse_type): Do initial basic verification
1753 * metadata-verify.c (is_valid_method_signature): Parse the generic
1756 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
1758 * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
1759 discarded based on their most specific definition so we set the method_slots
1760 array before checking if the method is acceptable or not.
1764 2009-05-26 Mark Probst <mark.probst@gmail.com>
1766 * icall.c: Free the old array when resizing a mono_ptr_array.
1768 2009-05-26 Mark Probst <mark.probst@gmail.com>
1770 * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
1771 for the hashes whose keys are managed objects.
1773 2009-05-26 Mark Probst <mark.probst@gmail.com>
1775 * object-internals.h, threads.c: Set the execution context on
1776 thread start here, not in corlib.
1778 * appdomain.c: Bump corlib version.
1780 2009-05-27 Martin Baulig <martin@ximian.com>
1782 * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
1783 if `_mono_debug_using_mono_debugger' is set to make things work
1784 properly when embedding Mono.
1786 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1788 * class.c (mono_class_setup_fields): Don't mark simd types as having
1789 16 bytes alignment as the whole runtime doesn't support.
1791 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
1793 * metadata-verify.c (safe_read): Use endian safe read macros.
1795 2009-05-25 Zoltan Varga <vargaz@gmail.com>
1797 * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
1798 it is read-only when using full aot.
1800 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
1802 * metadata-verify.c (is_valid_method_signature): Verify parts
1803 of the return type. Provide an error message in case of failure.
1805 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
1807 * metadata-verify.c (is_valid_method_signature): Verify the call conv.
1809 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
1811 * metadata-verify.c: Include the size prefix in the bounds check.
1813 2009-05-22 Miguel de Icaza <miguel@novell.com>
1815 * icall.c: Remove warnings.
1817 * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
1818 prevent auto-detection based on GCC defines.
1822 * metadata-verify.c: Do not include signal.h
1824 * generic-sharing.c, marshal.c: Add returns to avoid some warning
1825 messages. Not sure why the g_assert_not_reached is not enough to
1829 * appdomain.c: Remove code that is not used when
1830 DISABLE_SHADOW_COPY is set.
1832 * image.c: use g_getenv
1834 2009-05-21 Miguel de Icaza <miguel@novell.com>
1836 * reflection.c: Remove code that it not used with
1837 DISABLE_REFLECTION_EMIT is defined.
1839 2009-05-21 Zoltan Varga <vargaz@gmail.com>
1841 * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
1844 2009-05-20 Miguel de Icaza <miguel@novell.com>
1847 (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
1848 the ifdef here and instead put that on io-layer
1850 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
1852 * metadata-verify.c: Verify the generic param constraint table.
1854 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
1856 * metadata-verify.c (verify_generic_param_table): Fix
1857 thinko on the valid flags bits for generic params.
1859 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
1861 * metadata-verify.c: Verify the methodspec table.
1863 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
1865 * metadata-verify.c: Verify the generic param table.
1867 2009-05-19 Mark Probst <mark.probst@gmail.com>
1869 * sgen-gc.c: Store and use the count with REMSET_VTYPE.
1871 2009-05-19 Mark Probst <mark.probst@gmail.com>
1873 * sgen-gc.c: Use generation enum more consistently and use the
1874 correct generation in mono_gc_register_for_finalization().
1876 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
1878 * metadata-verify.c: Verify the nested class table.
1880 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
1882 * metadata-verify.c: Verify the manifest resource table.
1884 2009-05-17 Zoltan Varga <vargaz@gmail.com>
1886 * debug-helpers.c (dis_one): Add little-endian support for ldstr.
1888 2009-05-16 Zoltan Varga <vargaz@gmail.com>
1890 * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
1891 wrappers, this is now done in the JIT.
1893 * class.c (mono_set_generic_sharing_supported): New internal function.
1894 (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
1896 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1898 * metadata-verify.c: Verify the exported type table.
1900 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1902 * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
1904 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1906 * metadata-verify.c: Verify the file table.
1908 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1910 * metadata-verify.c (verify_assembly_table): Fix an error message.
1912 * metadata-verify.c: Verify the assemblyref table.
1914 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
1916 * metadata-verify.c (verify_assembly_table): Fix the valid
1917 bits mask for flags.
1919 2009-05-15 Zoltan Varga <vargaz@gmail.com>
1921 * debug-helpers.c (mono_method_full_name): Print generic parameters of
1922 generic methods as well.
1924 2009-05-15 Geoff Norton <gnorton@novell.com>
1926 * gc.c: MachO/Darwin supports and uses semaphores fine for this
1927 use-case and is significantly more performant than the wapi layer.
1929 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
1931 * metadata-verify.c: Verify the assembly table.
1933 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
1935 * metadata-verify.c: Fix rows limit check.
1937 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
1939 * metadata-verify.c: Verify the fieldrva table.
1941 2009-05-13 Mark Probst <mark.probst@gmail.com>
1943 * sgen.c: Speed up weak links and finalizers by grouping them by
1946 2009-05-13 Mark Probst <mark.probst@gmail.com>
1948 * marshal.c (delegate_hash_table_add): When overwriting an entry,
1949 free the old GCHandle (only applies to SGen).
1951 2009-05-13 Zoltan Varga <vargaz@gmail.com>
1953 * loader.c (mono_get_method_from_token): Avoid the expensive call to
1954 mono_metadata_load_generic_params () for non-generic methods.
1956 2009-05-12 Mark Probst <mark.probst@gmail.com>
1958 * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
1959 New function for returning a monitor's weak link if it has one.
1961 * sgen-gc.c: Remove an object's monitor's weak link (if it has
1962 one) when clearing a domain. These can still be around because
1963 the object might not have been collected.
1965 2009-05-12 Zoltan Varga <vargaz@gmail.com>
1967 * gc.c: Fix a warning.
1969 2009-05-12 Kornél Pál <kornelpal@gmail.com>
1971 * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
1972 prevous wait that resulted in a deadlock on Windows when initializing
1973 the runtime form DllMain. Also results in improved startup time.
1974 (finalizer_thread): Get rid of thread_started_event.
1975 * threads.c, threads-types.h (mono_thread_create_internal): Return the
1976 resulting MonoThread.
1978 Contributed under MIT/X11 license.
1980 2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
1982 * metadata-verify.c: Verify the implmap table.
1983 Don't require that #US and #Strings be present.
1985 2009-05-11 Sebastien Pouliot <sebastien@ximian.com>
1987 * security-core-clr.c: Delegate checks are done at creation time,
1988 not a invocation time. Fix exception for Telerik Silverlight demo
1990 2009-05-11 Mark Probst <mark.probst@gmail.com>
1992 * sgen-gc.c (need_remove_object_for_domain): Remove the special
1993 case for the Thread class.
1995 * threads.c: Do clean-up of abort exception/state in
1996 thread_cleanup() instead of Thread.free_internal(). Also clean up
1997 current_appcontext. The reason we have to do that is because
1998 those references might point into another domain and if that
1999 domain is unloaded before the thread is finalized, they point to
2002 2009-05-10 Andreas Faerber <andreas.faerber@web.de>
2004 * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
2007 Contributed unter MIT/X11 license.
2009 2009-05-09 Miguel de Icaza <miguel@novell.com>
2011 * verify.c, metadata-verifier.c: Add support for disabling the
2012 verifier in some builds.
2014 [ Sorry, my previous commit accidentally commited some work in
2017 2009-05-08 Zoltan Varga <vargaz@gmail.com>
2019 * class.c (mono_class_setup_fields): Set class->field.first for
2022 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
2024 * metadata-verify.c: Verify the typespec table.
2026 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
2028 * metadata-verify.c: Verify the module table.
2030 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2032 * metadata-verify.c: Verify the methodimpl table.
2034 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2036 * metadata-verify.c: Verify the property table.
2038 2009-05-06 Zoltan Varga <vargaz@gmail.com>
2040 * debug-helpers.c (mono_method_desc_match): Add support for generic
2043 2009-05-05 Rodrigo Kumpera <rkumpera@novell.com>
2045 * metadata-verify.c: Verify the propertymap table.
2047 2009-05-04 Rodrigo Kumpera <rkumpera@novell.com>
2049 * metadata-verify.c: Verify the event table.
2051 * metadata-verify.c (search_sorted_table): Fix offset
2054 2009-05-02 Zoltan Varga <vargaz@gmail.com>
2056 * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
2058 2009-05-01 Mark Probst <mark.probst@gmail.com>
2060 * gc.c (mono_gc_run_finalize): Don't set the domain too late,
2061 because mono_delegate_free_ftnptr() needs it.
2063 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2065 * metadata-verify.c: Verify the eventmap table.
2067 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2069 * metadata-verify.c: Verify the standalonesig table.
2071 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2073 * metadata-verify.c: Verify the field layout table.
2075 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2077 * class.c (mono_type_get_name_recurse): Don't crash
2078 for ownerless generic params.
2080 * debug-helpers.c (mono_type_get_desc): Correct the format
2081 for ownerless generic params.
2083 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2085 * metadata-verify.c: Verify the class layout table.
2087 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2089 * metadata-verify.c: Verify the decl security table.
2091 2009-04-30 Mark Probst <mark.probst@gmail.com>
2093 * domain.c (mono_domain_set_internal_with_options): Don't do
2094 anything if the old domain is the same as the old one. Fixes
2097 2009-04-30 Mark Probst <mark.probst@gmail.com>
2099 * appdomain.c: Deregister the reflection_info roots when unloading
2102 * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
2103 memory allocated by a domain and frees its disappearing links.
2105 * boehm-gc.c, null-gc.c: Empty implementation of
2106 mono_gc_clear_domain().
2108 2009-04-30 Mark Probst <mark.probst@gmail.com>
2110 * appdomain.c (clear_cached_vtable): Free the static fields memory
2113 2009-04-30 Mark Probst <mark.probst@gmail.com>
2115 * gc.c: Set the correct domain when invoking finalizers.
2117 * appdomain.c: Set the correct domain when creating threads.
2119 2009-04-30 Mark Probst <mark.probst@gmail.com>
2121 * sgen-gc.c: Fix skip size for vectors.
2123 2009-05-03 Martin Baulig <martin@ximian.com>
2125 * mono-debug-debugger.c
2126 (mono_debugger_check_breakpoints): Check class init handlers even
2127 if we don't have any method load handers.
2129 2009-04-30 Zoltan Varga <vargaz@gmail.com>
2131 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
2132 returning refonly assemblies if refonly is FALSE. Fixes #499013.
2134 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
2136 * metadata-verify.c: Verify the field marshal table.
2138 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
2140 * metadata-verify.c: Verify the custom attribute table.
2142 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2144 * metadata-verify.c: Verify the constant table.
2146 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2148 * metadata-verify.c: Verify the memberef table.
2150 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2152 * metadata-verify.c (get_coded_index_token): Remove
2155 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2157 * metadata-verify.c: Verify the interfaceimpl table.
2159 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2161 * verify.c: Improve error message.
2163 * debug-helpers.c (mono_type_get_desc): Harden the code that
2164 deals with VAR and MVAR.
2166 2009-04-28 Zoltan Varga <vargaz@gmail.com>
2168 * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
2171 2009-04-23 Tom Hindle <tom_hindle@sil.org>
2173 * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
2174 changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
2176 2009-04-28 Sebastien Pouliot <sebastien@ximian.com>
2178 * security-core-clr.c: Avoid redundant checks for platform code,
2179 e.g. check for method and for class (very common) and check
2180 for class and outer class (less common)...
2182 2009-04-27 Zoltan Varga <vargaz@gmail.com>
2184 * reflection.c: Avoid returning random cattrs for synthetic methods.
2187 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2189 * assembly.c: assemblies in the GAC should never be shadow-copied.
2191 2009-04-26 Mark Probst <mark.probst@gmail.com>
2193 * domain.c, domain-internals.h: Disable
2194 track_resurrection_{objects,handles}_hash in MonoDomain if using
2197 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2199 * metadata-verify.c: Verify the param table.
2201 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2203 * metadata-verify.c (verify_typedef_table): Range check FieldList and
2206 * metadata-verify.c (verify_method_table): Proper check the ParamList
2209 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2211 * metadata-verify.c (verify_method_table): Check for runtime
2212 implemented functions such as delegate .ctors. Remove spurious
2215 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2217 * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
2219 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2221 Don't allocate MonoGenericInfo for ownerless generic params.
2222 * class-internals.h (MonoGenericParam::info): Move field to ...
2223 (MonoGenericParamFull): ... this. New struct.
2224 (MonoGenericContainer::type_params): Change type to
2225 MonoGenericParamFull.
2226 (MonoGenericParam, MonoGenericContainer): Update accessors.
2227 * metadata.c (mono_metadata_parse_generic_param): Don't initialize
2228 'info' field for ownerless generic param.
2229 (mono_metadata_load_generic_params): Update to changes.
2230 * reflection.c (mono_reflection_create_generic_class): Likewise.
2231 (reflection_methodbuilder_to_mono_method): Likewise.
2232 (mono_reflection_initialize_generic_parameter): Likewise.
2234 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2236 Don't use MonoGenericParamInfo for ownerless generic params.
2237 * class.c (get_anon_gparam_class, set_anon_gparam_class): New. Don't
2238 use ParamInfo class at all.
2239 (mono_class_from_generic_parameter): Use them.
2240 (make_generic_param_class): Fix a couple of instances where 'pinfo
2241 == NULL' wasn't handle.
2243 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2245 * class.c (make_generic_param_class): Carve out of ...
2246 (mono_class_from_generic_parameter): ... here.
2248 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2250 Simplify mono_class_from_generic_parameter
2251 * class-internals.h (MonoGenericParamInfo::token): New field.
2252 * metadata.c (mono_metadata_load_generic_params): Initialize it
2254 * class.c (mono_class_from_generic_parameter): Use it instead of
2255 searching through metadata.
2257 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2259 * metadata-verify.c: Add verification of the method table.
2261 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2263 * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
2264 Delegate::Invoke optimization.
2266 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2268 * appdomain.c (mono_domain_create_appdomain_internal): Free the
2269 string returned by get_shadow_assembly_location_base.
2271 * appdomain.c (get_shadow_assembly_location_base): Add a comment
2272 about caller's ownership.
2274 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2276 * reflection.c: Add mono_reflection_cleanup_domain to cleanup
2277 reflection memory on domain unload.
2279 * domain.c (mono_domain_free): Don't free refobject_hash, let the
2280 reflection cleanup code do it.
2282 * domain-internals.h: Add mono_reflection_cleanup_domain.
2284 This fixes a memory leak for managed mirrors of reflection objects
2287 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
2289 * metadata-verify.c: Implement more verification of the field table.
2291 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
2293 * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
2294 doesn't try to parse the input assembly, which can be broken.
2296 2009-04-23 Mark Probst <mark.probst@gmail.com>
2298 * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
2299 sgen-gc.c: Implement track resurrection in weak GC handles in SGen
2300 by using the lowest bit in the link to store whether the link is
2301 tracked. Move the track_resurrection hashes into boehm-gc.c.
2303 2009-04-22 Miguel de Icaza <miguel@novell.com>
2305 * Makefile.am: Split the console support in platform specific code
2306 and put together a framework for making this easy in the future so
2307 that we can start splitting code instead of having a mess of PLATFORM_WIN32
2309 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
2311 * pedump.c: Fix a warning.
2313 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
2315 * verify.c (mono_delegate_type_equal): Compare valuetypes using
2316 mono_class_from_mono_type to avoid bad interactions with the dual representation
2317 of the generic type definition.
2319 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
2321 * verify.c (do_invoke_method): Use mono_class_from_mono_type to
2322 get the MonoClass for the call context type as it might be a generic
2327 2009-04-21 Mark Probst <mark.probst@gmail.com>
2329 * object-internals.h: The Thread object has no execution_context
2332 * threads.c, threadpool.c, threads-types.h: Accessor functions for
2333 the execution context.
2335 * appdomain.c: Bump corlib version.
2337 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2339 * verify.c (do_newobj): Improve error message.
2341 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2343 * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
2344 is nested in the filter block.
2346 * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
2347 block is not fully nested.
2351 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2353 * verify.c (verify_type_compatibility_full): Compare MonoClass and
2354 not MonoType to check for equality of valuetypes as the generic type
2355 definition allows for two different encodings: the generic type definition
2356 class or a generic instance over the GTD arguments.
2360 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2362 * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
2364 * verify.c (do_initobj): Improve error message.
2366 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2368 * metadata-verify.c: Enable pe verification as the issue with #496453
2369 is that the authenticode data directory have a different unspecified
2370 format. Ignore it for now.
2372 * pedump.c: Run the metadata verifier together with the IL verifier.
2376 2009-04-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
2378 * metadata-verify.c: Temporarily disable pe verification due to #496453.
2380 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
2382 * class.c (can_access_type): Check visibility against
2383 the element type for pointers and arrays.
2387 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
2389 * metadata-verify.c: Fix cli and table verification to use information
2390 from the MonoImage. A lot of duplicated code got killed.
2392 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
2395 This patch starts to integrate the metadata verifier with the runtime code.
2397 This patch causes major regression in functionality for the metadata verifier
2398 as cli and table verification are disabled since they require to be ported to
2399 use MonoImage information.
2401 * image.c (do_mono_image_load): Split the code in this function
2402 into mono_image_load_pe_data and mono_image_load_cli_data.
2403 Add care_about_pecoff parameter to not load pecoff data.
2404 Call into the metadata verifier for pecoff and cli verification.
2406 * image.c (mono_image_open_raw): New function that doesn't perform
2407 any parsing of the image contents.
2409 The reason for the 3 new functions is to give pedump better control
2410 into the interaction with the verifier.
2412 * metadata-internals.h: Add new functions from image.c as part of the
2415 * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
2416 mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
2417 to make those functions work together with the runtime.
2419 * verify.c: Add mono_verifier_is_enabled_for_image function that returns
2420 true if the image needs to be verified.
2422 * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
2424 * pedump.c: Use new metadata verifier API.
2426 2009-04-19 Zoltan Varga <vargaz@gmail.com>
2428 * object.c (mono_install_vtable_trampoline): Make this receive a
2429 trampoline creation function instead of trampoline, allowing the JIT
2430 to use a different trampoline for each vtable.
2432 2009-04-18 Mark Probst <mark.probst@gmail.com>
2434 * object.c (mono_raise_exception): Don't reset the thread abort
2435 exception state here.
2437 2009-04-18 Mark Probst <mark.probst@gmail.com>
2439 * icall-def.h: New icall for getting the thread abort exception
2442 * object.c, thread.c, object-internals.h: A thread's abort
2443 exception state is now a GC handle. To get the object it stands
2444 for, we must move it into the current app domain, if it's
2445 different than the one where it originated from.
2447 * appdomain.c: Bump corlib version.
2449 * domain.c, domain-internals.h: New function for setting the
2450 domain and migrate the thread abort exception or not.
2452 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2454 * metadata-verify.c: Add initial verification of the
2457 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2459 * metadata-verify.c: Add a macro to conditionally enable
2460 dumping of verification information. Add make_coded_token
2461 and search_sorted_table to enable search sorted tables
2462 by a given coded token.
2464 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2466 * metadata-verify.c: Add array mapping from table index
2467 to description offset. Add get_col_offset and get_col_size
2470 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2472 * metadata-verify.c: Add remaining table descriptions offsets.
2473 Add remaining coded index descriptions.
2475 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2477 * metadata-verify.c: Fixed constant table description.
2478 Fixed calculation of HasCustomAttribute coded index size.
2479 Fixed calculation of size for many table indexes.
2481 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2483 * pedump.c (dump_metadata): Dump table offset instead
2484 of useless pointer in memory.
2486 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2488 * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
2490 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2492 * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
2493 a missing of for interface types.
2495 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2497 * metadata-verify.c (verify_pe_optional_header): Add comment of why
2498 the code is commented.
2500 * metadata-verify.c (verify_resources_table): Remove spurious printf
2501 and don't fail if there are unmanaged resources. Gmcs generates a useless
2502 one for all assemblies - I bet it's some MS compatibility junk.
2504 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2506 * metadata-verify.c (verify_typedef_table): Verify the extends field.
2508 * metadata-verify.c (mono_image_verify): Add a is_corlib.
2510 * verify-internals.h: Same.
2512 * pedump.c: Fix for mono_image_verify new signature.
2514 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2516 * metadata-verify.c (verify_typedef_table): Verify for some invalid
2519 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2521 * metadata-verify.c (verify_module_table): Ignore the generation field.
2523 2009-04-15 Martin Baulig <martin@ximian.com>
2525 * debug-mono-symfile.c
2526 (mono_debug_symfile_lookup_location): Don't print a warning for
2527 unknown extended opcodes if they're within 0x40 and 0x7f.
2529 2009-04-15 Zoltan Varga <vargaz@gmail.com>
2531 * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
2532 invoke signatures returning an enum. Fixes #494847.
2534 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
2536 * metadata-verify.c: Initial code to verify the typedef table.
2538 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
2540 * verify.c (mono_method_verify): Don't fail if an unconditional branch
2541 with non empty stack happens before the beginning of a try block.
2545 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
2547 * metadata-verify.c: Verify typename and typenamespace fields of
2550 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
2552 * metadata-verify.c: Initial code to verify the typeref table.
2554 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
2556 * verify.c (verify_delegate_compatibility): Fix error message.
2558 2009-04-14 Sebastien Pouliot <sebastien@ximian.com>
2560 * security-core-clr.c: Fix typo
2562 2009-04-14 Zoltan Varga <vargaz@gmail.com>
2564 * marshal.c (delegate_hash_table_add): Make delegate_target_locations
2565 a MonoGHashTable to keep its values alive.
2566 (emit_marshal_boolean): Fix a warning.
2568 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
2570 * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
2571 not have any interface configured for IPv4/IPv6.
2573 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
2575 * assembly.c: fix typo in error message.
2577 2009-04-14 Zoltan Varga <vargaz@gmail.com>
2579 * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
2580 allocating the location holding the this argument to prevent
2581 'too many root sets' errors.
2583 * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
2584 to mark fields as special static.
2585 (mono_field_static_get_value): Handle special static fields.
2586 (mono_field_static_set_value): Ditto.
2588 * class-internals.h (struct _MonoClassField): Document this.
2590 2009-04-13 Bill Holmes <billholmes54@gmail.com>
2592 * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
2593 the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
2594 case. This will handle when managed code returns null to native code.
2596 Code is contributed under MIT/X11 license.
2598 2009-04-13 Bill Holmes <billholmes54@gmail.com>
2600 * object.c (build_imt_slots): Changing a free to a g_free to match
2601 the g_malloc0 in add_imt_builder_entry that allocated this memory.
2603 Code is contributed under MIT/X11 license.
2605 2009-04-13 Bill Holmes <billholmes54@gmail.com>
2607 * marshal.c (emit_marshal_boolean): Adding code to ensure that
2608 the correct TRUE value is passed through the marshaling layer.
2610 Code is contributed under MIT/X11 license.
2612 2009-04-13 Zoltan Varga <vargaz@gmail.com>
2614 * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
2615 correctly. Fixes #492330.
2617 * marshal.c: Fix the embedding of object pointers into JITted code in
2618 the native-to-managed wrappers by allocating some GC tracked memory, and
2619 embedding the address of that.
2621 2009-04-11 Zoltan Varga <vargaz@gmail.com>
2623 * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
2624 pointers into the vtable.
2626 2009-04-09 Rodrigo Kumpera <rkumpera@novell.com>
2628 * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
2630 * verify.c (verify_ldftn_delegate): Improve error message.
2632 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
2634 * reflection.c (my_mono_class_from_mono_type): Remove.
2636 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
2638 Prepare to reduce memory usage of owner-less generic parameters (1/n)
2639 * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
2640 and constraints fields into ...
2641 (MonoGenericParamInfo): ... this.
2642 (mono_generic_param_info, mono_generic_container_get_param_info):
2644 * class.c, debug-helpers.c, icall.c: Update to changes.
2645 * metadata.c, reflection.c, verify.c: Likewise.
2647 2009-04-09 Zoltan Varga <vargaz@gmail.com>
2649 * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
2651 * marshal.c (get_runtime_invoke_type): Share enums with their base types.
2653 * marshal.c (get_runtime_invoke_type): Share pointers with ints and
2654 booleans with sbytes.
2656 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
2658 * class.c (can_access_instantiation): Verify accesibility of element types
2659 for arrays and pointers.
2661 * class.c (can_access_type): Return true if the target class is VAR or MVAR.
2663 * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
2667 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
2669 * verify.c (do_invoke_method): Improve error messages.
2671 2009-04-08 Bill Holmes <billholmes54@gmail.com>
2673 * verify.c: Fixing the MSVC build.
2675 Code is contributed under MIT/X11 license.
2677 2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
2679 * security-core-clr.c: Simplify get_reflection_caller not to call
2680 mono_method_get_last_managed (another stack walk) and adjust the
2681 callers to handle a (should not happen) NULL return value.
2683 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2685 Add accessors to some MonoGenericParam fields
2686 * class-internals.h (mono_generic_param_owner): New accessor.
2687 (mono_generic_param_num): Likewise.
2688 (mono_type_get_generic_param_owner): New helper.
2689 (mono_type_get_generic_param_num): New helper.
2690 * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
2692 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2694 * class-internals.h (mono_generic_container_get_param): New wrapper.
2695 * class.c, icall.c, metadata.c, verify.c: Use it.
2697 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
2700 * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
2701 the standard case/loop. In particular, don't complain about
2702 references to generic type definitions.
2704 2009-04-07 Zoltan Varga <vargaz@gmail.com>
2706 * debug-helpers.c (dis_one): Decode string arguments.
2708 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
2710 * pedump.c (dump_verify_info): Dump type name correctly.
2712 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
2714 * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
2715 are larger than code size.
2717 This can happen in valid code if the try/catch block is not followed by any instruction
2718 and do a backward branch on the leave instruction.
2722 2009-04-06 Sebastien Pouliot <sebastien@ximian.com>
2724 * security-core-clr.c: Fix typo while comparing second method names
2725 in can_avoid_corlib_reflection_delegate_optimization
2727 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
2729 * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
2733 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
2735 * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
2736 a MVAR using a class context.
2740 2009-04-06 Zoltan Varga <vargaz@gmail.com>
2742 * object.c (mono_class_compute_gc_descriptor): Make this non-static.
2744 * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
2746 * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
2747 functions supplied by the JIT for the SGEN GC.
2749 * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
2751 2009-04-06 Massimiliano Mantione <massi@ximian.com>
2753 monitor.c (mono_monitor_try_enter_internal):
2754 Added calls to profile monitor contentions.
2755 Also duplicated a small piece of code (the "get the monitor" logic)
2756 from the fast path to the slow path, and changed the relevant goto
2757 statements, so that monitor acquisition events can be emitted from the
2758 slow path (this is by Paolo Molaro).
2760 2009-04-06 Massimiliano Mantione <massi@ximian.com>
2762 * profiler.c, profiler.h, profiler-private.h:
2763 Added support for profiling monitor contentions.
2765 2009-04-03 Rodrigo Kumpera <rkumpera@novell.com>
2767 * metadata-verify.c: Verify the modules table.
2769 2009-04-02 Rodrigo Kumpera <rkumpera@novell.com>
2771 * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
2772 using the context of the method been verifier and not of the method been called.
2774 * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
2775 safely inflate generic types.
2777 2009-04-02 Sebastien Pouliot <sebastien@ximian.com>
2779 * security-core-clr.c: Change the strategy for checking the
2780 "reflection using delegates optimization" to avoid unneeded
2781 attributes in multiple class libraries.
2783 2009-04-02 Mark Probst <mark.probst@gmail.com>
2785 * sgen-gc.c: Remove object element in the disappearing link struct
2786 by storing the object pointer in the link.
2788 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
2790 * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
2792 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
2794 * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
2796 * verify.c (mono_method_verify): Do proper bounds checking of exception
2799 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
2801 * loader.c (mono_field_from_token): Don't crash if the field parent could
2804 2009-03-31 Mark Probst <mark.probst@gmail.com>
2806 * sgen-gc.c: Execute critical finalizers after ordinary
2809 * class-internals.h, domain.c: Add CriticalFinalizerObject to
2812 2009-03-31 Jb Evain <jbevain@novell.com>
2814 * verify.c (do_ldstr): don't check if a string is in the user strings
2815 heap if the current image is dynamic.
2817 2009-03-31 Mark Probst <mark.probst@gmail.com>
2819 * sgen-gc.c: Wait until the last finalizer has executed when
2820 returning from WaitForPendingFinalizers.
2822 2009-03-31 Martin Baulig <martin@ximian.com>
2824 * mono-debug-debugger.h (MonoDebuggerEvent): Add
2825 `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
2826 `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
2827 (mono_debugger_event_create_appdomain): New function.
2828 (mono_debugger_event_unload_appdomain): New function.
2830 * appdomain.c (mono_domain_create_appdomain_internal): Call
2831 mono_debugger_event_create_appdomain().
2833 2009-03-31 Martin Baulig <martin@ximian.com>
2835 * mono-debug-debugger.c
2836 (mono_debugger_register_class_init_callback): Also register the
2837 class init callback if the class is already initialized to make
2838 things work with shadow copied assemblies.
2840 2009-03-31 Sebastien Pouliot <sebastien@ximian.com>
2842 * security-core-clr.c
2843 (mono_security_core_clr_ensure_reflection_access_field): Let
2844 critical code access the field (just like we do for methods). Use
2845 check_field_access helper.
2846 (mono_security_core_clr_ensure_reflection_access_method): Use
2847 check_field_access helper.
2849 2009-03-31 Mark Probst <mark.probst@gmail.com>
2851 * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
2852 call the run-finalize function directly.
2854 * gc.c, gc-internal.h: Make run_finalize() non-static.
2856 2009-03-31 Mark Probst <mark.probst@gmail.com>
2858 * sgen-gc.c: Use a separate struct for disappearing links.
2860 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
2862 * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
2863 * MaxIOVectorLength enabled, just ignore them.
2866 2009-03-30 Rodrigo Kumpera <rkumpera@novell.com>
2868 * metadata-verify.c: Fix eglib build.
2870 2009-03-30 Zoltan Varga <vargaz@gmail.com>
2872 * threads-types.h: Fix the win32 build.
2874 2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
2876 * class.c: move coreclr inheritance/override checks to
2878 * security-core.clr.c|h: add code from class.c with additional
2879 documentation. Fix override check when the method is not critical.
2881 2009-03-28 Zoltan Varga <vargaz@gmail.com>
2883 * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
2884 (match_class): Ditto.
2886 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
2888 * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
2890 * metadata-verify.c: Implement table layout row size calculation. Verify
2891 the total size of the tables.
2893 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
2895 * metadata-verify.c: Verify heap sizes and size to decode row counts.
2897 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2900 * console-io.[ch]: added new mono_console_init() to make sure that
2901 file descriptors 0, 1 and 2 are opened.
2904 2009-03-27 Sebastien Pouliot <sebastien@ximian.com>
2906 * appdomain.h: Export a new callback type and a new function to
2907 set this callback. This allow a mono host to provide it's own
2908 definition for "platform code".
2909 * metadata-internals.h: Add a core_clr_platform_code flag on
2910 _MonoImage to (cache and) know if it is representing platform
2912 * image.c (do_mono_image_open): Set core_clr_platform_code flag
2913 on platform code images.
2914 * security-core-clr.c|h
2915 (mono_security_set_core_clr_platform_callback): Allow the host
2916 to provide it's own platform check definition.
2917 (mono_security_core_clr_determine_platform_image): Detect if an
2918 image is platform code (using the specified callback).
2919 (mono_security_core_clr_is_platform_image): Return cached value
2922 2009-03-27 Zoltan Varga <vargaz@gmail.com>
2924 * threads.c (mono_create_thread): New helper function to wrap CreateThread
2925 which has different parameter types for the 'tid' argument in windows and
2928 * appdomain.c attach.c threads.c: Use the new helper.
2930 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
2932 * metadata-verify.c: Verify valid table bits.
2934 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
2936 * metadata-verify.c (verify_metadata_header): Store size in the size field.
2938 * metadata-verify.c: Add initial table schema verification.
2940 2009-03-26 Zoltan Varga <vargaz@gmail.com>
2942 * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
2943 obtain the refclass argument needed by mono_param_get_objects (). Fixes
2946 * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
2948 * appdomain.c (MONO_CORLIB_VERSION): Bump this.
2950 2009-03-26 Sebastien Pouliot <sebastien@ximian.com>
2952 * security-core-clr.c: Add/update documentation
2954 2009-03-26 Zoltan Varga <vargaz@gmail.com>
2956 * marshal.c (emit_marshal_object): Generate code to throw an exception
2957 instead of throwing it. Fixes #488670.
2959 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
2961 * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
2962 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
2963 an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
2964 and add a call to mono_security_core_clr_ensure_delegate_creation
2965 to do the extra checks required by CoreCLR.
2966 * security-core-clr.c|h: Add function to check delegate creation,
2967 both in the binding and accessibility, under CoreCLR.
2969 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
2971 * reflection.c (mono_reflection_create_dynamic_method): when
2972 coreclr is enabled make sure that every resolved object are
2973 checked (e.g. field and method access).
2974 * security-core-clr.c|h: Add function to check objects resolved
2975 when a dynamic method is created.
2977 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
2979 * metadata-verify.c: Cache directory rva translations.
2981 * metadata-verify.c: Add cli-header and streams verification.
2983 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
2985 * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
2986 the wrong offset (8 instead of 6).
2988 2009-03-23 Zoltan Varga <vargaz@gmail.com>
2990 * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
2991 methods, return the native function address itself. Fixes
2994 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
2996 * console-io.c: some of the values for control characters might not be
2999 2009-03-21 Sebastien Pouliot <sebastien@ximian.com>
3001 * exception.c|h: Add helpers to create [Field|Method]AccessException
3002 * icall.c: Add required coreclr check calls for field reflection.
3003 Move the existing (method) check logic into security-core-clr.c
3004 * security-core-clr.c: Add functions to check if the access of a
3005 field or method is allowed when reflecting under coreclr. This is
3006 mostly done using a stack walk to find the "real" caller: i.e. the
3007 code that is calling the reflection
3009 2009-03-20 Zoltan Varga <vargaz@gmail.com>
3011 * gc-internal.h: Change location of gc_wrapper.h
3013 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
3015 * class.c: Simplification to coreclr checks for overrides that
3016 makes it easier to set breakpoints.
3018 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
3020 * security-core-clr.c|h: (mono_security_core_clr_class_level,
3021 mono_security_core_clr_method_level): Avoid potential
3022 MonoCustomAttrInfo allocation for transparent assemblies (e.g.
3023 user/application code) and make it easier to set breakpoints
3025 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3027 * metadata-verify.c: Reject cli header tables that mono don't handle.
3029 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3031 * pedump.c: Fix CLI header dumping.
3033 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3035 * metadata-verify.c: More CLI header verification.
3037 2009-03-19 Zoltan Varga <vargaz@gmail.com>
3039 * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
3041 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
3043 * metadata-verify.c: Initial verification of the CLI header.
3045 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
3047 * metadata-verify.c (verify_resources_table): Fix verification of zero
3048 sized resource section and id entries count.
3050 2009-03-18 Zoltan Varga <vargaz@gmail.com>
3052 * icall.c: Handle user types in many Type icalls. Fixes #486303.
3054 2009-03-17 Jb Evain <jbevain@novell.com>
3056 * profiler.c: call mono_gc_base_init from mono_profiler_load.
3058 2009-03-17 Zoltan Varga <vargaz@gmail.com>
3060 * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
3061 (mono_gc_make_descr_for_array): Ditto.
3063 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
3065 * verify.c (mono_verifier_is_class_full_trust): Add support for
3066 CoreCLR security mode where trusted assemblies are defined as
3069 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3071 * metadata-verify.c: Add minimal PECOFF resource verification.
3073 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3075 * metadata-verify.c: Be less restrictive with some coff fields.
3077 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3079 * verify.c (init_stack_with_value_at_exception_boundary): Init generic
3080 params as boxed values on stack. Fixes #485706.
3082 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3084 * console-io.c: the termios values may vary in different flavors of unix.
3086 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3088 * console-io.[ch]: return the entire set of control characters when
3089 initializing the terminal.
3090 * appdomain.c: bump corlib version.
3092 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
3094 * mono-perfcounters.c: added support for in-process custom
3095 performance counters.
3097 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3099 * metadata-verify.c: Small cleanup and add comment for IAT directory entry.
3101 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3103 * metadata-verify.c: Verify the data pointed by the import table.
3105 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3107 * metadata-verify.c (load_data_directories): Store data
3110 * metadata-verify.c: Verify the import table.
3112 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3114 * metadata-verify.c: Verify data directories.
3116 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3118 * metadata-verify.c: Check section header flags.
3120 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
3122 * appdomain.c: if the assembly name is a shadow-copied file, return
3123 TRUE from mono_is_shadow_copy_enabled but don't actually do anything
3124 in mono_make_shadow_copy.
3125 * icall.c: if the assembly name is a shadow-copied file, replace it
3126 with the original assembly path.
3128 Bug #484244 fixed. NUnit tests for corlib can be run without
3131 2009-03-12 Zoltan Varga <vargaz@gmail.com>
3133 * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
3134 entries when the table is reallocated.
3136 * icall.c: Allocate the memory used by the mono_ptr_array macros using
3137 mono_gc_alloc_fixed () since it contains GC refs.
3139 2009-03-10 Zoltan Varga <vargaz@gmail.com>
3141 * reflection.c (ensure_complete_type): New helper function to call
3142 type resolve handlers for unfinished dynamic types.
3143 (resolve_object): Call it for MonoClassFields. Fixes #483852.
3145 2009-03-09 Zoltan Varga <vargaz@gmail.com>
3147 * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
3150 2009-03-08 Rodrigo Kumpera <rkumpera@novell.com>
3152 * appdomain.c (get_shadow_assembly_location): Fix memleak.
3154 2009-03-08 Zoltan Varga <vargaz@gmail.com>
3156 * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
3157 between GCHandles of type WeakTrackResurrection and the objects they
3160 * gc.c: Partly implement the sematics of GCHandles of type
3161 WeakTrackResurrection: these handles should only be cleared after the
3162 finalizer of the object they are pointing to has ran.
3164 2009-03-06 Mark Probst <mark.probst@gmail.com>
3166 * icall.c: Partially revert r126631 because using the jump
3167 trampolines for generic shared methods makes it superfluous.
3169 2009-03-06 Zoltan Varga <vargaz@gmail.com>
3171 * threads.c (handle_store): Create the 'threads' hash table with the proper
3172 MONO_HASH_VALUE_GC type.
3174 2009-03-05 Zoltan Varga <vargaz@gmail.com>
3176 * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
3179 * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
3180 and LAST_GC_TRACKED as a GC root.
3182 * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
3184 * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
3185 the static data even if it consists of 1 reference.
3187 * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
3188 if there is a GC descriptor.
3190 * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
3191 instead of through the GC since they contain no object references.
3193 2009-03-05 Mark Probst <mark.probst@gmail.com>
3195 * generic-sharing.c (instantiate_other_info): Always return a jump
3196 trampoline for method code.
3198 2009-03-05 Marek Habersack <mhabersack@novell.com>
3200 * culture-info-tables.h: generated to include the en-tt culture.
3202 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3204 * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
3205 capture the thread context.
3207 * object.c (mono_async_result_new): Cache the invoke wrappers to
3208 ExecutionContext::Capture.
3210 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3212 * marshal.h: Add a prototype for what mono_compile_method returns
3213 for invoke wrappers.
3215 * gc.c: Use the new prototype declaration.
3217 2009-03-04 Geoff Norton <gnorton@novell.com>
3219 * boehm-gc.c: Add some MONO_LOG tracing for the GC
3221 * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
3223 2009-03-04 Martin Baulig <martin@ximian.com>
3226 (mono_debugger_runtime_invoke): Removed.
3228 * mono-debug-debugger.c
3229 (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
3231 2009-03-02 Martin Baulig <martin@ximian.com>
3234 (mono_debugger_unhandled_exception): Removed.
3235 (mono_debugger_handle_exception): Removed.
3236 (mono_debugger_throw_exception): Removed.
3239 (mono_debug_debugger_version): Bump to 5.
3241 * mono-debug-debugger.c: Moved the exception handling code to
3242 ../mini/debug-mini.c
3244 2009-03-03 Zoltan Varga <vargaz@gmail.com>
3246 * domain-internals.h (struct _MonoDomain): Add a separate lock for the
3247 finalize_objects_hash.
3249 * gc.c: Use the separate lock to access the finalize_objects_hash field.
3251 * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
3254 * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
3257 * image.c (mono_image_close): Free it.
3259 * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
3260 allowing a creation of a wrapper which invokes its method using a CALLVIRT
3261 on the this argument.
3263 * gc.c (run_finalize): Optimize the calling of the finalizers.
3265 2009-03-03 Martin Baulig <martin@ximian.com>
3267 * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
3268 of the `MonoGenericInst' changes.
3270 2009-03-03 Rodrigo Kumpera <rkumpera@novell.com>
3272 * icall.c (ves_icall_MonoType_GetGenericArguments): Use
3273 mono_array_class_get_cached to reduce locking contention. Extract
3276 * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
3277 intermediary managed arrays. Use caching version of mono_array_new
3278 to allocate the result array.
3280 * icall.c (ves_icall_Type_GetEvents_internal): Same.
3282 * icall.c (ves_icall_Type_GetNestedTypes): Same.
3284 * locales.c (create_names_array_idx): Use mono_array_new_cached
3285 to reduce locking contention.
3287 2009-03-03 Zoltan Varga <vargaz@gmail.com>
3289 * object.c (mono_method_add_generic_virtual_invocation): Put back the
3290 thunk builder code for the non-interface case.
3292 2009-03-02 Zoltan Varga <vargaz@gmail.com>
3294 * object.c (get_generic_virtual_entries): New helper function to collect
3295 the virtual generic method instances which need to be added to an IMT
3297 (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
3298 Instead of creating a new IMT thunk, reset the vtable slot to the
3299 trampoline, the thunk will be created the next time the trampoline is called.
3300 (build_imt_slots): Add support for virtual generic methods in interfaces by
3301 adding to the IMT thunk all the methods registered using
3302 mono_method_add_generic_virtual_invocation ().
3304 * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
3305 (struct _MonoIMTCheckItem): Ditto.
3307 * object.c (mono_method_add_generic_virtual_invocation): Take a
3308 MonoMethod argument instead of a MonoGenericInst. Fix the construction of
3309 the IMT thunk to include all items.
3311 * object.c (mono_class_create_runtime_vtable): Add a missing
3312 mono_loader_unlock ().
3314 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
3316 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3318 * object-internals.h (MonoReflectionEvent): Add cached_add_event.
3320 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
3322 * object-internals.h: Rename _MonoReflectionEvent to
3323 MonoReflectionMonoEvent so it reflects the right managed type.
3324 Add a MonoReflectionEvent that correctly represents System.EventInfo.
3327 * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
3330 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
3332 * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
3333 intermediary managed arrays. Use caching version of mono_array_new
3334 to allocate the result array.
3336 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
3338 * reflection.c: Use cached version of mono_array_new alongside
3339 the mono_reflection_get_custom_attrs_by_type call path.
3341 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
3343 * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
3344 intermediary managed arrays. Use caching version of mono_array_new
3345 to allocate the result array.
3347 * icall.c (ves_icall_Type_GetConstructors_internal): Same.
3349 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
3351 * icall.c: Add small implementation of a growable stack bound array.
3353 * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
3355 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
3356 intermediary managed arrays. Use caching version of mono_array_new
3357 to allocate the result array.
3359 2009-02-27 Rodrigo Kumpera <rkumpera@novell.com>
3361 * icall.c: New icall ves_icall_System_Enum_compare_value_to that
3362 helps Enum::CompareTo to be implemented without reboxing all enums
3363 to their underlying type.
3364 2009-02-27 Zoltan Varga <vargaz@gmail.com>
3366 * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
3367 since it acquires a global lock leading to scalability problems.
3369 * profiler.c: Make the stat profiler work with multiple appdomains, this
3370 currently only works when no appdomains are unloaded.
3372 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
3374 * appdomain.c: make the check to avoid copying when the assembly is
3375 already shadow copied actually work.
3377 2009-02-26 Zoltan Varga <vargaz@gmail.com>
3379 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3381 * object-internals.h (struct _MonoReflectionGenericClass): Sync with
3382 changes to the managed side.
3384 2009-02-25 Zoltan Varga <vargaz@gmail.com>
3386 * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
3387 classes + a separate lock for it, as it is used frequently at runtime, not
3388 just during metadata loading/JIT compilation.
3390 * class.c (mono_bounded_array_class_get): Use the separate cache + lock
3393 * object-internals.h (mono_class_from_name_cached): New macro to cache
3394 the results of the lookup locally without having to declare a static
3395 variable to hold it.
3396 (mono_class_get_field_from_name_cached): Ditto.
3397 (mono_array_class_get_cached): Ditto.
3399 * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
3402 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
3403 slower search in metadata.
3405 * pedump.c: Fix a warning.
3407 2009-02-23 Zoltan Varga <vargaz@gmail.com>
3409 * reflection.c (encode_locals): Add checks for user types.
3410 (method_encode_clauses): Ditto.
3411 (method_encode_code): Ditto.
3412 (mono_image_create_token): Ditto.
3414 * object-internals.h: Change the type of more fields from MonoReflectionType*
3417 2009-02-22 Zoltan Varga <vargaz@gmail.com>
3419 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
3420 the a thread does not suspend within 100ms.
3422 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
3423 in addition to StopRequested as well.
3425 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
3427 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
3428 search the method_hash before inserting a new entry, to avoid crashes when
3429 the same method is inserted multiple times, causing the old
3430 MonoDebugMethodInfo structure to be freed by the value dtor function.
3432 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3434 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
3435 SO_EXLUSIVEADDRUSE where available.
3437 2009-02-21 Zoltan Varga <vargaz@gmail.com>
3439 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
3440 runtime invoke wrappers, this time it is string ctor wrappers, which
3441 pass a dummy string as 'this' instead of their obj argument. Fixes
3444 2009-02-21 Jb Evain <jbevain@novell.com>
3446 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3447 only get create_culture once.
3449 2009-02-20 Zoltan Varga <vargaz@gmail.com>
3451 * reflection.c (mono_reflection_setup_internal_class): Move the user type
3452 check before the locking.
3454 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
3455 (mono_reflection_create_runtime_class): Ditto.
3456 (mono_reflection_sighelper_get_signature_local): Ditto.
3457 (mono_reflection_sighelper_get_signature_field): Ditto.
3459 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
3460 is a System.MonoType object or similar.
3461 (monotype_cast): New helper function to cast a MonoObject to a
3462 MonoReflectionType object.
3464 * object-internals.h: Change MonoReflectionType* members in structures to
3465 MonoObject* members to force the usage of the monotype_cast () function.
3467 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
3468 structures/arrays. This causes us to assert instead of crashing when
3469 instances of user defined subclasses of System.Type are encountered.
3471 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3475 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
3476 win32 resource loaded from a PE file.
3478 * image.c: fix mono_image_lookup_resource.
3480 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3484 * threads.c: added internal call for WaitHandle.SignalAndWait.
3486 2009-02-19 Bill Holmes <billholmes54@gmail.com>
3488 * cominterop.c : Adding cominterop_type_from_handle and
3489 registering it as an icall. Replacing all references
3490 to type_from_handle.
3492 Code is contributed under MIT/X11 license.
3494 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3496 * Makefile.am: Add lock-tracer.h and lock-trace.c.
3498 * appdomain.c: Call the tracer init function.
3500 * domain-internals.h: Enable the tracer for the domain locks.
3502 * image.c: Enable the tracer for image locks.
3504 * loader.c: Enable the trace for the loader lock.
3507 * lock-tracer.c: Initial implementation of the lock trace utility.
3508 The tracer requires a compile time define to be enabled and a env var
3509 to be enabled at runtime.
3511 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3513 * domain.c (mono_domain_code_foreach): Improve documentation.
3515 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3518 * generic-sharing.c:
3520 * reflection.c: Adjust locking order to the new semantics where the loader lock
3523 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
3525 * domain.c: Add mono_domain_code_* functions that perform locking
3526 around the domain codeman.
3528 * domain-internals.h: Export those functions.
3530 * object.c: Use new functions instead of acquiring the domain lock.
3532 2009-02-19 Zoltan Varga <vargaz@gmail.com>
3534 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
3535 delegate. Fixes #477396.
3537 2009-02-18 Zoltan Varga <vargaz@gmail.com>
3539 * reflection.c (create_custom_attr): Get rid of alloca.
3541 2009-02-18 Bill Holmes <billholmes54@gmail.com>
3543 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
3544 Adding exception handling for all CCW calls.
3546 Code is contributed under MIT/X11 license.
3548 2009-02-18 Zoltan Varga <vargaz@gmail.com>
3550 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
3552 * marshal.c (emit_marshal_boolean): Add null checks to the new
3553 native->managed marshalling code. Fixes #476247.
3555 2009-02-17 Zoltan Varga <vargaz@gmail.com>
3557 * class.c (mono_class_get_vtable_entry): Move the addition of
3558 static rgctx invoke wrappers for vtable methods here, this simplifies
3559 a lot of code and causes fewer rgctx wrappers to be created.
3561 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
3562 name of the statistics to begin with an uppercase.
3564 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
3566 * reflection.c: Revert previous change as it breaks the build.
3568 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
3570 * verify.c: Properly handle SZARRAY element type.
3574 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
3576 * reflection.c (mono_image_create_method_token): Correctly encode
3577 MethodDef MemberRefParent token.
3581 2009-02-17 Zoltan Varga <vargaz@gmail.com>
3583 * image.c (mono_image_close): Delete the critical section before
3584 freeing the memory holding it.
3586 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3588 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
3591 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3593 * pedump.c (main): Call mono_marshal_init so pedump
3596 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3598 * loader.c (method_from_memberref): Properly fix #474271 and
3599 don't break the runtime bad.
3601 2009-02-16 Zoltan Varga <vargaz@gmail.com>
3603 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
3604 (mono_domain_alloc0): Ditto.
3606 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3608 * loader.c (method_from_memberref): Don't abort if the array
3609 method is not found. A regular loader failure is more informative
3614 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3616 *loader.c: Guard MonoImage::method_cache/methodref_cache
3617 using the image lock instead of the loader lock.
3619 * metadata.h: Add comments about which fields are protected by
3622 2009-02-16 Zoltan Varga <vargaz@gmail.com>
3624 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
3626 * generic-sharing.c (mono_method_construct_object_context): Remove the
3627 wrapper_type == NONE assert, it is not needed.
3629 2009-02-15 Zoltan Varga <vargaz@gmail.com>
3631 * reflection.c (clear_cached_object): New helper function.
3632 (mono_method_clear_object): New function to clear the cached reflection
3633 objects for a dynamic method.
3635 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
3636 Partly fixes # 463323.
3638 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
3642 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
3644 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
3646 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
3647 take the image lock instead of the loader lock.
3649 * metadata-internals.h: Export new functions.
3651 2009-02-12 Miguel de Icaza <miguel@novell.com>
3653 * domain.c (app_config_parse): Remove another use of stat that is
3654 not necessary as g_file_get_contents already does the presence
3657 2009-02-13 Zoltan Varga <vargaz@gmail.com>
3659 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
3661 * marshal.c: Move the bstr handling code to cominterop.c.
3663 * marshal.c: Remove some COM interop code missed previously.
3665 2009-02-12 Miguel de Icaza <miguel@novell.com>
3667 More Paolo patches from the Wii port:
3669 * security.c: Remove ves_icall_System_Environment_get_UserName
3672 * icall.c: And put ves_icall_System_Environment_get_UserName
3675 * appdomain.c (mono_set_private_bin_path_from_config): Remove
3676 redundant call to stat that was only used to test for the file
3677 existence. Patch from Paolo.
3679 * gc.c (run_finalize): If COM is disabled, do not link in
3680 mono_marshal_free_ccw.
3682 * generic-sharing.c: Use alloca.h here as well.
3684 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
3686 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
3688 2009-02-13 Zoltan Varga <vargaz@gmail.com>
3690 * cominterop.c cominterop.h: New files.
3692 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
3693 function/typedefs which are needed by cominterop.c global.
3695 2009-02-12 Mark Probst <mark.probst@gmail.com>
3697 * generic-sharing.c: Don't take the loader lock to guard image
3700 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3702 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
3703 called without the loader lock which is required to guard MonoImage:tokens.
3705 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3711 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
3713 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3715 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
3716 Rework the code to use regular mono_image_alloc/0.
3718 * loader.c: Rework the code to use regular mono_image_alloc/0.
3720 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
3722 2009-02-12 Bill Holmes <billholmes54@gmail.com>
3724 * object-internals.h : Fixing a typo in the
3725 MonoReflectionComVisibleAttribute struct.
3727 * marshal.c (cominterop_com_visible): Check the implemented
3728 interfaces for ComImport.
3730 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
3731 assume that bools should be treated as VARIANTBOOLs.
3733 * marshal.c (emit_marshal_boolean): Adding cases for
3734 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
3736 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
3737 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
3739 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
3740 should be treated as VARIANTBOOLs.
3742 Code is contributed under MIT/X11 license.
3744 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3746 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
3747 allocation with the image lock.
3749 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3751 This patch is the last of a series to remove explicit reference of MonoImage::mempool
3752 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
3754 * object.c: Add mono_string_to_utf8_image.
3756 * object-internals.h: Export mono_string_to_utf8_image.
3758 * reflection.c: Rework all explicit references to the the image mempool to go thought
3759 the mono_image_alloc set of functions.
3761 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3763 This patch is the third of a series to remove explicit reference of MonoImage::mempool
3764 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
3765 and generics-sharing.c.
3767 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
3768 as first argument. Note that this function remains broken as it doesn't perform locking around the
3771 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
3773 * image.c: Add g_slist_append_image.
3775 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
3776 the supplied image for allocation. Move code into mono_metadata_field_info_full.
3778 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
3779 Fix all related code to do the same.
3781 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
3783 * metadata-internals.h: Fix the signatures.
3785 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
3787 This patch is the second of a series to remove explicit reference of MonoImage::mempool
3788 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
3789 and similar to work using MonoImage.
3791 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
3794 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
3796 * class.c (mono_metadata_signature_deep_dup): Same.
3798 * class.c (inflate_generic_type): Same.
3800 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
3802 * metadata.c (mono_metadata_signature_dup_full): Same.
3804 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
3805 mono_metadata_signature_dup_full.
3807 * metadata.c (mono_metadata_type_dup): Same.
3809 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
3811 * reflection.c: Same.
3813 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
3815 * metadata-internals.h: Fix the signatures.
3817 * class-internals.h: Same.
3819 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
3821 This patch is the first of a series to remove explicit reference of MonoImage::mempool
3822 and use mono_image_alloc set of functions instead.
3824 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
3825 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
3828 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
3830 * class.c (g_list_prepend_mempool): Removed.
3832 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
3834 * image.c: Add g_list_prepend_image.
3836 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
3838 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
3841 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
3843 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
3846 * image.c (mono_image_init): Init the lock field.
3848 * image.c (mono_image_init): Cleanup the lock field.
3850 * image.c: Add mono_image_(un)lock functions.
3852 2009-02-11 Mark Probst <mark.probst@gmail.com>
3854 * class.c, class-internals.h: mono_method_get_context_general()
3855 combines the functionality of mono_method_get_context() and
3856 mini_method_get_context().
3858 * generic-sharing.c, domain-internals.h:
3859 mono_method_construct_object_context() and
3860 mono_domain_lookup_shared_generic() moved from mini.
3862 * icall.c (ves_icall_InternalInvoke): Handle the case where the
3863 method doesn't have the correct instantiation because it's shared
3864 generic code. Fixes #473999.
3866 2009-02-11 Zoltan Varga <vargaz@gmail.com>
3868 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
3870 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
3872 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
3874 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
3876 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
3878 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
3879 and recheck the cache for dups after it.
3881 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
3883 Fixes one of the deadlocks found in #473150.
3885 2009-02-11 Bill Holmes <billholmes54@gmail.com>
3887 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
3888 For Win32, add additional break conditions for accept.
3890 Code is contributed under MIT/X11 license.
3892 2009-02-10 Zoltan Varga <vargaz@gmail.com>
3894 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
3895 lazily initialize the native wrapper cache.
3896 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
3897 cache, since they are different from the normal wrappers.
3899 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
3901 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
3902 AOT compiled native wrappers.
3904 2009-02-09 Geoff Norton <gnorton@novell.com>
3907 * security-core-clr.c: Allow enabling core-clr from the embedding
3910 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3912 * socket-io.c: when requesting all the local ips, if there are no
3913 interfaces up and running, MS returns 127.0.0.1.
3915 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3917 * mono-perfcounters-def.h: processor time is an inverse time.
3920 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3922 * socket-io.c: an empty host name returns the list of local IPs.
3923 Fixes bug #386637 part 1/2.
3925 2009-02-07 Zoltan Varga <vargaz@gmail.com>
3927 * verify.c (mono_class_interface_implements_interface): Call
3928 mono_class_setup_interfaces ().
3929 (merge_stacks): Ditto.
3931 2009-02-06 Zoltan Varga <vargaz@gmail.com>
3933 * class.c (mono_class_setup_interfaces): New function to lazily initalize
3935 (mono_generic_class_get_class): Don't initalize klass->interfaces.
3936 (mono_generic_class_get_class): Ditto.
3938 2009-02-06 U-QUACK\miguel <miguel@quack>
3940 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
3941 they live in security.c
3943 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
3944 another bit from Paolo's code.
3946 2009-02-06 Zoltan Varga <vargaz@gmail.com>
3948 * object.c (build_imt_slots): Add a small optimization to avoid inflating
3949 methods which will be discarded by add_imt_builder_entry ().
3951 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
3954 * loader.c: Add a statistics for the size of the memberref signature cache.
3956 * loader.c (find_cached_memberref_sig): New helper function.
3957 (cache_memberref_sig): Ditto.
3959 * loader.c: Cache the result of parsing memberref signatures, since otherwise
3960 they will be parsed again for every generic instantiation, leading to unbounded
3963 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3965 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
3966 parameters of generic methods.
3968 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
3969 after the original method is copied to the inflated method.
3970 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
3972 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
3973 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
3975 * class.c metadata.c: Update after the changes above.
3977 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
3979 * metadata-verify.c: Simplified error handling and added
3980 section table validation.
3982 2009-02-05 Zoltan Varga <vargaz@gmail.com>
3984 * class-internals.h (MonoClassExt): New structure containing rarely used
3985 fields of MonoClass.
3986 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
3987 through a new 'ext' field.
3989 * class.c (mono_class_alloc_ext): New helper function to allocate
3992 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
3994 2009-02-05 Mark Probst <mark.probst@gmail.com>
3996 * object.c (mono_object_get_virtual_method): Properly inflate
3997 generic methods. Fixes #472692.
3999 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
4001 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
4002 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
4003 for the parent type, the created type must be ready to be used on a generic
4005 We fill this_arg/byval_arg if the parent is a generic instance to make sure
4006 we won't have duplicated entries in generic_inst_cache.
4010 2009-02-05 Miguel De Icaza <miguel@novell.com>
4012 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
4013 replace with plain BSD per the comments on the bug MONO77637.
4015 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4017 * class.c (mono_class_get_generic_class): New accessor function.
4018 (mono_class_get_generic_container): Ditto.
4020 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
4021 fields, similar to the ones in MonoMethod.
4023 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
4024 (mono_class_create_from_typedef): Set klass->is_generic if needed.
4026 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
4028 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
4029 the same information as element_class->byval_arg.
4031 * class.c reflection.c: Remove references to class->byval_arg.
4033 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
4034 klass->enum_basetype directly.
4036 * verify.c metadata.c object.c icall.c reflection.c: Use
4037 mono_class_enum_basetype () instead of accessing klass->enum_basetype
4040 2009-02-04 Miguel de Icaza <miguel@novell.com>
4042 * icall-def.h: Remove internal calls for sockets when
4043 DISABLE_SOCKET is defined, file system writing features when the
4044 OS only support reading and not writing data and Policy support if
4045 the Policy is disabled.
4047 * image.c (do_mono_image_open): Apply Paolo's patches for using
4048 mono_file_map_ APIs here.
4050 * assembly.c: Add support for platforms to avoid prefix
4053 2009-02-04 Zoltan Varga <vargaz@gmail.com>
4055 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
4058 * class.c (mono_class_inflate_generic_class): New helper function.
4060 * class.c: Use mono_class_inflate_generic_class in a few places. Add
4061 statistics for inflated methods/classes.
4063 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
4065 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
4066 the call is made from Delegate.CreateDelegate () for the invoke method of
4069 * loader.c: Add a statistics for the memory occupied by inflated signatures.
4071 * metadata.c (mono_metadata_signature_size): New helper function.
4073 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
4076 * metadata.c (inflated_method_in_image): Avoid calling
4077 mono_method_signature () if the method does not already have a signature.
4079 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4081 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
4082 valuetype is compatible with target type, check by inheritance as a
4083 VT is not really compatible with System.ValueType, for example.
4085 * verify.c (do_invoke_method): Improve error message.
4087 * verify.c (do_box_value): If boxing a nullable, use the type argument
4090 * verify.c (do_newobj): Improve error message.
4094 2009-02-03 Miguel de Icaza <miguel@novell.com>
4096 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
4098 2009-02-03 Mark Probst <mark.probst@gmail.com>
4100 * generic-sharing.c: Don't hold domain lock when calling
4101 instantiate_other_info(). Fixes #471958.
4103 * domain-internals.h, loader.c: Describe locking policy of domain
4104 lock vs loader lock.
4106 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4108 * verify.c (mono_delegate_signature_equal): Make it possible to check
4109 first-arg-bound delegates to static method.
4111 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
4112 static methods with the first arg bound.
4116 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4118 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
4121 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
4122 under strict mode. Any type, when boxed can be seen as a reference type.
4126 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4128 * object.h: The lower bound of an array is a signed integer value.
4129 Introduce mono_array_lower_bound_t typedef. It should be used instead of
4130 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
4132 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
4133 calculate the upper bound.
4137 2009-02-02 Miguel de Icaza <miguel@novell.com>
4139 From Paolo's work, refactored, cleared up:
4141 * threadpool.c, icall.c: ifdef code that requires a working socket
4144 * metadata.c (mono_metadata_field_info): Do not attempt to return
4145 a value from a function declared as void.
4147 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
4148 from the console stack.
4150 * assembly.c: use strrchr instead of rindex.
4152 * class.c, object.c, marshal.c, icall.c, reflection.c: include
4153 alloca.h on systems that have it.
4155 * environment.c: Avoid code that uses stuff from
4158 * appdomain.c: Include sys/time.h.
4160 * console-io.c: include sys/ioctl.h if it is available.
4162 2009-02-03 Zoltan Varga <vargaz@gmail.com>
4164 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
4166 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
4169 * marshal.c: Set mb->skip_visibility instead of setting it on the method
4170 after it was created and cached, as the later is not thread safe.
4172 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4174 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
4175 called while the debugging module is not initialized. Fixes #471669.
4177 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
4179 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
4183 2009-02-02 Mark Probst <mark.probst@gmail.com>
4185 * generic-sharing.c (lookup_or_register_other_info): Make sure the
4186 loader lock is not taken while the templates lock is held. Fixes
4189 2009-02-02 Mark Probst <mark.probst@gmail.com>
4191 * metadata.c (type_in_image): Added a check to fix a monodis
4194 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4196 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
4199 * object.c (mono_runtime_invoke_array): Ditto.
4201 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
4202 freeing wrappers of dynamic methods.
4204 * loader.c (mono_free_method): Call it. Fixes #463323.
4206 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
4207 methods taking vtype/byref arguments, to fix yet another bug caused by
4208 the sharing of runtime invoke wrappers. Partly fixes #471259.
4210 2009-02-01 Zoltan Varga <vargaz@gmail.com>
4212 * debug-mono-symfile.c (check_line): Return NULL instead of returning
4213 <first file in file table>:1 when the IL offset does not have an associated
4216 2009-01-31 Zoltan Varga <vargaz@gmail.com>
4218 * mono-debug.c (mono_debug_lookup_locals): New function to return local
4219 variable info for a method.
4221 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
4223 2009-01-30 Jb Evain <jbevain@novell.com>
4225 * pedump.c: reuse code from monodis to make sure pedump honors
4226 MONO_PATH, which is needed to verify net_2_1 assemblies.
4228 2009-01-29 Zoltan Varga <vargaz@gmail.com>
4230 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
4231 there is no line number info.
4233 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
4235 Avoid some MonoType allocations
4236 * reflection.c (mono_reflection_initialize_generic_parameter):
4237 Reuse MonoType from param->pklass rather than allocating one.
4238 (mono_dynamic_image_free): Update to changes.
4240 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
4242 Rearrange some code to improve consistency
4243 * reflection.c (mono_reflection_setup_generic_class): Move body ...
4244 (mono_reflection_initialize_generic_parameter): ... here.
4246 2009-01-28 Zoltan Varga <vargaz@gmail.com>
4248 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
4249 with type constraints as an experiment.
4251 * boehm-gc.c (on_gc_notification): Update mono_stats.
4253 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
4255 Avoid some allocations
4256 * class-internals.h (_MonoGenericInst::type_argv): Convert from
4257 pointer to tail array to avoid extra allocation.
4258 * metadata.c (free_generic_inst): Update to changes.
4259 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
4262 2009-01-27 Zoltan Varga <vargaz@gmail.com>
4264 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
4265 return TRUE if the two type objects are the same.
4267 2009-01-26 Zoltan Varga <vargaz@gmail.com>
4269 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
4270 (mono_class_native_size): Use klass->marshal_info->min_align instead of
4271 klass->min_align, since klass->min_align contains the managed alignment,
4272 while the native alignment can be different, like for longs on x86.
4275 * class-internals.h (MonoMarshalType): Add a min_align field.
4277 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
4279 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
4282 2009-01-26 Zoltan Varga <vargaz@gmail.com>
4284 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
4285 some comments about the usage of the used_regs field.
4287 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
4290 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
4292 * appdomain.c: return NULL instead of throwing FileNotFoundException
4293 when LoadAssembly() fails.
4295 2009-01-23 Mark Probst <mark.probst@gmail.com>
4297 * metadata.c (mono_metadata_generic_param_equal): Only compare the
4298 image if the owner is NULL. Fixes the AOT failures.
4300 2009-01-23 Zoltan Varga <vargaz@gmail.com>
4302 * metadata.c (mono_metadata_load_generic_params): Initialize the
4303 MonoGenericParam structure using memset so the image field is initialized
4306 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4308 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
4311 2009-01-21 Zoltan Varga <vargaz@gmail.com>
4313 * class.c (mono_class_setup_vtable_general): In the generic instance
4314 optimization, set method->slot for abstract virtual methods. Fixes part of
4317 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4319 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
4320 which signals that the unloading has started but all appdomain services must
4323 * appdomain.c (mono_domain_unload): The initial state for unloading now
4324 is unloading_start and we switch to unloading after the managed call to
4325 AppDomain::DomainUnload has finished.
4327 The new unloading state has to be created because managed code in the
4328 DomainUnload event can depend on things like the threadpool still working.
4329 The domain must remain fully functional while the event executes.
4331 This shown as an issue due to Process::WaitForExit, which waits for
4332 async reads of stdout and stderr to complete. Since those are processed
4333 in the threadpool the code deadlocks because the DomainUnload callback
4334 waits for the async read finished event, which should have been set by a
4335 threadpool job but has been discarded due to the domain been in unload
4338 2009-01-21 Mark Probst <mark.probst@gmail.com>
4340 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
4343 2009-01-21 Mark Probst <mark.probst@gmail.com>
4345 * reflection.c (resolve_object): For fields, inflate the class and
4346 then get the field in the inflated class.
4348 2009-01-20 Mark Probst <mark.probst@gmail.com>
4350 * object-internals.h (struct _MonoException): Added a comment
4351 explaining the new use of trace_ips.
4353 2009-01-20 Mark Probst <mark.probst@gmail.com>
4355 * generic-sharing.c (inflate_other_data): Inflate array methods
4358 * loader.c, class-internals.h: Rename search_in_array_class() to
4359 mono_method_search_in_array_class() and make it non-static.
4361 2009-01-19 Zoltan Varga <vargaz@gmail.com>
4363 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
4364 Hopefully fixes #458168.
4366 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
4368 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
4369 as it is performed elsewhere.
4371 Code is contributed under MIT/X11 license
4373 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
4375 * mono-perfcounters-def.h: Add counters for asp.net requests total and
4377 * object.c (mono_raise_exception): Increment the exceptions total
4378 counter when an exception is thrown.
4379 * class-internals.h: Add a location for storing the total number of
4380 asp.net requests served.
4381 * mono-perfcounters.c: Implement update support for asp.net counters
4382 from the class libraries. Implement read support for asp.net counters
4383 and exceptions total counter.
4385 2009-01-19 Zoltan Varga <vargaz@gmail.com>
4387 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
4388 accessing klass->methods. Fixes #467385.
4390 2009-01-18 Zoltan Varga <vargaz@gmail.com>
4392 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
4393 for byval arguments without an [Out] attribute. Fixes #467212.
4395 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
4396 Fix compilation under android.
4398 * sgen-gc.c: Instead of scanning gray objects after all roots have been
4399 processed, scan them directly after they are copied, to achieve better locality
4402 * socket-io.c: Applied patch from Koushik Dutta
4403 (koush@koushikdutta.com). Disable IPV6 when running under android.
4405 2009-01-18 Zoltan Varga <vargaz@gmail.com>
4407 * icall.c (ves_icall_InternalExecute): Add write barriers.
4409 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
4412 * sgen-gc.c: Implement write barriers in IL code.
4414 2009-01-17 Geoff Norton <gnorton@novell.com>
4416 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
4418 2009-01-17 Geoff Norton <gnorton@novell.com>
4420 * image.c: When unloading the image->references table, there can be gaps
4421 in it. Ensure that we iterate every entry to avoid leaking assembly references
4422 when unloading an appdomain.
4424 2009-01-16 Zoltan Varga <vargaz@gmail.com>
4426 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
4427 speed up ptr-in-nursery checks.
4429 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
4430 threads_lock () to prevent deadlocks.
4432 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
4433 does not need to be scanned during minor collections, since writes to it
4434 must use write barriers.
4436 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
4438 * metadata-verify.c: Add pe nt header verification.
4440 2009-01-15 Zoltan Varga <vargaz@gmail.com>
4442 * gc.c: Fix a few warnings when using SGEN.
4444 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
4446 * metadata-verify.c: Add pe optional header verification.
4448 2009-01-15 Zoltan Varga <vargaz@gmail.com>
4450 * sgen-gc.c: Add support for user defined marker functions, used by
4451 MonoGHashTable to avoid registering a GC root for every hash node.
4453 2009-01-14 Zoltan Varga <vargaz@gmail.com>
4455 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
4456 non-pinned roots into separate hashes to avoid having to traverse them
4457 in functions which are only interested in one kind.
4459 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
4461 * metadata-verify.c: Add pe header machine field verification.
4463 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
4465 * metadata-verify.c: Add pe header size verification.
4467 2009-01-14 Zoltan Varga <vargaz@gmail.com>
4469 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
4470 using the GC, they don't contain references.
4472 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
4474 2009-01-13 Geoff Norton <gnorton@novell.com>
4476 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
4477 AppDomains created on the native side can be cleaned up on the native side.
4479 2009-01-13 Geoff Norton <gnorton@novell.com>
4481 * appdomain.c: Ensure that we call mono_context_init for the embedding api
4482 as well as the managed api.
4484 2009-01-13 Geoff Norton <gnorton@novell.com>
4486 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
4487 with a MonoAppDomain initialized against it.
4489 2009-01-13 Zoltan Varga <vargaz@gmail.com>
4491 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
4493 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
4495 * marshal.c: Avoid setting the exception clauses after a method has been entered
4496 into the wrapper caches. Fixes #465700.
4498 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
4500 (mono_mb_create_method): Set the clauses from the method builder.
4502 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
4504 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
4505 Patch from Makoto Kishimoto.
4507 2009-01-13 Zoltan Varga <vargaz@gmail.com>
4509 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
4510 encoding them as ROOT_DESC_COMPLEX.
4511 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
4513 2009-01-12 Zoltan Varga <vargaz@gmail.com>
4515 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
4516 no longer point to the nursery.
4518 * sgen-gc.c: Add a few comments/FIXMEs.
4520 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
4522 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
4523 initialization of the various _method variables thread safe. Fixes
4526 2009-01-12 Mark Probst <mark.probst@gmail.com>
4528 * domain.c, domain-internals.h: Remove the shared_generics_hash
4529 and its lookup functions.
4531 2009-01-12 Bill Holmes <billholmes54@gmail.com>
4533 * socket-io.c: Fixing the MSVC build.
4535 Code is contributed under MIT/X11 license.
4537 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
4539 * metadata-verify.c: Add pe header watermark verification.
4541 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
4543 * metadata-verify.c: Add lfanew verification.
4545 2009-01-12 Jb Evain <jbevain@novell.com>
4547 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
4548 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
4550 2009-01-10 Zoltan Varga <vargaz@gmail.com>
4552 * socket-io.c: Fix the build.
4554 * environment.c: Fix an #ifdef.
4556 2009-01-09 Zoltan Varga <vargaz@gmail.com>
4558 * threadpool.c (async_invoke_thread): Handle the wait function returning
4559 WAIT_IO_COMPLETION as well.
4560 (async_invoke_io_thread): Ditto.
4562 2009-01-09 Bill Holmes <billholmes54@gmail.com>
4564 * threads.c: Fixing the Windows build.
4566 Code is contributed under MIT/X11 license.
4568 2009-01-09 Zoltan Varga <vargaz@gmail.com>
4570 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
4572 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
4573 the thread to wait again.
4575 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
4577 * metadata-verify.c: Initial skeleton of the metadata verifier.
4579 * pedump.c: Add support for the metadata verifier.
4581 * verify-internal.h: Export the whole assembly metadata verifier function.
4583 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
4585 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
4587 2009-01-09 Zoltan Varga <vargaz@gmail.com>
4589 * Makefile.am: Upgrade dtrace-prelink.sh location.
4591 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
4593 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
4594 well. Otherwise the shutdown deadlock that happens on unix will can happen
4596 If the main thread code finishes too fast it's possible that the finalizer
4597 thread won't have executed yet, won't record itself as the finalizer thread
4598 and the shutdown sequence will wait on it forever.
4600 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
4602 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
4605 2009-01-08 Miguel de Icaza <miguel@novell.com>
4607 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
4608 Robert Jordan for pointing this out.
4610 2009-01-08 Christian Prochnow <cproch@seculogix.de>
4613 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
4614 ves_icall_System_IO_DriveInfo_GetDriveType.
4616 2009-01-07 Miguel de Icaza <miguel@novell.com>
4618 * icall.c: Wrap calls to mono_strtod in CriticalSection
4619 invocations when using eglib, to work around #464316.
4621 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
4623 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
4624 return value of GetCurrentDirectory to never access unitialized memory.
4626 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
4628 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
4629 return value of GetCurrentDirectory and expand the buffer if needed.
4633 2009-10-07 Tom Hindle <tom_hindle@sil.org>
4635 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
4636 Adding a call to mono_init_com_types.
4638 Code is contributed under MIT/X11 license.
4640 2009-01-07 Geoff Norton <gnorton@novell.com>
4642 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
4643 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
4644 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
4645 be the value of the ip buffer.
4647 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
4649 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
4650 interfaces_packed here.
4652 Fixes part of #463294.
4654 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
4656 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
4658 Fixes part of #463294.
4660 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
4662 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
4663 is a boxed complex as well.
4665 Fixes part of #463294.
4667 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
4669 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
4670 control if a methodspec should be created for the generic method definition from external assemblies.
4671 Caching of methodspec is done using the handleref hash table.
4675 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
4677 * loader.c (find_method): When searching the interfaces of a class
4678 check the transitive closure of implemented interfaces.
4682 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
4684 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
4686 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
4688 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
4689 interfaces calculation to fill_valuetype_array_derived_types.
4691 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
4692 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
4695 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
4696 interfaces for valuetypes if needed.
4698 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
4699 for their basetype as well. Types are array expanded if rank is > 0.
4703 2008-12-30 Bill Holmes <billholmes54@gmail.com>
4705 * socket-io.h : Changing the signature of
4706 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
4709 * icall-def.h : Changing the signature of
4710 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
4712 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
4713 For Windows only. Avoid blocking when calling accept by
4714 querying for a connection via select. The loop also queries
4715 the thread state every 1000 micro seconds for the thread
4716 stop state. This will avoid the process hanging on shutdown
4717 when using a TcpChannel that is never connected to.
4719 Code is contributed under MIT/X11 license.
4721 2008-12-30 Marek Safar <marek.safar@gmail.com>
4723 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
4725 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
4727 * class.c (get_implicit_generic_array_interfaces): Extract common
4728 code to a helper function making it a lot easier on the eyes.
4730 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
4732 * class.c (get_implicit_generic_array_interfaces): If the internal
4733 enumerator is an interface inflate System.Object instead of itself.
4737 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
4739 * object.c (mono_runtime_invoke_array): Don't assert with
4740 byref nullable types.
4742 * marshal.c (mono_marshal_get_runtime_invoke): To handle
4743 byref nullables we unbox the object and store it on the
4745 We can't use the boxed object since it is the T of Nullable<T>
4746 and the boxed representation of a nullable it's underlying type
4748 We could cheat and create a boxed nullable and use the same
4749 machinery of other byref VTs but this feels like a hack and
4750 using the stack has the bonus of reducing heap pressure.
4754 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
4756 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
4761 2008-12-19 Bill Holmes <billholmes54@gmail.com>
4763 * icall-def.h : Adding an internal call definition for
4764 System.Environment.internalBroadcastSettingChange.
4766 * icall.c : Adding a Windows only implementation to broadcast a
4767 WM_SETTINGCHANGE when an environment variable has changed.
4769 Code is contributed under MIT/X11 license.
4771 2008-12-19 Mark Probst <mark.probst@gmail.com>
4773 * class.c, class-internals.h: Made
4774 mono_class_has_parent_and_ignore_generics() non-static.
4776 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
4778 * image.c: deal with the mmap failing when loading an image.
4780 2008-12-17 Geoff Norton <gnorton@novell.com>
4782 * threadpool.c: Ensure that the io_queue_lock is initialized
4783 in all circumstances, as we always attempt to cleanup against it.
4785 2008-12-17 Miguel de Icaza <miguel@novell.com>
4787 * icall.c (ves_icall_System_Environment_get_Platform): For
4788 compatibility reasons for existing client code we will keep
4789 returning 4 for a while.
4791 For how long will depend on the documentation being updated, and
4792 for us to give client code a chance to be updated.
4794 This reverts the original decison on #433108 since we did not
4795 catch roughly 33 instances of the broken code in our own source
4796 code base, we did not catch failures on the buildbots, and QA did
4797 not bring this as a problem.
4799 Only today I found some customer's code breaking due to our own
4800 class libraries not being fully updated and tracked it down to
4801 this change. I am reverting it because if we could not even get
4802 our story straight in our own code base, how can we hope that our
4803 end user code be fixed?
4805 As of this morning, our Wiki page that documents how to detect
4806 Unix had not been fixed.
4808 2008-12-16 Zoltan Varga <vargaz@gmail.com>
4810 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
4812 * class.c (mono_class_get_fields): Handle loading errors.
4814 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4816 * 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.
4818 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
4820 * mono-perfcounters.c: avoid warning.
4822 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
4824 * reflection.c (ensure_runtime_vtable): Work on generic instances and
4825 make sure all interfaces have MonoClass::interface_id set.
4827 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
4828 method table is property set.
4830 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
4832 * class.c: New function mono_class_setup_interface_id that setup
4833 MonoClass::interface_id if needed.
4835 * class-internals.h: Export new function.
4837 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
4839 * class.c: Add code to sanity check the vtable after setup_vtable_general
4842 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
4844 * icall.c: make Assembly.GetExecutingAssembly work properly when
4845 reflection is used to invoke the method.
4848 2008-12-11 Mark Probst <mark.probst@gmail.com>
4850 * metadata/generic-sharing.c: Look for constraints in all type
4851 arguments, not just the first one.
4853 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
4855 * appdomain.c: return the correct CodeBase for an Assembly instance
4856 that was loaded from the shadow-copy directories.
4859 2008-12-10 Zoltan Varga <vargaz@gmail.com>
4861 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
4863 * sgen-gc.c (check_object): New debugging helper function.
4865 * object.c: Fix calls to mono_value_copy_array ().
4867 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
4869 * class.c (mono_class_setup_fields): If working on an inflated class
4870 first check if the generic definition did init with success.
4874 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
4876 pedump.c (main): Fix a warning.
4878 2008-12-10 Bill Holmes <billholmes54@gmail.com>
4880 * object-internals.h : Adding a definition for
4881 MonoReflectionComVisibleAttribute.
4883 * marshal.c (cominterop_com_visible) : Method added to check the
4884 ComVisible attribute of a class.
4886 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
4887 cominterop_raise_hr_exception added to consolidate common code
4888 to raise hr exceptions.
4890 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
4891 if a managed class should support IDispatch.
4894 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
4895 Added additional checks for managed object when getting
4896 an IDispatch interface.
4898 Code is contributed under MIT/X11 license.
4900 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
4902 pedump.c (main): Handle mono_get_method () returning NULL.
4904 2008-12-09 Zoltan Varga <vargaz@gmail.com>
4906 * marshal.h: Fix a warning.
4908 2008-12-09 Bill Holmes <billholmes54@gmail.com>
4910 * marshal.c : Adding cominterop_release_all_rcws to release all
4911 runtime callable wrappers held by the runtime.
4913 * marshal.h : Adding declaration for cominterop_release_all_rcws.
4915 Code is contributed under MIT/X11 license.
4917 2008-12-09 Zoltan Varga <vargaz@gmail.com>
4919 * metadata.c (mono_image_alloc_lock): New helper function.
4920 (mono_image_alloc0_lock): Ditto.
4922 * metadata.c: Use the alloc_lock () helper functions for allocating
4923 memory from the image mempool.
4925 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
4927 * class.c (mono_class_from_generic_parameter): Document it's
4928 locking behavior. Fix double checked locking here, we stored in
4929 param->pklass a partially initialized MonoClass and no membar was used.
4931 2008-12-05 Marek Habersack <mhabersack@novell.com>
4933 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
4934 (3) functions are present in the C library use them to do the
4935 job. If they are absent, make sure that the sum of int_part and
4936 dec_part is rounded before returning. This is necessary due to the
4937 division of dec_part by the power of 10 before the final addition
4938 is performed - if the result is not rounded in some cases it will
4939 yield invalid results.
4941 2008-12-04 Zoltan Varga <vargaz@gmail.com>
4943 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
4944 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
4945 instruction instead of a pointer constant.
4947 2008-12-03 Zoltan Varga <vargaz@gmail.com>
4949 * loader.c (mono_method_get_header): Do most of the work outside the
4950 loader lock, to avoid assembly load hook deadlocks.
4952 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
4953 (mono_metadata_parse_type_full): Ditto.
4955 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
4957 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
4958 Make the stack depth fixed. Ensure proper argument passing to the backtrace
4959 funtions. Finally, use a lock to produce well ordered output.
4961 The lock looks silly, as all calls to the corlib mempool should be guarded
4962 with the loader lock, but for some reason this fact doesn't help.
4964 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
4966 2008-12-02 Mark Probst <mark.probst@gmail.com>
4968 * socket-io.c: 64 bit big-endian fixes.
4970 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
4972 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
4973 targets that require strict compatibility between the types.
4975 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
4976 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
4977 Kill the strict argument and create a new one valuetype_must_be_boxed.
4979 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
4980 state that all valuetypes must be boxed.
4984 2008-11-29 Kornél Pál <kornelpal@gmail.com>
4986 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
4987 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
4989 Contributed under MIT/X11 license.
4991 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
4993 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
4994 the inflate_generic_type machinery should handle it.
4996 This avoids a crash when the field's flags is zero and it's type is
4998 What happens is that mono_metadata_parse_type_full will see that opt_attrs
4999 is zero and will return one of the cached built-in primitive types. Since
5000 those types live in read-only memory, the code that copies it crashes.
5002 2008-11-28 Mark Probst <mark.probst@gmail.com>
5004 * object.c: Don't put function descriptors into generalized IMT
5007 2008-11-28 Mark Probst <mark.probst@gmail.com>
5009 * class.c: Enable generic code sharing on PPC64.
5011 2008-11-27 Mark Probst <mark.probst@gmail.com>
5013 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
5016 * generic-sharing.c: Allocate the method template slists from the
5017 image mempool so it doesn't leak.
5019 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
5021 * class.c (generic_array_methods): Release the linked list.
5023 2008-11-27 Mark Probst <mark.probst@gmail.com>
5025 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
5026 invocation to g_utf16_to_utf8().
5028 2008-11-26 Mark Probst <mark.probst@gmail.com>
5030 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
5031 arguments on big endian archs.
5033 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5035 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
5036 the type name (test added in corlib).
5038 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5040 * pedump.c: initialize perf. counters. Fixes a segv.
5042 2008-11-25 Martin Baulig <martin@ximian.com>
5044 * mono-debug-debugger.c
5045 (mono_debugger_runtime_invoke): Return the exception object if an
5046 exception was thrown. Visual Studio displays the exception object
5047 in the locals window.
5049 2008-11-24 Mark Probst <mark.probst@gmail.com>
5051 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
5054 2008-11-24 Mark Probst <mark.probst@gmail.com>
5056 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
5057 MONO_TYPE_U are sizeof (gpointer), too.
5059 2008-11-24 Mark Probst <mark.probst@gmail.com>
5061 * marshal.c (mono_type_native_stack_size): Fixed size and
5062 alignment for reference types.
5064 2008-11-23 Mark Probst <mark.probst@gmail.com>
5066 * class.c (mono_class_generic_sharing_enabled): Disable generic
5067 code sharing for PPC64.
5069 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
5071 * icall.c (mono_method_get_equivalent_method): Make sure
5072 method->klass->methods is inited before looping over it.
5074 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
5076 * object.c: when calling ExecuteAssembly in a newly created domain,
5077 the configuration file and application base are already set up.
5078 Bug #446353 take 2 fixed.
5080 2008-11-20 Zoltan Varga <vargaz@gmail.com>
5082 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
5083 Fixes #444715. Fix a warning.
5085 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
5087 * appdomain.c: write the full path of the assembly to the .ini file
5088 created when "shadow-copying"
5091 2008-11-18 Zoltan Varga <vargaz@gmail.com>
5093 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
5094 if signature==FALSE.
5096 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5098 * marshal.h : Fix the cygwin build.
5099 marshal.c:12442: undefined reference to `_IID_IMarshal'
5101 Code is contributed under MIT/X11 license.
5103 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5105 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
5106 free threaded marshaler when QueryInterface is called on a COM callable
5107 wrapper requesting the IMarshal interface.
5109 Code is contributed under MIT/X11 license.
5111 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5113 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
5115 * reflection.c (mono_type_get_object): Special case the very common
5118 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
5121 2008-11-13 Bill Holmes <billholmes54@gmail.com>
5123 * process.h : Adding method declaration for
5124 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5126 * process.c : Adding implementation for
5127 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5129 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
5130 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5132 Code is contributed under MIT/X11 license.
5134 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
5136 * appdomain.c (unload_thread_main): Clean up threadpool by
5137 calling mono_thread_pool_remove_domain_jobs.
5139 * domain-internals.h (struct _MonoDomain): Add new fields to
5140 help coordinate the cleanup of the threadpool.
5142 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
5143 that cleans up the threadpool of all jobs associated with an appdomain.
5144 It does that by cleaning up the queues and making sure all active
5145 threads are accounted.
5147 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
5148 unloaded or in the process of. Take this is such way that there is
5149 no race condition between another thread starting the unload and the
5150 current thread acknowledging it.
5152 * threadpool.c (async_invoke_thread): Same.
5154 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
5155 firing the new thread.
5157 * threadpool.c (start_tpthread): Same.
5159 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
5161 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
5163 2008-11-06 Jonathan Chambers <joncham@gmail.com>
5165 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
5166 Add support for DuplicateHandle.
5168 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5169 Add support for DuplicateHandle.
5171 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5172 Add support for DuplicateHandle.
5174 Code is contributed under MIT/X11 license.
5176 2008-11-06 Mark Probst <mark.probst@gmail.com>
5178 * class-internals.h: Make min_align into a whole byte.
5180 * class.c: Set min_align for SIMD types to 16.
5182 2008-11-05 Geoff Norton <gnorton@novell.com>
5184 * attach.c: Default the attacher to enabled for all cases including
5187 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5189 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
5192 2008-11-04 Mark Probst <mark.probst@gmail.com>
5194 * monitor.c, monitor.h: New function for querying offsets of
5195 members of MonoThreadsSync.
5197 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5199 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
5200 to speed up this function and to avoid the boundless memory growth caused by
5201 the signature_dup () calls.
5203 2008-11-02 Zoltan Varga <vargaz@gmail.com>
5205 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
5208 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
5211 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
5213 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5216 * domain-internals.h: made mono_set_private_bin_path_from_config()
5218 * object.c: call the above function after setting the configuration
5219 file path for the root domain.
5222 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5224 * assembly.c: when the assembly is loaded from an absolute path, end
5225 basedir with a directory separator.
5228 2008-10-30 Mark Probst <mark.probst@gmail.com>
5230 * monitor.c (mono_monitor_get_fast_enter_method): If
5231 CompareExchange is not available, don't create the fastpath
5232 instead of asserting. (The method is missing in the 1.1 profile.)
5234 2008-10-30 Mark Probst <mark.probst@gmail.com>
5236 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
5238 * monitor.c, monitor.h: Code for generating Monitor.Enter and
5239 Monitor.Exit IL fastpaths.
5241 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5243 * class.c (mono_class_create_from_typedef): Added Vector2ul.
5245 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5247 * class.c (mono_class_create_from_typedef): Added Vector2l.
5249 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5251 * class.c (mono_class_create_from_typedef): Added Vector2d.
5253 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5255 * appdomain.c: translate \ into / for cache_path.
5256 * domain-internals.h: new mono_is_shadow_copy_enabled().
5257 * icall.c: (fill_reflection_assembly_name) do the same path
5258 manipulations that get_code_base does.
5259 (get_code_base) use mono_is_shadow_copy_enabled.
5261 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
5263 * appdomain.c: shadow-copied assemblies go to CachePath +
5264 ApplicationName when both are set. DynamicBase has nothing to do with
5268 2008-10-26 Zoltan Varga <vargaz@gmail.com>
5270 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
5271 STANDALONESIG table.
5273 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
5274 standalone signatures.
5276 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
5277 comparison code: instead of comparing the signatures using a custom
5278 equals function, transform them to a common signature and compare that. This
5279 works better with AOT.
5281 2008-10-25 Zoltan Varga <vargaz@gmail.com>
5283 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
5285 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
5286 call for generic instances.
5287 (mono_class_setup_properties): Call setup_properties () before accessing
5290 * class.c (mono_class_get_virtual_methods): New helper function to iterate
5291 over the virtual methods of a class using metadata if possible, avoiding the
5292 creation of MonoMethod's for non-virtual methods.
5294 * class.c (mono_class_setup_vtable_general): Rewrite this to use
5295 get_virtual_methods () to iterate over the virtual methods of classes.
5297 2008-10-25 Martin Baulig <martin@ximian.com>
5299 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
5301 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5303 * class.c (mono_class_create_from_typedef): Added Vector4i.
5305 2008-10-24 Mark Probst <mark.probst@gmail.com>
5307 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
5308 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
5309 special-casing applies to eliminate the call completely.
5311 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5313 * class.c (mono_class_create_from_typedef): Added Vector8s.
5315 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
5317 * class.c (mono_class_create_from_typedef): Added Vector16sb.
5319 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5321 * icall.c: get rid of annoying warning.
5323 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5325 * threadpool.c: in 1.x, if you change the background status of the
5326 threadpool thread, it's not reset.
5327 Remove unnecessary calls to SetState.
5329 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5331 * threadpool.c: asynchronously create a set of idle threads upon first
5332 use of the threadpool. SetMinThreads will now start the appropriate
5333 number of idle threads if they are not already running. The default is
5334 1 threadpool thread per CPU. Increased the maximum number of threads
5337 2008-10-22 Martin Baulig <martin@ximian.com>
5339 Revert r116521 from Zoltan, it breaks the debugger:
5341 * class.c (mono_class_get_virtual_methods): New helper function to iterate
5342 over the virtual methods of a class using metadata if possible, avoiding the
5343 creation of MonoMethod's for non-virtual methods.
5345 * class.c (mono_class_setup_vtable_general): Rewrite this to use
5346 get_virtual_methods () to iterate over the virtual methods of classes.
5348 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5350 * threads.c: when creating a threadpool thread, set its state to
5352 * threadpool.c: reset the background state of a threadpool thread
5353 after finishing each work item
5356 2008-10-22 Zoltan Varga <vargaz@gmail.com>
5358 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
5360 * class.c (mono_class_setup_vtable_general): Add an optimized version for
5361 generic instances which works by inflating the methods in the container
5364 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
5365 variant which doesn't make a copy if no inflation was done.
5366 (mono_class_setup_fields): Use it.
5368 * metadata.c (mono_metadata_get_shared_type): New helper function to
5369 return a shared instance of a given MonoType.
5371 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
5372 a copy of most non-generic types.
5374 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
5376 * threadpool.c: remove one more GetSystemInfo () call.
5378 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
5380 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
5381 use the code in mono-proclib.h to get processor information.
5383 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5385 * appdomain.c: fixed the logic that determines whether assemblies in a
5386 directory are "shadow-copied" or not. Bug #433483 fixed.
5388 2008-10-22 Zoltan Varga <vargaz@gmail.com>
5390 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
5393 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5395 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
5398 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
5399 reflection.c: Use mono_field_get_name () for accessing a field's name.
5401 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
5404 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
5407 * loader.c (find_method_in_class): Reenable the metadata optimization by
5408 not using it for generic instances.
5410 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
5411 data/def_type fields from MonoClassField into a separate structure.
5412 (struct MonoClassField): Remove data/def_type fields.
5413 (struct _MonoClass): Add a 'field_def_values' array to store the default
5414 values/RVA for fields.
5416 * class.c reflection.c: Update after the changes.
5418 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
5419 for accessing field->data.
5421 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
5423 * loader.c (find_method_in_class): Revert the last change for now as
5424 it breaks Mono.C5 unit tests.
5426 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
5427 'field_generic_types' and 'field_objects' which contain the information
5428 previously stored in MonoInflatedField.
5429 (MonoInflatedField): Delete.
5430 (struct _MonoClassField): Delete 'generic_info' field.
5432 * reflection.c: Store the information which was previously in
5433 field->generic_info in MonoDynamicGenericClass instead.
5435 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
5436 MonoClassField changes.
5438 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
5440 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
5441 store the value inside the data array of the MonoMethodWrapper.
5442 This saves memory, is faster and fixes the lifetime issues (methods
5443 were never removed from the hash previously). May also fix bug#436996.
5445 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5447 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
5448 generic instances, compute the type from the generic definition instead of
5449 looking in field->generic_info.
5451 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
5452 for inflated fields, the only user was get_fieldref_token () which no
5455 * class.c (mono_class_init): Revert the last change as it seems to cause
5458 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
5459 bytes on 64 bit platforms.
5461 * object.c (mono_class_create_runtime_vtable): Fix a warning.
5463 * object.c (mono_class_create_runtime_vtable): Don't initalize
5464 field->data/field->def_type here, it is done lazily by
5465 mono_class_get_field_default_value ().
5467 * icall.c (ves_icall_get_enum_info): Call
5468 mono_class_get_field_default_value () instead of directly accessing
5469 field->data and field->def_type.
5471 * object.c (get_default_field_value): Ditto.
5473 * class.c (mono_field_get_data): Ditto.
5475 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
5476 call for generic instances.
5478 * loader.c (find_method_in_class): If klass != from_class, then inflate
5479 the method with the context of from_class, since the caller assumes this.
5481 2008-10-20 Zoltan Varga <vargaz@gmail.com>
5483 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
5484 for accessing method->slot.
5486 2008-10-20 Cedric Vivier <cedricv@neonux.com>
5488 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
5490 2008-10-19 Zoltan Varga <vargaz@gmail.com>
5492 * class.c (mono_method_get_vtable_index): Use
5493 mono_method_get_vtable_slot () for accessing method->slot.
5495 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
5496 accessing klass->methods.
5498 * class.c (mono_method_get_vtable_slot): New helper function.
5499 (mono_class_get_vtable_entry): Ditto.
5500 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
5501 accessing method->slot.
5503 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
5504 method to get_inflated_method ().
5506 * class.c (mono_class_get_inflated_method): New helper method to obtain
5507 a method of an inflated class without calling setup_methods ().
5508 (mono_class_get_cctor): Use get_inflated_method.
5510 * generic-sharing.c (mono_class_get_method_generic): Ditto.
5512 * marshal.c image.c: Lazily create all the marshal caches.
5514 * image.c (mono_image_init): Move initialization of runtime_invoke
5515 caches to marshal.c.
5517 * marshal.c (get_cache): New helper function to lazily initialize a
5519 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
5521 * debug-helpers.c (mono_method_full_name): Include generic arguments.
5523 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
5525 * loader.c: fixed check for interface type.
5527 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
5529 * appdomain.c: check for NULL setup before it's referenced.
5532 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
5534 * class.c: remove the unused old vtable setup code.
5536 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
5538 * class.c: don't depend on interface order in
5539 setup_interface_offsets (bug #435777).
5540 * reflection.c: sort the InterfaceImpl table (patch from
5541 Jb Evain <jbevain@novell.com>).
5543 2008-10-13 Zoltan Varga <vargaz@gmail.com>
5545 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
5546 the low level assemblies lock.
5548 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
5550 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
5551 object.c, reflection.c, socket-io.c, threads.c: introduced
5552 mono_framework_version () to return the major framewrok version,
5553 changed the code that was using more complex patterns to use it.
5554 Return the correct value for PlatformID for OSX.
5556 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
5558 * icall-def.h, process.h, process.c: added an icall to get info about
5559 processes using mono-proclib.
5561 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
5563 * mono-perfcounters.c: use the mono-proclib functions to
5564 access process information.
5566 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
5568 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
5569 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
5570 reflection.c: remove rawbuffer usage: mmap support is more sanely
5571 provided by utils/mono-mmap.
5573 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
5575 * gc.c: use posix semaphores when possible so that
5576 mono_gc_finalize_notify() is signal safe.
5578 2008-10-11 Zoltan Varga <vargaz@gmail.com>
5580 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
5581 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
5582 be #ifdef-ed out, the linker will remove the rest.
5584 * marshal.c: Implement DISABLE_COM.
5586 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
5588 2008-10-11 Miguel de Icaza <miguel@novell.com>
5590 * locales.c (string_invariant_compare_char): Optimization: do not
5591 call g_unichar_type unless we actually need the information.
5593 2008-10-10 Mark Probst <mark.probst@gmail.com>
5595 * object.c, class-internals.h: Also create remoting trampolines
5596 for generic methods. Pass the domain to the remoting trampoline
5597 creation function, too.
5599 2008-10-10 Zoltan Varga <vargaz@gmail.com>
5601 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
5603 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
5605 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
5608 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
5611 * locales.c: remove the use of g_strdown. Fixes bug #322313.
5613 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
5615 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
5616 for the least possible amount of time (extending the fix in r113458).
5618 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
5620 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
5622 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
5624 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
5625 as possible simd intrinsic types.
5626 Optimized the test to check for the common prefix first.
5628 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
5630 * class.c: back out part of a broken optimization committed on
5631 May 23th (bug #433908).
5633 2008-10-09 Mark Probst <mark.probst@gmail.com>
5635 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
5636 Win32. Should fix #432388 for most cases until we have the new
5639 2008-10-08 Zoltan Varga <vargaz@gmail.com>
5641 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
5642 instead of using inst->id so the hash is stable for AOT.
5644 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
5647 * icall.c: create a .ini file for shadow-copied assemblies that
5648 contains the location of the original assembly. Use this to return the
5649 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
5650 Also fix the number of '/' for windows when returning the CodeBase.
5653 2008-10-07 Bill Holmes <billholmes54@gmail.com>
5655 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
5657 Code is contributed under MIT/X11 license.
5659 2008-10-07 Bill Holmes <billholmes54@gmail.com>
5661 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
5662 if if the class vtable needs initialized.
5664 Code is contributed under MIT/X11 license.
5666 2008-10-07 Bill Holmes <billholmes54@gmail.com>
5668 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
5669 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
5670 STRING->BSTR, and CLASS->INTERFACE.
5672 Code is contributed under MIT/X11 license.
5674 2008-10-07 Marek Habersack <mhabersack@novell.com>
5676 * sysmath.h: changed the declaration of the
5677 ves_icall_System_Math_Round2 icall by adding an extra
5678 away_from_zero parameter.
5680 * sysmath.c (ves_icall_System_Math_Round2): added support for
5681 away from zero rounding. The icall now takes an extra boolean
5682 parameter to signal that away from zero operation is requested.
5684 2008-10-06 Zoltan Varga <vargaz@gmail.com>
5686 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
5687 the delegate klass so it can work with full-aot.
5688 (mono_marshal_get_delegate_end_invoke): Ditto.
5689 (mono_marshal_get_delegate_invoke): Ditto.
5691 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
5693 * gc.c, attach.h, attach.c: remove a bad pattern:
5694 add_finalizer_callback () is not implemented correctly, it can't
5695 without adding more overhead to the finalizer loop and it's not
5696 even needed, since we know exactly what we need to call, so there is
5697 no need to do so through an expensive function pointer.
5699 2008-10-04 Zoltan Varga <vargaz@gmail.com>
5701 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
5703 * attach.c (mono_attach_init): Remove the #ifdef.
5705 2008-10-04 Andreas Färber <andreas.faerber@web.de>
5707 * attach.c (mono_attach_init): Don't use
5708 mono_gc_add_finalizer_thread_callback when compiling without GC.
5711 Code is contributed under MIT/X11 license.
5713 2008-10-03 Zoltan Varga <vargaz@gmail.com>
5715 * class.c (mono_class_create_from_typedef): Remove the
5716 #ifndef DISABLE_SIMD stuff.
5718 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
5720 * class-internals.h (MonoClass): Added simd_type bit field.
5722 * class.c (mono_class_create_from_typedef): Check if type is a simd
5725 2008-10-03 Mark Probst <mark.probst@gmail.com>
5727 * object.c (mono_method_add_generic_virtual_invocation): Only add
5728 instantiations to the thunk whose count is at least as large as
5731 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
5733 * icall.c: changed the Type of the exception thrown when trying to
5734 invoke a constructor on an abstract class. Part of the fix for bug
5737 2008-10-02 Mark Probst <mark.probst@gmail.com>
5739 * class.c, class-internals.h (mono_method_get_vtable_index): New
5740 function which returns the index into the vtable and properly
5741 handles inflated virtual generic methods.
5743 2008-10-01 Mark Probst <mark.probst@gmail.com>
5745 * object.c, domain.c, object-internals.h, domain-internals.h:
5746 Generalize IMT thunk machinery to also handle thunks for virtual
5747 generic method invokes. When a virtual generic method is invoked
5748 more than a number of times we insert it into the thunk so that it
5749 can be called without lookup in unmanaged code.
5751 * generic-sharing.c, class-internals.h: Fetching a
5752 MonoGenericInst* for a method from an (M)RGCTX.
5754 2008-10-01 Zoltan Varga <vargaz@gmail.com>
5756 * marshal.c (emit_marshal_string): Applied a variant of a patch by
5757 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
5758 marshalling. Fixes #431304.
5760 2008-10-01 Bill Holmes <billholmes54@gmail.com>
5762 * marshal.c (emit_marshal_variant) : Change the attribute checks to
5763 handle when ref is specified without In or Out.
5765 Code is contributed under MIT/X11 license.
5767 2008-09-30 Mark Probst <mark.probst@gmail.com>
5769 * loader.c (mono_get_method_constrained): Don't expand method with
5770 the class's context, because it's already a method of that class.
5772 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
5774 * attach.c : should be correct build fix.
5776 2008-09-29 Zoltan Varga <vargaz@gmail.com>
5778 * attach.c: Fix the previous change.
5780 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
5782 * attach.c : quick w32 build fix.
5784 2008-09-27 Miguel de Icaza <miguel@novell.com>
5786 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
5787 crashes MonoDevelop: #430455.
5789 2008-09-27 Zoltan Varga <vargaz@gmail.com>
5791 * domain-internals.h (struct _MonoDomain): Move most fields used only by
5792 the JIT do MonoJitDomainInfo in ../mini/mini.h.
5794 * domain.c: Remove initialization/cleanup of the removed fields.
5796 2008-09-27 Mark Probst <mark.probst@gmail.com>
5798 * class.c (mono_class_generic_sharing_enabled): Enable generic
5799 code sharing for PPC.
5801 2008-09-26 Bill Holmes <billholmes54@gmail.com>
5803 * attach.c : Fixing the Windows builds.
5805 Code is contributed under MIT/X11 license.
5807 2008-09-25 Zoltan Varga <vargaz@gmail.com>
5809 * class.c (mono_class_generic_sharing_enabled): Experimentally change
5810 the default generic sharing mode to 'all'.
5812 2008-09-25 Mark Probst <mark.probst@gmail.com>
5814 * generic-sharing.c, class-internals.h: New function for checking
5815 whether a method needs a static RGCTX invoke wrapper. A few
5816 funtions moved from mini/generic-sharing.c.
5818 * icall.c: New function used.
5820 2008-09-25 Mark Probst <mark.probst@gmail.com>
5822 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
5823 Static RGCTX invoke wrapping applies to value type methods, too.
5825 * class.c (mono_class_setup_vtable_general): In generic-shared
5826 value types, wrap methods with a static RGCTX invoke wrapper.
5828 2008-09-25 Zoltan Varga <vargaz@gmail.com>
5830 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
5833 2008-09-24 Zoltan Varga <vargaz@gmail.com>
5835 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
5836 register a callback which is called when the finalizer thread is woken
5838 (finalizer_thread): Call the callback if it exists.
5840 * attach.h attach.c: New files, implementing the attach mechanism.
5842 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
5844 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
5845 by the previous change.
5847 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5849 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
5850 loader.c, marshal.c, metadata-internals.h, metadata.c,
5851 method-builder.c, object.c, reflection.c: introduced specific functions
5852 to allocate from the domain and image mempools and cleaned up most of
5853 the code to use them (still missing a few in reflection.c).
5854 Keep the loader bytes counter updated.
5856 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
5858 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
5859 loader-related counters.
5861 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
5863 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
5864 added more MS-compatible counters.
5866 2008-09-22 Zoltan Varga <vargaz@gmail.com>
5868 * class.c (mono_class_setup_fields): Call setup_fields before accessing
5869 class->blittable. Fixes #428217.
5871 2008-09-21 Zoltan Varga <vargaz@gmail.com>
5873 * reflection.c (mono_image_get_field_on_inst_token): Call
5874 field_encode_signature () since that handles custom modifiers too.
5877 2008-09-20 Zoltan Varga <vargaz@gmail.com>
5879 * reflection.c (add_custom_modifiers): New helper function to merge custom
5880 modifiers stored in objects to a MonoType.
5881 (fieldref_encode_signature): Encode custom modifiers.
5882 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
5883 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
5885 2008-09-19 Kornél Pál <kornelpal@gmail.com>
5887 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
5888 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
5889 64-bit IL only images because imports are not resolved for IL only images.
5890 Special thanks to Bill Holmes for finding this bug and testing the patch.
5891 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
5893 Contributed under MIT/X11 license.
5895 2008-09-19 Miguel de Icaza <miguel@novell.com>
5897 * mono-config.c (dllmap_start): Add support for the bits keyword
5898 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
5900 2008-09-19 Mark Probst <mark.probst@gmail.com>
5902 * reflection.c (inflate_mono_method): When the class the method is
5903 to be inflated for is itself not inflated, just return the method.
5905 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
5907 * mono-perfcounters.c: use more user friendly process instance names.
5909 2008-09-18 Bill Holmes <billholmes54@gmail.com>
5911 * marshal.c (emit_marshal_variant) : Change the attribute checks to
5912 handle "[in] ref" and "[in][out] ref" cases.
5914 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
5915 to mono_mb_create_method. This was causing problems calling native to
5916 managed passing Variants by value.
5918 Code is contributed under MIT/X11 license.
5920 2008-09-18 Zoltan Varga <vargaz@gmail.com>
5922 * class.c (can_access_internals): Call mono_assembly_load_friends ()
5923 before accessing the friend_assembly_names field.
5925 * assembly.c (mono_assembly_load_friends): Make this callable multiple
5927 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
5928 called lazily when it is needed.
5930 * metadata-internals.h (struct _MonoAssembly): Add
5931 'friend_assembly_names_inited' flag.
5933 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
5935 * mono-perfcounters-def.h: fix the types of a few counters.
5936 * mono-perfcounters.c: implemented the instance names getter
5939 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
5941 * culture-info-table.h : regenerated.
5943 2008-09-17 Robert Jordan <robertj@gmx.net>
5945 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
5946 context bound objects. Fixes #415577.
5948 Code is contributed under MIT/X11 license.
5950 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
5952 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
5953 implementation (bug #423582).
5955 2008-09-16 Zoltan Varga <vargaz@gmail.com>
5957 * object.c (mono_object_get_virtual_method): Handle the case method->slot
5958 is not set. Fixes #426309.
5960 2008-09-16 Jb Evain <jbevain@novell.com>
5962 * class.c (mono_class_from_name): fix the exported type look up
5963 when the type is defined in a referenced assembly.
5965 2008-09-16 Jb Evain <jbevain@novell.com>
5967 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
5968 increment the next index counter on each iteration to make that work
5969 for more than one type forwarder. Unmanaged part to fix #422929.
5971 2008-09-15 Mark Probst <mark.probst@gmail.com>
5973 * object-internals.h: enum ComInterfaceType in
5974 MonoInterfaceTypeAttribute is guint32, not guint16.
5976 2008-09-12 Mark Probst <mark.probst@gmail.com>
5978 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
5981 2008-09-11 Mark Probst <mark.probst@gmail.com>
5983 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
5986 2008-09-11 Mark Probst <mark.probst@gmail.com>
5988 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
5989 Endianness fixes for MonoSymbolFileOffsetTable.
5991 2008-09-10 Bill Holmes <billholmes54@gmail.com>
5993 * process.c (complete_path) : Removing quotes from the
5994 input path. The glib file routines do not handle file paths
5995 that have quotes around them.
5997 Code is contributed under MIT/X11 license.
5999 2008-09-10 Bill Holmes <billholmes54@gmail.com>
6001 * socket-io.h : Adding a comment to provide locations where
6002 changes to MonoSocketAsyncResult need to be synced.
6004 Code is contributed under MIT/X11 license.
6006 2008-09-10 Zoltan Varga <vargaz@gmail.com>
6008 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
6009 parameters as well. Fixes #425001.
6011 2008-09-08 Miguel de Icaza <miguel@novell.com>
6013 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
6016 2008-09-07 Miguel de Icaza <miguel@novell.com>
6018 * console-io.c: Add support for tracking the window size if it
6021 The setup is very simple: the TtySetup function will now return a
6022 pointer to a location in memory that tracks the current console
6023 size. The managed code checks its current value every time its
6024 queried against the last value set, and updates accordingly.
6026 With this setup we can work with multiple consoles, and we do not
6027 require to poke into managed code from a signal handler.
6029 Additionally, the environment for COLUMNS and LINES is now handled
6032 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
6034 2008-09-07 Mark Probst <mark.probst@gmail.com>
6036 * marshal.c (mono_type_native_stack_size): Treat
6037 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
6039 2008-09-04 Jb Evain <jbevain@novell.com>
6041 * class.c (mono_class_is_assignable_from): fix assignability of nullables
6044 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
6046 * verify.c (verify_type_compatibility_full): Revert change
6047 to allow converting a native int to unmanaged pointer be verifiable
6048 under non-strict mode.
6049 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
6051 * verify.c: Added some TODOs.
6053 2008-09-02 Bill Holmes <billholmes54@gmail.com>
6055 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
6056 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
6057 Changed to use GlobalAlloc for the memory returned on Windows platforms.
6059 Code is contributed under MIT/X11 license.
6061 2008-09-02 Jb Evain <jbevain@novell.com>
6063 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
6065 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
6067 reflection.c (typebuilder_setup_fields): Handle classes with
6070 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
6072 class.c (mono_class_setup_events): Add memory barrier due to
6073 double checked locking.
6075 class.c (mono_class_setup_properties): Same.
6077 2008-08-31 Zoltan Varga <vargaz@gmail.com>
6079 * class.c (mono_class_is_assignable_from): Fix the build.
6081 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
6082 before accessing klass->interface_bitmap. Fixes #421744.
6084 2008-08-28 Zoltan Varga <vargaz@gmail.com>
6086 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
6087 the runtime into no-exec mode, useful when running the AOT compiler.
6089 * appdomain.c gc.c object.c: Avoid executing managed code when running
6092 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
6094 * reflection.c (_mono_reflection_get_type_from_info): Handle the
6095 special case when the mono_assembly_loaded () returns NULL because the
6096 search hook is not installed.
6098 2008-08-25 Zoltan Varga <vargaz@gmail.com>
6100 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
6101 crashes in bstr marshalling on linux.
6103 2008-08-24 Zoltan Varga <vargaz@gmail.com>
6105 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
6106 with more than one parameter.
6108 2008-08-24 Miguel de Icaza <miguel@novell.com>
6110 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
6111 start/stop flow control as well when turning off ICANON (allows
6112 C-s and C-q to be read by Console.ReadKey).
6114 2008-08-24 Zoltan Varga <vargaz@gmail.com>
6116 * class.c (mono_class_init): Move the initialization of nested classes
6117 into mono_class_get_nested_types (). Fixes #418433.
6119 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
6122 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
6123 iterating tough the nested classes of a class.
6125 2008-08-23 Zoltan Varga <vargaz@gmail.com>
6127 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
6130 2008-08-22 Miguel de Icaza <miguel@novell.com>
6132 * console-io.c (sigcont_handler): Support signal chaining for
6135 (console_set_signal_handlers): Use best practices with sigaction,
6136 clear the structure before using it.
6138 2008-08-22 Robert Jordan <robertj@gmx.net>
6140 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
6141 Fix the Windows build.
6143 2008-08-22 Zoltan Varga <vargaz@gmail.com>
6145 * class.c (mono_class_generic_sharing_enabled): Make the default
6146 sharing mode 'corlib'.
6148 2008-08-21 Zoltan Varga <vargaz@gmail.com>
6150 * console-io.c (console_set_signal_handlers): Fix a warning.
6152 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
6153 method normally, the JIT will take care of avoiding recursion.
6155 2008-08-20 Bill Holmes <billholmes54@gmail.com>
6157 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
6159 Code is contributed under MIT/X11 license.
6161 2008-08-20 Miguel de Icaza <miguel@novell.com>
6163 * console-io.c (sigcont_handler): We need to restore the entire
6164 termios state, not only the original settings, as things like echo
6165 can be controlled after this (Booish exposes this issue with its
6166 own ReadLine implementation).
6168 Additionally, we need to set the terminal back into keypad_xmit
6171 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
6172 string as a paramter as well. Otherwise we get different
6175 2008-08-20 Zoltan Varga <vargaz@gmail.com>
6177 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
6178 delegates with byref out parameter passing. Fixes #351520.
6180 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
6182 (mono_type_get_desc): Add the type arguments for GENERICINST.
6183 (mono_method_full_name): Stringify the class name using mono_type_full_name
6184 so it picks up generic arguments.
6186 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
6188 * console-io.c: Removed debug output.
6190 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
6192 reflection.c (mono_reflection_create_runtime_class): Alloc
6193 the nested classes linked list using the dynamic image mempool.
6194 Fixes leak in corlib compilation.
6196 2008-08-19 Miguel de Icaza <miguel@novell.com>
6198 * console-io.c: Fix incredibly annoying behavior on the console
6199 after resuming execution after control-z. This affected every
6200 console application.
6202 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
6204 * mempool-internals.h: Header for mono private mempool functions. The first
6205 two function are for allocating glib linked lists using pools.
6207 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
6209 * Makefile.am: Added mempool-internals.h.
6211 2008-08-16 Zoltan Varga <vargaz@gmail.com>
6213 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
6214 (mono_domain_free): Ditto.
6216 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
6217 be used by the JIT to store its domain-specific information, instead of putting
6218 it directly into MonoDomain.
6220 * domain.c (mono_install_create_domain_hook): New helper function to install
6221 a hook which initializes domain->runtime_info.
6223 * domain.c (mono_install_free_domain_hook): Ditto.
6225 2008-08-15 Zoltan Varga <vargaz@gmail.com>
6227 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
6228 asserting if the ares parameter is null.
6230 * mono-perfcounters.c: Fix warnings.
6232 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
6233 is not needed, don't check for interruptions either.
6234 (mono_marshal_get_delegate_end_invoke): Ditto.
6236 2008-08-15 Marek Habersack <mhabersack@novell.com>
6238 * mono-perfcounters.c (predef_readonly_counter): added support for
6239 reading the ASP.NET Requests Queued counter from another process.
6241 2008-08-12 Zoltan Varga <vargaz@gmail.com>
6243 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
6244 MonoImage to simplify the AOT code.
6246 2008-08-10 Zoltan Varga <vargaz@gmail.com>
6248 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
6249 marshalling. Fixes #416078.
6251 2008-08-08 Zoltan Varga <vargaz@gmail.com>
6253 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
6254 it is set, looking up the icall address is deferred to the JIT, since
6255 in embedded scenarios, the icall might not be registered in the runtime
6256 doing the AOT compilation. Backported from the 2.0 branch.
6258 2008-08-08 Zoltan Varga <vargaz@gmail.com>
6260 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
6263 2008-08-05 Marek Habersack <mhabersack@novell.com>
6265 * Makefile.am: added support for cross-compilation.
6267 2008-08-04 Zoltan Varga <vargaz@gmail.com>
6269 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
6271 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
6273 * mono-perfcounters.c: jitted methods and jitted bytes counters.
6275 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
6277 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
6278 mono-perfcounters.c: performance counters implementation.
6280 2008-07-31 Zoltan Varga <vargaz@gmail.com>
6282 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
6283 to gpointer, letting the AOT code decide what to store in it.
6285 2008-07-31 Bill Holmes <billholmes54@gmail.com>
6287 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
6288 mono_class_setup_methods if the methods are not initialized.
6290 Code is contributed under MIT/X11 license.
6292 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
6294 * verify.c: Remove some debug code I commited by accident.
6296 * verify.c (mono_method_is_valid_in_context): Change the return value
6297 to make possible to distinguish between invalid and unverifiable.
6299 * verify.c (verifier_load_method): Don't return NULL for unverifiable
6302 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
6304 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
6305 constraints. Fixes regression in gtest-253.
6307 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
6309 * verify.c (mono_verifier_verify_class): Don't allow generic types
6310 with explicit layout.
6312 * verify.c (mono_method_verify): Check locals and argument types.
6314 2008-07-29 Zoltan Varga <vargaz@gmail.com>
6316 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
6317 wait if the thread is in StopRequested state.
6319 * class.c (mono_class_from_name): Refactor the module searching code into
6320 a separate function so it can be reused in the AOT case too.
6322 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
6324 * verify.c (mono_type_is_valid_in_context): Improve the error message.
6325 Check both the type and it's generic type definition for loader errors.
6327 * verify.c (mono_method_is_valid_in_context): Don't generate another
6328 error when a type errors occur, this leads to the wrong exception been
6331 2008-07-28 Dick Porter <dick@ximian.com>
6335 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
6336 New internal calls to duplicate and close a process handle.
6338 2008-07-27 Andreas Färber <andreas.faerber@web.de>
6340 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
6342 2008-07-27 Zoltan Varga <vargaz@gmail.com>
6344 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
6346 2008-07-27 Robert Jordan <robertj@gmx.net>
6348 * class.c (mono_class_init): Don't compute class.has_finalize for
6349 valuetypes. Fixes #412477.
6351 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
6353 * verify.c: Implement constraint equivalence checking.
6354 This is required when a generic parameter is used as
6355 argument to a constrained one.
6359 2008-07-24 Zoltan Varga <vargaz@gmail.com>
6361 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6363 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
6365 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
6366 synch with managed object layout.
6368 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
6370 * verify.c (do_branch_op): Handle valuetypes and generic
6373 * verify.c (do_cmp_op): Same.
6377 2008-07-24 Mark Probst <mark.probst@gmail.com>
6379 * generic-sharing.c: Fix memory leaks.
6381 * class.c, class-internals.h: Make
6382 mono_class_inflate_generic_type_with_mempool() non-static.
6384 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
6386 * pedump.c (dump_verify_info): Dump full class name.
6388 2008-07-24 Mark Probst <mark.probst@gmail.com>
6390 * generic-sharing.c: Removed some old code that didn't do anything.
6392 2008-07-24 Massimiliano Mantione <massi@ximian.com>
6393 * profiler.c: Added runtime_initialized_event,
6394 mono_profiler_install_runtime_initialized and
6395 mono_profiler_runtime_initialized. This new hook tells the profiler
6396 when the runtime is sufficiently initialized to be able to call
6397 mono_thread_attach on the root appdomain.
6398 * profiler.h, profiler-private.h: Likewise.
6400 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
6402 * verify.c (do_cast): Do boxing for generic arguments as well.
6404 * class.c (is_nesting_type): Drop generic instantiations before
6405 checking for nesting.
6407 * class.c (can_access_instantiation): Allow access to generic
6410 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
6412 * verify.c (verify_class_for_overlapping_reference_fields):
6413 On some cases, the field size might be zero, guard against that.
6414 Fix the explicit layout check to work as expected.
6416 2008-07-23 Zoltan Varga <vargaz@gmail.com>
6418 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
6419 mono_thread_resume () during shutdown, since the thread we want to abort
6422 2008-07-22 Zoltan Varga <vargaz@gmail.com>
6424 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
6427 * debug-mono-symfile.c: Fix a warning.
6429 * mono-perfcounters.c (get_cpu_times): Fix a warning.
6431 * object.c (mono_class_vtable): Check if exception_type is set, and return
6432 NULL as defined by the function comments.
6434 2008-07-22 Mark Probst <mark.probst@gmail.com>
6436 * mempool.c: Use malloc for every single mempool allocation if the
6437 configure option is set. This makes it easier to track mempool
6438 allocations with tools like Valgrind.
6440 2008-07-22 Jb Evain <jbevain@novell.com>
6442 * reflection.c (create_dynamic_mono_image): emit the same
6443 metadata version that SL2 does when creating a SL2 image.
6445 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
6448 * icall.c: New icall System.Enum:get_hashcode. This function
6449 avoids the overhead of boxing the enum to the underlying type.
6451 2008-07-21 Mark Probst <mark.probst@gmail.com>
6453 * reflection.c (mono_method_get_object): Don't let static RGCTX
6454 invoke wrappers get into MonoReflectionMethods.
6456 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
6458 * object-internals.h:
6459 * object.c: New mono_runtime_class_init_full function
6460 that makes throwing the exception optinal.
6462 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
6463 for the case where the exception object is supplied.
6465 2008-07-16 Kornél Pál <kornelpal@gmail.com>
6467 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
6470 Contributed under MIT/X11 license.
6472 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
6474 * string-icalls.c (ves_icall_System_String_InternalSplit):
6475 Optimize array allocation by caching the MonoClass of the
6478 * icall.c (ves_icall_Type_GetMethodsByName): Same.
6480 * reflection.c (mono_param_get_objects): Same.
6482 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
6485 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
6486 It inflates the given type using the class context.
6488 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
6490 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
6491 the vtable if it already exists.
6493 * object-internals.h: Add mono_class_try_get_vtable as part of the
6496 * reflection.c (mono_type_get_object): Use the MonoObject from the
6497 vtable when possible. Reduces locking contention on reflection heavy
6500 2008-07-15 Zoltan Varga <vargaz@gmail.com>
6502 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
6503 g_bit_nth_msf () since that macro is not implemented in eglib.
6505 2008-07-13 Zoltan Varga <vargaz@gmail.com>
6507 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
6508 on platforms which do not support it.
6510 2008-07-12 Zoltan Varga <vargaz@gmail.com>
6512 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
6514 2008-07-11 Martin Baulig <martin@ximian.com>
6516 * mono-debug-debugger.h
6517 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
6519 * mono-debug-debugger.c
6520 (_mono_debugger_interruption_request): New global volatile variable.
6521 (mono_debugger_check_interruption): New public function.
6524 (mono_thread_current_check_pending_interrupt): Call
6525 mono_debugger_check_interruption().
6526 (mono_thread_interruption_checkpoint_request): Likewise.
6528 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6530 * verify.c: Add more type checks for loaded types. Verify the result
6531 handle from ldtoken.
6533 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6535 * loader.c (field_from_memberref): Don't crash if the field
6538 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6540 * verify.c: Verify if type and method instantiations
6541 don't have invalid VAR or MVAR arguments.
6543 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6545 * verify.c: Fix double free of function pointer list.
6547 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6549 * object.c (mono_string_to_utf8): Comment the new code as it
6552 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
6554 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
6556 2008-07-07 Bill Holmes <billholmes54@gmail.com>
6558 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
6559 is not throw too many times.
6561 Code is contributed under MIT/X11 license.
6563 2008-07-07 Zoltan Varga <vargaz@gmail.com>
6565 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
6566 debugging is turned off.
6568 2008-07-06 Zoltan Varga <vargaz@gmail.com>
6570 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
6572 2008-07-04 Mark Probst <mark.probst@gmail.com>
6574 * class-internals.h, class.c: Added new generic sharing option:
6575 Share only stuff in System.Collections.Generic, which is now the
6578 2008-07-04 Mark Probst <mark.probst@gmail.com>
6580 * generic-sharing.c, class-internals.h: New function for getting a
6581 generic method in a generic class given the corresponding method
6582 for a different instantiation of the class. Partly refactored
6583 from mini-trampolines.c.
6585 * class.c: Make sure generic methods have a class_inst if they are
6586 part of a generic class.
6588 * metadata.c (mono_type_stack_size_internal): Handle type
6591 2008-07-04 Mark Probst <mark.probst@gmail.com>
6593 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
6594 Signifies whether information on the this/vtable/mrgctx variable
6597 2008-07-04 Mark Probst <mark.probst@gmail.com>
6599 * object.c, object-internals.h, icall.c: New function
6600 mono_delegate_ctor_with_method(), which does the same as
6601 mono_delegate_ctor(), but takes an explicit method argument
6602 instead of taking the method from the jit info.
6604 * marshal.c: When creating a delegate with an inflated method take
6605 the "this" argument as the target class for the castclass.
6607 2008-07-03 Mark Probst <mark.probst@gmail.com>
6609 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
6610 mono_jit_info_table_find() to perform very badly in some cases.
6612 2008-07-02 Zoltan Varga <vargaz@gmail.com>
6614 * icall.c (type_from_typename): Handle 'string'.
6616 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
6617 wrappers into the wrapper_hash, since the key is not a MonoMethod.
6619 2008-07-01 Zoltan Varga <vargaz@gmail.com>
6621 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
6623 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
6624 number of available managed allocator types.
6626 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
6627 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
6629 2008-06-30 Zoltan Varga <vargaz@gmail.com>
6631 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
6632 which is a low level lock protecting just the 'jit_code_hash' hash table.
6634 * domain.c: Initialize+cleanup jit_code_hash_lock.
6636 2008-06-30 Kornél Pál <kornelpal@gmail.com>
6638 * coree.c (mono_load_coree): Set coree_module_handle global variable only
6639 after initialization.
6641 * coree.h: Make MonoFixupExe internal.
6643 Contributed under MIT/X11 license.
6645 2008-06-30 Kornél Pál <kornelpal@gmail.com>
6647 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
6648 because that is platform independent. Check NumberOfRvaAndSizes in PE32
6650 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
6651 image being loaded is a CLI image and _CorValidateImage gets called.
6653 * coree.h: Add MonoLoadImage.
6655 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
6656 instead of LoadLibrary.
6658 Contributed under MIT/X11 license.
6660 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
6662 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
6663 for any primitive type.
6665 2008-06-29 Zoltan Varga <vargaz@gmail.com>
6667 * object.c (mono_array_new_specific): Optimize this and the other allocation
6670 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
6671 domains too if mono_dont_free_domains is set.
6673 * domain-internals.h (mono_dont_free_domains): New internal option controlling
6674 whenever to free appdomain data after it has been unloaded.
6676 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
6678 2008-06-28 Zoltan Varga <vargaz@gmail.com>
6680 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
6681 (mono_method_get_equivalent_method): Fix a warning.
6683 * object.c (mono_message_init): Avoid looking up array types for each call.
6685 2008-06-27 Zoltan Varga <vargaz@gmail.com>
6687 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
6690 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
6693 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
6696 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
6699 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
6701 * object.c (mono_value_box): Fix boxing of nullables.
6703 2008-06-26 Kornél Pál <kornelpal@gmail.com>
6705 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
6706 mono_module_handle that is defined by the linker; no initialization required.
6707 * coree.h: Remove mono_module_handle, add __ImageBase, update
6708 mono_image_open_from_module_handle.
6709 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
6710 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
6711 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
6712 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
6713 to 4 GB away from image base address. IA64 version is not tested but was very
6714 easy to implement and should work if we ever need it.
6715 * domain.c (mono_init_internal): Avoid system error message boxes.
6716 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
6717 with has_entry_point. Handle do_mono_image_load fauilre correctly.
6718 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
6719 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
6720 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
6722 Contributed under MIT/X11 license.
6724 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
6726 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
6727 as part of the private mono API.
6729 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
6730 Do proper argument checking for methods that belong to generic classes.
6731 Do proper type resolution for GMFH/2.
6734 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
6736 * verify.c (do_switch): Fix a memory corruption bug with
6737 the jump index is out of bound.
6739 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
6741 * verify.c: Disable debug code.
6743 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
6745 * reflection.c (mono_image_get_methodbuilder_token): Use
6746 mono_image_get_methodspec_token_for_generic_method_definition
6747 instead of mono_image_get_memberref_token. We cache more memberef
6750 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
6752 * verify.c: Inflate exception clause types.
6755 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
6757 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
6760 * reflection.c (mono_image_get_ctorbuilder_token): Same.
6762 * reflection.c (mono_image_create_method_token): Same.
6764 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
6766 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
6767 It does the same as mono_image_get_methodref_token but works on
6770 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
6771 and always generate a methodspec. This follows the old behavior and fixes
6772 the regressions in System.Core.
6774 2008-06-24 Zoltan Varga <vargaz@gmail.com>
6776 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
6777 don't event mono_class_get () succeeds. Fixes #402182.
6779 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
6781 * metadata-internals.h: Added MonoDynamicImage::methodspec
6782 hashtable to store methodspec tokens created for MethodBuilders.
6784 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
6785 MethodBuilders as open instantiations if a methodspec was requested.
6787 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
6789 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
6791 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
6795 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
6797 * loader.c (method_from_methodspec): Avoid crashing if the
6798 method lookup fails.
6800 2008-06-20 Dick Porter <dick@ximian.com>
6802 * socket-io.c (get_socket_assembly): Cope with Moonlight network
6803 classes being in a different assembly. Fixes bug 399184.
6805 2008-06-20 Zoltan Varga <vargaz@gmail.com>
6807 * loader.c (mono_loader_init): Make this callable multiple times.
6808 (mono_dllmap_insert): Call mono_loader_init () so this works even before
6809 the runtime is initialized. Fixes #401755.
6811 2008-06-19 Dick Porter <dick@ximian.com>
6813 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
6816 2008-06-19 Dick Porter <dick@ximian.com>
6819 * icall-def.h: Implement Socket generic Send() and Receive()
6820 methods. Fixes bug 395168.
6822 2008-06-19 Kornél Pál <kornelpal@gmail.com>
6824 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
6826 Contributed under MIT/X11 license.
6828 2008-06-18 Martin Baulig <martin@ximian.com>
6830 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
6831 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
6832 set to 80.0. The debugger <-> runtime interface is now frozen as
6836 (mono_debug_debugger_version): Bump to 4.
6838 2008-06-18 Martin Baulig <martin@ximian.com>
6840 * debug-mono-symfile.c
6841 (load_symfile): Don't check the minor version.
6843 * debug-mono-symfile.h: Bump the version number to 50.0.
6845 2008-06-18 Martin Baulig <martin@ximian.com>
6847 * debug-mono-symfile.c
6848 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
6849 minimum required version.
6851 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
6853 * reflection.c (mono_custom_attrs_from_property): Fix support for
6854 retriveving cattrs of dynamic inflated generic types.
6856 * reflection.c (mono_custom_attrs_from_event): Same.
6858 * reflection.c (mono_custom_attrs_from_field): Same;
6860 * reflection.c (typebuilder_setup_events): Same cattrs of events.
6862 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
6863 Moved to metadata.c.
6865 * metadata.c: New functions to retrive the equivalent field, event
6866 of property from the generic type definition.
6868 * metadata-internals.h: Added new functions from metadata.c.
6870 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
6872 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
6873 to cached in a mempool is used.
6875 * metadata.c (free_generic_class): In some situations field generic_info type
6876 is not properly dup'ed and leads to double free'ing.
6880 2008-06-17 Mark Probst <mark.probst@gmail.com>
6882 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
6883 this arguments (will be needed later for generic methods).
6886 2008-06-17 Mark Probst <mark.probst@gmail.com>
6888 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
6889 Create a static RGCTX invoke wrapper for methods which require it.
6891 2008-06-17 Mark Probst <mark.probst@gmail.com>
6893 * object.c, class-internals.h: New function for checking whether
6894 an individual field is special static.
6896 2008-06-15 Zoltan Varga <vargaz@gmail.com>
6898 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
6899 linear search since the table is sorted.
6901 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
6904 2008-06-14 Zoltan Varga <vargaz@gmail.com>
6906 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
6907 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
6909 * gc.c (mono_domain_finalize): Allow an infinite timeout.
6911 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
6913 * threads.c (mono_thread_request_interruption): Get rid of locking, use
6914 InterlockedCompareExchange to query and modify
6915 thread->interruption_requested.
6917 * object-internals.h (struct _MonoThread): Change interruption_requested
6918 to a gint32 so it can be modified by atomic operations. Add
6919 'critical_region_level' from the managed side, change small_id to a guint32,
6920 add new set of 'unused' fields.
6922 * appdomain.c: Bump corlib version.
6924 2008-06-13 Zoltan Varga <vargaz@gmail.com>
6926 * class.c (mono_class_from_name): Search modules as well. Fixes
6929 2008-06-13 Mark Probst <mark.probst@gmail.com>
6931 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
6932 templates. Templates are generalized with an additional type_argc
6933 argument. RGCTX templates have type_argc==0, MRGCTX templates
6936 * domain-internals.h, domain.c: New hash table for looking up
6939 * metadata.c, metadata-internals.h: Rename hash and equal
6940 functions for MonoGenericInst's and make them public.
6942 * class-internals.h: New data structures for the MRGCTX. Macros
6943 for distinguishing slots in the RGCTX and the MRGCTX.
6945 2008-06-13 Mark Probst <mark.probst@gmail.com>
6947 * object.c (mono_method_get_imt_slot): Put the same methods of
6948 different instantiations of the same generic interface in the same
6949 IMT slots, to make generic sharing simpler.
6951 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
6953 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
6955 * metadata.c (mono_metadata_field_info_with_mempool): Added.
6956 This function works just like mono_metadata_field_info, but
6957 accept a mempool as argument to be used allocating memory.
6959 * marshal.c (mono_marshal_load_type_info): Use new function
6960 to load marshal data into image mempool.
6962 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
6964 * class.c (mono_class_inflate_generic_type_with_mempool):
6965 This function allows to inflate a generic type using
6968 * class.c (inflate_generic_type): Take a mempool as argument
6969 and use it to do type dup'ing.
6971 * class.c (mono_class_setup_fields): Field type for generic
6972 generic classes are allocated from the image mempool.
6974 * metadata.c (free_generic_class): Inflated field type is
6975 now allocated in the image mempool.
6977 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
6979 * threads.c (thread_cleanup): Free MonoThread::name.
6981 2008-06-12 Marek Habersack <mhabersack@novell.com>
6983 * appdomain.c (ensure_directory_exists): avoid unnecessary
6984 mkdir(2) calls when the shadow directory already exists.
6985 (mono_make_shadow_copy): copy also satellite assemblies from the
6986 private bin directories.
6988 2008-06-11 Zoltan Varga <vargaz@gmail.com>
6990 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
6992 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
6993 a page boundary. Fixes #396219.
6995 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
6997 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
6998 due to double-checked locking.
7000 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7002 * assembly.c (build_assembly_name): Release memory on failure.
7004 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
7006 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7008 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
7011 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7013 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
7016 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7018 * loader.c (field_from_memberref): Check if field signature type is equal
7019 to the non-inflated type of the field. Fixes #398980.
7021 2008-06-11 Zoltan Varga <vargaz@gmail.com>
7023 * assembly.c (mono_assembly_load_from_full): Call
7024 mono_assembly_load_friends () outside the assemblies lock, since it can
7025 acquire the loader lock. Fixes #323696.
7027 * reflection.c (resolve_object): Inflate the inst with the context for
7028 FieldOnTypeBuilderInst. Fixes #399010.
7030 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7032 * reflection.c (mono_image_get_field_on_inst_token): Don't
7033 inflate the field to encode it's signature. If it's a
7034 VAR or MVAR it should stay that way in the signature.
7037 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7039 * reflection.c (resolve_object): Release memory of inflated types.
7041 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7043 * loader.c (mono_method_get_signature_full): Remove assert about
7044 loading a methodspec to a generic method. We have such methods, such as
7045 System.Threading.Interlocked::CompareExchange<T>.
7046 This assert was removed since it crashes the verifier when it checks
7047 methods calling CompareExchange<T>.
7049 2008-06-10 Marek Safar <marek.safar@gmail.com>
7051 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
7052 of Type array and not MonoType.
7054 2008-06-10 Marek Habersack <mhabersack@novell.com>
7056 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
7059 2008-06-10 Martin Baulig <martin@ximian.com>
7061 * debug-mono-symfile.h
7062 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
7063 changes to the file format, but we were generating incorrect
7064 source file indices in the line number table due to a bug, which
7065 made backtraces report an incorrect source file.
7067 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7069 * mono-debug.c: Moved mono_debug_free_method_jit_info from
7070 mini/debug-mini.c to here.
7072 * mono-debug.c (il_offset_from_address): Free memory from find_method.
7074 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
7075 use it to release structs returned by mono_debug_find_method.
7077 2008-06-10 Zoltan Varga <vargaz@gmail.com>
7079 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
7080 since it needs to set method->slot for all interface methods.
7082 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7084 * class-internals.h: Forgot to add.
7086 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7088 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
7090 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
7091 Lookup the custom attributes from property_hash.
7093 * reflection.c (mono_save_custom_attrs): Save the custom attributes
7094 in property_hash. Allocate all data using the image mempool.
7096 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
7097 for dynamic_custom_attrs to checks if the image is dynamic.
7099 2008-06-09 Zoltan Varga <vargaz@gmail.com>
7101 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
7104 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
7105 runtime functions while holding the domain assemblies lock.
7107 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7109 * verify.c: Reapplied the last bit of the reverted changes.
7111 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7113 * verify.c: Reapplied more of the reverted changes.
7115 2008-06-09 Martin Baulig <martin@ximian.com>
7117 * debug-mono-symfile.c (load_symfile): Check the major version
7118 first; if it's wrong, don't print the minor version in the error message.
7120 2008-06-09 Zoltan Varga <vargaz@gmail.com>
7122 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
7123 lock instead of the domain lock to avoid deadlocks, since the thread might
7124 already hold the loader lock.
7126 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
7127 (mono_thread_attach): Ditto.
7129 * monitor.c: Use a TLS variable for holding the current thread id instead
7130 of calling pthread_self ().
7131 (mono_monitor_init_tls): New internal function to initialize the TLS
7133 (mono_monitor_try_enter_internal): Put the owner == id check after the
7136 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
7137 missed optimizations when using gcc-4.3.
7139 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
7141 * reflection.c (mono_dynamic_image_free): Free the memory
7142 used by MonoGenericParam in MonoDynamicImage::gen_param.
7144 * reflection.c (mono_reflection_setup_generic_class): Allocate
7145 container from mempool.
7147 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
7148 container from mempool.
7150 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7152 * threads.c (mono_set_pending_exception): New internal function to set the
7153 pending exception of the current thread.
7154 (mono_thread_get_and_clear_pending_exception): Check for
7155 thread->pending_exception as well.
7157 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
7159 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
7160 it can trigger a collection.
7162 2008-06-06 Martin Baulig <martin@ximian.com>
7164 Merged the `debugger-kahalo' branch.
7167 (MONO_DEBUGGER_VERSION): Bumped to 72.
7169 * debug-mono-symfile.h
7170 (MonoSymbolFileMethodIndexEntry): Removed.
7171 (MonoSymbolFileMethodEntry): New public typedef.
7172 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
7173 (MonoSymbolFileSourceEntry): Remove everything except `index' and
7175 (MonoSymbolFileMethodEntry): Removed.
7176 (MonoSymbolFileLexicalBlockEntry): Removed.
7177 (MonoSymbolFileLineNumberEntry): Removed.
7178 (MonoDebugLexicalBlockEntry): Removed.
7179 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
7180 removed `num_il_offsets' and `il_offsets'.
7181 (MonoSymbolFile): Replace `version' with `major_version' and
7183 (MONO_SYMBOL_FILE_VERSION): Replace with
7184 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
7185 `MONO_SYMBOL_FILE_MINOR_VERSION'.
7187 * debug-mono-symfile.c
7188 (mono_debug_symfile_lookup_location): Add support for the new line
7189 number table format.
7191 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7193 * metadata.c (free_generic_class): Release the inflated
7194 MonoClass of dynamic generic classes if it's not a generic
7197 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7199 * verify.c: Reapplied more of the reverted changes.
7201 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7203 * reflection.c (lookup_custom_attr): Clean the cached flag or
7204 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
7207 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7209 * verify.c: Reapplied a small part of the reverted changes.
7211 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7213 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7215 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
7216 previously in managed code.
7217 (mono_monitor_exit): Ditto.
7218 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
7220 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
7221 the managed definition.
7223 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7225 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
7227 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7229 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
7231 * monitor.c: Add some micro optimizations.
7233 * icall.c (type_from_typename): Handle 'bool'.
7235 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7237 * verify.c: Implement constructor verification per P III 1.8.1.4.
7240 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7242 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
7243 holding the assemblies lock here too.
7245 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7247 * verify.c: Kill stack_top function.
7249 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7251 * verify.c: Kill stack_get function.
7253 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7255 * verify.c (mono_method_verify): Last change broke the build. Fixed.
7257 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7259 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
7262 * verify.c (mono_method_verify): Inflate params and locals to avoid
7263 mismatch when checking for compatibility.
7265 2008-06-05 Jonathan Chambers <joncham@gmail.com>
7267 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
7268 Length prefix should be size in bytes. Fix bug #339530.
7270 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
7271 Length prefix should be size in bytes. Fix bug #339530.
7273 Code is contributed under MIT/X11 license.
7275 2008-06-05 Bill Holmes <billholmes54@gmail.com>
7277 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
7279 Contributed under MIT/X11 license.
7281 2008-06-05 Martin Baulig <martin@ximian.com>
7283 * mono-debug-debugger.c
7284 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
7286 2008-06-05 Zoltan Varga <vargaz@gmail.com>
7288 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
7289 while holding the assemblies lock to prevent deadlocks. Handle the case
7290 where the search hook returns NULL but the assembly was still loaded.
7293 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
7294 modify domain state.
7296 2008-06-05 Andreas Färber <andreas.faerber@web.de>
7298 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
7299 * Makefile.am (pedump_LDADD): Post-process object files and
7300 add dtrace-generated object file, if necessary.
7302 Code is contributed under MIT/X11 license.
7304 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
7306 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
7308 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
7310 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
7312 2008-06-04 Mark Probst <mark.probst@gmail.com>
7314 * threads.c: Try to free everything from the delayed free table
7315 when shutting down threads, and set the variable to NULL after the
7316 table is freed so that calling
7317 mono_thread_hazardous_try_free_all() when shutting down the root
7318 domain doesn't crash.
7320 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
7322 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
7323 the caller if resulting type was inflated.
7325 * class.c (mono_class_create_from_typespec): Free the MonoType if it
7328 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
7331 2008-06-04 Zoltan Varga <vargaz@gmail.com>
7333 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
7334 class library tests.
7336 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
7337 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
7340 2008-06-04 Mark Probst <mark.probst@gmail.com>
7342 * domain.c, domain-internals.h: The JIT infos are now freed by the
7343 JIT info table code. They are freed immediately if there only a
7344 single JIT info table in circulation. If there is more, the free
7345 is delayed via a queue.
7347 * threads.c, threads-types.h: New hazard pointer function for
7348 freeing all freeable delayed items in one sitting.
7350 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7352 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
7354 * reflection.c (typebuilder_setup_properties): Same.
7356 * reflection.c (typebuilder_setup_events): Same.
7358 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7360 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
7361 and use it for allocating memory.
7363 * reflection.c (mono_marshal_spec_from_builder): Same.
7365 * reflection.c: Change code to use new signatures.
7367 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
7369 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7371 * decimal.c (rescale128): Put back one line which was accidently commented
7374 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
7377 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7379 * reflection.c (mono_reflection_generic_class_initialize): Name must
7380 be always malloc'ed so we can free it later on. Do this for field, property
7383 * metadata.c (free_generic_class): Free field, property and event names.
7385 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7387 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
7388 instead of g_memdup.
7390 * reflection.c (typebuilder_setup_fields): Same.
7392 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7394 * decimal.c (rescale128): Optimize this function a bit more.
7396 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7398 * metadata.c (free_generic_class): Release some memory from
7399 SRE generic classes.
7401 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7403 * reflection.c (mono_image_get_generic_field_token): No reference
7404 to name is kept, free it.
7406 * reflection.c (mono_reflection_generic_class_initialize): Free
7407 more memory of the inflated field.
7409 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7411 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
7414 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
7416 * reflection.c (mono_dynamic_image_free): Release memory used by
7417 MonoDynamicImage::array_methods elements.
7419 * reflection.c (assembly_add_win32_resources): Release memory after
7422 2008-06-02 Zoltan Varga <vargaz@gmail.com>
7424 * decimal.c (log2_32): Use an optimized version for this function too.
7426 * decimal.c (log2_64): Fix this on 32 bit machines.
7428 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
7430 * class.c (mono_dup_array_type): Implement allocation using a mempool.
7432 * class.c (mono_metadata_signature_deep_dup): Same.
7434 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
7437 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
7439 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
7441 * metadata-internals.h: Added mono_metadata_signature_dup_full.
7443 * class-internals.h: Update signatures to take a MonoMemPool.
7445 2008-06-02 Dick Porter <dick@ximian.com>
7447 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
7449 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
7450 FormatMessage API to get the error text. Fixes bug 321827.
7452 2008-06-02 Zoltan Varga <vargaz@gmail.com>
7454 * decimal.c: Add some micro optimizations to make decimal operations faster.
7456 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
7458 * reflection.c (method_encode_clauses): Take a mempool
7459 as parameter and use it to allocate the clause array.
7461 * reflection.c (mono_image_get_field_on_inst_token): Free
7462 the inflated type after encoding it.
7464 * reflection.c (mono_dynamic_image_free): Free each element
7465 of MonoDynamicImage::gen_params.
7467 * reflection.c (reflection_methodbuilder_to_mono_method):
7468 Allocate the generic param array from the mempool.
7469 Allocate signature params from the mempool.
7471 * reflection.c (mono_reflection_generic_class_initialize):
7472 Free inflated fields after been used.
7474 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
7476 * icall.c: Reapply the memory leak fixes as they no
7477 longer make mono crash.
7479 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
7481 * reflection.c (mono_type_get_object): Don't store the suplied
7482 MonoType with type_hash. A caller which pass a type that
7483 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
7484 might end with a pointer to freed memory.
7485 The solution is to use byval_arg or this_arg from the associated
7486 MonoClass of the supplied type.
7488 2008-05-29 Zoltan Varga <vargaz@gmail.com>
7490 * icall.c: Revert the rest of the last change as it breaks the build too.
7492 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7494 * icall.c: Revert a leak fix as it's breaking the build.
7496 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7498 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
7500 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7502 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
7504 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7506 * icall.c: Fix some memory leaks.
7508 2008-05-29 Dick Porter <dick@ximian.com>
7510 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
7511 async socket operations from the pending list when a socket
7512 closes. Leaving it until the threadpool services the event
7513 exposes a race condition when a socket descriptor is reused.
7516 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7518 * object.c: Fix negative index check for array alocation.
7520 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7522 * icall.c, marshal.c: Delegate wrappers should skip visibility.
7523 This check is performed by the verifier for IL created delegates
7524 and by Delegate::CreateDelegate for programatically created ones.
7527 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7529 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
7530 Fix code to use mono_array_size_t instead of int.
7532 Based on patch by Luis F. Ortiz.
7533 Contributed under X11 license.
7534 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7536 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7538 * icall.c: Added ves_icall_System_Array_GetLongLength and
7539 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
7542 * icall.h: Export both new functions.
7544 Based on patch by Luis F. Ortiz.
7545 Contributed under X11 license.
7546 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7548 2008-05-28 Martin Baulig <martin@ximian.com>
7550 The debugger now requires exactly r103463.
7552 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
7553 This version is not supported by the debugger, wait for 72.
7555 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7557 * object.h: Changed array related functions to use
7558 mono_array_size_t instead of guint32. Forgot to commit this file.
7560 Patch by Luis F. Ortiz.
7561 Contributed under X11 license.
7562 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7565 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7567 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
7568 don't define it. Use the number literal instead.
7570 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
7572 * icall.c: Changed array related functions to use
7573 mono_array_size_t instead of guint32.
7575 * icall.c (ves_icall_System_Array_GetLength): Check for length
7576 overflow under MONO_BIG_ARRAYS.
7578 Based on patch by Luis F. Ortiz.
7579 Contributed under X11 license.
7580 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7582 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
7584 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
7586 Based on patch by Luis F. Ortiz.
7587 Contributed under X11 license.
7588 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7590 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
7592 * object.c, object.h: Changed array related functions to use
7593 mono_array_size_t instead of guint32.
7595 Patch by Luis F. Ortiz.
7596 Contributed under X11 license.
7597 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7599 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
7601 * object.h: Introduced mono_array_size_t typedef. This must be used
7602 in all places an array length is expected. This is 64bits wide if
7603 MONO_BIG_ARRAYS is enabled.
7605 Patch by Luis F. Ortiz.
7606 Contributed under X11 license.
7607 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7609 2008-05-27 Zoltan Varga <vargaz@gmail.com>
7611 * security-manager.c class.c: Set the class exception info by calling
7612 mono_class_set_failure ().
7614 * class.c (mono_class_get_exception_data): New accessor function.
7615 (mono_class_set_failure): Store exception_data in the property hash.
7617 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
7618 the struct as a property.
7620 * loader.c (mono_get_method_full): Store the lookup result for method
7621 tokens in method_cache, the others in methodref_cache to decrease the memory
7622 usage of hash tables.
7624 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
7625 (mono_image_init): method_cache is lazy inited now.
7627 * metadata-internals.h (struct _MonoImage): Change method_cache to
7628 a MonoValueHashTable, add a separate methodref_cache.
7630 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
7632 * number-formatter.h: Fix tables to avoid arithemtic overflow in
7633 Double.ToString as exposed by Bug #383531.
7635 2008-05-26 Zoltan Varga <vargaz@gmail.com>
7637 * number-formatter.h: Make some tables static.
7639 * class.c (mono_method_set_generic_container): New accessor function.
7640 (mono_method_get_generic_container): Ditto.
7642 * class-internals.h (struct _MonoMethod): Remove rarely used
7643 'generic_container' field, store it in the property hash instead. Add
7644 'is_generic' boolean field instead.
7646 * image.c (mono_image_init): Initialize property_hash.
7647 (mono_image_close): Destroy property_hash.
7649 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
7650 hold rarely used fields of runtime structures belonging to this image.
7652 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
7653 to get/set method->generic_container.
7655 * loader.c (mono_get_method_from_token): Avoid loading the method header for
7658 2008-05-25 Zoltan Varga <vargaz@gmail.com>
7660 * class.c (mono_class_inflate_generic_method_full): Don't increase
7661 mono_stats.inflated_method_count for methods found in the cache.
7663 * threads.c (mono_thread_request_interruption): Add a comment about
7666 2008-05-24 Zoltan Varga <vargaz@gmail.com>
7668 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
7669 interface_offsets_packed table.
7671 * class.c (mono_class_init): Remove some dead code.
7673 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
7674 mono_class_setup_vtable () when CAS is active to detect security problems.
7676 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
7678 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
7680 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
7681 parameters as it's irrelevant for delegate checking.
7683 2008-05-23 Zoltan Varga <vargaz@gmail.com>
7685 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
7687 * class.c (mono_class_init): Control the creation of a generic vtable using
7688 a global which is true by default, but set to false by the runtime startup code.
7690 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
7691 Disabled for now since it breaks the embedding API.
7692 Move the setup of class->methods for arrays to mono_class_setup_methods ().
7693 (mono_class_setup_methods): Add a memory barrier.
7695 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
7696 when mono_class_init () doesn't compute the generic vtable.
7698 2008-05-23 Massimiliano Mantione <massi@ximian.com>
7699 * profiler.c: Added mono_profiler_install_statistical_call_chain,
7700 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
7701 to support call chains (backtrace) in the stat profiler.
7702 * profiler.c, profiler-private.h: Likewise.
7704 2008-05-22 Mark Probst <mark.probst@gmail.com>
7706 * generic-sharing.c: Init generic class when a method of it is
7707 requested via a runtime generic context.
7709 2008-05-22 Zoltan Varga <vargaz@gmail.com>
7711 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
7713 * reflection.c (mono_type_get_object): Add a FIXME.
7715 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
7717 * class.c (mono_class_get_method_by_index): New helper function, returning an
7718 entry in the class->methods array.
7720 2008-05-21 Zoltan Varga <vargaz@gmail.com>
7722 * class.c (mono_class_init): Only do the array optimization for szarrays.
7723 Avoid creating a generic vtable for generic instances as well.
7724 (mono_class_get_method_from_name_flags): Don't search in the metadata for
7727 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
7729 * loader.c (mono_get_method_constrained): Inflate the signature
7730 with class context. Fix #325283.
7732 2008-05-21 Zoltan Varga <vargaz@gmail.com>
7734 * object.c (mono_class_create_runtime_vtable): Add a comment.
7736 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
7738 (setup_interface_offsets): Handle the case when this is called twice for arrays.
7739 (mono_class_setup_vtable_general): Add an assert.
7740 (mono_class_init): Avoid creating a generic vtable for arrays.
7742 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
7743 here, let mono_class_init () do that.
7745 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
7746 interfaces in mscorlib.
7748 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
7749 interfaces. Add some comments.
7750 (mono_class_init): Call mono_class_setup_methods () here since it is no
7751 longer called by mono_class_setup_vtable ().
7753 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
7754 not set in class->vtable.
7755 (mono_class_create_runtime_vtable): Reenable the disabled code.
7757 * object.c (mono_class_create_runtime_vtable): Disable the last change for
7758 now as it causes some test failures.
7760 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
7761 if using the vtable trampoline. Also remove some strange code which put the
7762 generic methods themselves into the vtable slots. Remove the AOT init_vtable
7763 stuff as it is no longer needed.
7765 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
7767 * pedump.c: Give make --verify all option check code as well.
7768 Using --verify code won't check for metadata now.
7770 2008-05-19 Martin Baulig <martin@ximian.com>
7772 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
7775 (_mono_debug_using_mono_debugger): New global variable; it's set
7776 directly by the debugger, so mono_debug_using_mono_debugger() also
7777 works after attaching.
7779 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
7781 * object.c (mono_class_create_runtime_vtable): Use memory barriers
7782 as we do double checked locking on MonoClass::runtime_info and
7783 MonoClassRuntimeInfo::domain_vtables.
7785 2008-05-18 Zoltan Varga <vargaz@gmail.com>
7787 * debug-helpers.c (print_field_value): Fix a warning.
7789 2008-05-16 Zoltan Varga <vargaz@gmail.com>
7791 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
7792 set in the AOT case.
7794 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
7796 * class.c (mono_class_setup_vtable_general): Use memory barriers
7797 as we do double checked locking on MonoClass::vtable.
7799 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
7801 * reflection.c (resolve_object): Inflate only if the generic context
7802 is not null. Fixes #389886.
7804 2008-05-15 Jonathan Chambers <joncham@gmail.com>
7806 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
7809 Code is contributed under MIT/X11 license.
7811 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
7813 * class.c: Revert unrelated change.
7815 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
7817 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
7818 a generic instantiation, use mono_class_from_mono_type instead of playing
7819 with MonoType directly.
7821 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
7823 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
7824 checks must ignore generic instantiations, so mono_class_has_parent is not
7825 suitable. Fixes #390128.
7827 2008-05-14 Zoltan Varga <vargaz@gmail.com>
7829 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
7830 it to avoid registering tokens during metadata generation. Fixes #390023.
7832 2008-05-14 Kornél Pál <kornelpal@gmail.com>
7834 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
7837 Contributed under MIT/X11 license.
7839 2008-05-14 Kornél Pál <kornelpal@gmail.com>
7841 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
7842 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
7843 to fixup the EXE image.
7844 (mono_cleanup): Use mono_close_exe_image.
7845 (mono_close_exe_image): New function.
7846 * image.c: Include "marshal.h".
7847 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
7848 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
7849 counting when the image is loaded outside of mono_image_open_full. Set status
7850 based on GetLastError.
7851 * coree.c: Include required headers. Add init_from_coree.
7852 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
7853 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
7854 (_CorExeMain): Set init_from_coree.
7855 (CorExitProcess): Only call ExitProcess for now.
7856 (CorBindToRuntimeEx): New stub implementation.
7857 (CorBindToRuntime): New function.
7858 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
7859 (MonoFixupExe): ILONLY executables require no fixups.
7860 (mono_set_act_ctx): New function to set activation context.
7861 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
7862 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
7863 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
7864 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
7866 * domain-internals.h: Add mono_close_exe_image.
7868 Contributed under MIT/X11 license.
7870 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
7872 * metadata.c (mono_metadata_compute_size): Correctly calculate field
7873 size for generic param and event tables. Fixes #388977.
7875 2008-05-13 Zoltan Varga <vargaz@gmail.com>
7877 * loader.c (mono_method_signature): Use memory barriers because of the double
7878 checked locking pattern.
7880 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
7881 aborting or aborted as well. Fixes #376391.
7883 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
7884 existing runtime state in the Suspend handler during shutdown.
7886 2008-05-12 Zoltan Varga <vargaz@gmail.com>
7888 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
7890 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
7891 which are starting up or shutting down.
7893 * threads.c (mono_threads_set_shutting_down): Don't return a value since
7894 this function never returns if the runtime is already shutting down.
7896 * icall.c (ves_icall_System_Environment_Exit): Update after
7897 mono_threads_set_shutting_down () signature change.
7899 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
7901 * class.c: Added can_access_instantiation to verify if the instantiation
7902 is visible. Fix access check for nested types as they returned TRUE
7903 before doing type and generic instantiation visibility checks.
7905 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
7907 * reflection.c (mono_reflection_create_generic_class): The created type
7908 must have a different container from its TypeBuilder. Otherwise they
7909 will end sharing generic arguments, which is wrong.
7911 Due to the sharing, making a generic instance of the created type using
7912 the TypeBuider generic arguments resulted in the generic type definition
7913 been returned, which is wrong as well.
7915 As a bonus the code was leaking the type_params array. This memory should
7916 be allocated from the image mempool.
7918 This fixes bug #354047.
7920 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
7922 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
7923 to here as they are now used in assembly.c new code.
7924 Added a skipverification flag to MonoAssembly.
7925 New internal function mono_assembly_has_skip_verification.
7927 * assembly.c: New function mono_assembly_has_skip_verification. It checks
7928 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
7931 2008-05-07 Zoltan Varga <vargaz@gmail.com>
7933 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
7934 needed. Fixes #387034.
7936 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
7938 2008-05-06 Miguel de Icaza <miguel@novell.com>
7940 * assembly.c (mono_assembly_load_reference): Prevent crash while
7941 disassembling Silverlight 2.0 executables while we still do not
7942 have GACed libraries.
7944 2008-05-07 Zoltan Varga <vargaz@gmail.com>
7946 * reflection.c: Special case generic type definitions as well. Fixes #383444.
7948 2008-05-06 Zoltan Varga <vargaz@gmail.com>
7950 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
7951 of the dynamic case. Fixes #387404.
7953 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
7955 *verify.c (mono_verifier_is_class_full_trust): If under
7956 verify_all and the verifier mode was not set, only
7957 gac and corlib types are fulltrust. This makes --verify-all
7958 usable to detect unverifiable code, which is the expected
7961 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
7963 * verify.h: Ops, commited the header with debug
7966 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
7968 * verify.c (merge_stack): Use the new value on unverifiable
7971 * verify.c (verify_type_compatibility_full): Comparison
7972 of nullable types can't use mono_class_is_assignable_from.
7974 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
7975 that makes all verification errors be reported.
7977 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
7980 2008-05-05 Robert Jordan <robertj@gmx.net>
7982 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
7983 support for value types. See #386415.
7985 * object.c: comments.
7987 Code is contributed under MIT/X11 license.
7989 2008-05-05 Martin Baulig <martin@ximian.com>
7991 * debug-mono-symfile.h
7992 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
7993 for old pre-terrania symbol files.
7995 2008-05-05 Andreas Färber <andreas.faerber@web.de>
7997 * mono-config.c: Add ppc64 architecture.
7999 Code is contributed under MIT/X11 license.
8001 2008-05-05 Andreas Färber <andreas.faerber@web.de>
8003 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
8004 PPC64 uses function descriptors as well.
8006 Code is contributed under MIT/X11 license.
8008 2008-05-04 Zoltan Varga <vargaz@gmail.com>
8010 * object.c (compute_class_bitmap): Ignore literal static fields.
8012 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
8013 var has an invalid format.
8014 (describe_ptr): Add some sanity checks for the vtable.
8015 (add_nursery_frag): Clear unused nursery fragments.
8016 (major_collection): Clear all remaining nursery fragments.
8018 2008-05-03 Robert Jordan <robertj@gmx.net>
8020 * image.c, metadata-internals.h: add thunk_invoke_cache.
8022 * marshal.c, marshal.h: implement
8023 mono_marshal_get_thunk_invoke_wrapper ().
8025 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
8027 Code is contributed under MIT/X11 license.
8029 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
8031 * verify.c (do_leave): Empty the stack.
8033 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
8035 * class.c (mono_class_is_assignable_from): Variance
8036 doesn't work between reference and value types. For example,
8037 given type C<T+>, C<int32> is not assignable to C<object>.
8038 Break the argument checking loop on first error.
8040 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
8042 * icall.c : base64_to_byte_array() needs some more strict
8043 check for sequence of '=' characters. Patch by Santa
8044 Marta (http://deee.g.hatena.ne.jp/santamarta).
8046 Contributed under MIT/X11 license.
8047 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
8049 2008-05-02 Jonathan Chambers <joncham@gmail.com>
8051 * domain.c: Disable LoadLibrary support to fix Win32 build.
8053 Code is contributed under MIT/X11 license.
8055 2008-05-02 Zoltan Varga <vargaz@gmail.com>
8057 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
8058 to help with cache behaviour.
8060 2008-05-01 Miguel de Icaza <miguel@novell.com>
8062 * appdomain.c (mono_domain_from_appdomain): Add new accessor
8065 2008-05-01 Zoltan Varga <vargaz@gmail.com>
8067 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
8069 2008-05-01 Dick Porter <dick@ximian.com>
8071 * process.c (process_get_fileversion): Only pass 16 bits of
8072 language ID to VerLanguageName. Fixes bug 381204.
8074 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
8076 * verify.c (mono_method_verify): Fix the comparison
8077 operator for code bounds check.
8079 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
8081 * verify.c (mono_method_verify): Check the bounds of
8082 all access of the code array.
8084 2008-04-29 Kornél Pál <kornelpal@gmail.com>
8086 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
8088 2008-04-28 Zoltan Varga <vargaz@gmail.com>
8090 * image.c (mono_image_strong_name_position): Fix return value when the rva is
8093 2008-04-28 Kornél Pál <kornelpal@gmail.com>
8095 * loader.c (mono_get_method_from_token, mono_method_signature): Add
8096 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
8097 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
8098 fixup main EXE images when using mono.exe for mixed-mode assembly support.
8099 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
8101 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
8102 runtime initialization from metadata.
8103 * assembly.c: Remove obsolete ceGetModuleFileNameA.
8104 (mono_set_rootdir): Use mono_get_module_file_name.
8105 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
8107 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
8108 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
8109 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
8110 MonoCLIImageInfo. Add support for module handles.
8111 (load_cli_header): Update mono_cli_rva_image_map signature.
8112 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
8113 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
8114 (mono_image_rva_map): Add support for module handles.
8115 (mono_image_ensure_section_idx): Add support for module handles.
8116 (mono_image_close): Add support for module handles.
8117 (do_load_header): Add support for module handles.
8118 (mono_image_open_from_module_handle): New function for internal use.
8119 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
8120 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
8121 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
8123 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
8124 * image.h: Add mono_image_fixup_vtable.
8125 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
8127 * coree.h: New file.
8128 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
8129 unsupported native code.
8130 (mono_marshal_set_callconv_from_modopt): New function splitted from
8131 mono_marshal_get_managed_wrapper.
8132 (mono_marshal_get_managed_wrapper): Use
8133 mono_marshal_set_callconv_from_modopt.
8134 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
8135 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
8136 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
8137 that results in a deadlock when the runtime is loaded in _CorDllMain.
8138 * Makefile.am: Add coree.c and coree.h.
8140 Contributed under MIT/X11 license.
8142 2008-04-28 Mark Probst <mark.probst@gmail.com>
8144 * generic-sharing.c: Search for type arguments in array element
8147 2008-04-28 Mark Probst <mark.probst@gmail.com>
8149 * class-internals.h, generic-sharing.c: New, small runtime generic context.
8151 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
8153 * object.c: Don't setup the RGCTX when the vtable is created,
8154 because we're setting it up lazily now.
8156 2008-04-26 Zoltan Varga <vargaz@gmail.com>
8158 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
8161 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8163 * verify.c (verify_class_for_overlapping_reference_fields):
8164 If class is under fulltrust allow reference types to overllap
8165 if they have the same RVA.
8167 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8169 * pedump.c: Added new flag valid-only, that makes the verifier
8170 behaves just like --security=validil. It won't fail type load
8171 due to unverifiable restrictions.
8173 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8175 * class-internals.h (struct MonoMethod): Added a verification_success
8176 field to cache verifier executions. Reduced MonoMethod:slot size by
8179 2008-04-23 Zoltan Varga <vargaz@gmail.com>
8181 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
8182 instead of a 'vt' argument to save an indirection and to allow these to be used
8184 (scan_vtype): New helper function to scan an area using a gc descriptor.
8185 (mono_gc_wbarrier_value_copy): Implement this.
8186 (handle_remset): Add support for REMSET_VTYPE.
8187 (find_in_remset_loc): Ditto.
8188 (mono_gc_base_init): Allow some debugging options to be controlled through the
8189 use of the MONO_GC_DEBUG env variable.
8190 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
8191 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
8193 2008-04-23 Martin Baulig <martin@ximian.com>
8195 * domain.c (mono_domain_create): Move the call to
8196 mono_debug_domain_create() down, after allocating the domain id.
8198 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8200 verify.c (verify_class_for_overlapping_reference_fields): Skip
8201 static fields while verifying for overlapping fields as they
8202 don't matter at all.
8204 2008-04-23 Marek Habersack <mhabersack@novell.com>
8206 * domain-internals.h: added a declaration of
8207 mono_make_shadow_copy.
8209 * assembly.c (mono_assembly_open_full): shadow copying of
8210 assemblies moved to here, so that all the assemblies within the
8211 application domain's private binary directories can be
8212 processed. Fixes bug #380546
8214 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
8215 mono_make_shadow_copy and made non-static. The decision whether
8216 to shadow-copy an assembly is made based on its location - it's
8217 copied if it's in one of the private application domain binary
8218 directories and its different to the target file in the shadow
8219 directory. Fixes bug #380546
8221 2008-04-22 Zoltan Varga <vargaz@gmail.com>
8223 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
8225 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
8228 * reflection.c (mono_image_create_token): Handle
8229 Method/ConstructorOnTypeBuilderInst.
8230 (resolve_object): Ditto.
8231 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
8232 so it can be called from resolve_object. Also handle the case when the inflated
8233 class already has its methods setup.
8235 2008-04-21 Martin Baulig <martin@ximian.com>
8237 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
8239 2008-04-20 Geoff Norton <gnorton@novell.com>
8241 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
8242 pointer dereference.
8244 2008-04-15 Marek Habersack <mhabersack@novell.com>
8246 * appdomain.c (try_load_from): if IOMAP is in effect, call the
8247 portability API to look up the assembly file. Fixes behavior in
8248 situations when the application has a bin/ directory, but the
8249 assembly search patch refers to Bin/ (and thus the requested file
8250 name is Bin/SomeLibrary.dll). Fixes bug #379888
8252 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
8254 verify.c (mono_type_is_generic_argument): Extracted this check
8255 from a dozen places to here.
8257 verify.c: Fixed all issues related to boxing generic arguments
8258 and their constraints.
8260 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
8262 verify.c (mono_class_interface_implements_interface): Fix win32 build.
8264 2008-04-14 Zoltan Varga <vargaz@gmail.com>
8266 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
8267 isn't finished yet. Fixes #363447.
8269 2008-04-13 Zoltan Varga <vargaz@gmail.com>
8271 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
8274 2008-04-13 Jb Evain <jbevain@novell.com>
8276 * domain.c: update the 2.1 profile versions.
8277 Merged from the Moonlight 2 branch.
8279 2008-04-12 Zoltan Varga <vargaz@gmail.com>
8281 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
8282 mscorlibs for the non-refonly case as well.
8284 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
8285 in mono_assembly_load_from_full (). Fixes #378924.
8287 2008-04-11 Geoff Norton <gnorton@novell.com>
8289 * icall.c: The global extern environ doesn't exist on Mac. We
8290 need to call NSGetEnviron instead.
8292 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8294 verify.c: Add generic method constraint verification.
8296 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8298 class.c (mono_class_inflate_generic_method_full): Add a long
8299 explanation to the is_mb_open hack. Remove the FIXME.
8301 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8303 * verify.c (mono_method_verify): Mark all unknown opcodes
8304 as invalid. Mark jmp as unverifiable.
8306 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8308 * verify.c: Add code to do type constraint verification on class instances.
8310 * verify.c (mono_verifier_verify_class): Use the type constraint
8313 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8315 * class.c (mono_class_get_field_default_value): Don't pass cindex
8316 as hint to mono_metadata_get_constant_index. The local is not initialized
8317 and should contain garbage most of the time. This could only work
8320 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
8322 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
8324 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
8326 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
8328 * class.c (mono_class_from_generic_parameter): Save the token of the
8329 generic param in MonoClass::sizes.generic_param_token.
8331 * reflection.c (mono_custom_attrs_from_class): If the class type is
8332 VAR or MVAR retrieve the attributes of the generic param.
8334 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
8336 * class.c (mono_class_init): Do class verification if the verifier
8339 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
8341 * verify-internal.h: Added mono_verifier_verify_class.
8343 * verify.c: Added mono_verifier_verify_class. It checks for
8344 classes with explicit layout that have overlapping reference fields.
8346 * pedump.c: Init the verifier state prior to verification. Fixed
8347 command line arguments.
8349 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
8351 * Makefile.am: Added verify-internals.h, hopefully fix the build.
8353 2008-04-08 Zoltan Varga <vargaz@gmail.com>
8355 * verify-internals.h: Fix a warning.
8357 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
8359 * verify-internals.h: New header with the verifier configuration
8360 extracted from mini.c.
8362 * verify.c: Implemented the new functions exported by verify-internals.h.
8364 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
8366 * verify.c: Add proper verification of ckfinite.
8368 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
8370 * verify.c (do_conversion): Improved error message to something
8373 * verify.c (check_is_valid_type_for_field_ops): Fix to work
8374 with primitive types.
8376 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
8378 * verify.c: Added tail prefix checking. Marked icall
8381 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
8383 * verify.c: Fix the detection of branches to the middle
8386 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
8388 * verify.c: Implemented verification of volatile. and
8389 unaligned. prefix. Check if a type is valid after retrieving it.
8391 2008-04-01 Dick Porter <dick@ximian.com>
8393 * process.c (process_get_fileversion): If there's no string block,
8394 set the file language to en_US. Fixes the other new part of bug
8397 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
8399 * class.c: New functions mono_method_can_access_field_full and
8400 mono_method_can_access_method_full. They perform type visibility
8401 and type site check.
8403 * class-internal.h: Added exported functions.
8405 * verify.c: Use new functions to implement proper visibility checks.
8407 2008-03-29 Zoltan Varga <vargaz@gmail.com>
8409 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
8411 2008-03-28 Dick Porter <dick@ximian.com>
8413 * process.c (process_get_fileversion): Use the first language ID
8414 we see, rather than insisting on an invariant language. Fixes bug
8417 2008-03-28 Zoltan Varga <vargaz@gmail.com>
8419 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
8420 the streams to fix reading of invalid memory later.
8422 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
8425 2008-03-26 Zoltan Varga <vargaz@gmail.com>
8427 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
8428 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
8430 2008-03-26 Massimiliano Mantione <massi@ximian.com>
8431 * threads.h: Added MonoThreadManageCallback type and
8432 mono_thread_set_manage_callback prototype
8433 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
8434 (used to store the mono_thread_manage callback).
8435 * threads.c: Added mono_thread_set_manage_callback, and handle
8436 "MonoThread->manage_callback" in build_wait_tids.
8438 2008-03-26 Dick Porter <dick@ximian.com>
8440 * process.c (process_get_fileversion): Set FileVersionInfo strings
8441 to Empty when the resource doesn't have the particular info.
8444 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
8446 * verify.c (mono_method_verify): Proper prefix validation.
8448 2008-03-25 Zoltan Varga <vargaz@gmail.com>
8450 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
8451 itself in a separate argument instead of throwing them. Fixes #373448.
8453 * appdomain.c: Bump corlib version.
8455 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
8457 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
8459 2008-03-20 Kornél Pál <kornelpal@gmail.com>
8461 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
8464 2008-03-20 Mark Probst <mark.probst@gmail.com>
8466 * generic-sharing.c, class-internals.h: Code for putting
8467 reflection types into the runtime generic context.
8469 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
8471 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
8475 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
8477 * verify.c (VerifyContext): Added instruction prefix data to the struct.
8479 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
8481 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
8483 * verify.c (do_cast): Let the result value keep the boxed status.
8485 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
8487 2008-03-17 Jb Evain <jbevain@novell.com>
8489 * reflection.c: when running on a 2.0 runtime, emit
8490 unconditionally the #~ header version as 2.0, and the
8491 CLI header version as 2.5, for symmetry's sake with csc.
8493 2008-03-16 Zoltan Varga <vargaz@gmail.com>
8495 * class.c: Remove the unused cache_interface_offsets stuff.
8497 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
8498 profiler.c: Fix warnings.
8500 2008-03-16 Mark Probst <mark.probst@gmail.com>
8502 * generic-sharing.c, class-internals.h: Support for putting
8503 methods into the runtime generic context.
8505 2008-03-16 Zoltan Varga <vargaz@gmail.com>
8507 * class.c (mono_class_setup_fields): Ignore calls made to this function for
8508 classes which are generic instances of not-yet finished typebuilders. Fixes
8511 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
8513 2008-03-15 Zoltan Varga <vargaz@gmail.com>
8515 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
8517 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
8518 field, replace it with a hash table in MonoDynamicImage.
8520 * reflection.c (inflate_mono_method): Access the generic definition object from
8521 image->generic_def_objects instead of imethod->reflection_info.
8523 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
8525 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
8527 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
8528 function in reflection.c so it is easier to keep in sync with the dynamic image
8531 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
8532 mono_image_close ().
8534 2008-03-15 Mark Probst <mark.probst@gmail.com>
8536 * class.c (mono_class_generic_sharing_enabled): Disable generic
8537 sharing for all architectures except AMD64 and x86 to fix build.
8539 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
8541 * verify.c: Use the generic definition MonoGenericContext when available.
8542 Remove code for checking generics instance compatibility in favor of
8543 mono_class_is_assignable_from.
8545 2008-03-14 Mark Probst <mark.probst@gmail.com>
8547 * marshal.c, marshal.h, metadata-internals.h, image.c,
8548 wrapper-types.h: New wrapper for invoking a shared static method
8549 without having to pass the runtime generic context argument.
8551 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
8553 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
8555 2008-03-14 Zoltan Varga <vargaz@gmail.com>
8557 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
8559 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
8560 create a token from a FieldOnTypeBuilderInst.
8561 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
8562 (resolve_object): Ditto.
8564 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
8565 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
8567 2008-03-14 Martin Baulig <martin@ximian.com>
8569 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
8571 * debug-mono-symfile.h
8572 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
8573 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
8575 2008-03-10 Martin Baulig <martin@ximian.com>
8577 * debug-mono-symfile.h
8578 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
8579 `lexical_block_table_offset'.
8580 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
8582 (MonoSymbolFile): Added `version'.
8585 (MonoDebugLexicalBlockEntry): Removed.
8586 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
8589 * mono-debug.c (mono_debug_add_method): Don't compute lexical
8590 blocks here; the debugger now does this internally.
8592 2008-02-27 Martin Baulig <martin@ximian.com>
8594 * object.c (mono_runtime_exec_main): Call
8595 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
8596 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
8598 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
8600 * verify.c (verify_type_compatibility_full): Allow native int to be converted
8601 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
8603 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
8605 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
8606 ldftn with a virtual method.
8608 2008-03-13 Geoff Norton <gnorton@novell.com>
8610 * decimal.c: Only include memory.h if the platform has it.
8612 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
8614 * assembly.c, class.c, metadata-internals.h: make sure public key
8615 tokesns are compared in a case-insensitive way. Also, all
8616 the lookups in the GAC use a lowercase public key token
8617 (gaacutil already does the lowercasing on install). Fixes
8620 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
8622 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
8625 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
8627 * image.c: when someone loads a mscorlib from a file, return the
8628 currently loaded mscorlib (fixes bug #369253).
8630 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
8632 * class.c: handle types with no parents by forcing them to have
8633 System.Object as a parent and marking them as broken (this currently
8634 allows the first part of bug #369173 to work as well, likely because
8635 we don't check for typeload exceptions everywhere yet).
8637 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
8639 * class.c: more complete check that types belong to corlib
8640 (fixes second part of bug #369173).
8642 2007-03-10 Bill Holmes <billholmes54@gmail.com>
8644 * generic-sharing.c: Including glib.h for the MSVC builds to define
8645 "inline" to "__inline" before including mono-membar.h.
8647 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
8648 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
8651 Contributed under MIT/X11 license.
8653 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
8655 * verify.c (do_invoke_method): Remove return type validation.
8657 * verify.c (do_ret): Do return type validation at return site instead of
8660 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
8662 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
8664 * verify.c: Some todos cleaned and improved a few error messages.
8666 2008-03-08 Zoltan Varga <vargaz@gmail.com>
8668 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
8670 2008-03-07 Zoltan Varga <vargaz@gmail.com>
8672 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
8673 system types correctly.
8675 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
8678 2008-03-06 Zoltan Varga <vargaz@gmail.com>
8680 * assembly.c (build_assembly_name): Fix a warning.
8682 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8684 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
8685 the called function takes an object type argument. Fixes storing or
8686 valuetypes across remoting as well as reducing memory usage.
8687 * image.c, metadata-internals.h: remove now unused ldfld_remote and
8688 stfld_remote wrapper caches.
8690 2008-03-06 Zoltan Varga <vargaz@gmail.com>
8692 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
8695 * reflection.c (mono_image_register_token): New helper function to save
8696 a token->object mapping.
8698 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
8701 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
8702 one dimension arrays. Fixes #367670.
8703 (mono_reflection_get_type_internal): Ditto.
8705 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
8707 * marshal.c: mono_load_remote_field_new() always returns object.
8708 so use the proper signature (fixes bug #366445).
8710 2008-03-04 Zoltan Varga <vargaz@gmail.com>
8712 * class-internals.h (MonoMethod): Remove unused uses_this flag,
8713 add an 'inline_failure' flag instead.
8715 2008-03-04 Mark Probst <mark.probst@gmail.com>
8717 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
8718 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
8719 contains the location of "this", used for exception handling.
8721 2008-03-04 Zoltan Varga <vargaz@gmail.com>
8723 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
8724 their size on all platforms for perf reasons.
8726 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8728 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
8731 * object-internal.h: Same.
8733 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8735 * reflection.h: Fix the build I just broke.
8737 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8739 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
8740 Test if a token is valid, this remove explicit usage of
8741 MonoDynamicImage::tokens from the verifier code.
8743 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
8745 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
8746 instead of direct access to MonoDynamicImage::tokens.
8748 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8750 * verify.c (token_bounds_check): Fix the build I just broke.
8752 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
8754 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
8756 * verify.c (verifier_load_method): Fixed the errors message.
8758 * verify.c (mono_method_verify): Fixed a debug message.
8760 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
8762 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
8763 mono-perfcounters.h, class-internals.h: support for predefined
8764 writable counters, query of categories and counters, bugfixes.
8766 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
8768 * verify.c (do_refanytype): Verify the refanytype opcode.
8770 * verify.c (mono_method_verify): Use do_refanytype.
8772 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
8774 * verify.c (do_mkrefany): Verify the mkrefany opcode.
8776 * verify.c (mono_method_verify): Use do_mkrefany.
8778 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
8780 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
8781 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
8784 2008-02-27 Zoltan Varga <vargaz@gmail.com>
8786 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
8787 the type load exception.
8789 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
8791 * verify.c: Added a few FIXME for method signatures
8793 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
8794 of mono_method_get_signature and get vararg call working. Removed unused
8795 checks for return value.
8797 * verify.c (do_refanyval): Verify the refanyval opcode.
8799 * verify.c (mono_method_verify): Implemented verification of arglist and
8802 2008-02-27 Zoltan Varga <vargaz@gmail.com>
8804 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
8805 vtypes to marshal.c.
8807 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
8808 it works for AOT as well.
8810 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
8812 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
8813 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
8814 the system time is adjusted.
8816 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
8818 * icall.c, icall-def.h: use the new time functions (fixes the
8819 non-monotonic behaviour of TickCount).
8821 2008-02-26 Zoltan Varga <vargaz@gmail.com>
8823 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
8824 it breaks the build.
8826 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
8827 cattr is not finished yet.
8829 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
8831 * verify.c: Proper token validation for field, method and type.
8833 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
8835 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
8837 * loader.c (method_from_memberref): Generate type load error instead of method missing
8838 if the type is not found.
8840 2008-02-23 Zoltan Varga <vargaz@gmail.com>
8842 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
8843 some of the conversions caused the generation of a marshal directive exception.
8845 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
8847 verify.c: Report which exception should be thrown by the JIT.
8848 Added a lot of FIXME notes.
8850 2008-02-22 Mark Probst <mark.probst@gmail.com>
8852 * generic-sharing.c: Runtime generic context slots are not
8853 instantiated on init anymore. Instead, provide function to do the
8854 instantiating on demand.
8856 * class-internals.h: Added vtable to runtime generic context.
8857 Macros for encoding direct and indirect slot offsets in one
8860 2008-02-21 Mark Probst <mark.probst@gmail.com>
8862 * object.c, generic-sharing.c: Moved some generic sharing code
8863 from object.c to generic-sharing.c.
8865 * generic-sharing.c: Added support for extensible runtime generic
8868 * metadata-internals.h: Two new hash tables in MonoImage for
8869 extensible runtime generic context support.
8871 * domain.c: Unregister generic vtables upon domain unloading.
8873 * image.c: Destroy new hash tables upon image unloading.
8875 * metadata.c: Unregister generic subclasses upon image unloading.
8877 * class-internals.h: New data structure for runtime generic
8878 context template. New fields in the runtime generic context for
8881 * Makefile.am: Added generic-sharing.c.
8883 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
8885 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
8886 there is a pending loader exception, raise it.
8888 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
8891 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
8896 2008-02-20 Zoltan Varga <vargaz@gmail.com>
8898 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
8900 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
8902 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
8903 ref-only requests for compatibility with MS.
8905 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
8907 * reflection.c (mono_custom_attrs_from_method): Don't silently
8908 return an empty list for generic method instances.
8909 (mono_custom_attrs_from_param): Likewise.
8911 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
8912 Raja R Harinath <harinath@hurrynot.org>
8915 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
8916 * class.c (mono_class_inflate_generic_method_full): Initialize it
8917 when a fully-open method is instantiated.
8918 * metadata.c (inflated_method_equal, inflated_method_hash): Update
8920 * reflection.c (inflate_mono_method): Don't create a temporary context.
8922 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
8924 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
8925 Compute correct value, to prepare for imethod->reflection_info going away.
8927 2008-02-19 Zoltan Varga <vargaz@gmail.com>
8929 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
8931 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
8933 * verify.c: Implement skip visibility flag.
8935 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
8937 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
8938 which contains an extra field to tell the kind of exception that should be thrown.
8940 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
8942 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
8944 * loader.c (mono_method_get_param_names): Initialize 'klass' after
8945 'method' is updated.
8947 2008-02-11 Zoltan Varga <vargaz@gmail.com>
8949 * class.c (mono_class_layout_fields): Set class->min_align for classes using
8950 explicit layout as well. Fixes #360375.
8952 2008-02-11 Geoff Norton <gnorton@novell.com>
8954 * loader.c: Guard and dereference against inflated generic methods
8956 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
8958 * class.c: Include Retargetable spec in assembly name.
8959 * assembly.c: Always include PublicKeyToken spec in assembly name
8960 (with value "null" if assembly is not signed), and include
8962 * icall-def.h: Added icall for Assembly.get_fullname.
8963 * icall.c: Added icall returning the fullname of an assembly.
8965 2008-02-09 Zoltan Varga <vargaz@gmail.com>
8967 * class.c (mono_class_setup_vtable_general): Add a missing call to
8968 mono_class_setup_methods () which is needed in the AOT case.
8970 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
8972 * verify.c (mono_type_get_stack_name): Added. Return the name for the
8973 stack type of the given MonoType.
8975 * verify.c (verify_type_compatibility_full): Handle the void type.
8977 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
8978 way stack merging works.
8980 * verify.c (store_local): Improved verification message.
8982 * verify.c (do_branch_op): If the merging is invalid, the method
8983 is unverifiable and not invalid. Improved error message.
8985 * verify.c (merge_stacks): Properly merge a boxed valuetype and
8986 a reference type diferent than System.Object. Improved error
8989 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
8991 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
8993 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
8994 type of an enum even if the argument is byref.
8996 * verify.c: Replace all explicit uses of enumtype and enum_basetype
8997 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
8999 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
9001 *verify.c (verify_type_compatibility_full): Make enum types
9002 compatible with their base types.
9004 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
9005 types are compatible for the special case of a boxed valuetype and
9008 * verify.c (verify_stack_type_compatibility): The function
9009 is_compatible_boxed_valuetype was extracted from here.
9011 * verify.c (push_arg): Only set ctx->has_this_store if the method
9014 * verify.c (do_ldelem): Fixed a typo in an error message and added
9015 strict check for mixing int32 and native int as the array type
9018 * verify.c (merge_stacks): Consider boxed valuetypes in the
9019 compatibility checks.
9021 2008-02-07 Massimiliano Mantione <massi@ximian.com>
9022 * profiler.h: (MonoGCEvent): Added start-stop the world events.
9024 2008-02-06 Massimiliano Mantione <massi@ximian.com>
9025 *class.c: use_new_interface_vtable_code: renamed the env var to have
9026 a "MONO_" prefix, and fix the logic to enable it by default.
9028 2008-02-06 Massimiliano Mantione <massi@ximian.com>
9030 mono_class_setup_vtable_general: rewrote the way in which interface
9031 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
9032 makes the code more maintainable.
9033 For now the old code is still there, and can be activated setting
9034 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
9036 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
9038 * verify.c: guarded some debug functions around and #ifdef.
9040 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
9042 2008-02-06 Zoltan Varga <vargaz@gmail.com>
9044 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
9045 changes for now since they seem to break too many things.
9047 2008-02-05 Mark Probst <mark.probst@gmail.com>
9049 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
9050 mono_marshal_find_nonzero_bit_offset): Added macro and function
9051 for finding the byte- and bit-offset of a bitfield within a
9054 2008-02-05 Zoltan Varga <vargaz@gmail.com>
9056 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
9057 (mono_marshal_get_struct_to_ptr): Ditto.
9059 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
9062 2008-02-03 Zoltan Varga <vargaz@gmail.com>
9064 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
9065 between methods for non-corlib types.
9067 2008-02-02 Geoff Norton <gnorton@novell.com>
9069 * loader.c (mono_method_get_param_names): Populate the parameter name for
9070 generic parameters as well. (Fixes #342536)
9072 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
9074 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
9076 * verify.c (do_invoke_method): Fix for calling with byref structs.
9078 * verify.c (do_cast): push a boxed value type based on the type token and not
9081 2008-01-31 William Holmes <billholmes54@gmail.com>
9083 * process.c (process_module_string_read): Check the size returned form
9084 VerQueryValue to avoid out of memory exception.
9086 2008-01-30 Zoltan Varga <vargaz@gmail.com>
9088 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9089 Handle properly modules which are not in the moduleref table. Fixes
9092 2008-01-29 Zoltan Varga <vargaz@gmail.com>
9094 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
9095 the dynamic case which is now in managed code.
9096 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
9098 * marshal.c (mono_string_to_bstr): Fix a warning.
9099 (init_com_provider_ms): Ditto.
9101 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
9103 * exception.c (mono_get_exception_out_of_memory): New helper function.
9105 2008-01-28 Jonathan Chambers <joncham@gmail.com>
9107 * marshal.c: Add support for BSTR marshalling
9108 using other COM systems.
9110 Code is contributed under MIT/X11 license.
9112 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9114 * object.c (mono_runtime_invoke_array): reverted previous
9115 commit as it breaks the build.
9117 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9119 * object.c (mono_runtime_invoke_array): Verify arguments for
9120 invalid types. Fixes #348522.
9122 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9124 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
9125 non-final virtual calls using call.
9127 * verify.c (do_invoke): fixed some TODOs.
9129 * verify.c (push_arg): set has_this_store for "ldarga 0".
9131 2008-01-27 Zoltan Varga <vargaz@gmail.com>
9133 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
9134 which belong to an inflated class. Fixes #356531.
9136 2008-01-26 Robert Jordan <robertj@gmx.net>
9138 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
9139 which resort to FindFirstFile when a certain error condition
9140 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
9141 Code is contributed under MIT/X11 license.
9143 2008-01-24 Jonathan Chambers <joncham@gmail.com>
9145 * marshal.c (emit_marshal_string): Fix out string marshalling
9146 to use specified encoding. Fixes #323900.
9148 Code is contributed under MIT/X11 license.
9150 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
9152 * class.c (mono_class_inflate_generic_method_full): Don't modify
9153 iresult->context after cache check.
9155 2008-01-23 Zoltan Varga <vargaz@gmail.com>
9157 * class.c (mono_class_inflate_generic_method_full): Change the
9158 struct assignments to memcpy for better visibility and add some comments.
9160 2008-01-23 Dick Porter <dick@ximian.com>
9162 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
9163 procedure, and make it work on windows.
9165 2008-01-22 Zoltan Varga <vargaz@gmail.com>
9167 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
9168 a MonoReflectionTypeBuilder since it is always of that type.
9170 * reflection.c (mono_type_get_object): Remove an unneccesary check.
9172 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
9174 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
9176 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
9178 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
9180 * reflection.c (mono_reflection_create_runtime_class): Remove already created
9181 instantiations from the type cache.
9183 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9185 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
9187 * verify.c (do_unbox_value): push a controled mutability managed pointer.
9189 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9191 * verify.c (do_ldstr): added, verifies if the #US token is valid.
9193 * verify.c (mono_method_verify): removed old TODO
9195 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9197 * verify.c (do_newobj): add visibility check.
9199 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9201 * verify.c (do_load_function_ptr): add visibility check.
9203 2008-01-21 Massimiliano Mantione <massi@ximian.com>
9205 mono_generic_class_get_class: hook profiler events.
9206 mono_field_get_offset: added to support heap-shot in the new profiler.
9207 *class.h: exported mono_field_get_offset.
9209 mono_reflection_setup_internal_class: hook profiler events.
9211 2008-01-20 Zoltan Varga <vargaz@gmail.com>
9213 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
9214 argument here too and use it to avoid checking for pending exceptions if
9217 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
9219 * assembly.c (build_assembly_name): add arg for passing the assembly
9220 flags. Do not consider a PublicKey with value "null" valid.
9221 (mono_assembly_name_parse_full): added boolean argument that will be
9222 set if the assembly name contains a PublicKeyToken spec. Added support
9223 for the Retargetable spec for which only Yes or No are allowed as valid
9224 value. Consider assembly name invalid if Retargetable spec is set, but
9225 either version, culture or public key (token) are not specified.
9226 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
9227 with implementation in assembly.c.
9228 * icall.c (fill_reflection_assembly_name): also copy assembly flags
9229 from MonoAssemblyName.
9230 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
9231 introduced argument for mono_assembly_name_parse_full to know if the
9232 assembly name has a PublicKeyToken spec, and if it has instruct
9233 fill_reflection_assembly_name to use default value for keyToken (if
9234 PublicKeyToken is null).
9236 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9238 * verify.c (mono_method_verify): fixed ovf ops with
9239 float values. They are unverifiable now.
9241 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9243 * class.c (set_failure_from_loader_error): add BadImageException to the
9244 list of exceptions that can cause a type to fail to load.
9246 * class.c (mono_class_get_exception_for_failure): same.
9248 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
9250 * verify.c (in_any_exception_block): added, check if offset
9251 is part of any exception handling clause.
9253 * verify.c (get_stack_type): added VAR and MVAR types.
9255 * verify.c (do_stobj): better error messages.
9257 * verify.c (do_cpobj): added, check cpobj.
9259 * verify.c (do_initobj): added, check initobj.
9261 * verify.c (do_sizeof): added, check sizeof.
9263 * verify.c (do_localloc): added, check localloc.
9265 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
9267 2008-01-17 Zoltan Varga <vargaz@gmail.com>
9269 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
9270 save_lmf/restore_lmf opcodes.
9272 * threads.c (mono_threads_install_notify_pending_exc): New function to
9273 install a callback notifying the JIT there is a pending exception on a thread.
9274 (mono_thread_request_interruption): Call the new callback.
9275 (mono_thread_get_and_clear_pending_exception): New function to return the
9276 exception pending on a thread.
9278 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
9279 to turn off checking for pending exceptions.
9280 (mono_marshal_get_native_wrapper): Ditto.
9282 2008-01-16 Zoltan Varga <vargaz@gmail.com>
9284 * threads-types.h: Get rid of the unnecessary extern declarations.
9286 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
9288 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
9289 return field from parent class if not private.
9290 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
9291 returns fields from parent class if they are not private.
9292 (method_nonpublic): added function to determine if a given method
9293 should be considered non-public. Returns false for private methods
9294 on parent class, and internal methods from parent on the 1.0 profile.
9295 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
9296 use method_nonpublic function to determine whether method should be
9298 (property_accessor_public): use newly introduced method_nonpublic
9299 function to determine whether accessor is non-public.
9300 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
9301 event from parent class if not private. Only return static event if
9302 Static flag is set, and only return static event from parent class if
9303 FlattenHierarchy flag is set.
9304 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
9305 include non-private events from parent class.
9307 2008-01-16 Zoltan Varga <vargaz@gmail.com>
9309 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
9312 2008-01-16 Wade Berrier <wberrier@novell.com>
9314 * security.c: Add assembly.h header to appease some warnings
9316 2008-01-16 Dick Porter <dick@ximian.com>
9318 * process.c (process_module_string_read): Remove trailing null
9321 2008-01-16 Mark Probst <mark.probst@gmail.com>
9323 * class-internals.h: A new data structure describing the layout of
9324 a runtime generic context (MonoRuntimeGenericContextTemplate).
9326 * metadata-internals.h: Added a hash table to MonoDomain that maps
9327 from open generic classes to their runtime generic context
9330 * object.c: Building of the runtime generic context, including
9331 proper handling of generic type arguments of superclasses.
9332 Building of the runtime generic context according to the template.
9334 2008-01-15 Zoltan Varga <vargaz@gmail.com>
9336 * class.c (mono_class_setup_fields): Set field.count for generic instances.
9339 * image.c (do_mono_image_open): Pass TRUE as last_exists to
9340 mono_portability_find_file (). Fixes #325466.
9341 (mono_image_get_public_key): Fix a warning.
9343 2008-01-14 Zoltan Varga <vargaz@gmail.com>
9345 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
9347 (mono_class_from_name_case): Ditto.
9349 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
9351 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
9352 common storage for the tables used in the System/NumberFormatter class.
9354 2008-01-13 Zoltan Varga <vargaz@gmail.com>
9356 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
9358 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
9360 * verify.c (get_boxable_mono_type): check if the token is valid.
9362 * verify.c (set_stack_value): changed to add an error if an
9363 invalid type is set on stack. Changed all callers due to signature change.
9365 * verify.c (do_stobj): implement stobj validation.
9367 2008-01-11 Zoltan Varga <vargaz@gmail.com>
9369 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
9370 set container->is_method, it was set earlier.
9372 * metadata.c (type_in_image): Handle MVARs which belong to not finished
9375 * reflection.c (mono_reflection_initialize_generic_parameter): Set
9376 is_method of the generic container to TRUE for methods.
9378 2008-01-10 Zoltan Varga <vargaz@gmail.com>
9380 * metadata.c (type_in_image): Handle type parameters properly.
9382 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
9383 memory ownership of this structure.
9385 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
9387 * verify.c (get_boxable_mono_type): make typedref types been just
9388 unverifiable. check for void type.
9390 * verify.c (do_unbox_any): added, verify opcode unbox.any.
9392 * verify.c (do_load_function_ptr): accept method spec tokens.
9394 2008-01-10 Zoltan Varga <vargaz@gmail.com>
9396 * marshal.c (mono_class_native_size): Always set *align even if this is called
9399 2008-01-09 Zoltan Varga <vargaz@gmail.com>
9401 * verify.c (mono_verify_corlib): Remove this as it was not used and was
9404 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
9406 * verify.c: removed some old unused tables. A huge bunch of small fixes
9407 to things found while testing the verifier with mono basic.
9409 * verify.c (dump_stack_value): dump null literal flag to.
9411 * verify.c (verify_type_compatibility_full): fix comparison
9412 for types that have a generic super type.
9414 * verify.c (verify_stack_type_compatibility): fix compatibility
9415 between null literals and reference types. fix compatibility between
9416 boxed valuetypes and object. fix corner case test for enums.
9418 * verify.c (do_cmp_op): proper verification of cgt.un in case
9421 * verify.c (do_invoke_method): fix error message.
9423 * verify.c (do_store_indirect
9425 * verify.c (check_is_valid_type_for_field_ops): proper verification
9426 of managed pointers to valuetypes and boxed valuetypes. proper verification
9429 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
9430 allow token to be a reference type.
9432 * verify.c (do_cast): proper handling of boxes valuetypes.
9434 * verify.c (do_stelem): proper handling of storing a boxed valuetype
9437 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
9438 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
9439 fixed the decoding of unbox_any
9441 2008-01-08 Zoltan Varga <vargaz@gmail.com>
9443 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
9445 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
9447 * verify.c (do_newobj): do delegate verification.
9449 * verify.c (verify_delegate_compatibility): perform delegate
9452 * verify.c (verify_ldftn_delegate): perform tests related to
9455 * verify.c (mono_delegate_signature_equal): perform the
9456 slightly diferent signature comparison required by delegates.
9458 * metadata.c (mono_metadata_type_equal_full): added and exported
9459 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
9460 allows signature only comparison.
9462 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
9465 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
9467 * verify.c: added a bunch of stack_slot_* functions to
9468 make access to stack slot type easier. This is required to
9469 allow optional flags, like null literal, boxed value and
9471 All access paths to IlStackDesc::stype have been changed
9472 to use these new funcions.
9473 Removed a bunch of unused functions and cleared all warnings.
9474 This patch introduces the usage of the this pointer and
9477 2008-01-07 Zoltan Varga <vargaz@gmail.com>
9479 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
9481 2008-01-06 Zoltan Varga <vargaz@gmail.com>
9483 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
9484 match managed version.
9486 * appdomain.c: Bump corlib version.
9488 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
9491 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
9493 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
9494 Set public key token to zero-length byte array if assembly is not
9497 2008-01-05 Zoltan Varga <vargaz@gmail.com>
9499 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
9500 writing a vtype array elem.
9502 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
9504 * assembly.c (build_assembly_name): return FALSE if length of token is
9505 not 16 (if not "null").
9506 (mono_assembly_name_parse_full): return FALSE if value of version,
9507 culture, token or key is 0.
9508 * icall.c (fill_reflection_assembly_name): add boolean arguments to
9509 specify whether public key and public key token must be set to default
9510 value (zero-length byte array) if not available. Set versioncompat to
9511 SameMachine. If public key is available or the default is set, then
9513 (ves_icall_System_Reflection_Assembly_FillName): if no public key
9514 is available, use empty byte array as default value. On the 2.0
9515 profile, use default value for public key token if not set.
9516 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
9517 profile, use default value for public key if not set. On the 2.0
9518 profile, use default value for public key token if not set.
9519 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
9520 default values for public key and public key token.
9522 2008-01-05 Zoltan Varga <vargaz@gmail.com>
9524 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
9525 field to keep it in synch with the managed object.
9527 * marshal.c (emit_marshal_object): Add support for byref marshalling of
9528 delegates. Fixes #351520.
9530 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
9531 contains defined memory.
9533 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
9535 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
9537 * sgen-gc.c (check_consistency): New helper function to do a consistency check
9538 of the GC data structures.
9540 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
9542 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
9544 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
9546 (mono_array_clone_in_domain): Ditto.
9547 (mono_array_clone_in_domain): Ditto.
9549 * threads.c (start_wrapper): Register the thread start argument as a GC root.
9550 (cache_culture): Use a write barrier.
9552 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
9553 (ves_icall_get_property_info): Ditto.
9555 * object.h (MONO_STRUCT_SETREF): New macro.
9557 * class-internals.h (MonoStats): Add some GC statistics.
9559 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
9561 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
9563 * exception.c (mono_exception_from_name_two_strings):
9564 Break from loop after method is found.
9566 2008-01-04 Dick Porter <dick@ximian.com>
9568 * process.c (process_module_string_read): Rename variable to
9569 reflect correct usage, after fixing bug 345972.
9571 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
9573 * verify.c (mono_type_create_fnptr_from_mono_method):
9574 created a MonoType function pointer instance to be used during
9575 verification. The verifier releases this memory at end.
9577 * verify.c (mono_method_is_constructor): extracted repeated
9578 checks for constructor into a single class.
9580 * verify.c (do_push_field): use new extracted method
9581 for constructor check.
9583 * verify.c (do_newobj): same.
9585 * verify.c (do_ldftn): renamed to do_load_function_ptr
9586 and make it verify ldvirtftn too.
9588 * verify.c (mono_method_verify: proper verification
9589 of ldvirtftn. release created MonoMethod instances.
9591 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
9593 * verify.c (token_bounds_check): added.
9595 * verify.c (do_ldftn): added.
9597 * verify.c (mono_method_verify): proper verificartion of ldftn.
9599 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
9601 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
9602 than the table row count. It's the resposibility of the caller to
9603 make the bounds check and raise the correct error.
9605 * metadata.c (mono_metadata_decode_row_col): Same.
9607 * loader.c (mono_get_method_from_token): perform bounds check
9608 on token for methoddef table.
9610 2007-12-29 Miguel de Icaza <miguel@novell.com>
9613 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
9614 assert into a negative result, the managed code already coped with
9617 Some folks on Windows reported this error.
9619 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
9621 * appdomain.c: Bump corlib version.
9623 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
9624 CultureInfo.CreateCulture to create CultureInfo for name.
9625 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
9626 create CultureInfo for name. Fixes bug #347174.
9628 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
9630 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
9633 * verify.c (is_valid_branch_instruction): allow branching to the
9634 first instruction of the protected block.
9636 * verify.c (is_valid_cmp_branch_instruction): same.
9638 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
9639 avoid double initialization.
9641 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
9642 detect which cases the eval stack should just be copied.
9644 * verify.c (mono_method_verify): check if the eval stack
9645 is empty when entering a protected block.
9647 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
9649 * verify.c: added is_clause_in_range, is_clause_inside_range,
9650 is_clause_nested and verify_clause_relationship. They perform
9651 the verifications stated in P1 12.4.2.7.
9653 * verify.c (mono_method_verify): remove some unused variables,
9654 add the new exception clause checks, add instruction border
9655 checks for protected block start/end, improved some error
9656 messages and fixed a bug in the way invalid instruction access
9659 2007-12-26 Zoltan Varga <vargaz@gmail.com>
9661 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
9662 from GC 7.0 if available.
9664 * object.c: Remove an unused define.
9666 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
9668 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
9670 * null-gc.c (mono_gc_make_descr_for_array): Implement.
9672 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
9674 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
9675 to take the same arguments as the other make_descr functions.
9677 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
9679 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
9682 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
9685 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
9688 * boehm-gc.c (mono_gc_register_root): Fix a warning.
9690 * null-gc.c (mono_gc_register_root): Fix a warning.
9692 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
9694 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
9695 (mono_gc_base_init): Call GC_init ().
9697 * null-gc.c: Define mono_gc_register_root () as a no-op.
9699 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
9701 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
9703 * verify.c: add prototype for merge_stacks at top
9705 * verify.c (do_switch): added.
9707 * verify.c (merge_stacks): on some cases the stack merging
9708 was not happening properly. Unequal stack sizes at merge
9709 points should be invalid.
9711 * verify.c (mono_method_verify): added more debug info on stack state.
9712 verify switch properly.
9714 2007-12-24 Zoltan Varga <vargaz@gmail.com>
9716 * method-builder.h: New file, moved the mono_mb_ declarations here from
9719 * boehm-gc.c marshal.c: Include method-builder.h.
9721 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
9723 * marshal.c: Remove some code which is now in method-builder.c.
9725 2007-12-23 Zoltan Varga <vargaz@gmail.com>
9727 * method-builder.c: New file, extraction of the method builder functionality
9730 * marshal.c: Move the mb functions into method-builder.c.
9732 * marshal.h marshal.c: Export some mono_mb_... functions.
9734 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
9736 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
9739 * class.c (mono_class_get_full): Check the token type in the dynamic case.
9741 * loader.c (mono_field_from_token): Ditto.
9743 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
9746 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
9749 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
9750 a helper function for setting it.
9752 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
9755 * assembly.c: Significally simplify code now that referenced assemblies are
9756 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
9758 * threads.h: Don't include the internal threads-types.h header file. Fixes
9761 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
9763 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
9764 instructions that were target of branches or are at protected block boundaries.
9766 * verify.c (in_same_block): handle filter clauses.
9768 * verify.c (is_valid_branch_instruction): added. checks the target of
9769 instructions br or brtrue/false.
9771 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
9772 binary branch instructions such as beq and bge.
9774 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
9775 and made it pin the instruction as been part of the exception block.
9777 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
9780 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
9783 * verify.c (do_ret): ret from a protected block is unverifiable and
9786 * verify.c (do_static_branch): verify br and br.s instructions.
9788 * verify.c (merge_stacks): add extra param to support detection
9789 of branches in the middle of instructions.
9791 * verify.c (mono_method_verify): verify branches and exception blocks
9792 that target the middle of instructions. Proper verification of br and br.s.
9794 2007-12-21 Zoltan Varga <vargaz@gmail.com>
9796 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
9797 skip_visibility field.
9798 (reflection_methodbuilder_from_dynamic_method): Ditto.
9800 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
9801 registrations. Fixes #348193.
9803 * threads.h: Move the internal mono_thread_get_pending_exception () to
9804 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
9806 2007-12-20 Zoltan Varga <vargaz@gmail.com>
9808 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
9809 icall registration. Fixes #348193.
9811 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
9812 for corlib classes into object. Fixes #349621.
9814 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
9816 * icall.c (property_accessor_nonpublic): new function to determine
9817 whether an accessor allows a property to be considered non-public.
9818 Returns false for private accessor(s) from parent class, and internal
9819 accessor(s) from parent on 2.0 profile (and higher).
9820 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
9821 to determine whether property should be included if NonPublic flag
9822 is set. Fixes bug #349078.
9824 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
9826 * verify.c (init_stack_with_value): added.
9828 * verify.c (mono_method_verify): extracted common
9829 code for exception initialization into init_stack_with_value.
9831 * verify.c (mono_method_verify): initialize the exception
9832 for handler clauses as well.
9834 * verify.c (mono_method_verify): fix the exception clause
9835 ordering rules, it should use handler end offset and not
9838 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
9840 * rawbuffer.c: remove useless warning.
9842 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
9844 * threads.h, threads-types.h: move functions to the correct header
9847 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
9849 * verify.c (mono_method_verify): proper verification
9850 of exception handling clauses ranges and fallthru in
9851 and out of protected blocks.
9853 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
9855 * verify.c (mono_method_verify): fixed compilation issue.
9857 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
9859 * verify.c (mono_method_verify): a printf slipped in, changed
9860 to use verifier debug macro.
9862 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
9864 * verify.c (is_correct_leave): check for filter clauses.
9866 * verify.c (do_filter): added.
9868 * verify.c (mono_method_verify): property verification of leave.
9871 2007-12-18 Mark Probst <mark.probst@gmail.com>
9873 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
9874 Win32 build, until we figure out how to do the proper thing on
9877 2007-12-17 Zoltan Varga <vargaz@gmail.com>
9879 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
9880 by the previous patch.
9882 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
9883 the assembly resolve handler for refonly assemblies.
9885 2007-12-17 Mark Probst <mark.probst@gmail.com>
9887 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
9888 Make sure only one thread is allowed to commence shutdown, and
9889 don't allow new threads to be started once shutdown is in
9892 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
9894 * verify.c (is_correct_endfilter): added.
9896 * verify.c (is_unverifiable_endfilter): added.
9898 * verify.c (do_endfilter): added.
9900 * verify.c (mono_method_verify): property verification of endfilter
9901 and fixed a corner case or endfinally.
9903 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
9905 * verify.h: new flags to support fail fast of unverifiable code and
9906 do non-strict verification. Non-strict verification is required to
9907 have MS runtime compatibility. There are a huge amount of unverifiable
9908 code that it accepts as verifiable. The strict mode verifies the code
9910 Non-strict mode will be required in cases where code needs to be
9911 accepted as verifiable but fails under strict mode.
9913 * pedump.c: added support to fail fast and non-strict verification.
9915 * verify.c: added support for both fail fast and non-strict verification.
9917 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
9919 * verify.c (is_correct_endfinally): added.
9921 * verify.c (mono_method_verify): property verification of endfinally.
9923 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
9925 * verify.c (in_any_block): check for filter clauses.
9927 * verify.c (is_correct_rethrow): added.
9929 * verify.c (mono_method_verify): property verification of rethrow.
9931 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
9933 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
9935 * verify.c (do_throw): added.
9937 * verify.c (mono_method_verify): property verification of throw
9939 2007-12-11 Zoltan Varga <vargaz@gmail.com>
9941 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
9942 assemblies. Fixes #346425.
9944 2007-12-10 Zoltan Varga <vargaz@gmail.com>
9946 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
9949 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
9951 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
9952 prevent asserts when this is called with a token which might not be valid.
9954 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
9955 lookup_dynamic_token_class with valid_token == FALSE.
9957 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
9959 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
9961 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
9963 2007-12-10 Mark Probst <mark.probst@gmail.com>
9965 * gc.c: Don't delay threadpool thread finalization unless Mono is
9968 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9970 * threads.c: turn an assert into a non-fatal warning.
9972 2007-12-09 Robert Jordan <robertj@gmx.net>
9974 * icall.c (GetVirtualMethod): Add missing argument validation.
9976 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
9978 * verify.c (do_cast): added.
9980 * verify.c (mono_method_verify): property verification of castclass and isinst.
9983 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
9985 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
9987 * verify.c (do_stelem): added.
9989 * verify.c (mono_method_verify): property verification of stelem.X.
9991 2007-12-07 Mark Probst <mark.probst@gmail.com>
9993 * class.c, class-internals.h: Introduce an environment variable
9994 (MONO_GENERIC_SHARING) through which the extent of generic code
9995 sharing can be controlled (share all classes, share only corlib
9996 classes, or share nothing).
9998 * object.c: Only create runtime generic context for classes for
9999 which sharing is enabled.
10001 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10003 * verify.c (do_ldelem): refactor it to work with ldelem.any.
10005 * verify.c (mono_method_verify): property verification of ldelem.any.
10007 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10009 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
10010 added ldelem.X opcodes.
10012 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
10014 * verify.c: proper verification of ldelem.X
10016 2007-12-06 Zoltan Varga <vargaz@gmail.com>
10018 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
10020 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
10022 * verify.c (mono_method_verify): null literal requires special handling,
10023 the value pushed on stack need to be flagged as so.
10025 * verify.c (do_ldelema): Verify ldelema properly.
10027 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
10029 * verify.c: Verify ldlen properly.
10031 2007-12-05 Zoltan Varga <vargaz@gmail.com>
10033 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
10034 to the target object's type. Fixes #346160.
10036 2007-12-05 Dick Porter <dick@ximian.com>
10038 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
10039 Solaris needs the same workaround as BSD-derived systems. Fixes
10040 bug 323524, patch by Burkhard Linke
10041 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
10043 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
10045 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
10046 handle to use when error dialog is shown; otherwise, update mask
10047 to show no error dialog when an error occurs.
10049 2007-12-03 Zoltan Varga <vargaz@gmail.com>
10051 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
10053 * class.c (mono_class_get_field_default_value): New helper function to initialize
10054 field->def_type and field->data.
10056 2007-11-30 Zoltan Varga <vargaz@gmail.com>
10058 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
10061 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
10063 * marshal.c: Avoid depending on delegate->method_info being set.
10065 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
10067 * object.c (mono_delegate_ctor): Set delegate->method.
10069 * object-internals.h (struct _MonoDelegate): Add 'method' field.
10071 * appdomain.c: Bump corlib version.
10073 2007-11-27 Raja R Harinath <harinath@gmail.com>
10075 * metadata.c (mono_generic_inst_equal_full): Short-circuit
10076 equality check if we're comparing canonicalized MonoGenericInsts.
10078 2007-11-23 Zoltan Varga <vargaz@gmail.com>
10080 * class.c (generic_array_methods): Call mono_class_setup_methods () before
10081 accessing class->methods.
10083 2007-11-22 Dick Porter <dick@ximian.com>
10085 * threads.c: Ensure that the synch_cs is set before trying to use
10088 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
10090 * profiler.c: r89126 broke the statistial profiler, unbreak.
10092 2007-11-22 Martin Baulig <martin@ximian.com>
10094 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
10097 (mono_debug_debugger_version): Bump to 3.
10098 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
10099 -> mono_debugger_class_initialized().
10101 * mono-debug-debugger.c
10102 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
10105 (mono_debugger_start_class_init_func): Removed.
10106 (mono_debugger_class_loaded_methods_func): Added.
10107 (mono_class_setup_methods): Call it here.
10109 2007-11-22 Martin Baulig <martin@ximian.com>
10112 (mono_debug_add_delegate_trampoline): New public method.
10113 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
10116 (MonoSymbolTable): Added `global_data_table'.
10117 (MonoDebuggerTypeKind): Removed.
10119 2007-11-21 Zoltan Varga <vargaz@gmail.com>
10121 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
10124 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10126 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
10128 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
10130 2007-11-20 Martin Baulig <martin@ximian.com>
10132 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
10134 * mono-debug-debugger.c
10135 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
10136 (mono_debugger_remove_breakpoint): Likewise.
10137 (mono_debugger_check_breakpoints): Likewise.
10138 (mono_debugger_register_class_init_callback): New public method.
10139 (mono_debugger_remove_class_init_callback): Likewise.
10140 (mono_debugger_add_type): Likewise.
10142 * mono-debug-debugger.h
10143 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
10145 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
10147 * class.c: more interface implementations needed for the
10148 array enumerator (fixes bug #341112).
10150 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
10152 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
10153 fix ParamName of ArgumentNullExceptions.
10155 2007-11-17 Miguel de Icaza <miguel@novell.com>
10157 * reflection.c (mono_reflection_encode_sighelper): Generate the
10158 modopts and modreqs. I have a useless test that crashes monodis,
10159 but that shows the code working.
10161 2007-11-17 Zoltan Varga <vargaz@gmail.com>
10163 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
10164 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
10166 2007-11-15 Dick Porter <dick@ximian.com>
10168 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
10169 When joining a thread, it's the thread that's calling Join that
10170 gets WaitSleepJoin state not the target. Fixes the standalone
10171 test case in bug 334740, and hopefully the whole bug too.
10173 2007-11-15 Dick Porter <dick@ximian.com>
10175 * process.c: Read file version info from the files pointed at by
10176 process modules, not the current process. Fixes bug 315969.
10178 Use windows typedef names in some places to fix warnings on the
10181 2007-11-15 Mark Probst <mark.probst@gmail.com>
10183 * image.c, metadata-internals.h: Added a generic_class_cache hash
10184 to MonoImage for looking up generic classes when sharing generics.
10186 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10188 * sgen-gc.c: warning cleanups.
10190 2007-11-15 Zoltan Varga <vargaz@gmail.com>
10192 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
10193 inherited properties.
10195 2007-11-14 Mark Probst <mark.probst@gmail.com>
10197 * object.c, class-internals.h: Added more information to the
10198 runtime generic context.
10200 2007-11-13 Zoltan Varga <vargaz@gmail.com>
10202 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
10203 instead of just the target method. Generalize the abstract method handling to
10204 handle any non-static method.
10206 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10207 mono_marshal_get_delegate_invoke () signature change.
10209 2007-11-13 Mark Probst <mark.probst@gmail.com>
10211 * class.c, class-internals.h: Made
10212 mono_type_get_basic_type_from_generic () public. Fixed member
10213 access check for shared generics.
10215 * loader.c: Don't insert field into field cache if it's part of a
10216 non-inflated generic class.
10218 * domain.c, domain-internals.h: The generic sharing context is now
10219 part of the jit info data structure. Added two accessor
10222 2007-11-12 Zoltan Varga <vargaz@gmail.com>
10224 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
10225 the array Get/Set/Address methods, since the JIT inlines them.
10227 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
10229 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
10230 (mono_image_init): Initialize runtime_invoke_direct_cache.
10232 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10233 mono_marshal_get_delegate_invoke signature change.
10235 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
10236 an additional argument. Add support for invoking abstract methods.
10238 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
10240 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
10242 2007-11-09 Mark Probst <mark.probst@gmail.com>
10244 * class.c: Do field layout for open generic classes as well.
10246 2007-11-09 Mark Probst <mark.probst@gmail.com>
10248 * gc.c, gc-internal.h: Don't finalize threadpool threads with
10249 other objects, because the threadpool is still around. Put them
10250 in a list instead and after finalizing all other objects in the
10251 root domain shut down the thread pool and then finalize the
10252 threads. Fixes bug #337383.
10254 * threads.c, thread-types.h: New mono_thread_create_internal()
10255 function for marking a thread with the threadpool flag before it
10256 started. Set synch_cs to NULL after freeing it.
10258 * threadpool.c: Mark threadpool threads before they start.
10260 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10262 * reflection.h, reflection.c: don't export random functions
10263 and lazy load dbnull and missing objects.
10265 2007-11-07 Jonathan Chambers <joncham@gmail.com>
10267 * class.c: Initialize COM types if COM interfaces
10268 are present (not just COM classes).
10270 Code is contributed under MIT/X11 license.
10272 2007-11-07 Massimiliano Mantione <massi@ximian.com>
10274 create_dynamic_mono_image: hook module profiler events (dynamic case).
10275 mono_image_basic_init: hook assembly profiler events (dynamic case).
10277 2007-11-07 Massimiliano Mantione <massi@ximian.com>
10279 simple_appdomain_unload: completely terminate the profiler
10280 instead of only processing the statistical samples.
10281 simple_shutdown: make sure this is really called exactly once,
10282 even in multithreaded applications, and always listen to
10284 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
10285 here, the "[un]load" functions will do it.
10286 Fixes bugs #333791 and #325261.
10288 2007-11-07 Geoff Norton <gnorton@novell.com>
10290 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
10291 rather than depend on __APPLE__.
10293 2007-11-07 Mark Probst <mark.probst@gmail.com>
10295 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
10297 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
10299 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
10300 UTF16 MonoString. Fix the crash from bug #335488
10302 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
10304 * marshal.c: Correct (for non-Win32 OS) length != size in
10305 mono_string_from_bstr. Fix #339530.
10307 2007-11-06 Geoff Norton <gnorton@novell.com>
10309 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
10312 2007-11-05 Kornél Pál <kornelpal@gmail.com>
10314 * process.c: Added run-time GetProcessId API detection for Windows.
10316 2007-11-04 Miguel de Icaza <miguel@novell.com>
10318 * reflection.c (mono_param_get_objects): If a parameter has the
10319 attribute [System.Runtime.InteropServices.Optional] we should
10320 set the DefaultValue of the ParameterInfo to be
10321 System.Reflection.Missing instead of DBNull.
10325 (mono_get_reflection_missing_object): New method,
10326 returns the System.Reflection.Missing.Value singleton instance.
10328 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
10330 * culture-info-table.h : regenerated.
10332 2007-11-02 Jonathan Chambers <joncham@gmail.com>
10334 * icall.c: Use GetEnvironmentStrings on windows
10335 so we are using the same environment block as
10336 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
10339 Code is contributed under MIT/X11 license.
10341 2007-10-31 Martin Baulig <martin@ximian.com>
10343 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
10345 * mono-debug-debugger.h
10346 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
10348 2007-10-30 Zoltan Varga <vargaz@gmail.com>
10350 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
10353 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
10355 * culture-info-table.h : regenerated.
10357 2007-10-30 Robert Jordan <robertj@gmx.net>
10359 * icall-def.h, icall.c:
10360 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
10362 Code is contributed under MIT/X11 license.
10364 2007-10-29 Zoltan Varga <vargaz@gmail.com>
10366 * class.c (mono_class_setup_vtable): Find the inflated methods in the
10367 inflated class instead of inflating them again.
10369 * class.c (mono_class_setup_vtable): Inflate the override methods in the
10372 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
10373 Call setup_supertypes () after klass->parent is set.
10374 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
10376 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
10377 for inflated instances of not yet created dynamic generic classes.
10378 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
10379 times from inflated_method.
10380 (methodbuilder_to_mono_method): Ditto.
10382 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
10384 * gc.c: code cleanup and removed old untested option of not creating the
10387 2007-10-29 Zoltan Varga <vargaz@gmail.com>
10389 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
10390 creating a jump trampoline for dynamic methods.
10392 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
10394 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
10395 generic TypeBuilders when called from another method of the same type (bug #335131).
10398 2007-10-27 Zoltan Varga <vargaz@gmail.com>
10400 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
10401 doesn't seem to work perfectly.
10403 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
10404 called multiple times.
10405 (methodbuilder_to_mono_method): Ditto.
10406 (resolve_object): Inflate FieldBuilder's.
10408 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10410 * string-icalls.c, string-icalls.h, appdomain.c: patch from
10411 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
10412 RemoveEmptyEntries in the string.Split implementation (bug #322375).
10414 2007-10-26 Dick Porter <dick@ximian.com>
10416 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
10417 Thread initialisation changes
10419 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
10421 * verify.c: fix compatibility check between arrays and System.Array
10423 2007-10-26 Zoltan Varga <vargaz@gmail.com>
10425 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
10426 too. Fixes #336999.
10428 2007-10-25 Zoltan Varga <vargaz@gmail.com>
10430 * object.c (mono_value_box): Use typed allocation here.
10432 2007-10-23 Zoltan Varga <vargaz@gmail.com>
10434 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
10435 trampoline instead of compiling the method right away.
10437 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
10439 2007-10-21 Zoltan Varga <vargaz@gmail.com>
10441 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
10442 related fields for dynamic classes. Fixes #334493.
10444 2007-10-20 Zoltan Varga <vargaz@gmail.com>
10446 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
10448 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
10450 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
10451 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
10453 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
10455 * reflection.c (create_generic_typespec): Initialize klass->generic_container
10457 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
10459 2007-10-18 Jonathan Chambers <joncham@gmail.com>
10461 * marshal.c: Use correct key when removing item
10464 Code is contributed under MIT/X11 license.
10466 2007-10-17 William Holmes <billholmes54@gmail.com>
10468 *marshal.c: Adding a case to marshal booleans to U1
10470 Code is contributed under MIT/X11 license.
10472 2007-10-18 Zoltan Varga <vargaz@gmail.com>
10474 * class.c (mono_class_from_name): Search the modules compromising dynamic
10475 assemblies. Fixes #331601.
10477 2007-10-16 Zoltan Varga <vargaz@gmail.com>
10479 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
10480 exception if the type name contains an assembly component. Fixes #334203.
10482 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
10483 modules inside dynamic assemblies. Fixes #334200.
10485 * reflection.c: Set image->public_key and image->public_key_length;
10487 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
10490 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
10492 2007-10-16 Mark Probst <mark.probst@gmail.com>
10494 * metadata.c: Implemented correct comparing of generic classes.
10495 An inflated generic class can be equal to a non-inflated one if it
10496 is inflated with generic type variables as type arguments. Fixes
10499 2007-10-15 Dick Porter <dick@ximian.com>
10501 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
10502 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
10505 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
10506 instead of a monitor lock. This means that monitor_try_enter and
10507 co can set the thread state safely.
10508 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
10509 thread_interrupt_requested, so interrupt actually works.
10511 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
10512 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
10513 state accessor function
10515 2007-10-15 Martin Baulig <martin@ximian.com>
10518 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
10519 the debugger with the current runtime.
10521 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
10523 * object.c, object-internals.h: added the ability to set a single
10524 trampoline for all the slots in a vtable.
10526 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10528 * marshal.c: deal with a possible race condition during multicast
10529 delegate invocation.
10531 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10533 * class.c: ensure value type methods don't have the synchronized
10536 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
10538 * string-icalls.c, string-icalls.h: reverted unapproved patch that
10541 2007-10-11 Joel Reed <joelwreed@comcast.com>
10543 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
10544 to take an options parameter so that empty entries can be removed during
10545 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
10547 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10549 * marshal.c: make sure we don't store the signature from a dynamic
10550 method into the runtime invoke cache (bug #327189).
10552 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10554 * marshal.c: make sure the wrapper methods are properly initialized.
10556 2007-10-11 Mark Probst <mark.probst@gmail.com>
10558 * metadata.c, metadata-internals.h: Generalized
10559 mono_type_stack_size() to mono_type_stack_size_internal() which
10560 takes an additional argument specifying whether it allows open
10563 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
10565 * verify.c (do_invoke_method): handle typedbyref params
10566 correctly and check for unverifiable return values.
10568 * verify.c (do_newobj): fix a warning.
10570 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
10572 * verify.c: don't tread typedbyref as allways unverifable,
10573 so uses, like (ld/st)loc.0 are valid. verify for the cases
10574 that it matters, like boxing related operations.
10576 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
10578 * verify.c: add verification of the newobj opcode. verification
10579 of delegate instantation still missing due ldftn and virldftn not
10580 pushing the function type on stack
10582 2007-10-08 Mark Probst <mark.probst@gmail.com>
10584 * class-internals.h: Runtime generic context data structure
10587 * object.c: Initialization of runtime generic context at runtime
10588 vtable creation time.
10590 2007-10-08 Massimiliano Mantione <massi@ximian.com>
10591 * class.c (mono_class_create_from_typedef,
10592 mono_class_from_generic_parameter, mono_ptr_class_get,
10593 mono_fnptr_class_get, mono_bounded_array_class_get)
10594 * domain.c (mono_domain_create, mono_domain_free)
10595 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
10596 * image.c (do_mono_image_load, mono_image_close):
10597 Hooked up load-unload profiler events.
10599 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10601 * domain.c: track statistics about the actual amount of native code
10604 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
10606 * class.c: the valuetype enumerators don't have the additional
10607 supertypes interfaces.
10609 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10611 * class.c: need more interfaces setup for the IEnumerator<T>
10612 object created for arrays (tests/ienumerator-interfaces.2.cs).
10614 2007-10-05 Zoltan Varga <vargaz@gmail.com>
10616 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
10618 2007-10-05 Alp Toker <alp@atoker.com>
10620 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
10621 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
10624 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
10626 * verify.c (verify_type_compatibility_full): verification of
10627 compatibility improved, validates correctly non-strict checks between
10628 native int and I4 types different than (unsigned)int32.
10630 * verify.c (do_store_indirect): added, do all verification of
10633 * verify.c (get_load_indirect_mono_type): renamed to
10634 get_indirect_op_mono_type, as it now returns the MonoType for
10635 ldind.X and stind.X opcodes.
10637 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
10639 * reflection.c: Fix the encoding of generic type definition for
10642 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
10643 mono_image_typedef_or_ref but allows to specify if typespec lookups should
10644 be made. Typespec check is done prior to typeref cache lookup.
10646 * reflection.c (mono_image_typedef_or_ref): now just delegate to
10647 mono_image_typedef_or_ref_full.
10649 * reflection.c (encode_generic_class): encode the generic class
10650 directly instead of calling encode_type.
10652 * reflection.c (encode_type): encode the generic type definition
10653 MonoClass as a generic instantiation.
10655 * reflection.c (create_typespec): cache typespec tokens in
10656 the assembly->typespec cache. Don't create typespec for a generic
10657 instance MonoClass. Create typespec for the generic type defintion.
10659 * reflection.c (create_generic_typespec): encode the generic
10660 class directly instead of calling encode_type.
10662 * reflection.c (mono_image_create_token): encode the generic
10663 type definition not using a typespec for MonoType instances.
10666 2007-10-04 Raja R Harinath <rharinath@novell.com>
10669 * class.c (mono_image_init_name_cache): Don't return nested
10670 'protected internal' classes.
10671 (mono_class_from_name_case): Likewise.
10673 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
10675 * icall-def.h, icall.c : get_bundled_machine_config() is now the
10676 common function used by both DefaultConfig in System.dll and
10677 InternalConfigurationHost in System.Configuration.dll.
10679 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10681 * class.c: automatically add to vectors only a few essential explicit
10682 generic interfaces. The rest of the interfaces that arrays should
10683 provide are currently implicitly added (but still not lazily, see the
10684 design in the discussion of bug#325495 for the details of what is
10685 needed for that). Additionally, implicit interfaces are assigned the
10686 same vtable slot as the explicit interfaces (as they are compatible):
10687 this enables huge memory savings since we don't need to instantiate
10688 as many memthods and as large vtables anymore. Also, Since
10689 GetEnumerator<T> returns an instance of a type that is required to
10690 support a similarly large set of interfaces as arrays, we add
10691 implicit interfaces and interface offset sharing support to those
10692 types, too. This change adds all the required interfaces so that
10693 the anonarray.cs test case in the bug report works (we don't add
10694 all the interfaces to arrays of arrays 3-level deep and more because
10695 of the memory requirements explained in the bug and since they are much
10696 less common: the lazy-loading support will enabled them to work, too).
10698 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
10700 * verify.c (merge_stacks): major clean up, all type compatibility
10701 checks are done by verify_type_compatibility. This fix my earlier lack
10702 of understanding of the CLR type system and merge_stacks no longer looks
10705 * verify.c: fixed some bad spelling.
10707 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
10709 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
10710 a given stack slock.
10712 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
10713 verify_type_compatibility_full. This removed a near indentical function and fixed
10714 handling of Int32 and IntPtr across all opcodes.
10716 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
10718 * class.c: only vectors have the additional generic interfaces.
10720 2007-10-01 Jonathan Chambers <joncham@gmail.com>
10722 * mono-config.c: Use g_strcasecmp instead of
10723 strcasecmp like everywhere else to fix
10724 compilation with MSVC.
10726 Code is contributed under MIT/X11 license.
10728 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10730 * object.c, object-internals.h: refactored the IMT code to enable
10731 building a single slot at a time and lazily creating the IMT trampolines
10734 2007-09-29 Zoltan Varga <vargaz@gmail.com>
10736 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
10738 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
10741 2007-09-29 Raja R Harinath <harinath@gmail.com>
10743 * loader.c (method_from_methodspec): Rearrange to avoid
10744 un-necessary exposition. Don't assert out if the method's
10745 declaring type is a generic type definition.
10747 2007-09-28 Martin Baulig <martin@ximian.com>
10749 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
10751 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
10753 * class-internals.h: optimize field layout of MonoClass to
10754 requires less cachelines at runtime and save a few bytes on 64 bit
10757 2007-09-28 Jb Evain <jbevain@novell.com>
10759 * reflection.c: when encoding type names in custom attributes,
10760 if the type is a closed generic type, its generic arguments
10761 have to be serialized as AssemblyQualifiedName, so that when
10762 they are deserialized, it's possible to re-create them properly.
10766 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
10768 * object.c, class-internals.h: added delegate-creation counter.
10770 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
10772 * class.c: cleanup of the code that synthetizes interfaces for
10773 arrays in 2.0: saves quit a bit of corlib mempool memory.
10774 Code to fix bug #325495 ifdeffed out for now until the issues
10775 with memory usage and O(n^2) behaviour are fixed.
10777 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10779 * marshal.c: when possible, do not duplicate the name of the methods
10780 in the method builder and in the generated MonoMethod.
10782 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
10783 * verify.c: added support for type checking ldind_* opcodes.
10785 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
10787 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
10788 which is used to distinguish the fully open instantiation of a TypeBuilder
10789 with the rest. This temporary hack is required to restore the property that
10790 the fully open instantiation is the same type of the generic type definition.
10792 * class-internals.h (mono_generic_class_is_generic_type_definition):
10793 new function as part of the internal API.
10795 * class.c (inflate_generic_type): return NULL when the generic inst is
10796 fully open. The fully open generic type is now the same as the generic type
10797 definition for non TypeBuilder types.
10799 * class.c (mono_generic_class_get_class): removed assert since it is
10800 no longer valid, gklass->cached_class can point to the generic type definition.
10802 * class.c (mono_generic_class_is_generic_type_definition): new.
10804 * metadata.c (mono_generic_class_hash): added is_tb_open field
10805 to the hash calculation.
10807 * metadata.c (free_generic_class): if the generic class is associated
10808 with the generic type definition, its field will come from the mempool and
10811 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
10812 new, this function identifies the corner case of a TypeBuilder fully open
10815 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
10816 for lookup. Set gclass->cached_class to be the container class in case of
10817 the fully open instantiation of non TypeBuilder types.
10819 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
10820 to compare generic classes.
10822 * reflection.c (method_encode_methodspec): remove assert that
10823 no longer is valid.
10825 * reflection.c (mono_reflection_generic_class_initialize): add
10826 an aditional assert to ensure the proper type is used.
10828 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
10830 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
10833 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
10835 * verify.c (push_arg): Fixed support for ldarga
10836 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
10837 MonoType used as first arg in case of instance calls.
10839 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
10841 * verify.c: Support for verifying VAR and MVAR types,
10843 2007-09-25 Zoltan Varga <vargaz@gmail.com>
10845 * icall.c (ves_icall_get_property_info): Set the reflected type of the
10846 accessors correctly.
10848 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
10850 * threads.c: support OSX and other systems in
10851 mono_thread_get_stack_bounds (bug #328026).
10853 2007-09-25 Martin Baulig <martin@ximian.com>
10856 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
10858 2007-09-24 Martin Baulig <martin@ximian.com>
10861 (MonoDebugClassEntry): Moved the definition of this struct into
10862 mono-debug.c to make it private.
10865 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
10866 type table per symbol file, we don't need to store the symfile id
10869 2007-09-24 Martin Baulig <martin@ximian.com>
10871 Create one type table per symbol file, since a `MonoClass *' gets
10872 invalid when its image is unloaded.
10874 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
10875 (MonoDebugHandle): Added `type_table'.
10877 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
10879 * mempool.c, mempool.h: added mono_mempool_new_size () API
10880 to be able to specify a smaller initial size for the pool.
10881 Adjusted the code to slowly increase pool size before using
10882 the previous default size.
10883 * image.c: use a small initial size for image mempools.
10885 2007-09-23 Zoltan Varga <vargaz@gmail.com>
10887 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
10890 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
10891 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
10893 2007-09-22 Zoltan Varga <vargaz@gmail.com>
10895 * metadata.c (mono_type_create_from_typespec): Remove an invalid
10896 free. Fixes #327438.
10898 2007-09-21 Raja R Harinath <harinath@gmail.com>
10900 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
10901 generic instantiations, etc.
10902 <MONO_TYPE_ARRAY>: Likewise.
10904 2007-09-21 Martin Baulig <martin@ximian.com>
10906 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
10907 these structs were never defined.
10908 (MonoDebugHandle): Removed the `_priv' field, it was never used.
10910 2007-09-21 Martin Baulig <martin@ximian.com>
10912 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
10914 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
10916 * image.c: removed the guid hash tables: we can get the same info
10917 without the additional memory usage hit (partially fixes also bug #327052).
10919 2007-09-10 Massimiliano Mantione <massi@ximian.com>
10921 * profiler.h, profiler-private.h, profiler.c: add a new profiler
10922 event to handle unloading methods. After the event is called, the
10923 corresponding MonoMethod* must be considered invalid.
10924 * loader.c (mono_free_method): call the new mono_profiler_method_free
10927 2007-09-20 Mark Probst <mark.probst@gmail.com>
10929 * domain-internals.h: New flag in MonoJitInfo which marks shared
10930 generic methods. New hash table (shared_generics_hash) in
10931 MonoDomain to keep track of shared generic methods. Prototypes
10932 for functions to register and lookup shared generic methods.
10934 * domain.c: Support for registering and looking up shared generic
10935 methods via a hash table (shared_generics_hash) in MonoDomain.
10937 * class-internals.h: New exception to signal failure of shared
10938 compilation of a generic method. New counters for generics
10939 sharing in MonoStats.
10941 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
10943 * image.c, metadata-internals.h: don't keep a file descriptor open
10944 for loaded assemblies (bug#325988).
10946 2007-09-19 Raja R Harinath <rharinath@novell.com>
10948 * metadata.c (signature_in_image): New. Carve out of type_in_image.
10949 (ginst_in_image, gclass_in_image): Simplify. Change signature to
10950 use the corresponding datatypes.
10951 (type_in_image): Update to changes.
10952 (CleanForImageUserData): Simplify.
10953 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
10954 Avoid quadratic behaviour in handling the "stolen" list by
10955 separating the filter predicate out, and by prepending the stolen
10956 items rather than appending them.
10957 (steal_ginst_in_image): Likewise.
10958 (mono_metadata_clean_for_image): Update to changes.
10960 2007-09-19 Martin Baulig <martin@ximian.com>
10962 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
10964 2007-09-19 Martin Baulig <martin@ximian.com>
10966 * mono-debug.c (mono_debug_cleanup): Don't call
10967 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
10969 2007-09-19 Raja R Harinath <harinath@gmail.com>
10971 Fix crash on 'make run-test' in mcs/errors
10972 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
10973 Avoid more potential allocations in mono_class_from_mono_type.
10974 (ginst_in_image): Update to changes.
10975 (gclass_in_image): Rearrange slightly.
10977 2007-09-18 Zoltan Varga <vargaz@gmail.com>
10979 * class.c (mono_class_init): Move the code that sets up class->methods to
10980 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
10982 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
10983 canonical instance of an inflated generic signature.
10984 (mono_type_create_from_typespec): Remove an invalid free.
10986 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
10988 2007-09-18 Marek Habersack <mhabersack@novell.com>
10990 * domain-internals.h: added a declaration of the
10991 mono_assembly_load_full_nosearch internal function.
10993 * assembly.c (mono_assembly_load_with_partial_name): use
10994 mono_try_assembly_resolve return value properly.
10995 (mono_assembly_load_full_nosearch): copied the function body from
10996 mono_assembly_load_full, without the code to invoke assembly
10998 (mono_assembly_load_full): calls the above new function and if the
10999 assembly is not resolved, invokes the search hooks.
11001 * appdomain.c (mono_runtime_init): restore the global postload
11002 assembly search handlers.
11004 2007-09-18 Zoltan Varga <vargaz@gmail.com>
11006 * class.c (mono_class_init): Make sure class->methods and class->properties
11007 are never NULL in the generics case.
11009 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
11011 2007-09-17 Zoltan Varga <vargaz@gmail.com>
11013 * metadata.c (free_generic_class): Disable some code to fix the build.
11015 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
11017 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
11018 from the image mempool.
11020 * metadata.c (free_generic_class): Free more data from the inflated class.
11022 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
11024 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
11026 (mono_type_create_from_typespec): Ditto.
11028 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
11029 MonoImage to the caller.
11030 (mono_init_internal): Save the opened image in a global variable.
11031 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
11033 * reflection.c (resolve_object): Fix a leak.
11035 * metadata.c: Fix the freeing of data in the generics caches.
11037 * metadata.c (free_generic_inst): Comment this out to fix the build.
11038 (free_generic_class): Ditto.
11040 * metadata.c: Free cached generic methods, instantinations and classes when
11041 they are removed from the caches.
11042 (mono_metadata_free_type): Free the type itself.
11044 * class.c: Free the result of mono_class_inflate_generic_type () in a few
11047 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11049 * boehm-gc.c: restrict managed allocs to __thread supporting
11052 2007-09-16 Zoltan Varga <vargaz@gmail.com>
11054 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
11055 (mono_generic_class_get_class): Fix a leak.
11057 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
11058 mono_metadata_free_type ().
11059 (mono_metadata_inflate_generic_inst): Fix a leak.
11061 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11063 * mono-debug.c (free_header_data): Fix a leak missed earlier.
11065 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
11068 * mono-debug.c (mono_debug_close_image): Fix call to
11069 g_hash_table_remove ().
11071 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11073 * icall-def.h: redirect all the string ctor to the managed
11074 CreateString () methods.
11075 * string-icalls.c, string-icalls.h: removed dead code for string
11078 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11080 * mono-debug.c: Fix memory leaks.
11082 2007-09-14 Jonathan Chambers <joncham@gmail.com>
11084 * threads-types.h: Implement mono_hazard_pointer_set and
11085 mono_hazard_pointer_clear macros using do/while(0) to fix
11086 compilation with MSVC.
11088 Code is contributed under MIT/X11 license.
11090 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11092 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
11093 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
11095 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11097 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
11100 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11102 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
11103 managed-code allocated as well.
11105 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11107 * class.c (mono_class_is_assignable_from): Add support for generic variance.
11109 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
11111 * boehm-gc.c: fixed the build after the AOT changes.
11113 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11115 * wrapper-types.h: Add an ALLOC wrapper type.
11117 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
11118 reference managed allocator methods.
11120 2007-09-12 Marek Safar <marek.safar@gmail.com>
11122 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
11123 of Type array and not MonoType, a fix suggested by Hari.
11125 2007-09-12 Jonathan Chambers <joncham@gmail.com>
11127 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
11128 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
11130 Code is contributed under MIT/X11 license.
11132 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11134 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
11136 2007-09-12 Marek Habersack <mhabersack@novell.com>
11138 * image.c (do_mono_image_open): if assembly file fails to open and
11139 MONO_IOMAP is in effect, try to find the path in a
11140 case-insensitive way.
11142 * appdomain.c (mono_runtime_init): do not install postload hooks -
11143 tests show that MS.NET doesn't use anything of that sort to
11144 trigger the AppDomain.AssemblyResolve event.
11145 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
11147 (mono_runtime_init): init portability helpers here.
11149 * assembly.c (mono_assembly_load_with_partial_name): if other
11150 attempts fail, trigger the AppDomain.AssemblyResolve event handler
11151 to resolve the assembly.
11153 * domain-internals.h: added mono_try_assembly_resolve and marked
11156 2007-09-11 Jb Evain <jbevain@novell.com>
11158 * object-internals.h (MonoReflectionDynamicMethod): add
11159 a `MonoReflectionType *owner` field. The owner is used
11161 (mono_reflection_create_dynamic_method): use the owner of the dynamic
11162 method as the class declaring the dynamic method.
11163 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
11164 dynamic method to the declaring type of the methodbuilder.
11166 2007-09-11 Mark Probst <mark.probst@gmail.com>
11168 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
11169 rules for calling methods via reflection.
11171 2007-09-11 Zoltan Varga <vargaz@gmail.com>
11173 * reflection.c (resolve_object): Add support for MonoGenericClass.
11174 Inflate MonoType's.
11176 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11178 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
11179 provide a managed method that does fast allocations without needing
11180 a managed->unmanaged transition. Boehm GC implementation currently
11181 enabled for ptrfree objects on sane architectures.
11183 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11185 * marshal.c, marshal.h: exported a couple of useful functions and
11186 added mono_mb_get_label () to easily handle backward branches.
11188 2007-09-10 Zoltan Varga <vargaz@gmail.com>
11190 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
11192 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11194 * loader.c (find_method): Fixed the regression introduced while
11197 2007-09-09 Zoltan Varga <vargaz@gmail.com>
11199 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
11202 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
11203 icall.c reflection.c: Pass a MonoGenericContext argument to
11204 mono_lookup_dynamic_token ().
11206 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
11209 2007-09-09 Robert Jordan <robertj@gmx.net>
11211 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
11212 for generic methods.
11214 * object.c (mono_object_get_virtual_method): Handle generic methods.
11217 Code is contributed under MIT/X11 license.
11219 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11221 * image.c: fix locking in mono_image_load_file_for_image ().
11223 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
11225 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
11226 used only as a cache: added an icall to fill it.
11228 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
11230 * reflection.h: exposed mono_reflection_free_type_info
11231 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
11232 since mono_reflection_bind_generic_parameters makes a copy of it.
11233 * reflection.c (free_type_info): subinfos should be freed.
11234 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
11236 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
11237 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
11238 this fixes #82695 and #81726.
11241 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
11243 * process.h, process.c: added support for user profile/info in
11244 ProcessStartInfo. For now only Windows works.
11246 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11248 * metadata.c: consider the generic arguments when comparing
11249 signatures (bug #82614).
11251 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11253 * cil-coff.h, image.c: updated assembly loader to cope with the
11254 PE32+ 64 bit file format.
11256 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11258 * assembly.c, class.c, domain.c, loader.c: remove useless
11259 inclusion of cil-coff.h.
11261 2007-08-29 Jonathan Chambers <joncham@gmail.com>
11263 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
11264 if interface is marked with CoClassAttribute.
11266 Code is contributed under MIT/X11 license.
11268 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11270 * sgen-gc.c: ensure no object from the to space is copied again or finalized
11271 if it's seen twice in major collections.
11273 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11275 * sgen-gc.c: big objects are not copied to the gray area, but they
11276 need to be considered for scanning, too, if they are brought alive
11277 by an object ready for finalizations or a survived one.
11279 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11281 * sgen-gc.c: properly account the number of disappearing links when
11282 they are nullified.
11284 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11286 * sgen-gc.c: share the code to scan the registered roots between the
11287 different types of collections.
11289 2007-08-28 Zoltan Varga <vargaz@gmail.com>
11291 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
11293 2007-08-28 Zoltan Varga <vargaz@gmail.com>
11295 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
11296 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
11298 2007-08-28 Mark Probst <mark.probst@gmail.com>
11300 * security-manager.c (mono_security_manager_get_methods):
11301 LinkDemandSecurityException now has 2 arguments instead of 3.
11303 2007-08-27 Zoltan Varga <vargaz@gmail.com>
11305 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
11306 platforms which need it.
11308 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11310 * sgen-gc.c: unregister thread data structures with a pthread_key_t
11313 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11315 * threads.c: free the thread static data on thread exit.
11317 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
11319 * class.c: walk the hierarchy to find the generic definition for
11320 a class (fixes runtime part of bug #82498).
11322 2007-08-24 Zoltan Varga <vargaz@gmail.com>
11324 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
11327 * image.c (mono_image_close): Here. Hopefully fixes #82510.
11329 2007-08-24 Mark Probst <mark.probst@gmail.com>
11331 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
11333 2007-08-24 Robert Jordan <robertj@gmx.net>
11335 * appdomain.c: don't perform the ':'->';' substitution on Win32.
11337 2007-08-24 Jb Evain <jbevain@novell.com>
11339 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
11342 2007-08-24 Mark Probst <mark.probst@gmail.com>
11344 * threads.c: Make sure a thread gets cleaned up only once. Fixes
11347 2007-08-24 Zoltan Varga <vargaz@gmail.com>
11349 * assembly.c: Fix a warning.
11351 2007-08-23 Marek Habersack <mhabersack@novell.com>
11353 * appdomain.c: parse the <runtime> section looking for the probing
11354 element with the 'privatePath' attribute, which sets additional
11355 directories in which the runtime should look for assemblies.
11357 2007-08-23 Robert Jordan <robertj@gmx.net>
11359 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
11362 2007-08-23 Martin Baulig <martin@ximian.com>
11364 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
11365 _mono_debug_init_corlib() and remove it from the header file.
11367 2007-08-23 Martin Baulig <martin@ximian.com>
11369 * mono-debug-debugger.c
11370 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
11371 don't notify the debugger about it.
11373 * mono-debug-debugger.h
11374 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
11376 2007-08-23 Robert Jordan <robertj@gmx.net>
11378 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
11379 Code is contributed under MIT/X11 license.
11381 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11383 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
11385 2007-08-22 Martin Baulig <martin@ximian.com>
11387 * mono-debug.c: Store debugging info on a per-domain basis and
11388 free it on domain unload. Add support for unloading symbol files.
11391 (MonoDebugList): New typedef.
11393 - add `data_tables and `type_table'.
11394 - replace 'symbol_files' and `num_symbol_files' with a
11396 (mono_debug_data_table): Removed.
11397 (mono_debug_list_add): New public function.
11398 (mono_debug_list_remove): New public function.
11399 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
11400 (mono_debug_init_2_memory): Renamed into
11401 mono_debug_open_image_from_memory().
11402 (mono_debug_close_image): New public function.
11403 (mono_debug_domain_create): Likewise.
11404 (mono_debug_domain_unload): Likewise.
11405 (MONO_DEBUGGER_VERSION): Bump to 60.
11407 * mono-debug-debugger.h
11408 (MonoDebuggerEvent):
11409 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
11410 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
11411 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
11412 - rename `THREAD_CREATED' and `THREAD_EXITED' into
11413 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
11414 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
11416 (mono_debugger_add_symbol_file): Removed.
11417 (mono_debugger_add_type): Removed.
11418 (mono_debugger_lookup_type): Removed.
11419 (mono_debugger_lookup_assembly): Removed.
11422 (mono_domain_create): Call mono_debug_domain_create().
11423 (mono_init_internal): Call mono_debug_init_corlib().
11426 (mono_assembly_close): Call mono_debug_close_image().
11428 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11430 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
11433 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
11435 * sgen-gc.c: ensure section->pin_queue_end is initialized
11436 correctly when non pinning objects in the section have been found.
11438 2007-08-22 Marek Habersack <mhabersack@novell.com>
11440 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
11441 containing a list of directories separated by ':'. MSDN docs say
11442 the directories should be separated with ';'. Part of a bugfix for
11445 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
11447 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
11448 it should MonoType and not MonoClass.
11450 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
11452 * culture-info-table.h : regenerated.
11454 2007-08-20 William Holmes <billholmes54@gmail.com>
11456 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
11457 to call ReplaceFile Kernel32 on windows or in io-layer.
11458 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
11459 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
11460 as an internal call.
11462 Code is contributed under MIT/X11 license.
11464 2007-08-20 Jb Evain <jbevain@novell.com>
11466 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
11467 and MONO_EXCEPTION_FIELD_ACCESS.
11469 * debug-helpers.[c|h]: new mono_field_full_name function.
11471 2007-08-20 Mark Probst <mark.probst@gmail.com>
11473 * class.c: Removed class_security_level() and moved it to
11474 security-core-clr.c.
11476 * security-core-clr.c, security-core-clr.h: class_security_level()
11477 is now public and renamed to mono_security_core_clr_class_level().
11478 It also looks for security attributes in the classes a class is
11481 2007-08-20 Mark Probst <mark.probst@gmail.com>
11483 * security-core-clr.c, security-core-clr.h: CoreCLR security
11486 * Makefile.am: Added security-core-clr.[ch].
11488 * security-manager.c, security-manager.h: Functions and enum for
11489 setting and getting the security mode.
11491 * class.c: CoreCLR security checks.
11493 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11495 * icall-def.h, process.c, process.h: implemented icall to get
11496 user/system processor times.
11498 2007-08-17 Mark Probst <mark.probst@gmail.com>
11500 * domain.c, threads.c, class-internals.h, domain-internals.h: New
11501 reader-lock-free jit_info_table.
11503 2007-08-17 Zoltan Varga <vargaz@gmail.com>
11505 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
11507 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
11509 * object-internals.h (MonoException): Add missing _data member.
11511 2007-08-08 Massimiliano Mantione <massi@ximian.com>
11513 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
11514 checking that only methods with matching qname or fqname are picked
11515 from implemented interfaces.
11517 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
11519 * verify.c (do_newarr):added, do type verification of
11520 newarr ops, push the right value on the eval stack.
11521 * verify.c (mono_method_verify): use do_newarr
11524 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
11526 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
11527 factored the common code into get_boxable_mono_type, which
11528 is now using mono_type_get_full, this fixed byref related tests.
11530 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
11532 * class.c: added mono_type_get_full, this function has the same
11533 behavior of mono_class_get_full but the returned MonoType has
11534 all metadata of the associated token in case of a typespec token.
11535 * class.c: added mono_type_retrieve_from_typespec, used by
11536 mono_type_get_full to retrieve the token type.
11537 * class.c (mono_class_create_from_typespec): changed to use
11538 mono_type_retrieve_from_typespec.
11539 * class.c (mono_ldtoken): changed to use mono_type_get_full
11540 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
11541 * class-internals.h: exported mono_type_get_full for internal use.
11543 2007-08-16 Jb Evain <jbevain@novell.com>
11545 * domain.c (supported_runtimes): add entry for
11546 the 'moonlight' runtime version.
11548 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
11550 * verify.c (mono_method_verify): small typo sliped in.
11552 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
11554 * verify.c (do_unbox_value): added, do type verification of
11556 * verify.c (mono_method_verify): use do_unbox_value
11559 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
11561 * verify.c (dump_stack_value): fixed typo, was printing string
11562 instead of object on stack.
11563 * verify.c (do_box_value): moved the byref check up as it leads
11564 to invalid code and should be done earlier.
11565 * verify.c: improved error messages for and ldobj
11567 2007-08-15 William Holmes <billholmes54@gmail.com>
11569 * marshal.c (emit_marshal_custom): Omit the call to
11570 marshal_native_to_managed when calling native to managed
11571 and the argument is specified as an out argument.
11573 Code is contributed under MIT/X11 license.
11575 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
11577 * verify.c: fixed the type checks for generics, function pointers and vectors.
11578 Added type verification for ldobj and ldtoken. The verifier
11579 would segfault if header or signature of a method contained references
11580 to non-existant types.
11582 2007-08-15 Jonathan Chambers <joncham@gmail.com>
11584 * marshal.c (cominterop_get_ccw): Patch from
11585 Bill Holmes to no walk up interface hierarchy.
11586 All parent methods should be present in the interface for COM.
11588 Code is contributed under MIT/X11 license.
11590 2007-08-15 Jonathan Chambers <joncham@gmail.com>
11592 * marshal.c (emit_marshal_com_interface): Patch from
11593 Bill Holmes to handle COM Interfaces as return values
11594 for native->managed calls.
11596 Code is contributed under MIT/X11 license.
11598 2007-08-14 Jonathan Chambers <joncham@gmail.com>
11600 * marshal.c (cominterop_get_idispatch_for_object): Implement
11601 for runtime callable wrappers.
11603 Code is contributed under MIT/X11 license.
11605 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
11607 * pedump.c (main): changed from mono_init to mono_init_from_assembly
11608 so 2.0 types are accessible
11611 2007-08-13 Miguel de Icaza <miguel@novell.com>
11613 * domain.c (mono_init_internal): Call mono_assembly_load_friends
11614 once we load mscorlib. Due to the order in which we initialize,
11615 the mono_assembly_load_full routine that loads mscorlib did not
11616 load friends. We now load it once we load the
11617 mono_defaults.internals_visible_class class.
11619 * assembly.c: Expose the mono_load_friend_assemblies method.
11621 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
11623 * verify.c: improved the handling of boxing, better
11624 type checking for unary ops and conversion. Fix bug
11625 regarding managed pointer compatibility checking
11627 2007-08-11 Zoltan Varga <vargaz@gmail.com>
11629 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
11631 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
11633 2007-08-09 Raja R Harinath <rharinath@novell.com>
11635 * reflection.c (dup_type): Remove.
11636 * class.c (dup_type): Remove.
11637 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
11638 instead of the dodgy 'dup_type'.
11639 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
11640 handle the case where 'dup_type' needed the second argument.
11642 2007-08-08 Zoltan Varga <vargaz@gmail.com>
11644 * domain.c: Fix a warning.
11646 2007-08-08 Massimiliano Mantione <massi@ximian.com>
11648 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
11649 checking that methods with the same fqname are not overridden
11650 with a method from an ancestor.
11652 2007-08-07 Zoltan Varga <vargaz@gmail.com>
11654 * threads.c (free_thread_static_data_helper): Avoid a crash if
11655 thread->static_data is not yet set.
11657 2007-08-07 Jonathan Chambers <joncham@gmail.com>
11659 * marshal.c: Use correct image when emitting
11660 native wrapper for COM calls.
11662 Code is contributed under MIT/X11 license.
11664 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
11666 * icall-def.h, security.c, security.h :
11667 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
11669 2007-08-07 Martin Baulig <martin@ximian.com>
11671 * mono-debug-debugger.h
11672 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
11674 * domain.c (mono_domain_free): Call
11675 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
11677 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
11679 * verify.c (check_underflow, check_overflow): error message now returns IL offset
11680 * verify.c (in_same_block): code should test if either offset is inside the clauses
11681 * verify.c (mono_method_verify): push the exception into the eval stack of exception
11684 2007-08-03 Zoltan Varga <vargaz@gmail.com>
11686 * image.c (mono_image_close): Fix a leak.
11688 * object.c (mono_runtime_invoke_array): Avoid using alloca.
11690 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
11692 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11694 * domain.c, threads.c, threads-types.h: fix memory retention issue
11695 with thread static variables not being cleared on domain unload.
11696 Reuse thread static slots after domain unload.
11698 2007-08-03 Zoltan Varga <vargaz@gmail.com>
11700 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
11703 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
11704 now done in mono_runtime_invoke_array.
11706 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
11707 receiver is a nullable type.
11709 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
11712 2007-08-03 Jonathan Chambers <joncham@gmail.com>
11714 * marshal.c: Implement COM Objects as return type for
11715 managed->unmanaged calls. Added Release calls for COM Object
11716 out/return values in managed->unmanaged calls.
11718 Code is contributed under MIT/X11 license.
11720 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
11722 * threads.h, threads-type.h: move the hazard pointer declarations
11723 to the private header.
11725 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11727 * file-io.c, appdomain.c: memory leak fixes.
11729 2007-08-02 Dick Porter <dick@ximian.com>
11732 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
11733 SO_REUSEADDR setting into io-layer/sockets.c.
11735 2007-08-01 Zoltan Varga <vargaz@gmail.com>
11737 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
11738 from Object when called on a generic parameter. Fixes #82211.
11740 2007-08-01 Dick Porter <dick@ximian.com>
11742 * file-io.c (convert_share): Test FileShare values bit-by-bit.
11743 Fixes bug 79250 yet again.
11745 2007-07-30 Martin Baulig <martin@ximian.com>
11747 Merged the `debugger-dublin' branch.
11750 (MonoDebugDataTable): New typedef.
11751 (MonoDebugMethodAddressList): New typedef.
11752 (MonoDebugWrapperData): Removed.
11753 (MonoDebugSymbolTable): Removed `current_data_table',
11754 `current_data_table_size', `current_data_table_offset'.
11755 (MonoDebugDataItemType): Moved into mono-debug.c.
11756 (MonoDebugMethodJitInfo): Remove `address'.
11757 (mono_debug_data_table): New global variable.
11758 (mono_debug_lookup_method_addresses): New public function.
11759 (mono_debug_find_method): Take a `MonoMethod *', not a
11760 `MonoDebugMethodInfo *'.
11762 * mono-debug.c: Drop support for the old symbol tables.
11764 2007-06-28 Martin Baulig <martin@ximian.com>
11766 * mono-debug.c (mono_debug_debugger_version): New public variable.
11768 2007-07-31 William Holmes <billholmes54@gmail.com>
11770 * metadata.c Changed mono_type_create_from_typespec to not insert
11771 the type into the hash map until after
11772 do_mono_metadata_parse_type has completed.
11774 Code is contributed under MIT/X11 license.
11776 2007-07-31 Zoltan Varga <vargaz@gmail.com>
11778 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
11779 generic parameter. Fixes #82211.
11781 2007-07-27 Jb Evain <jbevain@novell.com>
11783 * pedump.c (dump_metadata, dump_metadata_header): dump
11784 versions contained in the metadata header.
11786 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11788 * threads.c: register small_id_table with the GC.
11790 2007-07-27 Mark Probst <mark.probst@gmail.com>
11792 * threads.c, threads.h, class-internals.h, object-internals.h:
11793 Hazard pointers, to be used by lock-free parallel algorithms.
11795 2007-07-26 Dick Porter <dick@ximian.com>
11797 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
11798 routine on non-windows platforms, as I've not managed to think of
11799 a non-kludgy way of doing this. Finishes off bug 78739.
11801 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
11803 * object.c: properly setup interface_bitmap in proxy vtables.
11805 2007-07-25 Marek Habersack <mhabersack@novell.com>
11807 * appdomain.c (get_shadow_assembly_location): do not use TickCount
11808 to create unique shadow copy target directories, use the domain's
11809 serial number instead. Each domain gets a unique target directory
11812 * domain.c (mono_domain_create): added code to increment domain
11813 shadow copy serial number and cache the value in the current
11816 * domain-internals.h (struct _MonoDomain): added a new field -
11817 shadow_serial to hold the serial number used in generation of
11818 shadow-copy directories. This is to make sure that the directory
11819 name is unique for each and every domain created. We avoid a race
11820 condition with overriding assemblies already in use by other app
11823 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
11825 * class.c (mono_bounded_array_class_get): fixed memory leak when
11826 binding generic parameters.
11828 2007-07-24 Raja R Harinath <rharinath@novell.com>
11830 * metadata.c (do_mono_metadata_parse_generic_class): Use
11831 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
11834 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11836 * loader.c, class-internals.h, reflection.c: removed the per-method
11837 generics hashtable: we use the global one through the call of
11838 mono_class_inflate_generic_method ().
11840 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
11842 * class.c, metadata.c, class-internals.h: introduce yet another
11843 generics global cache for inflated methods (fixes 98% of the perf
11844 issue in bug #81806).
11846 2007-07-23 Raja R Harinath <rharinath@novell.com>
11848 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
11849 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
11850 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
11851 return a MonoGenericInst containing (a copy) of those types.
11852 (mono_metadata_inflate_generic_inst): Update to changes.
11853 (mono_metadata_parse_generic_inst): Likewise.
11854 (mono_get_shared_generic_inst): Likewise.
11855 * reflection.c (mono_class_bind_generic_parameters): Likewise.
11856 (mono_reflection_bind_generic_method_parameters): Likewise.
11857 * metadata-internals.h: Likewise.
11858 * icall.c (free_generic_context): Kill.
11859 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
11861 * reflection.c (reflection_methodbuilder_to_mono_method): Use
11862 mono_metadata_type_dup.
11863 * marshal.c (mono_mb_create_method): Likewise.
11865 * metadata.c (mono_metadata_type_dup): Rename from
11866 mono_metadata_type_dup_mp. Take an optional mempool instead of a
11867 MonoImage. Handle a few more cases, esp. when no mempool is given.
11868 * marshal.c, metadata-internals.h: Update to changes.
11870 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11872 * class.c: fixed a small leak for array classes and removed warning.
11874 2007-07-22 Zoltan Varga <vargaz@gmail.com>
11876 * loader.c (mono_method_get_param_token): Make this work on generic methods.
11877 Return 0x8000000 for return parameters. Fixes #82161.
11879 2007-07-21 Marek Habersack <grendello@gmail.com>
11881 * appdomain.c (get_shadow_assembly_location): append the current
11882 ticks value to the path. Avoids overwriting the same assemblies by
11883 several threads at the same time.
11885 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
11886 and Raja R Harinath <rharinath@novell.com>
11888 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
11890 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
11891 property for testing if a method is a generic method definition.
11893 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
11895 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
11897 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11899 * verify.c: used function from private branch, reverted to the one in class.h
11901 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11903 * verify.c: a typo slipped in and the code wont compile
11905 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11907 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
11908 disabled box instruction as it is doing the wrong thing
11909 improved stack dump messages, now it is easier to debug type related issues
11912 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
11914 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
11916 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11918 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
11919 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
11920 grouped with class and valuetype. This change will simply
11921 the code as it should be handled just like unmanaged pointers.
11923 2007-07-19 Mark Probst <mark.probst@gmail.com>
11925 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
11927 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
11929 * verify.c: several stack merge issues fixed, reference comparisons now
11930 check the type size. strict type check now works correctly.
11931 added more uses of IS_MANAGED_POINTER macro.
11932 fixed issues pointed by running the test suite against .net.
11935 2007-07-19 Mark Probst <mark.probst@gmail.com>
11937 * class.c, loader.c, class-internals.h: Removed the
11938 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
11941 * icall.c: Better error checking in some internal reflection
11944 2007-07-18 William Holmes <billholmes54@gmail.com>
11946 * filewatcher.c : removed unused variable 'filename' in
11947 ves_icall_System_IO_FSW_SupportsFSW
11949 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11951 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
11954 2007-07-15 Zoltan Varga <vargaz@gmail.com>
11956 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
11958 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
11960 2007-07-14 Zoltan Varga <vargaz@gmail.com>
11962 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
11963 Implement generics support.
11964 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
11966 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
11967 type_args and method_args arguments.
11968 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
11969 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
11970 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
11972 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
11974 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
11975 It adds a rootimage parameter to mono_reflection_get_type_internal,
11976 adds new function mono_reflection_get_type_with_rootimage and use
11977 the rootimage to resolve the types instead of the current image
11979 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
11981 * culture-info-table.h: Forgot to update after r78304.
11983 2007-07-13 Raja R Harinath <rharinath@novell.com>
11985 * class.c (mono_class_is_open_constructed_type)
11986 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
11988 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
11990 * class.c (mono_bounded_array_class_get): method fails if used with
11991 an incomplete TypeBuilder enum (no basetype field), fixed it by
11992 avoiding calculating the size for such array as it cannot be instantiated.
11995 2007-07-12 Raja R Harinath <rharinath@novell.com>
11997 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
11999 * metadata.c, reflection.c: Update to changes.
12001 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
12003 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
12004 mono_class_is_valid_enum, they are used to valide a enum when loading.
12005 * reflection.c: used new functions to throw TypeLoadException when and
12006 invalid enum is build with TypeBuilder. Fixes #82018
12008 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
12010 * object.c: forgot commit of mono_class_setup_methods () to access
12012 * object-internals.h: added a few more handy fields to
12015 2007-07-11 Zoltan Varga <vargaz@gmail.com>
12017 * object.c (build_imt): Call mono_class_setup_methods () before accessing
12020 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
12022 * class-internals.h, object-internals.h, object.c: IMT-based
12023 interface invocation core from Massimiliano Mantione
12024 (massi@ximian.com) with a reworked arch-specific interface,
12025 bsearch implementation and a few bugfixes and memory savings by me.
12027 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
12029 * class.c (mono_class_create_from_typedef): mono would segfault if
12030 an enum did not have a __value field. It now throws a TypeLoadException
12031 for such cases. Fix bug #82022
12033 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12035 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
12037 2007-07-09 Mark Probst <mark.probst@gmail.com>
12039 * class.c (mono_class_init): If a class is already inited but has
12040 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
12042 2007-07-09 Mark Probst <mark.probst@gmail.com>
12044 * class.c: Properly handle the case of an unimplemented interface
12045 method. Fixes: 81673.
12047 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12049 * class-internals.h, object.c: cleanup patch from massi: use
12050 MonoVTable->interface_bitmap since the vtable interfaces offset array
12053 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12055 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
12056 GetMDStreamVersion icall instead.
12058 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
12060 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
12061 not use mono_dl_build_path() with a full library name: makes
12062 fallbacks to libgaim and libfam work.
12064 2007-07-06 William Holmes <billholmes54@gmail.com>
12066 * assembly.c: Added a continue statement in probe_for_partial_name when
12067 parse_assembly_directory_name fails. Fixes : 82002
12069 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
12071 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
12072 and added a verification for TYPEDBYREF.
12073 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
12074 make native int interchangeable with int32 and some small cleanup and formating.
12075 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
12076 handle byref of byref.
12077 * verify.c (push_local): handle byref of byref.
12078 * verify.c (do_binop): invalid mix of values is unverifiable
12079 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
12080 added visibility checks
12081 * verify.c (field related method): added visibility checks
12082 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
12084 2007-07-06 Zoltan Varga <vargaz@gmail.com>
12086 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
12089 2007-07-05 Zoltan Varga <vargaz@gmail.com>
12091 * profiler.c (mono_profiler_load): Fix an off-by-one error.
12093 * marshal.c (emit_marshal_string): When returning a string from managed code,
12094 allways make a copy even for unicode strings. Fixes #81990.
12096 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
12098 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
12099 of byref generic inst types (bug #81997).
12101 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
12103 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
12104 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
12106 2007-07-02 Zoltan Varga <vargaz@gmail.com>
12108 * marshal.c (emit_marshal_string): Add support for unicode strings in
12109 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
12111 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
12113 * verify.c: field load/store are now verified, missing only access checks now
12115 2007-06-28 Martin Baulig <martin@ximian.com>
12117 * mono-debug.c (mono_debug_debugger_version): New public variable.
12119 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
12121 * locales.c: When constructing DateTimeFormat or NumberFormat for
12122 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
12123 MonoCultureInfo contructed from the current locale is always
12124 read-only and has UseUserOverride set to true. All MonoCultureInfo
12125 instances returned for GetCultures have both IsReadOnly and
12126 UseUserOverride set to true. Fixes part of bug #81930.
12128 2007-06-22 Jonathan Chambers <joncham@gmail.com>
12130 * icall-def.h: Update System.__ComObject icalls
12131 * marshal.c: Avoid managed transition (and object creation)
12132 when looking up COM interface in RCW.
12133 * marshal.h: Ditto.
12135 Code is contributed under MIT/X11 license.
12137 2007-06-22 Zoltan Varga <vargaz@gmail.com>
12139 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
12140 to avoid crashes during assembly unloading.
12142 2007-06-22 Raja R Harinath <rharinath@novell.com>
12144 Fix MethodInfo.IsGenericMethodDefinition
12145 * reflection.c (mono_reflection_bind_generic_method_parameters):
12146 Rearrange code to ensure we always uses a generic method definition.
12147 * class.c (mono_class_inflate_generic_method_full): Set
12148 'generic_container' field only for generic method definitions.
12149 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12150 Use presense of 'generic_container' field as indication of being a
12151 generic method definition.
12153 2007-06-21 Zoltan Varga <vargaz@gmail.com>
12155 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12157 * object-internals.h: Reflect changes in the layout of the managed Delegate
12160 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
12161 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
12162 runtime memory used by the dynamic method. Fixes #77146.
12164 2007-06-21 Dick Porter <dick@ximian.com>
12167 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
12168 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
12171 2007-06-21 Raja R Harinath <rharinath@novell.com>
12173 * reflection.c (method_encode_methodspec): Add a tripwire.
12174 * class.c (inflate_generic_type): The fully open generic type is
12175 not the same as the generic type definition.
12177 2007-06-21 Martin Baulig <martin@ximian.com>
12179 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
12181 * mono-debug-debugger.h
12182 (MonoDebuggerBreakpointInfo): Removed.
12183 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
12184 (mono_debugger_remove_breakpoint): Likewise.
12185 (mono_debugger_breakpoint_callback): Likewise.
12186 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
12188 2007-06-21 Raja R Harinath <rharinath@novell.com>
12190 * metadata.c (mono_metadata_lookup_generic_class): The fully open
12191 generic type is not the same as the generic type definition.
12192 * class.c (mono_generic_class_get_class): Likewise.
12194 2007-06-20 Geoff Norton <gnorton@customerdna.com>
12196 * icall.c: The second argument to
12197 System.Reflection.MethodBase.GetMethodFromHandleInternalType
12198 is a MonoType not a MonoClass.
12200 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12202 * verify.c: support for function pointers in the verifier
12204 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12206 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
12208 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
12210 * assembly.c: removed Mono.Data.SqliteClient from the list of
12211 forward-compatible assemblies as it breaks the ABI (bug #81899).
12213 2007-06-19 Raja R Harinath <rharinath@novell.com>
12215 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
12216 lookup/update with the loader lock.
12217 * reflection.c (mono_class_bind_generic_parameters): No need to
12218 protect mono_metadata_lookup_* with the loader lock.
12219 * class.c (inflate_generic_type): Likewise.
12221 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
12222 on a generic instantiated type.
12224 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
12226 *verify.c: produce meanfull error messages on verification error
12227 *verify.c: fixed some cases of verification errors reported as validation errors
12228 *pedump.c: fixed the error name array, now it shows validation errors properly
12229 *verify.h: fixed the contant that should be used for verification errors
12231 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12233 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
12234 for bug #77596, 81858 and 80743 (generics data structures on domain
12237 2007-06-15 Raja R Harinath <rharinath@novell.com>
12239 Avoid allocating 'MonoGenericContext' on the heap.
12240 * class-internals (_MonoMethodInflated::context): Make field
12241 inline, not a pointer.
12242 * loader.c (method_from_methodspec): Allocate 'new_context' on the
12243 stack. Use the context embedded within the inflated method as the
12244 hash key, rather than 'new_context'.
12245 * class.c (inflate_generic_context): Simplify. Return a struct
12246 rather than allocating on the heap.
12247 (mono_class_inflate_generic_method_full): Update to changes. Now,
12248 doesn't salt away a copy of the context -- simplifying the
12249 lifetime rules of a 'MonoGenericContext *'.
12250 (mono_method_get_context): Return pointer to embedded context.
12251 (setup_generic_array_ifaces): Allocate temporary context on stack.
12252 * reflection.c (inflate_mono_method): Likewise.
12253 (mono_reflection_bind_generic_method_parameters): Likewise.
12254 Use the context embedded within the inflated method as the hash key.
12256 Avoid a source of allocation of 'MonoGenericContext'.
12257 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
12258 and 'cached_context' fields into embedded 'MonoGenericContext' field.
12259 * class.c: Update to changes.
12260 (mono_generic_class_get_context): Simplify drastically. Now just
12261 returns a pointer to the field.
12262 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
12263 argument as a const pointer.
12264 (mono_metadata_generic_context_equal): Likewise.
12265 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
12268 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
12270 * verify.c improved the handling of brtrue/brfalse, factored out common code
12272 2007-06-14 Raja R Harinath <rharinath@novell.com>
12274 Kill MonoGenericMethod.
12275 * class-internals.h (MonoGenericContext::method_inst): Rename from
12276 'gmethod' and convert to a MonoGenericInst.
12277 (MonoGenericMethod): Remove.
12278 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
12279 * loader.c (method_from_methodspec): Update to changes. Use a
12280 MonoGenericContext as the key to the hashtable.
12281 * metadata.c (mono_metadata_generic_context_equal): Rename from
12282 'mono_metadata_generic_method_equal' and take MonoGenericContext.
12283 (mono_metadata_generic_context_hash): Likewise from
12284 'mono_metadata_generic_method_hash'. Change hash function.
12285 (mono_metadata_load_generic_params): Update to changes.
12286 (mono_get_shared_generic_method): Remove.
12287 * metadata-internals.h (mono_get_shared_generic_method): Remove.
12288 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
12289 (inflate_generic_context): Likewise.
12290 (mono_class_inflate_generic_method_full): Likewise.
12291 (setup_generic_array_ifaces): Likewise.
12292 (mono_class_create_from_typespec): Likewise.
12293 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
12294 (method_encode_methodspec): Update callsite.
12295 (reflection_methodbuilder_to_mono_method): Update to changes.
12296 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
12297 MonoGenericContext as the key to the hashtable.
12298 (inflate_mono_method): Update to changes.
12300 * class-internals.h (MonoGenericMethod::container): Remove.
12301 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
12303 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
12305 * profiler-private.h, profiler.c, profiler.h: added API to profile
12308 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
12310 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
12312 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
12314 * verify.c: method invocation is now validated, now we verify parameter types on stack.
12315 Fixed overflow and underflow not aborting the verification process.
12317 2007-06-13 Mark Probst <mark.probst@gmail.com>
12319 * class-internals.h (MonoStats): Added stats entries for dynamic
12322 2007-06-12 Zoltan Varga <vargaz@gmail.com>
12324 * loader.c (mono_free_method): Free header->locals and header->clauses.
12326 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
12329 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
12331 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
12333 2007-06-12 Raja R Harinath <rharinath@novell.com>
12335 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
12338 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
12340 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
12342 2007-06-11 Raja R Harinath <harinath@gmail.com>
12344 MonoGenericMethod on a diet
12345 * class-internals.h (_MonoMethodInflated::reflection_info): Move
12347 (_MonoGenericMethod::reflection_info): ... from here.
12348 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
12350 * reflection.c (inflate_mono_method): Likewise.
12351 (mono_reflection_bind_generic_method_parameters): Likewise.
12353 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
12355 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
12356 *verify.c: factored long ldarg forms to share code with short forms
12358 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
12360 *verify.c: fixed code formating factored some duplicate code
12361 into a new function
12363 *verify.h: fixed binary incompatibility introduced earlier
12365 *pedump.c: fixed formating
12367 2007-06-11 Raja R Harinath <harinath@gmail.com>
12369 Fix assertion when disassembling Mono.C5.dll
12370 * loader.c (method_from_methodspec): Avoid inflating a method
12371 twice with the same context. If the methodref is inflated, use
12372 the declaring method instead.
12374 * class.c (mono_class_from_generic_parameter): Fix case similar to
12375 bug #81830 handled below, but for method containers.
12377 2007-06-10 Raja R Harinath <harinath@gmail.com>
12379 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
12380 get_shared_generic_class. Directly inflate the instance.
12381 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
12382 (inflate_generic_class): Delete.
12383 (get_shared_generic_class): Delete. Move setting of
12384 'cached_class' and 'cached_context' ...
12385 * metadata.c (mono_metadata_lookup_generic_class): ... here.
12387 * metadata.c (mono_metadata_lookup_generic_class): Change
12388 signature to take the components of a MonoGenericClass rather than
12389 an allocated MonoGenericClass. Change semantics to be intern-like.
12390 * reflection.c (mono_class_bind_generic_parameters): Update to
12391 changes. Make locking region tighter.
12392 * class.c (inflate_generic_class): Update to changes.
12393 (get_shared_generic_class): Likewise.
12394 * metadata-internals.h: Likewise.
12396 * reflection.c (mono_class_bind_generic_parameters): Take and
12397 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
12398 (mono_reflection_bind_generic_parameters): Use
12399 'mono_class_bind_generic_parameters' rather than duplicate the code.
12400 * class.c (mono_bounded_array_class_get): Update to changes.
12401 * object-internals.h: Likewise.
12403 * reflection.c (mono_class_bind_generic_parameters): Only support
12404 parameterizing generic type definitions. Remove support for other
12407 2007-06-08 Zoltan Varga <vargaz@gmail.com>
12409 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
12411 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
12412 in the dynamic case.
12414 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
12416 * threads.c: When cleaning up thread, reset the Background bit.
12419 2007-06-08 Jonathan Chambers <joncham@gmail.com>
12421 * metadata.c: Move variable declarations to top of scope.
12422 * verify.c: Move variable declarations to top of scope.
12424 Code is contributed under MIT/X11 license.
12426 2007-06-08 Raja R Harinath <rharinath@novell.com>
12428 * reflection.c (mono_class_bind_generic_parameters): Replace
12429 open-coded loop with mono_metadata_inflate_generic_inst.
12431 * class.c (get_shared_generic_class): Don't call
12432 mono_get_shared_generic_inst. Use the container's own
12435 * metadata.c (mono_metadata_load_generic_params): Move
12436 initialization of 'context' field here from ...
12437 * class.c (mono_class_create_from_typedef): ... here, and ...
12438 * loader.c (mono_get_method_from_token): ... here.
12440 * class.c (get_shared_generic_class): Rename from
12441 mono_get_shared_generic_class and make static.
12442 (mono_get_shared_generic_inst): Move to metadata.c.
12443 * loader.c (mono_get_shared_generic_method): Likewise.
12444 * class-internals.h, metadata-internals.h: Update to changes.
12447 * class.c (mono_class_from_generic_parameter): Don't assume a
12448 generic container owner exists. Generic containers from monodis
12451 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
12453 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
12454 * verify.h: new typedefs to returns the non-verifiable status
12455 * verify.c: initial implementation of generics, stack merging and object compatibility check
12457 2007-06-06 Mark Probst <mark.probst@gmail.com>
12459 * class.c, image.c, class-internals.h (MonoImage): class_cache is
12460 a MonoInternalHashTable again (fixed bug in internal hash table
12463 2007-06-06 Mark Probst <mark.probst@gmail.com>
12465 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12466 MonoInternalHashTable again (fixed bug in internal hash table
12469 2007-06-06 Mark Probst <mark.probst@gmail.com>
12471 * class.c, image.c, class-internals.h, domain.c,
12472 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
12473 changes. Have to figure out what makes them break the SWF
12476 2007-06-04 Mark Probst <mark.probst@gmail.com>
12478 * class.c, image.c, class-internals.h (MonoImage): class_cache is
12479 a MonoInternalHashTable now.
12481 2007-06-04 Mark Probst <mark.probst@gmail.com>
12483 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12484 MonoInternalHashTable now.
12486 2007-05-31 Zoltan Varga <vargaz@gmail.com>
12488 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
12491 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
12493 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
12494 dependent trampoline.
12496 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12498 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
12500 2007-05-29 Robert Jordan <robertj@gmx.net>
12502 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
12504 2007-05-28 Zoltan Varga <vargaz@gmail.com>
12506 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
12508 2007-05-25 Jonathan Chambers <joncham@gmail.com>
12510 * marshal.c: Fix interface lookup loops for
12511 cominterop_get_com_slot_for_method and
12512 cominterop_get_method_interface. Only need to lookup
12513 if type is a class, else use interface type method is on.
12515 Code is contributed under MIT/X11 license.
12517 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
12519 * reflection.c: HasSecurity can be present even if no specially
12520 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
12521 SecurityAttribute). Fix CAS regression tests on buildbot.
12523 2007-05-24 Jonathan Chambers <joncham@gmail.com>
12525 * appdomain.c: Add configure checks for header files.
12526 * image.c: Add configure checks for header files.
12527 * file-io.c: Add configure checks for header files.
12528 * debug-mono-symfile.c: Add configure checks for header files.
12529 * threadpool.c: Add configure checks for header files.
12530 * console-io.c: Add configure checks for header files.
12531 * profiler.c: Add configure checks for header files.
12532 * rawbuffer.c: Add configure checks for header files.
12533 * icall.c: Add configure checks for header files.
12534 * rand.c: Add configure checks for header files.
12535 * socket-io.c: Add configure checks for header files.
12537 Code is contributed under MIT/X11 license.
12539 2007-05-24 Zoltan Varga <vargaz@gmail.com>
12541 * reflection.c (mono_custom_attrs_from_builders): Remove the
12542 assertion as it breaks the build.
12544 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
12546 * reflection.c (lookup_custom_attr): Make a copy here too.
12548 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
12551 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
12554 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
12557 2007-05-22 Zoltan Varga <vargaz@gmail.com>
12559 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
12560 (load_cattr_value): Ditto.
12562 2007-05-20 Zoltan Varga <vargaz@gmail.com>
12564 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
12566 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
12568 * threads.c: In "start_wrapper", set apartment_state to MTA if
12569 apartment_state is Unknown and we're running on 2.0 profile or
12571 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
12572 to main method, then set apartment_state to Unknown on 1.0 profile,
12573 and MTA on 2.0 profile.
12575 2007-05-16 Jb Evain <jb@nurv.fr>
12577 * class-internals.h (MonoDefaults): Add an attribute_class and
12578 customattribute_data_class.
12579 * domain.c (mono_init_internal): Populate them.
12580 * reflection.c: Use them to remove duplicates. Make a vew
12581 MonoClass variables `static'.
12583 2007-05-15 Massimiliano Mantione <massi@ximian.com>
12585 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
12586 step in implementing IMT, so that all isinst checks now can go
12587 through the bitmap.
12588 This was needed because vtables for TransparentProxy need to look
12589 like the vtable of the "target" class, so they need to point to
12590 its interface bitmap directly.
12592 * object.c: inside "mono_class_create_runtime_vtable" and
12593 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
12595 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
12597 * object-internals.h
12598 culture-info.h : added territory field in MonoCulture and
12599 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
12600 * locales.c : fill territory field above too.
12601 * culture-info-table.h : regenerated.
12603 2007-05-12 Zoltan Varga <vargaz@gmail.com>
12605 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
12608 2007-05-11 Jonathan Chambers <joncham@gmail.com>
12610 * object.c: Always initialize apartment, even if
12611 there is no custom attributes on entry point.
12613 Code is contributed under MIT/X11 license.
12615 2007-05-10 Jonathan Chambers <joncham@gmail.com>
12617 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
12618 * metadata.c: If no encoding is set, check for unicode
12621 Code is contributed under MIT/X11 license.
12623 2007-05-09 Jonathan Chambers <joncham@gmail.com>
12625 * threads.c: Handle if mono_thread_current returns NULL
12627 Code is contributed under MIT/X11 license.
12629 2007-05-09 Jonathan Chambers <joncham@gmail.com>
12631 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
12632 in start_wrapper. Added mono_thread_init_apartment_state and
12633 mono_thread_cleanup_apartment_state.
12634 * object.c: Initialize thread apartment state on main thread
12635 by checking for STAThreadAttribute on entry point.
12636 * object-internals.h: Add apartment_state field to MonoThread.
12637 * threads-types.h: Add unmanaged definition of
12638 System.Threading.ApartmentState, MonoThreadApartmentState.
12640 Code is contributed under MIT/X11 license.
12642 2007-05-08 Jonathan Chambers <joncham@gmail.com>
12644 * class.c: Fix windows build.
12645 * class-internals.h: Fix windows build.
12647 Code is contributed under MIT/X11 license.
12649 2007-05-08 Robert Jordan <robertj@gmx.net>
12651 * process.c (CreateProcess_internal):
12652 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
12653 .CreateNoWindow was specified. Fixes #81496.
12655 2007-05-08 Massimiliano Mantione <massi@ximian.com>
12657 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
12658 step in implementing IMT, replaced it with two compact arrays
12659 (interfaces_packed and interface_offsets_packed) and a bitmap that
12660 is used for isinst checks (interface_bitmap).
12662 * class.c: (compare_interface_ids): compare function to pass to
12663 bsearch when looking for an interface with a given id.
12664 (mono_class_interface_offset): reimplemented using bsearch on
12665 interfaces_packed, getting the offset from interface_offsets_packed.
12666 (print_implemented_interfaces): utility debugging function.
12667 (setup_interface_offsets): reworked to initialize interfaces_packed,
12668 interface_offsets_packed and interface_bitmap.
12670 * object.c: replaced all accesses to "MonoClass.interface_offsets"
12671 with uses of interfaces_packed and interface_offsets_packed.
12673 2007-05-08 Massimiliano Mantione <massi@ximian.com>
12675 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
12676 mono_class_interface_offset prototype to wrap all accesses to
12677 "MonoClass.interface_offsets".
12679 * class.c: Implemented mono_class_interface_offset, and wrapped all
12680 accesses to "MonoClass.interface_offsets".
12682 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
12683 "MonoClass.interface_offsets".
12685 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
12687 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
12688 GetMethodFromHandle overloads (bug #78637).
12690 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12692 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
12693 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
12695 2007-05-01 Zoltan Varga <vargaz@gmail.com>
12697 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
12700 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
12702 (mono_custom_attrs_from_index): Ditto.
12704 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
12707 2007-04-30 Zoltan Varga <vargaz@gmail.com>
12709 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
12710 is now allocated from a mempool.
12712 2007-04-28 Zoltan Varga <vargaz@gmail.com>
12714 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
12715 caller holds threads_lock, leading to deadlocks. Fixes #81476.
12717 2007-04-26 Zoltan Varga <vargaz@gmail.com>
12719 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
12720 mono_loader_clear_error () too late. Fixes #81463.
12722 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
12724 * culture-info-table.h : regenerated.
12726 2007-04-25 Zoltan Varga <vargaz@gmail.com>
12728 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
12731 2007-04-25 Dick Porter <dick@ximian.com>
12733 * Makefile.am: Put the mingw enforced-optimisation back into the
12734 PLATFORM_WIN32 section.
12736 2007-04-24 Zoltan Varga <vargaz@gmail.com>
12738 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
12741 * image.c (mono_image_load_module): New API function to load a module reference.
12743 * image.c (load_modules): Load modules lazily. Fixes #80812.
12745 * class.c (mono_class_from_typeref): Use mono_image_load_module.
12747 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
12749 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
12750 to mono_image_load_module_dynamic.
12752 2007-04-23 Jonathan Chambers <joncham@gmail.com>
12754 * marshal.c: Fix calling convention for CCW on non-windows
12755 platforms. STDCALL on windows, CDECL everywhere else to work
12756 with XPCOM and MainWin COM.
12758 Code is contributed under MIT/X11 license.
12760 2007-04-23 Martin Baulig <martin@ximian.com>
12765 (method_from_memberref): Added `gboolean *used_context' argument.
12766 (mono_get_method_from_token): Likewise.
12767 (mono_get_method_full): Don't insert the method in the cache when
12768 `used_context' is true.
12770 2007-04-23 Raja R Harinath <rharinath@novell.com>
12772 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
12774 * reflection.c (mono_reflection_bind_generic_parameters): Don't
12775 create new MonoTypes for returned types.
12776 * class.c (mono_generic_class_get_class): Export mono-internal.
12777 * class-internals.h: Update to changes.
12779 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
12781 * threadpool.c, threadpool.h, icall-def.h: patch from
12782 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
12784 2007-04-18 Zoltan Varga <vargaz@gmail.com>
12786 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
12788 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
12790 * threads.c (mono_thread_get_stack_bounds): New helper function.
12792 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
12793 Correctly compute stack bounds when attaching. Fixes #81394.
12795 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
12797 * reflection.c: fix handling of doubles in custom attributes
12798 for the arm-fpa format (bug #81368).
12800 2007-04-18 Raja R Harinath <rharinath@novell.com>
12802 * reflection.c (assembly_add_win32_resources): Mildly relax an
12803 bounds check to let the end pointer point just past the end of the
12804 allocated buffer. (may fix #81384)
12806 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
12808 * culture-info-table.h : regenerated.
12810 2007-04-07 Zoltan Varga <vargaz@gmail.com>
12812 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
12813 the thread is aborted early.
12815 2007-04-05 Dick Porter <dick@ximian.com>
12817 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
12818 FindFirstFile()/FindNextFile() to find entries. This lets the
12819 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
12822 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
12824 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
12826 2007-04-04 Martin Baulig <martin@ximian.com>
12829 (mono_method_desc_full_match): Add support for nested classes.
12831 2007-04-02 Zoltan Varga <vargaz@gmail.com>
12833 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
12835 2007-04-01 Zoltan Varga <vargaz@gmail.com>
12837 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
12838 waiting for too many threads.
12840 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
12842 * environment.c: Fix return value check on uname so we can get the
12843 executing version on Solaris operating systems.
12845 2007-03-28 Jb Evain <jbevain@gmail.com>
12847 * class.c (mono_type_get_name_recurse): Complete the
12848 fix for the creation of assembly qualified names for
12849 pointer types. Fixes #81208.
12851 2007-03-27 Dick Porter <dick@ximian.com>
12853 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
12854 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
12858 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
12859 the value of ReleaseMutex().
12861 2007-03-27 Dick Porter <dick@ximian.com>
12863 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
12864 in little-endian order, not network endian, so must be converted
12865 to host endian here. Fixes bug 80593.
12867 2007-03-22 Jb Evain <jbevain@gmail.com>
12869 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
12870 qualified names for pointer types. Fixes #81208.
12872 2007-03-21 Jonathan Chambers <joncham@gmail.com>
12874 * marshal.c: Add support for PreserveSigAttribute.
12876 Code is contributed under MIT/X11 license.
12878 2007-03-14 Zoltan Varga <vargaz@gmail.com>
12880 * process.c: Fix endianness issues. Fixes #81126.
12882 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
12883 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
12885 * image.c (mono_image_lookup_resource): Make this work on big-endian
12886 machines.Change API contract so the caller needs to free the return value.
12888 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
12891 2007-03-14 Martin Baulig <martin@ximian.com>
12893 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
12894 mono_type_get_desc() as well.
12896 2007-03-13 Jonathan Chambers <joncham@gmail.com>
12898 * icall.c: Fix environ access in VS.
12900 2007-03-13 Alp Toker <alp@atoker.com>
12902 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
12903 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
12906 2007-03-12 Zoltan Varga <vargaz@gmail.com>
12908 * reflection.c (mono_reflection_create_dynamic_method): Add support for
12909 circular references among dynamic methods. Fixes #81091.
12911 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
12913 2007-03-09 Martin Baulig <martin@ximian.com>
12915 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
12917 2007-03-09 Jonathan Chambers <joncham@gmail.com>
12919 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
12920 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
12922 Code is contributed under MIT/X11 license.
12924 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
12926 * loader.c: Reapply patch for bug #79424.
12928 2007-03-06 Zoltan Varga <vargaz@gmail.com>
12930 * metadata.c (mono_type_to_unmanaged): Only convert object to
12931 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
12933 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
12935 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
12936 (and incorrectly set) is_reference field from MonoGenericInst.
12938 2007-03-06 Zoltan Varga <vargaz@gmail.com>
12940 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
12943 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
12945 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
12947 2007-03-05 Miguel de Icaza <miguel@novell.com>
12949 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
12950 FileOptions.1 value to mean "temporary", map that to
12951 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
12955 2007-03-03 Marek Habersack <mhabersack@novell.com>
12957 * appdomain.c: implement MS .Net style shadow copying. Copies of
12958 the assemblies are made in a subdirectory of the dynamic base
12959 directory, the assembly names are preserved.
12960 Copy .mdb and .config files along with the assemblies being shadowed.
12962 2007-02-28 Zoltan Varga <vargaz@gmail.com>
12964 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
12965 (emit_marshal_handleref): Ditto.
12967 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
12968 on Visual C++. Fixes #80671.
12970 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12972 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
12973 for clone operations.
12975 2007-02-28 Zoltan Varga <vargaz@gmail.com>
12977 * marshal.c: Fix warnings.
12979 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
12981 * loader.c: allow case-insensitive matching of the dll name
12982 in dllmap handling when prefixed with "i:".
12984 2007-02-20 Jonathan Chambers <joncham@gmail.com>
12986 * threads.c: Fix #ifdef for dummy_apc function for VS.
12988 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
12990 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
12992 2007-02-19 Massimiliano Mantione <massi@ximian.com>
12993 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
12994 giving precedence to the methods with a fully qualified name
12995 (InterfaceName.MethodName) when building the interface sections
12998 2007-02-16 Dick Porter <dick@ximian.com>
13000 * threadpool.c (append_job): Fix fast-path array handling, so it's
13001 less likely the array will grow exponentially when the load is
13004 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13006 * metadata-internals.h, loader.c: fix dllmap lookup order
13007 for non-function maps, too, and prepare for fallback code.
13009 2007-02-12 Robert Jordan <robertj@gmx.net>
13011 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
13012 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
13013 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
13014 GlobalFree. Fixes a part of bug #77075.
13016 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
13018 * loader.c: implemented typedef parent in field memberref.
13020 2007-02-11 Jonathan Chambers <joncham@gmail.com>
13022 * marshal.c: Fix warnings and remember to call Release on
13025 Code is contributed under MIT/X11 license.
13027 2007-02-10 Miguel de Icaza <miguel@novell.com>
13029 * class-internals.h: Add MonoHandleRef definition, and
13030 handleref_class to mono_defaults.
13032 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
13033 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
13035 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
13036 (do nothing on this stage)
13037 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
13038 (emit_marshal_handleref): New method, used for argument handling
13041 2007-02-08 Jonathan Chambers <joncham@gmail.com>
13043 * class.c (mono_class_setup_parent): Lazily init com types.
13044 * domain.c (mono_init_internal, mono_init_com_types): Lazily
13046 * object.c (mono_remote_class_vtable): Lazily init com types.
13047 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
13048 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
13049 * domain-internals.h: Expose mono_init_com_types.
13050 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
13051 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
13052 Add support for COM Callable Wrapper marshalling.
13053 * marshal.h: Add icall definitions.
13054 * gc.c: Handle freeing of CCWs in finalizer code.
13056 Code is contributed under MIT/X11 license.
13058 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
13060 * reflection.c: changed all the signature encoding code to use
13061 a variable-sized buffer.
13063 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13065 * marshal.c: locking fixes: never take the loader lock
13066 or other runtime locks when holding the marshal lock
13069 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
13071 * marshal.c: make the delegate function pointer mapping
13072 work for the moving GC.
13074 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
13076 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
13079 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13081 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
13084 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13086 * threadpool.c: made the code moving-GC safe.
13088 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
13090 * assembly.c, boehm-gc.c, class-internals.h, class.c,
13091 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
13092 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
13094 * reflection.c: warning cleanup, some threading and moving GC fixes.
13096 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
13098 * class.c, loader.c: create the needed Set/Get/Address array methods
13099 as well as the .ctors in mono_class_init (), fixes bug #80567.
13101 2007-01-24 Zoltan Varga <vargaz@gmail.com>
13103 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
13104 we doesn't decrease its alignment. Should fix the sparc build.
13106 2007-01-24 Dick Porter <dick@ximian.com>
13109 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13110 Create the returned object if we need to ignore an unsupported
13111 socket option. Fixes a segfault reported by Atsushi.
13113 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13115 * class.c, object.c: restrict GC-tracked fields to
13116 UIntPtr fields used inside corlib, so we provide better
13117 type info to the GC and also allow broken packing as in
13120 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
13122 * sgen-gc.c: removed duplicated function.
13124 2007-01-19 Miguel de Icaza <miguel@novell.com>
13126 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
13127 value that means that the value is not supported, but that we
13128 should not return a failure, but instead report this as a
13129 successful operation.
13131 2007-01-19 Raja R Harinath <rharinath@novell.com>
13133 Fix tests/bug79956.2.il
13134 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
13135 (mono_generic_class_get_class): If the generic definition in an
13136 enum, copy over other fields related to it.
13138 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13140 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
13141 genericinst enums (bug #79215).
13143 2007-01-17 Massimiliano Mantione <massi@ximian.com>
13144 * class.c: Fix bug 80307.
13146 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
13148 * image.c: if the file table is not present, try to load
13149 all the modules, since we don't have info about them
13150 having or not metadata (bug #80517).
13151 * assembly.c: allow mono_assembly_load_references () to
13152 work for netmodules.
13154 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13156 * image.c, metadata-internals.h, object.c: execute module
13157 cctors when running on the 2 runtime if present (bug #80487).
13159 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13161 * icall.c: optimized InitializeArray() on bigendian.
13163 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
13165 * icall.c: fix for the broken ARM FPA double format.
13167 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13169 * icall.c: handle endian issues for r4 and r8 types, too, in
13170 the InitializeArray() icall.
13172 2007-01-15 Miguel de Icaza <miguel@novell.com>
13174 * loader.c (mono_loader_error_prepare_exception): Clear the error
13175 once we have extracted the information from it, do this before we
13176 call into the JIT's class loading mechanisms.
13178 * object.c (mono_class_create_runtime_vtable): Do not clear the
13179 loader error before calling mono_class_get_exception_for_failure
13180 as the loader error is needed inside
13181 mono_class_get_exception_for_failure to throw the error (thinko).
13185 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13187 * reflection.c: align fields rva data so it's faster to load at
13190 2007-01-12 Raja R Harinath <rharinath@novell.com>
13192 Prepare to simplify GenericMethod handling.
13193 * class-internals.h (mono_method_get_context): New accessor function.
13194 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
13195 rather than directly accessing '->context' field.
13197 * class-internals.h (_MonoGenericParam.method): Move ...
13198 (_MonoGenericContainer): ... here. Add into union with klass field.
13199 * class.c, icall.c, loader.c, metadata.c, reflection.c:
13202 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
13204 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
13205 the wrapper type enum and reduce relocations.
13207 2007-01-12 Raja R Harinath <rharinath@novell.com>
13209 * reflection.c (inflate_mono_method): Reuse method instantiation
13210 from the generic method, if available.
13212 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13214 * marshal.c (emit_marshal_variant): Fix conv_arg
13215 type in last commit, based on whether parameter is byref.
13217 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13219 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
13221 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
13222 MONO_TYPE_OBJECT back for VARIANT support.
13224 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13226 * marshal.c, marshal.h, icall-def.h: Implement
13227 Marshal.ReAllocCoTaskMem.
13229 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
13231 * marshal.c: memory retention fixes: use the proper
13232 image cache for runtime_invoke method lookups.
13234 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13236 * mempool.c: added code to help debug mempool allocations.
13238 2007-01-11 Dick Porter <dick@ximian.com>
13240 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
13241 support (experimenting with faking it with IP_MTU_DISCOVER for
13242 systems that don't have IP_DONTFRAGMENT.)
13243 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
13246 * icall-def.h: new System.Net.Sockets.Disconnect icall.
13248 * socket-io.h: Add new fields to MonoSocketAsyncResult
13249 corresponding to the new ones in Socket.cs.
13251 2007-01-11 Raja R Harinath <rharinath@novell.com>
13253 Fix IronPython regression mentioned in #80249
13254 * metadata.c (do_mono_metadata_parse_generic_class): Clear
13255 'cached_context' field, since it may have been initialized as a
13256 side-effect of metadata parsing.
13258 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
13259 (_MonoGenericClass.cached_class): Move here and rename from lone
13260 remaining field of ...
13261 (_MonoInflatedGenericClass): ... this. Remove.
13262 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
13265 Fix mcs/tests/test-128.cs regression.
13266 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
13267 2007-01-10 change below.
13268 [MONO_TYPE_OBJECT]: Recurse into array case.
13270 2007-01-11 Raja R Harinath <harinath@gmail.com>
13272 * class-internals.h (mono_get_inflated_generic_class): Remove.
13273 * class.c (mono_get_inflated_generic_class): Remove.
13274 (mono_generic_class_get_class): Rename from
13275 mono_class_create_generic.
13276 (mono_class_from_mono_type) [GENERICINST]: Use it.
13277 * reflection.c, metadata.c: Update to changes. Use
13278 'mono_class_from_mono_type'.
13280 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
13282 * reflection.c: use passed type when encoding an array element
13283 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
13285 2007-01-09 Robert Jordan <robertj@gmx.net>
13287 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
13288 result arguments (someDelegate.EndInvoke (unrelatedAres)).
13291 2007-01-09 Raja R Harinath <rharinath@novell.com>
13293 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
13295 * object.c (set_value): Avoid aliasing between type->data.klass
13296 and type->data.generic_class.
13298 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
13300 2007-01-08 Raja R Harinath <rharinath@novell.com>
13302 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
13303 between type->data.klass and type->data.generic_class.
13305 2007-01-08 Lluis Sanchez <lluis@ximian.com>
13307 * marshal.c: In MS.NET, StringBuilder objects are not copied by
13308 value in out parameters.
13310 2007-01-08 Raja R Harinath <rharinath@novell.com>
13312 Simplify invariant for MonoGenericClass::klass field.
13313 * class.c (mono_class_create_generic): Verify 'klass' is null.
13314 * metadata.c (do_mono_metadata_parse_generic_class): Don't
13315 initialize 'klass' field.
13317 2007-01-05 Raja R Harinath <rharinath@novell.com>
13319 Ongoing work to avoid redundant data and simplify invariants.
13320 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
13321 'generic_class', and change type to a GenericInst.
13322 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
13323 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
13325 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
13327 * class.c : skip io-layer under PLATFORM_WIN32.
13329 2007-01-03 Tor Lillqvist <tml@novell.com>
13331 Fix #80305: In a bundled executable, look in the bundled exe
13332 assembly to determine the runtime version. Add the possibility to
13333 bundle also the machine.config file.
13335 * assembly.c (mono_assembly_open_from_bundle): Make
13336 non-static. Allow being called even if we have no bundled
13337 assemblies, and return NULL right away in that case.
13339 * domain-internals.h: Declare mono_assembly_open_from_bundle()
13342 * domain.c (app_config_parse): Take an assembly exe file name as
13343 parameter instead of a config file name. Check for a bundled
13344 config file for that assembly by calling
13345 mono_config_string_for_assembly_file() (see below) before looking
13346 for one in the file system.
13347 (get_runtimes_from_exe): Corrsponding change to call of
13348 app_config_parse().
13349 (get_runtimes_from_exe): Check for bundled assembly exe file first
13350 by calling mono_assembly_open_from_bundle(). If no bundled
13351 assembly exe file is found, call mono_image_open() as before to
13352 look it up in the file system.
13354 * mono-config.c: Add variable bundled_machinec_onfig.
13355 (mono_config_string_for_assembly_file): New function.
13356 (mono_config_for_assembly): Move code snippet that looks for a
13357 bundled assembly .config file into the above new function. Call
13359 (mono_register_machine_config, mono_get_machine_config): New
13360 functions to set and retrieve
13362 * assembly.h: Declare mono_register_machine_config().
13364 * mono-config.h: Declare mono_get_machine_config() and
13365 mono_config_string_for_assembly_file().
13367 * icall.c: No declaration of environ necessary on Win32. It is
13368 declared (as a macro expanding to a function call) in stdlib.h.
13369 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
13370 New internal mono function. Returns the value of
13371 mono_get_machine_config() as a Mono string.
13373 * icall-def.h: Add get_bundled_machine_config().
13375 2007-01-04 Raja R Harinath <rharinath@novell.com>
13377 Remove redundant field
13378 * class-internals.h (_MonoGenericContext.container): Remove field.
13379 * loader.c (mono_method_get_signature_full): Don't parse a
13380 "container" for a signature parse when the signature is inflated
13382 (method_from_methodspec): Likewise, for a generic_inst.
13383 * class.c, metadata.c, reflection.c: Update to changes.
13385 2006-01-04 Raja R Harinath <rharinath@novell.com>
13387 * class-internals.h (_MonoGenericClass): Rename 'context' field to
13388 'cached_context', and change semantics -- it starts off NULL, and
13389 is initialized on demand.
13390 * class.c (mono_generic_class_get_context): New accessor to
13391 replace 'context' field accesses.
13392 (mono_class_get_context): New helper.
13393 (*): Update to changes.
13394 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
13396 2007-01-03 Miguel de Icaza <miguel@novell.com>
13398 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
13399 before the memcpy. Fixes Marshal2 regression.
13401 2007-01-02 Jb Evain <jbevain@gmail.com>
13403 * blob.h: add a MONO_TYPE_ENUM definition
13404 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
13405 fix the encoding of arrays of enums in custom attributes.
13409 2007-01-01 Miguel de Icaza <miguel@novell.com>
13411 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
13412 string is null terminated, but only cut the string short if it
13413 overflows the buffer.
13415 (mono_string_to_byvalstr): Also fix this routine. The code here
13416 was not properly terminating a string (it was only terminated
13417 because of the previous catch-all memset).
13419 I left the memset, because I do not know if applications expect
13420 the runtime to clear this region.
13424 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13425 Clear the error before returning to unmanaged code to prevent the
13426 runtime from being confused later on (fixes 80420).
13427 (ves_icall_type_from_name): Always call mono_loader_clear_error
13428 after parsing a type that could have failed.
13429 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
13431 * loader.c (mono_loader_clear_error): Fix indentation.
13433 2006-12-28 Martin Baulig <martin@ximian.com>
13435 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
13437 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
13439 * reflection.c: patch from Rolf Bjarne Kvinge to fix
13440 getting a token for an EnumBuilder.
13442 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
13444 * reflection.c: be more careful in case resource generation
13445 fails to create the data array.
13447 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
13449 * sgen-gc.c: write barrier for clone and fix unregister handles.
13451 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
13453 * reflection.c: some fixes needed in the generics code for the moving GC.
13455 2006-12-22 Robert Jordan <robertj@gmx.net>
13457 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
13458 account. Fixes bug #80299.
13460 2006-12-21 Raja R Harinath <rharinath@novell.com>
13462 Fix WaitHandle usage in delegates.
13463 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
13464 * object.c (mono_wait_handle_new): Use the property set method to
13465 initialize the handle.
13466 (mono_wait_handle_get_handle): New.
13467 * threadpool.c (mono_async_invoke): Use it.
13468 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
13470 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
13472 2006-12-21 Jonathan Chambers <joncham@gmail.com>
13474 * marshal.c (emit_marshal): Call emit_marshal_variant and
13475 emit_marshal_com_interface when applicable.
13476 (emit_marshal_variant, emit_marshal_com_interface): Add
13477 methods for this case and remove if's from emit_marshal_object.
13479 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
13481 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
13483 2006-12-19 Jonathan Chambers <joncham@gmail.com>
13485 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
13486 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
13487 and GlobalFree on Windows. Remove FIXME.
13489 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
13491 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
13492 implementation for managed objects.
13494 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13496 * object.c: implemented code to be used for checking
13497 that no reference field overlaps with non-references.
13499 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13501 * threadpool.c: fix queue code to be compatible with the
13504 2006-12-18 Miguel de Icaza <miguel@novell.com>
13506 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
13507 in structures by throwing ArgumentNullException.
13509 (emit_marshal_safehandle): Also when they are null parameters.
13511 (emit_marshal_safehandle): Add support for ref
13512 SafeHandles parameters
13514 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13516 * profiler.c: updated to use the mono-dl API instead of
13519 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13521 * profiler.c: updated to use the mono-dl dynamic loading
13522 API instead of gmodule.
13524 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
13526 * profiler.c: use readlink, older versions of glib don't have
13527 g_file_read_link ().
13529 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13531 * profiler.c: try to detect the path to mono if libc fails to provide
13532 a useful name (bug #80286).
13534 2006-12-16 Raja R Harinath <rharinath@novell.com>
13537 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
13538 instance, use the generic type definition instead.
13539 (ves_icall_Type_GetNestedTypes): Likewise.
13540 * class.c (mono_class_create_generic): Always set the
13541 nested_classes of a generic instance to NULL, even if the generic
13542 type definition has nested types.
13544 2006-12-15 Jonathan Chambers <joncham@gmail.com>
13546 * marshal.c (mono_string_from_bstr): Revert previous Windows change
13549 2006-12-15 Miguel de Icaza <miguel@novell.com>
13551 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
13552 my arguments were in the wrong order. I also fixed the Windows
13553 version which seems to have had the same issue.
13555 (mono_free_bstr): On Unix, this is g_free.
13556 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
13557 conversions (for the tests in corlib to pass).
13559 2006-12-14 Miguel de Icaza <miguel@novell.com>
13561 * marshal.c (emit_ptr_to_object_conv): For now, ignore
13562 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
13563 exception if a ref SafeHandle in a struct has changed).
13565 (emit_struct_conv): Do not perform layout checks for classes
13566 derived from SafeHandle, as those are specially handled.
13568 (emit_object_to_ptr_conv): Add support for
13569 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
13571 (emit_marshal_safehandle): Implement conversion of return values
13572 of safehandles (MARSHAL_ACTION_CONV_RESULT).
13574 * threads.c: WaitHandle now is compiled with two different handles
13575 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
13578 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
13579 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
13580 these routines to cope with both kinds of fields.
13582 2006-12-12 Miguel de Icaza <miguel@novell.com>
13584 * metadata.c (mono_type_to_unmanaged): Handle the case where
13585 type->data.klass is a SafeHandle, and in that case, return the
13586 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
13587 MONO_MARSHAL_CONV_SAFEHANDLE.
13589 2006-12-11 Miguel de Icaza <miguel@novell.com>
13591 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
13592 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
13593 calling emit_marshal_object.
13595 (emit_marshal_safehandle): Implement marshalling of
13596 SafeHandle parameters (no ref support yet).
13598 (MarshalAction): Document the defines as I implement
13599 them for SafeHandle.
13601 (emit_marshal_object): indentation police.
13603 * class-internals.h: Define MonoSafeHandle.
13604 Add safehandle_class to MonoDefaults type.
13606 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
13607 list of classes to check for fields.
13609 * domain.c (mono_init_internal): Add SafeHandle to the list of
13610 mono_defaults loaded.
13612 2006-12-15 Raja R Harinath <rharinath@novell.com>
13615 * reflection.c (mono_reflection_bind_generic_parameters): If the
13616 generic type definition is a type builder, ensure that it is fully
13617 initialized before instantiating it. Kill some dead code.
13619 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
13621 * object.c: clear the loader_error () before loading
13622 more metadata stuff (bug #80258).
13624 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
13626 * icall.c, icall-defs.h: type modifiers icalls for
13627 parameters and properties.
13629 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
13631 * object.c, icall.c: fixed warnings.
13633 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
13635 * marshal.c: fixed a couple of leaks and coding style in a few places.
13637 2006-12-08 Dick Porter <dick@ximian.com>
13639 * process.c: Cope with NULL ProcessStartInfo arguments on windows
13640 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
13643 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
13645 * process.c: ProcessStartInfo may have only filename set and
13646 arguments can be NULL.
13648 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13650 * icall.c: fix leak found by Robert Jordan.
13652 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
13654 * marshal.c, marshal.h: generate managed method to access an element
13655 of a multi-dimensional array.
13657 2006-11-30 Paolo Molaro (lupus@ximian.com)
13659 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
13661 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13663 * icall.c: back out GetFields () fix until the serialization code is
13664 fixed to not depend on the incorrect behaviour.
13666 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
13668 * profiler.c: provide defaults if none are set.
13670 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13672 * Makefile.am, attrdefs.h: new public header file with
13673 constants for attributes for use by embedders.
13675 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
13677 * icall.c: GetFields () fix for bug #80064.
13679 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
13681 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
13682 removed long unused icalls.
13684 2006-11-27 Jonathan Chambers <joncham@gmail.com>
13687 (mono_marshal_emit_managed_wrapper): Level of indirection for
13688 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
13689 can be generated without a delegate class.
13690 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
13692 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
13694 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13696 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
13699 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13701 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
13702 icall-def.h: added icalls needed by System.GC.
13704 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
13706 * loader.c: ensure the class in catch clauses is handled
13707 correctly for generics methods (fixes bug#79980).
13709 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
13711 * monitor.h, monitor.c: added mono_locks_dump () function
13712 to help debug deadlocks involving managed locks.
13714 2006-11-13 Dick Porter <dick@ximian.com>
13716 * file-io.c (get_file_attributes): If the file is a symlink try
13717 and get the stat data for the target, but also add the
13718 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
13719 the specs for the windows symlink support, but will probably have
13720 to be reworked when I have test data from a vista machine. Fixes
13723 2006-11-13 Dick Porter <dick@ximian.com>
13725 * gc.c (mono_domain_finalize):
13726 * marshal.c (mono_delegate_begin_invoke):
13727 * threadpool.c (socket_io_init, mono_thread_pool_init)
13728 (mono_thread_pool_finish):
13729 * monitor.c (mono_monitor_try_enter_internal):
13730 * threads.c (mono_thread_resume, mono_thread_init)
13731 (mono_thread_suspend_all_other_threads)
13732 (mono_thread_execute_interruption):
13733 * appdomain.c (mono_domain_unload): Check for NULL error returns
13734 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
13737 2006-11-11 Miguel de Icaza <miguel@novell.com>
13740 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
13741 Only close the handle if the value of the handle is not
13742 INVALID_HANDLE_VALUE. This just makes the process a bit more
13745 Improvement for #75733, so that we do not run into this problem.
13748 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
13749 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
13750 internal variables. Fixes #79462
13753 2006-11-09 Dick Porter <dick@ximian.com>
13755 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
13756 Use poll() not select(). Fixes bug 79397.
13758 2006-11-09 Raja R Harinath <rharinath@novell.com>
13761 * assembly.c (mono_assembly_load_from_full): Check that the given
13762 image has an assembly manifest.
13764 2006-11-09 Ankit Jain <jankit@novell.com>
13766 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
13767 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
13768 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
13770 2006-11-07 Dick Porter <dick@ximian.com>
13772 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
13773 Put the old resolver behaviour back for pre-2.0 profiles.
13775 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
13777 * threadpool.c: precise GC and locking fixes.
13779 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
13781 * class.c: don't load types that have an explicit unaligned
13782 managed reference. Provide better info in the TypeLoad exception.
13783 Part of the fix for bug #79744.
13784 * object.c: use the correct check for class type load issues.
13786 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
13788 * class.c: enforce alignment of fields with managed references
13789 even when Pack=1 is forced by the user (bug #77788).
13791 2006-11-03 Dick Porter <dick@ximian.com>
13793 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
13794 If the address reverse lookup fails, return it as the hostname
13795 anyway. Fixes bug 79721.
13797 2006-11-03 Dick Porter <dick@ximian.com>
13799 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
13800 Fix build on Windows.
13802 2006-11-02 Dick Porter <dick@ximian.com>
13805 * object-internals.h:
13806 * exception.c (mono_get_exception_thread_interrupted):
13807 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
13810 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
13811 Check for pending Thread.Interrupt.
13813 2006-10-27 Massimiliano Mantione <massi@ximian.com>
13814 * loader.c: Fixed bug 79684.
13816 2006-10-27 Dick Porter <dick@ximian.com>
13818 * file-io.c (get_file_attributes): Force symlinks to directories
13819 to be returned as a regular file. Fixes bug 79733.
13820 2006-10-26 Dick Porter <dick@ximian.com>
13822 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
13823 CreateFile to open a directory then we need to set the
13824 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
13826 2006-10-23 Zoltan Varga <vargaz@gmail.com>
13828 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
13831 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
13833 * sgengc.c: small cleanup of timer code.
13835 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13837 * sgen-gc.c: fix some warnings and start adding support for
13838 complete object removal on domain unload.
13840 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
13842 * assembly.c: build_assembly_name should not consider a version
13843 number without build or revision number invalid. Fixes bug #79715.
13845 2006-10-18 Jonathan Chambers <joncham@gmail.com>
13847 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
13848 call kernel32 function OutputDebugString directly.
13850 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
13852 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
13854 * reflection.c: small cleanup, using a function to insert a MonoString
13855 in the string heap.
13857 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
13859 * reflection.c: moving GC fixes.
13861 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
13863 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
13864 all the objects with finalizers belonging to an unloading appdomain.
13866 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13868 * sgen-gc.c: added ability to allocate even when the nursery is fully
13869 pinned and fixed a couple of bugs.
13871 2006-10-15 Zoltan Varga <vargaz@gmail.com>
13873 * threads.h: Revert the last change for now.
13875 * threads.h (mono_thread_get_pending_exception): Rename this to
13876 mono_thread_get_undeniable_exception ().
13878 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
13880 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
13881 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
13882 when fname does not refer to valid assembly. This result in a more
13883 meaningful error message.
13884 * exception.c: added mono_get_exception_bad_image_format2 which
13885 constructs a BadImageFormatException using the ctor taking a custom
13886 message and the file name. Passing in a NULL msg results in a default
13888 * exception.h: define mono_get_exception_bad_image_format2 function.
13889 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
13890 when file name pointed to an invalid IL image. Use
13891 mono_get_exception_file_not_found2 to construct FileNotFoundException,
13892 as this results in a more meaningful error message.
13894 2006-10-15 Zoltan Varga <vargaz@gmail.com>
13896 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
13899 2006-10-12 Zoltan Varga <vargaz@gmail.com>
13901 * metadata.c (mono_type_size): Change the align parameter to guint32 for
13902 consistency with the other _size functions.
13903 (mono_type_stack_size): Ditto.
13905 * class.c object.c icall.c: Fix warnings caused by the above change.
13907 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
13909 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
13911 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
13913 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
13915 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
13916 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
13917 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
13918 threadpool.h, threads-types.h: mark more internal functions.
13920 2006-10-11 Dick Porter <dick@ximian.com>
13922 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
13923 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
13924 reproduce the bug even before applying the fix.)
13926 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
13928 * reflection.c: allow retrieving attributes for arguments in generic
13929 methods (bug #79241).
13931 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
13933 * debug-mono-symfile.c: properly check fopen () result (found by
13936 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
13938 * reflection.c: make error message clearer and fixed two
13939 issuelets found by Coverity.
13941 2006-10-10 Zoltan Varga <vargaz@gmail.com>
13943 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
13945 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
13947 * object-internals.h, gc-internal.h, profiler-private.h:
13948 mark internal functions.
13950 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
13952 * reflection.c: put data in the text section.
13953 * icall.c: recognize more types in type_from_typename ().
13954 * process.c, marshal.c: added some GC FIXMEs.
13956 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13958 * loader.c: check for NULL before initializing.
13960 2006-10-09 Zoltan Varga <vargaz@gmail.com>
13962 * gc.c (finalizer_thread): Use a non-alertable wait here.
13964 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
13965 until the correct solution is found.
13967 2006-10-06 Zoltan Varga <vargaz@gmail.com>
13969 * reflection.c (mono_module_get_object): Avoid an assert when operating on
13970 modules with no metadata. Fixes #79596.
13972 * image.c (load_metadata_ptrs): Put back the error message when
13973 the #- heap is encountered since the support is not complete yet.
13975 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13977 * gc.c: do not allow the user to SuppressFinalize () a
13978 delegate because it would leak the trampoline if present.
13980 2006-10-06 Zoltan Varga <vargaz@gmail.com>
13982 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
13985 2006-10-05 Zoltan Varga <vargaz@gmail.com>
13987 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
13989 * metadata.c (mono_metadata_get_param_attrs): Ditto.
13991 * row-indexes.h: Add definitions for *Ptr tables.
13993 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
13995 * metadata.c (mono_metadata_translate_token_index): New helper function to
13996 translate table indexes used in uncompressed metadata.
13997 (mono_metadata_decode_table_row): Ditto.
13998 (mono_metadata_decode_table_row_col): Ditto.
14000 * metadata.c: Add table schema for *Ptr tables.
14002 * class.c loader.c: Use the new helper function to access the affected metadata
14005 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
14008 2006-10-04 Zoltan Varga <vargaz@gmail.com>
14010 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
14011 sequences which can be unbounded in size. Fixes #79583.
14013 2006-10-02 Zoltan Varga <vargaz@gmail.com>
14015 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
14016 static initialization.
14018 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
14020 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
14022 * domain.c (mono_domain_free): Free up type_init_exception_hash.
14024 * object.c (mono_runtime_class_init): Implement correct semantics when a static
14025 ctor fails, i.e. throw the same exception on subsequent accesses.
14027 2006-09-0 Jonathan Chambers <joncham@gmail.com>
14029 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
14030 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
14031 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
14032 Handle marshalling of interfaces and VARIANTs contained in structs.
14034 Code is contributed under MIT/X11 license.
14036 2006-09-30 Zoltan Varga <vargaz@gmail.com>
14038 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
14040 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
14043 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14045 * console-io.c: ignore previous SIGINT handler.
14047 2006-09-27 Zoltan Varga <vargaz@gmail.com>
14049 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
14050 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
14051 #79460, #79461, #79485.
14053 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
14055 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
14058 2006-09-26 Zoltan Varga <vargaz@gmail.com>
14060 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
14061 could be generated from it.
14063 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
14065 * rand.c: fix read loop to correctly handle EINTR.
14067 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14069 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
14070 internal calls are defined to keep methods closer to the declaring
14071 type and allow a significant reduction in runtime relocations and
14074 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
14076 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
14077 exception message to have FileNotFoundException use the default
14078 assembly load error message. Fixes bug #79426.
14079 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
14081 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14083 * threadpool.c: (start_thread_or_queue) use the root domain when
14084 creating the thread instead of the async object one.
14086 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
14088 * class.c, object.c, class-internals.h, reflection.c:
14089 for arrays, store element_size inside MonoClass (speedup
14090 for array object creation).
14092 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
14094 * icall.c: fixed CodeBase to use the file name and not the module
14097 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14099 * mono-debug.c, mono-debug.h: export find_method as
14100 mono_debug_find_method ().
14102 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14104 * debug-helpers.c, class-internals.h: added a few functions useful
14105 when debugging under gdb.
14107 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14109 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
14110 characters that need special handling.
14112 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
14114 * mono-config.c: make the os/cpu specification more flexible,
14115 allowing lists and negation.
14117 2006-09-18 Jonathan Chambers <joncham@gmail.com>
14119 * marshal.c: COM Interop fixes. Handle case where method->klass.
14120 is interface. Handle BSTR/MonoString when null. Use CDECL as
14121 calling convention on non-windows platforms. This is for
14122 compatibility with XPCOM and MainWin COM.
14124 Code is contributed under MIT/X11 license.
14127 2006-09-18 Zoltan Varga <vargaz@gmail.com>
14129 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
14130 correctly. Fixes #79217.
14132 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
14134 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
14136 * mono-config.c: allow both an os and cpu attribute for dllmap
14137 and dllentry elemnets to enable a single config file to be used
14138 for multiple architectures.
14140 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
14142 * loader.c: MonoLoaderError was cleared too soon on load failure.
14145 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
14147 * icall.c: use the defining class vtable when accessing a
14148 static field, not a pobblibly derived class.
14150 2006-09-17 Zoltan Varga <vargaz@gmail.com>
14152 * icall.c string-icalls.c: Remove references to unicode.h.
14154 * unicode.h unicode.c Makefile.am: Remove these unused source files.
14156 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
14158 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
14159 indicating the image where custom marshaller types should be looked up.
14160 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
14161 custom marshallers, instead of corlib. Fixes #79425.
14163 2006-09-14 Zoltan Varga <vargaz@gmail.com>
14165 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
14167 2006-09-14 Jonathan Chambers <joncham@gmail.com>
14169 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
14170 Implement Environment.ProcessorCount.
14172 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
14173 Implement Environment.ProcessorCount.
14176 Add Environment.ProcessorCount icall.
14178 Patch by Jason McFall.
14180 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14182 * assembly.c: don't append .exe/.dll when the filename already contains
14183 one of those extensions.
14185 2006-09-12 Martin Baulig <martin@ximian.com>
14187 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
14188 to array interfaces.
14190 2006-09-11 Martin Baulig <martin@ximian.com>
14192 * reflection.c (mono_image_build_metadata): Create the
14193 MethodImpl's after emitting all types and methods, so we don't
14194 need another fixup pass for them.
14196 2006-09-11 Zoltan Varga <vargaz@gmail.com>
14198 * class.c (mono_class_from_name_case): Fix regression introduced by the last
14201 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
14203 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
14206 2006-09-10 Zoltan Varga <vargaz@gmail.com>
14208 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
14209 args is not set. Fixes #78926.
14211 2006-09-08 Zoltan Varga <vargaz@gmail.com>
14213 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
14215 * image.c (load_class_names): Move this to class.c, and rename it to
14216 'mono_image_init_name_cache'.
14217 (load_modules): Fix a warning.
14219 * class.c icall.c image.c: Initialize image->name_cache lazily.
14221 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
14222 on its name using information in the AOT file.
14224 * class.c (mono_class_from_name): Use the new hook function.
14226 2006-09-06 Zoltan Varga <vargaz@gmail.com>
14228 * reflection.c (mono_param_get_objects): Handle enum default parameter values
14231 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
14234 2006-09-06 Martin Baulig <martin@ximian.com>
14236 * icall.c (mono_lookup_internal_call): Small fix.
14238 2006-09-05 Raja R Harinath <rharinath@novell.com>
14240 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
14243 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
14245 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
14246 when --debug is specified.
14248 2006-09-04 Zoltan Varga <vargaz@gmail.com>
14250 * class.c (setup_generic_array_ifaces): Fix a warning.
14252 2006-09-04 Miguel de Icaza <miguel@novell.com>
14254 * Temporarily remove the patch to assemly.c that checks the
14255 assembly versions as it breaks our gacutil.
14257 2006-09-03 Zoltan Varga <vargaz@gmail.com>
14259 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
14261 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
14264 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
14265 created using the default ctor. Fixes #79152.
14266 (mono_string_builder_to_utf16): Ditto.
14268 2006-09-01 Martin Baulig <martin@ximian.com>
14270 Fix handling of the generic array interfaces.
14272 * class-internals.h
14273 (MonoDefaults): Removed `generic_array_class' and added
14274 `generic_ilist' class.
14277 (mono_bounded_array_class_get): Add the new generic array interfaces.
14278 (setup_generic_array_ifaces): New static method; create vtable
14279 entries for each method in the generic array interfaces.
14282 (select_container): Allow "parent-less" generic methods.
14285 (mono_marshal_get_generic_array_helper): New public method.
14288 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
14289 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
14290 moved the interncall into System.Array.
14292 2006-09-01 Raja R Harinath <rharinath@novell.com>
14294 A few more cases of avoiding work on types with ->byref set.
14295 Has the real fix for #79238
14296 * icall.c (is_generic_parameter): New helper.
14297 (ves_icall_Type_GetGenericParameterPosition): Use it.
14298 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
14299 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
14300 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
14301 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
14303 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
14305 (ves_icall_Type_get_IsGenericInstance): Likewise.
14306 (ves_icall_Type_get_IsGenericType): Likewise.
14308 2006-09-01 Zoltan Varga <vargaz@gmail.com>
14310 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
14313 * mempool.h (mono_mempool_get_allocated): New helper function.
14315 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
14318 * mempool.c: Fix warnings and the calculation of stats.
14320 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
14322 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
14324 * loader.c (mono_get_method_from_token): Update method_count stat.
14326 * class-internals.h (MonoStats): Add some stats.
14328 2006-08-31 Robert Jordan <robertj@gmx.net>
14330 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
14331 with managed variants.
14332 All code is contributed under the MIT/X11 license.
14334 2006-08-31 Zoltan Varga <vargaz@gmail.com>
14336 * reflection.c (reflection_methodbuilder_to_mono_method): Set
14337 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
14339 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
14341 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
14342 with cycles in classes.
14344 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
14346 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
14347 missing a [MarshalAs] directive. Fixes #79203.
14349 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
14350 klass->marshal_info. Fixes #79217.
14352 2006-08-30 Martin Baulig <martin@ximian.com>
14354 Committing a patch from Joachim Ante <joe@otee.dk>:
14355 Add support for binary data symbol stores.
14357 * debug-mono-symfile.c
14358 (mono_debug_open_mono_symbol_file): Renamed into
14359 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
14363 (mono_debug_open_image): Added `raw_contents' and `size' args.
14364 (mono_debug_init_2_memory): New public function.
14366 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
14368 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
14370 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14372 * appdomain.c: implement support for ShadowCopyFiles.
14374 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
14376 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
14377 when value is NULL (and should remove CID #51).
14379 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14381 * image.c: moved 2 functions to ../utils.
14383 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
14385 * gc.c: cope with the target object of a GC handle being NULL
14388 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14390 * class.c: recursively check parent's explicit implementations
14391 of interface methods (fixes bug #79125).
14393 2006-08-19 Miguel de Icaza <miguel@novell.com>
14395 * filewatcher.c: Avoid warnings when building, do not redefine
14396 constants that are defined.
14400 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14402 * image.c: don't fail when the link points to an absolute path.
14404 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
14406 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
14409 2006-08-17 Miguel de Icaza <miguel@novell.com>
14411 * image.c (full_path): A new method used to obtain the actual path
14412 of an assembly even in the presence of symbolic links.
14414 This is necessary for the case where we are running a binary that
14415 has been GACed, but we are using the "published" path name
14416 ($prefix/mono/1.0/blah.exe) which happens to point to the real
14419 This was the source of the failure for the `xsp' command with the
14420 recent AppDomain changes, as far as the runtime was concerned,
14421 there were two different assemblies: $prefix/mono/1.0/blah.exe and
14422 $prefix/mono/gac/blah/version/blah.exe.
14424 (do_mono_image_open): use full path
14426 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14428 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
14430 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
14432 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
14433 domain_id is supplied. Fix CID #241 and corlib's unit tests.
14435 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14437 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
14438 small structures. Fixes #78990.
14440 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14442 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
14444 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
14446 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14449 * marshal.c: don't load all the assemblies from a domain into newly
14450 created ones. The new domains might have different rules and load
14451 assemblies from different locations. Fixes bug #76757.
14453 Patch by Lluis. Conflicts resolved by Brian Crowell.
14455 2006-08-16 Alp Toker <alp@atoker.com>
14457 * socket-io.c: First half of the fix for #79084.
14458 Set sa_size to the length of the content, not that of the struct.
14459 Don't add NULL suffix to the content, this should be done in
14460 managed code if needed.
14462 2006-08-14 Raja R Harinath <rharinath@novell.com>
14465 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
14466 mono_metadata_parse_type returns NULL.
14468 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
14470 * normalization-tables.h : new file for string normalization data.
14471 * locales.c, locales.h, icall.c :
14472 added load_normalization_resource() for string normalization,
14474 * Makefile.am : added normalization-tables.h to the sources.
14476 2006-08-13 Zoltan Varga <vargaz@gmail.com>
14478 * marshal.c: Add more helper functions to reduce code duplication and use them
14481 2006-08-12 Zoltan Varga <vargaz@gmail.com>
14483 * marshal.c: Fix non-x86 stdcall warnings.
14485 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
14488 2006-08-11 Jonathan Chambers <joncham@gmail.com>
14490 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
14491 type check on multi-dimensional arrays. Fixes #79000.
14493 2006-08-10 Jonathan Chambers <joncham@gmail.com>
14495 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
14496 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
14497 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
14498 * class-internals.h: add is_com_object to class structure.
14499 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
14500 null checks to COM object marshalling. Fix .ctor call on RCW.
14501 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
14503 All code is contributed under the MIT/X11 license.
14505 2006-08-09 Dick Porter <dick@ximian.com>
14507 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
14508 racing mono_monitor_allocator_lock() somewhere, so don't delete
14509 the critical section for now. Found by running and exiting
14512 2006-08-10 Zoltan Varga <vargaz@gmail.com>
14514 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
14515 (ves_icall_System_ComObject_FindInterface): Ditto.
14516 (ves_icall_System_ComObject_CacheInterface): Ditto.
14518 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
14519 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
14521 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14523 * threadpool.c: treat pipes from process asynchronous reads as sockets
14524 when reading from them, so we get select/poll or epoll to wait for
14527 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
14529 * loader.c: Fix a typo (CID #233) in the null check.
14531 2006-08-07 Zoltan Varga <vargaz@gmail.com>
14533 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
14534 Hopefully fixes #78949.
14536 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
14537 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
14538 bytes. Fixes #78972.
14540 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14542 * filewatcher.c: we need to set errno here.
14544 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14546 * filewatcher.c: let Win32Exception get the error value.
14548 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14550 * filewatcher.c: translate errno into win32 errors for Win32Exception
14551 to know what happened.
14553 2006-08-01 Zoltan Varga <vargaz@gmail.com>
14555 * threadpool.c: Fix more warnings.
14557 * assembly.c (search_loaded): Fix warnings.
14559 * threadpool.c (mono_thread_pool_finish): Fix warnings.
14560 (mono_async_invoke): Ditto.
14562 2006-07-28 Jonathan Chambers <joncham@gmail.com>
14564 * object.c (mono_remote_class_vtable): Need to create proxy vtable
14565 entries for __ComObject type in addition to ComImport types.
14566 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
14569 All code is contributed under the MIT/X11 license.
14571 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14573 * image.c: avoid tentative loading of modulerefs that contain
14574 no metadata (P/Invoke library names).
14576 2006-07-28 Dick Porter <dick@ximian.com>
14578 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
14579 mono_loader_lock() somewhere, so don't delete the critical section
14580 for now. Found by running and exiting monodevelop.
14582 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14584 * filewatcher.c: define the inotify syscalls when we're building on
14585 linux and have sys/syscall.h. The build system might not have support
14586 for inotify but the target system might have it.
14588 2006-07-26 Miguel de Icaza <miguel@novell.com>
14590 * domain.c: Documentation updates.
14592 * loader.c (mono_free_method): Do not release the method
14593 information if we are being profiled, as profilers will use this
14594 information at shut down to present some data to the user.
14596 This is needed so that the profiler does not crash, as the
14597 profiler tends to keep MonoMethods around, and they might become
14598 invalid if we free these.
14600 (mono_get_method_constrained): Return the original CIL stream
14601 method as well, so verification can be performed against it.
14603 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14605 * filewatcher.[ch]: support for inotify file system watcher.
14606 * icall.c: add new internal calls for the inotify file system watcher.
14608 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14610 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
14613 2006-07-20 Dick Porter <dick@ximian.com>
14615 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
14618 2006-07-20 Dick Porter <dick@ximian.com>
14620 * threads.c (start_wrapper): Do the thread cleanup while we still
14621 hold a reference to its object. Fixes bug 78123.
14623 2006-07-18 Kornél Pál <kornelpal@gmail.com>
14625 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
14626 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
14627 "managed-to-managed".
14628 * icall.c: Redirect string constructors that take sbyte* to
14629 ves_icall_System_String_ctor_RedirectToCreateString.
14630 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
14631 to CreateString () methods with matching signature.
14632 * reflection.c: Use original security informations for
14633 MONO_WRAPPER_MANAGED_TO_MANAGED.
14634 * security-manager.c: Use original security informations for
14635 MONO_WRAPPER_MANAGED_TO_MANAGED.
14636 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
14637 that is a placeholder and only its address should be used.
14638 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
14639 that is a placeholder and only its address should be used.
14641 2006-07-15 Jonathan Chambers <joncham@gmail.com>
14643 Begin implementing COM Interop.
14644 * appdomain.c: Increment corlib version.
14645 * class.c: Set ComImport classes' parent to __ComObject.
14646 * loader.c: Mark cominterop methods as such.
14647 * domain.c: Add __ComObject class to MonoDefaults structure.
14648 * image.c: Add 2 hashtables to the image for COM Interop related methods
14649 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
14650 using the mempool allocator
14652 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
14653 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
14654 declaration for mono_metadata_type_dup_mp.
14656 * debug-helpers.c: Added strings for two additional wrapper types
14657 * object.c: Create proxy objects for ComImport classes
14658 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
14659 and added __ComObject class to MonoDefaults structure.
14661 * object-internals.h: Finish MonoRealProxy definition, and add definition of
14662 MonoComInteropProxy and MonoComObject.
14664 * marshal.c: Added support for COM Interop
14665 (signature_cominterop): Converts managed signature to corresponding
14666 unmanaged COM signature.
14667 (cominterop_get_function_pointer): gets unmanaged function pointer via
14669 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
14670 (cominterop_get_method_interface): returns interface type that method is defined on
14671 (mono_mb_emit_cominterop_call): emits native call to function pointer
14673 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
14674 that matches signature of unmanaged function.
14675 (cominterop_get_native_wrapper): wrapper around adjusted method call.
14676 (cominterop_get_invoke): forwards call from proxy to __ComObject
14677 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
14678 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
14679 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
14681 * marshal.h: Added Marshal icall declarations.
14682 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
14683 so we can access them in finalizer
14685 2006-07-14 Dick Porter <dick@ximian.com>
14687 * object.c (mono_type_initialization_cleanup): Fix a race
14688 condition by temporarily commenting out the critical section
14691 2006-07-14 Zoltan Varga <vargaz@gmail.com>
14693 * reflection.c (create_custom_attr): Fix some warnings.
14694 (create_custom_attr_data): Ditto.
14695 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
14696 types. Fixes #78855.
14698 2006-07-11 Zoltan Varga <vargaz@gmail.com>
14700 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
14702 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
14704 2006-07-08 Zoltan Varga <vargaz@gmail.com>
14706 * reflection.c (resolve_object): Add support for DynamicMethod.
14708 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
14709 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
14711 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
14713 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
14714 don't leak GPtrArray's pdata has we have no use (nor free) for it.
14716 2006-07-01 Zoltan Varga <vargaz@gmail.com>
14718 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
14721 2006-06-30 Raja R Harinath <rharinath@novell.com>
14723 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
14724 slightly: remove a shadow local variable.
14726 2006-06-29 Raja R Harinath <rharinath@novell.com>
14728 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
14729 definition that introduces the virtual function slot.
14730 Also fix Coverity #105.
14732 2006-06-29 Zoltan Varga <vargaz@gmail.com>
14734 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
14735 for dynamic assemblies. Fixes #78724.
14737 2006-06-28 Zoltan Varga <vargaz@gmail.com>
14739 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
14742 2006-06-21 Martin Baulig <martin@ximian.com>
14745 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
14748 2006-06-21 Zoltan Varga <vargaz@gmail.com>
14750 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
14752 2006-06-20 Raja R Harinath <rharinath@novell.com>
14754 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
14756 * class.c (mono_class_create_from_typespec): Add 'context' argument.
14757 Inflate result if necessary.
14758 (mono_class_get_full): Remove old version. Rename from
14759 'mono_class_get' and add 'context' argument. Pass it to
14760 ..._create_from_typespec.
14761 (mono_class_get): New. Simple wrapper to mono_class_get_full.
14762 (mono_ldtoken): Revert change below.
14764 2006-06-20 Martin Baulig <martin@ximian.com>
14766 * class.c (mono_ldtoken): Don't pass the generic context to
14767 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
14769 2006-06-15 Zoltan Varga <vargaz@gmail.com>
14771 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
14772 and later freeing it. Fixes #78638.
14774 2006-06-15 Miguel de Icaza <miguel@novell.com>
14776 * icall.c (mono_class_get_throw): Revert over-zealous error
14777 throwing, the caller for mono_class_get_throw will cope with
14778 errors when classes are not properly initialized already.
14780 The code still copes with loader exceptions though.
14782 Fixes the regression in reftype1 and reftype3 from the CAS tests.
14784 2006-06-14 Miguel de Icaza <miguel@novell.com>
14786 Fixes the `make run1' version of RuntimeAbort (to be commited,
14787 source is in Bugzilla).
14789 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
14790 FALSE on class loading failure instead of returning true.
14792 * class.c (mono_class_create_from_typedef): It is possible for
14793 mono_metadata_interfaces_from_typedef_full to fail if a class is
14794 not found, cope with this.
14797 2006-06-14 Dick Porter <dick@ximian.com>
14800 * process.c: Fix a bunch of signed/unsigned warnings from gcc
14803 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
14805 * culture-info-table.h : oops, forgot to make it nsync with r61548.
14807 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
14809 * icall.c: Another fix for building mono in Visual Studio.
14811 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
14813 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
14815 2006-06-09 Martin Baulig <martin@ximian.com>
14817 * debug-mono-symfile.c: Put this back and really fix it this
14818 time. Sorry for all the trouble.
14820 2006-06-08 Zoltan Varga <vargaz@gmail.com>
14822 * icall.c (mono_class_get_throw): Fix a warning.
14823 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
14824 ReflectionTypeLoadException if needed. Fixes #78606.
14826 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
14827 (mono_class_init): Ditto.
14829 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
14830 ref_only exceptions.
14831 (mono_loader_clear_error): Make this work even if there is no error.
14833 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
14835 * object-internals.h marshal.c marshal.h icall.c: Implement method
14836 Marshal.GetComSlotForMethodInfo using internal call.
14838 2006-06-07 Zoltan Varga <vargaz@gmail.com>
14840 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
14841 a function for signalling it.
14843 * class.c (mono_class_from_typeref): Use the new kind of loader error when
14844 a referenced assembly is not found.
14846 * loader.c (mono_loader_error_prepare_exception): Add support for
14847 LOADER_ERROR_ASSEMBLY. Fix formatting.
14849 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
14851 * domain.c appdomain.c class-internals.h marshal.c: Add support
14852 for VARIANT marshalling on windows and increment corlib version
14853 since Variant struct was added.
14855 2006-06-03 Miguel de Icaza <miguel@novell.com>
14857 * debug-mono-symfile.c: Revert Martin's previous patch which broke
14858 stack trace line information:
14860 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
14861 (Martin) when looking up B which is between A and C, return A not C.
14865 Thanks to Alexander Olk for tracking this down.
14867 2006-06-02 Zoltan Varga <vargaz@gmail.com>
14869 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
14871 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
14872 avoid clobbering its value.
14873 (mono_string_to_lpstr): Fix a warning on windows.
14875 2006-05-31 Zoltan Varga <vargaz@gmail.com>
14877 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
14879 * reflection.c loader.c: Removed references to 'dummy' flag.
14881 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
14883 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
14884 it gets GC tracking.
14886 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
14889 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
14891 * marshal.c threadpool.c: Update callers of mono_async_result_new.
14893 * appdomain.c: Bump corlib version.
14895 2006-05-30 Zoltan Varga <vargaz@gmail.com>
14897 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
14898 CEE_STIND_REF when working with object references.
14900 2006-05-31 Zoltan Varga <vargaz@gmail.com>
14902 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
14905 2006-05-30 Miguel de Icaza <miguel@novell.com>
14907 * loader.c (method_from_memberref): Fix argument value for
14908 mono_loader_set_error_method_load (I was passing the MonoClass
14909 instead of the class name char *).
14911 2006-05-30 Zoltan Varga <vargaz@gmail.com>
14913 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
14914 CEE_STIND_REF when working with object references.
14916 2006-05-30 Martin Baulig <martin@ximian.com>
14918 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
14919 mono_method_full_name() change and replace the ':' with a '.'
14922 2006-05-30 Martin Baulig <martin@ximian.com>
14924 * debug-mono-symfile.c
14925 (mono_debug_symfile_lookup_location): Fix the algorithm:
14926 when looking up B which is between A and C, return A not C.
14928 2006-05-29 Martin Baulig <martin@ximian.com>
14931 (MonoDebugMethodInfo): Make the typedef public.
14932 (MonoDebugSourceLocation): New public struct.
14935 (mono_debug_source_location_from_address): Removed.
14936 (mono_debug_source_location_from_il_offset): Removed.
14937 (mono_debug_il_offset_from_address): Removed.
14938 (mono_debug_address_from_il_offset): Removed.
14939 (mono_debug_lookup_method): New public function.
14940 (mono_debug_lookup_source_location): New public function; replaces
14941 the old mono_debug_source_location_from_*() functions; see the
14942 inline documentation.
14943 (mono_debug_free_source_location): New public function.
14944 (mono_debug_print_stack_frame): New public function; see the
14945 inline documentation.
14947 * debug-mono-symfile.c
14948 (mono_debug_find_source_location): Renamed into
14949 mono_debug_symfile_lookup_location(); only take a
14950 `MonoDebugMethodInfo *' and an `offset' argument; added inline
14952 (mono_debug_find_method): Renamed into
14953 mono_debug_symfile_lookup_method().
14955 2006-05-27 Zoltan Varga <vargaz@gmail.com>
14957 * assembly.c (mono_assembly_open_full): Dont overwrite the status
14958 returned by mono_image_open_full ().
14960 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
14961 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
14964 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
14967 2006-05-27 Miguel de Icaza <miguel@novell.com>
14969 * class.c (mono_class_from_typeref): handle missing images
14970 earlier, deals with bug #78418. Refactor code;
14972 Fix a warning introduced in my previous commit (some stale code
14973 from before I revisited my patch).
14975 * class.c (mono_class_create_from_typedef): On failure, remove the
14976 class from the MonoImage->class_cache as the class is not
14977 initialized; Fixes the leak pointed out by Paolo.
14979 2006-05-25 Dick Porter <dick@ximian.com>
14981 * threads.c (mono_thread_cleanup): Build fix. Comment out the
14982 DeleteCriticalSections until I figure out which one may still be
14983 sometimes locked when mono_thread_cleanup is called.
14985 2006-05-24 Dick Porter <dick@ximian.com>
14987 * threads.c (mono_thread_cleanup): Move the threading cleanup out
14988 of mono_thread_manage and back into its own function, so it can be
14989 called after the finalizer thread has finished.
14991 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
14993 2006-05-24 Zoltan Varga <vargaz@gmail.com>
14995 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
14998 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
14999 with non-blittable elements.
15000 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
15002 2006-05-24 Martin Baulig <martin@ximian.com>
15004 * mono-debug-debugger.h (MonoDebuggerEvent): Added
15005 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
15007 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
15008 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
15009 `mono_debugger_event_handler' to NULL.
15011 2006-05-24 Martin Baulig <martin@ximian.com>
15013 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
15015 2006-05-24 Martin Baulig <martin@ximian.com>
15017 * mono-debug-debugger.h
15018 (mono_debugger_create_notification_function): Added
15019 `MonoCodeManager *' argument.
15021 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
15023 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
15025 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
15027 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
15028 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
15031 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
15033 * icall.c: precise GC support: objects can't be stored in unmanaged
15034 memory anymore, even if they are kept alive by other references: since
15035 they can move the GC needs to be able to always find them.
15037 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15039 * object.c: precise GC support for static fields. Support
15040 for moving GCs: write barriers and pinned allocation for interned
15043 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
15045 * domain.c, domain-internals.h: precise GC support for the MonoDomain
15048 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
15050 * class.c, gc.c: sgen and precise GC updates.
15052 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
15054 * marshal.h, marshal.c: added write barrier wrapper and precise type
15057 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
15059 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
15062 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
15064 * reflection.c: precise and sgen GC updates.
15066 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
15068 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
15070 2006-05-22 Zoltan Varga <vargaz@gmail.com>
15072 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
15074 2006-05-20 Zoltan Varga <vargaz@gmail.com>
15076 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
15077 MONO_TYPE_OBJECT. Fixes #78462.
15079 2006-05-18 Zoltan Varga <vargaz@gmail.com>
15081 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
15082 and blittable types.
15084 2006-05-17 Miguel de Icaza <miguel@novell.com>
15086 * class.c (mono_class_get_exception_for_failure): Implement parts
15087 of a TODO: if the loader error is set (instead of the class
15088 error), we return a Loader exception that can be properly thrown
15091 This was exposed by some Winforms 2.0 code that I tried to run
15092 (Atsushi pointed me to it).
15094 2006-05-17 Zoltan Varga <vargaz@gmail.com>
15096 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
15097 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
15099 * marshal.c (emit_marshal_vtype): Add limited support for
15100 UnmanagedType.LPStruct. Fixes #78427.
15102 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
15103 Applied a patch from kangaroo to fix #77523.
15105 2006-05-17 Martin Baulig <martin@ximian.com>
15108 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
15109 (debugger_thread_created): Removed.
15110 (debugger_thread_exited): Removed.
15112 2006-05-15 Zoltan Varga <vargaz@gmail.com>
15114 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15116 * object-internals.h (MonoReflectionResource): Sync with managed version.
15118 2006-05-12 Wade Berrier <wberrier@novell.com>
15120 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
15122 2006-05-12 Zoltan Varga <vargaz@gmail.com>
15124 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
15125 functions try to allocate from the image mempool.
15127 2006-05-12 Dick Porter <dick@ximian.com>
15129 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
15131 2006-05-12 Lluis Sanchez <lluis@ximian.com>
15133 * object.c: The FieldGetter and FieldSetter methods require the full
15134 name of the class, not only the name. Fixes bug #78277.
15136 2006-05-11 Miguel de Icaza <miguel@novell.com>
15138 * loader.c (method_from_memberref): Do not pass the NULL klass to
15139 mono_loader_set_error_() methods. Pass the non-NULL value
15142 2006-05-11 Zoltan Varga <vargaz@gmail.com>
15144 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
15145 (mono_assembly_close): Null out assembly->image->references after freeing it.
15147 * image.c (mono_image_close): Free image->references.
15149 * reflection.c (mono_image_basic_init): Fix a small memory leak.
15151 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
15153 * marshal.c: In function mono_mb_add_local don't use the mb pointer
15154 before checking if it's NULL (g_assert).
15156 2006-05-10 Martin Baulig <martin@ximian.com>
15158 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
15159 I thought I already killed that two months ago, but now it somehow reappeared.
15161 2006-05-10 Martin Baulig <martin@ximian.com>
15163 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
15165 2006-05-10 Zoltan Varga <vargaz@gmail.com>
15167 * reflection.c: Allocate memory for dynamically created methods in the image
15170 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
15172 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
15173 don't use the ad pointer before checking if it's NULL (g_assert).
15175 2006-05-09 Zoltan Varga <vargaz@gmail.com>
15177 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
15178 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
15180 * marshal.c: Allocate all signatures from mempools.
15182 * marshal.c: Allocate some more signatures from mempools.
15184 2006-05-09 Miguel de Icaza <miguel@novell.com>
15186 * object.c (mono_load_remote_field): The code used to provide a
15187 temporary variable for returning results if the user did not
15188 provide a result pointer. But our temporary variable was allocted
15191 Fix calling code to always pass a result area. Coverity ID 103.
15193 2006-05-06 Zoltan Varga <vargaz@gmail.com>
15195 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
15196 value, not the old. Fixes #78312.
15197 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
15199 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
15200 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
15203 * assembly.c (mono_assembly_close): Free image->references.
15205 * assembly.c (mono_assembly_names_equal): Fix a warning.
15206 (mono_assemblies_cleanup): Cleanup more global data.
15208 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
15210 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
15211 ptr_cache and image->modules.
15213 * image.c (mono_image_init): Allocate array_cache lazily.
15215 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15217 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
15218 behavior was changed recently and has bad side effects.
15220 2006-05-05 Zoltan Varga <vargaz@gmail.com>
15222 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
15224 * assembly.c (mono_assembly_close): Remove a debug printf.
15226 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
15228 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
15229 to also allow for temporary references between mono_image_open ()/close ().
15231 * domain.c (get_runtimes_from_exe): Add a FIXME.
15233 2006-05-04 Zoltan Varga <vargaz@gmail.com>
15235 * marshal.c: Fix support for dynamic methods.
15237 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
15239 * marshal.c (mono_marshal_cleanup): New cleanup function.
15241 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
15244 * class.c (mono_class_init): Fix leaking class->nested_classes.
15246 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
15248 * image.c (mono_image_init): Initialize the new cashes.
15250 * image.c (mono_image_close): Destroy the new cashes.
15252 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
15254 * mempool.c (mono_mempool_strdup): New helper function.
15256 * class-internals.h: Add prototype for mono_loader_unlock ().
15258 * domain.c (mono_jit_info_table_find): Fix a warning.
15259 (mono_debugger_check_runtime_version): Ditto.
15261 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
15262 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
15263 functions to these modules.
15265 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
15268 * marshal.c (mono_free_bstr): Fix a warning.
15270 * assembly.c (mono_assembly_open_full): Fix another small leak.
15272 * object.c: Fix some unload leaks in the remoting code.
15274 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
15277 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
15279 * reflection.c: Fix some unload leaks in dynamic assemblies.
15281 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
15283 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
15284 * marshal.h: Add BSTR support on Win32
15285 * icall.c: Add BSTR icalls
15286 * metadata.h: Add BSTR enums
15288 2006-04-28 Miguel de Icaza <miguel@novell.com>
15290 Work to catch the crash from #76795 and turn it into an
15291 exception. As I stubbed out pieces of the VisualBasic support,
15292 I found a number of places where the code was failing and I added
15293 checks to those places.
15295 * metadata.c (do_mono_metadata_parse_generic_class): Make this
15296 function return a status code. If we fail to parse the signature
15297 from mono_metadata_parse_generic_inst, return FALSE.
15299 * loader.c (mono_get_method_from_token): If we fail to load the
15300 method (mono_class_get) return NULL.
15302 * (method_from_memberref): Return NULL if we are unable to parse
15303 the method signature
15305 (mono_loader_error_prepare_exception): Since we now use the
15306 loader_error flag internally to stop processing, and obtaining
15307 exceptions that might be thrown will walk this code path the
15308 proper way of going from a MonoLoaderError into a
15309 MonoException was convoluted. This new routine encapsulates the
15310 process of turning the error into an exception and *clearing* the
15313 2006-04-27 Miguel de Icaza <miguel@novell.com>
15315 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
15316 with missing assemblies), and to cope with:
15318 * Missing fieldref from a non-existing assembly.
15319 * Missing methodref from a non-existing assembly.
15321 The first batch of work to address *some* of the issues from 76661.
15323 * object.c (mono_class_create_runtime_vtable): If we fail to
15324 initialize the class raise the exception here.
15326 * metadata.c (mono_class_get_overrides_full): If any methods fail
15327 to load return the failure to the caller.
15329 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
15330 flagging assemblies that failed to load.
15332 Do not crash if we are unable to load the assembly.
15334 (mono_assembly_close): Do nothing with REFERENCE_MISSING
15337 * loader.c (mono_loader_set_error_type_load): Change the
15338 convention to always pass unallocated strings, so we make our own
15339 copies (I know our own code had duplicated strings before, but
15340 this keeps the normal conventions).
15341 (method_from_memberref): Call mono_loader_set_error_method_load
15342 for all possible failures of loading the class.
15343 Remove assert, turn into a loader error.
15345 (mono_loader_error_to_exception): Move this routine from mini
15346 (mini_loader_error_to_exception) there was no need to have that in
15349 * class.c (mono_class_from_typeref): If we were not able to load
15350 the assembly with mono_assembly_load_reference, call the
15351 mono_loader_set_error_type_load to register the problem.
15353 (mono_class_setup_fields): If we fail to load the type from
15354 mono_metadata_parse_type_full, call mono_class_set_failure and
15355 break from the loop.
15357 If class->exception_type is set, we do not layout the fields as
15358 that might crash the runtime, and instead return (from breaking
15359 from the previous loop).
15361 (mono_class_setup_vtable): This now returns a boolean indicating
15362 whether the table was properly setup. The decision is driven by
15363 mono_class_get_overrides_full which might run into non-existing
15366 (mono_class_init): Returns TRUE on success or FALSE if there was a
15367 problem in loading the type (incorrect assemblies, missing
15368 assemblies, methods, etc).
15370 When we call mono_class_setup_fields we also check for a potential
15371 error inside this call (either a class exception or a general
15374 (mono_class_create_from_typedef): If the parent fails to load
15375 (calling mono_class_get_full) return NULL.
15379 calls to mono_metadata_parse_type_full should be checked
15380 everywhere and set the mono_class_set_failure
15381 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
15383 The current patch checks the places where my manually constructed
15384 tests show the errors are showing up, but we should do it
15389 mono_class_init return values should be tested everywhere, like
15390 the previous case this is something that we should audit
15391 everywhere and not only on the cases exposed by the tests I
15394 2006-04-26 Miguel de Icaza <miguel@novell.com>
15396 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
15397 boolean parameter and instead pass the information on `options'
15398 parameter (FileOptions).
15400 * icall.c: Register the new signature for MonoIO.Open.
15402 * debug-helpers.c (dis_one): Trying to understand how coverity
15403 works. Fix Run 5, item 78.
15405 2006-04-26 Dick Porter <dick@ximian.com>
15407 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
15410 2006-04-25 Martin Baulig <martin@ximian.com>
15412 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
15414 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
15415 debugger_thread_created().
15416 (debugger_gc_push_all_stacks): Don't handle the main thread in any
15418 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
15419 (mono_debugger_finalize_threads): New function; undo the effects
15420 of mono_debugger_init_threads().
15421 (mono_debugger_create_all_threads): Removed.
15423 2006-04-24 Zoltan Varga <vargaz@gmail.com>
15425 * image.c (mono_image_close): Tidy up trace messages.
15427 * assembly.c (mono_assembly_close): Ditto.
15429 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
15430 no longer references an already freed assembly. Fixes #78168.
15432 2006-04-21 Dick Porter <dick@ximian.com>
15434 * threads.c (mono_thread_detach): Fix reference counting when
15437 2006-04-21 Zoltan Varga <vargaz@gmail.com>
15439 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
15442 2006-04-19 Zoltan Varga <vargaz@gmail.com>
15444 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
15445 (mono_type_to_stind): Ditto.
15447 * marshal.c: Use the new helper functions to simplify code.
15449 * image.c (mono_image_close): Add some code for help debug assembly unloading
15452 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
15455 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
15456 assembly was already loaded in another appdomain. Fixes #78083.
15458 2006-04-13 Zoltan Varga <vargaz@gmail.com>
15460 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
15461 referenced assemblies.
15462 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
15464 * domain.c (mono_domain_free): Add a trace message.
15466 * appdomain.c (add_assemblies_to_domain): Ditto.
15468 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
15471 2006-04-12 Zoltan Varga <vargaz@gmail.com>
15473 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
15475 2006-04-12 Martin Baulig <martin@ximian.com>
15477 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
15478 `USE_INCLUDED_LIBGC'.
15480 2006-04-12 Zoltan Varga <vargaz@gmail.com>
15482 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
15483 the patch contains ../ and a small directory name later. Hopefully fixes
15486 2006-04-10 Martin Baulig <martin@ximian.com>
15488 Clean up the debugger's thread-handling code.
15490 The debugger's thread-handling code has been moved from
15491 ../mini/debug-debugger.c to threads.c. We now iterate directly
15492 over the `threads' hash, keep track of exiting threads and also
15493 use proper locking.
15495 We can now debug XSP and XSP based applications with the debugger.
15497 * object-internals.h (MonoThread): Added `gpointer end_stack'.
15500 (MonoThreadCallbacks): Removed; this was only used by the debugger.
15501 (mono_install_thread_callbacks): Likewise.
15503 * threads.c (mono_thread_callbacks): Removed.
15504 (debugger_thread_created, debugger_thread_exited): New static functions.
15505 (start_wrapper): Call debugger_thread_created().
15506 (thread_cleanup): Call debugger_thread_exited().
15507 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
15508 (mono_debugger_init_threads): New public function.
15509 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
15510 iterate directly over the `threads' hash and also use proper locking.
15512 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
15514 * mono-debug-debugger.h
15515 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
15517 2006-04-10 Zoltan Varga <vargaz@gmail.com>
15519 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
15520 argument type=array. Fixes #78057.
15522 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
15524 * culture-info-table.h : regenerated. Fixed bug #69652.
15526 2006-04-07 Zoltan Varga <vargaz@gmail.com>
15528 * loader.c metadata.c: Reapply a variant r59116.
15530 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
15532 * class.c (mono_class_setup_interface_offsets): New internal function.
15534 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
15535 interfaces too. Fixes #77398.
15537 * reflection.c (encode_cattr_value): Add support for
15538 parameter type=object, argument type=array.
15539 (load_cattr_value): Ditto. Fixes #77916.
15541 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
15542 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
15544 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
15545 a byval char array and CharSet is Ansi.
15547 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
15549 2006-04-06 Zoltan Varga <vargaz@gmail.com>
15551 * metadata.c: Add some locking comments.
15553 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
15555 (mono_metadata_free_method_signature): Don't free the signature itself.
15557 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
15559 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
15560 reference the same MonoImage.
15561 (mono_assembly_load_from_full): Add an assert.
15563 2006-04-05 Zoltan Varga <vargaz@gmail.com>
15565 * image.c (mono_image_close): Don't put the image we are about to free into the
15566 loaded_images_guid_hash.
15568 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
15569 to reduce code duplication.
15571 * marshal.c: Register the native functions called by this module as icalls, to
15572 somewhat centralize the creation of MonoMethodSignature's.
15574 * loader.c (mono_method_signature): Add a cache for method signatures.
15576 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
15577 the parameter attributes of a method.
15578 (mono_metadata_parse_method_signature_full): Refactored the computation of
15579 parameter attributes into a separate function. Also avoid one allocation in
15582 * assembly.c (mono_assembly_close): Ditto.
15584 * image.c (mono_image_close): Log trace messages with INFO level.
15586 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
15588 * image.c reflection.c: Correct reference counting of image modules.
15590 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
15591 of this function from the image mempool.
15593 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
15594 to allow more cached types to be used.
15596 * mono-debug.c (mono_debug_add_method): Appled patch from
15597 David S. Miller <davem@sunset.davemloft.net>: Access
15598 minfo->lexical_blocks[] entry elements using read32().
15600 2006-04-04 Zoltan Varga <vargaz@gmail.com>
15602 * loader.c (mono_free_method): No longer free the method header for non-dynamic
15603 methods as it is allocated from the mempool.
15605 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
15608 * metadata-internals.h: Add comments describing the reference counting scheme
15609 used for MonoImage and MonoAssembly.
15611 * image.c assembly.c reflection.c: Rework reference counting of images and
15612 assemblies so they are freed when the runtime is shut down. Free some
15613 additional memory structures when an image is unloaded.
15615 2006-04-03 Zoltan Varga <vargaz@gmail.com>
15617 * class.c loader.c reflection.c: Allocate more data structures in
15620 2006-03-31 Miguel de Icaza <miguel@novell.com>
15623 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
15624 build on pre glib 2.4 systems.
15626 2006-03-31 Zoltan Varga <vargaz@gmail.com>
15628 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
15630 * icall.c: Fix some warnings.
15632 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
15634 * culture-info-table.h : regenerated.
15636 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
15638 * threads.c, object-internals.h, verify.c: changed the culture caching
15639 code to use a normal MonoArray for storage so the GC can keep track of
15640 them easily. Fixed bits of the cache logic, too and simplified the
15643 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
15645 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
15646 thread for non-Boehm GCs.
15648 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
15650 * domain.c, object.c, domain-internals.h: reduce the amount of memory
15651 needed to keep track of the data for static fields.
15653 2006-03-29 Raja R Harinath <rharinath@novell.com>
15656 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
15657 for interface classes. Use 'num_methods' instead.
15658 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
15659 before using '->vtable_size' field.
15661 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
15663 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
15664 doesn't contain managed pointers, so use a normal hashtable.
15666 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
15668 * reflection.c, class-internals.h, domain.c: fixed handling of types
15669 used as values for objects in custom attributes (bug #77915):
15671 2006-03-24 Martin Baulig <martin@ximian.com>
15673 * class.c (mono_class_setup_fields): Added support for generic
15674 instances; fixes #77580.
15676 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15678 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
15680 2006-03-24 Dick Porter <dick@ximian.com>
15682 * file-io.c (get_file_attributes): More stat macro breakage.
15685 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
15687 * profiler.c: added the file=filename option in the default profiler
15688 to output the profile data to filename.
15690 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15692 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
15695 2006-03-22 Martin Baulig <martin@ximian.com>
15697 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
15698 allocated `MonoClassField *' in `fb->handle'.
15700 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
15702 * class.c, image.c, metadata-internals.h: implemented new mechanism to
15703 allocate interface ID to save memory and allow better ID reuse on
15704 appdomain unload. setup_generic_vtable () removal from Martin.
15706 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
15708 * object.h, appdomain.c, domain.c, exception.c, icall.c,
15709 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
15710 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
15711 write barriers for reference stores with managed objects accessed with
15712 C structures in the runtime and in embedding programs.
15714 2006-03-20 Raja R Harinath <rharinath@novell.com>
15716 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
15717 'interface_id' and 'max_interface_id' fields of MonoClasses
15718 representing open generic types.
15720 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
15722 * object.h, object.c, icall.c: added functions to deal with
15723 storing valuetypes that contain references in managed objects.
15724 * reflection.c, string-icalls.c, threads.c, marshal.c: small
15725 fixes and comments around uses of mono_array_addr ().
15727 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
15729 * object.h, icall.c, monitor.c: object.GetHashCode ()
15730 implementation that supports the moving garbage collector.
15732 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
15734 * icall.c, threads-types.h, threads.c: implemented finalizer for
15735 LocalDataStoreSlot.
15737 2006-03-15 Zoltan Varga <vargaz@gmail.com>
15739 * metadata.c (mono_type_size): Add a fixme.
15740 (mono_type_stack_size): Ditto.
15742 * object-internals.h (MonoReflectionAssemblyBuilder): Added
15743 'type_forwarders' field.
15745 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
15746 attribute from net 2.0.
15748 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
15751 * class.c (mono_class_setup_fields): Fix a warning.
15753 * class.c (mono_class_from_name): Add support for assemblyref entries
15754 in the EXPORTEDTYPE table.
15756 * reflection.c: Add support for handling type forwarders under net 2.0.
15758 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15760 2006-03-14 Zoltan Varga <vargaz@gmail.com>
15762 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
15763 overwriting entries in ModuleBuild->types, also clean up the code
15764 a little. Fixes #77774.
15766 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
15768 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
15769 load friend assembly info when present.
15771 2006-03-14 Raja R Harinath <rharinath@novell.com>
15773 Fix crasher on gtest-158.cs.
15774 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
15775 the return value if the MonoClass we want is yet in an
15776 inconsistent state.
15777 * class.c (mono_class_create_from_typedef): Add an comment
15778 explaining an order dependency between mono_class_setup_parent and
15779 mono_class_setup_mono_type.
15781 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
15783 * class.c: documentation updates and events bug fix.
15785 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
15787 * class.c: some cleanup, locking fixes.
15789 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15791 * class.c: fix the generics code to setup nested
15792 type info to the instantiated type (bug #77770).
15794 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
15796 * marshal.c: fixed a few type correctness issues.
15798 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15800 * loader.c: the Set/Get/Addrtess array methods should be public.
15802 2006-03-11 Zoltan Varga <vargaz@gmail.com>
15804 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
15806 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
15809 2006-03-10 Zoltan Varga <vargaz@gmail.com>
15811 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
15813 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
15815 * mempool.c (mono_mempool_alloc): Speed this up a bit.
15816 (mono_mempool_alloc0): Ditto.
15818 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15821 (create_object_from_sockaddr): it was allocating 4 extra bytes
15822 for the AF_UNIX data. Fixes bug #77747.
15824 2006-03-09 Zoltan Varga <vargaz@gmail.com>
15826 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
15828 2006-03-09 Dick Porter <dick@ximian.com>
15830 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
15831 Fixes bug 76966 again.
15833 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
15835 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
15837 * appdomain.c: Bumped corlib version to 48 (due to r57532)
15839 2006-03-07 Martin Baulig <martin@ximian.com>
15842 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
15844 2006-03-07 Martin Baulig <martin@ximian.com>
15847 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
15848 regression introduced in r56970; see gtest-252.cs.
15850 * loader.c (mono_get_method_constrained): Correctly handle generic
15851 methods; see gtest-253.cs.
15853 2006-03-04 Zoltan Varga <vargaz@gmail.com>
15855 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
15857 2006-03-04 Martin Baulig <martin@ximian.com>
15859 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
15860 compute the parent type at runtime, just like we're already doing
15864 (mono_reflection_bind_generic_parameters): Don't compute the
15865 parent type anymore.
15867 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
15869 2006-03-04 Martin Baulig <martin@ximian.com>
15871 * mono-debug-debugger.h
15872 (mono_debugger_create_notification_function): Allocate memory at
15873 runtime and return a pointer to it.
15875 2006-03-03 Zoltan Varga <vargaz@gmail.com>
15877 * assembly.c: Fix windows build.
15879 * assembly.c: Fix build.
15881 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
15883 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
15885 2006-03-03 Dick Porter <dick@ximian.com>
15888 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
15889 Check parameters before dereferencing them. Fixes Aaron's part of
15892 2006-03-03 Raja R Harinath <rharinath@novell.com>
15894 Fix performance regression.
15895 * loader.c (find_method_in_class): Add 'from_class' argument.
15896 Rename 'klass' argument to 'in_class'. The signature is compared
15897 against the method in 'in_class', and the corresponding method is
15898 returned from 'from_class'.
15899 (find_method): Walk both 'in_class' and 'from_class' in parallel.
15900 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
15901 type definition and generic instantiation in parallel.
15902 (mono_get_method_constrained): Update to changes.
15904 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
15906 * threads.c: make sure the domain is correct, too when doing
15907 mono_thread_attach ().
15909 2006-03-01 Zoltan Varga <vargaz@gmail.com>
15911 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
15912 windows. Fixes #77683.
15914 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
15916 * object.h, *: introduced specific way to set elements of an array
15917 of references to be used as write barrier. Still need to audit the
15918 uses of mono_array_addr.
15920 2006-03-01 Miguel de Icaza <miguel@novell.com>
15922 * object-internals.h: New field to cache the assmebly name, patch
15923 from Tambet Ingo (tambet@ximian.com)
15925 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
15927 * decimal.h, class-internals.h, metadata-internals.h,
15928 file-io.h: mark a few function declarations as internal, to
15929 reduce the number of PLT entries.
15931 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15933 * file-io.c: fix typo in warning message.
15935 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
15937 * loader.c: on unix, lookup the "*A" version of a function
15938 if charset is auto as a second option before failing.
15940 2006-02-28 Raja R Harinath <rharinath@novell.com>
15942 * class.h (mono_class_inflate_generic_method): Revert to two
15944 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
15945 (mono_class_inflate_generic_method_full): Add.
15946 * class.c (mono_class_inflate_generic_method_full): Rename from
15947 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
15948 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
15949 * loader.c, reflection.c: Update to changes.
15951 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
15953 * icall.c: const fixes and small improvements.
15955 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15957 * threadpool.c: for asynchronous connect(), enable the same workaround
15958 for BSD 6 as for the Mac. Fixes bug #77637.
15960 2006-02-24 Zoltan Varga <vargaz@gmail.com>
15962 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
15963 formatted classes. Fixes #77524.
15965 2006-02-24 Raja R Harinath <rharinath@novell.com>
15967 * class.c (inflate_generic_type): Add a couple more
15968 micro-optimizations.
15969 (inflate_generic_context): Don't use the 'gmethod' from
15971 (mono_class_inflate_generic_method): If the method has generic
15972 parameters, but the passed-in context doesn't have a 'gmethod',
15973 create one. Use the possibly simplified generic instantiation
15974 from the declaring class instead of the one passed in.
15976 2006-02-24 Raja R Harinath <harinath@gmail.com>
15978 Make generic method signature and method header handling lazy.
15979 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
15980 (inflate_generic_header): Likewise.
15981 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
15982 parameter to avoid inflating types.
15983 (mono_get_inflated_method): Empty out.
15984 * class.h (mono_class_inflate_generic_method): Update to changes.
15985 * loader.c (mono_get_method_from_token): Don't parse signature for
15986 generic methods, nor methods of generic classes.
15987 (mono_method_signature): Rename from 'mono_method_signature'.
15988 Inflate signature on demand.
15989 (mono_method_get_header): Inflate method header on demand.
15990 * reflection.c: Update to changes.
15992 2006-02-23 Raja R Harinath <rharinath@novell.com>
15994 * metadata.c (mono_metadata_inflate_generic_inst): If the
15995 instantiation is closed, don't bother expanding it in the new
15997 * class.c (inflate_generic_class): If the generic instantiation
15998 doesn't change after inflation, return the argument itself.
15999 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
16001 (inflate_generic_context): If neither the generic class nor the
16002 generic method instantiations change, return the original context.
16003 * reflection.c (mono_method_get_object): Do
16004 'mono_get_inflated_method' before accessing the ->klass field.
16005 (inflate_mono_method): Don't create a MonoGenericMethod unless
16007 (inflate_method): Don't pass a constructed type as the declaring
16008 type of a methodbuilder.
16010 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
16012 * object.c: fix memory overwrite.
16014 2006-02-22 Dick Porter <dick@ximian.com>
16016 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
16017 it doesn't work any more.
16018 (mono_threads_request_thread_dump): Fix unused variable warnings.
16020 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16022 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
16023 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
16024 the public header file.
16026 2006-02-21 Zoltan Varga <vargaz@gmail.com>
16028 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
16030 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16032 * class-internals.h, object.c: reduce the size of MonoVTable
16033 and store the interface_offsets array at negative offsets.
16035 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
16037 * metadata.c: tweak table descriptors data structures to reduce
16038 size and runtime relocations.
16040 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16042 * marshal.c: fix some types and opcodes to be type-safe
16043 in marshaling wrappers.
16045 2006-02-21 Ankit Jain <jankit@novell.com>
16047 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
16049 2006-02-21 Raja R Harinath <rharinath@novell.com>
16051 * metadata.c (get_constraints): Relax debugging checks for monodis.
16053 2006-02-21 Ankit Jain <jankit@novell.com>
16055 * metadata.c (mono_metadata_load_generic_params): Move the code
16056 checking for ambiguous generic params from here to mono/dis/get.c
16057 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
16059 2006-02-21 Raja R Harinath <harinath@gmail.com>
16061 Fix assertion triggered when compiling nemerle.
16062 * class.c (mono_get_shared_generic_inst): Rename from
16063 get_shared_inst and make non-static.
16064 * loader.c (mono_get_shared_generic_method): New. Used to create
16065 the MonoGenericContext-equivalent of a MonoGenericContainer.
16066 (mono_get_method_from_token): Initialize the 'context' field of
16067 the created MonoGenericContainer.
16068 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
16069 * metadata.c (get_constraints): Add sanity check.
16070 * class-internals.h: Add new internal methods.
16072 * reflection.c (verify_safe_for_managed_space): New sanity check.
16073 Currently checks that owner-less generic parameters aren't allowed
16075 (mono_type_get_object): Use it.
16076 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
16077 that are now in mono_type_get_object.
16078 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
16080 2006-02-19 Raja R Harinath <harinath@gmail.com>
16082 * metadata.c (mono_type_create_from_typespec): Rename from
16083 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
16084 argument and caching of types in the generic container.
16085 (unwrap_arrays, find_generic_param): Remove.
16086 * metadata-internals.h: Update.
16087 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
16089 2006-02-18 Zoltan Varga <vargaz@gmail.com>
16091 * class.c (mono_class_get_exception_for_failure): Fix a warning.
16093 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
16094 return values. Fixes #77581.
16096 * class.c (mono_fnptr_class_get): Switch name and name_space.
16098 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
16099 classes and add support for [In, Out] attributes.
16100 (mono_marshal_free_asany): Ditto. Fixes #77524.
16102 2006-02-18 Raja R Harinath <harinath@gmail.com>
16104 * class.c (mono_class_from_generic_parameter): Make more robust to
16105 incomplete MonoGenericContainers from monodis.
16107 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16109 * class-internals.h: added some more exception types.
16110 * class.c, metadata.c: added a few checks to handle missing
16113 2006-02-17 Raja R Harinath <rharinath@novell.com>
16115 Use owner-less generic-params some more.
16116 * class.c (my_mono_class_from_generic_parameter): Remove.
16117 (mono_class_from_generic_parameter): Handle null image,
16118 param->name and param->owner.
16119 (mono_class_from_mono_type): Update.
16120 (mono_class_create_from_typespec): Remove 'container' parameter.
16121 If that parameter is non-null, the result is always inflated by
16122 'mono_class_get_full' anyway.
16123 (mono_class_get): Rename from _mono_class_get. Remove 'container'
16125 (mono_class_get_full): Update.
16127 * class.c (inflate_generic_type) [GENERICINST]: If the generic
16128 instance is not open, don't bother inflating.
16129 (mono_class_setup_fields): Hoist some loop-invariants. Don't
16130 parse metadata for inflated classes.
16131 (_mono_class_get): Change GenericContext* parameter to
16133 (mono_class_create_from_typespec): Likewise. Simplify, and
16134 implement trivially. All the cases are handled in
16135 mono_class_from_mono_type. Don't inflate returned class.
16136 (mono_class_get_full): Delegate GENERICINST optimization to
16137 inflate_generic_type.
16138 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
16140 2006-02-16 Dick Porter <dick@ximian.com>
16142 * socket-io.c (create_object_from_sockaddr): Fix typo.
16143 (create_sockaddr_from_object): Check array lengths before
16144 potentially accessing items off the end.
16145 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
16146 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
16147 (ves_icall_System_Net_Sockets_Socket_Send_internal)
16148 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
16149 length checks to avoid wraparound overflows.
16150 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
16151 contents of the array of sockets
16152 (hostent_to_IPHostEntry2)
16153 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
16154 Check return value of inet_ntop ().
16155 (addrinfo_to_IPHostEntry): Fix typo
16157 2006-02-16 Raja R Harinath <rharinath@novell.com>
16159 Type metadata parsing doesn't use generic-instantiation information.
16160 * metadata.c (mono_metadata_parse_array_full): Change
16161 MonoGenericContext* parameter to MonoGenericContainer*.
16162 (mono_metadata_parse_type_full): Likewise.
16163 (mono_type_create_from_typespec_full): Likewise.
16164 (mono_metadata_parse_mh_full): Likewise.
16165 (mono_metadata_parse_generic_inst): Likewise.
16166 (do_mono_metadata_parse_generic_class): Likewise.
16167 (do_mono_metadata_parse_type): Likewise.
16168 * metadata-internals.h: Update to changes.
16169 * class.c (mono_class_find_enum_basetype): Likewise.
16170 (mono_class_setup_fields): Likewise.
16171 (mono_class_create_from_typespec): Likewise.
16172 * loader.c (method_from_methodspec): Likewise.
16173 (mono_get_method_from_token): Likewise.
16174 (mono_method_get_header): Likewise.
16176 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16178 * marshal.c: handle additional GENERICINST case (patch from
16179 Thong Nguyen <tum@veridicus.com>).
16180 Fix a few cases where LDIND_I/STIND_I was used for references.
16182 2006-02-16 Raja R Harinath <rharinath@novell.com>
16184 * reflection.c (mono_reflection_get_token): Remove unused variable.
16186 2006-02-16 Martin Baulig <martin@ximian.com>
16188 * reflection.c (mono_reflection_get_token): Add support for fields
16189 in instantiated generic types.
16192 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
16194 2006-02-15 Martin Baulig <martin@ximian.com>
16197 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
16198 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
16199 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
16200 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
16202 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16204 * class.c, metadata.c, metadata.h, object.c, icall.c,
16205 marshal.c: changed mono_type_get_underlying_type () to do
16206 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
16207 Fixed handling of instantiated generic valuetypes (bug #75479).
16209 2006-02-15 Raja R Harinath <rharinath@novell.com>
16211 * metadata.c (mono_metadata_decode_signed_value): Simplify.
16212 Delegate to mono_metadata_decode_value, and work on the returned value.
16214 * icall.c (ves_icall_MonoType_GetGenericArguments):
16215 Add consistency check here too.
16217 2006-02-15 Ankit Jain <jankit@novell.com>
16219 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
16222 2006-02-15 Ankit Jain <jankit@novell.com>
16224 * metadata.c (mono_metadata_decode_signed_value): New function to decode
16225 signed values, used only for representing lower bounds of arrays.
16226 (mono_metadata_parse_array_full): Use new
16227 mono_metadata_decode_signed_value to decode lower bounds.
16229 2006-02-14 Martin Baulig <martin@ximian.com>
16232 (mono_reflection_get_token): Support "MonoGenericMethod" and
16233 "MonoGenericCMethod" and allow generic instances / methods.
16235 2006-02-11 Zoltan Varga <vargaz@gmail.com>
16237 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
16238 to obtain the terminal size using an ioctl.
16240 * object.c (mono_nullable_init): Revert this as nullable reference
16241 types are not valid.
16242 (mono_nullable_box): Ditto.
16244 2006-02-09 Dick Porter <dick@ximian.com>
16246 * threads.c (mono_thread_detach): Drop a reference to the thread
16249 2006-02-09 Zoltan Varga <vargaz@gmail.com>
16251 * object.c (mono_nullable_init): Handle nullable reference types.
16252 (mono_nullable_box): Ditto. Fixes #77446.
16254 2006-02-07 Martin Baulig <martin@ximian.com>
16256 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
16258 2006-02-07 Ankit Jain <jankit@novell.com>
16260 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
16261 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
16262 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
16263 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
16264 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
16265 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
16267 2006-02-02 Zoltan Varga <vargaz@gmail.com>
16269 * class.c (mono_class_create_generic): Set type_token as well.
16271 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
16272 compatible with MS.
16274 2006-02-02 Martin Baulig <martin@ximian.com>
16276 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
16277 has never been used so far.
16279 2006-02-02 Martin Baulig <martin@ximian.com>
16281 * mono-debug-debugger.h: Changed comment at the top of this file;
16282 the header is not installed, but it's safe to #include it from
16285 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
16286 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
16288 2006-02-02 Martin Baulig <martin@ximian.com>
16291 (MonoSymbolTable): Removed the `metadata_info' field.
16294 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
16296 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16297 (mono_debugger_add_builtin_types): Removed.
16298 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
16299 (mono_debugger_create_notification_function): We now operate on a
16300 pre-allocated area; take a `gpointer' and return `void'.
16302 * mono-debug-debugger.c
16303 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
16304 (mono_debugger_add_builtin_types): Removed.
16306 2006-02-02 Martin Baulig <martin@ximian.com>
16308 * threads.c (mono_debugger_create_all_threads): New public method.
16310 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16312 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
16313 breaks on several platforms.
16315 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
16317 * assembly.c: the VS.NET build doesn't supply default values for
16318 MONO_ASSEMBLIES and MONO_CFG_DIR.
16320 2006-02-01 Zoltan Varga <vargaz@gmail.com>
16322 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
16325 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
16327 * loader.c (method_from_memberref): Fix a warning.
16329 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
16331 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
16332 with explicit layout. Fixes #77433.
16334 2006-01-31 Zoltan Varga <vargaz@gmail.com>
16336 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
16337 max_interface_id is initialized before using it. Fixes #77398.
16338 (ves_icall_Type_GetInterfaces): Ditto.
16340 2006-01-30 Raja R Harinath <rharinath@novell.com>
16342 * metadata.c (mono_metadata_parse_method_signature_full): Don't
16343 allocate memory for parameter attributes when parsing memberref
16345 * loader.c (mono_loader_set_error_method_load): Don't warn.
16346 (method_from_memberref): Ensure MissingMethodException gets thrown
16347 if method is not found. Make warning more informative.
16349 2006-01-29 Raja R Harinath <harinath@gmail.com>
16352 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
16353 return true if is byref.
16354 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
16355 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
16356 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
16358 2006-01-27 Raja R Harinath <rharinath@novell.com>
16360 Fix tests/find-method.2.il
16361 * loader.c (find_method, find_method_in_class): Remove is_inflated
16362 argument. Revert 2006-01-18 change.
16363 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
16364 is generic, search for method in its generic definition.
16365 * class.c (mono_class_setup_vtable_general): Print generic
16366 arguments of generic types in debugging printf.
16368 2006-01-26 Zoltan Varga <vargaz@gmail.com>
16370 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
16372 * threads.c (mono_threads_request_thread_dump): New helper function.
16374 2006-01-25 Raja R Harinath <rharinath@novell.com>
16376 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
16378 2006-01-25 Ankit Jain <jankit@novell.com>
16380 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
16381 move definition to ..
16382 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
16384 2006-01-25 Ankit Jain <jankit@novell.com>
16385 Raja R Harinath <rharinath@novell.com>
16387 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
16388 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
16391 2006-01-25 Martin Baulig <martin@ximian.com>
16393 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
16394 `MonoDebuggerThread' into debug-debugger.c.
16396 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
16398 * profiler.c: fix printing of data.
16400 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
16402 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
16403 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
16405 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16407 * object.c: fix deadlock related to string interning.
16409 2006-01-23 Martin Baulig <martin@ximian.com>
16411 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16413 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
16415 2006-01-23 Martin Baulig <martin@ximian.com>
16417 * mono-debug.h: Moved the prototypes of some functions which are
16418 used by the JIT here from mono-debug-debugger.h.
16420 2006-01-21 Martin Baulig <martin@ximian.com>
16422 * Makefile.am: Don't install mono-debug-debugger.h.
16424 2006-01-21 Martin Baulig <martin@ximian.com>
16426 * mono-debug-debugger.h: Enforce the private status of this header
16427 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
16428 Moved some stuff from mono-debugger-jit-wrapper.h here.
16430 2006-01-20 Raja R Harinath <rharinath@novell.com>
16432 * class.c (mono_class_from_typeref): Add a sanity test to help
16433 catch lack of assembly load/search hooks.
16435 2006-01-19 Zoltan Varga <vargaz@gmail.com>
16437 * marshal.c (emit_struct_conv): Relax the fields with same offset
16438 check even more. Fixes #77230.
16440 2006-01-18 Martin Baulig <martin@ximian.com>
16442 * loader.c (find_method_in_class): Added `gboolean is_inflated'
16443 argument; if false, we compare the uninstantiated signatures.
16444 (method_from_memberref): Compare the uninstantiated signatures;
16447 2006-01-18 Robert Jordan <robertj@gmx.net>
16449 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
16450 Clear the weak link. Fixes bug #77170.
16452 * gc.c (mono_gchandle_free):
16453 Reflect *-gc.c changes (tiny optimization).
16455 2006-01-18 Zoltan Varga <vargaz@gmail.com>
16457 * metadata.c (mono_metadata_signature_dup): Applied patch from
16458 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
16461 2006-01-17 Zoltan Varga <vargaz@gmail.com>
16463 * marshal.c (emit_struct_conv): Allow fields with the same offset when
16464 marshalling from native to managed code. Fixes #77230.
16466 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16468 * threadpool.c: fix problem (Mac only) when more than one asynchronous
16469 connect. Fixes bug #77020.
16471 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16473 * class.c: fixed id assignement for nested interfaces (bug #77275).
16474 Added also better info for --print-vtable debugging.
16476 2006-01-12 Martin Baulig <martin@ximian.com>
16478 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
16479 interfaces on-the-fly; fixes #76625.
16481 * class-internals.h
16482 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
16483 don't need that anymore.
16485 2006-01-12 Miguel de Icaza <miguel@novell.com>
16488 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
16489 To avoid initing the nested_classes when not needed I turned the
16490 PeerCredData as a toplevel internal class, as it has to be shared
16493 Fixes the CASA issue.
16495 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
16497 * domain.c: Accessors for MonoJitInfo
16499 * profiler-private.h: Add jitinfo to the end jit hook
16501 * profiler.[ch]: Define new hooks, called after jitting which give
16502 the MonoJitInfo that was compiled
16504 2006-01-10 Martin Baulig <martin@ximian.com>
16506 * class.c (mono_class_setup_events): Add support for generic
16507 classes; fixes #76440.
16509 2006-01-06 Raja R Harinath <rharinath@novell.com>
16512 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
16513 on passed-in method.
16515 2006-01-03 Zoltan Varga <vargaz@gmail.com>
16517 * object.c (mono_runtime_invoke_array): Add Nullable support.
16519 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
16521 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
16523 * file-io.c: Don't consider sockets as directory and avoid an endless
16524 loop. Fix bug #76966.
16526 2006-01-03 Zoltan Varga <vargaz@gmail.com>
16528 * object.c (mono_nullable_init): New helper function.
16529 (mono_nullable_box): Ditto.
16531 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
16533 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
16535 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
16537 2006-01-02 Zoltan Varga <vargaz@gmail.com>
16539 * class.c (mono_class_is_assignable_from): Make T assignable to
16542 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
16544 * appdomain.c: Bump corlib version to 46.
16545 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
16546 serialization purpose) and changed ves_icall_System_Reflection_
16547 Assembly_get_code_base signature to accept a boolean (to escape, or
16548 not, the assembly code base).
16550 2005-12-23 Dick Porter <dick@ximian.com>
16554 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
16555 CreateEvent icall now returns "created" boolean parameter.
16557 2005-12-22 Zoltan Varga <vargaz@gmail.com>
16559 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
16562 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
16563 when attr_klass is an interface. Fixes #77045.
16565 2005-12-20 Zoltan Varga <vargaz@gmail.com>
16567 * marshal.c (emit_struct_conv): Fix previous patch.
16569 * marshal.c (emit_struct_conv): Add a check for fields with the same
16572 2005-12-20 Raja R Harinath <rharinath@novell.com>
16574 Fix regression in Mono.C5.
16575 * class.c (mono_class_create_generic): If 'klass' is an interface
16576 set up the interface offsets.
16577 (mono_class_is_assignable_from): Don't throw away generic arguments.
16579 2005-12-19 Raja R Harinath <rharinath@novell.com>
16581 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
16584 2005-12-15 Raja R Harinath <rharinath@novell.com>
16586 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
16588 (do_mono_metadata_parse_generic_class): Don't pass the current
16589 generic context when parsing the type being instantiated: it
16590 cannot use it, anyway.
16592 * loader.c (method_from_memberref): Don't inflate a signature if
16593 it doesn't contain any type parameters.
16595 2005-12-15 Zoltan Varga <vargaz@gmail.com>
16597 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
16599 2005-12-14 Martin Baulig <martin@ximian.com>
16602 (mono_type_get_name_recurse): Don't return null for type
16603 parameters and open generic classes.
16604 (mono_class_setup_methods): Don't exclude generic instances.
16605 (mono_get_unique_iid): Use different IDs for different
16606 instantiations of the same generic type.
16607 (mono_class_setup_vtable): Only use setup_generic_vtable() for
16608 open generic instances; create a normal vtable for closed generic
16610 (mono_class_setup_vtable_general): We're now also called for
16611 closed generic instances.
16614 (mono_reflection_bind_generic_parameters): Correctly use
16615 mono_metadata_lookup_generic_inst() everywhere.
16617 2005-12-14 Zoltan Varga <vargaz@gmail.com>
16619 * object.c (mono_class_create_runtime_vtable): Call
16620 mono_class_setup_vtable ().
16622 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
16624 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
16627 * loader.c (mono_loader_set_error_type_load): Print the type load
16628 warnings to the console so they are more visible to the user.
16629 (mono_loader_set_error_method_load): Ditto.
16631 * reflection.c (ensure_runtime_vtable): Revert the last change as it
16634 * reflection.c (ensure_runtime_vtable): Fix build.
16636 * reflection.c (ensure_runtime_vtable): Disable an optimization which
16637 doesn't work in all cases.
16639 2005-12-13 Zoltan Varga <vargaz@gmail.com>
16641 * object.c (mono_array_new_full): Treat a single dimensional array
16642 with 0 lower bounds as an szarray. Fixes #76973.
16644 * reflection.c (custom_attr_visible): Really fix this.
16646 2005-12-12 Zoltan Varga <vargaz@gmail.com>
16648 * reflection.c (custom_attr_visible): Allow nested public attributes
16651 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
16654 2005-12-12 Raja R Harinath <harinath@gmail.com>
16656 * class.c (set_generic_param_owner): Delete.
16657 (mono_class_create_from_typedef): Don't set ->owner field of
16658 generic parameters to "param containers" of enclosing classes.
16659 * reflection.c (mono_reflection_initialize_generic_parameter):
16662 2005-12-11 Zoltan Varga <vargaz@gmail.com>
16664 * reflection.c (custom_attr_visible): Fix build.
16666 2005-12-10 Zoltan Varga <vargaz@gmail.com>
16668 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
16669 private attributes.
16671 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
16672 handling of null parameter defaults.
16674 2005-12-09 Raja R Harinath <rharinath@novell.com>
16676 * class.c (mono_class_from_generic_parameter): Don't set
16677 klass->generic_container.
16678 (my_mono_class_from_generic_parameter): Likewise.
16680 2005-12-07 Zoltan Varga <vargaz@gmail.com>
16682 * reflection.c (load_public_key): Fix a warning.
16683 (method_encode_code): Fix unaligned accesses.
16685 2005-12-07 Martin Baulig <martin@ximian.com>
16687 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
16690 (write_generic_param_entry): Encode our custom attrs.
16692 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
16694 2005-12-07 Martin Baulig <martin@ximian.com>
16696 * reflection.c (encode_new_constraint): Removed; we don't use the
16697 `NewConstraintAttribute' anymore.
16699 2005-12-06 Zoltan Varga <vargaz@gmail.com>
16701 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
16702 not fire a TypeResolve event when Assembly.GetType () is called.
16704 2005-12-05 Ben Maurer <bmaurer@ximian.com>
16706 Beginning of support for nullable types in the runtime. Parts of
16707 this patch are from Martin.
16709 * appdomain.c (MONO_CORLIB_VERSION): Bump
16711 * domain.c (mono_init_internal): get the nullable type
16713 * class.c (mono_class_is_nullable): New method
16714 (mono_class_get_nullable_param): New mehod
16715 (mono_class_create_generic): In types T? set cast_class to T
16717 * class-internals.h (MonoDefaults): new nullable default class
16718 (mono_class_get_nullable_param, mono_class_get_nullable_param):
16721 2005-12-05 Raja R Harinath <rharinath@novell.com>
16723 * metadata.c (select_container): New. Refactor code to select the
16724 appropriate GenericContainer given the type of generic parameter
16725 we are looking for.
16726 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
16727 not a MonoGenericContext. Use select_container. Update parameters.
16728 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
16729 and MONO_TYPE_MVAR.
16730 (unwrap_arrays): Remove duplicate tests.
16731 (find_generic_param): Rename from 'has_same_context'. Now walks a
16732 generic instantiated class to find any arguments that are generic
16734 (mono_type_create_from_typespec_full): Use find_generic_param to
16735 avoid evicting some generic instantiations from the typespec
16738 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
16740 * reflection.c: fixed writing of doubles on ARM FPA.
16742 2005-12-02 Robert Jordan <robertj@gmx.net>
16744 * icall.c: Fixed EventInfo.ReflectedType (#76829).
16746 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16748 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
16749 least on SUSE 10 they are not the same (on debian, they are just the
16752 2005-12-01 Raja R Harinath <rharinath@novell.com>
16754 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
16755 DeclaringType for VARs and MVARs.
16756 * class.c (set_generic_param_owner): Fix initialization of owner
16759 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
16761 * icall.c: fixed Enum.ToObject() to correctly convert the values.
16763 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16765 * threadpool.c: workaround for a bug that shows up on the Mac:
16766 select()+connect() on a blocking socket is not like it should
16767 be, so we proceed to connect() in that case, wasting the I/O
16768 threadpool thread until connect succeedes. Fixes bug #75436.
16770 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16772 * threadpool.c: fix typo when setting file descriptor states.
16774 2005-11-28 Raja R Harinath <rharinath@novell.com>
16776 * class-internals.h (MonoGenericContainer.is_signature): Remove.
16777 * metadata.c (mono_metadata_parse_method_signature_full): Don't
16778 create a temporary signature container.
16779 (mono_metadata_parse_generic_param): Update to changes.
16780 (mono_type_create_from_typespec_full): Update to changes.
16781 * loader.c (method_from_memberref): Don't use a
16782 MonoGenericContainer while parsing a memberref signature.
16783 (method_from_methodspec): Remove dead-store of the 'container'
16784 variable. It's overwritten before use.
16786 * metadata.c (mono_type_create_from_typespec_full): Make debugging
16788 (mono_metadata_parse_generic_param): Likewise.
16789 * loader.c (find_method_in_class): Does not need a
16790 MonoGenericContainer. Use 'mono_method_signature' rather than
16791 'mono_method_signature_full'.
16792 (find_method, mono_get_method_constrained, method_from_memberref):
16795 * metadata.c (mono_type_create_from_typespec_full): Ensure that
16796 owner-less generic-parameters are never evicted from the typespec
16799 * loader.c (method_from_memberref): Don't use the current context
16800 when parsing signatures.
16801 (method_from_methodspec, mono_get_method_from_token): Update to changes.
16803 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
16804 side-effects in g_assert.
16805 * loader.c (mono_get_method_from_token): Resolve klass earlier so
16806 that we don't potentially lose information.
16808 2005-11-26 Dick Porter <dick@ximian.com>
16811 * threads.c: icalls to implement basic (ie, not named)
16812 System.Threading.Semaphore.
16814 2005-11-24 Dick Porter <dick@ximian.com>
16817 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
16818 Use GetProcessId() if it's available.
16820 2005-11-23 Zoltan Varga <vargaz@gmail.com>
16822 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
16824 2005-11-23 Raja R Harinath <rharinath@novell.com>
16825 Ankit Jain <jankit@novell.com>
16827 * loader.c (mono_get_method_from_token): Initialize 'method' field
16828 of all generic parameters before parsing the signature. Remove
16829 code that "fixed"-up MVAR references.
16831 2005-11-23 Ankit Jain <jankit@novell.com>
16833 * metadata.c (mono_metadata_has_generic_params):
16834 (mono_metadata_load_generic_param_constraints):
16835 (mono_metadata_load_generic_params): Move duplicate code ...
16836 (mono_metadata_get_generic_param_row): ... here. Returns the
16837 first row-id in GenericParam table for a given owner (token).
16838 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
16841 2005-11-23 Raja R Harinath <rharinath@novell.com>
16842 Ankit Jain <jankit@novell.com>
16844 * metadata.c (mono_metadata_class_equal): Pass signature_only when
16845 comparing VARs too.
16846 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
16847 type->data.generic_param only if the type is an MVAR.
16848 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
16849 leak owner-less VARs and MVARs into managed space.
16851 2005-11-21 Martin Baulig <martin@ximian.com>
16853 * class-internals.h
16854 (MonoMethod): Moved the `generic_container' here from
16855 `MonoMethodNormal' since we now also need it for
16856 `MonoMethodPInvoke';
16857 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
16858 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
16859 an union containing both `MonoMethodNormal' and
16860 `MonoMethodPInvoke'.
16863 (mono_get_method_from_token): Allow implementing generic methods
16867 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
16870 2005-11-17 Dick Porter <dick@ximian.com>
16874 * process.c: Split the Process Start_internal icall into
16875 ShellExecuteEx_internal and CreateProcess_internal, which are
16876 called depending on whether UseShellExecute is true. Fixes bug
16879 * appdomain.c (MONO_CORLIB_VERSION): Incremented
16881 2005-11-17 Zoltan Varga <vargaz@gmail.com>
16883 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
16884 'msize' parameters, use the information in 'mspec' instead.
16885 (emit_object_to_ptr_conv): Ditto.
16887 * marshal.c (emit_struct_conv): Handle explicit layout structs with
16888 fields out of order. Fixes #76733.
16890 2005-11-17 Ankit Jain <jankit@novell.com>
16892 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
16894 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
16896 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
16899 2005-11-16 Zoltan Varga <vargaz@gmail.com>
16901 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
16902 for types with non-auto layout. Fixes #76717.
16904 2005-11-16 Ankit Jain <jankit@novell.com>
16906 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
16907 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
16908 if generic_context is null.
16909 (mono_metadata_generic_param_equal): param->owner can be null.
16910 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
16913 2005-11-16 Zoltan Varga <vargaz@gmail.com>
16915 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
16918 2005-11-15 Martin Baulig <martin@ximian.com>
16920 * object.c (set_value): Use mono_class_from_mono_type() instead of
16921 the hack for generic instances; fixes #76136.
16923 2005-11-15 Zoltan Varga <vargaz@gmail.com>
16925 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
16928 * image.c (load_metadata_ptrs): Initialize the new fields.
16930 * reflection.c (create_dynamic_mono_image): Ditto.
16932 * reflection.c (build_compressed_metadata): Use the new fields.
16934 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
16937 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
16940 2005-11-15 Ankit Jain <jankit@novell.com>
16941 Raja R Harinath <harinath@gmail.com>
16943 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
16944 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
16945 new per-generic_container cache if the cached MonoType's context matches
16946 the current context.
16947 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
16948 to the expected context.
16949 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
16951 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
16953 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
16954 we changed the signature of an icall.
16955 * icall.c: Modify to mono_double_ParseImpl return true/false
16956 depending on the success, instead of throwing the exception. This will
16957 help us in Double.TryParse methods.
16959 2005-11-14 Zoltan Varga <vargaz@gmail.com>
16961 * marshal.c (emit_marshal_object): Throw an exception when
16962 marshalling 'object' instead of crashing. Fixes #76696.
16964 2005-11-11 Zoltan Varga <vargaz@gmail.com>
16966 * class-internals.h: Add prototype for mono_type_get_full_name ().
16968 2005-11-11 Dick Porter <dick@ximian.com>
16970 * threads.c (mono_thread_manage): Make sure the main thread has
16971 abandoned all its mutexes when cleaning up. Fixes bug 74680.
16973 2005-11-11 Zoltan Varga <vargaz@gmail.com>
16975 * loader.c (mono_loader_set_error_type_load): Log a warning to the
16976 console about the missing type.
16977 (mono_loader_set_error_method_load): Ditto.
16979 2005-11-09 Miguel de Icaza <miguel@novell.com>
16981 * mono-config.c (mono_get_config_dir): Set the system defaults if
16984 * assembly.c (mono_set_dirs): New API entry point to set the
16985 assembly and the config directory in one call
16987 2005-11-09 Zoltan Varga <vargaz@gmail.com>
16989 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
16990 the ftnptr was created from a delegate in a domain other than the
16991 current domain. Fixes #75377.
16993 * exception.h exception.c: Add mono_get_exception_not_supported ().
16995 2005-11-08 Martin Baulig <martin@ximian.com>
16997 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
16999 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
17001 * security-manager.h: Added definitions to deal with strongname key
17002 pairs bigger (and smaller) than 1024 bits.
17003 * reflection.c: Remove hardcoded strongname size (128 bytes) and
17004 adjust wrt the public key length being used.
17006 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
17008 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
17009 Windows build (r51396-51397).
17011 2005-11-03 Martin Baulig <martin@ximian.com>
17013 * class.c (mono_class_setup_vtable_general): Also add generic
17014 methods to the vtable; fixes #76581.
17016 2005-11-01 Miguel de Icaza <miguel@novell.com>
17018 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
17019 sure that we lookup GetString method from the System.Text.Encoding
17020 class, not the derived class or we get an empty method.
17022 Fixed class #76612.
17024 2005-10-25 Miguel de Icaza <miguel@novell.com>
17026 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
17027 if it has been previously set (embedders).
17029 Make mono_set_rootdir available also on Unix.
17031 005-10-24 Robert Jordan <robertj@gmx.net>
17033 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
17035 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
17037 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
17038 only calls which are made to native code use this flag.
17040 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
17042 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
17044 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
17045 Add support for FieldBuilders.
17047 2005-10-29 Martin Baulig <martin@ximian.com>
17050 (mono_debug_using_mono_debugger): New public method; returns
17051 whether we're running inside the debugger.
17053 2005-10-27 Zoltan Varga <vargaz@gmail.com>
17055 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
17056 for Method/Constructor/FieldBuilders.
17058 2005-10-26 Zoltan Varga <vargaz@gmail.com>
17060 * reflection.c (module_add_cattrs): Save custom attributes for global methods
17061 and fields as well.
17063 2005-10-26 Martin Baulig <martin@ximian.com>
17065 * mono-debug-debugger.c
17066 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
17068 2005-10-24 Raja R Harinath <harinath@gmail.com>
17070 * icall.c (base64_to_byte_array): Don't pass an out-of-range
17071 integer to isspace.
17073 2005-10-21 Zoltan Varga <vargaz@gmail.com>
17075 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
17076 when passing valuetypes byref. Fixes #76502.
17078 2005-10-19 Jackson Harper <jackson@ximian.com>
17080 * profiler.c: Don't put a . in front of types that are not in a
17083 2005-10-18 Zoltan Varga <vargaz@gmail.com>
17085 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
17087 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
17089 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
17091 (mono_marshal_get_ldflda_wrapper): Fix a warning.
17093 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17095 * assembly.c metadata-internals.h icall.c: Define an additional
17096 parameter for mono_assembly_name_parse_full, so we can avoid creating
17097 S.R.AssemblyName.Version when no version info wasn't passed.
17099 2005-10-09 Miguel de Icaza <miguel@novell.com>
17101 * class.c (mono_type_get_full_name): Reimplement method that was
17104 * image.c: Some docs
17106 2005-10-10 Zoltan Varga <vargaz@gmail.com>
17108 * profiler.c (output_newobj_profile): Fix printing of Total memory
17111 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
17113 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
17115 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
17117 * threads.c: remove debug output.
17119 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
17121 * threads.c (mono_thread_manage): Fix crashes if more than 64
17122 threads need to be aborted. Hopefully fixes #75899.
17124 * assembly.c (mono_stringify_assembly_name): New helper function.
17126 * class.c: Use mono_stringify_assembly_name instead of the similar
17129 * assembly.h assembly.c: Add support for calling a postload search
17130 hook if an assembly cannot be loaded.
17132 * appdomain.c: Register new search hooks which call the AssemblyResolve
17133 events in AppDomain. Fixes #75231
17135 2005-10-07 Martin Baulig <martin@ximian.com>
17137 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
17138 methods without debug info.
17140 2005-10-07 Zoltan Varga <vargaz@gmail.com>
17142 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
17145 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17147 * file-io.c: now that we return symlinks, use lstat and, when the file
17148 is a symbolic link, stat, to get the file attributes. Also avoid the
17149 conversion to/from utf16/external.
17151 2005-10-06 Zoltan Varga <vargaz@gmail.com>
17153 * class.c (mono_class_layout_fields): Compute klass->has_references
17154 correctly if an embedded valuetype is not yet initialized. Fixes
17157 2005-10-04 Martin Baulig <martin@ximian.com>
17160 (mono_metadata_load_generic_param_constraints): New public
17161 function; splitted the constraints loading out from
17162 mono_metadata_load_generic_params().
17164 * class.c (mono_class_create_from_typedef): Call
17165 mono_metadata_load_generic_param_constraints() after setting up
17166 the type and creating our parent; fixes #75329.
17168 2005-10-04 Martin Baulig <martin@ximian.com>
17170 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
17171 non-dynamic parent classes.
17173 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
17175 * file-io.c : win32 build fix (ETXTBSY seems not found).
17177 2005-10-04 Martin Baulig <martin@ximian.com>
17180 (mono_image_get_methodspec_token): Make the cache actually work;
17183 2005-10-04 Martin Baulig <martin@ximian.com>
17185 * class.c (mono_class_name_from_token): Removed the unneccessary
17186 `MonoGenericContext *' argument.
17188 2005-10-04 Martin Baulig <martin@ximian.com>
17191 (method_from_methodspec): Make the caching work again; fixes the
17192 performance regression from #76262.
17194 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17198 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
17199 GetFileSystemEntries that performs the same work but without going
17200 into io-layer, locking, etc.
17202 2005-09-30 Zoltan Varga <vargaz@gmail.com>
17204 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
17205 ThreadState_Stopped as well. Fixes #76047.
17207 2005-09-29 Martin Baulig <martin@ximian.com>
17210 (inflate_generic_context): If the new context has a `gmethod', set
17211 its `container' that that gmethod's `container'.
17214 (mono_metadata_parse_generic_param): Simplify things;
17215 `generic_container = generic_context->container;' is just fine.
17217 * loader.c (method_from_methodspec): Code cleanups.
17219 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17221 * decimal.c: fix warning (and let gcc generate correct
17222 code on ARM with optimizations).
17224 2005-09-28 Martin Baulig <martin@ximian.com>
17227 (method_from_memberref): Added `MonoGenericContext *class_context'
17228 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
17229 (method_from_methodspec): If we're a memberref, use the enclosing
17230 context when parsing its parent. Fixes #76262; see gtest-206.cs.
17232 2005-09-28 Martin Baulig <martin@ximian.com>
17234 * object.c (mono_runtime_invoke_array): Added support for
17235 MONO_TYPE_GENERICINST; fixes #75917.
17237 2005-09-27 Martin Baulig <martin@ximian.com>
17239 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
17240 `k->byval_arg.type' to determine the actual type.
17242 * loader.c (method_from_methodspec): Removed some hacks.
17244 2005-09-27 Ben Maurer <bmaurer@ximian.com>
17246 * class-internals.h (mono_field_is_deleted): Do the test for
17247 rtspecialname before we check the actual name of the field. This
17248 prevents us from dereferencing a pointer into the string table,
17249 saving us from accessing a few pages
17251 * *.c: Replace the use of {Enter,Leave}CriticalSection with
17252 macros. This will allow a deadlock debugger to easily be plugged
17255 2005-09-27 Martin Baulig <martin@ximian.com>
17257 * loader.c (method_from_methodspec): Create a "signature"
17258 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
17260 2005-09-27 Martin Baulig <martin@ximian.com>
17263 (inflate_generic_class): Correctly set the new context's
17267 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
17268 instead of a `MonoGenericContext *'.
17269 (mono_method_signature_full): Take a `MonoGenericContainer *'
17270 instead of a `MonoGenericContext *'.
17273 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
17274 instead of a `MonoGenericContext *'.
17275 (mono_metadata_parse_method_signature_full): Likewise.
17277 2005-09-26 Martin Baulig <martin@ximian.com>
17280 (mono_class_from_generic_parameter): Set `klass->generic_container'
17281 (mono_class_from_generic_parameter): Likewise.
17282 (mono_bounded_array_class_get): We inherit the generic container
17283 from the element class.
17286 (find_method, find_method_in_class): Take a `MonoGenericContext *'
17287 argument rather than computing it here.
17288 (method_from_memberref): Correctly set the generic context before
17289 parsing the signature. Fixes #75681.
17291 2005-09-26 Zoltan Varga <vargaz@gmail.com>
17293 * object.c (mono_class_has_special_static_fields): Fix warnings.
17295 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17297 * assembly.c: Add parse_public_key function, to
17298 par the public keys. Also added mono_assembly_name_parse_full,
17299 to define it the parsed key should be freed or not.
17300 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
17301 to parse a long format assembly name.
17302 * metadata-internals.h: Keep mono_assembly_name_parse_full as
17303 private, since calling it to preserve the key requires
17304 freeing it manually.
17306 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
17308 * locales.c : removed HAVE_ICU part.
17310 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
17312 * object.c (mono_class_create_runtime_vtable): Avoid calling
17313 field_is_special_static if the klass has no special static fields.
17315 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
17316 (MonoCachedClassInfo): Likewise.
17318 * object.c (mono_class_has_special_static_fields): New helper function.
17320 2005-09-23 Zoltan Varga <vargaz@gmail.com>
17322 * class.c (mono_class_create_from_typedef): Don't call
17323 interfaces_from_typedef_full for enums.
17324 (mono_class_create_from_typedef): Compute the base types of enums directly
17325 without calling mono_class_setup_fields ().
17326 (mono_class_find_enum_basetype): New helper function.
17328 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
17329 one place inside the string heap.
17331 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
17333 * class.c: locking fixes, code cleanups, some docs added.
17334 Allocate some data structures in the image mempool.
17336 2005-09-23 Zoltan Varga <vargaz@gmail.com>
17338 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17341 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
17343 * class-internals.h, class.c, reflection.c: reduce memory taken by
17346 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
17348 * metadata.c, metadata.h, loader.h: documentation updates, code and
17351 2005-09-23 Zoltan Varga <vargaz@gmail.com>
17353 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17356 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
17357 page faults caused by the runtime while reading metadata.
17359 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17361 * socket-io.c: the field names were changed 3 months ago and no one
17362 realized until bug #76077 got filed!
17364 2005-09-20 Martin Baulig <martin@ximian.com>
17366 * icall.c (assembly_icalls): Removed some unused debugger icalls.
17368 2005-09-20 Martin Baulig <martin@ximian.com>
17370 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
17371 write the rank into the class entry.
17373 2005-09-20 Martin Baulig <martin@ximian.com>
17375 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
17377 2005-09-19 Zoltan Varga <vargaz@gmail.com>
17379 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17381 * icall.c (custom_attrs_defined_internal): New icall.
17383 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
17385 (mono_custom_attrs_construct_by_type): New helper function.
17387 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
17389 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
17390 terminate the resulting string. Fixes #76123.
17392 2005-09-16 Martin Baulig <martin@ximian.com>
17395 (mono_debug_add_method): Ignore inflated methods for the moment.
17397 2005-09-14 Martin Baulig <martin@ximian.com>
17399 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
17401 2005-09-13 Zoltan Varga <vargaz@gmail.com>
17403 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
17404 return a success/failure indication.
17405 (mono_metadata_interfaces_from_typedef_full): Ditto.
17406 (get_constraints): Ditto.
17408 2005-09-12 Zoltan Varga <vargaz@gmail.com>
17410 * marshal.c (emit_marshal_array): Fix handling of null arrays.
17412 * marshal.c (emit_marshal_array): Add support for returning string
17413 arrays from delegates. Fixes #76063.
17415 * marshal.c: Use the emit_ldloc/stloc macros where possible.
17417 2005-09-11 Zoltan Varga <vargaz@gmail.com>
17419 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
17422 2005-09-09 Zoltan Varga <vargaz@gmail.com>
17424 * reflection.c icall.c: Fix after mono_get_exception_type_load
17427 * assembly.c (mono_assembly_get_assemblyref): New helper function.
17428 (mono_assembly_load_reference): Use the new helper.
17430 * class-internals.h (MonoLoaderError): New structure containing
17431 information about type loading errors.
17433 * class-internals.h loader.c: Add APIs to store per-thread loader
17436 * loader.c class.c: Set the loader error if needed.
17438 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
17440 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
17442 * decimal.c: fixed to handle the broken ARM fp format.
17444 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
17446 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
17449 2005-09-06 Martin Baulig <martin@ximian.com>
17451 * domain.c (supported_runtimes): Added v2.0.50727.
17453 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
17455 * culture-info.h: reduce the size of some structures.
17457 2005-09-05 Martin Baulig <martin@ximian.com>
17459 Reflect latest API changes in the August CTP.
17462 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
17463 ("MonoType.HasGenericArguments"): Removed.
17464 ("MonoMethod.BindGenericParameters"): Renamed to
17465 "MakeGenericMethod".
17466 ("MethodBuilder.BindGenericParameters"): Renamed to
17467 "MakeGenericMethod".
17469 2005-09-05 Martin Baulig <martin@ximian.com>
17471 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
17473 2005-09-05 Martin Baulig <martin@ximian.com>
17475 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17477 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
17478 generic_container is non-NULL.
17480 2005-09-05 Martin Baulig <martin@ximian.com>
17482 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17484 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
17486 2005-08-29 Michal Moskal <malekith@nemerle.org>
17488 * reflection.c (encode_locals,
17489 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
17490 for large generic types.
17492 2005-09-05 Martin Baulig <martin@ximian.com>
17494 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17496 * class.c (mono_dup_array_type): New public method.
17497 (mono_metadata_signature_deep_dup): New public method.
17498 (dup_type): Correctly duplicate array and function types.
17500 2005-09-05 Martin Baulig <martin@ximian.com>
17502 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17504 * reflection.c (get_default_param_value_blobs): Handle generic types
17505 and generic methods.
17507 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
17509 * class.c: Fixed error reporting (method/class were inversed) for
17510 inheritance demands.
17511 * security-manager.c|h: Added the AppDomain when calling the managed
17512 System.Security.SecurityManager.InheritanceDemand method.
17514 2005-09-01 Raja R Harinath <rharinath@novell.com>
17516 * reflection.c (encode_marshal_blob): 'marshaltype' and
17517 'marshaltyperef' are alternate sources for the custom marshaler
17520 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
17522 * class.c: fix creation of array classes with rank == 1
17523 (patch by Ankit Jain <jankit@novell.com>).
17525 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
17527 * object.c: fix check for creating the bound data for arrays vs
17530 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17532 * object.c: configuration file name is now based on the executable name,
17533 not the image name. Fixes bug #75931.
17535 2005-08-29 Zoltan Varga <vargaz@gmail.com>
17537 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
17538 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
17540 2005-08-25 Zoltan Varga <vargaz@gmail.com>
17542 * rand.c: Use wincrypt.h instead of WinCrypt.h.
17544 2005-08-24 Ankit Jain <jankit@novell.com>
17545 Raja R Harinath <rharinath@novell.com>
17547 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
17548 called by it recursively.
17549 (mono_class_init): Remove special case in pending_init handling, since it's
17550 superseded by the fix to mono_class_from_typeref.
17552 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
17554 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
17555 BROKEN_THREAD_START stuff.
17557 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
17559 * class-internals.h object.c: Add a new kind of trampoline called a delegate
17562 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
17564 * object.c (mono_delegate_ctor): Replace the original function address with
17565 a delegate trampoline.
17567 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
17569 * icall.c: add boolean argument to base64_to_byte_array and
17570 InternalFromBase64String to control whether a whitespace-only string
17571 is allowed (or should casue a FormatException to be thrown). We need
17572 this as the behavior has changed between MS.NET 1.x and 2.0, and we
17573 to match the MS behaviour in both profiles.
17574 * appdomain.c: Bump corlib version.
17576 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17578 This patch implements a big portion of publisher policy
17579 support, used to bind assembly versions and redirect
17580 one assembly from version A to version B.
17583 New GSList loaded_assembly_bindings, for storing the cached
17585 (assembly_binding_maps_name): New static function for checking if a
17586 assembly binding information maps an assembly name.
17587 (mono_assembly_binding_info_free): New function for freeing
17588 assembly binding information resources.
17589 (get_publisher_policy_info): New static function for retrieving
17590 assembly binding information from a MonoImage.
17591 (compare_versions): New static function for comparing an assembly
17592 binding information data and the version of an assembly name.
17593 (check_policy_versions): New static function for checking if an
17594 assembly binding info mapping an assembly name is valid for it.
17595 (mono_assembly_load_publisher_policy): New static function for
17596 loading the 'policy.major.minor.MyAssembly' image for an assembly
17597 with an assembly name 'aname'.
17598 (mono_assembly_bind_version): New static function for updating
17599 assembly redirection.
17600 (mono_assembly_apply_binding): New static function for applying
17602 (search_binding_loaded): New static function for searching
17603 loaded assembly binding infos in the cache domain.
17604 (mono_assembly_load_full): Don't apply assembly binding for
17605 reflection only assemblies.
17607 * metadata-internals.h: Add MonoAssemblyBindingInfo,
17608 which contains information about assembly binding. Also
17609 declare signature for mono_config_parse_publisher_policy ()
17610 function, used to retrieve pub policy info.
17613 (publisher_policy_start): New static function used to parse publisher
17614 policy config files.
17615 (publisher_policy_parser): New static MonoParseHandler containing
17616 the functions used when parsing config files.
17617 (mono_config_parse_publisher_policy): New function for parsing
17618 publisher policy files.
17620 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
17622 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
17624 * marshal.c (mono_delegate_free_ftnptr): Ditto.
17626 * object.c (mono_get_addr_from_ftnptr): New helper function.
17628 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
17630 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17632 2005-08-19 Dick Porter <dick@ximian.com>
17634 * threads.c, threads.h, appdomain.c, appdomain.h,
17635 profiler-private.h, monitor.c, object.c, object-internals.h,
17636 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
17637 store the thread ID, so it can hold a 64 bit value if needed.
17639 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
17641 * reflection.c (mono_reflection_create_dynamic_method): Store the
17642 handle class into the method references as well so ldtoken works in
17645 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
17648 2005-08-19 Ankit Jain <jankit@novell.com>
17651 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
17652 here rather than using the method signature of a arbitrary function
17653 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
17655 Hack done with Harinath.
17657 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17659 * threadpool.c: disable printing stack traces when we get a exception
17660 in a threadpool thread. I need to do more testing to figure out which
17661 cases actually print this. Fixes bug #75828.
17663 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17665 * icall.c: there might be ignored whitespace after the last '='. This
17666 fixes length computation and bug #75840.
17668 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
17670 * assembly.c (mono_assembly_load_full): Consider .exe extension as
17671 well. Fixes #75809.
17673 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
17676 * reflection.c (create_custom_attr_data): Ditto.
17678 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
17680 * locales.c, culture-info.h : removed RegionLCIDMap.
17681 * culture-info-tables.h : regenerated.
17683 2005-08-16 Martin Baulig <martin@ximian.com>
17685 * class.c (mono_type_get_name_recurse): Small fix.
17687 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
17689 * locales.c : indentation fixie.
17691 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
17693 * object-internals.h,
17697 icall.c : added RegionInfo table support.
17698 * culture-info-table.h : regenerated for region support.
17700 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
17702 * reflection.c (resolve_object): handle all kinds of MonoMethod
17703 including generic ones
17705 2005-08-12 Ankit Jain <jankit@novell.com>
17707 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
17708 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
17710 2005-09-12 Lluis Sanchez <lluis@ximian.com>
17712 * process.c: Don't close a thread handle when it's NULL. This is a
17713 workaround for bug #75733.
17715 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
17717 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
17719 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
17721 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
17723 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17725 * threadpool.c: if a work item in the thread pool has a callback that
17726 catches a exception, don't propagate it after invoking the callback.
17729 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
17731 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
17733 * class-internals.h (MonoCachedClassInfo): Add some new fields.
17735 * class.c (mono_class_init): Load field info lazily in the AOT case.
17737 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
17739 2005-08-03 Ankit Jain <jankit@novell.com>
17742 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
17743 PInvoke calling convention is 0.
17745 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
17747 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
17748 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
17750 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
17752 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
17753 to handle threads not started by the GC (patch by Michael Meeks
17754 <michael.meeks@novell.com>).
17756 2005-07-31 Kamil Skalski <nazgul@omega.pl>
17758 * reflection.c: Make buffer used in emitting types larger for some
17759 big generic types (patch by Michal Moskal).
17761 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
17763 * mono-debug.c: Fix some (not all) alignment problems.
17765 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17767 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
17768 Invoke mono_image_load_from_data_full passing the refonly
17772 (mono_assembly_open_from_bundle): Add the refonly argument,
17773 in order to pass it to other methods it calls to.
17774 (do_mono_assembly_open): Add the refonly argument, in order
17775 to pass it to other methods it calls to.
17776 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
17777 the refonly parameter to it.
17779 * image.c: Add loaded_images_refonly_hash and
17780 loaded_images_refonly_guid_hash to cache the reflection
17781 only loaded images.
17782 (mono_images_init): Initialize the hash tables used for
17783 caching the reflection only images.
17784 (load_modules): Invoke mono_image_open_full passing the refonly
17785 parameter to load the modules the correct way.
17786 (build_guid_table): Add the refonly argument, to re-build the
17787 correct hash table.
17788 (do_mono_image_open): Added the refonly argument, in order to
17789 define it for the loaded image.
17790 (mono_image_loaded_full): New function, which receives an
17791 additional parameter to look for the image in the refonly or
17792 non-refonly section.
17793 (mono_image_loaded): Updated, using mono_image_loaded_full.
17794 (mono_image_loaded_by_guid_full): The same case that happens
17795 with mono_image_loaded_full.
17796 (mono_image_loaded_by_guid): Likewise.
17797 (register_image): Use the ref_only variable inside MonoImage
17798 to decide in which hash table store the current image.
17799 (mono_image_open_from_data_full): Rename
17800 mono_image_open_from_data to mono_image_open_from_data_full,
17801 adding the refonly argument, to define the ref_only variable
17803 (mono_image_open_from_data): Return
17804 mono_image_open_from_data_full.
17805 (mono_image_open_full): Rename mono_image_open to
17806 mono_image_open_full, receiving the new refonly argument,
17807 to pass it to inner methods.
17808 (mono_pe_file_open): Update this function, to open
17809 a MonoImage as a non-refonly image.
17810 (mono_image_close): Use the refonly variable inside
17811 MonoImage to remove the image from the correct caches.
17813 * image.h: Add the signatures of mono_image_open_full,
17814 mono_image_open_from_data_full, mono_image_loaded_full,
17815 mono_image_loaded_by_guid_full.
17817 * metadata-internals.h: Add the ref_only field to
17820 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17822 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
17823 Fix the last behavior, which used to load the assemblies and
17824 extract MonoReflectionAssemblyName information, instead of
17825 extract it from the metadata tables. Needed for Reflection
17828 2005-07-29 Martin Baulig <martin@ximian.com>
17830 * mono-debug-debugger.c
17831 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
17835 (mono_debug_address_from_il_offset): Check whether we have
17836 debugging support before attempting to take the lock.
17837 (mono_debug_source_location_from_address): Likewise.
17838 (mono_debug_source_location_from_il_offset): Likewise.
17839 (mono_debug_il_offset_from_address): Likewise.
17840 (mono_debug_address_from_il_offset): Likewise.
17842 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
17844 * class.c (mono_class_from_name_case): Add support for dynamic images.
17847 * object.c (mono_class_compute_gc_descriptor): Add a workaround
17850 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
17852 * reflection.c (mono_method_get_object): Fix warning.
17854 2005-07-28 Martin Baulig <martin@ximian.com>
17857 (mono_debug_add_wrapper): Also write the wrapper type.
17859 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
17861 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
17863 * class.c (mono_class_init): Avoid reading nested classes if the AOT
17864 data indicates the class has none.
17866 2005-07-26 Ben Maurer <bmaurer@ximian.com>
17868 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
17869 loader lock with the debugger lock. Prevents deadlocks for beagle.
17871 Beagle can now run on an smp box for a weekend without any
17874 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
17876 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
17877 in a module. Fixes #75629.
17879 2005-07-26 Martin Baulig <martin@ximian.com>
17881 * mono-debug.c (mono_debug_add_wrapper): New static method.
17882 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
17883 interncall or a wrapper.
17885 * mono-debug.h (MonoDebugWrapperData): New public typedef.
17886 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
17887 (MONO_DEBUGGER_VERSION): Bump to 51.
17889 * mono-debug-debugger.c
17890 (mono_debugger_add_type): Removed this empty function.
17891 (mono_debugger_add_method): Likewise.
17893 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
17895 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
17896 before accessing method->slot.
17898 2005-07-21 Jb Evain <jbevain@gmail.com>
17900 * reflection.c (method_encode_clauses/class): Handle filters clauses.
17903 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
17905 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
17908 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
17910 * image.h image.c: Add mono_image_get_guid () API function.
17912 2005-07-19 Ben Maurer <bmaurer@ximian.com>
17914 There were issues when multiple threads tried to load
17915 assemblies. A deadlock was created between assemblies_mutex and
17916 mono_domain_assemblies_lock. This fixes the issue by making the
17917 assembly ref counting be lock free. See bug 75586.
17919 * image.c (mono_image_close): The add ref function here was using
17920 Interlocked operations while the unref was using a mutex and a
17921 --. I don't think this was ever a bug that would be exposed in a
17922 non-pendantic way (ie, by an embedder doing a ref on one thread
17923 and an unref on another), but for the sake of correctness, this is
17926 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
17927 (mono_assembly_load_reference): Call mono_assembly_addref rather
17928 than touching the refcount ourselves.
17929 (mono_assembly_close): Use InterlockedDecrement to unref the
17930 assembly. Don't acquire the lock unless it is actually needed.
17932 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
17934 * class.c (mono_class_layout_fields): Fix calculation of has_references
17937 2005-07-12 Martin Baulig <martin@ximian.com>
17939 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17942 (mono_type_hash): Provide better hashing for generic instances.
17943 (mono_generic_inst_hash): Improve hashing.
17944 (mono_generic_class_hash): Likewise.
17946 * reflection.c (mymono_metadata_type_hash): Improve hashing for
17949 2005-07-12 Martin Baulig <martin@ximian.com>
17951 * reflection.c (mono_reflection_create_runtime_class): Remove the
17952 hack for generic type definitions and non-`Run' assemblies.
17953 (mono_reflection_bind_generic_parameters): Also use
17954 `klass->wastypebuilder' to check for TypeBuilders.
17956 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
17958 * class.c (mono_class_layout_fields): Fix calculation of has_references
17961 * class.c (inflate_generic_class): Fix a leak.
17962 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
17965 2005-07-11 Martin Baulig <martin@ximian.com>
17967 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
17970 2005-07-11 Martin Baulig <martin@ximian.com>
17972 * loader.c (find_method): Also lookup in
17973 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
17975 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
17977 * appdomain.c (mono_domain_unload): Don't free the error message
17978 before passing it to mono_get_exception_...
17980 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
17982 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
17984 * threads.c: try to better guess an available RT signal (bug #75387).
17986 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
17988 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
17991 2005-07-07 Martin Baulig <martin@ximian.com>
17993 * class.c (mono_type_get_name_full): Return NULL for
17994 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
17997 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
17999 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
18000 exit the appdomain as well being aborted.
18002 * threadpool.c: Create all threadpool threads inside the root appdomain, and
18003 change back to the root domain after calling managed code. This enables
18004 appdomains using threadpools to be unloaded.
18006 2005-07-07 Martin Baulig <martin@ximian.com>
18008 * class-internals.h
18009 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
18010 into `MonoDynamicGenericClass' since we only need it for dynamic
18013 * reflection.c (mono_class_bind_generic_parameters): We don't need
18014 to compute the `parent' here.
18016 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
18018 * culture-info-table.h : regenerated.
18020 2005-07-06 Martin Baulig <martin@ximian.com>
18023 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
18025 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
18027 2005-07-06 Martin Baulig <martin@ximian.com>
18029 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
18030 we're doing a signature-only comparision; fixes #74945.
18032 2005-07-06 Martin Baulig <martin@ximian.com>
18034 * class-internals.h (MonoGenericClass): Moved some things out into
18035 a new `MonoInflatedGenericClass' type.
18036 (MonoInflatedGenericClass): New type; the `klass' of a
18037 `MonoGenericClass' is now computed lazyly in
18038 mono_get_inflated_generic_class().
18040 * class.c (mono_get_inflated_generic_class): New public function.
18041 (mono_class_inflate_generic_method): Removed the unused
18042 `MonoClass *' argument.
18043 (setup_generic_vtable): Don't call mono_get_inflated_method() on
18045 (mono_class_create_generic): Make this static and merge it with
18046 mono_class_create_generic_2(); we're now called automatically from
18047 mono_get_inflated_generic_class().
18049 * loader.c (mono_method_signature): Call
18050 mono_get_inflated_method() here.
18052 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
18054 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
18055 type of fields with RVA.
18057 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
18058 for this pseudo class.
18059 (my_mono_class_from_generic_parameter): Likewise.
18060 (mono_class_init): Allow interfaces to have cctors.
18062 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
18064 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
18065 lazily for AOT methods.
18067 2005-07-05 Martin Baulig <martin@ximian.com>
18069 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
18070 returns FALSE for a successful match, not TRUE.
18072 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
18074 * loader.c (mono_method_get_index): Optimize this a bit.
18076 2005-07-04 Martin Baulig <martin@ximian.com>
18079 (class_compute_field_layout): Move the check for generic type
18080 definitions into mono_class_layout_fields(). Fixes #74684.
18081 (mono_class_from_generic_parameter): Correctly compute
18082 `klass->parent'; fixes #75457.
18084 * reflection.c (register_assembly, register_module): Make sure
18085 `domain->rejobject_hash' is already created.
18087 2005-07-02 Martin Baulig <martin@ximian.com>
18089 * class-internals.h
18090 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
18091 `MonoDynamicGenericClass'.
18093 2005-07-01 Lluis Sanchez <lluis@ximian.com>
18095 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
18096 returned by a field getter is null, since null is a valid value.
18098 2005-07-01 Martin Baulig <martin@ximian.com>
18100 * reflection.c (mono_reflection_generic_class_initialize): Update
18101 the `dgclass->fields [i].parent' to the correct class.
18102 (mono_image_get_fieldref_token): Use the declaring type, not the
18105 2005-07-01 Martin Baulig <martin@ximian.com>
18107 * loader.c (find_method): Also look in the interfaces; fixes #75429.
18109 2005-06-30 Ben Maurer <bmaurer@ximian.com>
18111 * threads.c (thread_cleanup): assert that thread != NULL
18112 (wait_for_tids_or_state_change): We were using the wrong variable
18113 when accessing wait->threads. `i' was always out of the bounds of
18116 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18118 * loader.c: map user32 and kernel32 to libMonoSupportW
18120 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
18122 * appdomain.c (unload_thread_main): Mark this as WINAPI.
18124 2005-06-28 Martin Baulig <martin@ximian.com>
18126 * loader.c (method_from_methodspec): Fix #75334.
18128 2005-06-28 Martin Baulig <martin@ximian.com>
18130 Fix #74953 - Arrays now implement the generic IList<T> interface
18131 on the 2.0 platform.
18133 * class-internals.h (MonoDefaults): Added `generic_array_class'.
18135 * reflection.c (mono_class_bind_generic_parameters): New public
18136 function; similar to mono_reflection_bind_generic_parameters(),
18137 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
18139 * domain.c (mono_init_internal): Try to initialize.
18140 `mono_defaults.generic_array_class' here; this'll only succeed if
18141 we're using the 2.0 corlib.
18144 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
18145 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
18146 (mono_lookup_internal_call): Added support for nested classes.
18149 (mono_get_method_from_token): Set `result->signature->pinvoke' if
18150 we're an interncall and have generic arguments.
18153 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
18154 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
18155 instance of System.Array.InternalArray<T> for arrays, so they
18156 implement the generic IList<T> interface.
18158 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
18160 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
18161 (chastamar@yahoo.com). Fixes #75374.
18163 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
18165 * culture-info-table.h: regenerated.
18167 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18169 * icall.c: handle spaces correctly for base64 strings.
18171 2005-06-26 Ben Maurer <bmaurer@ximian.com>
18173 * *.c: Kill some warnings.
18175 2005-06-23 Duncan Mak <duncan@novell.com>
18177 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
18178 that this builds on Solaris 10 (x86).
18180 2005-06-23 Martin Baulig <martin@ximian.com>
18183 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
18184 generic type definitions.
18186 2005-06-23 Martin Baulig <martin@ximian.com>
18190 * metadata.c (mono_class_get_overrides): Renamed to
18191 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
18192 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
18193 pass it to mono_get_method_full().
18195 2005-06-22 Ben Maurer <bmaurer@ximian.com>
18197 * reflection.c (mono_reflection_create_runtime_class): take the
18198 mono_domain_lock in this method. Prevents deadlocks
18200 2005-06-22 Martin Baulig <martin@ximian.com>
18202 * loader.c (method_from_methodspec): Fix #75330.
18204 2005-06-22 Martin Baulig <martin@ximian.com>
18206 * reflection.c (type_get_qualified_name): Use
18207 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
18208 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
18209 argument; use it if we don't have an assembly name.
18211 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
18213 * object.c: In mono_message_init, set "copy out" flag for in
18214 parameters with the [Out] flag.
18216 2005-06-21 Martin Baulig <martin@ximian.com>
18219 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
18222 2005-06-21 Martin Baulig <martin@ximian.com>
18224 * class.c (mono_class_init): Don't initialize `class->fields' for
18225 generic instances since they're initialized again in
18226 compute_field_layout().
18227 (compute_field_layout): Set the field's `generic_info' here; fix
18230 2005-06-21 Martin Baulig <martin@ximian.com>
18232 * class-internals.h
18233 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
18235 * metadata.c (mono_metadata_generic_method_equal): Also
18236 distinguish the `generic_class'; fixes #75334.
18238 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18242 * domain-internals.h:
18243 * reflection.c: 'domain_assemblies' field is now protected by its own
18244 lock. Don't call into managed code to run the AssemblyLoad event if we
18245 now there are no registered delegates for it.
18247 2005-06-20 Martin Baulig <martin@ximian.com>
18249 * class.c (mono_class_is_assignable_from): Use a custom version of
18250 mono_class_has_parent() to make things work for generic instances;
18253 2005-06-20 Martin Baulig <martin@ximian.com>
18255 * loader.c (method_from_methodspec): Apply a patch from
18256 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
18258 2005-06-20 Martin Baulig <martin@ximian.com>
18260 * class.c (mono_class_init): Reverted Zoltan's last change; it
18263 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
18265 * threads.c (wait_for_tids_or_state_change): Add missing locking.
18267 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18269 * socket-io.c: fix the index in the socket array for writable/error
18270 sockets. Fixes bug #75306.
18272 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
18274 * class.c (mono_class_init): Allow interfaces to have static ctors.
18276 2005-06-17 Martin Baulig <martin@ximian.com>
18278 * loader.c (method_from_methodspec): Use `context->container' when
18279 parsing the `gmethod->inst'.
18281 2005-06-17 Martin Baulig <martin@ximian.com>
18283 * class.c (mono_type_get_name_recurse): Don't add the assembly
18284 name for type arguments.
18286 2005-06-15 Martin Baulig <martin@ximian.com>
18288 * reflection.c (mono_image_get_inflated_method_token): Encode
18289 correct klass; fixes #75260.
18291 2005-06-13 Michal Moskal <malekith@nemerle.org>
18293 * icall.c: Make GetCorrespondingMethod/Constructor take
18294 MonoReflectionMethod method not MonoMethod. Removed
18295 MonoType.GetCorrespondingField, and make
18296 MonoGenericType.GetCorrespondingField take name not
18299 2005-06-13 Michal Moskal <malekith@nemerle.org>
18301 * reflection.c (field_encode_signature, encode_locals):
18302 Make sizes of buffers for types larger (for big generic types).
18303 (create_generic_typespec,
18304 mono_reflection_sighelper_get_signature_local,
18305 mono_reflection_sighelper_get_signature_field):
18306 Add asserts for too small buffers.
18308 2005-06-15 Martin Baulig <martin@ximian.com>
18310 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
18311 if our parent is not a dynamic type.
18313 2005-06-15 Martin Baulig <martin@ximian.com>
18315 * class-internals.h (MonoTypeNameFormat): New enum.
18318 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
18319 (mono_type_get_full_name): Removed.
18320 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
18321 argument instead of the boolean's.
18323 * icall.c (ves_icall_System_MonoType_getFullName):
18324 Added `gboolean assembly_qualified'.
18327 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
18329 * reflection.c (mono_reflection_parse_type): Parse the new type
18332 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18334 * icall.c: no need to convert from utf16 to utf8 and then back again
18335 after the call to GetLogicalDrives.
18337 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18339 * icall.c: frombase64. Fix problems exposed by new tests.
18341 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18343 * icall.c: added internal calls for converting char [] and strings in
18344 base64 into byte [].
18346 2005-06-10 Martin Baulig <martin@ximian.com>
18348 * class.c (mono_class_create_generic_2): Read the nested classes
18349 from the metadata rather than from `gklass->nested_classes' since
18350 `gklass' might not be initialized yet.
18352 2005-06-09 Duncan Mak <duncan@novell.com>
18354 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
18355 all public headers. Fixes #74919.
18357 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
18359 * domain.c: The key for proxy_vtable_hash is now a pointer
18360 array. Added new GHashFunc and GCompareFunc functions for this.
18362 * class.h: The list of interfaces in MonoRemoteClass is known in
18363 advance and can't grow (we create a new MonoRemoteClass if needed),
18364 so now the interface array can be allocated together with
18367 * object.c: Added a new method create_remote_class_key.
18368 Fixed mono_remote_class so it does not depend on
18369 mono_upgrade_remote_class.
18370 Removed extend_interface_array.
18371 Added new method clone_remote_class(), which makes a copy of a remote
18372 class and adds a new interface or class to it.
18373 mono_upgrade_remote_class() now creates a new remote class (or gets
18374 it from the cache) if an vtable upgrade is needed. In this way
18375 we make sure that other objects sharing the same remote class
18376 don't get the new vtable with unwanted interfaces.
18378 * object-internals.h:
18379 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
18381 * marshal.c: Track changes in mono_upgrade_remote_class().
18383 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
18384 * icall.c: Add runtime methods for obtaining members of inflated
18385 class, which were created from supplied non-inflated members. It
18386 is used in internal Get{Method,Constructor,Field} methods in
18389 2005-06-09 Martin Baulig <martin@ximian.com>
18392 (mono_reflection_bind_generic_method_parameters): Fix #75169.
18394 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18395 * reflection.c (mono_image_basic_init): Define
18396 Version in MonoDynamicAssembly.
18398 2005-06-08 Martin Baulig <martin@ximian.com>
18403 (mono_method_signature_full): New public method; takes a
18404 `MonoGenericContext *'.
18405 (find_method): Use mono_method_signature_full() and pass the
18406 klass'es context to it.
18408 * class.c (mono_class_is_inflated_method): Use
18409 mono_method_signature_full() and pass the context to it.
18411 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
18413 * object.c: add proper locking in mono_remote_class_vtable(),
18414 fixes possible memory corruption.
18416 2005-06-08 Michael Meeks <michael.meeks@novell.com>
18418 * marshal.c (mono_remoting_marshal_init): set
18419 initialized after initialization.
18421 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
18423 * locales.c : hush.
18425 2005-06-06 Michael Meeks <michael.meeks@novell.com>
18427 * object.c (extend_interface_array): fix really silly
18428 memory corrupting / comparison bug.
18430 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18432 * reflection.c: Functions added to support the creation
18433 of CustomAttributeData, which includes Attribute data
18434 used by ReflectionOnly methods.
18436 * reflection.h: mono_reflection_get_custom_attrs_data and
18437 mono_custom_attrs_data_construct added (functions exposed).
18439 * icall.c: Added mono_reflection_get_custom_attrs_data
18442 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
18444 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
18447 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
18449 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
18451 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
18452 dynamic DllImportAttribute.
18454 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
18455 dynamic DllImportAttribute.
18457 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
18460 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18462 * threads.c: avoid segfault when an unstarted thread is aborted.
18464 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
18466 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
18467 Returns the name and version of the runtime for reporting.
18469 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18471 * appdomain.c: bump corlib version.
18472 * object-internals.h: new field in MonoReflectionAssembly.
18474 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18476 * object-internals.h: Carlos forgot to add this field.
18478 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18480 * icall.c: Added create_version to create instances
18481 of Version of MonoReflectionAssemblyName. This change helps
18482 the AssemblyName tests to keep running fine.
18484 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
18486 * object.c (mono_method_return_message_restore): A somehow less
18487 intrusive fix for #75138.
18489 2005-06-03 Raja R Harinath <rharinath@novell.com>
18491 * object.c (mono_method_return_message_restore): Fix computation
18492 of expected number of out args.
18494 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
18496 * reflection.c (mono_image_get_method_info): Fix the case when the
18499 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
18501 * object.c: Added missing null check in
18502 mono_method_return_message_restore.
18504 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
18506 * reflection.c (mono_image_get_method_info): Handle the case when
18509 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
18511 * object.c: When creating the vtable for a proxy, take into account
18512 all inherited interfaces, not only the ones registered in
18513 iclass->interfaces. This fixs bug #74996.
18514 Also, in mono_method_return_message_restore, verify that the array
18515 of out args has the expected lengh.
18517 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18519 * socket-io.c: update the timeout in Poll when the call is interrupte.
18521 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18523 * socket-io.c: support abort/suspend in Select_internal after last
18526 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18528 * threadpool.c: remove warning.
18530 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18533 * socket-io.[ch]: Select_internal uses poll() now when available, thus
18534 removing the 1024 limit from select(). Runtime part of the fix for
18537 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18539 * socket-io.c: when resolving the addresses for the same
18540 host returned by gethostname(), get the local IPs from the interface
18541 list. Loopback addresses are discarded if the are interfaces up with
18542 non-loopback ones. Fixes bug #63265.
18544 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
18546 * appdomain.c, verify.c, object-internals.h, reflection.c:
18547 bumped corlib number to 36, and added new extra_flags field
18548 to ReflectionMethodBuilder and friends. Fixes #75060.
18550 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
18552 * gc.c: register a new weak link only if the object is non-null
18555 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
18557 * culture-info.h : short time pattern too.
18559 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
18561 * culture-info.h : expand long time pattern string length.
18563 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
18565 * culture-info-table.h : update (more French date format; #72788).
18567 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
18569 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
18570 the method is static. Fixes #75029.
18572 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
18574 * reflection.c: Update the table_idx field of method builders after
18575 saving the module, since it can change. This is a workaround for
18578 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
18580 * culture-info-table.h : update (additional French date format).
18582 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
18584 * icall.c (ves_icall_type_Equals): Revert last change.
18586 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
18588 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
18590 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
18592 * class-internals.h: Added executioncontext_class field to
18593 MonoDefaults structure.
18594 * domain.c: Cache System.Threading.ExecutionContext class in
18596 * object.c: Capture the ExecutionContext for asynchroneous calls in
18597 mono_async_result_new.
18598 * object-internals.h: Added execution_context and original_context
18599 fields to MonoAsyncResult. Added execution_context to MonoThread.
18600 * security-manager.c|.h: Added mono_get_context_capture_method to
18601 return the capture method (if required by the security manager or by
18602 the framework version used).
18603 * threadpool.c: Apply capture (if present) ExecutionContext in
18604 mono_async_invoke and revert to original context after it completes.
18606 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
18608 * culture-info-table.h : updated (real hacky solution for zh-CHT).
18610 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
18612 * culture-info-table.h : zh-CHT related workaround.
18614 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
18616 * marshal.c (emit_marshal_custom): Add some error checking and call the
18617 methods in the ICustomMarshaler interface. Fixes #74875.
18619 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
18620 native->managed wrappers.
18622 2005-05-12 Martin Baulig <martin@ximian.com>
18624 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
18625 here and use the loader lock.
18627 * mono-debug.c: Properly lock when the debugger is not attached.
18628 (mono_debug_init): Release the initial lock if we're not running
18631 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
18633 * marshal.c (emit_marshal_custom): Pass through NULL values without
18634 calling the custom marshalling routines.
18636 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
18637 conversion in structures. Fixes #74882.
18639 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
18641 * culture-info-table.h : zh-* cultures were missing.
18643 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
18645 * threads.c: Added a new event background_change_event which is signaled
18646 when a thread changes its background mode.
18647 Moved here several checks previously done in managed code. The checks
18648 require the thread lock, and using the thread lock in managed code
18649 can result in deadlocks.
18650 Merged Start_internal and Thread_internal into a single method. Now
18651 Thread_internal does all work of creating and starting a thread.
18652 Added icalls for setting and getting the state of the object. Moved from
18653 managed code to avoid locking there.
18654 Added wait_for_tids_or_state_change() which is called instad of
18655 wait_for_tids when waiting for non-backround threads to end. This method
18656 will return if one of the threads ends or the background_change_event
18658 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
18659 the background mode. This method signals the background_change_event
18662 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
18663 removed Start_internal.
18665 2005-05-11 Martin Baulig <martin@ximian.com>
18667 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
18668 to order of some fields to get proper alignment on 64-bit machines.
18670 2005-05-11 Martin Baulig <martin@ximian.com>
18672 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
18673 changes as they're broken and completely fuck up the debugger.
18675 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
18677 2005-05-10 Martin Baulig <martin@ximian.com>
18679 * reflection.c (mono_reflection_generic_class_initialize): Don't
18680 call mono_class_setup_parent() here.
18682 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18684 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
18685 send/receive timeout use an integer in milliseconds. We were using a
18688 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18691 (internal_get_cultures): reserve the first slot of the array for the
18692 InvariantCulture, which will be filled in managed code.
18694 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
18696 * reflection.c (mono_image_fill_module_table): Initialize the
18697 GENERATION field as well.
18699 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18701 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
18702 Monitor.Enter on the object.
18704 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
18706 * threads.c: Enable the wait for running threads when exiting.
18707 * icall.c: Suspend all threads before exiting.
18709 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
18711 * assembly.c (mono_assembly_load_reference): Fix warning.
18713 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18715 * threadpool.c: changed the default number of threads per cpu. From now
18716 on, the default will be 20 + (5 * number of cpus) instead of 50.
18718 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
18720 * loader.c (mono_method_get_signature_full): Add locking here.
18722 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
18724 * appdomain.c: Moved methods for parsing and freeing assembly
18725 names to assembly.c.
18726 * assembly.c, domain-internals.h: Created public methods for parsing
18727 assembly names. Fixed mono_assembly_load_with_partial_name:
18728 it now finds the best match, taking into account the version,
18729 token and culture specified in the partial name. Also return
18730 the latest version if no version information is specified.
18732 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
18734 * threadpool.c: replace check for SocketAsyncCall class.
18736 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18738 * threadpool-internals.h:
18739 * Makefile.am: added threadpool-internals.h
18741 * threadpool.c: call mono_unhandled_exception on exceptions not handled
18742 that happen in threadpool threads (tested on MS).
18743 (mono_thread_pool_remove_socket): new function that dispatch any pending
18744 AIO call on a socket that is closing. By now only epoll really needs it,
18745 as select/poll wake up when the socket closes.
18748 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
18750 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
18752 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
18754 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
18756 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
18758 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
18760 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
18761 has an abort request, convert it into a suspend request.
18763 2005-04-30 Ben Maurer <bmaurer@ximian.com>
18765 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
18766 warning for the usage of `UnmanagedFunctionPointerAttribute' which
18767 is not supported yet.
18769 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18771 * image.c: register assemblies loaded from data (bundles) in the loaded
18772 assemblies hash. Fixes bug #74772.
18774 2005-04-29 Martin Baulig <martin@ximian.com>
18776 * class.c (mono_type_get_name_recurse): Update to the new naming
18777 schema from the latest .NET 2.x beta2.
18778 (mono_class_setup_vtable_general): If we're a generic instance,
18779 copy the vtable from our generic type definition and inflate all
18782 * loader.c (find_method): Update to the new naming schema from the
18783 latest .NET 2.x beta2.
18785 2005-04-29 Raja R Harinath <harinath@gmail.com>
18787 * class.c (mono_class_init): Add a mono_loader_unlock to the
18790 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
18792 * icall.c (ves_icall_System_Environment_Exit): Remove the
18793 suspend_all_other_threads () call for the time being, since it can hang.
18795 * threads.c (mono_thread_manage): Similarly, disable the waiting for
18796 the background threads to exit, since it can also hang.
18798 * class.c (mono_class_init): Applied patch from Ankit Jain
18799 (radical@gmail.com). Avoid pending init errors when a field refers
18800 to a nested class using a typeref. Fixes #74734.
18802 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
18803 this for dynamic modules.
18805 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18807 * threads.c: don't wait for threads that are in the process of aborting
18808 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
18809 and waiting for background threads to finish. This makes xsp and
18810 mod-mono-server exit without random length delays and/or hangs.
18812 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18814 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
18816 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
18818 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
18819 dynamic types to prevent infinite loops. Fixes #74727.
18821 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
18822 ..._is_assignable_to.
18824 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
18826 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
18828 2005-04-25 Martin Baulig <martin@ximian.com>
18830 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
18833 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
18835 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
18837 * reflection.c (build_compressed_metadata): Set metadata header
18840 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
18842 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
18843 number into an integral and a decimal part. Fixes #70473.
18845 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
18847 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
18849 * culture-info-table.h : reflected the latest locale-builder output.
18851 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18853 * threadpool.c: check for SuspendRequested too when deciding if
18854 mono_thread_interruption_checkpoint should be called.
18856 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18858 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
18859 * threads.c: remove interruption_mutex and use Interlocked instead. When
18860 suspending all the threads, wait for all the suspended events at once.
18861 If we're shutting down and get an APC that is going to be queued,
18862 call mono_thread_execute_interruption immediately, as the thread might
18863 be sleeping on a pthread condition or mutex.
18865 * icall.c: call mono_runtime_set_shutting_down before suspending the
18868 Fixes bug #74693. And now xsp is happier when exiting.
18870 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
18872 * loader.c (mono_stack_walk): Fix #74690.
18874 2005-04-22 Martin Baulig <martin@ximian.com>
18876 * mono-debug.h (MonoDebugMethodJitInfo): Added
18877 `MonoDebugMethodJitInfo *jit'.
18879 * mono-debug.c (mono_debug_read_method): Cache the
18880 MonoDebugMethodJitInfo in `address->jit'.
18881 (mono_debug_free_method_jit_info): New public method.
18883 2005-04-22 Martin Baulig <martin@ximian.com>
18885 * class.c (mono_class_is_assignable_from): Disallow
18886 type parameter -> interface.
18888 2005-04-21 Dick Porter <dick@ximian.com>
18890 * threads.c (mono_thread_create): Turn an assertion into an error.
18892 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
18894 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
18896 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
18897 Fix some gcc 4.0 warnings.
18899 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
18901 * file-io.c: fix alt dir separator char on unix systems
18902 and cleanup (fixes bug #71214).
18904 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
18906 * marshal.c: Use CALLVIRT instead of CALL when dispatching
18907 a call to a remote domain, since the method may be an
18908 interface method in the client domain. This fixes bug #74192.
18910 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18912 * threadpool.c: recv/send are now performed before going back to managed
18913 code to save one transition.
18915 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18917 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
18919 * metadata/threadpool.c: removed hack to workaround the bug above.
18923 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
18925 * reflection.c reflection.h: Fix handling of parameter defaults in
18926 dynamic methods. Also fixes handling of parameter attributes.
18929 * mono-debug.c (mono_debug_close_image): Fix warning.
18931 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18933 * socket-io.h: replaced old unused field with new 'blocking'.
18934 * threadpool.c: restore socket blocking state on windows(tm).
18936 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
18938 * icall.c: don't return the codebase in the AssemblyName[] returned by
18939 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
18940 * object-internals.h: Removed FIXME (fields were presents) and fixed
18941 versioncompat declaration.
18943 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18945 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
18946 not closed, so don't cleanup when it happens.
18948 2005-04-13 Chris Toshok <toshok@ximian.com>
18950 * mono-debug-debugger.h: change prototype for
18951 mono_debugger_lookup_type.
18953 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
18954 this function, although it should probably be named
18955 mono_debugger_init_type.
18957 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18959 * threadpool.c: fix non-AIO case.
18961 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
18963 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
18964 the built-in profiler to measure just JIT compilation times.
18966 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18968 * threadpool.c: the epollfd might be closed by another thread at
18969 any time, so ignore EBADF at treat it as a "we're closing" sign.
18971 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18973 * threadpool.c: release the semaphores with a count equals to the number
18974 of working threads in both IO and regular pools. Fixed typo that messed
18975 up the count of IO pool threads. Don't initialize the pipe handles if
18978 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18980 * threadpool.c: some systems don't like a NULL when deleting the socket
18983 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18985 * threadpool.c: fix semaphore allocation.
18987 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18989 * threadpool.c: added epoll() based implementation for asynchronous IO
18990 that is used instead of the default poll() when available.
18991 It can be disabled by setting MONO_DISABLE_AIO.
18993 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18995 * threadpool.c: windows needs 'closesocket' and instead of returning
18996 0 when the stream is closed while in select, it returns -1. Fixes bug
18999 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
19001 * class.c (class_compute_field_layout): Fix the regression caused by
19004 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19006 * threadpool.c: separate pool for socket async. IO.
19007 * threadpool.h: mono_max_worker_threads is not a global any more.
19009 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
19011 * class.c (class_compute_field_layout): Fix #74549.
19013 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19015 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
19016 use 2 connected sockets instead.
19018 2005-04-08 Miguel de Icaza <miguel@novell.com>
19020 * mono-config.c: Add new entry point for mkbundle
19021 mono_config_parse_memory.
19023 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19025 * threadpool.c: removed another unused function.
19027 2005-04-08 Ankit Jain <radical@corewars.org>
19029 * reflection.c (get_default_param_value_blobs): Add 'types'
19030 parameter to get the types encoded in the constant table.
19031 (mono_param_get_objects): Use the type from the constant table,
19032 not the type of the parameter, when creating default values.
19033 Handle null default values correctly.
19035 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19042 * socket-io.c: removed dead code for async IO.
19044 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19046 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
19048 * threadpool.c: intercept socket async. calls and pass them to a thread
19049 that is polling and dispatching the job items to the threadpool as
19050 socket become ready. Fixes bugs #71217, #71933.
19052 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
19053 between char and short/ushort arrays.
19055 * socket-io.c: remove dead code.
19057 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
19060 icall.c : removed InternalToUpper_Comp() and
19061 InternalToLower_Comp().
19063 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
19065 * char-conversions.h : The tables were incorrectly generated. Should
19066 be generated against invariant culture.
19068 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
19070 * object.c (mono_runtime_invoke_array): Fix return value when
19071 passing pre-created valuetype objects to ctors.
19073 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
19074 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
19077 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
19079 * domain.c: removed g_assert for runtimesecurityframe_class. This is
19080 only used with --security and hides the wrong corlib version error.
19082 2005-03-30 Joshua Tauberer <tauberer@for.net>
19084 * class.c: Changed mono_class_name_from_token so that types
19085 outside of a namespace don't have an initial period. Improved
19086 the g_warning message used in _mono_class_get when loading
19088 * assembly.c: In mono_assembly_load_reference, when an assembly
19089 can't be found, "No such file or directory" is misleading and
19090 unhelpful because a few paths were checked for the presence of
19091 the assembly. When that happens (ENOENT), display a nicer
19092 message indicating the directories that were searched. In all
19093 cases, the warning is made easier to read for non-hackers.
19095 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
19097 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
19099 * appdomain.h|domain.c: Removed inline from functions.
19100 * appdomain.c: Reduced warnings when compiling on windows.
19101 * icall.c: Fixed output_debug declaration to gunichar2*.
19102 * mono-config.c: Reduced warnings when compiling on windows.
19103 * rand.c: Added missing "windows.h". Added missing return value.
19104 * rawbuffer.c: Added missing winsock2.h for windows.
19105 * sysmath.h: Added mono-compiler.h header to allow/ease
19106 compilation with non-GCC compilers.
19107 * threads.c: Fixed declarations to compile with VS.NET C compiler.
19108 Removed cast warnings.
19110 Adapted from the work of J Lothian (for VC6).
19112 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
19114 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
19117 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
19119 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
19122 2005-03-27 Raja R Harinath <harinath@gmail.com>
19124 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
19125 has to be in $(exec_prefix). $(prefix) is for arch-independent
19126 stuff, and it would probably use $(prefix)/share rather than
19129 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19131 * console-io.c: added 2 includes that might be missing.
19133 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
19135 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
19138 * reflection.c (create_custom_attr): Allocate the params array using
19139 alloca so it gets GC tracking.
19141 2005-03-23 Chris Toshok <toshok@ximian.com>
19143 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
19146 2005-03-24 Raja R Harinath <rharinath@novell.com>
19148 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
19149 changes to pick up any changes in prefix, etc.
19151 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19153 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
19155 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
19156 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
19158 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19160 * class-internals.h object-internals.h class.c reflection.c: Extend the
19161 mono_lookup_dynamic_token () function to return the class of the
19164 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
19165 well. Fixes #73848.
19167 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
19169 * security-manager.c: Skip inheritance checks for intra-corlib
19170 class inheritance and method overrides. This skips a lot of checks
19171 and (anyway) permissions cannot work until corlib is loaded.
19173 2005-03-23 Martin Baulig <martin@ximian.com>
19175 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
19176 MONO_TYPE_GENERICINST.
19178 2005-03-23 Martin Baulig <martin@ximian.com>
19180 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
19182 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19184 * class.c: added locking comments to some functions.
19185 Cache the interface offsets arrays (saves about 20 KB
19186 of runtime memory in a typical app).
19187 Reduce the time overhead in mono_class_setup_supertypes ().
19189 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
19191 * icall.c: speedup and fix leaks in GetMethodsByName and
19192 GetPropertiesByName.
19194 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19196 * reflection.c: some locking fixes.
19198 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19200 * metadata.c: added missing break in case statement.
19202 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
19204 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19205 typedbyref return values. Fixes #73941.
19207 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
19209 * security-manager.c|h: Added demandunmanaged method and
19210 suppressunmanagedcodesecurity class to MonoSecurityManager.
19211 Renamed aptc class to allowpartiallytrustedcallers.
19213 2005-03-17 Martin Baulig <martin@ximian.com>
19215 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
19217 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19219 * file-io.c: disabled file async. IO using aio_*. It uses the
19220 threadpool now. Workaround for bug #73718.
19222 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19224 * assembly.h, mono-config.c: added code to deal with bundled configs
19225 for bundled assemblies.
19227 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
19229 * *.c, private.h: cleanup, removing old private.h header file.
19231 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
19233 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
19234 and throw_on_unmappable_char attributes.
19236 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
19238 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
19239 _ProcessName_internal.
19241 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
19243 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
19246 * icall.c threads.c threads-types.h: Remove slothash icalls as they
19247 are no longer used.
19249 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
19251 * object.c (compute_class_bitmap): Add support for generics. Fixes
19254 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
19256 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
19258 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19260 * filewatcher.c: commented out the code for windows watcher, as we don't
19261 use it (we use the managed implementation instead).
19263 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
19265 * object-internals.h (MonoThread): Remove 'unused1' field.
19267 * appdomain.c: Bump corlib version.
19269 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
19271 * reflection.c (mono_reflection_create_runtime_class): Remove the
19272 AssemblyBuilder.Save optimization since it causes too many problems.
19274 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
19276 * exception.c|h: Added mono_get_exception_reflection_type_load to
19277 create a ReflectionTypeLoadException object.
19278 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
19279 to return NULL is a InheritanceDemand fails during reflection. Updated
19280 ves_icall_System_Reflection_Assembly_GetTypes to throw a
19281 ReflectionTypeLoadException if an InheritanceDemand fails during
19282 reflection. Added icall mapping for GetLinkDemandSecurity.
19283 * security-manager.c|h: Added ves_icall_System_Security_
19284 SecurityManager_GetLinkDemandSecurity internal call to return the
19285 class and methods permissions set for a LinkDemand. Removed unused
19286 fields in MonoSecurityManager.
19288 2005-03-10 Martin Baulig <martin@ximian.com>
19290 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
19291 it's a generic instance.
19293 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
19295 * reflection.c (mono_get_object_from_blob): Applied patch from
19296 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
19298 * class.c (mono_class_is_assignable_from): Another try at fixing
19299 #73469 without breaking anything.
19301 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
19303 * class.c: (mono_class_is_assignable_from): Revert the last changes
19304 since they don't work with generics.
19306 * class.c (mono_class_is_assignable_from): Fix build bustage.
19308 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
19309 the managed IsAssignableFrom method. Fixes #73469.
19311 * reflection.c (mono_reflection_call_is_assignable_from): New helper
19314 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
19316 * object.c (mono_load_remote_field_new): Fix returning uninitialized
19317 memory when the remoting callback does not sets the out arguments.
19320 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
19323 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
19325 * object-internals.h (MonoStackFrame): Sync with managed object layout.
19327 * appdomain.c: Bump corlib version.
19329 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
19331 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
19334 * threads.c (mono_thread_attach): Detect threads which are not started
19335 by the GC pthread wrappers.
19337 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
19339 * icall.c: Added new icall for RNG.
19340 * rand.c|h: Added new icall to open the RNG. This allows to share a
19341 single handle on Linux to access /dev/urandom and fix #73183.
19343 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
19345 * object.c: setting the new vtable in a transparent proxy object must
19346 not change the GC descriptor.
19348 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19350 * object.c: fixed compilation without GCJ support.
19351 * reflection.c: for runtime-created types ensure klass->has_references
19352 is correct (bug #73215).
19354 2005-03-02 Martin Baulig <martin@ximian.com>
19356 * class.c (mono_class_is_assignable_from): Make this work if
19357 `oklass' is a generic instance; fixes #72831.
19359 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
19361 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
19364 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
19366 * marshal.c: Reorganize native->managed marshalling code to also use
19367 the emit_marshal_... functions.
19369 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19371 * object.c: typed allocs have issues with bitmap sizes > 30,
19372 so check for max_set >= 30.
19374 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
19376 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
19377 managed code. Fixes #73012.
19379 * metadata.h (MonoMarshalSpec): Add elem_mult field.
19381 * metadata.c reflection.c: Load/Emit elem_mult as well.
19383 * metadata.h (MonoMarshalSpec): Add comment.
19385 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
19387 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
19388 num_elem to -1 if not given.
19390 * object-internals.h (MonoReflectionMarshal): Add has_size field.
19392 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
19395 2005-03-01 Marek Safar <marek.safar@seznam.cz>
19397 * null-gc.c (mono_gc_free_fixed): Was not compilable.
19399 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
19401 * reflection.c (encode_marshal_blob): Encode param_num field as well.
19403 * object-internals.h (MonoReflectionMarshal): Add param_num field.
19405 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19407 * object.c: generalized the reference bitmap creation
19408 and added hooks for the new GC.
19409 * class-internals.c: removed the gc_bitmap field from MonoClass.
19411 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19413 * domain.c: help the compiler to produce better code
19414 in mono_jit_info_table_find ().
19416 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19418 * object.c: make all allocations look typed.
19420 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19422 * socket-io.c: load Mono.Posix if it's not loaded already
19425 2005-02-24 Martin Baulig <martin@ximian.com>
19427 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
19428 * reflection.c (dup_type): Likewise.
19430 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
19432 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
19433 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
19435 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19437 * domain.c, threads.c, object-internals.h: make the critical thread
19438 local vars use the fast access mode (even when we're compiled in
19439 a lib). Provide accessors to be used by the jit during codegen.
19441 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19443 * appdomain.c: Changed hook functios behavior to include
19444 support for the reflection only assemblies. Some icalls were changed
19445 to support the mentioned assemblies too. Signatures of static methods
19446 try_assembly_resolve and real_load now have an additional parameter:
19449 * assembly.c: General changes to mono_assembly_ methods to support
19450 reflection only api. Functions mono_assembly_open, mono_assembly_load,
19451 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
19452 suffix, to support an additional gbool parameter to specify whether
19453 the assembli is reflection only or not. Created some new hook functions
19454 to add support for reflection only assemblies. Signatures of static
19455 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
19456 have now an additional parameter: refonly.
19458 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
19459 indicating whether the assembly is reflection only or not.
19461 * exception.c: Add mono_get_exception_invalid_operation.
19463 * icall.c: Throw an InvalidOperationException when trying to invoke
19464 a property/method/event, or trying to set/get the value of a field.
19465 Also add an icall to retrieve the ref_only flag to the
19466 MonoReflectionAssembly.
19468 2005-02-23 Chris Toshok <toshok@ximian.com>
19470 Part of fix for #72827.
19471 * mono-debug.c (mono_debug_add_method): add lexical block data to
19472 the info we write. Kind of a hack at the moment - we copy the
19473 lexical block info from the MonoDebugMethodInfo to the
19474 MonoDebugMethodJitInfo here, before writing it.
19475 (mono_debug_read_method): read the lexical block info.
19477 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
19479 * debug-mono-symfile.h: add lexical block support.
19481 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
19484 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
19486 * loader.c (mono_lookup_pinvoke_call): Fix warning.
19488 * object.c (mono_runtime_free_method): Call mono_free_method () and
19489 put the TODOs there.
19491 * loader.c (mono_free_method): Free up most memory allocated for
19494 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
19496 * reflection.c: properly flag a Type argument to a
19497 named custom attr value (bug #72248).
19499 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19501 * reflection.c: reduce code duplication in named custom
19502 attribute encoding.
19504 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
19506 * reflection.c: properly encode custom attrs of type object
19509 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
19511 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
19513 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
19515 * socket-io.c: load System.dll if it's not loaded already
19516 (bug #72850 and #70477).
19518 2005-02-21 Martin Baulig <martin@ximian.com>
19520 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19523 2005-02-21 Martin Baulig <martin@ximian.com>
19525 * reflection.c (mono_image_build_metadata): We also need to
19526 "fixup" the MethodImpl table after we computed the final method
19527 indices. Call fixup_methodimpl() to do that.
19528 (fixup_methodimpl): New private method.
19530 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19532 * assembly.c: special case mscorlib.dll (bug#72536),
19533 patch from Carlos Alberto Cortez.
19535 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
19537 * threads-types.h threads.c: Fix build bustage.
19539 * threads.c: Use a union for long<->double conversions.
19541 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
19542 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
19544 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
19545 containing the checkpoint call with NOT_TAKEN.
19547 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
19548 checkpoint before pushing the arguments, so they won't have to be
19551 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19553 * domain.c, assembly.c, domain-internals.h: make some data
19554 const and relocation-free.
19556 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
19558 * object.c, appdomain.c, class-internals.h: introduce the
19559 MonoClassRuntimeInfo structure to hold the info needed to
19560 use a class at runtime. Made mono_class_vtable() lock-free
19561 for all the appdomains.
19563 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
19565 * metadata-internals.h, image.c: introduce a per-image mempool to
19566 be used for memory that has the same lifetime as the image.
19568 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
19570 * domain.c: In mono_init_internal(), instead of selecting the first
19571 runtime version supported by an executable, get a list of all
19572 supported versions and select the one for which an mscorlib exists
19573 (since even if the runtime supports a given version, it doesn't mean
19574 that the framework for that version is installed).
19575 Modified get_runtimes_from_exe to support this behavior.
19576 In supported_runtimes, added information about additional system
19579 * assembly.c: Added support for more than one system assembly version
19580 per runtime version. Updated the assembly list.
19581 In mono_assembly_remap_version, removed the initial version check,
19582 since we don't know to which version we need to compare until we
19583 get the version set on which the assembly is based.
19584 Moved the code for loading corlib into the new method
19585 mono_assembly_load_corlib(), so it can be used by the initialization
19588 * domain-internals.h: Updated data structures and added declaration
19589 for mono_assembly_load_corlib.
19591 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
19593 * reflection.c (resolve_object): Fix the creation of the signature in
19594 the SignatureHelper case.
19596 * assembly.c (mono_assembly_remap_version): Fix binary search.
19598 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
19600 * class.c: Added inheritance check when a method is overloaded (from a
19601 virtual method or when implementing an interface) and when a class is
19602 inherited. Added functions to set a failure for a class and to
19603 retreive the exception from a failure.
19604 * class-internals.h: Added fields to MonoClass to keep the exception
19605 information status for inheritance (or other exceptions) to be thrown
19606 later (i.e. not at load time).
19607 * object.c: Throw the inheritance SecurityException when a type is to
19608 be created with either class or method inheritance violations.
19609 * reflection.c|h: Fix when getting declsec from a class. Removed
19610 unrequired code for class. Improved sanity in parameter naming.
19611 * security-manager.c|h: Added functions to check for class and method
19614 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
19616 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
19617 and has_finalize in dynamic types as well.
19619 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
19621 * culture-info-table.h : fixed currency format for en-GB (and so on).
19623 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
19625 * gc.c: ensure the GC handles never have 0 as a value.
19627 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
19629 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
19630 a pointer to a struct to unmanaged code. Fixes #72625.
19632 2005-02-16 Martin Baulig <martin@ximian.com>
19634 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
19636 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
19638 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
19640 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
19642 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
19644 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
19645 UnmanagedFunctionPointerAttribute, use it for determining calling convention
19648 * reflection.c (mono_custom_attrs_get_attr): New helper function.
19650 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
19652 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
19654 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
19655 changes to make the current context a field in MonoThread.
19657 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
19659 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
19662 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
19663 extracted from mono_marshal_get_native_wrapper.
19665 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
19666 to create wrappers around native functions.
19668 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
19669 delegates for arbitrary function pointers. Fixes #71472.
19671 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
19673 * threads.c: cleaned up the code a little.
19675 2005-02-15 Martin Baulig <martin@ximian.com>
19677 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
19680 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
19681 allocate larger chunks if needed.
19683 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
19685 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
19688 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
19690 * domain.c: keep the domains in an array and ensure the domain ids
19691 are kept small, so they can be used as indexes to domain-specific data
19692 with a small memory overhead.
19694 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
19696 * icall.c: Handle byref types in Type icalls. Fixes #72544.
19698 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
19700 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
19702 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
19704 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
19706 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
19709 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
19711 2005-02-12 Ben Maurer <bmaurer@ximian.com>
19713 * domain-internals.h: add the hashtable here.
19715 * class-internals.h: Remove `info' from MonoMethod
19717 * domain.c: Add a new hashtable, jit_trampoline_hash
19719 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
19721 * object.c: don't set the value of static fields
19724 2005-02-11 Martin Baulig <martin@ximian.com>
19726 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
19727 (mono_debug_add_method): Silently ignore the method if it's too big.
19728 (mono_debug_add_type): Likewise.
19730 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
19732 * threads.c, appdomain.c: remove #ifdefs from the code.
19734 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
19736 * metadata-internals.h: Added flags to MonoAssembly to cache the most
19737 common security informations. This allows us to stay in unmanaged code
19738 when doing LinkDemand and it's special cases (except for the first
19739 time for initialization). The flags a very much used with --security.
19740 * reflection.c|h: Added code to get declarative security attributes
19741 for LinkDemand and InheritanceDemand. This required to refactor the
19742 existing code for Demand.
19743 * security-manager.c|h: Added new method fields for the special cases
19746 2005-02-10 Martin Baulig <martin@ximian.com>
19748 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
19749 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
19751 2005-02-10 Martin Baulig <martin@ximian.com>
19753 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
19754 debugging code; this is almost a complete rewrite.
19756 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
19758 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19760 * domain.c, object.h: expose mono_string_equal () and
19761 mono_string_hash ().
19762 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
19763 it's implemented in managed code.
19765 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19767 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
19768 lo leak objects between appdomains.
19770 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19772 * assembly.c: old compilers compilation fix from
19773 robertj@gmx.net (Robert Jordan).
19775 2005-02-09 Ben Maurer <bmaurer@ximian.com>
19777 * class-internals.h: Little reminder for the future.
19779 * debug-helpers.c: Fix up wrapper_type_names
19781 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19783 * image.c, metadata-internals.h: when loading an image from a file,
19784 mmap all of it and use the same codepaths as when using a
19785 in-memory image: the code is simpler and we use less memory
19786 (both writable and readonly).
19788 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
19790 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
19791 API to alloc runtime data structures that need to be tracked by the
19792 GC and contain pointers.
19793 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
19794 make the code more readable and eventually use a different GC.
19796 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
19798 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
19801 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
19803 * object.c: In release_type_locks(), don't release the cctor lock
19804 if it has already been released. This fixes a crash in the
19807 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19809 * gc.c, marshal.c, icall.c: register a delegate for finalization
19810 only when the native function pointer has been allocated for it.
19812 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
19814 * object.c: cleaned up some code, allocate objects that are
19815 pointer free with the atomic malloc variant. Allocate memory
19816 for static data from the mempool if it's pointer-free.
19817 Allocate the bounds array at the end of the array data, when needed.
19818 * object-internals.h, object.h: move a private function in a private
19820 * class.c: handle missing case in tracking references in fields.
19822 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
19824 * class.c, class-internals.h: keep track if a type has
19825 reference fields in either the instance or static fields.
19827 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
19829 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
19830 and renamed to MonoRuntimeInfo. Added fields to store the expected
19831 framework assembly version. Changed mono_get_framework_version and
19832 mono_get_runtime_version for a single mono_get_runtime_info method.
19834 * assembly.c: Added method to remap system assembly versions to the
19835 current executing runtime version. Removed old mapping code.
19836 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
19838 * icall.c, reflection.c: Track api changes.
19840 2005-02-06 Miguel de Icaza <miguel@novell.com>
19842 * loader.c (method_from_memberref): Improve error reporting,
19843 produce the class name instead of the typeref/typedef index.
19845 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
19847 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
19849 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
19851 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
19852 stdcall and charset name mangling. Reorganize the code and add
19853 some tracing stuff.
19855 2005-02-05 Ben Maurer <bmaurer@ximian.com>
19857 * monodiet.c: More iters!
19859 * marshal.c: Iter usage.
19861 * icall.c: Iter usage.
19863 * object.c: Use iters.
19865 * debug-helpers.c: More iters
19867 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
19869 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
19872 2005-02-05 Ben Maurer <bmaurer@ximian.com>
19874 * mono-debug-debugger.c: use iters
19876 * class.c, class-internals.h: mono_class_setup_events is static
19879 * All callers: use iters
19881 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
19883 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
19884 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
19886 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
19888 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
19890 * marshal.h: Add prototypes for ldfld/stfld_remote.
19892 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
19893 this is called during startup.
19895 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
19897 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
19898 MonoThreadsSync struct private in monitor.c. Changed the way
19899 MonoThreadsSync is allocated so it's faster and there is no
19900 need to keep track of it with a finalizer and it uses less memory.
19901 This also finally allows us to allocate mono objects as ptrfree when
19902 there are no reference fields.
19904 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
19906 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
19907 disappearing link to the GC interface and use them to simplify
19908 the gchandles code.
19910 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
19912 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
19913 stfld_remote which call mono_load/store_field_new. This allows methods
19914 calling ldfld/stfld wrappers to be AOTed.
19916 * console-io.c: Include sys/filio.h under solaris.
19918 * console-io.c: Include curses.h if needed correctly.
19920 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
19922 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
19923 method->klass as well.
19925 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
19927 * class.c (mono_class_init): Switch on lazy initialization of
19930 * class.c (mono_class_get_finalizer): Handle the case when the
19931 finalizer is inherited.
19933 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19935 * console-io.c: <curses.h> is needed by term.h on solaris.
19937 2005-02-03 Ben Maurer <bmaurer@ximian.com>
19939 * icall.c, class-internals.h, monodiet.c, class.c: Remove
19940 mono_class_setup_properties where possible. Remove this ftn from
19941 the header file, and make it static.
19943 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
19945 * loader.c: Add missing setup_... call.
19947 * class.c: Add missing setup_... calls.
19949 * class.c (mono_class_init): Switch on lazy initialization of
19950 the generic vtable.
19952 * class.c (mono_class_init): Fix generics broken by the recent changes.
19954 * monodiet.c (handle_type): Add missing setup_... calls.
19956 * class.c: Back out garbage in previous patch.
19958 * class.c: Add missing setup_... calls.
19960 * class.c (mono_class_get_method_from_name_flags): Avoid calling
19961 mono_class_setup_methods () if possible.
19963 * class-internals.h (MonoClass): Add 'has_cctor' flag.
19965 * class-internals.h (MonoCachedClassInfo): New structure.
19967 * class.c: Initialize properties and events fields of MonoClass lazily.
19969 * class.c: Add infrastructure for lazily initializing the methods and
19970 vtable fields of MonoClass. Not yet used.
19972 * class.c (mono_class_get_finalizer): New helper function.
19974 * class.c: Add infrastructure for loading some class related data from
19977 * object.c: Add infrastructure for initializing the vtable from data
19980 * gc.c (run_finalize): Use mono_class_get_finalizer ().
19982 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
19983 appropriate initialization function before accessing parts of the
19984 MonoClass structure.
19986 * marshal.c: Fix warnings.
19988 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
19990 * mono-debug-debugger.c (get_exception_message): Use
19991 mono_class_get_method_from_name_flags ().
19993 2005-02-02 Ben Maurer <bmaurer@ximian.com>
19995 * reflection.c, appdomain.c: Replace a few manual searches that
19996 Zoltan missed. (Paolo approved this part of my initial patch).
19998 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
20000 * profiler.c: disable recording statistical events at report time.
20002 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20004 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
20005 to byteswap arrays of enum values, too (bug #72080).
20007 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
20009 * appdomain.c (set_domain_search_path): Allow this to be called if
20010 domain->setup is not yet set.
20012 * loader.c (mono_method_get_index): New helper function.
20014 * loader.c reflection.c: Use mono_method_get_index ().
20016 * class.c (mono_class_get_method_from_name_flags): New helper method.
20018 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
20021 * class.c (mono_class_get_cctor): New helper method.
20023 * string-icalls.c object.c class.c marshal.c reflection.c: Use
20024 mono_class_get_method () to look up methods.
20026 2005-02-01 Miguel de Icaza <miguel@novell.com>
20028 * console-io.c: Fix the build, this should work on Windows.
20030 2005-01-31 Ben Maurer <bmaurer@ximian.com>
20032 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
20033 be set to null to keep things valid
20035 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20037 * icall.c: added Console 2.0 icalls.
20038 * Makefile.am: added console-io.[ch]
20039 * console-io.[ch]: internal calls for Console 2.0 API.
20041 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20043 * class.c: make sure we consider all the interfaces
20044 when calculating max_interface_id (bug found by
20045 Jeroen Frijters running ikvm).
20047 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
20049 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
20050 valuetype fields to null.
20052 * object.c (set_value): Ditto. Fixes #71669.
20054 2005-01-31 Martin Baulig <martin@ximian.com>
20056 * metadata.c (mono_metadata_has_generic_params): New public
20057 function; checks whether something is a generic method.
20059 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
20061 * appdomain.c: fix infinite recursion when adding assemblies.
20063 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
20065 * object.c: Fix small typo to return all items for Environment.
20066 GetCommandLineArgs.
20068 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20070 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
20071 reflection.c: more domain and assembly-unload related fixes
20072 and memory leaks plugs.
20074 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
20076 * 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.
20078 2005-01-29 Ben Maurer <bmaurer@ximian.com>
20080 * loader.c (mono_method_signature): Make this method lazy
20081 (mono_get_method_from_token): Don't computate the signature here.
20083 Doing this saves quite a bit of memory. I got 90 kb on starting up
20084 monodoc. It should also save some disk reads on startup.
20086 * *: MonoMethod->signature might be NULL now. You *MUST* use
20087 mono_method_signature.
20089 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
20091 * object.c (mono_runtime_get_main_args): Return an array from the
20092 current domain here. Fixes #71938.
20094 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20096 * monitor.c: formatting changes to comply with the
20097 mono coding style and remove #ifdefs from the code.
20099 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20101 * metadata.c, private.h: remove some unneeded data
20102 and use a more compact representation for table schemas.
20104 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
20106 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
20107 to get a better distribution in hash tables.
20108 * *.c: use mono_aligned_addr_hash() where appropriate.
20109 * assembly.c: make var static.
20111 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
20113 * domain-internals.h: Put MonoJitInfo on a diet.
20115 * domain.c: Fix a warning.
20117 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20119 * gc.c: rework the gc handles code to reuse handles
20122 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20124 * domain.c: fixed long standing bug in mono_string_equal() which
20125 was brought to light with the ldstr changes.
20127 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
20129 * reflection.c: Remove warning by adding missing include for marshal.h
20131 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20133 * domain.c, object.c: change the ldstr_table to hold
20134 MonoString* as keys: makes the runtime isinterned lookup
20135 faster and simplifies memory management.
20137 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
20139 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
20140 possible to add imperative security checks before calling the icall.
20141 * reflection.c: Return security attributes on the original MonoMethod
20142 (and not the wrapped one). This fix permissions on icalls.
20144 2005-01-25 Dick Porter <dick@ximian.com>
20146 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
20147 the check for mktime() support actually test the mktime() return
20148 value. "Fixes" bug 71682, though the output is still different to
20151 2005-01-25 Martin Baulig <martin@ximian.com>
20153 * class.c (mono_class_is_assignable_from): Make this work for
20156 2005-01-24 Ben Maurer <bmaurer@ximian.com>
20158 * marshal.c (mono_string_utf8_to_builder)
20159 (mono_string_builder_to_utf16): We might not have ownership of the
20160 string. In thise case, we need to create a new buffer.
20162 * object-internals.h (mono_stringbuilder_capacity): sb->str might
20163 be null, in which case, use the default capacity.
20165 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20167 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
20168 GC events to the profiler.
20170 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20172 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
20173 if you don't want the GC to run.
20175 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
20177 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
20178 start providing a GC API and keeping different implementations in
20180 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
20182 2005-01-22 Ben Maurer <bmaurer@ximian.com>
20184 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
20185 mmap rather than allocating a huge buffer.
20186 (mono_debug_close_mono_symbol_file): Free the buffer allocated
20189 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
20191 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
20192 and CheckExecutionRights.
20193 * reflection.c|h: Keep the index of the declarative security to be
20194 used, instead of the pointer, when AOT compiler is used. Also add
20195 class initialization when requesting demands.
20196 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
20197 CheckExecutionRights. Both properties are now FALSE by default, and
20198 unmodifiable, unless the --security option is used.
20200 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20202 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
20203 reflection.c: properly refcount images and assemblies, many leaks fixed.
20205 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20207 * threadpool.c: increase the timeout for threads in the thread pool to
20208 10s. Fixes bug #67159.
20210 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
20212 * class-internals.h: Sun's compiler insists on explicit
20213 signed on bit fields to handle then correctly.
20215 2005-01-19 Miguel de Icaza <miguel@ximian.com>
20217 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
20218 Make the size of the array fit only the number of invalid path
20219 chars that we have.
20221 * class.c (_mono_class_get): Improve the error reporting when a
20222 class referenced is not found, to assist debugging.
20224 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
20226 * threads.c: fix off-by-one error.
20227 * domain.c: free data allocated in the domain.
20229 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20231 * reflection.c (mono_method_body_get_object): Fill out exception info
20234 * object-internals.h: Add MonoReflectionExceptionHandlingClause
20237 2005-01-19 Martin Baulig <martin@ximian.com>
20239 * loader.c (mono_get_method_constrained): Make this work again.
20241 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20243 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
20244 guint16 to match the managed side.
20246 * reflection.c (mono_reflection_body_get_object): Fill out local
20249 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
20252 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
20253 'local_var_sig_token'.
20255 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
20257 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
20260 * reflection.c (mono_method_body_get_object): Handle abstract and
20263 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
20265 * marshal.c, loader.c, class-internals.h, reflection.c:
20266 store the emthod data for a wrapper in an array instead of a list.
20268 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
20270 * marshal.c: change the code to allocate memory more
20271 conservatively for method wrappers.
20273 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
20275 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
20276 fields from MonoClass to the marshal info structure where they belong.
20278 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20280 * class.c, object.c, class-internals.h, marshal.c: rearrange
20281 some fields and tweak some types to lower memory usage.
20283 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
20285 * threads.c (signal_thread_state_change): Handle the case when the
20286 target thread is the current thread.
20288 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
20290 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
20291 emit_ptr_to_object_conv.
20293 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
20294 marshalling. Fixes #71352.
20296 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20298 * metadata.h, blob.h: move table enum to blob.h so it can be included
20300 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
20301 cut the size of MonoImage/MonoDynamicImage.
20303 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
20305 * profiler.c (mono_profiler_install_simple): Fix default arguments.
20307 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
20309 * reflection.c, reflection.h, icall.c: add a function to check
20310 if an attribute type is defined for a metadata object.
20312 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
20314 * object-internals.h: Added some needed fields from StringBuilder class.
20315 * marshal.c: Set the maxCapacity when creating a StringBuilder.
20317 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
20319 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
20320 threads before shutting down the runtime.
20322 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
20324 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20326 * object-internal.h, threads.c: implement stacksize and
20327 parameterized thread start functionality (requires
20328 matching corlib). Marked broken code for later removal.
20330 2005-01-12 Martin Baulig <martin@ximian.com>
20332 * class-internals.h (MonoGenericClass): Moved the `initialized'
20333 flag to MonoDynamicGenericClass, removed `init_pending'.
20334 (MonoGenericInst): Added `is_reference' flag.
20336 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
20338 * reflection.c (mono_image_create_pefile): Only set the pe_offset
20339 inside the MSDOS header. Fixes #71201.
20341 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
20343 (mono_domain_finalize): Ditto.
20345 2005-01-12 Martin Baulig <martin@ximian.com>
20347 * class.c (mono_get_shared_generic_class): Use the cache for
20348 non-dynamic generic classes.
20350 * class-internals.h (mono_class_create_generic_2): Removed
20351 function prototype, this function is now static inside class.c.
20353 * class.c (mono_class_create_generic_2): Made this static, only
20354 call it from mono_class_init() and mono_class_setup_parent().
20355 (collect_implemented_interfaces_aux): Call mono_class_init() on
20356 the interfaces we collect.
20357 (mono_class_setup_vtable): Call mono_class_init (class->parent).
20359 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
20361 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
20362 it a real thread handle.
20364 * domain-internals.h: Move exvar_offset from MonoJitInfo to
20365 MonoJitExceptionInfo, since each catch clause needs its own variable.
20367 2005-01-11 Dick Porter <dick@ximian.com>
20369 * image.c (mono_pe_file_open): New variant on mono_image_open()
20370 that does not set up the CLI metadata; used for FileVersionInfo so
20371 it can get the data for windows binaries too.
20373 * process.c (process_read_string_block): Don't read off the end of
20374 the StringTable block.
20376 These both fix bug 70766.
20378 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
20380 * gc.c: set some fields to NULL at GC cleanup time.
20381 * threads.c: if we quit the main thread, call exit ().
20383 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
20385 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
20387 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
20389 * threads.h, threads.c, object.c: added accessor and settor for
20390 main_thread. Handle it specially when exiting from it: wait
20391 for other foreground threads to exit.
20393 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
20395 * process.c, verify.c: remove some bloat.
20397 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
20399 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
20400 the calling convention to cdecl under win32.
20402 2005-01-08 Ben Maurer <bmaurer@ximian.com>
20404 * object.c (mono_object_get_size): New function to get the size of
20405 an object instance.
20407 * profiler.c (simple_allocation): Use above.
20409 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
20411 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
20412 ves_icall_System_AppDomain_getRootDomain (as it's not required to
20413 get an appdomain by it's id and we can't assume the root's id is 0).
20414 * domain-internals.h: Change the function prototype to match.
20415 * icall.c: Change the icall table for AppDomain.
20417 2005-01-08 Miguel de Icaza <miguel@ximian.com>
20419 * locales.c (string_invariant_compare_char): Only compute
20420 GUnicodeTypes in the case where we need them. Test for ordinality
20421 first and return if so.
20426 * FIXME: here we must use the information from c1type and c2type
20427 * to find out the proper collation, even on the InvariantCulture, the
20428 * sorting is not done by computing the unicode values, but their
20429 * actual sort order.
20432 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20434 * loader.c: for P/Invoke methods, allow the "Internal" shared
20435 library name to refer to the calling process symbol namespace.
20437 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
20439 * Makefile.am: Add the security manager to the build.
20440 * security-manager.c|h: New. Initialization of the security manager.
20442 2005-01-07 Dick Porter <dick@ximian.com>
20445 * monitor.c: Update thread state during Monitor and WaitHandle
20446 waits. Fixes bug 71031.
20448 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
20450 * reflection.c (property_encode_signature): Correctly handle when the
20451 property has no methods.
20453 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
20455 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
20457 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
20458 fields from mb, not rmb. Fixes #71017.
20460 * marshal.c (emit_ptr_to_str_conv): Add support for
20461 ByValTStr -> string conversion. Fixes #71015.
20463 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
20465 * mempool.c (mono_mempool_contains_addr): New helper function.
20467 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
20469 * metadata.c (mono_metadata_compute_size): Fix size calculation of
20470 HasSematics encoded fields.
20472 * metadata.c (mono_type_to_unmanaged): Improve error message for
20473 invalid string marshalling.
20475 * metadata.c: Fix warnings.
20477 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20479 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
20482 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
20484 * domain.c object.c domain-internals.h: Revert part of r38077 since the
20485 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
20488 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
20490 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
20491 so methods containing these can be AOTed.
20493 2005-01-03 Martin Baulig <martin@ximian.com>
20495 * loader.c (find_method): Removed the hack for generic instances.
20496 (method_from_memberref): If our parent is a generic instance, pass
20497 its generic type definition to find_method() and then inflate the
20499 (mono_get_method_constrained): Pass the generic type definition to
20500 find_method() and inflate the method later.
20502 * class-internals.h (MonoStats): Added `generic_class_count'.
20504 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
20505 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
20507 * reflection.c (mono_custom_attrs_from_params): Don't ignore
20508 generic type definitions.
20510 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
20512 * loader.c icall.c: Fix warnings.
20514 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
20516 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
20517 blittable types. Fixes #70864.
20519 2004-12-29 Martin Baulig <martin@ximian.com>
20522 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
20524 * reflection.c (mono_method_get_object): Create a
20525 "System.Reflection.MonoGenericMethod" for inflated methods; don't
20526 call mono_get_inflated_method().
20528 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
20530 2004-12-27 Martin Baulig <martin@ximian.com>
20532 * class-internals.h (MonoMethod): Added `is_inflated' flag.
20533 (MonoMethodInflated): Added `inflated' field.
20535 * class.c (mono_class_inflate_generic_method): Don't really
20536 inflate the method here; just set the `is_inflated' flag in the
20538 (mono_class_get_inflated_method): Actually inflate the method here
20539 if it's not already inflated; we use the MonoMethodInflated's new
20540 `inflated' field as a cache.
20542 2004-12-26 Martin Baulig <martin@ximian.com>
20545 (inflate_generic_class): Moved some code out of inflate_generic_type().
20546 (mono_class_inflate_generic_method): If we're already inflated,
20547 inflate the context and use the declaring method; ie. make sure
20548 the declaring method of an inflated method is always the generic
20550 (mono_class_create_from_typedef): Create
20551 `class->generic_container->context->gclass'.
20553 2004-12-24 Ben Maurer <bmaurer@ximian.com>
20555 * metadata-internals.h, marshal.c, reflection.c: More
20556 MonoGHashTable->GHashTable.
20558 * domain-internals.h, class.c: Change MonoGHashTable's into
20559 GHashTables for some cases where no gc stuff is used
20561 All users: update apis
20563 2004-12-23 Ben Maurer <bmaurer@ximian.com>
20565 * metadata.c (builtin_types): Make this `const'. Makes this get
20566 put into the shareable section.
20567 (mono_metadata_init): Casts to make gcc happy.
20569 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
20571 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
20573 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
20575 * icall.c: Added an internal call to retrieve the position and length
20576 of assembly-level declarative security attributes (RequestMinimum,
20577 RequestOptional and RequestRefuse). This is used by the Assembly class
20578 to re-create the corresponding permission sets.
20580 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
20582 * marshal.c: fix the stelemref wrapper to be type correct
20585 2004-12-20 Ben Maurer <bmaurer@ximian.com>
20587 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
20588 to do key & 0x7fffffff. Hashtable already does this. It just
20589 results in longer code.
20591 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
20593 * appdomain.c: Bump corlib version.
20594 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
20595 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
20596 * reflection.c|h: Add functions to get declarative security infos
20597 (blob position and length) for assemblies, classes and methods.
20599 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
20601 * reflection.c: sort the constant table (bug #70693).
20603 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
20605 * object-internals.h, threads.c, domain.c: add accessors for
20606 the MonoThread and MonoDomain tls keys.
20608 2004-12-18 Martin Baulig <martin@ximian.com>
20610 * class.c (inflate_generic_type): If we're inflating a generic
20611 instance, set `ngclass->context->container = context->container';
20612 ie. the container we inflated into.
20614 * metadata.c (mono_metadata_parse_generic_param): Reflect above
20615 inflate_generic_type() changes.
20617 2004-12-17 Martin Baulig <martin@ximian.com>
20619 * class-internals.h
20620 (MonoGenericClass): Replaced `MonoType *generic_type' with
20621 `MonoClass *generic_class'. Removed `dynamic_info'; if
20622 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
20623 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
20625 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
20627 * exception.c (mono_exception_from_token): New helper function.
20629 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
20631 * assembly.c (mono_assembly_load_with_partial_name): Call
20632 mono_assembly_loaded before invoking the preload hooks. Fixes
20635 * object-internals.h (MonoThread): Change culture_info and
20636 ui_culture_info into an array.
20638 * threads.c: Cache culture info objects from more than one appdomain.
20640 * threads.c threads-types.h icall.c: Add icalls for manipulating the
20641 current UI culture.
20643 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
20645 * threads.h threads.c appdomain.c: Clear the culture_info field of
20646 all threads during unloading if they point to an object in the dying
20649 2004-12-13 Ben Maurer <bmaurer@ximian.com>
20651 * culture-info.h (TextInfoEntry): New struct
20652 * object-internals.h: sync with managed
20653 * locales.c: fill the `text_info_data' field
20654 * culture-info-tables.h: update
20656 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20658 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
20661 2004-12-12 Ben Maurer <bmaurer@ximian.com>
20663 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
20664 (ves_icall_ModuleBuilder_getMethodToken): Ditto
20666 2004-12-12 Martin Baulig <martin@ximian.com>
20668 * mono-debug-debugger.c (write_type): If we're an enum and the
20669 builtin types have already been initialized, call mono_class_init().
20671 2004-12-11 Martin Baulig <martin@ximian.com>
20673 * metadata.c (mono_metadata_load_generic_params): Added
20674 `MonoGenericContainer *parent_container' argument; automatically
20675 compute `container->is_method'; pass the correct owner to
20678 * reflection.c (compare_genericparam): Sort the GenericParam table
20679 according to increasing owners.
20681 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
20683 * profiler.c: allow disabling the default profiler.
20685 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
20687 * decimal.c, icall.c: allow disabling System.Decimal support.
20689 2004-12-09 Marek Safar <marek.safar@seznam.cz>
20691 * reflection.c: Add support for null attribute arguments.
20693 2004-12-09 Martin Baulig <martin@ximian.com>
20695 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
20696 names to get rid of compiler warnings.
20698 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
20700 * marshal.c (mono_marshal_get_struct_to_ptr): Call
20701 mono_marshal_load_type_info (). Fixes #69625.
20702 (mono_marshal_get_ptr_to_struct): Likewise.
20704 2004-12-08 Martin Baulig <martin@ximian.com>
20706 * mono-debug.h: Bumped version number to 47.
20708 * mono-debug-debugger.c
20709 (mono_debugger_event_handler, mono_debugger_event): Take two
20710 guint64 arguments insteed of a gpointer and a guint32.
20712 2004-12-08 Martin Baulig <martin@ximian.com>
20714 * debug-mono-symfile.h
20715 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
20716 `address' to `native_offset'.
20718 2004-12-08 Martin Baulig <martin@ximian.com>
20720 * class.c (mono_class_create_from_typespec): Only inflate if we
20721 either have `context->gclass' or `context->gmethod'.
20723 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
20725 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
20727 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
20729 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
20731 * reflection.c (mono_assembly_get_object): Remove the workaround put
20732 in for the release.
20734 * appdomain.c: Use the corlib_internal field from MonoAssembly.
20736 * appdomain.c: Bump corlib version.
20738 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
20739 be visible in other appdomains.
20741 2004-12-07 Ben Maurer <bmaurer@ximian.com>
20743 * threads.c: Interlocked inc and dec for longs were messed up,
20744 use a KISS based impl for this. Fixes 70234
20746 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
20748 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
20750 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
20752 * icall.c: fix to follow policy not to allow struct
20753 arguments in icalls.
20755 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20757 * process.c: make the patch that handles spaces in file paths work
20758 on mono/windows too.
20760 2004-12-06 Martin Baulig <martin@ximian.com>
20762 * class.c (mono_class_create_generic): Call
20763 mono_class_setup_supertypes() if we're dynamic.
20764 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
20766 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
20768 * object-internals.h: Add new fields to MonoThread.
20770 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20772 * icall.c threads-types.h threads.c: Add new icalls.
20774 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
20776 * object-internals.h (MonoReflectionAssembly): Sync object layout with
20779 * appdomain.c: Bump corlib version.
20781 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
20782 internal assemblies. Fixes #69181.
20784 2004-12-05 Martin Baulig <martin@ximian.com>
20786 * class.c (mono_class_inflate_generic_signature): Make this a
20787 no-op if `context' is NULL or we don't have any type parameters;
20788 also copy `sentinelpos'.
20790 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
20792 * image.c: Add unbox_wrapper_cache.
20794 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
20796 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
20797 function generator.
20799 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
20802 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
20804 2004-12-04 Martin Baulig <martin@ximian.com>
20806 * loader.c (mono_method_get_signature_full): New public function;
20807 like mono_method_get_signature(), but with an additional
20808 `MonoGenericContext *' argument.
20810 * class.c (mono_class_inflate_generic_signature): Formerly known
20811 as inflate_generic_signature(); make this public.
20813 2004-12-04 Martin Baulig <martin@ximian.com>
20816 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
20817 instead of a `MonoGenericContainer *'.
20818 (mono_metadata_parse_array_full): Likewise.
20819 (mono_metadata_parse_signature_full): Likewise.
20820 (mono_metadata_parse_method_signature_full): Likewise.
20821 (mono_metadata_parse_generic_inst): Likewise.
20822 (mono_metadata_parse_generic_param): Likewise.
20823 (mono_metadata_parse_mh_full): Likewise.
20824 (mono_type_create_from_typespec_full): Likewise.
20826 2004-12-03 Martin Baulig <martin@ximian.com>
20828 * class-internals.h (MonoGenericContainer): Replaced the
20829 `MonoGenericContext * pointer with a `MonoGenericContext'
20830 structure and made it the first element.
20832 2004-12-03 Martin Baulig <martin@ximian.com>
20835 (inflate_generic_type): Set the `context->container' when creating
20836 a new MonoGenericContext.
20837 (mono_class_inflate_generic_method): Likewise.
20838 (mono_class_create_from_typespec): Just use `context->container'
20839 to get the container.
20841 * loader.c (method_from_methodspec): Set `context->parent' from
20842 `context->container' - and if that's a method container, use its
20843 parent. Also set the `context->container' when creating a new
20844 MonoGenericContext.
20845 (mono_get_method_from_token): Use just `context->container' to get
20848 * metadata.c (do_mono_metadata_parse_generic_class): Also set
20849 `gclass->context->container'.
20851 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
20852 the `context->container' when creating a new MonoGenericContext.
20854 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
20856 * reflection.c (compare_genericparam): Sort params with identical
20857 owner by their number. Fixes gen-111 on sparc.
20859 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
20861 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
20862 around the domain changes.
20864 * appdomain.c (mono_domain_unload): Handle the case when the thread
20865 calling Unload is itself being aborted during unloading. Fixes #70022.
20867 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
20869 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
20870 checkpoint_func as an icall so it gets a wrapper.
20871 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
20872 in the cross-appdomain wrappers too.
20874 * threads.c (mono_thread_has_appdomain_ref): Make this public.
20876 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
20878 * reflection.c: Fix some memory leaks.
20880 2004-12-02 Martin Baulig <martin@ximian.com>
20882 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
20884 * metadata.c (generic_class_cache): New static hashtable.
20885 (mono_metadata_lookup_generic_class): New public method.
20887 2004-12-02 Martin Baulig <martin@ximian.com>
20889 * class.c (mono_class_create_from_typedef): Call
20890 mono_class_setup_parent() and mono_class_create_mono_type() before
20891 parsing the interfaces.
20893 2004-12-02 Martin Baulig <martin@ximian.com>
20895 * metadata.c (generic_inst_cache): New static hashtable.
20896 (mono_metadata_lookup_generic_inst): New public function.
20897 (mono_metadata_inflate_generic_inst): New public function.
20898 (mono_metadata_parse_generic_inst): New public function.
20899 (do_mono_metadata_parse_generic_class): Use the new
20900 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
20901 since this'll also use the cache.
20903 * reflection.c (mono_reflection_bind_generic_method_parameters):
20904 Use mono_metadata_lookup_generic_inst() to use the new cache.
20906 * class.c (inflate_mono_type): Use
20907 mono_metadata_inflate_generic_inst() to inflate a generic
20908 instance; this'll also use the new cache.
20910 * loader.c (method_from_methodspec): Use
20911 mono_metadata_parse_generic_inst() and
20912 mono_metadata_inflate_generic_inst() rather than parsing it
20913 manually, so we can use the new cache.
20915 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
20917 * threads.c (wait_for_tids): Do not incorrectly free threads when
20918 the wait times out.
20920 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20922 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
20923 iter->args based on whether parameters are passed in registers (i.e.
20924 MONO_ARCH_REGPARMS is defined)
20926 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
20928 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
20929 the exception message. Fixes #70070.
20930 (method_from_methodspec): Fix warnings.
20932 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20934 * process.c: (complete_path) return the path quoted
20936 2004-12-01 Martin Baulig <martin@ximian.com>
20938 * class-internals.h (MonoGenericInst): New structure.
20939 (MonoGenericClass): Replaced `type_argc', `type_argv' and
20940 `is_open' with `MonoGenericInst *inst'.
20941 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
20942 `is_open' with `MonoGenericInst *inst'.
20944 2004-11-30 Martin Baulig <martin@ximian.com>
20946 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
20948 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
20949 to `generic_class_cache'.
20952 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
20953 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
20954 (mono_generic_inst_is_valuetype): Renamed to
20955 mono_generic_class_is_valuetype().
20957 * class-internals.h
20958 (MonoGenericInst): Renamed to MonoGenericClass.
20959 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
20960 (MonoClass): Renamed `generic_inst' to `generic_class'.
20961 (MonoGenericContext): Renamed `ginst' to `gclass'.
20963 * object-internals.h
20964 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
20966 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
20967 mono_reflection_generic_class_initialize().
20969 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
20970 now known as "System.Reflection.MonoGenericClass".
20971 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
20973 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
20975 * class-internals.h: Added a flag field to MonoClass to cache the
20976 declarative security attributes actions associated with the class.
20977 * domain-internals.h: Added booleans to MonoJitInfo to cache the
20978 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
20979 applicable to the JITted method.
20980 * reflection.c|h: Added functions to extract (as flags) which security
20981 actions are available (declaratively) for a method, class or assembly.
20982 * metadata.c|h: Added functions to search the declarative security
20983 table in the metadata.
20985 2004-11-29 Ben Maurer <bmaurer@ximian.com>
20987 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
20988 EXPORTEDTYPES are already in the class name cache, so there is no
20989 need to add extra code here to look at them. Just removes a bit of
20992 (ves_icall_System_Environment_get_TickCount): No need for #if
20993 WINDOWS. We already have the code in io-layer.
20995 2004-11-28 Martin Baulig <martin@ximian.com>
20998 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
21001 2004-11-27 Miguel de Icaza <miguel@ximian.com>
21003 * assembly.c (do_mono_assembly_open): Instead of having a
21004 conditional WITH_BUNDLE, incorporate support for bundles here, by
21005 having a global `bundles' variable holding a pointer to the actual
21008 (mono_register_bundled_assemblies): New API call used by the
21011 See mkbundle.1 for details.
21013 2004-11-27 Martin Baulig <martin@ximian.com>
21015 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
21016 the vtable for generic methods.
21018 2004-11-26 Martin Baulig <martin@ximian.com>
21021 (mono_metadata_generic_method_hash): New public function.
21022 (mono_metadata_generic_method_equal): Likewise.
21024 * class-internals.h
21025 (MonoGenericContainer): Added `GHashTable *method_hash'.
21027 * reflection.c (ReflectionMethodBuilder): Added
21028 `MonoGenericContainer *generic_container'.
21029 (reflection_methodbuilder_to_mono_method): Don't create a new
21030 MonoGenericContainer each time we're called.
21031 (mono_reflection_bind_generic_method_parameters): Use
21032 `container->method_hash' to cache the results so we don't create a
21033 different method if we're called several times with the same
21036 * loader.c (method_from_methodspec): Use the new
21037 `container->method_hash' here, too.
21039 2004-11-26 Martin Baulig <martin@ximian.com>
21041 * class.c (inflate_generic_signature): Correctly compute
21042 `res->has_type_parameters'.
21043 (mono_class_vtable): Use the `has_type_parameters' flag to
21044 determine whether we're a generic method.
21046 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
21048 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
21050 * object.c (mono_runtime_run_main): Fix a small memory leak.
21052 2004-11-25 Martin Baulig <martin@ximian.com>
21054 * class.c (set_generic_param_owner): Fixed the loop.
21056 2004-11-25 Martin Baulig <martin@ximian.com>
21058 * object.c (mono_class_vtable): Don't create any JIT wrappers for
21061 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
21063 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
21064 names. Fixes #69787.
21066 2004-11-24 Martin Baulig <martin@ximian.com>
21068 * class.c (mono_class_create_generic_2): If we don't have a
21069 `ginst->parent', inflate `gklass->parent' to get our parent.
21071 2004-11-24 Martin Baulig <martin@ximian.com>
21073 * reflection.c (compare_genericparam): Correctly sort the
21074 GenericParam table; fixes #69779.
21076 2004-11-23 Ben Maurer <bmaurer@ximian.com>
21078 * reflection.c: When writing a PE file, don't create a huge
21079 buffer in memory. Just write the arrays we have to the file.
21080 This reduces memory usage.
21082 * metadata-internals.h: MonoDynamicStream pefile is no longer used
21085 2004-11-17 Martin Baulig <martin@ximian.com>
21087 * class.c (mono_class_init): Don't setup `class->parent' for
21088 dynamic instances; moved this to mono_class_generic_2().
21089 (mono_class_create_generic): Also set `klass->inited' for dynamic
21091 (mono_class_create_generic_2): Don't do anything for dynamic
21092 generic instances. Set `klass->parent' here and also call
21093 mono_class_setup_parent() here.
21095 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
21096 `MonoType *parent' argument; set `ginst->parent' before calling
21097 mono_class_create_generic_2(), so we set the correct parent.
21099 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
21101 * reflection.c: allow getting attributes from ModuleBuilder
21104 2004-11-17 Martin Baulig <martin@ximian.com>
21106 * class.c (mono_class_create_from_typedef): If a type parameter is
21107 inherited from an outer class, set its owner to that class.
21109 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
21111 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
21112 for (int*) written size. This fixes bug #69592.
21114 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
21116 * icall.c: Added IsAuthenticodePresnet internal call.
21117 * image.c|h: New function that check a MonoImage for an Authenticode
21118 signature in the certificate PE data directory.
21119 * security.c|h: New internal call to ask the runtime if an
21120 Authenticode signature seems referenced in the PE header.
21122 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
21124 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
21126 * reflection.c (mono_image_create_pefile): Free the assembly streams
21127 after writing out the assembly file.
21129 * object.c (mono_runtime_run_main): Fix small memory leak.
21131 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
21132 property access modifiers. Fixes #69389.
21134 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
21136 * domain.c, object.c, object-internals.h, domain-internals.h,
21137 object.h, marshal.c: keep dynamic code info per domain.
21139 2004-11-15 Martin Baulig <martin@ximian.com>
21141 * class.c (mono_type_get_name_recurse): Put type arguments in
21142 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
21145 2004-11-15 Martin Baulig <martin@ximian.com>
21147 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
21148 (mono_class_setup_vtable): When computing `the_cname' for a
21149 generic instance, don't include the namespace since we'd otherwise
21152 2004-11-15 Martin Baulig <martin@ximian.com>
21154 * class.c (mono_class_create_generic): Changed return type to void.
21155 (mono_class_create_generic_2): New public function; setup
21156 `class->method', `class->field' and `class->interfaces' here
21157 instead of in mono_class_init().
21159 * class.h (mono_class_create_generic): Moved to class-internals.h.
21161 2004-11-14 Ben Maurer <bmaurer@ximian.com>
21163 * reflection.c (mono_image_create_pefile): take a file HANDLE.
21164 rather than writing to memory, write to this file. Right now,
21165 we are just writting into a buffer, and copying that. However
21166 we can avoid the buffer later.
21168 (mono_dynamic_stream_reset): new function
21170 * icall.c, object-internals.h: update for the above.
21172 2004-11-13 Ben Maurer <bmaurer@ximian.com>
21174 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
21175 have been using gc'd memory. First it is slower, unlikely
21176 the comment in the source code said, secondly, it increases
21177 our footprint to do it in the gc.
21179 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
21180 the method so that it does not have to copy to managed code.
21182 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
21184 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
21186 2004-11-12 Martin Baulig <martin@localhost>
21188 * reflection.c (mono_image_create_token): Allow generic method
21189 definitions here, since they may appear in an `.override'; see
21190 gen-98/gen-99 for an example.
21192 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
21194 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
21197 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
21200 2004-11-11 Martin Baulig <martin@ximian.com>
21202 * class.c (mono_class_setup_vtable): In an explicit interface
21203 implementation, the method name now includes the arity.
21205 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
21207 * object.c (mono_array_full_copy): Fix warning.
21209 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
21211 * appdomain.c: Removed look_for_method_by_name(). Use the new method
21212 mono_class_get_method_from_name() instead.
21214 * class-internals.h: Added two new types of wrappers.
21215 Added MonoRemotingTarget enum. Added new trampoline function type, which
21216 takes an additional MonoRemotingTarget value as parameter, so it is
21217 possible to request a trampoline for a specific target.
21219 * class.c: Added new mono_class_get_method_from_name() method.
21221 * class.h: In MonoRemoteClass, we can have now to vtables, one for
21222 general remoting sinks and one specific for cross domain calls.
21224 * debug-helpers.c: Added new wrapper names.
21226 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
21229 * image.c: Porperly delete value objects form the remoting invoke hashtable.
21231 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
21232 with several other methods (mono_marshal_get_xappdomain_dispatch,
21233 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
21234 and others) can generate a fast remoting wrapper for cross domain calls.
21235 More information can be found in docs/remoting.
21236 Other changes: Removed mono_find_method_by_name, and used
21237 mono_class_get_method_from_name instead.
21238 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
21239 is stored in the remoting invoke hashtable.
21241 * marshal.h: published the new method for getting the xdomain wrapper,
21242 and also added a method for getting the adequate wrapper for a given
21245 * object-internals.h, object.c: Added a couple of methods for capying and
21247 Modified mono_install_remoting_trampoline, which takes the new remoting
21248 trampoline that has a remoting target as parameter.
21249 mono_class_proxy_vtable now also takes a remoting target as parameter, and
21250 will return the most suitable vtable for the target.
21251 Added mono_remote_class_vtable, which returns the vtable of a remote class
21252 (which can be the normal remoting vtable or the xdomain vtable).
21254 * threads.c: the xdomain invoke and dispatch wrappers must also be
21255 protected against interruptions.
21257 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21259 * icall.c: use memmove in BlockCopyInternal when the source and
21260 destination arrays are the same.
21262 2004-11-09 Martin Baulig <martin@ximian.com>
21264 * class-internals.h (MonoGenericContainer): Removed `method' and
21265 `signature', replaced them with `is_method' and `is_signature'
21266 flags. Added `context'.
21268 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
21269 instead of a `MonoGenericContainer *'.
21271 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
21272 for dynamic type parameters.
21273 (mono_metadata_load_generic_params): Setup `container->context'.
21275 * reflection.c (mono_reflection_setup_generic_class): Setup
21276 `tb->generic_container->context'.
21277 (do_mono_reflection_bind_generic_parameters): Use
21278 mono_class_inflate_generic_type() to correctly inflate types,
21279 rather than using our own hack just for MONO_TYPE_VAR.
21281 2004-11-09 Martin Baulig <martin@ximian.com>
21283 * class.c (mono_class_inflate_generic_method): Small fix; don't
21287 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
21288 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
21289 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
21290 (ves_icall_Type_BindGenericParameters): Likewise.
21291 (ves_icall_Type_get_IsGenericInstance): Likewise.
21292 (ves_icall_Type_GetGenericParameterPosition): Likewise.
21293 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
21294 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
21295 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
21297 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
21299 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
21300 assembly versions and public key tokens. Fixes #69113.
21302 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
21304 * metadata.c: fix bug introduced with the type cache changes
21307 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
21309 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
21310 the MonoClass pointer instead of the token in exception clauses.
21311 * reflection.c: updates for the above and make the code not depend
21312 on the structure of MonoExceptionClause.
21314 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
21316 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21317 Add support for dynamic assemblies. Fixes #69114.
21319 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
21321 2004-11-07 Ben Maurer <bmaurer@ximian.com>
21323 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
21324 since most only those methods use it. the code member of
21325 MonoMethodPInvoke was dead, so that can be removed too. Also,
21326 remove inline_count (again, not used), and move slot so that it
21327 can share bits with some other flags. This saves 8 bytes in the
21328 structure and gives us about 50 kb back for mcs helloworld.cs
21330 * *.[ch]: Do naming changes for the above.
21332 * loader.c (mono_method_get_header): Lazily init the header
21334 (mono_get_method_from_token): don't init the header here
21335 (mono_free_method): the header may never be allocated
21337 Overall, this saves 150 kb of unmanaged allocations
21338 for mcs helloworld.cs. That accounts for 10% of the unmanaged
21341 * loader.c, loader.h (mono_method_get_header): new accessor.
21343 * *.[ch]: use the above method. Prepares us to lazily load
21346 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
21347 three warnings, which are actual bugs (see 69206).
21349 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
21350 unused. Saves a cool 4 bytes / method.
21352 2004-11-06 Ben Maurer <bmaurer@ximian.com>
21354 * metadata.c (builtin_types): Add types for System.Object here.
21355 (mono_metadata_parse_type_full): Cache MonoType*'s that are
21356 for a class or valuetype from klass->this_arg or klass->byval_arg.
21358 On mcs for a hello world, this gets us down from 21836 MonoType's
21361 (mono_metadata_free_type): Account for the above change.
21363 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
21365 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
21366 exception instead of asserting if name is null.
21367 (ves_icall_System_AppDomain_GetData): Ditto.
21369 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
21371 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
21374 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
21375 Return NULL when the domain does not have entry_assembly set.
21377 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
21378 Add a 'resource_modules' argument.
21379 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
21381 * reflection.c (mono_reflection_create_runtime_class): Move setting
21382 of wastypebuilder here, so mono_get_type_object () returns a MonoType
21385 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
21386 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
21387 Throw an ArgumentNullException if 'ptr' is null.
21389 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
21390 assemblies here. Fixes #69020.
21392 2004-11-05 Geoff Norton <gnorton@customerdna.com>
21394 * reflection.c (build_compressed_metadata): Fix the previous patch for
21395 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
21398 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
21400 * assembly.c (mono_assembly_names_equal): Allow a match if one of
21401 the cultures is false. Fixes #69090.
21403 * reflection.c (build_compressed_metadata): Fix invalid memory read
21404 detected by valgrind.
21406 * reflection.c (mono_reflection_get_type): Avoid triggering a
21407 TypeResolve multiple times for the same type. Fixes #65577.
21409 2004-11-04 Ben Maurer <bmaurer@ximian.com>
21411 * marshal.c: Avoid using ldftn to call managed functions. It is
21412 much slower than just a call.
21414 * reflection.c (mono_module_get_object): free the basename we
21415 allocate here from glib.
21417 * reflection.c (ensure_runtime_vtable): make sure to free
21418 overrides. Also, we were allocating an array of MonoMethod not an
21419 array of MonoMethod*.
21421 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
21423 * image.c (mono_image_close): free image->guid here.
21425 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
21427 * reflection.c: Fix some spec conformance issues with the PE file
21428 structures so mcs compiled apps run on the Net 2.0 beta.
21430 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
21432 * string-icalls.c (ves_icall_System_String_ctor_encoding):
21433 Implement this. Fixes #67264.
21435 * debug-helpers.h debug-helpers.c marshal.c: Move
21436 mono_find_method_by_name to debug-helpers.c.
21438 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
21440 * object.c (mono_release_type_locks): type_initialization_hash is
21443 * reflection.c object.c object-internals.h: Fix warnings.
21445 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
21446 without accessors. Fixes #61561.
21448 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
21449 application base from the root domain if not set. Fixes #65641.
21450 (mono_runtime_init): Fix warning.
21452 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21454 * appdomain.c: call mono_thread_pool_init.
21455 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
21456 of worker threads based on the number of CPUs and the environment
21457 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
21458 for non-windows (windows) systems.
21460 2004-10-27 Chris Toshok <toshok@ximian.com>
21462 * mono-debug-debugger.c (write_class): don't call mono_class_init
21463 here, as even with the check for (!klass->init_pending), we get
21464 into a situation where we're hitting cycles in class
21465 initialization. Fixes #68816.
21467 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
21469 * image.c: Avoid overwriting values in the loaded_images_hash when an
21470 assembly is loaded multiple times. Fixes #61152.
21472 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
21473 so multiple satellite assemblies for the same name can be loaded.
21476 * mono_domain_assembly_preload: Actually return the loaded assembly,
21479 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
21480 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
21482 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
21483 pending finalizers are not invoked after the appdomain has been
21484 unloaded. Fixes #67862.
21486 2004-10-22 Martin Baulig <martin@ximian.com>
21488 * mono-debug-debugger.c
21489 (mono_debugger_runtime_invoke): Don't box valuetypes.
21491 2004-10-22 Chris Toshok <toshok@ximian.com>
21493 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
21494 don't hide private methods.
21496 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
21498 * icall.c: Allows the runtime to "share" (when known) the public key
21499 token of an assembly. This avoid the need to recalculate the token
21500 (from the public key) in managed code.
21502 2004-10-21 Chris Toshok <toshok@ximian.com>
21504 * debug-helpers.c (append_class_name): argh, revert last patch.
21506 2004-10-21 Chris Toshok <toshok@ximian.com>
21508 * debug-helpers.c (append_class_name): use '+' as the delimiter,
21509 not '/', so that it matches what the debugger uses to look up
21512 2004-10-21 Martin Baulig <martin@ximian.com>
21514 * mono-debug-debugger.c (mono_debugger_throw_exception): New
21515 public method; this is called each time an exception is thrown and
21516 allows the debugger to use exception catch points.
21518 2004-10-21 Martin Baulig <martin@ximian.com>
21520 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
21521 the stack pointer and the exception object in some struct and pass
21522 that to the debugger.
21524 2004-10-21 Chris Toshok <toshok@ximian.com>
21526 * mono-debug-debugger.c (do_write_class): add instance/static
21527 event support. We don't expose "raise" or "other" yet.
21528 (event_is_static): new method.
21530 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
21532 * mono-debug-debugger.c
21533 (mono_debugger_handle_exception): Remove
21534 bogus return value for fussy compilers.
21536 2004-10-20 Martin Baulig <martin@ximian.com>
21538 * mono-debug-debugger.c
21539 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
21540 (mono_debugger_handled_exception): Likewise.
21542 2004-10-20 Martin Baulig <martin@ximian.com>
21544 * mono-debug-debugger.h (MonoDebuggerEvent): Added
21545 MONO_DEBUGGER_EVENT_EXCEPTION.
21547 * mono-debug-debugger.c (mono_debugger_handle_exception): New
21548 public function to send the debugger a notification for an
21549 exception and inform it about a catch/finally clause.
21551 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
21553 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
21554 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
21557 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
21559 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
21561 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
21562 marshalled as [In,Out]. Fixes #58325.
21564 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
21566 * reflection.c (mono_method_body_get_object): Implement some fields.
21568 2004-10-12 Martin Baulig <martin@ximian.com>
21570 * reflection.c (mono_reflection_bind_generic_parameters): Small
21571 fix, correctly retrieve our parent from a generic instance.
21573 2004-10-12 Martin Baulig <martin@ximian.com>
21575 * metadata.c (mono_metadata_generic_param_equal): We always have
21579 (mono_class_from_generic_parameter): We need to have an owner.
21580 (my_mono_class_from_generic_parameter): Likewise.
21582 * reflection.c (mono_reflection_setup_generic_class): Renamed to
21583 mono_reflection_create_generic_class() and added a new
21584 mono_reflection_setup_generic_class().
21585 (mono_reflection_initialize_generic_param): If we're a nested
21586 generic type and inherited from the containing class, set our
21587 owner to the outer class.
21589 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
21591 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
21593 * reflection.c (mono_method_body_get_object): New function to create
21594 a MethodBody object.
21596 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
21598 2004-10-11 Martin Baulig <martin@ximian.com>
21600 * metadata.c (_mono_metadata_type_equal): Renamed to
21601 do_mono_metadata_type_equal() and made static.
21603 2004-10-11 Martin Baulig <martin@ximian.com>
21605 * appdomain.c: Bump corlib version number to 28.
21607 2004-10-10 Martin Baulig <martin@ximian.com>
21609 * class-internals.h
21610 (MonoGenericInst): Added `MonoGenericContainer *container'.
21611 (MonoGenericMethod): Likewise.
21612 (MonoGenericContext): Likewise.
21613 (MonoGenericParam): Added `MonoGenericContainer *owner'.
21616 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
21617 (do_mono_metadata_parse_generic_inst): Likewise.
21618 (mono_metadata_parse_type_full): New public method. This is the actual
21619 mono_metadata_parse_type() implementation - with an additional
21620 `MonoGenericContainer *' argument.
21621 (mono_metadata_parse_array_full): Likewise.
21622 (mono_metadata_parse_signature_full): Likewise.
21623 (mono_metadata_parse_method_signature_full): Likewise.
21624 (mono_metadata_parse_mh_full): Likewise.
21625 (mono_type_create_from_typespec): Likewise.
21626 (mono_metadata_interfaces_from_typedef_full): New public method;
21627 this is similar to the other _full() methods, but we take a
21628 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
21629 (mono_metadata_parse_generic_param): Take an additional
21630 `MonoGenericContainer *' argument and lookup the MonoGenericParam
21631 from that container.
21632 (mono_metadata_generic_param_equal): New static method to compare
21633 two type parameters.
21634 (_mono_metadata_type_equal): New static method; takes an
21635 additional `gboolean signature_only' argument - if true, we don't
21636 compare the owners of generic parameters.
21637 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
21638 with a TRUE argument - do a signature-only comparision.
21640 * loader.c: Use the new _full() methods and pass the
21641 MonoGenericContainer to them.
21643 * object-internals.h (MonoReflectionTypeBuilder): Added
21644 `MonoGenericContainer *generic_container' field.
21645 (MonoReflectionMethodBuilder): Likewise.
21647 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
21649 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
21650 case initial images of dynamic assemblies.
21652 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
21654 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
21656 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
21657 length of event->other array.
21658 (typebuilder_setup_events): Ditto.
21660 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
21661 'assembly_by_name' and add an 'assemblies' list.
21663 * assembly.h assembly.c: Add a new search hook for determining whenever
21664 an assembly is already loaded. Use this instead of searching in the
21665 loaded_assemblies list.
21667 * domain.c appdomain.c: Implement the new search hook so loaded
21668 assemblies are now scoped by appdomain. Fixes #67727.
21670 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
21672 * threads.c (mono_thread_attach): Initialize synch_lock field so
21673 mono_thread_detach works again.
21675 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
21676 'lib' too. Fixes #63130.
21678 2004-10-06 Jackson Harper <jackson@ximian.com>
21680 * culture-info-tables.h: regenerated.
21682 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
21684 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
21685 implemented by other interfaces in the result. Fixes #65764.
21687 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21688 Handle unloadable modules without crashing.
21690 * image.c (load_modules): Revert the previous patch since modules must
21691 have a fixed index inside the array.
21693 * image.c (load_modules): Don't include native modules in the modules
21696 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
21698 * reflection.h: Add param_defaults field.
21700 * reflection.c: Add support for parameter defaults in dynamic methods.
21703 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
21704 an empty string when a type has no namespace. Fixes #64230.
21706 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
21708 * tabledefs.h: Added "internal" security actions to support non-CAS
21709 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
21710 Note: they do not seems to be used anymore in 2.0 (new metadata format)
21712 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
21714 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
21715 constructor of abstract class. Fixes #61689.
21717 2004-10-04 Martin Baulig <martin@ximian.com>
21719 * class-internals.h (MonoGenericContainer): New type.
21720 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
21721 `MonoGenericContainer *generic_container'.
21722 (MonoClass): Replaced `gen_params' and `num_gen_params' with
21723 `MonoGenericContainer *generic_container'.
21725 * metadata.c (mono_metadata_load_generic_params): Return a
21726 `MonoGenericContainer *' instead of a `MonoGenericParam *';
21727 removed the `num' argument.
21729 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
21731 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
21732 for dynamic images.
21734 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
21737 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
21739 * reflection.c: Save pe_kind and machine values into the generated
21742 * appdomain.c: Bump corlib version number.
21744 * object-internals.h: Reorganize layout of LocalBuilder.
21746 * class-internals.h class.c (mono_class_get_implemented_interfaces):
21747 New helper function.
21749 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
21750 created MonoType for dynamic types. Fixes #66180.
21752 2004-10-02 Ben Maurer <bmaurer@ximian.com>
21754 * threadpool.c: the ares hashtable needs a critical section around it.
21755 this prevents some nasty segfaults
21757 2004-10-02 Massimiliano Mantione <massi@ximian.com>
21759 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
21760 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
21763 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
21765 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
21767 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
21769 * image.c: Always canonicalize image file names, to avoid loading
21770 the same assembly twice when referenced using a relative path.
21772 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
21774 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
21776 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
21778 * marshal.c: Fix warnings.
21780 2004-09-29 Geoff Norton <gnorton@customerdna.com>
21782 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
21783 attempting to marshal the delegate_trampoline as the method_addr.
21784 This patch has a static hashtable of marshalled delegates so that
21785 we can map delegate_trampoline addresses back to delegates. This
21786 allows a delegate passed to managed code to be passed back into native
21789 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
21791 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
21793 * reflection.c (method_encode_code): Align method headers properly.
21796 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
21798 * marshal.c: In the runtime invoke wrapper, reset the abort
21799 exception if it is cached. This avoids the automatic rethrowal of
21800 the exception after the catch of the wrapper. Also check for pending
21801 interruptions before calling the managed method. This is done using
21802 the new method emit_thread_force_interrupt_checkpoint, since the
21803 normal checkpoint method is ignored when running the invoke wrapper.
21804 * object.c: If the abort exception is rethrown, set the abort_exc
21805 field of the thread, so it will be rethrown aftere every catch.
21806 * threadpool.c: Only run an interruption checkpoint if what has been
21807 requested is a stop of the thread (aborts will be ignored).
21808 * threads.c: By default, a thread will now never be interrumped while
21809 running the runtime invoke wrapper (this ensures that runtime_invoke
21810 will always return to the caller if an exception pointer is provided).
21811 There is a new special method mono_thread_force_interruption_checkpoint()
21812 to force an interruption checkpoint even if running a protected
21813 wrapper, which is used by the same runtime invoke wrapper to do a check
21816 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
21818 * object.c, object-internals.h: Implemented mono_release_type_locks,
21819 which releases the cctor locks held by a thread.
21820 * threads.c, threads.h: In thread_cleanup, release cctor locks held
21821 by a thread. Added mono_thread_exit() method to be used to safely stop
21824 2004-09-28 Raja R Harinath <rharinath@novell.com>
21826 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21827 Move null check before dereference. Avoid indexing beyond the end
21828 of the 'modules' array.
21830 2004-09-28 Raja R Harinath <rharinath@novell.com>
21832 * metadata-internals.h (MonoImage): Add module_count field.
21833 * image.c (load_modules): Set image->module_count.
21834 (mono_image_load_file_for_image): Use image->module_count.
21835 * reflection.c (mono_image_load_module): Append to image->modules array
21836 of dynamic assembly.
21837 (mono_module_get_object): Fix loop to actually increment index.
21838 Use image->module_count.
21839 * assembly.c (mono_assembly_load_references): Use image->module_count.
21840 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21843 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
21845 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
21846 Avoid assert on generic types.
21848 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
21850 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
21852 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
21854 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
21855 function to convert a MarshalSpec structure to its managed counterpart.
21857 * reflection.c: Fix warnings.
21859 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
21862 * icall.c (mono_create_icall_signature): Fix build.
21864 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
21866 * icall.c: Add MakePointType icall.
21868 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
21871 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21873 * threadpool.c: reuse allocated slots in the queue.
21875 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
21877 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
21879 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
21881 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
21884 * tabledefs.h: Add constants for pinvoke attributes BestFit and
21885 ThrowOnUnmappableChar.
21887 * icall.c (ves_icall_Type_GetPacking): New icall.
21889 2004-09-24 Martin Baulig <martin@ximian.com>
21891 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
21893 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21896 (mono_domain_set): allow setting a domain that is being unloaded.
21897 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
21900 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
21902 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
21903 the GetCustomAttributes icall.
21905 2004-09-23 Martin Baulig <martin@ximian.com>
21907 * object-internals.h (MonoReflectionGenericParam): Replaced
21908 'has_ctor_constraint', `has_reference_type' and `has_value_type'
21909 with `guint32 attrs'.
21911 2004-09-23 Martin Baulig <martin@ximian.com>
21913 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
21915 2004-09-23 Martin Baulig <martin@ximian.com>
21917 * object-internals.h (GenericParameterAttributes): New enum.
21919 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
21921 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
21923 * class.c (init_events): Fill out event->other field.
21925 * class.c: Fix warnings.
21927 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
21929 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
21931 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
21932 walk which doesn't supply the IL offset.
21934 2004-09-22 Martin Baulig <martin@ximian.com>
21936 * reflection.c (mono_reflection_setup_internal_class): If we're
21937 System.ValueType, System.Object or System.Enum, set
21938 `klass->instance_size' and create the vtable.
21939 (mono_reflection_create_internal_class): If we're an enum type,
21940 get the base class from our current corlib.
21942 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
21944 * reflection.h (MonoResolveTokenError): New type.
21946 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
21949 * icall.c: Add an 'error' argument to the ResolveToken icalls.
21951 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
21953 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
21954 Support also calling constructors, but only for already allocated objects.
21956 2004-09-17 Geoff Norton <gnorton@customerdna.com>
21958 * reflection.c (type_get_qualified_name): If the klass is null
21959 return the typename to avoid a NullRefEx.
21960 (encode_cattr_value): Get the qualified name of the boxed type,
21961 not the underlying enumtype. Fixes #62984.
21963 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
21965 * marshal.c: Fix problems with previous checkin.
21967 2004-09-21 <vargaz@freemail.hu>
21969 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
21970 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
21972 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
21974 2004-09-21 Geoff Norton <gnorton@customerdna.com>
21976 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
21977 should only return a type for pointers, arrays, and passbyref types.
21980 2004-09-21 Martin Baulig <martin@ximian.com>
21982 * domain.c (mono_debugger_check_runtime_version): New public
21985 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
21987 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
21989 * reflection.c: Added missing sort to the declarative security
21990 attributes table. MS implementation stops seeing the attributes if the
21991 token number regress in the table (as shown by ildasm and permview).
21993 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
21995 * object-internals.h (MonoReflectionModule): Add 'token' field.
21997 * reflection.c (mono_reflection_get_token): Add support for Module
21999 (mono_module_get_object): Set 'token' field.
22000 (mono_module_file_get_object): Set 'token' field.
22002 * icall.c: Add new Assembly and Module icalls.
22004 * appdomain.c: Bump corlib version.
22006 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
22008 * loader.h loader.c class.h class.c: Add helper functions for obtaining
22009 tokens of metadata objects.
22011 * reflection.h reflection.c (mono_reflection_get_token): New function
22012 to obtain the token of a metadata object.
22014 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
22016 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
22018 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
22020 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
22022 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
22024 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
22025 * object-internals.h: Added 3 MonoArray* members to MonoReflection
22026 AssemblyBuilder to access the permissions set in the class lib.
22027 * reflection.c: Added security attributes encoding step in
22028 mono_image_build_metadata.
22029 * tabledefs.h: Added new security actions defined in 2.0:
22030 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
22032 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
22034 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
22037 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
22039 * locales.c: nullify the ICU_collator member of CompareInfo when it is
22040 finalized. There where random SIGSEVs at program termination, when
22041 an object being finalized was trying to do a string comparison and
22042 the current culture was already finalized.
22044 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22046 * threads.c: call thread_cleanup before finishing the thread if we get
22049 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
22051 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
22052 assemblies from the parent. Fixes #65665.
22054 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
22056 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
22059 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
22061 * reflection.h: add prototype for mono_get_dbnull_object
22062 * reflection.c: add prototypes for get_default_param_value_blobs
22063 and mono_get_object_from_blob for fussier compilers
22065 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
22067 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
22068 false deadlock checks in class initialization.
22070 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
22072 * image.c (mono_image_addref): Fix comment.
22074 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
22077 2004-09-12 Jambunathan K <kjambunathan@novell.com>
22079 * reflection.c (mono_param_get_objects): Modified to return
22080 ParameterInfo.DefaultValue object.
22082 (get_default_param_value_blobs):
22083 (mono_get_object_from_blob):
22084 (mono_get_dbnull_object): New helper routines.
22086 * object.c (mono_get_constant_value_from_blob): New helper routine
22087 carved out from get_default_field_value ()
22089 * object-internals.h (mono_get_constant_value_from_blob): Added
22090 function declaration.
22092 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
22094 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
22095 referenced assemblies. Fixes #62135.
22097 * exception.h exception.c (mono_get_exception_file_not_found2): New
22100 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
22102 * class.h class.c: Add mono_type_get_underlying_type ().
22104 2004-09-09 Geoff Norton <gnorton@customerndna.com>
22106 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
22107 Fix GetTypes() to support dynamically created assemblies.
22109 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
22111 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
22113 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
22116 * reflection.h reflection.c loader.c: Allow dynamic construction of
22117 pinvoke methods. Fixes #65571.
22119 * reflection.c (mono_reflection_get_type): Revert previous change since
22120 it causes regressions.
22122 2004-09-08 Martin Baulig <martin@ximian.com>
22124 * class.c (class_compute_field_layout): Don't call
22125 mono_class_layout_fields() for open generic instances.
22127 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
22128 * threads.c appdomain.c: fix typo in GC macro
22130 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22132 * threads.c: don't call mono_thread_detach() in start_wrapper(),
22133 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
22135 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
22137 * image.c (mono_image_close): Applied patch from
22138 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
22139 assembly is loaded multiple times from data.
22141 * image.c (mono_image_open): Fix warning.
22143 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22145 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
22146 once. Fixes #58334.
22148 * reflection.c (mono_reflection_create_runtime_class): Initialize
22149 klass->nested_classes. Fixes #61224.
22151 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22153 * threads.c: sched_yield() on exit, to allow threads to quit.
22155 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22157 * object.c (mono_unhandled_exception): Remove leftover debug code.
22159 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
22161 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
22163 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22165 * marshal.c (emit_marshal_array): Really null terminate string arrays.
22167 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
22169 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22171 * marshal.c (emit_marshal_array): Null terminate string arrays.
22173 * marshal.c (raise_auto_layout_exception): Fix warning.
22175 * reflection.c (mono_param_get_objects): Initialize the default value
22176 with DBNull.Value, not null. Fixes #62123.
22178 2004-09-01 Miguel de Icaza <miguel@ximian.com>
22180 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
22181 throw an exception with a cute explanation.
22183 2004-09-06 Dick Porter <dick@ximian.com>
22185 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
22186 Close the new process's thread handle, as we don't use it. The
22187 handle stays around forever otherwise.
22189 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22191 * object.c (arith_overflow): Fix warning.
22193 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
22194 calling conventions in method refs. Fixes #65352.
22196 * reflection.c: Fix warnings.
22198 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22200 * icall.c: Add a new icall for Array.Clear
22202 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22204 * object.c: When allocating an array, we have to throw
22205 an overflow exception if any of the lengths are < 0.
22207 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22209 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
22210 properly. Also move implementation of string array marshalling to
22211 managed code. Fixes #42316.
22213 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22215 * assembly.c: provide more information when loading an assembly fails.
22217 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22219 * filewatcher.c: don't expect the development fam package to be
22222 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
22224 * marshal.c: Make a copy of the signature cookie since it will be
22225 freed by the caller.
22227 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
22229 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
22231 * metadata.c (mono_metadata_free_marshal_spec): New function to free
22234 * marshal.c: More refactoring.
22236 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
22239 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
22241 * object.c: In mono_message_invoke, fill the output parameter array after
22242 calling the managed method (it was done before the call). This fixes
22245 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
22247 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
22250 2004-09-02 Martin Baulig <martin@ximian.com>
22252 * class.c (mono_class_instance_size): Don't allow generic type
22253 definitions or open generic instances.
22254 (mono_class_array_element_size): If we're a value type, call
22255 mono_class_instance_size() on the original class.
22257 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
22258 handle generic instances.
22260 * mono-debug-debugger.c (write_type): Handle generic instances
22263 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
22265 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
22266 the allocation request fails. Fixes #65089.
22268 * object.c (mono_runtime_free_method): Do not call mono_free_method.
22270 * object.c (mono_runtime_free_method): New function to free a dynamic
22273 * marshal.c (mono_delegate_free_ftnptr): New function to free the
22274 delegate trampoline.
22276 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
22277 with hasthis as dynamic,
22279 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
22281 * domain.c (mono_jit_info_table_remove): New function to remove an
22282 entry from the jit info table.
22284 * class-internals.h (MonoMethod): Add 'dynamic' field.
22286 * loader.c: Fix warnings.
22288 2004-09-01 Martin Baulig <martin@ximian.com>
22290 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
22291 instead of mono_debugger_lock() because the latter one is a no-op
22292 unless running in the debugger.
22294 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
22296 * class.c (class_compute_field_layout): Classes with auto-layout or
22297 reference fields are not blittable.
22299 2004-09-01 Dick Porter <dick@ximian.com>
22301 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
22302 mono_image_get_filename() to get the assembly location.
22305 * metadata.h: Fix compile warnings
22307 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
22309 * class.c (class_compute_field_layout): System.Object is blittable.
22311 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
22312 as in/out. Fixes #59909.
22314 2004-09-01 Martin Baulig <martin@ximian.com>
22316 * metadata.h (MONO_TYPE_ISREFERENCE): Call
22317 mono_metadata_generic_inst_is_valuetype() if we're a generic
22318 instance to check whether our underlying type is a reference type.
22320 2004-09-01 Martin Baulig <martin@ximian.com>
22322 * metadata.c (mono_type_size): If we're a generic instance, call
22323 mono_class_value_size() for value types.
22325 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
22327 * marshal.c: Implement more custom marshalling functionality. Fixes
22330 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22332 * mono-debug.c, debug-mono-symfile.c: add some locking love.
22334 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
22336 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
22338 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
22340 * icall.c: Fix some warnings.
22342 * threads.c (abort_appdomain_thread): Fix unref errors.
22343 (mono_thread_current): Fix THREAD_DEBUG define.
22345 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
22347 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
22349 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
22351 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
22353 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
22356 2004-08-28 Martin Baulig <martin@ximian.com>
22359 (mono_metadata_generic_inst_is_valuetype): New public function.
22361 * metadata.h (MONO_TYPE_ISSTRUCT): Call
22362 mono_metadata_generic_inst_is_valuetype() if we're a generic
22363 instance to check whether our underlying type is a valuetype.
22365 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
22367 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
22370 2004-08-25 Martin Baulig <martin@ximian.com>
22372 * loader.c (mono_get_method_from_token): Abstract methods can also
22373 be generic and thus have type parameters.
22375 * metadata-internals.h
22376 (MonoDynamicImage): Added `GPtrArray *gen_params'.
22378 * reflection.c (mono_image_get_generic_param_info): Don't create a
22379 metadata row, just add an entry to the `gen_params' array.
22380 (build_compressed_metadata): Sort the `gen_params' array and then
22381 actually create the metadata.
22383 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22385 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
22387 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
22389 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
22391 2004-08-24 Martin Baulig <martin@ximian.com>
22393 * class.cs (mono_class_is_subclass_of): Like an interface, a
22394 generic instance also derives from System.Object.
22396 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
22398 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
22399 custom modifiers to be in any order. Fixes #61990.
22401 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
22403 * object.c: Register mono_object_new_fast icall.
22405 * object.c (mono_class_get_allocation_ftn): Return to calling
22406 mono_object_new_fast, since it seems faster to compute the object
22407 size in unmanaged code than passing it as a parameter.
22409 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
22411 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
22412 this function with Boehm as the oom handler, so we don't have to check
22413 the result of GC_malloc.
22415 * object.c: Remove checks for oom.
22417 * object.h object.c (mono_class_get_allocation_ftn): New function to
22418 return the icall which can be used to allocate an instance of a given
22421 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
22423 * class-internals.h: Add 'enabled' field.
22425 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
22427 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
22429 2004-08-18 Jambunathan K <kjambunathan@novell.com>
22430 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
22433 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
22435 * appdomain.c: use the Tls function for appdomain too,
22436 at Zoltan's request. Actually return in mono_context_get
22438 * appdomain.c, profiler.c, threads.c: use __thread
22440 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
22442 * appdomain.c threads.c: Call GC_CreateThread on windows.
22444 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
22445 multiple libraries since this don't work on windows.
22447 2004-08-18 Martin Baulig <martin@ximian.com>
22449 * class-internals.h
22450 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
22453 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
22454 MonoMethodNormal since we also need it for abstract and interface
22458 (build_compressed_metadata): Sort the GenericParam table.
22459 (mono_image_create_token): Added `gboolean create_methodspec'
22460 argument; this is false when generating a MethodImpl token.
22461 (reflection_methodbuilder_to_mono_method): Abstract and interface
22462 methods may also have generic parameters.
22464 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
22466 * appdomain.c: thread local alloc
22468 2004-08-17 Martin Baulig <martin@ximian.com>
22470 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
22473 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
22476 * class.c (mono_type_get_full_name): New public function.
22477 (mono_type_get_name): Don't include the type arguments.
22479 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
22481 * Makefile.am: Build static versions of libmetadata and libmonoruntime
22482 for inclusion into the mono executable.
22484 2004-08-16 Martin Baulig <martin@ximian.com>
22486 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
22487 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
22489 2004-08-14 Martin Baulig <martin@ximian.com>
22491 * class.c (dup_type): Also copy the `byref' field.
22493 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
22495 * reflection.c (create_dynamic_mono_image): Revert the last change
22496 since it breaks bootstrap.
22498 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
22500 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
22502 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
22503 not free them with g_free.
22505 2004-08-11 Martin Baulig <martin@ximian.com>
22507 * reflection.c (mono_reflection_setup_internal_class): Also call
22508 mono_class_setup_mono_type() if we already have a `tb->type.type'.
22510 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
22512 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
22513 called during default (first) AppDomain creation. Keep track of
22514 Evidence when loading assemblies.
22516 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22518 * opcodes.c, opcodes.h: reduce runtime relocations.
22520 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
22522 * culture-info.h, locales.c: fixes and chages to sue the new
22523 optimized format of the locale data.
22524 * culture-info-tables.h: regenerated.
22526 2004-08-06 Geoff Norton <gnorton@customerdna.com>
22528 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
22530 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
22532 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
22533 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
22534 * domain-internals.h: icall declaration.
22535 * icall.c: icall registration.
22536 * object-internals.h: New fields in MonoAssembly for CAS.
22538 2004-08-05 Duncan Mak <duncan@ximian.com>
22540 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
22543 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
22545 * reflection.c: fix to deal with object[] arrays in custom ctors
22548 2004-08-05 Martin Baulig <martin@ximian.com>
22550 * class.c (mono_class_array_element_size): Added support for
22551 generic instances and correctly handle "recursive" types.
22553 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
22555 * assembly.c: Fix warnings.
22557 2004-08-04 Martin Baulig <martin@ximian.com>
22560 (mono_type_get_name_recurse): Added `gboolean include_arity'
22561 argument specifying whether or not we should include the generic
22562 arity in the type name.
22563 (_mono_type_get_name): New static function.
22564 (mono_class_setup_vtable): If we're a generic instance, don't
22565 include the generic arity in the names of explicit method
22568 2004-08-03 Martin Baulig <martin@ximian.com>
22570 * class.c (mono_type_get_name_recurse): Enclose the generic type
22571 arguments in `<', '>'.
22573 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
22575 * gc.c: make GC warning messages use the trace API, they are just
22576 noise to most of the users.
22578 2004-08-03 Martin Baulig <martin@ximian.com>
22580 * debug-mono-symfile.c (read_string): Correctly read the string.
22582 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
22584 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
22586 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
22588 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
22590 2004-07-30 Martin Baulig <martin@ximian.com>
22592 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
22593 Reflect latest symbol writer changes.
22595 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
22597 * object.c: always create an object if null is passed
22598 to Invoke() where a valuetype is expected.
22600 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
22602 * marshal.c (mono_marshal_init): make managed
22603 signatures match native ones better for 64bits.
22605 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22607 * appdomain.c: hack to build correctly the private bin path on windows.
22610 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
22612 * assembly.c: Load mscorlib from the correct framework directory
22613 (mono/<version>/mscorlib.dll).
22614 * appdomain.h: Added prototypes for new functions.
22615 * internals.h: Added some prototypes.
22616 * domain.c: When initializing the runtime, get from the executable and
22617 the configuration files the runtime version that the app supports.
22618 Added support methods for reading app.exe.config. Added list of versions
22619 supported by the JIT. Added two new methods: mono_init_from_assembly,
22620 which initializes the runtime and determines the required version from
22621 the provided exe file, and mono_init_version, which initializes
22622 the runtime using the provided version.
22623 * icall.c: Get machine.config from version-specific directory.
22624 * reflection.c: When generating an image, embed the version number
22625 of the current runtime.
22627 2004-07-28 Dick Porter <dick@ximian.com>
22630 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
22631 returned sockaddr size before creating the remote address object.
22632 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
22635 2004-07-28 Dick Porter <dick@ximian.com>
22637 * locales.c (string_invariant_compare_char): Fix invariant char
22638 compares between upper and lower cases. Fixes bug 61458.
22640 2004-07-27 Ben Maurer <bmaurer@ximain.com>
22642 * marshal.c: actually cache stelem.ref wrappers.
22644 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
22646 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
22647 sections and remove the mono_cli_rva_map () function.
22649 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
22651 * debug-mono-symfile.c: fix one more endianess issue, from a patch
22652 by Geoff Norton (<gnorton@customerdna.com>).
22654 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
22656 * class.c: fix class loads for pointer types (typeof(int) !=
22659 2004-07-27 Martin Baulig <martin@ximian.com>
22661 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
22662 reading the debugging information from an external ".mdb" file.
22664 2004-07-24 Martin Baulig <martin@ximian.com>
22666 * reflection.c (mono_image_get_type_info): Only write a class
22667 layout entry if we actually have a size or a packing size.
22669 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
22671 * reflection.c (type_get_fully_qualified_name):
22672 insert cast to get type checking of ?: with non-gcc compilers
22674 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
22676 * rand.c: use g_getenv for both lookups of
22679 2004-07-17 Martin Baulig <martin@ximian.com>
22681 * reflection.c (mono_reflection_bind_generic_method_parameters):
22682 Set `gmethod->reflection_info'.
22684 2004-07-17 Martin Baulig <martin@ximian.com>
22686 * class.c (mono_class_create_from_typedef): Insert the newly
22687 created class into the hash table before computing the interfaces
22688 since we could be called recursively.
22690 2004-07-16 Ben Maurer <bmaurer@ximain.com>
22692 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
22693 function to implement stelem.ref in managed code
22694 * class-internals.h, debug-helpers.c: a new wrapper type
22697 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
22699 * gc.c: allow GC handles to work even when no GC is compiled in.
22700 Fix part of bug #61134 (GetAddrOfPinnedObject).
22702 2004-07-13 Peter Williams <peter@newton.cx>
22704 * process.c (complete_path): Make sure we don't attempt to execute
22707 2004-07-12 Geoff Norton <gnorton@customerdna.com>
22709 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
22710 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
22711 and will add/subtract the hour if needed
22713 2004-07-12 Martin Baulig <martin@ximian.com>
22715 * reflection.c (mono_field_get_object): If we have
22716 `field->generic_info', take the attributes from
22717 `field->generic_info->generic_type'.
22719 2004-07-12 Martin Baulig <martin@ximian.com>
22721 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
22722 This function must be called before initializing the runtime.
22723 (mono_debug_init_1): New function; call this after initializing
22724 the runtime, but before loading the assembly. It tells the
22725 debugger to load corlib and the builtin types.
22727 * mono-debug-debugger.c: Did some larger changes in the debugging
22728 code; support recursive class declarations, make sure we actually
22731 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22733 * debug-helpers.c: undo my previous patch and fixed the real issue in
22734 ../mini/exceptions-x86.c
22736 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22738 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
22739 when no HOME env. variable was set and a NullRef was thrown in a .cctor
22740 called from other .cctors.
22742 2004-07-09 Miguel de Icaza <miguel@ximian.com>
22744 * loader.c: Removed the mono_loader_wine_init hack now that we are
22745 doing a managed version of Windows.Forms.
22747 2004-07-09 Ben Maurer <bmaurer@ximian.com>
22749 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
22750 threadpool.c, threads.c: remove static data from rootset.
22752 2004-07-09 Dick Porter <dick@ximian.com>
22754 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
22755 Don't do any more processing if the matched length was 0. It was
22756 increasing the size of the string before. Fixes bug 61167.
22758 2004-07-09 Dick Porter <dick@ximian.com>
22762 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
22763 Add support for SO_PEERCRED if its available.
22765 2004-07-09 Peter Bartok <pbartok@novell.com>
22766 * loader.c: winelib.exe.so error message is now only displayed if
22767 MONO_DEBUG is set. To help us avoid questions when people are trying
22768 out the new Managed.Windows.Forms.
22770 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
22772 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
22773 for isinst and castclass wrappers.
22775 * class-internals.h icall.c: Move registration and lookup of JIT icalls
22776 to libmetadata from the JIT, so they could be used by the marshalling
22777 code and the interpreter.
22779 * marshal.c: Register marshalling related JIT icalls here instead of
22780 in mini.c. Use CEE_MONO_ICALL instead of the family of
22781 CEE_MONO_PROC<x> opcodes to call marshalling functions.
22783 * metadata.h: Remove unneeded marshalling conversions.
22785 * opcodes.c: Update for new opcodes.
22787 2004-07-08 Martin Baulig <martin@ximian.com>
22789 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
22790 (mono_debug_get_domain_data): Make this function static.
22792 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
22794 * gc.c, object.h: add nice GC handle API for embedders.
22796 2004-07-06 Ben Maurer <bmaurer@ximian.com>
22798 * reflection.c: more changes for the new api
22800 * object.c: When we reflect on a field w/ a constant value, it
22801 will not have a memory location, so we must access metadata. Also,
22802 allow easier reading of strings so that we can read them from
22805 * class.c (mono_class_layout_fields): no need for literal fields here.
22807 * class-internals.h: api changes for const fields
22809 * icall.c (ves_icall_get_enum_info): use new apis for const fields
22811 2004-07-06 Martin Baulig <martin@ximian.com>
22813 * mono-debug.h: Increment version number to 44.
22815 * mono-debug.c (mono_debug_add_wrapper): The second argument is
22816 now a gpointer, rewrote this whole method.
22818 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
22819 function. Add information about the wrapper in a new "misc table".
22821 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
22822 for the new misc table.
22824 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
22826 * metadata-internals.h image.c: Add a cache for helper signatures.
22828 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
22830 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
22832 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
22833 delegates from a delegate. Fixes #61033.
22835 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
22836 marshalling of stringbuilder arrays. Fixes #59900.
22838 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
22840 * icall.c: Add EnumBuilder:setup_enum_type icall.
22842 2004-06-30 Ben Maurer <bmaurer@ximian.com>
22844 * icall.c: Added a new icall for the property version of
22845 OffsetOfStringData.
22847 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
22849 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
22850 it has a constant size across platforms.
22852 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
22855 2004-06-29 Martin Baulig <martin@ximian.com>
22857 * mono-debug.c (mono_debug_add_method): Protect the whole function
22858 in mono_debugger_lock(), not just parts of it.
22860 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22862 * reflection.c: make sure padding bytes in heaps are zeroed.
22864 2004-06-24 David Waite <mass@akuma.org>
22866 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
22867 image.c, loader.c, locales.c, marshal.c, metadata.c,
22868 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
22869 string-icalls.c, threads.c: change to C90-style comments from C99 /
22872 2004-06-24 Dick Porter <dick@ximian.com>
22875 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
22876 return createdNew. Fixes bug 60412.
22879 * icall.c: Add createdNew parameter to CreateMutex icall
22881 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22883 * reflection.c, object-internals.h: save default value in params.
22885 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22887 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
22888 no need to build a new path combining that with the application base.
22891 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
22893 * reflection.c: fixed minor standard compliance issues.
22895 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
22897 * reflection.c: fixed issue with encoding some custom attributes
22898 (arrays in properties and fields, bug #60411).
22900 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22902 * reflection.c: fix start address when copying the public key token.
22904 2004-06-23 Martin Baulig <martin@ximian.com>
22906 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
22907 the `exc' object in a static object to put it into the GC's root set.
22909 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
22911 * reflection.c: make mono_reflection_setup_internal_class ()
22912 callable a second time to setup a new parent class.
22914 2004-06-23 Dick Porter <dick@ximian.com>
22916 * threads.c: Check for WAIT_IO_COMPLETION return values.
22918 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
22920 * appdomain.c: Removed the g_free on the public key token. Now copy
22921 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
22922 * assembly.c: Added public key token string value when loading
22923 assemblies. Fix bug #60439.
22924 * icall.c: Added missing informations (like public key) in
22925 GetReferencedAssemblies. Fix #60519.
22926 * image.h: Changed definition for public key token from const char*
22927 public_tok_value to guchar public_key_token [17];
22928 * reflection.c: Updated for changes to public key token.
22930 2004-06-22 Lluis Sanchez Gual
22932 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
22933 for the field in base classes.
22935 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
22937 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
22938 mark headers as not supported, they are installed only for use by the
22941 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
22943 * *.c, *.h: avoid namespace pollution in public headers.
22945 2004-06-21 Martin Baulig <martin@ximian.com>
22947 * exception.c (mono_get_exception_security): It's in
22948 "System.Security", not in "System".
22950 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
22951 the exception classes.
22953 2004-06-21 Martin Baulig <martin@ximian.com>
22955 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
22956 Protect the exception object from being finalized.
22958 2004-06-21 Martin Baulig <martin@ximian.com>
22960 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
22963 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
22965 * reflection.c: Load the assembly in mono_reflection_type_from_name,
22966 if it was not loaded before. Fix parts of #60439.
22968 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
22970 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
22971 code that was broken since Ben's change: wrappers are now
22972 dependent on the method signature only again.
22974 2004-06-21 Martin Baulig <martin@ximian.com>
22976 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
22977 added interface support.
22979 2004-06-21 Martin Baulig <martin@ximian.com>
22981 * class.c (mono_vtable_get_static_field_data): New public method.
22983 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
22985 * filewatcher.c : Windows build fix to be compliant with API changes.
22987 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22989 * class.h, class.c: more accessors.
22990 * metadata.h, metadata.c: prepare for hiding MonoType and
22991 MonoMethodSignature: people should use the accessors from now on
22992 outside of the tree.
22994 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22996 * *.c, *.h: more API cleanups.
22998 2004-06-18 Jackson Harper <jackson@ximian.com>
23000 * assembly.c: Trace loading assemblies.
23001 * loader.c: Trace loading native libraries.
23002 * mono-config.c: Trace loading config files.
23004 2004-06-18 Dick Porter <dick@ximian.com>
23006 * locales.c: Tell ICU the lengths of strings, it can cope with
23007 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
23009 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
23011 * image.c: swapped name/filename;
23013 2004-06-18 Martin Baulig <martin@ximian.com>
23015 * mono-debug-debugger.c (write_class): Write the parent class at
23016 the end of the header.
23018 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23020 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
23022 2004-06-17 Raja R Harinath <rharinath@novell.com>
23024 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
23025 (bundle_obj): New conditional define.
23026 (BUILT_SOURCES): Remove.
23027 ($(bundle_srcs)): Make parallel-make safe.
23028 (libmonoruntime_la_LIBADD): Make unconditional.
23029 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
23030 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
23032 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
23034 * culture-info-tables.h: It was inconsistent with the latest
23037 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
23039 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
23042 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
23045 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
23047 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
23048 cleaned up public header threads.h.
23050 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23052 * Makefile.am, *.c, *.h: more API cleanups.
23054 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23056 * Makefile.am: removed monosn from compilation.
23057 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
23058 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
23059 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
23060 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
23061 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
23062 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
23064 2004-06-15 Jackson Harper <jackson@ximian.com>
23066 * assembly.c: Make locales lower case when searching the GAC for
23067 assemblies. gacutil will always make locales lowercase when
23068 installing so this effectively makes them case insensitive.
23070 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
23072 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
23073 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
23074 parameter which allows to choose whether the wait can be interrupted or
23075 not. Also added the method mono_monitor_enter(), which locks the monitor
23076 using an infinite wait and without allowing interruption.
23077 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
23079 * object.h: Added new fields in MonoThread. suspend_event holds the event
23080 used to susped/resume the thread. synch_lock is the lock object to use for
23081 modifying the thread state.
23082 * threads.c: Use the new synch_lock object for locking, instead of "this",
23083 which can generate deadlocks.
23084 Moved thread state change in Thread.Sleep and Thread.Join from managed
23085 to unmanaged code. This avoids a deadlock when the thread was suspended
23086 just after acquiring the thread lock.
23087 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
23088 Implemented Thread.Suspend using an event instead of ThreadSuspend,
23089 which is not fully implemented in the io-layer.
23090 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
23092 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
23094 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
23095 threads-types.h: more API cleanups.
23097 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23099 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
23100 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
23101 threadpool.c, threads.c: first pass at the exported API cleanup.
23103 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
23105 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
23107 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23109 * icall.c: added internalGetHome.
23111 2004-06-14 Dick Porter <dick@ximian.com>
23113 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
23114 possible to return successfully when '.' or '..' were the only
23115 entries in a directory, but were skipped. The MonoIOStat was not
23116 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
23119 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23121 * reflection.c: make binaries run on .Net 1.1 by default.
23123 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
23125 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
23127 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
23129 * marshal.c: keep track of struct size with explicit layout
23132 2004-06-12 Martin Baulig <martin@ximian.com>
23134 * mono-debug-debugger.c: Comment out a debugging g_message().
23136 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23138 * reflection.c, reflection.h: do not free custom attrs that are cached.
23139 * icall.c: use braces to make code clearer.
23141 2004-06-11 Martin Baulig <martin@ximian.com>
23143 * class.h (MonoInflatedField): New type.
23144 (MonoClassField): Replaced `MonoType *generic_type' with
23145 `MonoInflatedField *generic_info'.
23148 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
23150 2004-06-11 Martin Baulig <martin@ximian.com>
23152 * reflection.c (mono_image_create_method_token): Correctly encode
23155 2004-06-11 Martin Baulig <martin@ximian.com>
23157 * metadata.c (mono_metadata_parse_method_signature): When parsing
23158 a MethodDef which has VarArgs, also set sentinelpos if we don't
23159 have any parameters.
23161 2004-06-11 Martin Baulig <martin@ximian.com>
23163 * verify.c (mono_method_verify): In CEE_CALL, use
23164 mono_method_get_signature() to get the method's signature, unless
23165 we're a PInvoke method.
23167 2004-06-10 Jackson Harper <jackson@ximian.com>
23169 * assembly.c: Use <path>/lib/mono/gac for the extra paths
23170 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
23171 logical name as the supplied path is just a prefix to the gac not
23172 the direct path to it.
23174 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
23176 * reflection.c: make the token for a created method match
23177 the token of the MethodBuilder it was created from
23178 (IKVM requires this behaviour now).
23180 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
23182 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
23183 reflection.c, socket-io.c: leak fixes.
23185 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23187 * icall.c: handle sentinel pos in vararg methods in position different
23190 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23192 * culture-info-tables.h: freshly generated.
23194 2004-06-09 Martin Baulig <martin@ximian.com>
23196 * loader.c (mono_get_method_constrained): Call `mono_class_init
23197 (constrained_class)'.
23199 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
23201 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
23202 any methods. Fixes #59629.
23204 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23206 * culture-info-tables.h: reflecting locale-builder updates.
23208 2004-06-08 Dick Porter <dick@ximian.com>
23211 * locales.c: Fixed compile warnings, including a real bug in
23212 CompareInfo_internal_compare.
23214 2004-06-08 Dick Porter <dick@ximian.com>
23217 (ves_icall_System_Globalization_CompareInfo_internal_index):
23218 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23219 Double-check the resuls of usearches, because ICU currently
23220 ignores most of the collator settings here. Fixes bug 59720.
23222 2004-06-08 Dick Porter <dick@ximian.com>
23225 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23226 Fix memory leak and segfault-causing typo. No idea how this one
23227 lasted so long without being noticed.
23229 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
23231 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
23232 any methods. Fixes #59629.
23234 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23237 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
23238 own the critical section before). Removed dead code (that's done
23239 in the preload hook).
23241 (mono_assembly_load_with_partial_name): call the preload hook.
23243 2004-06-08 Martin Baulig <martin@ximian.com>
23245 * metadata.c (mono_metadata_signature_alloc): Default
23246 `sentinelpos' to -1.
23248 * reflection.c (mono_image_get_array_token): Likewise.
23250 2004-06-08 Martin Baulig <martin@ximian.com>
23252 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
23254 * metadata.c (mono_metadata_parse_method_signature): When parsing
23255 a MethodDef which has VarArgs, set sentinelpos.
23257 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
23258 `gint16' since we're using -1 for non-varargs methods.
23261 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
23262 (method_encode_signature): Added varargs support.
23263 (method_builder_encode_signature): Likewise.
23264 (mono_image_get_varargs_method_token): New static method.
23265 (mono_image_create_method_token): New public method; this is
23266 called via an icall instead of mono_image_create_token() when
23267 calling a varargs method.
23269 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
23271 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
23273 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23275 * culture-info-tables.h : Reflecting the latest locale-builder that
23276 fixed empty array representation ({} to {0}).
23278 2004-06-07 Jackson Harper <jackson@ximian.com>
23280 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
23281 looking up extra gac paths. This allows MONO_GAC_PATH to act
23282 exactly like a prefix.
23284 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
23286 * reflection.c (mono_reflection_type_from_name): Make a copy of the
23287 type name before modifying it. Fixes #59405.
23289 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23291 * culture-info.h: added fields for "all datetime patterns".
23292 * locales.c: ( ves_icall_System_Globalization_CultureInfo
23293 _construct_datetime_format ()): fill xxx_patterns fields.
23294 * object.h: added fields for "all datetime patterns" to
23295 MonoDateTimeFormatInfo.
23296 * culture-info-tables.h: reflecting locale-builder updates.
23298 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
23300 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
23301 the event has no add and remove methods. Fixes #59629.
23303 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
23305 * object.c: Fixed possible integer overflow when allocating large
23308 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
23310 * culture-info-tables.h: reflecting locale-builder updates.
23312 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
23314 * culture-info-tables.h: reflecting locale-builder updates.
23316 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
23318 * culture-info-tables.h: reflecting locale-builder updates.
23320 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
23322 * threads.c: Made Thread.Sleep abortable.
23324 2004-06-02 Martin Baulig <martin@ximian.com>
23326 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
23328 * debug-mono-symfile.h: Bumped symbol file version number to 37.
23330 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
23332 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
23334 2004-05-30 Jackson Harper <jackson@ximian.com>
23336 * reflection.c: Do not hardcode assembly versions or public key
23337 tokens anymore. All of this except the corlib section was dead
23340 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
23342 * object.c (mono_runtime_invoke_array): Automatically create boxed
23343 objects for byref valuetypes if needed. Fixes #59300.
23345 * object.c (mono_method_return_message_restore): Handle
23346 MONO_TYPE_OBJECT as well.
23348 2004-05-28 Jackson Harper <jackson@ximian.com>
23350 * reflection.c: The modified type encoding was causing build
23351 problems. Reverted for now.
23353 2004-05-28 Jackson Harper <jackson@ximian.com>
23355 * reflection.c/h: Take an assembly ref so that we dont create
23356 fully qualified names when encoding types in the same assembly as
23357 the custom attribute being emitted.
23358 * appdomain.c: Increment version number.
23360 2004-05-26 Duncan Mak <duncan@ximian.com>
23363 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
23364 Set the full version number (major, minor, build, revision).
23366 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
23368 * marshal.c (emit_struct_conv): increment src/dst after blit
23369 (mono_marshal_get_managed_wrapper,
23370 mono_marshal_get_native_wrapper): make sure we have marshalling
23371 info before marshalling params (info computation affects
23374 * class.c (class_compute_field_layout): correctly deal with
23376 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
23377 value types (as per what windows dows by default)
23378 (mono_class_setup_mono_type): System.ValueType is blittable
23379 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
23382 * marshal.c (mono_marshal_load_type_info): flag types as
23383 non-blittable if the native layout doesn't match the managed
23386 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23388 * appdomain.c: don't add stuff in the private search path that is
23389 above the application base. If application base is not set, there's
23390 no private search path.
23392 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
23394 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
23395 byref struct arguments in native->managed marshalling.
23397 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
23399 * marshal.c (mono_marshal_get_runtime_invoke): correctly
23400 cache methods using signature (special case for methods
23401 that are value type or string class)
23403 * image.c (mono_image_close): clean up allocated GSList's
23404 in runtime_invoke_cache.
23406 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23408 * mono-config.c: set the correct path for mono_cfg_dir on windows when
23409 there's no MONO_CFG_DIR environment variable defined.
23411 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23413 * threads.c: windows version must be >= 0x0500 to include OpenThread.
23415 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
23417 * threadpool.c: Really wait for 500ms after the async call, even if the wait
23419 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
23420 before waiting for it, and call CloseHandle after the wait to unref it.
23421 This will make sure that handles are not disposed too early.
23423 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23428 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
23431 * object.c: se the application_base only for the domain that runs
23432 Main. Fixes bug #59216,
23434 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23437 * object.c: only the domain in which Main is run have
23438 SetupInformation.ConfigurationFile set, so moved a few lines from
23439 appdomain.c to object.c.
23441 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23443 * appdomain.c: we tried to load [name].(dll|exe), but according
23444 to bug #57710, we must also try [culture]/[name].(dll|exe) and
23445 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
23446 There's a test case attached to bug #58922.
23448 2004-05-27 Dick Porter <dick@ximian.com>
23451 * file-io.c: Implemented icalls for locking and unlocking regions
23453 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
23454 FALSE on error (fixes both compiler warning and real bug.)
23456 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
23458 * culture-info-tables.h: reflecting locale-builder updates.
23460 (Added missing ChangeLog entry for 05/26)
23462 2004-05-27 Jackson Harper <jackson@ximian.com>
23464 * locales.c: Fix some cut and paste errors.
23466 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23468 * mono-config.c: set the correct path for config. directory on windows.
23470 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
23472 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
23475 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
23477 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
23478 from pinvoke functions.
23480 * marshal.c (mono_ftnptr_to_delegate): Implement this.
23482 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
23484 * culture-info-tables.h: reflecting locale-builder updates.
23486 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
23488 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
23491 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
23493 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
23494 * icall.c: Modified icalls for RNG.
23495 * rand.c|h: Changed RNG interface to allow thread-safe usage under
23496 Windows (CryptoAPI).
23498 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
23500 * locales.c: Fix build.
23502 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
23504 * culture-info-tables.h: reflecting locale-builder updates.
23506 2004-05-25 Jackson Harper <jackson@ximian.com>
23508 * locales.c: When creating the current culture use the $LANGs
23509 specific culture. So DateTimeFormat and NumberFormat entries are created.
23511 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
23513 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
23514 a char array as parameter.
23516 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
23518 * image.c: In mono_image_open(), always use an absolute path name to
23519 look for already loaded images.
23521 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
23523 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
23524 missing in the windows build (like older cygwin include files).
23526 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
23528 * icall.c: Fixed check for possible integer overflow in Buffer_
23529 BlockCopy icall. Replaced comments style // by /* */.
23531 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
23533 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
23535 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
23536 check after MONO_VTADDR. Fixes pinvoke2.exe.
23538 * marshal.h marshal.c metadata.h: Add beginnings of support for
23539 ftnptr -> delegate marshalling.
23541 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
23543 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
23544 * threads.c: Fix warnings.
23546 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
23548 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
23549 * icall.c: Registered icalls for Suspend and Resume.
23550 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
23552 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
23553 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
23554 * process.c: Use WaitForSingleObjectEx.
23555 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
23557 * threads.c, threads.h: Make use of new Ex wait methods. Improved
23558 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
23559 for Suspend and Resume. Added new mono_thread_stop, used for stoping
23560 background threads. Added basic support for Abort in Windows.
23561 Start new threads using a managed delegate invoke wrapper. This wrapper
23562 has an interruption checkpoint that is needed since an interruption
23563 can be requested before the thread leaves the unmanaged code that starts
23565 * marshal.c: Added interruption checkpoint after every native call, and
23566 also before managed calls for wrappers called from unmanaged code to
23567 go into managed code.
23568 * object.h: Added new field in MonoThread to keep track of interruption
23571 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
23573 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
23576 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23583 * rand.c: getenv -> g_getenv (windows!)
23585 * process.c: complete_path is also used on non-windows platforms.
23587 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23589 * icall.c: new signature for Process_Start.
23591 * process.[ch]: new signature for Process_Start. If we're on windows
23592 and UseShellExecute is false, we have to search for the program by
23593 ourselves if we don't get a full path.
23595 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
23597 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
23598 marshalling and call CleanUpNativeData if needed. Fixes #58646.
23600 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23602 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
23605 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23607 * process.c: use double quotes to quote program name and arguments on
23608 windows. Fixes bug #58575.
23610 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23612 * file-io.c: don't return "." and ".." when using windows Find*File.
23614 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
23616 * marshal.c: Don't pass wrappers to message init because method
23617 addressed used to lookup metadata. part of remoting[2|3] fix.
23619 2004-05-15 Jackson Harper <jackson@ximian.com>
23621 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
23622 path is essentially the same as MONO_PATH except that it points to
23623 GACs instead of lib directories.
23624 * loader.h: The user gac is gone so we dont need function to
23626 * mono-config.c: user gac option is now gone.
23628 2004-05-15 Jackson Harper <jackson@ximian.com>
23630 * culture-info.h: Make defines more consistent, add calendar data
23631 to the culture info table.
23632 * culture-info-tables.h: Add basic calendar data. Basically
23633 everyone gets default gregorian until all the data is
23635 * locales.c: Use the new consistent defines. Set calendar data for
23636 culture info objects.
23637 * object.h: add a field for calendar data to CultureInfo
23639 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
23641 * image.c: image->runtime_invoke_cache is keyed on signatures now.
23642 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
23644 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
23645 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
23646 an extra param that is the pointer of the method to invoke. The IL for
23647 the invoke method is no longer specific to the method, but to the
23648 signature of the method. Thus, we can share the same code for multiple
23649 methods. This reduces the number of methods that have to be compiled.
23651 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
23653 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
23655 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23657 * icall.c: Optimize Buffer.BlockCopy.
23659 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23661 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
23662 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
23663 quote). Changed them to "MMMM yyyy".
23665 2004-05-12 Miguel de Icaza <miguel@ximian.com>
23668 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
23670 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
23672 * reflection.h: Updated after changes to managed structures.
23674 * appdomain.c: Bump corlib version.
23676 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23678 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
23681 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23683 * Makefile.am: link to ../os/libmonoos.la on windows.
23686 -If MONO_DEBUG, warn about non-existing directories in
23688 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
23689 compile time variable.
23690 -Removed init_default_path and call mono_set_rootdir from
23691 libmonoos.a instead (windows only).
23693 * assembly.h: declare mono_assembly_getrootdir().
23696 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
23698 * loader.c: s/getenv/g_getenv/
23700 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
23702 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
23704 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
23706 * metadata.h: Add new marshalling conversions.
23708 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
23711 * reflection.c (mono_reflection_get_type): Lookup the type in all
23712 modules of a multi-module assembly. Fixes #58291.
23714 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
23716 * threads.c: Before aborting a background, set the StopRequested
23717 state. This avoids throwing the Abort exception.
23718 In mono_thread_manage, don't continue with the shutdown until all
23719 aborted threads have actually stopped.
23721 2004-05-10 Jackson Harper <jackson@ximian.com>
23723 * locales.c: Remove the modifier from culture names.
23725 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23727 * Makefile.am: monosn is not installed any more. It has been deprecated
23730 2004-05-07 Jackson Harper <jackson@ximian.com>
23733 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
23734 Fix array construction, add bailout if the length is 0.
23736 2004-05-07 Dick Porter <dick@ximian.com>
23738 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
23739 machine doesn't have a DNS entry. Patch by Urs Muff
23740 (umuff@quark.com), fixes bug 57928.
23742 2004-05-06 Jackson Harper <jackson@ximian.com>
23744 * reflection.c: Handle null PublicTokens properly. alloc mem for
23745 assembly names culture so we dont crash when freeing it.
23747 2004-05-06 Jackson Harper <jackson@ximian.com>
23749 * assembly.c: Check the usergac when loading with partial names.
23751 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
23753 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
23754 does nothing for now (not required for Linux/Windows) but the class
23755 library can call it (and a newer or modified runtime could need it).
23756 * icall.c: Registred icall.
23758 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23760 * loader.c: prints a message on module loading error we set MONO_DEBUG
23761 environment variable.
23763 2004-05-05 Jackson Harper <jackson@ximian.com>
23765 * appdomain.c: Handle PublicKeyToken=null properly.
23767 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
23769 * environment.c|h: Added icall ves_icall_System_Environment_
23770 GetOSVersionString to get the current OS version as a string.
23771 * icall.c: Registred icall.
23773 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
23775 * object.c: in mono_object_get_virtual_method(), take into account that
23776 non-virtual methods don't have a slot in the vtable. Check needed when
23777 the object is a proxy.
23779 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
23781 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
23782 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
23784 * object.c (mono_class_compute_gc_descriptor): Fix warning.
23786 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
23787 passed when a valuetype is expected.
23789 * object.c (mono_unhandled_exception): Only set the exit code if the
23790 exception happens in the main thread. Fixes thread5.exe.
23792 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
23793 invalid names. Fixes #58047.
23795 2004-05-03 Jackson Harper <jackson@ximian.com>
23797 * assembly.c: This line was committed accidently and is unneeded.
23799 2004-05-03 Jackson Harper <jackson@ximian.com>
23801 * icall.c: Add new icall for Assembly::LoadWithPartialName
23802 * assembly.c/.h: new function that probes the GAC to load partial
23803 assembly names by Paolo Molaro.
23805 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23807 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
23808 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
23809 (type_get_fully_qualified_name): Added PublicKeyToken when building a
23812 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23814 * appdomain.c: fixed check for 'neutral' culture and removed warning.
23815 * reflection.c: fix bug when parsing a full type name and Version is not
23816 the last thing in the string.
23818 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
23820 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
23821 crashes when it is freed.
23823 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23825 * assembly.c: print the compat warning to stderr.
23827 2004-05-01 Miguel de Icaza <miguel@ximian.com>
23829 * assembly.c (mono_assembly_load_references): Add a compatibility
23830 hack to run old applications that might be still referencing the
23831 3300-based assemblies, only do this for System.xxx.
23833 2004-05-01 Jackson Harper <jackson@ximian.com>
23835 * appdomain.c: If the culture is neutral we set it to "".
23837 2004-04-29 Jackson Harper <jackson@ximian.com>
23839 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
23841 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
23843 * string-icalls.c: added low overhead function for copying chars
23844 * icall.c: added needed icall for the above function
23846 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23848 * icall.c: fix return value of get_global_assembly_cache. Implemented
23849 Environment.GetLogicalDrives.
23851 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
23853 * rand.c: try and talk to egd or prngd
23854 for random bytes if opening devices fail.
23856 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
23858 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
23859 alignment for the type using the native alignment of its members
23860 instead of using klass->min_align.
23862 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
23864 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23867 * socket-io.c: added check for sys/aio.h.
23869 2004-04-28 Dick Porter <dick@ximian.com>
23871 * threads.c: Don't abort a thread thats already aborting, when
23872 terminating everything.
23874 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23876 * icall.c: added 2 new async calls for Socket.
23878 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
23879 IO on *nix systems.
23881 * threadpool.c: removed unused variable.
23883 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
23885 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
23887 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23889 * locales.c: put back string_invariant_tolower () and
23890 string_invariant_toupper ().
23892 2004-04-26 David Waite <mass@akuma.org>
23897 * unicode.h: remove comma from end of enumeration declarations
23899 2004-04-26 David Waite <mass@akuma.org>
23901 * debug-mono-symfile.h:
23904 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
23907 2004-04-26 Jackson Harper <jackson@ximian.com>
23909 * appdomain.c: Increment version number.
23911 2004-04-26 Jackson Harper <jackson@ximian.com>
23913 * appdomain.c: Set assembly references public token value when
23914 PublicKeyToken is specified, not the hash_value. Free public token
23915 values when free assembly name data. Previously the public key
23916 token was hex decoded, however we are using hex encoded public key
23917 tokens, so this is not neccasary.
23918 * assembly.c: Lookup assemblies in the gac if their public token
23919 value is set. Add function to allow enabling user gac
23920 lookups. Specify whether or not the assembly was loaded from the
23921 GAC. Compare full assembly names when checking the cache for
23922 assemblies (Temporarily disabled see comment in code). Remove
23923 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
23924 specifies trace-loader they get extra info to stdout on the
23925 loading of assemblies.
23926 * image.h: Add a field for an assembly references public token
23927 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
23928 whether an assembly has been loaded from the GAC.
23929 * image.c: Remove a corlib -> mscorlib name mapping.
23930 * loader.h: Add function to enable/disable the user gac.
23931 * mono-config.c: Check if the usergac is enabled in the config
23933 * icall.c: New icall to determine whether or not an assembly has
23934 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
23935 * tabldefs.h: Add constant for assemblyref flag that specifies a
23936 full public key is used instead of a public token.
23937 * reflection.c: Remove mscorlib -> corlib mappings. Set
23938 PublicTokenValue instead of hash value. This value is a hex
23939 string so it does not need to be expanded.
23941 2004-04-26 Martin Baulig <martin@ximian.com>
23943 * mono-debug-debugger.c (mono_debugger_initialize): Set
23944 `mono_debugger_initialized' before calling mono_debug_lock().
23946 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
23948 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
23949 InternalToUpper/InternalToLower.
23950 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
23951 removed invariant culture shortcut. This is now done in managed code.
23952 * locales.c: (string_invariant_toupper/tolower) removed.
23954 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23956 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
23957 Added Poll internal call.
23959 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
23960 call for Poll. Select was too heavy for polling a single socket.
23962 * threadpool.[ch]: added mono_threadpool_cleanup.
23963 * threads.c: use it. Don't use Thread_Abort on windows.
23965 2004-04-23 Martin Baulig <martin@ximian.com>
23967 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
23969 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
23971 * icall.c: Registred new icalls for key pair protection and added an
23972 icall for Environment.GetFolderPath on Windows.
23973 * security.c|h: Added new icalls for key pair protection.
23975 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23977 * socket-io.c: don't display the non-supported family warning for known
23978 families. Now this is not displayed on windows when checking support
23981 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23983 * class.c: don't display the layout warning for static fields.
23985 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
23987 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
23988 * locales.c, locales.h: Added new icalls for culture-specific
23989 Char.ToLower and Char.ToUpper.
23991 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23993 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
23996 2004-04-20 Martin Baulig <martin@ximian.com>
23998 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
23999 of the type name before passing it to mono_reflection_type_from_name().
24001 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
24003 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
24004 encodings here. Fixes #56965.
24006 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
24008 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24009 fix test on strstr result not that I can see anything that
24010 relies on the result.
24012 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
24014 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
24017 * marshal.c (mono_marshal_get_string_encoding): New helper function.
24019 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
24020 function to determine which marshalling to use for strings. Fixes
24023 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
24025 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
24027 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
24029 * icall.c: #include mono-config.h
24031 2004-04-15 Jackson Harper <jackson@ximian.com>
24033 * culture-info-tables.h: Fix date formats for en-US culture.
24035 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
24037 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
24038 ThreadPool.SetMinThreads.
24039 * threadpool.c: Implemented ThreadPool.GetMinThreads and
24040 ThreadPool.SetMinThreads.
24042 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
24044 * mono-config.c: also load the .config file in the directory
24045 where the assembly was found.
24047 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
24049 * assembly.c: load per-assembly config files.
24050 * icall.c: decrapified code to get the config dir and moved to
24052 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
24053 per-assembly config files. When doing a dll map lookup give precedence
24054 to the per-assembly data.
24056 2004-04-14 Martin Baulig <martin@ximian.com>
24058 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
24059 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
24060 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
24062 * mono-debugger-debugger.c: While the debugger is locked, remember
24063 whether the symbol tables have changes and send one single
24064 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
24066 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
24068 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
24070 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
24073 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
24074 account when marshalling string arrays. Fixes #56965.
24076 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
24078 * icall.c: Add new icalls mapping for security.
24079 * security.c|h: Add internal calls for WindowsIdentity,
24080 WindowsImpersonationContext and WindowsPrincipal.
24082 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
24084 * class.c: Added comment to ensure the System.MonoDummy class
24085 is removed when no longer necessary
24087 2004-04-13 Miguel de Icaza <miguel@ximian.com>
24089 * appdomain.c: Pass arguments to the bootstraping exceptions to
24090 minimize JITed methods at boot
24092 * metadata.c (mono_exception_from_name_two_strings): Allow for the
24093 second string to be null.
24095 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24096 Change the protocol to minimize the JIT methods at startup. Now
24097 it Returns the internal codepage, if the value of "int_code_page"
24098 is 1 at entry, and we can not compute a suitable code page
24099 number, returns the code page as a string.
24101 2004-04-13 Jackson Harper <jackson@ximian.com>
24103 * culture-info-tables.h: Fix number of decimal digits for all
24106 2004-04-13 Jackson Harper <jackson@ximian.com>
24108 * icall.c: Clairfy out of sync error message. It is not always
24109 your corlib that is out of sync.
24111 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
24113 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
24114 properties when only the set accessor is overriden. Fixes #55874.
24116 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
24118 * assembly.c (mono_assembly_load_references): Make this thread safe.
24121 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
24123 * monosn.c: Add missing initialization calls.
24125 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
24128 ves_icall_System_Globalization_CultureInfo_construct_number_format
24129 Fix g_assert so it compiles on fussier compilers re int/ptr
24132 2004-04-08 Dick Porter <dick@ximian.com>
24135 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
24136 53992. Also rearrange the code so that the internal calls return
24137 an error value and exceptions are thrown from managed code.
24139 * icall.c: Add type info to the socket icalls.
24141 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24143 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
24146 2004-04-07 Martin Baulig <martin@ximian.com>
24148 * class.c (mono_class_from_generic_parameter): Don't default
24149 `klass->parent' to `mono_defaults.object_type'.
24151 2004-04-07 Martin Baulig <martin@ximian.com>
24153 * reflection.c (mono_reflection_initialize_generic_parameter): Set
24154 `param->pklass->reflection_info'.
24156 2004-04-07 Jackson Harper <jackson@ximian.com>
24158 * culture-info-tables.h: Fix date separator symbol.
24160 2004-04-07 Martin Baulig <martin@ximian.com>
24162 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
24163 from System.Type to System.MonoType.
24165 2004-04-07 Martin Baulig <martin@ximian.com>
24168 (MonoReflectionGenericParam): Added `has_reference_type' and
24169 `has_value_type' fields.
24171 * reflection.c (mono_image_get_generic_param_info): Encode the
24172 correct flags if we have the `class' or `struct' constraint.
24174 2004-04-07 Martin Baulig <martin@ximian.com>
24177 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
24179 2004-04-07 Jackson Harper <jackson@ximian.com>
24181 * appdomain.c: Revert extra patches, just wanted to bump the
24184 2004-04-07 Jackson Harper <jackson@ximian.com>
24186 * Makefile.am: Add culture-info private headers.
24187 * icall.c: Add new icalls for contructing locales.
24188 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
24189 * locales.h: Declare new culture info construction methods.
24190 * object.h: Add new fields used to avoid the CultureMap to
24192 * culture-info.h: Definition of structs used in the culture info
24194 * culture-info-tables.h: Autogenerated tables that contain culture
24195 info data. This file was generated with the locale-builder tool.
24196 * appdomain.c: Incement corlib version number.
24198 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
24200 * appdomain.c: (mono_runtime_init) move mono_thread_init
24201 to before mono_object_new calls so critical sections
24202 are initialized before use.
24204 2004-04-07 Martin Baulig <martin@ximian.com>
24207 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
24208 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
24209 (ves_icall_MonoGenericParam_initialize): Removed.
24210 (monogenericparam_icalls): Removed.
24211 (generictypeparambuilder_icalls): Added new table for
24212 System.Reflection.Emit.GenericTypeParameterBuilder.
24215 (mono_reflection_define_generic_parameter): Removed.
24216 (mono_reflection_initialize_generic_parameter): This is now called
24217 from GenericTypeParameterBuilder's .ctor.
24219 2004-04-06 Martin Baulig <martin@ximian.com>
24221 * class.c (mono_class_init): Don't inflate nested classes in a
24223 (mono_type_get_name_recurse): Include the generic arguments for
24224 generic instances and generic type declarations.
24225 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
24226 (_mono_class_get_instantiation_name): Removed.
24227 (mono_class_create_generic): Always use `gklass->name' as our name.
24229 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
24231 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
24232 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
24233 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
24234 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
24235 closed generic methods here.
24238 (mono_reflection_generic_inst_get_nested_types): Removed.
24239 (inflate_mono_method): Copy the generic parameters from the
24240 MonoMethodHeader into out MonoGenericMethod.
24242 2004-04-06 Martin Baulig <martin@ximian.com>
24245 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
24247 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
24249 * reflection.c (build_compressed_metadata): If we have any entries
24250 in the GenericParam, MethodSpec or GenericParamConstraint tables,
24251 set the header version to 1.1.
24253 2004-04-06 Martin Baulig <martin@ximian.com>
24255 * class.c (mono_class_init): If we're a generic instance,
24256 initialize our nested classes, too.
24257 (_mono_class_get_instantiation_name): Deal with the new `!%d'
24260 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24262 * process.c: quote the argument passed to the shell on windows.
24264 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
24266 * threads.c (mono_alloc_special_static_data): Allow this to be
24267 called during startup.
24269 2004-04-02 Martin Baulig <martin@ximian.com>
24272 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
24274 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
24276 * icall.c: Fix build.
24278 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
24280 * Makefile.am: Added security.c|h.
24281 * icall.c: Added icall for get_UserName;
24282 * security.c: New file for security related icalls. Added function
24283 get_UserName for System.Environment (fix #56144).
24284 * security.h: New. Header file for security.c
24286 2004-04-02 Dick Porter <dick@ximian.com>
24288 * icall.c: Deleted the icalls that were obsoleted some time ago
24289 by the ICU string code, and which were mixed into the icall
24290 rearranging. Fixes bug 55969.
24293 * string-icalls.c: Deleted the code that those icalls reference.
24295 2004-04-01 Martin Baulig <martin@ximian.com>
24297 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
24299 * class.c (mono_class_from_generic_parameter): Don't set
24300 TYPE_ATTRIBUTE_INTERFACE.
24301 (my_mono_class_from_generic_parameter): Likewise.
24303 2004-04-01 Martin Baulig <martin@ximian.com>
24305 * loader.c (find_method): Added an optional `MonoClass *ic'
24306 argument to search in a specific interface.
24307 (mono_get_method_constrained): New public function.
24309 2004-04-01 Martin Baulig <martin@ximian.com>
24311 * reflection.c (mono_image_get_generic_field_token): Use the
24312 `handleref' cache here.
24314 2004-04-01 Martin Baulig <martin@ximian.com>
24316 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
24318 * reflection.c (create_generic_typespec): Use the `typespec' hash
24319 here, not the `typeref' one.
24321 2004-04-01 Martin Baulig <martin@ximian.com>
24323 * class.c (mono_class_inflate_generic_type): Moved the
24324 functionality into a new static inflate_generic_type() which
24325 returns NULL if it didn't do anything. Only increment the
24326 `mono_stats.inflated_type_count' if we actually inflated
24328 (mono_class_get_full): Check the classes type to see whether we
24329 need to inflate it; also inflate MONO_TYPE_(M)VAR.
24331 2004-04-01 Jackson Harper <jackson@ximian.com>
24333 * reflection.c: Set culture for assembly references.
24335 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
24337 * reflection.[ch], icall.[ch], Fix support for pinning variables.
24339 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24342 (do_mono_assembly_open): the critical section also covers
24343 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
24345 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24348 (mono_manage_threads): abort the background threads when finishing.
24351 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24353 * gc.c: only close the done_event handle if there was no timeout.
24356 2004-03-30 Martin Baulig <martin@ximian.com>
24358 * icall.c (icall_entries): It's called "System.Activator", not
24359 "System.Activation".
24361 2004-03-30 Martin Baulig <martin@ximian.com>
24363 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
24364 (mono_class_create_from_typespec): Likewise.
24366 2004-03-30 Martin Baulig <martin@ximian.com>
24368 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
24369 `has_ctor_constraint' and `initialized'.
24371 2004-03-30 Martin Baulig <martin@ximian.com>
24373 * reflection.c (encode_new_constraint): New static function to add
24374 the constructor constraint attribute to a type parameter.
24375 (encode_constraints): Call encode_new_constraint() if necessary.
24378 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
24380 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
24382 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
24384 * reflection.c, icall.c: add support for pinning variables.
24386 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
24388 * marshal.c (mono_marshal_get_managed_wrapper):
24389 init bool local with zero rather than null.
24391 2004-03-29 Martin Baulig <martin@ximian.com>
24393 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
24394 the "official" behavior here.
24395 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
24397 2004-03-29 Martin Baulig <martin@ximian.com>
24399 * icall.c: Reflect latest API changes.
24401 2004-03-29 Martin Baulig <martin@ximian.com>
24403 * loader.c (mono_get_method_from_token): Also call
24404 mono_metadata_load_generic_params () for abstract and interface
24405 methods; replace the type arguments in the method signature with
24406 the ones which are loaded from the metadata.
24408 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
24410 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
24411 of the lock is not the current thread. MS.NET don't do it, in spite of
24412 what the documentation says. See bug #56157.
24414 2004-03-28 Martin Baulig <martin@ximian.com>
24416 * class.c (mono_class_init): Don't call init_properties() and
24417 init_events() for generic instances; set `prop->parent' when
24418 inflating properties.
24420 * reflection.c (mono_generic_inst_get_object): Call
24421 `mono_class_init (ginst->klass)'.
24422 (mono_type_get_object): Only create a MonoGenericInst if your
24423 generic type is a TypeBuilder.
24424 (do_mono_reflection_bind_generic_parameters): Only set
24425 `ginst->is_dynamic' if our generic type is a TypeBuilder.
24427 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
24429 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
24432 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24434 * icall.c: added Kill_internal icall.
24435 * process.[ch]: added Kill_internal icall.
24437 2004-03-25 Martin Baulig <martin@ximian.com>
24439 * class.h (MonoStats): Added `generic_instance_count',
24440 `inflated_method_count', `inflated_type_count' and
24441 `generics_metadata_size'.
24443 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24445 * reflection.c: no warnings now.
24447 2004-03-25 Martin Baulig <martin@ximian.com>
24449 * class.c (mono_class_get_full): New public function; does a
24450 mono_class_get(), but also takes a `MonoGenericContext *'.
24452 * loader.c (mono_field_from_memberref): Renamed to
24453 `field_from_memberref', made static and added `MonoGenericContext *'
24455 (mono_field_from_token): Added `MonoGenericInst *' argument.
24456 (method_from_memberef): Likewise.
24457 (mono_get_method_from_token): Likewise.
24458 (mono_get_method_full): New public function; does a
24459 mono_get_method(), but also takes a `MonoGenericContext *'.
24461 * verify.c (mono_method_verify): Get the method's generic context
24462 and pass it to mono_field_from_token(), mono_get_method_full() and
24463 mono_class_get_full().
24465 2004-03-25 Martin Baulig <martin@ximian.com>
24467 * class.c (mono_class_inflate_generic_type): Take a
24468 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
24469 `MonoGenericMethod *'.
24471 2004-03-25 Martin Baulig <martin@ximian.com>
24473 * loader.h (MonoMethodInflated): Store the MonoGenericContext
24474 instead of the MonoGenericMethod here.
24476 2004-03-25 Martin Baulig <martin@ximian.com>
24478 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
24479 each time we create a new MonoGenericInst, we also create a new
24480 context which points back to us.
24482 * class.c (inflate_method): Use `ginst->context' instead of
24483 creating a new context.
24485 * loader.c (method_from_memberref): Use
24486 `klass->generic_inst->context' instead of creating a new context.
24488 2004-03-25 Martin Baulig <martin@ximian.com>
24490 * class.h (MonoGenericContext): New struct.
24491 (MonoGenericMethod): Removed `generic_inst'.
24493 * class.c (mono_class_inflate_generic_method): Take a
24494 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
24496 2004-03-25 Martin Baulig <martin@ximian.com>
24498 * loader.h (MonoMethodInflated): New typedef.
24500 * metadata.h (MonoMethodSignature): Removed `gen_method', make
24501 `generic_param_count' consume just 30 bits, added `is_inflated'
24502 and `has_type_parameters' flags (one bit each).
24504 * class.c (mono_class_inflate_generic_method): Create a
24505 MonoMethodInflated instead of a MonoMethodNormal and set
24506 `is_inflated' in the method signature.
24508 * class.h (MonoGenericMethod): Removed `generic_method'.
24510 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
24512 * image.c: Make sure the name of a MonoImage is always an absolute path.
24513 This fixes bug #54415.
24515 2004-03-24 Martin Baulig <martin@ximian.com>
24517 * class.c (mono_class_setup_vtable): If we're a generic instance,
24518 use our generic type's vtable size.
24520 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
24522 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
24523 MONO_NO_UNLOAD env var as a temporary workaround for unloading
24526 2004-03-23 Martin Baulig <martin@ximian.com>
24528 * class.h (MonoDynamicGenericInst): Added `int count_events' and
24529 `MonoEvent *events'.
24531 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
24532 (typebuilder_icalls): Added "get_event_info"; calls
24533 mono_reflection_event_builder_get_event_info().
24535 * reflection.c (mono_reflection_generic_inst_initialize): Added
24536 `MonoArray *events'.
24537 (mono_reflection_event_builder_get_event_info): New function.
24539 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
24541 * object.h: add mono_type_initialization_init
24543 * object.c (mono_runtime_class_init):
24544 implement class constructor synchronization rules
24545 to cope with threading issues.
24546 add mono_type_initialization_init
24548 * appdomain.c (mono_runtime_init): call
24549 mono_type_initialization_init
24551 * class.h: removing initializing field from MonoVTable
24553 2004-03-23 Martin Baulig <martin@ximian.com>
24555 * class.c (my_mono_class_from_generic_parameter): Use
24556 `param->name' if it's not NULL.
24558 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
24560 * class.c: do not insert non-virtual methods in the vtable.
24561 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
24562 that means the method is non-virtual. This never would have
24565 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
24567 * profiler.c: Added lock for accessing coverage_hash.
24569 2004-03-22 Martin Baulig <martin@ximian.com>
24571 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
24572 `method->method->signature->generic_param_count != 0' to make it
24573 work for interface methods.
24575 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24577 * process.c: quote the string passed to the shell using g_shell_quote.
24579 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24582 (mono_threads_manage): don't remove the finalizer thread and self
24583 from the threads hash table so that mono_thread_manage can be called
24586 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24588 * process.c: quote the arguments when UseShellExecute is true. Fixes
24591 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24593 * threads.c: set mono_thread_detach as a cleanup routine for every
24594 thread. This way it's always executed upon thread termination, either
24595 aborted or finished normally. No more xsp hangs!
24597 2004-03-17 Martin Baulig <martin@ximian.com>
24599 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
24600 `int count_nested' and a `MonoType **nested'.
24602 * reflection.c (mono_reflection_bind_generic_parameters): Moved
24603 most of the functionality into a new static
24604 do_mono_reflection_bind_generic_parameters() and don't take a
24605 `MonoType *nested_in' argument any more. Don't compute nested
24607 (mono_reflection_generic_inst_get_nested_types): New public method
24608 to get nested types.
24610 * class.c (mono_class_create_generic): Set `klass->nested_in' if
24611 we're a nested class.
24613 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
24614 mono_reflection_generic_inst_get_nested_types() to compute the
24617 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
24619 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
24620 descriptive error message under windows.
24622 2004-03-17 Martin Baulig <martin@ximian.com>
24624 * class.c (dup_type): Added `const MonoType *original' argument;
24625 copy the attrs from the original type.
24627 2004-03-17 Martin Baulig <martin@ximian.com>
24629 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
24630 `m->generic_inst_cache' here.
24632 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
24634 * exception.h exception.c: Add stack_overflow_exception.
24636 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24639 (overlapped_callback): call SetEvent *after* invoking the callback.
24640 No need to call CloseHandle.
24642 2004-03-16 Martin Baulig <martin@ximian.com>
24644 * reflection.c (mono_image_get_fieldref_token): Take a
24645 `MonoReflectionField *' instead of a `MonoClassField *' and a
24646 `MonoClass *'; store the `MonoReflectionField *' in the hash.
24648 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24650 * appdomain.c: don't add the culture to the filename we're looking for
24651 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
24653 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24655 * locales.c: don't ignore symbols when doing case insensitive compares.
24656 Thanks Dick! Fixes bug #54046.
24658 * threads.c: surround 'threads' usage with enter/leave in
24659 mono_thread_manage.
24661 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
24663 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
24664 implicitly marshalled as [Out]. Fixes #55450.
24666 (mono_marshal_get_runtime_invoke): Zero out the result if there is
24669 2004-03-16 Martin Baulig <martin@ximian.com>
24671 * class.c (mono_class_from_generic_parameter): Use the actual
24674 2004-03-16 Martin Baulig <martin@ximian.com>
24676 * reflection.c (type_get_signature_size): New static function.
24677 Compues the size of the type in a method signature.
24678 (method_get_signature_size): New static function; calls
24679 type_get_signature_size() to compute the actual size of the
24680 method's signature.
24681 (method_encode_signature): Use method_get_signature_size() to get
24682 the signature's size rather than using `nparams * 10'.
24684 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24686 * file-io.h: define here WapiOverlapped on windows. I don't want the
24687 regular OVERLAPPED one.
24690 * threadpool.c: somehow, BindIoCompletionCallback is not found.
24691 Disabling AIO on windows.
24693 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24695 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
24698 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24700 * appdomain.c: upgraded corlib version.
24702 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
24703 and BeginWrite. Allow opening files for asynchrnous operations.
24705 * file-io.h: new struct that maps FileStreamAsyncResult.
24706 * icall.c: added new icalls.
24707 * process.[ch]: support setting child process environment variables
24708 and use the SHELL or COMSPEC when UseShellExecute is true.
24710 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
24711 callback for async. IO is here and also BindHandle.
24713 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
24716 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
24718 * reflection.c (create_custom_attr): Allow len == 0.
24720 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
24721 computation on big-endian machines.
24723 2004-03-13 Martin Baulig <martin@ximian.com>
24725 * class.h (MonoGenericInst): Added `int count_ifaces'.
24727 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
24728 `ginst->count_ifaces' instead `klass->interface_count' since we
24729 may get called before the vtable is created.
24731 * loader.c (mono_method_get_param_names): If we're a generic
24732 instance, return and don't initialize the class.
24734 * reflection.c (mono_reflection_setup_generic_class): Don't call
24735 ensure_runtime_vtable().
24736 (mono_reflection_bind_generic_parameters): Set
24737 `ginst->count_ifaces'.
24739 2004-03-11 Jackson Harper <jackson@ximian.com>
24743 * unicode.h: Remove unused System.Char icalls.
24745 2004-03-11 Miguel de Icaza <miguel@ximian.com>
24747 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
24748 code when we P/Invoke the first library in Windows.Forms, instead
24749 of when we first open the assembly.
24751 * assembly.c: Drop the lookup from here.
24753 2004-03-10 Martin Baulig <martin@ximian.com>
24755 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
24756 class for properties, fields and events. Finally fixes #54945.
24758 2004-03-10 Martin Baulig <martin@ximian.com>
24760 * metadata.c (mono_metadata_class_equal): New static function;
24761 checks whether two generic instances or two generic parameters are
24763 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
24766 2004-03-10 Martin Baulig <martin@ximian.com>
24768 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
24770 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
24771 argument and write it into the `reflection_info' field.
24774 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
24775 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
24777 2004-03-09 Jackson Harper <jackson@ximian.com>
24779 * char-conversions.h: use 8 bits for numeric data its all we need
24780 * icall.c: numeric data is only 8 bits now.
24782 2004-03-09 Martin Baulig <martin@ximian.com>
24784 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
24786 * class.c (init_properties, init_events): Initialize the new
24789 * reflection.c (typebuilder_setup_properties): Likewise.
24790 (typebuilder_setup_events): Likewise.
24792 * reflection.h (MonoEventInfo): Replaced `parent with
24793 `declaring_type' and `reflected_type'.
24795 * icall.c (ves_icall_get_property_info): Distinguish between
24796 declaring and reflected type.
24797 (ves_icall_get_event_info): Likewise.
24799 2004-03-09 Martin Baulig <martin@ximian.com>
24801 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
24802 (ves_icall_Type_GetField): Correctly set field->klass.
24804 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
24806 * loader.h: Fix warning.
24808 2004-03-08 Miguel de Icaza <miguel@ximian.com>
24810 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
24811 library routine if present. Notice that it will still continue
24812 executing even if its missing, for those working on the Gtk#
24813 edition of Windows.Forms.
24815 * assembly.c (do_mono_assembly_open): If loading the
24816 System.Windows.Forms call mono_loader_wini_init.
24818 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
24820 * class.h: Added MonoRemoteClass struct.
24821 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
24822 function for MonoStrings.
24823 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
24824 Added internal call for getting the proxy type.
24825 * marshal.c: Get the type of transparent proxies from its remote_class.
24826 Added methods that generate the IL for type checks and casts:
24827 mono_marshal_get_isinst, mono_marshal_get_castclass,
24828 mono_marshal_get_proxy_cancast.
24829 * marshal.h: Declaration of the previous new methods.
24830 * object.c: Added new moethods for creating and updating MonoRemoteClass
24831 instances: mono_remote_class, mono_upgrade_remote_class,
24832 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
24833 * verify.c: FIx transparent_proxy_fields layout.
24834 * appdomain.c: Bump corlib version.
24836 2004-03-04 Jackson Harper <jackson@ximian.com>
24838 * icall.c: Add icall to access char conversion tables.
24839 * char-conversions.h: Character conversion tables.
24840 * Makefile.am: Add char-conversions.h private header file.
24842 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
24844 * appdomain.c (unload_thread_main): Increase unloading timeout to
24845 10 sec as a temporary workaround for Nant problems.
24847 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
24849 * gc.c: Add checks for GC_enable and GC_disable.
24851 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
24852 (jaak@zd.com.pl). Fix memory corruption in String.Replace
24855 2004-02-27 Martin Baulig <martin@ximian.com>
24857 * reflection.c (mono_reflection_bind_generic_parameters): Take a
24858 `MonoReflectionType *' instead of a `MonoType *'.
24860 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
24862 * gc.c (run_finalize): Avoid finalizing the object representing the
24864 (finalizer_thread): Fix warning.
24866 2004-02-25 Martin Baulig <martin@ximian.com>
24868 * class.c (_mono_class_get_instantiation_name): Added `int offset'
24869 argument for nested types.
24870 (mono_class_create_generic): Added support for nested generictypes.
24872 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
24875 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
24877 * reflection.c (method_encode_signature): Increase the minimum
24878 value of `size' from 10 to 11.
24879 (mono_reflection_bind_generic_parameters): Take `int type_argc'
24880 and `MonoType **types' arguments instead of the `MonoArray
24881 *types'; added `MonoType *nested_in'. Recursively instantiate
24884 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
24886 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
24887 stack_overflow_ex members which are used by exception handling.
24889 * appdomain.c (mono_runtime_init): Initialize the new members.
24891 * gc.c (mono_gc_enable): New helper function.
24892 * gc.c (mono_gc_disable): New helper function.
24894 2004-02-23 Martin Baulig <martin@ximian.com>
24896 * icall.c: I must have been really stupid - make it actually work
24899 2004-02-23 Martin Baulig <martin@ximian.com>
24901 * loader.c (method_from_memberref): Only inflate the method if
24902 it's in another klass.
24904 2004-02-23 Martin Baulig <martin@ximian.com>
24906 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
24907 (mono_class_init): If we're a generic instance and an interface,
24908 compute `class->interface_id'; also create `class->interfaces'
24909 here and inflate them.
24911 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
24913 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
24915 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
24917 2004-02-15 Miguel de Icaza <miguel@ximian.com>
24919 * reflection.c (method_encode_code): Improved the error message
24920 generated by the exception.
24922 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24924 * icall.c: Martin did not do what he said in the ChangeLog for
24925 2004-02-18, but put back the changes for properties and events.
24926 Commenting those changes out again and adding comment to bug #54518.
24928 * process.c: removed warning.
24930 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
24932 * marshal.c (emit_struct_conv): Print an error message instead of
24933 asserting when a type does not have the StructLayout attribute.
24935 2004-02-20 Martin Baulig <martin@ximian.com>
24937 * reflection.c (mono_type_get_object): Also use the cache for
24939 (mono_reflection_bind_generic_parameters): Always compute
24942 2004-02-20 Martin Baulig <martin@ximian.com>
24944 * class.h (MonoGenericMethod): Removed `klass'.
24946 * class.c (mono_class_inflate_generic_method): Added `MonoClass
24949 2004-02-20 Martin Baulig <martin@ximian.com>
24951 * reflection.c (method_encode_methodspec): Actually use the
24952 uninflated signature for the memberref.
24954 2004-02-20 Martin Baulig <martin@ximian.com>
24956 * class.h (MonoGenericMethod): Removed `declaring'.
24958 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
24959 is NULL, compute it here.
24961 2004-02-20 Martin Baulig <martin@ximian.com>
24963 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
24965 * metadata.c (mono_metadata_generic_inst_hash): New method.
24966 (mono_metadata_generic_inst_equal): New method.
24968 * reflection.c (mono_reflection_bind_generic_parameters): Use the
24969 `klass->image->generic_inst_cache' cache to avoid creating
24970 duplicate MonoGenericInst's.
24972 * class.c (mono_class_inflate_generic_type): Use the cache.
24974 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
24976 * object.c: fixed gc descriptor calculation for embedded valuetypes.
24978 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24980 * icall.c: added Socket.WSAIoctl icall.
24982 * socket-io.[ch]: implemented
24983 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
24985 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
24987 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
24989 2004-02-18 Urs C Muff <umuff@quark.com>
24991 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
24992 this work on PPC and other big-endian architectures.
24994 * debug-mono-symfile.h: Prepended the names of all the `guint32'
24995 fields with an underscore to make sure they're only accessed by
24996 the read32() macro.
24998 2004-02-18 Martin Baulig <martin@ximian.com>
25000 * icall.c: Put the klass->refclass changes back for methods and
25001 fields, but not for properties and events. We're currently not
25002 distinguishing between DeclaringType and ReflectedType for
25003 properties and events, that's what caused the regressions.
25005 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25008 (mono_async_result_new): the handle can be NULL.
25010 * threadpool.c: Use an event instead of a semaphore, don't initialize
25011 it until needed. This saves quite a few semaphores from being created
25012 when using the threadpool.
25014 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
25016 * object.c (mono_string_is_interned_lookup): Fix interning of long
25017 strings. Fixes #54473.
25019 * domain.c (ldstr_equal): Optimize if the two strings are equal.
25021 * icall.c: Revert the klass->refclass changes since they introduce
25022 regressions (bug #54518).
25024 2004-02-18 Martin Baulig <martin@ximian.com>
25026 * class.c (mono_class_init): If we're a generic instance and don't
25027 come from a TypeBuilder, inflate our members here.
25028 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
25029 (mono_class_create_generic): New public method.
25030 (mono_class_initialize_generic): Removed.
25031 (get_instantiation_name): Renamed to
25032 _mono_class_get_instantiation_name() and made it public.
25034 2004-02-18 Martin Baulig <martin@ximian.com>
25036 * class.c (mono_class_inflate_generic_type): Clear the new
25037 instance's `nginst->klass' when inflating a generic instance.
25038 (mono_class_is_subclass_of): Added (basic) support for generic
25041 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
25043 * appdomain.h, domain.c: use a MonoCodeManager instead of a
25044 MonoMempool to hold compiled native code.
25046 2004-02-17 Martin Baulig <martin@ximian.com>
25048 * class.h (MonoDynamicGenericInst): Added `count_properties' and
25051 * reflection.c (mono_reflection_generic_inst_initialize): Added
25052 `MonoArray *properties' argument.
25054 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
25056 2004-02-17 Martin Baulig <martin@ximian.com>
25058 * icall.c (ves_icall_Type_GetFields): Renamed to
25059 ves_icall_Type_GetFields_internal() and added a
25060 `MonoReflectionType *rtype' argument; pass it to
25061 mono_field_get_object() to set the field's "reflected" type.
25062 (ves_icall_Type_GetConstructors): Likewise.
25063 (ves_icall_Type_GetEvents): Likewise.
25064 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
25065 argument; pass it to mono_method_get_object() to set the method's
25068 2004-02-17 Martin Baulig <martin@ximian.com>
25070 * class.h (MonoDynamicGenericInst): New type.
25071 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
25073 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
25074 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
25075 (ves_icall_MonoGenericInst_GetFields): New interncall.
25077 * class.c (mono_class_from_generic): Don't call
25078 mono_class_initialize_generic() if this is a dynamic instance;
25079 ie. it's being created from a TypeBuilder.
25080 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
25081 `class->byval_arg.type'.
25083 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
25084 to `inflate_method' and made static.
25085 (mono_reflection_inflate_field): Removed.
25086 (mono_reflection_generic_inst_initialize): New public method.
25088 * reflection.h (MonoReflectionGenericInst): Removed `methods',
25089 `ctors' and `fields'; added `initialized'.
25091 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
25093 * debug-helpers.c (mono_method_full_name): Fix output for empty
25096 2004-02-12 Martin Baulig <martin@ximian.com>
25098 * class.h (MonoClassField): Added `MonoType *generic_type'.
25100 * reflection.c (mono_image_get_fieldref_token): Added support for
25101 instantiated generic types.
25102 (field_encode_inflated_field): Removed.
25103 (mono_image_get_inflated_field_token): Removed.
25104 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
25106 * reflection.h (MonoReflectionInflatedField): Removed.
25108 2004-02-12 Martin Baulig <martin@ximian.com>
25110 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
25111 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
25113 * reflection.c (mono_image_get_methodspec_token): Take a
25114 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
25115 (mono_image_create_token): Check whether we have a
25116 `method->signature->gen_method' and call
25117 mono_image_get_methodspec_token() if appropriate.
25118 (inflated_method_get_object): Removed.
25119 (mono_reflection_bind_generic_method_parameters): Return a
25120 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
25121 (mono_reflection_inflate_method_or_ctor): Likewise.
25123 * reflection.h (MonoReflectionInflatedMethod): Removed.
25125 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
25127 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
25128 for custom valuetype marshalling.
25130 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
25132 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25134 * icall.c: fixed WSAGetLastError_internal name.
25136 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
25138 * threads.c (mono_thread_attach): Allow this to be called multiple
25139 times for a thread.
25141 * threads.c (build_wait_tids): Do not wait for ourselves.
25143 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
25144 appdomain list is empty.
25146 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
25147 memory returned by mono_string_builder_to_utf16, since it points into
25148 managed memory. Thanks to Bernie Solomon for noticing this.
25150 * icall.c: Add AppDomainSetup icalls.
25152 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
25154 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
25157 * reflection.c (reflection_methodbuilder_to_mono_method): Save
25158 custom attributes to the method_aux struct. Also fix array indexes etc.
25160 * loader.c (mono_method_get_param_names): Make dynamic case work again.
25162 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
25164 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
25165 (both static and runtime) and reduce startup time.
25167 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
25169 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
25170 AsAny marshalling conversion instead of crashing.
25172 * marshal.c: Fix warnings.
25174 2004-02-09 Martin Baulig <martin@ximian.com>
25176 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
25178 * reflection.h (MonoReflectionInflatedMethod): Removed the
25179 `declaring' field, it's now in the unmanaged MonoGenericMethod.
25181 * reflection.c (method_encode_methodspec): Removed the `method'
25182 argument; we get it from `gmethod->declaring'.
25183 (inflated_method_get_object): Removed the `declaring' argument.
25185 2004-02-09 Martin Baulig <martin@ximian.com>
25187 * class.h (MonoGenericMethod): New type.
25188 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
25191 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
25192 a `MonoGenericMethod *gen_method' one.
25194 * class.c (mono_class_inflate_generic_type): Take an additional
25195 `MonoGenericMethod * argument. This is only non-NULL if we're
25196 inflating types for a generic method.
25197 (mono_class_inflate_generic_signature): Renamed to
25198 inflate_generic_signature() and made static; take a
25199 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25200 (inflate_generic_header): Take a `MonoGenericMethod *' argument
25201 instead of a `MonoGenericInst *' one.
25202 (mono_class_inflate_generic_method): Likewise.
25204 * reflection.c (encode_generic_method_sig): Take a
25205 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25206 (method_encode_methodspec): Likewise.
25207 (inflated_method_get_object): Likewise.
25209 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
25210 field with a `MonoGenericMethod *gmethod' one.
25212 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
25214 * class.h (mono_class_has_parent): add parens to expansion
25217 2004-02-08 Martin Baulig <martin@ximian.com>
25219 * image.h (MonoImage): Removed `generics_cache'.
25221 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
25222 instead of a `MonoType *' argument; removed the `inflate_methods'
25223 argument. Don't inflate methods here.
25225 * loader.c (find_method): If it's a generic instance, call
25226 mono_class_init() on the `sclass->generic_inst->generic_type'.
25228 * metadata.c (mono_type_size): Make this work on uninitialized
25229 generic instances; call it on the `ginst->generic_type's class.
25231 * reflection.c (mono_reflection_bind_generic_parameters): Call
25232 mono_class_from_generic() to create the `ginst->klass'.
25234 2004-02-08 Martin Baulig <martin@ximian.com>
25236 * class.h (MonoClass): Changed type of `generic_inst' from
25237 `MonoType *' to `MonoGenericInst *'.
25239 2004-02-08 Martin Baulig <martin@ximian.com>
25241 * icall.c (ves_icall_Type_BindGenericParameters): Just call
25242 mono_type_get_object(), this is now creating a `MonoGenericInst'
25243 for MONO_TYPE_GENERICINST.
25244 (ves_icall_MonoGenericInst_GetParentType): Likewise.
25245 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25247 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
25248 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
25249 (inflated_method_get_object): Added `MonoClass *refclass' argument.
25250 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
25251 and reflected type.
25253 * reflection.h (MonoReflectionInflatedMethod): Removed
25254 `declaring_type' and `reflected_type'.
25256 2004-02-08 Martin Baulig <martin@ximian.com>
25258 * class.h (MonoGenericInst): Added `MonoType *parent' and
25259 `MonoType **ifaces'.
25261 * reflection.h (MonoReflectionGenericInst): Removed `klass',
25262 `parent' and `interfaces'.
25264 * reflection.c (mono_reflection_bind_generic_parameters): Take a
25265 `MonoType *' argument and return a `MonoType *'.
25268 (ves_icall_MonoGenericInst_GetParentType): New interncall.
25269 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25271 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
25273 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
25274 valuetype marshalling.
25276 2004-02-06 Martin Baulig <martin@ximian.com>
25279 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
25280 (my_mono_class_from_generic_parameter): Likewise.
25282 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
25284 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
25285 contents of the symbol files lazily.
25287 * object.h (MonoThread): Add 'name' and 'name_len' fields.
25289 * threads.h threads.c icall.c: New icalls for getting and setting the
25292 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
25294 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
25295 Raise an exception when the domain is not found.
25297 2004-02-03 Martin Baulig <martin@ximian.com>
25299 * reflection.c (mono_image_get_methodspec_token): Use the
25300 uninflated signature; fixes gen-33.
25302 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
25304 * gc.c threads.c: Make the finalizer thread a normal managed thread so
25305 the finalizer code can use thread functionality.
25307 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
25308 the finalizer thread.
25310 * threads.c: Make some functions more robust.
25312 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
25314 * metadata.h: Add new marshalling conventions.
25316 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
25317 stringbuilder marshalling. Fixes #53700.
25319 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
25321 * reflection.c (mono_image_get_type_info): Save declarative security
25324 * reflection.c (mono_image_get_field_info): Handle uninitialized
25325 unmanaged fields as well.
25327 * appdomain.c: Bump corlib version.
25329 2004-02-01 Martin Baulig <martin@ximian.com>
25331 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
25332 method type arguments.
25334 2004-01-30 Duncan Mak <duncan@ximian.com>
25336 * marshal.h: Add prototype for
25337 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
25339 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
25342 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
25344 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
25345 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
25347 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
25349 * marshal.c (mono_marshal_get_native_wrapper): Add support for
25350 custom marshalling of valuetypes.
25352 * marshal.c: Fix some warnings.
25354 2004-01-29 Martin Baulig <martin@ximian.com>
25356 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
25357 for generic method parameters.
25359 * reflection.c (method_encode_methodspec): Write the uninflated
25360 signature into the methodspec table.
25361 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
25362 is always the uninflated method.
25363 (reflection_methodbuilder_to_mono_method): Copy the generic
25364 parameters from the MethodBuilder into `header->gen_params'.
25366 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
25368 * class.c (mono_class_from_generic_parameter): Fix warning.
25370 2004-01-27 Martin Baulig <martin@ximian.com>
25372 * class.c (mono_class_from_generic_parameter): Don't create
25373 `klass->methods' here.
25375 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
25377 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
25378 extension since it does not work with libraries named lib<FOO>.dll.so.
25380 2004-01-25 Martin Baulig <martin@ximian.com>
25382 * class.c (mono_class_inflate_generic_type): Added support for
25383 MONO_TYPE_GENERICINST.
25385 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
25386 inflate methods on open constructed types.
25388 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25390 * object.c: fire ProcessExit event in the root AppDomain after running
25391 Main. Fixes bug #53299.
25393 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
25395 * socket-io.c: include the new socket-wrappers.h header.
25396 Use the wrappers instead of the unix socket functions to make the code
25399 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
25401 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
25403 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25406 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
25408 * reflection.c (mono_image_create_pefile): Handle the case when the
25409 entry point is not a MethodBuilder.
25411 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25412 field to ReflectionMethod since it is not allways a builder.
25414 * reflection.c (type_get_fully_qualified_name): New helper function to
25415 return the fully qualified name of a type.
25417 * reflection.c (encode_marshal_blob): Always emit the fully qualified
25418 type name for custom marshallers.
25420 * reflection.c (mono_marshal_spec_from_builder): Ditto.
25422 * class.c (mono_class_setup_vtable): If a parent class already
25423 implements an interface, use the implementing methods from that class.
25426 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25428 * threadpool.c: just return instead of ExitThread to allow for thread
25431 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
25433 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
25434 when closing resource modules.
25436 * reflection.c (mono_image_create_pefile): Handle the case when the
25437 entry point is not a MethodBuilder.
25439 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25440 field to ReflectionMethod since it is not allways a builder.
25442 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
25444 * marshal.c (mono_marshal_get_managed_wrapper):
25445 mono_marshal_alloc takes native int so CONV_I
25446 the arg for 64bits.
25448 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
25450 * reflection.c (fixup_cattrs): New function to fixup the methoddef
25451 tokens in the cattr table. Fixes #53108.
25453 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25455 * loader.c: don't trim ".dll" before looking up in the config file.
25456 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
25458 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
25460 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
25461 Return the module which contains the resource as well.
25462 (ves_icall_System_Reflection_Module_Close): New icall.
25464 * appdomain.c: Bump corlib version number.
25466 * image.c (mono_image_addref): New public function.
25468 * assembly.c: Call mono_image_addref.
25470 * reflection.c (mono_module_get_object): Increase reference count of
25473 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25476 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
25477 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
25478 proper exceptions on DllImport problems.
25480 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
25482 * class.c, metadata.c: eliminate CSIZE macro.
25484 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
25486 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
25487 * object.h: Added async_callback field in MonoAsyncResult.
25488 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
25489 * verify.c: Added async_callback in MonoAsyncResult layout.
25491 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
25493 * reflection.c (mono_reflection_get_custom_attrs): Add support
25496 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
25498 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
25500 (mono_marshal_method_from_wrapper): Add null pointer check.
25502 2004-01-16 Martin Baulig <martin@ximian.com>
25504 * debug-mono-symfile.h: Set version number to 36 and reflect
25505 latest symbol writer changes.
25507 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
25509 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
25510 multi-dimensional arrays.
25511 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
25512 (mono_class_from_mono_type): Use bounded_array_class_get.
25514 * class.c (mono_bounded_array_class_get): New function which takes
25515 a 'bounded' bool argument to distinguish vectors from one dimensional
25518 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
25519 bounded_array_class_get if the array has bounds.
25521 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
25522 Search modules loaded using AssemblyBuilder:AddModule as well.
25524 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25526 * appdomain.c: increased corlib version.
25527 * filewatcher.c: removed g_print.
25529 (get_property_info): only allocate what is actually requested.
25530 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
25532 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25534 * Makefile.am: added filewatcher.[ch]
25535 * filewatcher.[ch]: FileSystemWatcher runtime support.
25536 * icall.c: added new FSW icalls.
25538 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
25540 * string-icalls.c: fix stringbuilder regression as suggested by
25541 Iain McCoy <iain@mccoy.id.au>.
25543 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
25545 * process.c (process_read_stringtable_block): Recognize '007f' as
25546 a language neutral stringtable block.
25548 2004-01-12 Patrik Torstensson
25550 * object.h (MonoStringBuilder) : Changed layout to support our
25551 new stringbuilder class.
25552 * marshal.c: Change marshalling to support the new layout of
25554 * appdomain.c: increased version number because new layout of
25557 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
25559 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
25560 assembly name as an string instead of an AssemblyName, since it is
25561 easier to extract info from it.
25563 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
25564 the culture subdirectories too. Fixes #52231.
25566 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25568 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
25569 It takes 2 new parameters with an optional name for the method to look
25570 for and case ignoring info.
25572 * threadpool.c: removed unused variable.
25574 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25576 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
25577 It takes 2 new parameters with an optional name for the property to look
25578 for and case ignoring info.
25581 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
25583 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
25586 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25589 * assembly.c: escape the uri before passing it to g_filename_from_uri.
25592 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
25594 * reflection.c: Add support for more than one unmanaged resource.
25596 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
25597 in field->def_value, as done in all other cases.
25599 * reflection.c (mono_reflection_get_custom_attrs): Add support for
25602 * reflection.c (mono_reflection_create_runtime_class): Remove
25603 errorneous assignment to klass->element_class, since it is already
25604 done in mono_reflection_setup_internal_class.
25606 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25608 * gc.c: added missing LeaveCriticalSection.
25609 * icall.c: indented a couple of lines.
25610 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
25611 if we call EndInvoke inside a callback. Fixes bug #52601.
25613 2004-01-07 Martin Baulig <martin@ximian.com>
25615 * mono-debug-debugger.h
25616 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
25618 2004-01-06 Miguel de Icaza <miguel@ximian.com>
25620 * appdomain.c: Use messages in NotImplementedException.
25622 * exception.c (mono_get_exception_not_implemented): Now this takes
25623 a message argument.
25625 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
25626 exception instead of g_asserting an aborting when something is not
25629 Add some inline docs.
25631 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
25633 * reflection.h: Update after changes to object layout.
25635 * reflection.c: Implement saving of unmanaged aka win32 resources.
25637 * appdomain.c: Bump version number.
25639 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
25640 Handle missing domains gracefully.
25642 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
25644 * file-io.c : On Windows, there are much more invalid_path_chars.
25646 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
25648 * class.h, object.c: prepare for GetType () speedup.
25650 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
25652 * profiler.c: workaround for --profile null reference exception on
25653 cygwin. Patch by Patrik Torstensson.
25655 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
25657 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
25658 make work for unaligned access.
25660 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
25662 * class.c: small cleanup (class->fields [i] -> field).
25663 * image.c: check address of metadata is valid.
25665 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
25667 * assembly.h assembly.c (mono_assembly_loaded): New public function to
25668 search the list of loaded assemblies.
25670 * reflection.c (mono_reflection_type_from_name): Use
25671 mono_assembly_loaded instead of mono_image_loaded.
25673 * reflection.c: Fix warnings.
25675 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
25677 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
25678 is dynamic. This is needed since an assembly can contain both dynamic and
25679 non-dynamic images.
25681 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
25684 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
25686 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
25687 to store modules loaded using AddModule.
25689 * reflection.c (mono_image_fill_file_table): Generalize this so it works
25692 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
25694 * reflection.c (mono_image_fill_export_table_from_module): New function to
25695 fill out the EXPORTEDTYPES table from a module.
25697 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
25698 into a separate function. Also handle loaded non-dynamic modules.
25700 * reflection.c (mono_image_basic_init): Fix memory allocation.
25702 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
25704 * assembly.c (mono_assembly_load_references): Make this public.
25706 2003-12-19 Martin Baulig <martin@ximian.com>
25708 * class.c (mono_class_initialize_generic): Made this static, take
25709 a `MonoGenericInst *' instead of a `MonoClass *'.
25710 (mono_class_from_generic): Call mono_class_initialize_generic()
25711 unless we're already initialized or being called from
25712 do_mono_metadata_parse_generic_inst().
25714 * class.h (MonoGenericInst): Added `initialized' and
25715 `init_pending' flags.
25717 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
25718 `mono_class_init (gklass)' or mono_class_initialize_generic()
25719 here; set `generic_inst->init_pending' while parsing the
25722 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
25724 * locales.c: include string.h for memxxx prototypes
25726 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
25728 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
25729 constructor when accessing literal fields.
25731 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
25733 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
25735 * reflection.c (assembly_add_resource_manifest): New function to fill
25736 the MANIFESTRESOURCE table.
25738 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
25740 * reflection.h: Update to changes in class layout.
25742 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
25743 Reenable call to mono_runtime_is_shutting_down ().
25745 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
25746 determine if the runtime is shutting down.
25748 2003-12-16 Jackson Harper <jackson@ximian.com>
25750 * icall.c: comment out call to mono_runtime_is_shutting_down to
25753 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
25755 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
25756 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
25758 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
25760 * reflection.c: move definition of swap_with_size
25761 to before its first call
25763 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
25765 * appdomain.c (mono_runtime_is_shutting_down): New public function.
25767 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
25770 * object.c: Fix warnings.
25772 * icall.c (ves_icall_Type_Get...): Only consider inherited static
25773 members if FlattenHierarchy is set.
25775 * reflection.c (mono_image_add_decl_security): New function to emit
25776 declarative security.
25778 * reflection.h reflection.c: Add support for declarative security.
25780 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
25782 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
25784 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
25786 * appdomain.c verify.c: Moved corlib version checking into its own
25787 function in appdomain.c since it needs to create vtables etc.
25789 2003-12-13 Patrik Torstensson <p@rxc.se>
25791 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
25792 instead of unwrapped server.
25794 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
25796 * verify.c (check_corlib): Fix field index.
25798 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
25800 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
25803 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
25805 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
25806 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
25807 cope with sizeof(size_t) != sizeof(guint32).
25809 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25811 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
25812 in case of failure.
25814 2003-12-10 Mark Crichton <crichton@gimp.org>
25816 * icall.c: removed the GetNonZeroBytes. We now handle this case
25819 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
25821 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
25823 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
25826 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
25828 * verify.c (check_corlib): Handle the case when the version field is
25829 initialized by a static constructor.
25831 2003-12-08 Patrik Torstensson <p@rxc.se>
25833 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
25835 2003-12-08 Martin Baulig <martin@ximian.com>
25837 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
25838 a MonoReflectionGenericParameter, also take the parameter index
25839 and name as arguments.
25840 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
25841 (ves_icall_MonoGenericParam_initialize): New interncall.
25842 (ves_icall_Type_make_byref_type): New interncall.
25844 * reflection.h (MonoReflectionGenericParam): Derive from
25845 MonoReflectionType, not just from MonoObject. Added `refobj' and
25848 * reflection.c (mono_reflection_define_generic_parameter): Create
25849 and return a new MonoReflectionGenericParam; don't initialize the
25851 (mono_reflection_initialize_generic_parameter): New public method;
25852 initializes the constraints and creates the `param->pklass'.
25854 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
25856 * reflection.h reflection.c: Use the new fields 'num_types',
25857 'num_fields' and 'num_methods' to track the number of types etc.
25859 * verify.c (check_corlib): Check corlib version number.
25861 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
25863 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
25864 function works on all methods.
25866 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
25868 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
25869 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
25870 the custom_type_info flag of the transparent proxy.
25871 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
25872 objects that supports IRemotingTypeInfo.
25873 * object.h: Added custom_type_info field in transparent proxy.
25875 2003-12-06 Martin Baulig <martin@ximian.com>
25877 * class.c (mono_class_create_from_generic): Removed.
25878 (mono_class_from_generic): Check `ginst->klass' before doing
25879 anything else. This is important to fully support "recursive"
25882 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
25883 empty `generic_inst->klass' before doing anything else.
25885 2003-12-06 Dick Porter <dick@ximian.com>
25890 * locales.c: Use C structs to access class fields. Don't do a
25891 conversion between MonoString and UChar because both are
25892 platform-endian UTF-16. Compare now takes startindex and count
25893 parameters. Add a char overload for IndexOf. Speed up the
25894 invariant string IndexOf.
25896 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
25898 * Makefile.am (monosn_LDADD): Fix parallel build.
25900 2003-12-04 Martin Baulig <martin@ximian.com>
25903 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
25904 (ves_icall_Type_make_array_type): New interncall.
25906 2003-12-04 Martin Baulig <martin@ximian.com>
25908 * locales.c: also change it in the !HAVE_ICU case.
25910 2003-12-04 Dick Porter <dick@ximian.com>
25913 * locales.c: construct_compareinfo is now in CompareInfo, not
25916 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
25918 * image.c (mono_image_load_file_for_image): Cache loaded images in the
25919 image->files array.
25921 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
25924 * assembly.c (mono_assembly_load_references): Only load references
25927 * class.c (mono_class_from_name): Avoid linear search of the
25928 EXPORTEDTYPE table.
25930 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
25932 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
25934 * image.h (MonoImage): Add 'field_cache' field.
25936 * loader.c (mono_field_from_token): Cache field lookups.
25938 * reflection.c (mono_module_get_object): Fix name property.
25940 * icall.c (ves_icall_get_enum_info): Update after changes to
25941 mono_metadata_get_constant_index ().
25943 * icall.c: Get rid of get_type_info icall, use a separate icall for
25944 each type property to avoid needless memory allocations. Fixes #51514.
25946 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
25947 to avoid needless binary searches.
25949 * class.c (class_compute_field_layout): Move the initialization of
25950 field->def_value to mono_class_vtable ().
25952 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
25955 * object.c (mono_object_allocate): Make it inline.
25957 * object.c (mono_object_allocate_spec): Make it inline.
25959 2003-12-02 Dick Porter <dick@ximian.com>
25961 * locales.c (create_NumberFormat): NumberFormatInfo construction.
25962 Patch by Mohammad DAMT (mdamt@cdl2000.com).
25964 2003-12-01 Dick Porter <dick@ximian.com>
25966 * threads.c: Fix signature and call in CreateMutex and
25969 2003-12-01 Dick Porter <dick@ximian.com>
25972 * locales.c: Implement string compares and searching
25974 * object.h: Add extra Thread field
25976 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
25978 * reflection.c (fixup_method): Add support for MonoCMethod.
25980 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
25982 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
25984 * reflection.c (assembly_name_to_aname): Allow extra characters in
25985 assembly names. Fixes #51468.
25987 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
25989 * exception.c (mono_exception_from_name_domain): New helper function.
25991 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
25992 exception object in the correct domain.
25994 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
25995 formatting + make a copy a the input data.
25997 * loader.c (mono_get_method_from_token): Methods which contain
25998 native code do not have entries in the ImplMap.
26000 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
26001 Thanks to Gonzalo for spotting this.
26003 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
26004 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
26006 * assembly.h (mono_assembly_load_from): Split the second part of
26007 assembly loading into a new public function.
26009 * exception.h (mono_get_exception_bad_image_format): New function.
26011 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
26013 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26014 Enumerate all modules inside a dynamic assembly. Fixes #51293.
26016 * icall.c: Add new icall for creating dynamic methods.
26018 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
26020 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
26022 * reflection.c (mono_reflection_create_dynamic_method): New icall to
26023 create a dynamic method.
26025 * reflection.c (resolve_object): New helper function.
26027 * reflection.c: Generalize ReflectionMethodBuilder and the functions
26028 which manipulate it so they can also work on dynamic methods.
26030 * reflection.c (reflection_method_builder_to_mono_method): Avoid
26031 creating the MonoReflectionMethodAux structure if it is not needed.
26033 * reflection.h verify.c: Update after changes to object layout.
26035 * reflection.c (method_builder_encode_signature): Fix compilation on
26038 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
26040 * appdomain.h: Added support for context static fields. Added static_data
26041 field to MonoAppContext and renamed thread_static_fields to a more
26042 generic special_static_fields in MonoAppDomain, since it can now contain
26043 context static fields.
26044 * domain.c: Updated hashtable name.
26045 * object.c: Replaced field_is_thread_static() for a more generic
26046 field_is_special_static() which also checks for context static attribute.
26047 In mono_class_vtable(), added support for static context fields.
26048 * threads.c: Changed methods that manage thread static fields to more
26049 generic methods so they can be reused both for thread and context static
26051 * threads.h: Declared some new methods.
26053 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
26055 * reflection.h: Update after changes to the managed types.
26057 * reflection.c (encode_custom_modifiers): New helper function.
26059 * reflection.c (method_encode_signature): Emit custom modifiers.
26061 * reflection.c (field_encode_signature): Emit custom modifiers.
26063 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
26065 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
26067 * icall.c (ves_icall_System_ValueType_Equals): New optimized
26070 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
26073 * object.c (mono_field_get_value_object): New function.
26075 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
26078 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
26080 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
26081 return a preallocated out-of-memory exception instance.
26083 * object.c (out_of_memory): Use the new function.
26085 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
26086 flag is before the custom modifiers. Fixes #49802.
26088 2003-11-16 Martin Baulig <martin@ximian.com>
26090 * class.c (mono_class_is_open_constructed_type): Implemented the
26091 MONO_TYPE_GENERICINST case.
26093 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
26095 * assembly.c (mono_assembly_fill_assembly_name): New function to
26096 fill out the MonoAssemblyName structure.
26097 (mono_assembly_open): Use the new function.
26099 * icall.c (fill_reflection_assembly_name): New helper function.
26101 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
26104 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
26106 2003-11-15 Martin Baulig <martin@ximian.com>
26108 * class.c (mono_class_is_open_constructed_type): New public
26109 function; checks whether a type is an open constructed type,
26110 ie. whether it still contains type parameters.
26111 (mono_class_inflate_generic_type): If we're a type parameter and
26112 the inflated type is also a MONO_TYPE_(M)VAR, return the original
26115 * class.h (MonoGenericInst): Added `guint32 is_open'.
26117 * loader.c (method_from_methodspec): Check whether we're an open
26118 or closed constructed type and set `ginst->is_open'.
26120 * reflection.c (mono_reflection_bind_generic_parameters): Check
26121 whether we're an open or closed constructed type and set
26123 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
26124 from open constructed types.
26126 2003-11-15 Martin Baulig <martin@ximian.com>
26128 * reflection.c (mono_reflection_bind_generic_parameters): If we're
26129 a generic instance (instead of a generic type declaration) with
26130 unbound generic parameters, bind them to our actual types.
26132 2003-11-14 Martin Baulig <martin@ximian.com>
26134 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
26136 * reflection.c (mono_reflection_bind_generic_parameters): If we're
26137 an interface type, populate `res->interfaces' with instantiated
26138 versions of all the interfaces we inherit.
26140 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
26142 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
26143 when MONO_PATH is set but doesn't contain the install dir.
26145 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26148 (ves_icall_Type_GetInterfaces): don't return an interface twice when
26149 it's also implemented in base classes. Fixes bug #50927.
26151 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
26153 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
26154 if this method is called from a finalizer. Fixes #50913.
26156 2003-11-12 Miguel de Icaza <miguel@ximian.com>
26158 * threads.c: Implement VolatileRead/VolatileWrite
26160 * icall.c: Add new icalls for VolatileRead/VolatileWrite
26162 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26164 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
26165 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
26168 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
26169 from Peter Ross (pro@missioncriticalit.com).
26171 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
26173 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
26175 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26177 * assembly.c (mono_assembly_load_references): Disable check because it
26178 triggers on older corlibs which lots of people have.
26180 2003-11-12 Jackson Harper <jackson@ximian.com>
26182 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
26183 load corlib.dll if mscorlib.dll is not found.
26184 * assembly.h: Remove corlib name define.
26187 * image.c: Change corlib name to mscorlib.
26189 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26191 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
26193 2003-11-11 Miguel de Icaza <miguel@ximian.com>
26195 * appdomain.h: Added loader_optimization here to sync with the C#
26196 code, and add disallow_binding_redirects field.
26198 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26200 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
26202 * reflection.c (mono_image_build_metadata): Fix crash on modules
26205 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
26207 * icall.c (ves_icall_get_method_info): Return callingConvention as
26210 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
26211 namespaces from the EXPORTEDTYPE table as well.
26213 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
26214 from all modules inside the assembly.
26216 2003-11-11 Martin Baulig <martin@ximian.com>
26218 * reflection.c (mono_reflection_bind_generic_parameters): Make
26219 this work for interfaces.
26221 2003-11-11 Martin Baulig <martin@ximian.com>
26223 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
26225 2003-11-11 Martin Baulig <martin@ximian.com>
26227 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
26228 "MonoInflatedMethod" and "MonoInflatedCtor".
26230 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26232 * reflection.c (resolution_scope_from_image): Use the assembly table
26233 from the manifest module, since other modules don't have it.
26235 * debug-helpers.c (mono_type_full_name): New helper function.
26237 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
26239 * image.c (mono_image_load_file_for_image): New public function which
26240 is a replacement for the load_file_for_image in class.c.
26242 * assembly.c (mono_assembly_load_module): A wrapper for the function
26243 above which does assembly association and reference loading too.
26245 * class.c (mono_class_from_name): Call mono_assembly_load_module.
26247 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26249 * appdomain.c: not all of the attributes for the full assembly name
26250 are required and the order doesn't matter. Fixes bug #50787.
26252 2003-11-10 Dick Porter <dick@ximian.com>
26254 * locales.c: Use platform-endian UTF16
26256 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
26258 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26260 2003-11-10 Martin Baulig <martin@ximian.com>
26263 (mono_metadata_load_generic_params): Make this actually work.
26265 * reflection.c (mono_reflection_bind_generic_parameters): If our
26266 parent is a generic instance, pass all the `types' to it, no
26267 matter whether it has the same number of type parameters or not.
26269 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
26271 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26273 * assembly.c (mono_assembly_load_references): Move the image<->assembly
26274 assignment code to this function so it gets called recursively for all
26277 * image.c (load_modules): Remove the assembly assignment since it is
26278 now done by mono_assembly_load_references.
26280 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26281 Add 'module' argument.
26282 (mono_module_get_types): New helper function.
26283 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
26285 2003-11-08 Martin Baulig <martin@ximian.com>
26287 * class.c (mono_class_inflate_generic_method): Interface method
26288 don't have a header.
26290 * reflection.c (mono_image_get_methodspec_token): Take an
26291 additional `MonoGenericInst *' argument instead of reading it from
26292 the header; this is necessary to support interfaces.
26293 (mono_image_create_token): Pass the `MonoGenericInst *' from the
26294 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
26295 (inflated_method_get_object): Take an additional `MonoGenericInst *'
26298 * reflection.h (MonoReflectionInflatedMethod): Added
26299 `MonoGenericInst *ginst'.
26301 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
26303 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
26305 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
26307 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
26309 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
26312 (reflection_methodbuilder_from_method_builder):
26313 (reflection_methodbuilder_from_ctor_builder): New helper functions to
26314 initialize a ReflectionMethodBuilder structure.
26315 (mono_image_get_methodbuilder_token):
26316 (mono_image_get_ctorbuilder_token): New functions to emit memberref
26317 tokens which point to types in another module inside the same assembly.
26319 * reflection.c: Use the new helper functions.
26321 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
26323 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
26324 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
26326 * reflection.c (resolution_scope_from_image): Emit a moduleref if
26329 * reflection.c (mono_image_build_metadata): Emit metadata only for the
26330 current module. Emit the manifest only for the main module.
26332 * reflection.c (mono_image_create_token): Add assertion when a
26333 memberref needs to be created.
26335 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
26337 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
26338 larger buffer for the custom attribute blob. Fixes #50637.
26340 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26342 * threadpool.c: notify listener on async processing handles after
26343 invoking the async callback. Thanks to Zoltan.
26345 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
26347 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
26348 avoid code duplication.
26350 * reflection.h (MonoDynamicImage): New type which is currently unused,
26351 but will be used through the ref.emit code in place of
26352 MonoDynamicAssembly.
26354 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26357 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
26358 a MonoDynamicImage instead of just a MonoImage.
26360 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
26361 icalls to ModuleBuilder but keep their semantics, so they will work
26362 with moduleb->assemblyb. This will change later.
26364 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
26366 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26369 * reflection.c (mono_image_build_metadata): Avoid creation of a default
26370 main module, since it is now done by the managed code.
26372 2003-11-03 Martin Baulig <martin@ximian.com>
26374 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
26375 `ginst->klass' here.
26376 (method_encode_methodspec): Don't use the `ginst->generic_method's
26377 klass if it's a generic instance, use `ginst->klass' in this case.
26379 2003-11-03 Martin Baulig <martin@ximian.com>
26381 * reflection.c (mono_image_get_generic_method_param_info):
26382 Removed, use mono_image_get_generic_param_info() instead.
26383 (mono_image_get_type_info): Write the GenericParam table before
26384 the Method table. This is neccessary because in the GenericParam
26385 table, type parameters of the class (ie. '!0' etc.) must come
26386 before the ones from its generic methods (ie. '!!0' etc).
26388 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
26390 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
26392 2003-11-02 Martin Baulig <martin@ximian.com>
26394 * reflection.c (create_generic_typespec): Take a
26395 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
26396 the generic parameters from it.
26398 2003-11-02 Martin Baulig <martin@ximian.com>
26400 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
26401 instead of a `MonoClassField *' since we just need the type.
26402 (create_generic_typespec): New static function. Creates a
26403 TypeSpec token for a generic type declaration.
26404 (mono_image_get_generic_field_token): New static function.
26405 (mono_image_create_token): If we're a FieldBuilder in a generic
26406 type declaration, call mono_image_get_generic_field_token() to get
26409 2003-11-02 Martin Baulig <martin@ximian.com>
26412 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
26413 `MonoReflectionGenericInst *declaring_type' and
26414 `MonoReflectionGenericInst *reflected_type' fields.
26416 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
26417 `MonoReflectionGenericInst *declaring_type' and a
26418 `MonoReflectionGenericInst *reflected_type' argument instead of a
26419 single `MonoReflectionGenericInst *type' one. Set
26420 `res->declaring_type' and `res->reflected_type' from them.
26421 (mono_reflection_inflate_field): Likewise.
26423 2003-11-02 Martin Baulig <martin@ximian.com>
26425 * class.c (mono_class_setup_vtable): Don't store generic methods
26428 2003-11-02 Martin Baulig <martin@ximian.com>
26430 * reflection.h (MonoReflectionGenericInst): Added
26431 `MonoReflectionType *declaring_type'.
26433 * reflection.c (mono_reflection_bind_generic_parameters): Use
26434 `if (tb->parent)' instead of `klass->parent'.
26436 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
26438 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
26439 with an empty ASSEMBLY table.
26441 * reflection.c (mono_image_build_metadata): Avoid using the same loop
26442 variable in the inner and outer loops.
26444 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
26446 * metadata.h (mono_metadata_make_token): Put parentheses around macro
26449 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
26451 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
26452 icalls. Instead, do everything in managed code. This is needed since
26453 it is hard to restore the original domain etc. in unmanaged code in the
26454 presence of undeniable exceptions.
26456 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
26457 New icalls to push and pop appdomain refs.
26459 2003-10-31 Martin Baulig <martin@ximian.com>
26461 * class.c (inflate_generic_type): Renamed to
26462 mono_class_inflate_generic_type() and made it public.
26464 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
26467 * loader.c (mono_field_from_memberref): Also set the retklass for
26470 * fielder.c (mono_image_get_inflated_field_token): New static
26471 method; creates a metadata token for an inflated field.
26472 (mono_image_create_token, fixup_method): Added support for
26473 "MonoInflatedField".
26474 (fieldbuilder_to_mono_class_field): New static function.
26475 (mono_reflection_inflate_field): New public function.
26478 (MonoReflectionGenericInst): Added `MonoArray *fields'.
26479 (MonoReflectionInflatedField): New typedef.
26481 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
26483 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
26484 for Solaris and other platforms without s6_addr16
26486 2003-10-30 Martin Baulig <martin@ximian.com>
26488 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
26489 argument instead of two.
26490 (mono_class_inflate_generic_signature): Likewise.
26491 (inflate_generic_header): Likewise.
26492 (mono_class_inflate_generic_method): Likewise. In addition, if
26493 `ginst->klass' is set, it becomes the new `method->klass'.
26495 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
26498 * reflection.c (encode_generic_method_sig): Write a 0xa as the
26499 first byte. [FIXME]
26500 (method_encode_methodspec): If we have generic parameters, create
26501 a MethodSpec instead of a MethodRef.
26502 (fixup_method): Added support for "MonoInflatedMethod" and
26503 "MonoInflatedCtor".
26504 (mono_image_create_token): Added support for "MonoInflatedMethod"
26505 and "MonoInflatedCtor".
26506 (inflated_method_get_object): New static function; returns a
26507 managed "System.Reflection.MonoInflatedMethod" object.
26508 (mono_reflection_bind_generic_method_parameters): Return a
26509 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
26510 (mono_reflection_inflate_method_or_ctor): Likewise.
26511 (mono_image_get_generic_method_param_info): Initialize unused
26513 (mono_image_get_generic_param_info): Likewise.
26515 * reflection.h (MonoReflectionInflatedMethod): New public
26516 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
26517 "S.R.MonoInflatedCtor" classes.
26519 * loader.c (method_from_memberref): If we're a TypeSpec and it
26520 resolves to a generic instance, inflate the method.
26522 2003-10-28 Dick Porter <dick@ximian.com>
26524 * object.c (mono_runtime_run_main): Convert command-line arguments
26525 into utf8, falling back to the user's locale encoding to do so.
26527 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
26529 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
26532 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
26534 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
26535 up icalls at method definition time. Partially fixes #33569.
26537 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
26539 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
26540 marshalling of arrays. Fixes #50116.
26542 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
26544 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
26545 points to a vtable in the dying appdomain.
26547 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
26548 listeners into unmanaged code inside the lock.
26550 * object.c (mono_class_vtable): Turn off typed allocation in non-root
26551 domains and add some comments.
26553 2003-10-25 Martin Baulig <martin@ximian.com>
26555 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
26557 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
26559 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
26560 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
26561 currently parsing. Create the generic class and store it in
26562 `generic_inst->klass' before parsing the type arguments. This is
26563 required to support "recursive" definitions; see mcs/tests/gen-23.cs
26565 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
26566 to support recursive typespec entries.
26568 * class.c (mono_class_setup_parent): If our parent is a generic
26569 instance, we may get called before it has its name set.
26570 (mono_class_from_generic): Splitted into
26571 mono_class_create_from_generic() and mono_class_initialize_generic().
26573 2003-10-25 Martin Baulig <martin@ximian.com>
26575 * icall.c (ves_icall_Type_BindGenericParameters): Return a
26576 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
26577 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
26578 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
26580 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
26581 (create_typespec): Likewise.
26582 (mono_reflection_bind_generic_parameters): Return a
26583 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
26584 (mono_reflection_inflate_method_or_ctor): New public function.
26586 * reflection.h (MonoReflectionGenericInst): New typedef.
26588 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
26590 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
26591 inside the domain lock. Fixes #49993.
26593 * object.c (mono_class_vtable): When typed allocation is used,
26594 allocate vtables in the GC heap instead of in the mempool, since the
26595 vtables contain GC descriptors which are used by the collector even
26596 after the domain owning the mempool is unloaded.
26598 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
26600 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
26601 reflect what it does. Also invalidate mempools instead of freeing
26602 them if a define is set.
26604 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
26607 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
26608 hold the finalizable objects in this domain.
26610 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
26613 * appdomain.c (mono_domain_set): New function to set the current
26614 appdomain, but only if it is not being unloaded.
26616 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
26617 appdomain which is being unloaded.
26619 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
26620 unloading of the root appdomain.
26622 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
26623 icall to execute a method in another appdomain. Intended as a
26624 replacement for InternalSetDomain, which can confuse the code
26625 generation in the JIT.
26627 * appdomain.c (mono_domain_is_unloading): New function to determine
26628 whenever an appdomain is unloading.
26630 * appdomain.c (mono_domain_unload): New function to correctly unload
26633 * assembly.c (mono_assembly_load_references): Check that an assembly
26634 does not references itself.
26636 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
26637 domain manually, it asks the finalizer thread to do it, then waits for
26638 the result. Also added a timeout.
26640 * icall.c: Register the new icalls.
26642 * threads.h threads.c: Export the mono_gc_stop_world and
26643 mono_gc_start_world functions.
26645 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
26646 function to fill out the mempool with 0x2a.
26648 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
26650 * reflection.h (MonoReflectionMethodAux): New structure to store
26651 information which is rarely used, thus is not in the MonoMethod
26654 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
26655 store the aux info.
26657 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
26658 and marshalling info into the aux structure.
26660 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
26661 from the aux structure.
26663 * loader.c (mono_method_get_param_names): Retrieve the param names from
26666 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
26668 * exception.h exception.c: Add AppDomainUnloadedException && fix
26671 2003-10-21 Dick Porter <dick@ximian.com>
26674 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
26675 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
26677 2003-10-21 Martin Baulig <martin@ximian.com>
26679 * reflection.c (mono_reflection_bind_generic_parameters):
26680 `klass->parent' is NULL for interfaces.
26682 2003-10-21 Martin Baulig <martin@ximian.com>
26684 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
26686 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
26688 * exception.c (mono_exception_from_name_msg): New helper function for
26689 creating exceptions and initializing their message field.
26691 * exception.c: Simplify functions using the new helper.
26693 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
26696 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
26697 mono_raise_exception, since otherwise gcc doesn't generate the function
26698 epilog for raise_exception, confusing the stack unwinding in the JIT.
26701 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
26702 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
26705 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26707 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
26710 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
26712 * icall.c: Removed GetUninitializedObject method because
26713 AllocateUninitializedClassInstance does the same.
26715 2003-10-18 Martin Baulig <martin@ximian.com>
26717 * class.c (inflate_generic_signature): Renamed to
26718 mono_class_inflate_generic_signature() and made it public.
26719 (my_mono_class_from_generic_parameter): New static function; if we
26720 don't already have the generic parameter's MonoClass, create a
26721 very simple one which is just used internally in the runtime and
26722 not passed back to managed code.
26724 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
26726 * metadata.h (MonoMethodSignature): Moved the
26727 `MonoGenericParam *gen_params' to the MonoMethodHeader.
26728 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
26730 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
26731 ves_icall_MonoMethod_GetGenericArguments(); this is now an
26732 interncall on the MonoMethod class, not on MethodInfo.
26733 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
26734 calling mono_reflection_bind_generic_method_parameters() directly.
26736 * loader.c (mono_method_get_signature): If this is a MethodSpec;
26737 return the already computed `method->signature'.
26738 (method_from_methodspec): New static function to load a method
26739 from a MethodSpec entry.
26740 (mono_get_method_from_token): Call the new method_from_methodspec()
26741 for MethodSpec tokens.
26742 (mono_get_method_from_token): If we're a generic method, load the
26745 * reflection.c (mono_image_get_memberref_token): Allow
26746 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
26748 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
26749 (mono_image_create_token): First check whether it's a generic
26750 method (so we'd need to create a MethodSpec), then do the other
26752 (mono_reflection_bind_generic_method_parameters): Return a
26753 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
26754 called directly from the interncall.
26756 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
26758 * reflection.c (load_public_key): Move loading of the public key
26761 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
26763 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
26766 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
26767 culture, hash_alg and public_key. Fixes #49555.
26769 2003-10-17 Martin Baulig <martin@ximian.com>
26771 * class.h (MonoGenericInst): Moved this declaration here and added
26772 `MonoMethod *generic_method'.
26775 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
26776 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
26778 * metadata.c (mono_metadata_type_equal): Two types of
26779 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
26780 index; ie. don't compare the address of the `MonoGenericParam'
26782 (mono_metadata_load_generic_params): Removed the `MonoMethod
26785 * metadata.h (MonoGenericInst): Moved declaration to class.h.
26786 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
26788 * reflection.c (method_encode_signature): Encode the number of
26789 generic parameters.
26790 (encode_generic_method_sig): New static function.
26791 (method_encode_methodspec): New static function; creates an entry
26792 in the MethodSpec table for a generic method.
26793 (mono_image_get_methodspec_token): New static function.
26794 (mono_image_create_token): Call mono_image_get_methodspec_token()
26795 for generic methods.
26796 (mono_reflection_bind_generic_method_parameters): New public
26797 function. Instantiates a generic method.
26799 2003-10-16 Martin Baulig <martin@ximian.com>
26801 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
26802 *gen_params' here from MonoMethodHeader.
26804 * metadata.c (mono_metadata_parse_method_signature): If we have
26805 generic parameters, initialize `method->gen_params' and then set
26806 the correct `type->data.generic_param' in all the parameters.
26808 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
26810 * threads.c (mono_threads_get_default_stacksize): New function to
26811 return the default stacksize.
26813 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
26814 termination of the finalizer thread, since the previous method had
26815 race conditions. Fixes #49628.
26817 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
26818 as for the other managed threads.
26820 2003-10-16 Martin Baulig <martin@ximian.com>
26822 * class.c (inflate_generic_signature): Copy `generic_param_count'
26825 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
26828 * metadata.c (mono_metadata_parse_method_signature): Actually set
26829 the `method->generic_param_count' here.
26830 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
26832 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
26834 * object.h: Add a new field to TypedRef to simplify the implementation
26835 of the REFANY opcodes in the JIT.
26837 * icall.c: Make use of the new field.
26839 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
26842 2003-10-15 Martin Baulig <martin@ximian.com>
26844 * class.c (mono_class_from_gen_param): Renamed to
26845 mono_class_from_generic_parameter() and moved most of the
26846 functionality from mono_reflection_define_generic_parameter()
26847 here; ie. we create a "real" class here.
26848 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
26849 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
26850 previously been called.
26852 * class.h (MonoGenericParam): Moved the declaration of this struct
26853 here from metadata.h and added `MonoMethod *method'.
26855 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
26858 * loader.c (mono_get_method_from_token): If we have any generic
26859 parameters, call mono_metadata_load_generic_params() to read them
26860 from the MONO_TABLE_GENERICPAR.
26862 * metadata.c (mono_metadata_load_generic_params): Added
26863 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
26865 * metadata.h (MonoMethodSignature): Replaced
26866 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
26867 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
26869 * reflection.c (mono_reflection_define_generic_parameter): Moved
26870 most of the functionality into the new
26871 mono_class_from_generic_parameter(); set the `method' field if
26872 we're a method parameter.
26874 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
26876 * marshal.c (emit_struct_conv): if native size is 0
26879 2003-10-14 Martin Baulig <martin@ximian.com>
26881 * icall.c: The generics API has changed in the spec since it was
26882 added to System.Type; these modifications make it match the spec
26884 (ves_icall_Type_GetGenericParameters): Renamed to
26885 `ves_icall_Type_GetGenericArguments'.
26886 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
26887 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
26888 `ves_icall_MonoType_get_HasGenericArguments'.
26889 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
26890 `ves_icall_MonoType_get_IsGenericParameter'.
26891 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
26892 this is no interncall anymore.
26893 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
26894 `ves_icall_TypeBuilder_get_IsGenericParameter'.
26896 2003-10-14 Martin Baulig <martin@ximian.com>
26898 * reflection.c (mono_reflection_bind_generic_parameters): Also
26899 inflate generic methods if we're reading the class from IL.
26901 2003-10-13 Martin Baulig <martin@ximian.com>
26903 * reflection.c (mono_reflection_define_generic_parameter): This
26904 method isn't called directly from the icall anymore; take a
26905 `MonoReflectionAssemblyBuilder *' so we can use this for type and
26906 method generic parameters.
26907 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
26908 (method_builder_encode_signature): Encode generic parameters.
26909 (mono_image_get_method_info): Write generic params to the
26910 MONO_TABLE_GENERICPARAM table.
26912 * reflection.h (MonoReflectionMethodBuilder): Added
26913 `MonoArray *generic_params'.
26915 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
26917 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
26918 wrapper for mono_reflection_define_generic_parameter().
26919 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
26921 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
26923 * marshal.h: Add missing function to fix build.
26925 * marshal.c (mono_marshal_get_native_wrapper): Add support for
26926 the SetLastError pinvoke attribute.
26928 * marshal.c (mono_marshal_set_last_error): New helper function called
26929 by the generated code.
26931 * marshal.c (mono_mb_emit_branch): New helper function.
26933 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
26935 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
26936 classes as parameters and return values of delegates. Fixes #29256.
26938 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
26940 * locales.c: use gint32 in non HAVE_ICU case
26942 2003-10-11 Martin Baulig <martin@ximian.com>
26944 * mono-debug.c (mono_debug_add_method): Added a workaround for
26947 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
26949 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
26950 delegates passed to native code must use the STDCALL calling
26951 convention. Fixes #35987.
26953 2003-10-10 Martin Baulig <martin@ximian.com>
26955 * class.c (inflate_generic_type): If we're inflating for a generic
26956 type instance (and not for a generic method), return
26957 MONO_TYPE_MVAR unchanged.
26959 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26961 * string-icalls.c: Join ignores null strings in the source array.
26962 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
26963 * threads.c: GetAvailableTheads is slightly more accurate.
26965 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
26967 * threads.h threads.c : add mono_threads_set_default_stacksize
26968 and pass default to CreateThread calls.
26970 2003-10-09 Dick Porter <dick@ximian.com>
26974 * locales.c: Internal calls for constructing CultureInfo and
26975 related objects from libicu (if its available.)
26977 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
26979 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
26981 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26983 * threadpool.c: added an argument to async_invoke_thread that is the
26984 item to process, pass the MonoAsyncResult to the thread start function
26985 when creating a new thread. This way we don't need to acquire any lock
26986 when we're creating a new thread. Readded a semaphore for faster
26987 response times (instead of that Sleep i added).
26989 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
26991 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
26992 get daylight change dates better on Windows, fix handling
26993 of platforms without tm_gmtoff.
26995 2003-10-06 Martin Baulig <martin@ximian.com>
26997 * class.c (inflate_generic_method): Renamed to
26998 mono_class_inflate_generic_method() and made public.
26999 (mono_class_init): Don't inflate the generic methods here.
27000 (mono_class_from_generic): Added `gboolean inflate_methods'
27001 argument. Inflate the methods here.
27003 * loader.c (mono_method_get_param_names): Ignore instances of
27004 generic types for the moment.
27006 * reflection.c (fixup_method): Added support for inflated methods.
27007 (mono_image_create_token): Use mono_image_get_methodref_token()
27008 for inflated methods.
27009 (mono_custom_attrs_from_param): Ignore instances of generic types
27011 (mono_reflection_bind_generic_parameters): New public function.
27012 Moved all the functionality from
27013 ves_icall_Type_BindGenericParameters() here and added support for
27015 (mono_reflection_define_generic_parameter): Initialize
27016 `klass->methods' here.
27018 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
27019 functionality into mono_reflection_define_generic_parameter().
27020 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
27021 TypeBuilder, return that TypeBuilder.
27023 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27025 * appdomain.c: removed mono_delegate_semaphore.
27028 (mono_thread_pool_add): moved hash table creation inside and the thread
27029 creation outside of the critical region.
27030 (mono_thread_pool_finish): removed obsolete code.
27031 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
27032 continue or exit the thread depending on the queue.
27034 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
27036 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
27037 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
27038 handle more bool marshalling options
27040 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
27042 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
27043 arrays of structs. Also add a more descriptive error message when
27044 a structure member is marshalled as LPArray.
27046 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
27048 * marshal.c (mono_marshal_get_native_wrapper): Add support for
27049 marshalling arrays of complex types. Fixes #29098. Also remove an
27050 usused and incomplete function.
27052 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27054 * gc.c: report heap_size - free_bytes as total memory allocated
27057 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
27059 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
27060 fix timezone handling problems on Windows.
27062 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
27063 asserts when the year is outside the range handled by ms the functions.
27065 * class.c (setup_interface_offsets): If the class is an interface,
27066 fill out its interface_offsets slot.
27068 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27070 * threadpool.c: mark threadpool threads as background.
27072 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
27074 * decimal.c - define DECINLINE to nothing if not using GCC
27076 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
27078 * assembly.c: More refcount fixes.
27080 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27082 * string-icalls.c: if we're not trimming, return the same string.
27083 When not splitting, don't create a new string.
27085 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27088 (mono_image_open): increment the ref_count inside the critical section.
27090 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
27092 * image.c (mono_image_open): Fix reference counting bug.
27094 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
27096 * marshal.c (mono_marshal_type_size) struct alignment changed for
27097 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
27098 64bits. Avoid leak in mono_marshal_get_native_wrapper when
27099 mono_lookup_pinvoke_call throws.
27101 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
27103 * reflection.c (mono_reflection_parse_type): Fix #49114.
27105 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
27106 temporary workaround for cygwin header problem.
27108 * object.c (mono_object_isinst): Synchronize this with the code
27109 generated by the JIT for casts.
27111 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
27113 * reflection.c (encode_type): Fix #38332.
27115 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
27117 * marshal.c (mono_marshal_method_from_wrapper): New function to return
27118 the original method from the wrapper method.
27120 2003-09-25 Martin Baulig <martin@ximian.com>
27122 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
27123 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
27124 (ves_icall_Type_get_IsGenericInstance): New interncall.
27126 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
27128 * object.c: fix cast warning in big endian code.
27130 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
27132 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
27134 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27136 * assembly.c: don't call check_env from mono_assembly_load. It's
27137 already done once in mono_assemblies_init and may cause headaches when
27138 multiple threads are loading assemblies.
27140 2003-09-19 Martin Baulig <martin@ximian.com>
27142 * reflection.c (mono_reflection_define_generic_parameter): Don't
27143 allocate `klass->methods', set `klass->flags' to
27144 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
27146 2003-09-18 Martin Baulig <martin@ximian.com>
27148 * class.c (mono_class_init): Don't create `class->methods' if it's
27149 already initialized.
27151 * metadata.c (mono_metadata_load_generic_params): Make this
27154 * reflection.c (mono_reflection_define_generic_parameter): Set
27155 parent class and interfaces from the constraints.
27157 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
27158 to keep this struct in sync with the declaration in TypeBuilder.cs.
27160 2003-09-17 Martin Baulig <martin@ximian.com>
27162 * metadata.h (MonoType): Replaced the data's `int type_param'
27163 field with `MonoGenericParam *generic_param'.
27164 (MonoGenericParam): Added `MonoClass *klass'.
27166 * class.c (mono_class_from_gen_param): Removed the
27167 `MonoImage *image' and `int type_num' arguments.
27169 * metadata.c (mono_metadata_parse_generic_param): New static
27170 method; creates a MonoGenericParam which just contains the index.
27171 (do_mono_metadata_parse_type): Call
27172 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
27175 * reflection.c (mono_image_typedef_or_ref): Generic type
27176 parameters may be in the same assembly, but never use a typedef
27178 (mono_reflection_define_generic_parameter): We're now creating a
27179 "real" class for the type parameter; it's now safe to call
27180 mono_class_from_mono_type() on the class'es type, it'll do the
27183 2003-09-16 Martin Baulig <martin@ximian.com>
27185 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
27186 `symfile->range_entry_size' and `symfile->class_entry_size' here;
27187 the `symfile' data structure must be fully initialized before it
27188 gets added to the table.
27190 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
27192 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
27194 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
27195 class init trampolines.
27197 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
27199 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
27200 to the built-in profiler to turn off time and allocation profiling
27203 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
27205 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
27208 * debug-helpers.c (mono_method_full_name): Print the wrapper type
27209 in human readable form.
27211 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
27213 * reflection.c icall.c: Fixed warnings.
27215 * image.c (load_class_names): Use a temporary hash table to hold the
27216 namespaces in order to avoid doing many string comparisons.
27218 * image.h: Fix typo.
27220 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
27221 Pass NULL instead of g_direct_equal to the GHashTable constructor
27222 since the NULL case is short-circuited inside g_hash_table_lookup,
27223 leading to better performance.
27225 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
27226 obtain the first custom attribute for a given index. Depends on the
27227 CustomAttribute table being sorted by the parent field.
27229 * reflection.c (mono_custom_attrs_from_index): Use the new function
27230 for better performance.
27232 2003-09-07 Martin Baulig <martin@ximian.com>
27234 * class.c (mono_class_init): If we're a generic instance, inflate
27235 all our methods instead of loading them from the image.
27236 (mono_class_from_generic): Set `class->methods = gklass->methods'.
27238 2003-09-07 Martin Baulig <martin@ximian.com>
27240 * mono-debug-debugger.c: Added support for constructors.
27242 2003-09-06 Martin Baulig <martin@ximian.com>
27244 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
27247 * reflection.c (mono_reflection_setup_generic_class): Call
27248 ensure_runtime_vtable() to create the vtable.
27250 2003-09-05 Martin Baulig <martin@ximian.com>
27252 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
27255 2003-09-04 Martin Baulig <martin@ximian.com>
27257 * reflection.c (mono_reflection_define_generic_parameter): Generic
27258 parameters start with zero.
27260 2003-09-04 Martin Baulig <martin@ximian.com>
27262 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27264 * reflection.h (MonoReflectionGenericParam): New typedef.
27265 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
27266 the generic parameters from the managed TypeBuilder.
27268 * reflection.c (mono_reflection_define_generic_parameter): New function.
27269 (mono_reflection_create_runtime_class): Encode generic parameters.
27270 (mono_reflection_setup_generic_class): New function; this is
27271 called after adding adding all generic params to the TypeBuilder.
27272 (encode_type): Added MONO_TYPE_VAR.
27274 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
27276 * class.h class.c (mono_class_needs_cctor_run): Moved this method
27279 * assembly.h assembly.c: Moved the AOT loading code into an assembly
27282 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
27284 * reflection.h reflection.c class.h class.c: Delete duplicate
27285 definition of mono_type_get_name () from reflection.c and export the
27288 * class.c: Class loading fixes from Bernie Solomon
27289 (bernard@ugsolutions.com).
27291 * reflection.c: Endianness fixes from Bernie Solomon
27292 (bernard@ugsolutions.com).
27294 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
27296 * assembly.h assembly.c: Define a file format version for AOT
27299 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
27301 * appdomain.h (MonoJitInfo): New field to determine whenever the
27302 code is domain neutral.
27304 2003-08-31 Miguel de Icaza <miguel@ximian.com>
27306 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
27308 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
27310 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
27311 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
27312 Avoid caching the result since strings must be domain specific. Fixes
27315 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
27317 * marshal.c (mono_marshal_init): Make this callable multiple times
27318 since it is hard to find a correct place to call it.
27320 * object.c (mono_runtime_class_init): Execute static constructors in
27321 the correct appdomain.
27323 * image.c (build_guid_table): Handle the case when multiple images have
27326 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27328 * icall.c: added a couple of icalls for System.Web.
27330 2003-08-28 Martin Baulig <martin@ximian.com>
27332 * icall.c (ves_icall_Type_BindGenericParameters): Use
27333 `klass->generic_inst' instead of `&klass->byval_arg' in the
27334 mono_type_get_object() call. The returned type must be
27335 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
27337 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
27341 * object.c (mono_class_proxy_vtable): Make it thread safe.
27343 * pedump.c: Fix warning.
27345 * object.c appdomain.h: Get rid of metadata_section.
27346 It is no longer needed and it was causing deadlocks with domain->lock.
27348 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
27350 2003-08-26 Martin Baulig <martin@ximian.com>
27352 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
27354 2003-08-26 Martin Baulig <martin@ximian.com>
27356 * pedump.c (main): Call mono_metadata_init(),
27357 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
27358 and mono_loader_init().
27360 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
27362 * loader.h: Add missing include to fix build.
27364 * image.h: mono_image_load_references is no more.
27366 * assembly.c: Reworked assembly loading to make it really thread safe.
27367 After these changes, the assembly returned by mono_assembly_open is
27368 fully initialized, i.e. all its references assemblies are loaded.
27370 * assembly.c (mono_image_load_references): Renamed to
27371 mono_assembly_load_references, and made private, since clients no
27372 longer need to call it.
27374 * class.c: Removed calls to mono_assembly_load_references, since it was
27375 a source of deadlocks.
27377 * loader.h loader.c class.h class.c: Protect data structures using a
27378 new lock, the loader lock.
27380 * class.c (mono_class_setup_vtable): Create temporary hash tables and
27381 GPtrArrays only when needed.
27383 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
27384 into empty structures by mcs. Fixes pinvoke7.cs.
27386 * domain.c (mono_init): Call a new initialization function.
27388 * appdomain.c (mono_runtime_init): Call the new initializer function
27389 of the marshal module.
27391 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
27392 inserted into empty structures by mcs. Fixes pinvoke7.cs.
27394 * marshal.h marshal.c: Added locks around the wrapper caches to make
27395 this module thread safe.
27397 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
27398 this argument. Fixes pinvoke1.exe.
27400 2003-08-25 Lluis Sanchez <lluis@ximian.com>
27402 * object.h: Added call_type field to MonoMethodMessage and the corresponding
27403 enumeration of values. Removed fields to store remote call output values in
27404 MonoAsyncResult. Not needed any more.
27405 * object.c: Initialize call_type and async_result fields in mono_message_init.
27406 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
27407 dispatching the message.
27408 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
27409 async call to finish. To do it use a message with EndInvoke call type.
27411 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
27413 * loader.h loader.c (mono_method_hash_marhal_info): New function which
27414 determines whenever a method has marshalling info.
27416 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27418 * assembly.c: fix the build on windows.
27420 2003-08-22 Lluis Sanchez <lluis@ximian.com>
27422 * object.cs: Fixed bug #47785.
27424 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
27426 * string-icalls.c (StringReplace): If their are no occurances of
27427 the old string found return a reference to the supplied
27428 string. This saves some memory and matches MS behavoir.
27430 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27432 * socket-io.c: fixed compilation for systems that define AF_INET6
27433 and don't define SOL_IP/SOL_IPV6.
27435 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
27437 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
27438 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
27440 * rawbuffer.c rawbuffer.h: Make this module thread safe.
27442 * domain.c: Make this module thread safe.
27444 * domain.c (mono_init): Call new initialization function.
27446 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
27447 reference types too. Fixes #38812.
27449 * image.c (mono_image_init): Fixed warnings.
27451 * class.c (mono_class_from_typeref): Handle assembly load failure
27454 * appdomain.c (add_assemblies_to_domain): Handle the case when
27455 the references of an assembly are not yet loaded.
27457 * metadata.c image.c assembly.c: Moved initialization of global
27458 variables to a separate function called at startup since lazy
27459 initialization of these variables is not thread safe.
27461 * image.c assembly.c: Made this module thread safe by adding locks in
27462 the appropriate places.
27464 * domain.c (mono_init): Call the new initialization functions of the
27467 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
27469 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
27470 make a direct call. It is proxy's work to make the call asynchronous.
27471 mono_delegate_end_invoke(): If the targe is a proxy, just collect
27473 * object.cs: mono_method_call_message_new(): read AsyncResult and
27474 state object from parameters list, if this info is requested.
27475 * object.h: Added fields to store remote call output values in
27476 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
27478 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27480 * object.h: add needed fields to MonoThread.
27481 * threads.c, threads.h: allow registering a function to cleanup data
27482 allocated per thread by the JIT.
27484 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
27486 * loader.h: portability fix by Bernie Solomon
27487 * <bernard@ugsolutions.com>.
27489 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
27491 * reflection.h reflection.c (mono_param_get_objects): Changed this to
27492 return a MonoArray. This simplifies the code and also ensures that
27493 the cache allways contains an object reference as a value.
27495 * icall.c (ves_icall_get_parameter_info): Simplified using the new
27498 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27500 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
27501 fixes a problem with byte ordering when getting the address family for
27504 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
27506 * .cvsignore: Added monosn.
27508 * reflection.h reflection.c loader.c: Added support for parameter
27509 marshalling to dynamically created types. Fixes #47295.
27511 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
27513 * rand.c: remove useless warnings.
27515 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
27517 * class.c: implemented ldtoken for methods and fieldrefs.
27519 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27521 * threadpool.c: when mono_async_invoke was called, no one took care of
27522 monitoring the queue. So if the method invoked took some time and we
27523 got new async invoke requests after 500 ms (the thread created waited
27524 that long in WaitForSingleObject), the new async invoke was not called
27525 until the previous one finished.
27527 This is fixed now. Thanks to Totte for helping with it.
27529 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27531 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
27533 2003-08-11 Martin Baulig <martin@ximian.com>
27535 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
27537 2003-08-06 Martin Baulig <martin@ximian.com>
27539 * mono-debug-debugger.c: Added support for static fields,
27540 properties and methods.
27542 2003-08-06 Martin Baulig <martin@ximian.com>
27544 * mono-debug-debugger.c: Don't store the MonoString's vtable to
27545 make this work for applications with multiple application domains.
27547 2003-08-04 Martin Baulig <martin@ximian.com>
27549 * mono-debug-debugger.c: Completely reworked the type support; the
27550 most important thing is that we're now just using one single
27551 `MonoType' instance per type.
27553 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
27555 * mono-endian.h, mono-endian.c, icall.c: Added icall
27556 ves_icall_System_Double_AssertEndianity to assert double word endianity
27557 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
27559 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27561 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
27562 support, icalls and fixes.
27564 2003-07-31 Miguel de Icaza <miguel@ximian.com>
27566 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
27567 classes that are a punctuation character in .NET is not the same a
27570 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
27572 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
27574 2003-07-29 Miguel de Icaza <miguel@ximian.com>
27576 * icall.c: Add new MemCopy internalcall.
27577 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
27578 Simplified code; It is not necessary to handle all the cases here,
27579 as the C# code takes care of it. Only handle the case of the name
27580 resource embedded into the assembly.
27582 Changed signature to return the data pointer and the size of the
27585 2003-07-26 Miguel de Icaza <miguel@ximian.com>
27587 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
27588 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
27590 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
27592 * socket-io.c: ignore EINTR error in select.
27594 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
27596 * class.h, class.c: removed unused subclasses field in MonoClass.
27598 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
27600 * icall.c: improve fix of get_base_definition(). If the parent class
27601 doesn't have the mehod, look at the parent of the parent.
27602 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
27603 to check if a parameter is an in or out parameter
27604 (PARAM_ATTRIBUTE_IN is not set by default).
27605 mono_method_return_message_restore(): Use mono_class_value_size to
27606 get the size of a value type. mono_type_stack_size (parameterType)
27607 does not return the correct value if parameterType is byRef.
27608 mono_load_remote_field(), mono_load_remote_field_new(),
27609 mono_store_remote_field(), mono_store_remote_field_new():
27610 raise exception if the remote call returns an exception.
27612 2003-07-28 Martin Baulig <martin@ximian.com>
27614 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
27615 method. This is a wrapper around mono_runtime_invoke() which
27616 boxes the instance object if neccessary.
27618 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27620 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
27621 metadata.h, row-indexes.h, verify.c: first cut of generics support.
27623 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27625 * icall.c: disable mcs bug workaround.
27627 2003-07-21 Miguel de Icaza <miguel@ximian.com>
27629 * object.c (mono_runtime_class_init): Take the metadata_section
27630 mutex before obtaining the domain mutex.
27632 * appdomain.h: Added definition of metadata_section mutex here.
27634 * object.c: define metadata_mutex here.
27636 2003-07-24 Ravi Pratap <ravi@ximian.com>
27638 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
27641 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
27643 * reflection.c: Fix bug #46669
27645 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27650 * object.h: fill in the type name for TypeLoadException.
27652 2003-07-23 Ravi Pratap <ravi@ximian.com>
27654 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
27655 relationship between TypeBuilders while compiling corlib) and bug
27656 45993 (Array types returned from the runtime while compiling
27657 corlib were from the loaded corlib).
27659 2003-07-22 Martin Baulig <martin@ximian.com>
27661 * mono-debug-debugger.c: Reworked the type support a bit more;
27662 distinguish between types and classes.
27664 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
27666 * icall.c: add IsArrayImpl icall.
27668 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
27670 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
27671 initializing real_size only once. Also fix bug #46602.
27673 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
27675 * object.c: Renamed mono_metadata_section to metadata_section.
27677 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
27679 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
27680 empty array if the type is an array. Fixed.
27681 ves_icall_MonoMethod_get_base_definition: if the base method
27682 is abstract, get the MethodInfo from the list of methods of
27684 * reflection.c: ParameterInfo.PositionImpl should be zero-based
27685 and it was 1-based. Fixed in mono_param_get_objects.
27687 2003-07-20 Martin Baulig <martin@ximian.com>
27689 * mono-debug.h: Set version number to 31.
27690 (mono_debug_init): Added `MonoDomain *' argument.
27692 * mono-debug-debugger.c: Reworked the type support; explicitly
27693 tell the debugger about builtin types; pass the `klass' address to
27696 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
27698 * image.c: Allow new metadata tables to be loaded without a
27699 warning. Also update the warning message to give the new constant value.
27701 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
27703 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
27704 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
27705 array type representation changes.
27707 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
27709 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
27710 on Environment.Exit () call.
27712 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
27714 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
27715 requires a matching corlib.
27717 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
27719 * Changelog: My editor decided to add a CR to each line. Sorry about that.
27720 Committed again without the CRs.
27722 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
27724 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
27725 getting it from the "this" socket instance. Did not work
27726 if the socket is a subclass of Socket.
27727 Also fixed bug #35371.
27729 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
27731 * metadata.c: fixed size for TypedByRef.
27732 * loader.c: when searching for a method, consider the vararg amrker.
27733 * unicode.c, decimal.c: constify some arrays.
27735 2003-07-15 Dick Porter <dick@ximian.com>
27737 * socket-io.c: Fixed compilation for gcc < 3.2.
27739 Fixed compilation for machines that don't have AF_INET6 (thanks to
27740 Bernie Solomon <bernard@ugsolutions.com> for that part.)
27742 Fixed compile warnings.
27744 Fixed formatting and line endings.
27746 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
27749 * socket-io.c: Added IPv6 support.
27751 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
27753 * class.c (mono_class_is_assignable_from): New function to implement
27754 the is_assignable_from logic. Used by mono_object_isinst,
27755 Type::IsAssignableFrom () and the interpreter.
27757 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
27758 Object, even interfaces.
27760 * object.c (mono_object_isinst): Implement in terms of
27761 is_assignable_from.
27763 * icall.c (ves_icall_type_is_assignable_from): New icall.
27765 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
27767 * domain.c (foreach_domain): fix compiler warning.
27769 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
27771 * image.c (load_metadata_ptrs): use g_strndup because strndup is
27772 not available on all plattforms
27774 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
27776 * image.h image.c: Store the metadata version string in MonoImage.
27777 * icall.c: New icall to retrieve the image version.
27778 * reflection.c (create_dynamic_image): Fill in the image version field
27779 * reflection.c (build_compressed_metadata): Use the image version
27780 from the image structure.
27782 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27784 * appdomain.c: modified comment.
27785 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
27786 That will be its last iteration when mono_gc_cleanup is called from
27787 mono_runtime_cleanup and before the domain is unloaded.
27791 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
27793 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
27796 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27798 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
27799 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
27800 Bernie Solomon <bernard@ugsolutions.com>.
27802 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
27804 * object.c, object.h: provide mono_object_new_fast() for faster
27805 allocation in some special cases.
27807 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
27809 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
27810 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
27812 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
27814 * threadpool.c: fix leaks.
27816 2003-07-01 Dick Porter <dick@ximian.com>
27818 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
27819 using MonoGHashTables. Fixes threadpool bug posted to list.
27821 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27823 * image.h, image.c: added support to load an assembly from a byte array.
27824 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
27825 assembly bundle support.
27827 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
27829 * threadpool.c (mono_thread_pool_add): keep a reference to the
27830 AsyncResult to prevent GC
27832 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
27834 * class.c: leak fix.
27836 2003-06-25 Dick Porter <dick@ximian.com>
27838 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
27839 for the async object, the WaitHandle object will close the handle.
27842 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
27844 * class.c: in mono_array_class_get (), lookup from the hash with the
27845 same type we insert: this works around a bug in
27846 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
27847 lluis. The real fix will have to wait for after the release.
27849 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
27851 * icall.c: fix memory leak when getting type members.
27853 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
27855 * reflection.c: added more pubtoken special cases.
27857 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
27859 * class.c: handle field offset correctly when class size
27860 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
27862 2003-06-20 Martin Baulig <martin@ximian.com>
27864 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
27867 2003-06-20 Martin Baulig <martin@ximian.com>
27869 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
27871 2003-06-20 Martin Baulig <martin@ximian.com>
27873 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
27874 just distinguish between variables in registers and variables at
27875 an offset relative to a register.
27877 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27879 * icall.c: #ifdef out latest changes until mcs is fixed.
27881 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27883 * icall.c: return members in metadata order.
27885 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
27887 * icall.c: avoid infinite loop in GetTimeZoneData.
27889 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
27891 * icall.c: added Marshal.Prelink/All icalls.
27893 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
27895 * object.c, object.h: fix warnings and do some overflow checking
27896 when creating arrays.
27898 2003-06-17 Dick Porter <dick@ximian.com>
27901 * file-io.c: File attributes need to be tweaked slightly when
27902 passed from the managed to the w32 world.
27904 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
27905 * profiler.h profiler-private.h profiler.c: Rework last patch
27906 based on suggestion by Paolo.
27908 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
27910 * profiler.h profiler-private.h profiler.c: Added infrastructure for
27911 instruction level coverage data collection.
27912 * profiler.h profiler.c (: Added new callback function which can be
27913 used by the profiler to limit which functions should have coverage
27915 * profiler.c (mono_profiler_load): Call g_module_build_path to
27916 generate the file name of the profiler library.
27918 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27920 * profiler.c, profiler.h, profiler-private.h: added basic block
27921 coverage profiling API.
27923 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
27925 * reflection.c (mono_reflection_create_runtime_class): Add support
27926 for events in dynamically generated code.
27928 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
27931 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
27933 * icall.c: when getting timezone info, return reasonable values if we
27934 can't get the actual data.
27936 2003-06-14 Dick Porter <dick@ximian.com>
27938 * threads.c (start_wrapper): Remove the reference to the thread
27939 object in the TLS data, so the thread object can be finalized.
27940 This won't be reached if the thread threw an uncaught exception,
27941 so those thread handles will stay referenced :-( (This is due to
27942 missing support for scanning thread-specific data in the Boehm GC
27943 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
27945 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
27947 * reflection.c: ensure streams and tables are first allocated with
27948 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
27950 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27952 * icall.c: fixed GetElementType for byrefs (bug# 44792).
27954 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
27956 * reflection.c (mono_reflection_create_runtime_class): Add support for
27957 properties to dynamically created classes.
27958 * reflection.c: Fix a few places where non-MonoObjects were inserted
27959 into the tokens hashtable.
27961 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
27963 * object.c: some support to handle out of memory exceptions.
27965 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
27967 * marshal.c (mono_marshal_get_native_wrapper): support reference
27970 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
27972 * object.h, object.c: more portability stuff from Bernie Solomon.
27973 Unexport mono_object_allocate(). Added mono_object_unbox ().
27974 Set exitcode when an unhandled exception is thrown.
27976 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
27978 * marshal.c (mono_marshal_get_native_wrapper): use custom
27979 marshaler for return types.
27981 2003-06-10 Dick Porter <dick@ximian.com>
27983 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
27984 ip_mreq is available
27986 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
27988 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
27989 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
27990 by Bernie Solomon <bernard@ugsolutions.com>.
27992 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
27994 * gc.c (mono_gc_init): Avoid error message on shutdown when
27995 GC_DONT_GC=1 is used.
27997 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
27998 New icall to return the GUID of a module.
28000 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28002 * class.c: ensure instance size always includes the parent's size
28003 even whem class size is set explicitly (fixes bug#44294).
28005 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28007 * profiler.h, profiler.c: made the simple profiler thread-safe,
28008 get more accurate timing info. Allow the loading of an
28009 externally-developed profiler module.
28011 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
28013 * marshal.c (mono_marshal_get_native_wrapper): improved
28014 class/byref arguments.
28015 (mono_marshal_get_native_wrapper): better string marshaling support.
28017 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
28019 * class.c: ensure .pack and .size are handled correctly and
28020 simplified layout of static fields.
28022 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
28025 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
28027 * loader.c (mono_lookup_pinvoke_call): look for modules in the
28028 current directory (fix bug 44008)
28030 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
28032 * marshal.c (mono_marshal_get_native_wrapper): started support for
28034 (mono_delegate_to_ftnptr): consider marshalling specifications
28036 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
28038 * reflection.c, reflection.h: emit custom marshal info.
28040 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28042 * object.c: free the GError.
28043 * icall.c: added CloseEvent_internal.
28045 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
28048 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
28050 * loader.c (mono_method_get_signature): Add support for dynamic
28053 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
28055 * reflection.c: fixed bug #43905.
28057 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28059 * class.c, domain.c, icall.c, metadata.h, object.h: support for
28060 handling TypedReference and ArgIterator.
28061 * loader.c, loader.h: added function to get signature at call site.
28063 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28065 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
28066 data readonly. Buglets and warning fixes. Some MethodSpec support.
28068 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28070 * class.h, class.c, object.c: remove relative numbering support.
28072 2003-05-26 Miguel de Icaza <miguel@ximian.com>
28074 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
28075 free the string, until we get a chance to fix Gtk#
28077 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28079 * marshal.c: revert last patch.
28081 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
28083 * icall.c: updates for new mono_class_vtable() not calling
28084 the type constructor anymore.
28086 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28088 * object.h, object.c: separate vtable creation from type
28089 initialization. Make running the .cctor thread safe.
28091 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
28093 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
28095 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
28097 * loader.c (mono_get_method): consider calling convention
28099 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
28101 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
28102 to return the invisible global type for a module.
28104 * reflection.c (mono_image_build_metadata): Emit global fields too.
28106 2003-05-20 Peter Williams <peterw@ximian.com>
28108 * loader.c (mono_lookup_internal_call): Add a few newlines.
28110 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
28112 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
28115 * appdomain.c (set_domain_search_path): Recalculate search path when
28116 AppDomainSetup.PrivateBinPath changes.
28118 * object.c (mono_class_compute_gc_descriptor): It turns out some
28119 parts of the class libs (like System.Thread) holds pointers to
28120 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
28121 to treat native int a pointer type here.
28123 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
28125 * appdomain.h, domain.c: add hashtable for jump target resolution.
28127 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
28129 * reflection.h reflection.c icall.c: Added new icalls
28130 GetManifestResourceInfoInternal, GetModulesInternal and support
28133 2003-05-16 Dick Porter <dick@ximian.com>
28137 * file-io.c: Implement System.IO.MonoIO::GetTempPath
28139 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
28141 * object.c: mono_store_remote_field: little fix to previous patch.
28143 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28145 * class.c: add constructors to array classes.
28146 * icall.c: special case array construction for InternalInvoke (),
28148 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
28150 * class.h class.c reflection.c object.c: Added support for field
28151 defaults in dynamically generated classes.
28153 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
28155 * reflection.c: properly encode charset for ddlimport.
28157 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
28159 * threads.c: allow compiling without GC.
28161 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28163 * appdomain.h, object.c, object.h, threads.c, threads.h: added
28164 handling of thread static data.
28166 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28168 * reflection.h, reflection.c: added mono_custom_attrs_free ().
28170 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
28172 * class.c (mono_array_class_get): always set the serializable flags
28173 (mono_array_class_get): always set the SEALED attribute for array types
28175 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
28177 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
28178 attributes (fix for bug 42021).
28180 2003-05-12 Dick Porter <dick@ximian.com>
28182 * gc.c: Don't run finalizers when the finalizer thread is
28183 finishing up, because the default domain has already been
28186 2003-05-11 Miguel de Icaza <miguel@ximian.com>
28188 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
28189 value is null, we should throw an exception. This is slightly
28190 different than the other conventions used for the constructor.
28192 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28194 * socket-io.c: fixed windows build.
28196 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28198 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
28200 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
28202 * object.c (mono_string_new_wrapper): Compatibility fix for MS
28205 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
28207 * class.c (mono_class_layout_fields): Add experimental GC aware
28208 auto layout facility. Requires class library changes to work correctly.
28210 (mono_class_setup_vtable): Avoid overriding explicit interface
28211 method implementations. Fixes iface3.exe test.
28213 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
28215 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
28216 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
28218 * metadata.h: Add new type classification macro which determines
28219 whenever the type holds an object reference.
28221 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
28223 * marshal.c (mono_marshal_get_native_wrapper): cleanups
28225 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
28227 * gc.c (finalizer_thread): Work around a GC bug.
28229 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
28231 * marshal.c (emit_struct_conv): allow unions
28233 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
28235 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
28237 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
28239 2003-05-06 Martin Baulig <martin@ximian.com>
28241 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
28243 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28246 (Select_internal): allow NULLs, don't create arrays if not needed.
28247 Coupled with Socket.cs changes.
28250 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
28251 register a finalizer for it that will close the semaphore handle. This
28252 fixes the leak and make Lupus' test run with > 4080 loops.
28254 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
28256 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
28257 Jerome Laban (bug #42287)
28259 2003-05-02 Martin Baulig <martin@ximian.com>
28261 * debug-mono-symfile.h
28262 (MonoSymbolFile): Moved declaration into mono-debug.h.
28263 (MonoDebugMethodJitInfo): Likewise.
28264 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
28266 (_mono_debug_address_from_il_offset): Take a
28267 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
28270 (MonoDebugDomainData): New struct.
28271 (mono_debug_get_domain_data): New function.
28272 (mono_debug_add_method): Take an additional `MonoDomain *'
28274 (mono_debug_source_location_from_address): Likewise.
28275 (mono_debug_il_offset_from_address): Likewise.
28276 (mono_debug_address_from_il_offset): Likewise.
28278 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
28280 * reflection.c: one more check for null type in custom attrs.
28282 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28284 * reflection.c: avoid warning (comparison is always false due to limited
28285 range of data type).
28287 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28289 * icall.c: throw an exception in Type.GetField if the argument 'name'
28292 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
28294 * reflection.c: fixed handling of enums in named arguments to custom
28295 attributes (bug #42123).
28297 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
28299 * reflection.c: use the right array element type and handle
28300 a null for a Type argument, too.
28302 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
28304 * reflection.c: handle arrays as arguments to custom attributes.
28306 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
28308 * reflection.c: handle a string value in a custom attr
28309 ctor that takes an object.
28311 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
28313 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
28316 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
28318 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
28320 2003-04-27 Martin Baulig <martin@ximian.com>
28322 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
28323 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
28324 MONO_DEBUGGER_EVENT_BREAKPOINT.
28325 (mono_breakpoint_trampoline_code): Removed.
28326 (mono_debugger_event_handler): The last argument is now a
28328 (mono_debugger_insert_breakpoint_full): Removed the
28329 `use_trampoline' argument.
28330 (mono_debugger_method_has_breakpoint): Likewise.
28331 (mono_debugger_trampoline_breakpoint_callback): Renamed to
28332 mono_debugger_breakpoint_callback(); take the method and
28333 breakpoint number as arguments.
28335 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
28337 * metadata.c: fix off by one when loading parameters attributes.
28339 2003-04-24 Martin Baulig <martin@ximian.com>
28341 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
28343 2003-04-24 Martin Baulig <martin@ximian.com>
28345 * mono-debug-debugger.c: Moved all code which interacts with the
28346 Mono Debugger here.
28348 * debug-mono-symfile.c: This code now just deals with the symbol
28349 file itself, the debugger code is now in mono-debug-debugger.c.
28351 2003-04-23 Martin Baulig <martin@ximian.com>
28353 * mono-debug.c (mono_debug_source_location_from_il_offset):
28354 New method; like mono_debug_source_location_from_address(), but
28355 takes an IL offset instead of a machine address.
28357 2003-04-23 Martin Baulig <martin@ximian.com>
28359 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
28360 `line' field; this is now computed by the debugger.
28362 2003-04-23 Martin Baulig <martin@ximian.com>
28364 * mono-debug.[ch]: New files. This is the new debugging interface.
28366 * mono-debug-debugger.[ch]: New files. Moved all code which
28367 interacts with the Mono Debugger here.
28369 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
28371 * domain.c (mono_init): initialize mono_defaults.monitor_class
28373 2003-04-21 Miguel de Icaza <miguel@ximian.com>
28375 * reflection.c (method_encode_code): Add a spicy exception to help
28376 future compiler authors.
28378 2003-04-21 Martin Baulig <martin@ximian.com>
28381 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
28382 Make this work with relative pathnames; g_filename_to_uri() needs
28383 an absolute filename.
28385 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
28387 * icall.c: Track name changes in Object and ValueType.
28389 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
28391 * metadata.c (mono_type_stack_size): size should be a multiple of
28394 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28397 (internal_domain_finalize): moved into mono_domain_finalize. No need
28398 to create another thread because the finalizers will be run in the
28401 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
28402 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
28403 to be run (MS does this too).
28405 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
28407 * object.c (mono_class_compute_gc_descriptor): Update comment.
28409 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
28411 * image.h: Add synchronized wrapper cache.
28413 * image.c (do_mono_image_open): Initialize cache.
28415 * reflection.c (create_dynamic_mono_image): Initialize cache.
28417 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28419 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
28420 ves_icall_System_Buffer_ByteLengthInternal.
28422 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28424 * reflection.c: setup klass->nested_in earlier. Allow
28425 a dash in the assembly name.
28427 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
28429 * metadata.c (mono_type_to_unmanaged): dont access
28430 type->data.klass for MONO_TYPE_OBJECT
28431 (mono_type_to_unmanaged): consider System.Delegate class
28433 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
28435 * class.c: just setup supertypes in the proper place instead of
28436 initializing the full element class for arrays.
28438 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
28440 * class.c: ensure the element class of arrays is initialized.
28441 Setup the supertype info for array classes, too.
28443 2003-04-14 Miguel de Icaza <miguel@ximian.com>
28445 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
28447 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28449 * Makefile.am: re-added -m option when running cygpath. This way,
28450 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
28452 * mono-config.c: same codepath for locating mono config file for WIN32
28454 * assembly.c: if mono_assembly_setrootdir is called, don't override
28457 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28459 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
28460 MONO_ASSEMBLIES variable.
28462 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
28464 * icall.c: added Assembly::GetNamespaces() icall.
28466 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28468 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
28470 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
28472 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
28473 * object.c: fixed bug in the construction of vtable for proxies
28475 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
28477 * object.c (mono_array_new): Mark mono_array_new as an icall.
28479 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28481 * class.c: fixed test for public method when overriding interfaces.
28484 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28486 * appdomain.h, domain.c: added mono_domain_foreach() to
28487 be able to access the currently loaded appdomains.
28488 * object.c: make string interning work across sppdomains.
28489 Mark some functions for use as icalls.
28491 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
28493 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
28495 * reflection.h reflection.c: Allocate long living data using
28496 GC_MALLOC_ATOMIC so the collector does not need to scan it.
28498 * reflection.c: Double the allocation size in streams instead of
28499 increasing it, to prevent unneccesary copying on large assemblies.
28501 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
28502 creation if the assembly does not have the Run flag set.
28504 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
28506 * class.h: avoid the C++ keywords in header files (Jerome Laban
28507 spotted and fixed this).
28509 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28512 (mono_unhandled_exception): fill in the arguments for the
28513 UnhandledException event. Only trigger that event for the default
28514 domain (as MS does).
28516 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
28518 * object.c: Improve typed allocation stuff based on suggestions from
28519 Paolo. Also turn it on if the GC library supports it.
28521 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
28523 * object.c object.h class.h: Added experimental typed allocation
28524 facility using the interfaces in gc_gcj.h.
28526 * os/gc_wrapper.h: Added new include files.
28528 2003-04-03 Martin Baulig <martin@ximian.com>
28530 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
28531 which is not yet enabled by default.
28533 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
28535 (mono_gc_lock, mono_gc_unlock): New static functions.
28537 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
28538 functions; stop/start the world for the garbage collector. This
28539 is using the windows API; we need to complete the SuspendThread()/
28540 ResumeThread() implementation in the io-layer to make this work on Unix.
28541 (mono_gc_push_all_stacks): New public function; tells the garbage
28542 collector about the stack pointers from all managed threads.
28544 2003-04-03 Martin Baulig <martin@ximian.com>
28546 * object.h (MonoThread): Added `gpointer stack_ptr'.
28548 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
28550 2003-04-03 Martin Baulig <martin@ximian.com>
28552 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
28554 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
28556 * reflection.c (typebuilder_setup_fields): Initialize field.first and
28559 2003-04-02 Miguel de Icaza <miguel@ximian.com>
28561 * loader.c (mono_lookup_internal_call): Report the corlib that is
28564 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
28566 * icall.c (ves_icall_type_GetTypeCode): fixed check for
28567 System.DBNull (it's class not valuetype).
28569 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28571 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
28572 if the array method was already assigned a token (fixes bug#40646).
28574 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
28576 * reflection.c (mono_reflection_get_type): Attempt type resolve even
28577 if no assembly is given.
28579 2003-04-01 Miguel de Icaza <miguel@ximian.com>
28581 * metadata.h: Added the new tables.
28583 * row-indexes.h: Added definitions for new tables.
28585 * metadata.c: Add schemas for new tables, and add support for
28586 computing the sizes of them.
28588 * class.c: Update for handling the new type cases.
28590 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
28592 * metadata.h (MONO_TYPE_IS_VOID): new macro
28594 2003-03-31 Martin Baulig <martin@ximian.com>
28596 * threads.h (MonoThreadCallbacks): Added `thread_created'.
28598 * threads.c (mono_thread_new_init): Call `thread_created' in the
28599 mono_thread_callbacks.
28601 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
28603 * loader.h: added marshalbyrefobject_class to mono_defaults
28604 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
28605 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
28606 generation of output parameters.
28607 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
28608 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
28609 contextbound and the target object belongs to the context of the caller.
28610 * object.h: added context and unwrapped_server variables in MonoRealProxy.
28611 * object.c: Implemented support for interfaces and abstract classes
28612 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
28613 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
28615 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
28617 * class.h class.c (mono_class_is_subclass_of): New function.
28619 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
28620 routines for most common case (calls from ArrayList::ToArray).
28622 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
28623 routine so programs which call Environment::Exit() can be profiled.
28625 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
28626 Added MONO_ARCH_SAVE_REGS.
28628 * icall.c (ves_icall_type_is_subtype_of): Use new function.
28630 2003-03-29 Miguel de Icaza <miguel@ximian.com>
28632 * blob.h: Add a couple of new MonoType types definitions.
28634 * tabledefs.h: Add a couple of new call convs.
28636 2003-03-27 Zoltan Varga <vargaz@freemail.h>
28638 * reflection.h (MonoReflectionDynamicAssembly): track changes in
28639 the layout of the class.
28641 * reflection.c (alloc_table): double the size on overflow to avoid
28642 unnecessary copying.
28644 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
28645 avoid filling out metadata tables and blobs. Also set mb->ilgen to
28646 null so it can be garbage collected.
28648 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
28650 * reflection.c (mono_reflection_get_type): Return the resolved type
28651 only if it is in the assembly we searched.
28653 * reflection.c (ensure_runtime_vtable): Initialize method slots.
28655 * class.c (mono_class_setup_vtable): Set the slot of the overriding
28658 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28661 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
28662 the right one is 'file:///blah', but MS allows it.
28664 (mono_assembly_open): allow 'file://blah'
28666 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
28668 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
28670 * socket-io.c: fixes bug #40310.
28672 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
28674 * reflection.c (mono_reflection_parse_type): handle deeply nested
28677 * reflection.c (mono_image_create_token): Use unique token values
28678 since they will be put into a hash table.
28680 * class.c (mono_class_setup_vtable): If a method occurs in more than
28681 one place in the vtable, and it gets overriden, then change the
28682 other occurances too.
28684 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
28685 object as return type.
28687 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
28689 * icall.c: Deleted "ToString" implementation for double and float
28690 because they are full implemented in managed code.
28692 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
28694 * reflection.c, reflection.h: implemented and exported functions
28695 to retrieve info about custom attributes.
28697 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28699 * appdomain.c: moved Uri handling to assembly.c
28700 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
28701 work when using a file Uri in *nix and windows.
28703 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
28704 GetReferencedAssemblies.
28706 2003-03-18 Dick Porter <dick@ximian.com>
28708 * icall.c: Rename a couple of internal calls
28710 * threads.c: Set the thread state to Stopped when a thread exits.
28713 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
28715 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
28718 * object.c (mono_class_vtable): fix warning.
28720 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
28722 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
28724 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
28726 (method_encode_clauses): Create exception info structures in the right
28728 (mono_reflection_setup_internal_class): Initialize supertypes field.
28730 * class.c object.c: Handle interfaces which implement other interfaces
28733 * class.h class.c: Move the supertypes array initialization code into
28734 a separate function so it can be used for dynamic types too. Also call
28735 it earlier, in mono_class_init(), since it can be used before the
28736 type is initialized.
28738 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28742 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
28747 * object.c: remove warnings.
28749 2003-03-13 Martin Baulig <martin@ximian.com>
28751 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
28752 (MonoDebugLexicalBlockEntry): New types.
28754 * debug-mono-symfile.c
28755 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
28757 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28759 * process.c: ret can be any non-zero value accroding to MS doc.
28761 2003-03-07 Miguel de Icaza <miguel@ximian.com>
28763 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
28764 fixing a warning for a miss-used prototype, would have cause
28765 random memory corruption.
28767 2003-03-07 Martin Baulig <martin@ximian.com>
28769 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
28770 getting really annoying ....
28772 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
28774 * reflection.c (fixup_method): added support for array methods.
28776 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
28778 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
28779 (pointed out by Michael Adams).
28781 2003-03-04 Dick Porter <dick@ximian.com>
28783 * icall.c: Temporarily reverted the Double and Single ToString()
28784 change, because it broke nunit.
28786 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
28788 * object.h, threads.h: make include files compatible with C++
28789 (patch by Jerome Laban <jlaban@wanadoo.fr>).
28791 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
28793 * icall.c: Erased ToString helper functions for Double and Single.
28794 Now, that implementations ar all in managed code (Double and Single
28797 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
28799 * appdomain.c: Added method for initializing the default context of
28800 a domain. Added internal call for getting the default context.
28801 * appdomain.h: Added context variable in MonoDomain struct.
28802 * domain.c: mono_domain_set also sets the default context of the domain
28803 * icall.c: Mapped internal method InternalGetDefaultContext.
28804 * object.c: mono_object_get_virtual_method returns always a remoting
28805 wrapper if the object is a transparent proxy.
28806 mono_runtime_invoke_array: when creating an object by calling the
28807 constructor, if the created object is a proxy, then the constructor should
28808 be called using the a remoting wrapper.
28810 2003-03-03 Dick Porter <dick@ximian.com>
28812 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
28813 variable so it compiles on solaris. Problem spotted by
28814 Christopher Taylor <ct@cs.clemson.edu>
28816 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28819 (get_info_from_assembly_name): don't leak value.
28822 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
28825 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
28827 * assembly.c: export mono_image_load_references ().
28828 * class.c: handle function pointers. mono_class_from_name() now
28829 supports nested type names directly.
28831 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
28833 * reflection.h reflection.c: Encode already created dynamic methods
28834 and fields correctly as a DEF instead of a REF.
28836 * reflection.c: Get rid of the force_ref argument to
28837 mono_image_typedef_or_ref since it was wrong in the first place.
28839 * string-icalls.c: add error checking to string constructors according
28842 * reflection.c: Emit types in the order their TypeBuilders were
28843 created. Previously, a new table index was assigned to each type before
28844 the tables were emitted. This was wrong because the signature blob
28845 might already refer to a type by its original table index.
28847 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
28849 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
28852 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28854 * Makefile.am: make assemblies dir have \ instead of / on windows.
28856 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
28858 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
28859 iterate over the NESTEDCLASS table using a linear search since the
28860 table is not guaranteed to be sorted by the secondary key.
28862 * class.c (mono_class_create_from_typedef): fixed up call to
28863 mono_metadata_nesting_typedef.
28865 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
28867 * marshal.c (mono_string_to_byvalstr): clear the memory as
28868 suggested by Jerome Laban <jlaban@wanadoo.fr>
28870 2003-02-26 Dick Porter <dick@ximian.com>
28872 * process.c: Cope with padding in .rsrc blocks
28874 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
28876 * metadata.h: reverted the filter_len change, it breaks reflection
28878 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
28880 * metadata.h: added a new field to store the filter_len
28883 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
28885 * reflection.c: handle custom attributes for types and members
28886 created with Reflection.Emit (bug#38422).
28888 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
28890 * reflection.c: define RTSpecialName automatically for constructors for
28891 compatibility with MS.NET.
28893 * reflection.c (mono_reflection_create_runtime_class): initialize
28894 nested_in field of dynamically created classes.
28896 2003-02-22 Martin Baulig <martin@ximian.com>
28898 * debug-mono-symfile.h: Incremented version number.
28900 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
28902 * object.h icall.c process.c: fix warnings.
28904 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
28906 * appdomain.h appdomain.c:
28907 (mono_domain_try_type_resolve): split the
28908 name_or_tb argument into a name and a tb argument.
28909 (mono_domain_has_type_resolve): new function to check whenever the
28910 application has registered a TypeResolve event handler.
28912 * icall.c reflection.h reflection.c: move the type resolve logic into
28913 mono_reflection_get_type () so it will be invoked when
28914 Assembly::GetType () is called.
28917 (mono_reflection_get_type): renamed to get_type_internal.
28918 (mono_reflection_get_type): fixed type name generation so it works
28919 for nested types too.
28920 (mono_reflection_get_type): call has_type_resolve () to avoid the
28921 costly type name generation if there is no resolve event handler.
28923 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
28925 * class.c, image.c: load exported types from file references.
28927 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
28929 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
28930 used to cache the managed methods used to create proxies and make
28931 remote invocation of methods.
28932 * class.h: Added in MonoVTable a flag to indicate that a class needs
28933 to be remotely created.
28934 * object.c: Modified the method mono_class_vtable(). It now initializes
28935 the remote flag of the vtable. Modified mono_object_new_specific(),
28936 so now it checks the remote flag.
28937 * icall.c: Added a couple of internal methods, one for enabling instance
28938 creation interception for a type, and one for creating objects bypassing
28941 2003-02-18 Martin Baulig <martin@ximian.com>
28943 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
28944 New interncall to get a method's metadata token.
28946 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
28947 New interncall for the debugger.
28949 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
28951 * class.c (mono_class_setup_vtable): allocate supertype array
28953 2003-02-18 Martin Baulig <martin@ximian.com>
28955 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
28957 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28960 (assembly_name_to_aname): jump over unknown properties (i've found
28961 something like: 'type, assembly, version=xxx, custom=null, public...',
28962 so now will ignore custom=null and still get the rest of the values).
28964 2003-02-17 Dick Porter <dick@ximian.com>
28966 * threads.c: Have Thread.Start() wait for a semaphore to signal
28967 that the thread has set up all its local data. This fixes bug
28968 34323, where Abort() raced the new thread's TLS data.
28970 Also removes the handle_store() call from start_wrapper, because
28971 threads are now always created suspended and there is no longer a
28972 race between the parent and child threads to store the info.
28974 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
28976 * image.c: explain the #- heap issue in a message, hopefully
28977 avoiding FAQs on mono-list.
28979 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28982 (GetEntryAssembly): if the domain has not invoked
28983 AppDomain.ExecuteAssembly yet, return the assembly of the default
28986 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
28988 * class.c (mono_ldtoken): make it work in dynamic assemblies.
28990 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
28992 * metadata.c, reflection.c: simple speedup to type hash
28995 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
28997 * image.c, image.h, class.c, assembly.c: move module loading
28998 to MonoImage. When loading metadata, consider alignemnet from
28999 the start of metadata, not from the metadata address in memory.
29001 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
29003 * reflection.c (mono_reflection_get_custom_attrs): Added support for
29004 AssemblyBuilder objects. Factored out custom attribute creation into
29005 a separate function.
29006 (create_custom_attr): new function to create custom attributes.
29008 2003-02-12 Miguel de Icaza <miguel@ximian.com>
29010 * Makefile.am: Got tired of typing the full pathname to pedump.
29011 Until there is another option, am installing this.
29013 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
29015 * class.c (class_compute_field_layout): always set field->parent
29016 (mono_ldtoken): use mono_defaults.fieldhandle_class;
29018 2003-02-11 Dick Porter <dick@ximian.com>
29021 * monitor.c: Rewrote Monitor, making lock much faster and
29022 Pulse/Wait work as specified. Also uses much fewer handles, and only
29023 creates them as needed.
29025 * exception.c: Added SynchronizationLockException
29027 * threads.c: Deleted old Monitor implementation. The new one is
29030 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
29032 * class.c: handled TypedReference type code. Set the correct size for
29033 class data. Setup interface_offsets for interface classes, too.
29035 2003-02-09 Martin Baulig <martin@ximian.com>
29037 * debug-mono-symfile.h: Reflect latest symbol writer changes.
29039 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
29041 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
29042 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
29043 * object.c: fixed mono_object_get_virtual_method () for interfaces.
29044 * verify.c: check for code that runs after the end of the method.
29046 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29048 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
29049 "System.Math::Round2".
29050 * sysmath.h: Added Floor, Round and Round2 definitions.
29051 * sysmath.c: Modified certain functions that were not 100% compliant
29052 with MS.NET (math precision) and added the implementation of Floor,
29055 2003-02-07 Martin Baulig <martin@ximian.com>
29057 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
29059 2003-02-07 Martin Baulig <martin@ximian.com>
29061 * debug-mono-symfile.c: Reflected latest symwriter changes.
29062 (mono_debug_create_mono_symbol_file): Removed.
29063 (mono_debug_open_mono_symbol_file): Take an argument which
29064 specifies whether to create a dynamic symbol file.
29066 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
29068 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
29070 2003-02-05 Martin Baulig <martin@ximian.com>
29072 * reflection.c (mono_image_build_metadata): Make this public,
29073 protect it against being called multiple times, don't create
29074 resources and don't build the compressed metadata here.
29075 (mono_image_create_pefile): Do this here.
29078 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
29080 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29082 * socket-io.c: fixed bug #36322.
29084 2003-02-06 Piers Haken <piersh@friskit.com>
29088 * debug-mono-symfile.c:
29094 * socket-io.c: warning cleanups
29096 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
29098 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
29099 function. works like remoting invoke, but does a check for the Proxy first.
29101 2003-02-05 Miguel de Icaza <miguel@ximian.com>
29103 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
29105 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
29107 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
29109 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
29110 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
29112 * object.c (mono_store_remote_field_new): used by the new jit
29113 instead of mono_store_remote_field
29114 (mono_load_remote_field_new): used by the new jit
29115 instead of mono_load_remote_field
29117 2003-02-05 Patrik Torstensson
29119 * appdomain.c: changed unload to take the domain id instead
29122 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
29125 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29127 * appdomain.c: don't look for assemblies in ApplicationBase if
29128 PrivateBinPathProbe is set.
29130 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29132 * object.c: make the first argument in main_args contain the absolute
29133 path to the assembly. Fixes bug #37511.
29135 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29137 * icall.c: get correct UTC offset for countries not using daylight
29138 time saving. Fixes bug #30030.
29140 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29142 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
29143 and 1 are the family).
29145 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
29147 * icall.c (ves_icall_InternalExecute): removed wrong assertion
29149 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
29151 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
29153 * reflection.c: added support for SignatureHelper tokens, which is
29154 needed by the Calli opcode.
29156 * reflection.h: track changes to SignatureHelper class.
29158 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
29160 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29162 * appdomain.c: fixed loading assemblies from PrivateBinPath.
29164 2003-02-03 Patrik Torstensson
29165 * appdomain.[c|h], domain.c :
29166 - Added support for getting a domain via domain id
29167 - Support for setting and getting domain from System.AppDomain
29168 (used in cross appdomain channel)
29169 - Added support for get/set for a MonoAppContext on a thread
29170 (Context class in System.Runtime.Remoting.Contexts),
29171 - Removed hack in Get/SetData and ExecuteAssembly.
29173 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
29174 the managed world to get control when a proxy is created.
29176 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
29178 2003-02-03 Miguel de Icaza <miguel@ximian.com>
29181 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29182 Populate the codebase field as well.
29184 2003-02-02 Martin Baulig <martin@ximian.com>
29186 * debug-mono-symfile.c
29187 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
29188 (mono_debug_symfile_add_method): Allow interncalls.
29190 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29192 * icall.c: throw parse exception if strtod fails or the string is empty.
29194 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
29196 * marshal.c: handle object type separately from defined
29199 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
29201 * marshal.c: handle NATIVE_LPSTR for strings when it's
29202 explicitly specified.
29204 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
29206 * reflection.c, reflection.h, icall.c: setup the reflection
29207 handle cache for ModuleBuilders and AssemblyBuilders.
29209 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
29211 * reflection.c (reflection_methodbuilder_to_mono_method): set
29214 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29216 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
29218 2003-01-29 Dick Porter <dick@ximian.com>
29220 * threads.c: No need for the fake_thread kludge now that Thread
29221 doesn't run a class constructor
29223 2003-01-29 Dick Porter <dick@ximian.com>
29225 * threads.c: Use g_direct_hash instead of the rather bogus
29228 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
29230 * marshal.c (mono_marshal_get_native_wrapper): add check for null
29231 (fix pinvoke12.exe)
29232 (mono_marshal_get_struct_to_ptr): generate valid IL code
29233 (mono_marshal_get_ptr_to_struct): generate valid IL code
29234 (*): correctly set sig->pinvoke, we need to memdup the signature
29237 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29239 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
29240 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
29242 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29244 * profiler.c: provide more callers information.
29246 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
29248 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
29250 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
29252 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
29254 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29256 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
29257 exception instead of going into an infinite loop on dates which it
29260 * string-icalls.c (ves_icall_System_String_get_Chars): raise
29261 out-of-range exception if needed.
29263 * class.c (mono_class_setup_vtable): allow a virtual method to provide
29264 an implementation for an interface method and to override an inherited
29265 method at the same time.
29266 Imagine a scenario when a virtual method is used to override a
29267 virtual abstract method in a parent class, and this same method
29268 provides an implementation for an method inherited from an interface.
29269 In this case, the interface resolution code will set im->slot, which
29270 means that the virtual method override pass will skip this method
29271 which means a pointer to the abstract method inherited from the parent
29272 will remain in the vtable of this non-abstract class.
29274 * class.c: (mono_class_setup_vtable): continue search for a real
29275 method if only an abstract method is found.
29277 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29279 * reflection.c: add size to encoding for ByValStr and ByValArray
29280 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
29282 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29284 * class.c (mono_class_setup_vtable): pass the override info as an
29287 * class.c (mono_class_setup_vtable): set the slot of overriding methods
29290 * reflection.c (ensure_runtime_vtable); add support for method
29293 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29295 * reflection.c (resolution_scope_from_image): Hack to work to work with
29296 dynamic assemblies.
29298 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
29299 added a 'force_ref' argument to force this function to allways return
29300 a TypeRef. This is needed by mono_image_get_memberref_token ().
29302 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29304 * reflection.c (mono_image_get_type_info): interfaces really don't have
29307 * reflection.c (mono_image_basic_init): fill out missing fields of
29310 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
29311 dynamic assemblies. This is required so dynamic assemblies show up in
29312 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
29313 Type::GetType() etc. This is consistent with MS behaviour.
29315 * image.c image.h reflection.c: add newly created classes to the name
29316 cache so mono_class_get () will find them.
29318 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29320 First part of changes to get IKVM.NET running under mono.
29322 * appdomain.h, appdomain.c: added new function
29323 mono_domain_try_type_resolve() which will emit TypeResolve events.
29324 This function will call AppDomain::DoTypeResolve to do the actual work.
29326 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
29327 moved existing code dealing with dynamic tokens to a new function
29328 called mono_reflection_lookup_dynamic_token (). This function will
29329 raise TypeResolve events when appropriate. Since reflection.c is not
29330 part of libmetadata, a new hook function called
29331 mono_lookup_dynamic_token() is added to class.c which will call this.
29333 * assembly.h assembly.c: make the invoke_load_hook function public,
29334 so it can be called for dynamic assemblies.
29336 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
29338 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
29341 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
29342 MonoGHashTable, since it contains pointers to objects which the GC
29345 * assembly.c (search_loaded): remove unused variable.
29347 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
29349 * object.c: fixed issue exposed by gcc-generated IL programs
29350 that use RVA data for pointers.
29352 2003-01-25 Martin Baulig <martin@ximian.com>
29354 * threads.c (start_wrapper): Moved the initialization of
29355 `start_func' above the mono_new_thread_init() call to which we
29356 pass it as argument.
29358 2003-01-24 Martin Baulig <martin@ximian.com>
29360 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
29361 the MonoThread pointer.
29363 2003-01-21 Miguel de Icaza <miguel@ximian.com>
29365 * icall.c: Rename `PowImpl' to Pow.
29367 2003-01-23 Dick Porter <dick@ximian.com>
29369 * threads.c (start_wrapper): Create a Thread object if needed, so
29370 the Main() thread can do the class initialisation in a subthread
29371 that has been set up to allow managed code execution.
29373 Pass the thread ID instead of the MonoThread pointer to the thread
29374 start and attach callbacks. This change is required, because the
29375 jit thread start callback must be called _before_ the Thread
29376 object can be created.
29378 (mono_thread_init): Removed much object creation code that is no
29379 longer needed. No managed code is called from here now.
29381 * object.c (mono_runtime_exec_managed_code): Create a subthread
29382 for Main, and call back to the runtime to use it.
29383 Set the exit code when Main exits.
29385 * gc.c: Make sure domain finalisation happens in a subthread.
29386 Re-enable threaded GC, fixing bug 31333 (again).
29388 * environment.c: System.Environment internall calls (so far just
29389 ExitCode is here, the others are still in icall.c)
29391 * appdomain.c (mono_runtime_cleanup): All threads running managed
29392 code should have finished before mono_runtime_cleanup() is
29393 reached, so no need to clean up threads.
29395 2003-01-22 Martin Baulig <martin@ximian.com>
29397 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
29398 `gpointer func' arguments.
29399 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
29400 but added `MonoThread *thread' argument.
29401 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
29403 * threads.c (mono_new_thread_init): Added `gpointer func' argument
29404 and pass it to the mono_thread_start_cb callback.
29405 (mono_install_thread_callbacks): New public function to install a
29406 set of callbacks which are set by the debugger.
29407 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
29409 2003-01-22 Martin Baulig <martin@ximian.com>
29411 * Makefile.am: Install debug-mono-symfile.h.
29413 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
29415 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
29417 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
29419 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
29420 * class.c (mono_ptr_class_get): correctly set access levels of pointers
29421 (mono_array_class_get): correctly set access levels of arrays
29423 2003-01-20 Patrik Torstensson
29424 * image.h (MonoAssemblyName): changed major, minor, build, revision
29425 from signed to unsigned.
29427 2003-01-20 sean kasun <skasun@azstarnet.com>
29429 * reflection.c (load_cattr_value): Now this handles
29430 MONO_TYPE_SZARRAY. Fixes bug #35629
29432 2003-01-20 Miguel de Icaza <miguel@ximian.com>
29434 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
29437 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29439 * decimal.c: fixed bug #26056.
29441 2003-01-17 Martin Baulig <martin@ximian.com>
29443 * gc.c: Raise an ExecutionEngineException instead of using g_error().
29445 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29448 (mono_get_exception_type_initialization): new function.
29450 * object.c: throw a TypeInitializationException when an exception is
29451 thrown invoking the class constructor.
29453 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29455 * reflection.c: fixed attribute reading.
29457 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29460 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
29461 provided, look for the type in the calling assembly and then in
29462 mscorlib; if the assembly name is provided, only try that one.
29464 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
29466 * object.c: register the vtable before there is a chance it's
29467 queried again recursively.
29469 2003-01-13 Duncan Mak <duncan@ximian.com>
29471 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
29474 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
29476 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
29478 2003-01-11 Martin Baulig <martin@ximian.com>
29480 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
29481 this to 20 for the release.
29483 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
29485 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
29487 * loader.c (mono_method_get_marshal_info): bug fix
29489 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
29490 structures with explicit layout
29492 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
29494 * profiler.c: made the output more readable (and sorted).
29495 Added caller information for the allocation profiler.
29497 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
29499 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
29501 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29503 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
29504 to get value types.
29506 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
29508 * object.c, profiler.h, profiler.c, profiler-private.h:
29509 Added object allocation profiler.
29511 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
29513 * reflection.h, reflection.c: handle global methods.
29514 Compress blob entries.
29516 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
29518 * marshal.c: fix compilation.
29520 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
29522 * loader.c (mono_method_get_marshal_info): impl.
29524 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
29526 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29528 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
29529 for reference types.
29531 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
29533 * loader.c: fixed off by one error in loaded parameter names.
29535 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
29537 * marshal.c (mono_marshal_get_icall_wrapper): like
29538 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
29539 instead of a MonoMethod.
29541 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29543 * decimal.c: fixed bug #36537.
29545 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
29547 * marshal.c: throw a missing method exception if a
29548 P/Invoke method is not found.
29550 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
29552 * icall.c: allow a null this for constructors.
29554 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
29556 * icall.c: raise the proper exceptions if the arguments to the
29557 internal Invoke are incorrect.
29559 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
29561 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
29563 2003-01-03 Martin Baulig <martin@ximian.com>
29565 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
29567 2002-12-31 Martin Baulig <martin@ximian.com>
29569 * debug-mono-symfile.c: Completely rewrote the type section.
29570 Instead of using individual malloc()ed fields, we use one big
29571 continuous memory area and offsets into this area.
29572 See the comments in the source code for details.
29574 2002-12-30 Martin Baulig <martin@ximian.com>
29576 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
29578 2002-12-30 Martin Baulig <martin@ximian.com>
29580 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
29581 line number table in this data blob instead of using an external
29584 2002-12-28 Martin Baulig <martin@ximian.com>
29586 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
29588 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
29590 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
29591 as a boxed return type.
29593 2002-12-21 Miguel de Icaza <miguel@ximian.com>
29596 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
29597 g_build_filename to properly get separators on the filename created.
29599 * object.h: Small change, introduce MonoMarshalByRefObject to
29600 track the layout of that structure in the C# universe as we make
29603 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
29605 * object.c: removed assert to allow static fields on interfaces.
29606 * loader.c: a TypeSpec may be used for any type, not just arrays.
29608 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29610 * class.c, class.h: added mono_class_array_element_size ().
29611 Ignore static methods in interfaces.
29613 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29615 * threads.c: fixed the build under cygwin.
29617 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
29619 * reflection.c: handle nullref constants. Allocate keys for
29620 reflection handles with the GC.
29622 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29624 * threads.c, threads.h: added mono_thread_get_abort_signal()
29625 to get a suitable signal for thread abort.
29627 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29629 * metadata.c: fix handling of ExportedType table.
29631 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29633 * icall.c: added WriteWindowsDebugString internal call.
29635 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29637 * reflection.h: added fields to match C# implementation.
29639 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29641 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
29643 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
29645 * gc.h, gc-internal.h: Rename header for GC internal calls to
29646 gc-internal.h from gc.h as to not clash with Boehm GC having its
29647 header installed as <gc.h> in outside include paths.
29648 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
29649 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
29651 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29653 * icall.c: assign minor, build and revision in FillName.
29655 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
29657 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
29658 Added support for running code generated by Reflection.Emit.
29660 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29662 * appdomain.c: check for NULL argument in LoadFrom.
29664 2002-12-10 Dick Porter <dick@ximian.com>
29666 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
29668 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29670 * appdomain.c: fix buglet when building exe file name. Handle full
29671 assembly name (needed after latest changes to AssemblyName).
29673 (mono_image_close): free some hashtables.
29675 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
29677 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
29678 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
29679 on some systems (redhat 7.3)
29681 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
29683 * threads.c: delete the critical section of a sync block,
29684 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
29686 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
29688 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
29690 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29692 * appdomain.[ch]: handle the assembly preload event to try loading the
29693 assemblies using the paths we have in the current domain.
29695 * assembly.[ch]: created an assembly preload hook that is called to try
29696 loading the assembly by other means that the ones provided here.
29698 * domain.c: initialize the domain search path.
29700 From now on, assemblies (TODO: except corlib and System) are loaded
29701 according to these rules when using mono_assembly_load ():
29703 1. It tries to load the assembly from the ApplicationBase
29704 of the current domain appending .dll and .exe (TODO: have to
29705 try loading from name/name.dll and name/name.exe).
29707 2. It tries the search path specified in PrivateBinPath for the
29708 current domain (if any).
29710 3. Previous behavior.
29712 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
29714 * icall.c: implemented GetInterfaceMap() related icall.
29715 * domain.c, loader.h: load MethodInfo in mono_defaults.
29717 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
29719 * gc.c: disable the finalizer thread for now, untill all the issues
29720 with it are resolved.
29722 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29724 * string-icalls.c: handle embedded nulls in string ctor when the
29725 length is specified.
29727 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
29729 * class.c: look for explicit interface implementation in parent
29732 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
29734 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
29736 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
29738 * gc.c: protect handles with a critical section.
29740 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29743 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
29744 parameters. If no assembly specified, try getting the type from all
29745 the assemblies in the current domain, else, load the assembly and get
29748 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29750 * marshal.c: applied patch from Aleksey Demakov that fixes
29751 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
29753 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29755 * icall.c: fixed get_location.
29757 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
29759 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
29760 declarations to make it work with older gcc.
29762 * loader.c (mono_get_method): set signature->pinvoke for native calls
29764 2002-11-20 Dick Porter <dick@ximian.com>
29766 * threads.c (mono_thread_init): Set the main thread's handle
29768 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
29770 * gc.c: allow compilation without GC support. Changed to match the
29773 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29775 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
29777 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
29779 * reflection.c: set a public key token on the core assemblies.
29781 2002-11-18 Dick Porter <dick@ximian.com>
29783 * threads.c: Split out some thread initialisation so that other
29784 files can set the start callback function.
29786 * gc.c: Run finalisers in a separate thread, to avoid stack
29787 overflow. Fixes bug 31333.
29789 * appdomain.c: Set up GC finalisation thread.
29793 * domain.c: Use gc.h macros for GC_malloc
29795 2002-11-15 Dick Porter <dick@ximian.com>
29799 * appdomain.c: Removed mono_runtime_init_with_attach(),
29800 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
29801 merging the extra parameter with the existing function. Removed
29802 unneeded code in mono_thread_attach().
29804 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
29806 * image.c (mono_image_loaded_by_guid): a method to get loaded
29808 (load_metadata_ptrs): we store the guid as string.
29810 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
29812 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
29814 * metadata.c (mono_guid_to_string): imported method form Zoltan
29815 Varga (slightly modified)
29817 * assembly.c (mono_assembly_open): load precompiled code
29819 * loader.h (MonoMethod): we store the method token for use in the
29822 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29824 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
29825 the hook function called when an assembly is loaded.
29827 * domain.c: Modified file.
29828 (mono_domain_assembly_load): removed hash table insertion of assemblies.
29832 2002-11-07 Miguel de Icaza <miguel@ximian.com>
29834 * reflection.c: Map PEFileKind to the value expected by the WinNT
29837 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29839 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
29840 Read until the buffer is filled completely.
29842 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29844 * icall.c: implemented MonoType.InternalGetEvent ().
29846 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29848 * appdomain.c: implemented InitAppDomainSetup. Delayed
29849 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
29850 the entry_assembly.
29852 * assembly.c: base_dir is now an absolute path ending with
29855 * icall.c: modified get_location according to the above changes.
29857 * object.c: init AppDomain.SetupInformation for the default domain after
29858 we have the entry assembly.
29860 * domain.c: when unloading a domain, setup = NULL.
29862 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
29864 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
29866 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
29868 * object.h, object.c: introduced mono_object_get_virtual_method ()
29869 to lookup the method invoked on an object when a callvirt is done on
29871 * icall.c: make MethodInfo::Invoke() always do a virtual call.
29873 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29875 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
29876 current domain when loaded an assembly and failed to load it.
29878 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
29880 2002-10-31 Dick Porter <dick@ximian.com>
29884 * file-io.c: Return the error status in a parameter, as the
29885 GetLastError() value has long since been blown away if we try and
29886 look it up in a subsequent internal call invocation. Delete the
29887 GetLastError() internal call, because it's useless.
29889 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
29891 * class.[ch]: added cast_class to fix bug 29517
29893 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
29895 * marshal.c: create valid IL code in the filter clause:
29896 the new JIT is less forgiving:-)
29898 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29900 * icall.c: removed get_property internal call.
29902 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
29904 * appdomain.h domain.c: Added an ID to appdomains.
29906 * threads.c threads.h icall.c: Implement icall
29907 Thread:GetDomainID(), and remove unused icall
29908 CurrentThreadDomain_internal.
29910 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29912 * icall.c: Don't recurse through the base types in GetConstructor.
29915 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
29917 * mempool.h, mempool.c: added mono_mempool_empty() and
29918 mono_mempool_stats().
29920 2002-10-23 Dick Porter <dick@ximian.com>
29924 * icall.c: Added MonoIO.GetFileType internal call
29926 2002-10-17 Dick Porter <dick@ximian.com>
29928 * appdomain.c (mono_runtime_cleanup): Don't signal the async
29929 delegate semaphore before waiting for all threads to finish,
29930 because new threads can also call async delegates. Fixes bug
29933 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
29934 of 3 seconds, in case another async job is queued. (This part is
29935 needed because the bug fix reintroduced the 3s exit lag.) This
29936 makes the mono_runtime_shutdown flag superfluous.
29938 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
29940 * reflection.c: include ehader size in method section headers.
29941 Really check for suplicated modules entries.
29943 2002-10-17 Martin Baulig <martin@gnome.org>
29945 * debug-mono-symfile.c: Added back support for locals.
29947 2002-10-14 Martin Baulig <martin@gnome.org>
29949 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
29952 2002-10-14 Martin Baulig <martin@gnome.org>
29954 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
29955 mono_class_get() instead of looking in the class cache.
29957 2002-10-13 Martin Baulig <martin@gnome.org>
29959 * debug-mono-symfile.c: Set version number to 28, include the
29960 signature in method names.
29962 2002-10-13 Martin Baulig <martin@gnome.org>
29964 * debug-mono-symfile.h: Set version number to 27.
29966 2002-10-11 Martin Baulig <martin@gnome.org>
29968 * gc.c: Don't register/unregister NULL pointers as disappearing links.
29970 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
29972 * metadata.c, metadata.h: added helper function to allocate signatures.
29974 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29976 * icall.c: added internal call to get the location of machine.config.
29978 2002-10-08 Martin Baulig <martin@gnome.org>
29980 * debug-mono-symfile.c: Ignore classes with a pending init for the
29983 2002-10-03 Dick Porter <dick@ximian.com>
29985 * threads.c: Freebsd pthread_t is a pointer
29987 2002-10-03 Dick Porter <dick@ximian.com>
29989 * socket-io.c: Implemented GetHostName_internal
29991 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29994 (mono_config_parse_file): don't leak the text.
29996 2002-10-02 Martin Baulig <martin@gnome.org>
29998 * debug-mono-symfile.c: Added support for methods.
30000 2002-10-01 Martin Baulig <martin@gnome.org>
30002 * debug-mono-symfile.c: Don't emit methods and line numbers for
30003 the dynamic symbol file, just write the type table. We can easily
30004 have an external helper program which creates a symbol file for an
30007 2002-10-01 Dick Porter <dick@ximian.com>
30009 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
30010 Only add the handle to the cleanup array when we're about to
30011 launch the thread. Bug 31425 deadlocked when the test was run on
30014 2002-10-01 Martin Baulig <martin@gnome.org>
30016 * debug-mono-symfile.c: Added support for properties.
30018 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30020 * reflection.c: unaligned store fix from Mark Crichton
30021 <crichton@gimp.org>.
30023 2002-09-27 Martin Baulig <martin@gnome.org>
30025 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
30028 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
30030 * assembly.h, assembly.c: use a sane API to hook into the assembly
30031 loading process instead of a useless special-purpouse hack
30032 (ngen needs a hook, too, for example).
30034 2002-09-27 Dick Porter <dick@ximian.com>
30036 * threads.c (mono_thread_init): Call GetCurrentProcess() so
30037 io-layer can set up some process handle info. Not needed on w32,
30038 but doesn't hurt either.
30040 * process.c: Pass the program name in the second parameter to
30041 CreateProcess, so the path is searched. Include the working
30042 directory. Implemented process name, process enumeration, and some
30043 process detail internal calls.
30045 * icall.c: Added internal calls for process lookup, and some
30048 2002-09-26 Martin Baulig <martin@gnome.org>
30050 * assembly.c (mono_install_open_assembly_hook): New global
30051 function to install a function to be invoked each time a new
30052 assembly is loaded.
30053 (mono_assembly_open): Run this callback function if set.
30055 * debug-mono-symfile.c: Put back line numbers for the dynamic
30056 symbol file and also record the .il file as source file. This
30057 allows us to install the temporary symbol file as `file.dbg' just
30058 like a compiler-generated one.
30060 2002-09-26 Nick Zigarovich <nick@chemlab.org>
30062 * Corrected typo in gc.c (BOHEM vs BOEHM).
30064 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30066 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
30067 GetProperties. Also avoid calling g_slist_length in GetProperties and
30070 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30072 * reflection.c: avoid unaligned stores (bug spotted by
30073 Mark Crichton <crichton@gimp.org>).
30075 2002-09-25 Martin Baulig <martin@gnome.org>
30077 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
30078 instead of guint64 for addresses and added prologue/epilogue info.
30080 2002-09-25 Martin Baulig <martin@gnome.org>
30082 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
30083 store line number info. For the dynamic symbol file, we only need
30084 to provide the JIT generated dynamic line number info for the dynamic
30087 2002-09-25 Martin Baulig <martin@gnome.org>
30089 * debug-mono-symfile.h: Incremented version number.
30091 2002-09-24 Martin Baulig <martin@gnome.org>
30093 * class.c (mono_debugger_class_init_func): New global function
30095 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
30098 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
30099 function. This is called via the mono_debugger_class_init_func
30100 hook to add all types to the dynamic type table.
30101 (ves_icall_MonoDebugger_GetType): New interncall to get a class
30102 from its metadata token.
30104 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
30105 New interncall for the debugger.
30107 2002-09-24 Nick Drochak <ndrochak@gol.com>
30109 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
30110 before using it in case it is null.
30112 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30114 * metadata.c: allow custom modifiers in local var signatures
30115 (bug spotted by Zoltan Varga).
30117 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
30119 * class.c: deal with the <Module> class that may have a NULL vtable.
30120 Eliminate warnings.
30122 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30124 * image.c, image.h: more strong name helpers.
30125 * monosn.c: more work: convert pem keys to cryptoapi format.
30127 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30129 * string-icalls.c: speedup IndexOf.
30131 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30133 * icall.c: updates from Zoltan.2.Varga@nokia.com.
30135 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30137 * icall.c: cleanup: use mono_object_domain ().
30139 2002-09-23 Martin Baulig <martin@gnome.org>
30141 * debug-mono-symfile.c: Improved type support.
30143 2002-09-22 Martin Baulig <martin@gnome.org>
30145 * debug-mono-symfile.c: Added support for reference types and strings.
30147 2002-09-22 Martin Baulig <martin@gnome.org>
30149 * debug-mono-symfile.c: Started to work on the type table.
30151 2002-09-21 Martin Baulig <martin@gnome.org>
30153 * debug-mono-symfile.c: Largely reworked the symbol table format.
30154 The symbol table is now incrementally updated each time a new
30155 method is added. We're now also using our own magic and version
30156 so that you don't need to recompile all your classes if the
30157 dynamic table changes.
30158 (mono_debug_update_mono_symbol_file): Removed.
30159 (mono_debug_symfile_add_method): New function to add a method.
30161 2002-09-21 Martin Baulig <martin@gnome.org>
30164 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
30167 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
30168 New interncall to get a method from its metadata token.
30170 2002-09-21 Martin Baulig <martin@gnome.org>
30172 * debug-mono-symfile.c: Create type table.
30174 2002-09-20 Martin Baulig <martin@gnome.org>
30176 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
30178 2002-09-20 Martin Baulig <martin@gnome.org>
30180 * debug-mono-symfile.c: Provide information about params and locals.
30182 2002-09-20 Martin Baulig <martin@gnome.org>
30184 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
30187 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
30188 interncall to get a method from its metadata token.
30190 2002-09-20 Martin Baulig <martin@gnome.org>
30192 * debug-mono-symfile.c: Added a few checks for method->header
30193 being non-NULL. This should never happen, but for the moment
30194 let's use a g_warning() rather than a g_assert().
30196 2002-09-19 Mark Crichton <crichton@gimp.org>
30198 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
30199 even if support for it isn't present. Added an #ifdef to fix this.
30201 * socket-io.c: Added checks back for Solaris support.
30203 2002-09-19 Martin Baulig <martin@gnome.org>
30205 * debug-mono-symfile.c (read_string, write_string): Reflect latest
30206 changes in the symbol file format.
30208 2002-09-18 Martin Baulig <martin@gnome.org>
30210 * debug-mono-symfile.c: Set version number to 21.
30212 2002-09-18 Dick Porter <dick@ximian.com>
30214 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
30215 on netbsd. Fixes bug 30051.
30217 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30220 (set_version_from_string): little fix.
30222 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30224 * monosn.c, Makefile.am: added strong name utility.
30225 * reflection.h, reflection.c: implemented delayed signing,
30226 locale, version and hash id assembly attributes.
30228 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30230 * loader.c, metadata.c: load param attributes in signatures.
30232 2002-09-16 Martin Baulig <martin@gnome.org>
30234 * debug-mono-symfile.c: Added string table with all method names.
30236 2002-09-14 Martin Baulig <martin@gnome.org>
30238 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
30239 fast method lookup.
30241 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30243 * reflection.c: record the public key token of referenced assemblies.
30245 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30247 * image.c, image.h: added functions to get the strong name and the
30248 public key of an assembly.
30249 * pedump.c: use them.
30251 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
30253 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
30255 2002-09-12 Miguel de Icaza <miguel@ximian.com>
30257 * marshal.c (mono_marshal_get_managed_wrapper): Added
30260 2002-09-11 Martin Baulig <martin@gnome.org>
30262 * gc.c: Call GC_unregister_disappearing_link() on all links when
30263 finalizing them, this is necessary to aviod a crash in boehm's
30266 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30268 * gc.c: handle GetTarget for finalized objects spotted and fixed by
30271 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
30273 * icall.c: implemented MonoType::Module.
30274 * reflection.c, reflection.h: mono_module_get_object () from
30275 Tomi Pakarinen <tomi.pakarinen@welho.com>.
30277 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
30279 * icall.c: ignore overridden methods in GetMethods ().
30280 Fix for FieldInfo::SetValue().
30281 * object.c: handle float/double in runtime invoke.
30283 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
30285 * object.c: allow a constructor to be called again on an object.
30287 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30289 * class.h, class.c: move field layout code to it's own function and
30290 export it. Get an interface id earlier. Move fields in MonoClass
30291 so they are more cache friendly and align the bitfields.
30292 * loader.c: temporary handle get_param_names() for a runtime method.
30293 * reflection.c, reflection.h: more code to handle runtime creation of
30296 2002-09-09 Martin Baulig <martin@gnome.org>
30298 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
30299 signature with the pinvoke field being set for the actual call.
30301 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
30303 * icall.c: removed some unused icalls. Start of map of glib charsets
30304 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
30306 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
30308 * debug-helpers.c: break infinite loop (found and fixed by
30309 Holger Arnold <harnold@gmx.de>).
30311 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30313 * icall.c: target may be null in create_delegate.
30315 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30317 * marshal.c: handle a boolean return type.
30319 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30321 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
30323 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30325 * gc.c: fix weakreferences.
30327 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
30329 * icall.c: added icall to get default codepage.
30331 2002-09-03 Dick Porter <dick@ximian.com>
30334 * threads.c: Use MonoThread instead of MonoObject where
30337 Store running thread objects in a hash table, so that we have all
30338 the info to hand when waiting for them to finish
30339 (means we don't need OpenThread() any more, so mingw builds should
30340 be fully functional again.)
30343 * object.h: Added thread ID to MonoThread
30345 2002-09-03 Martin Baulig <martin@gnome.org>
30347 * icall.c (System.Reflection.Assembly::get_location): New interncall.
30349 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30351 * icall.c: fixed leak in get_temp_path. Thanks lupus.
30353 2002-09-03 Martin Baulig <martin@gnome.org>
30355 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
30356 argument to store the end address of the disassembled instruction.
30358 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
30359 here from debug-symfile.h.
30360 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
30361 JIT into this struct.
30362 (MonoSymbolFile): Added `char *image_file' field.
30363 (MonoDebugGetMethodFunc): Removed.
30364 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
30365 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
30366 (mono_debug_find_method): New method.
30368 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
30369 create a full symbol file.
30370 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
30371 and static symbol files.
30372 (mono_debug_find_method): The symbol file keeps an internal method hash,
30373 call this to get a MonoDebugMethodInfo from a MonoMethod.
30375 * debug-symfile.[ch]: Removed.
30377 2002-08-29 Miguel de Icaza <miguel@ximian.com>
30379 * image.c (do_mono_image_open): Remove linker version check.
30381 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
30383 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
30384 wrappers for instance methods.
30386 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30388 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
30390 2002-08-28 Dick Porter <dick@ximian.com>
30392 * Makefile.am: Export HOST_CC for w32 builds
30394 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30396 * file-io.c process.c: MonoString are null terminated, no
30397 need for mono_string_to_utf16() anymore.
30399 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30401 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
30403 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
30405 * icall.c, reflection.h: speedup System.MonoType.
30407 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30409 * reflection.c: allow null as the value of a string argument in
30410 custom attributes constructors.
30412 2002-08-27 Martin Baulig <martin@gnome.org>
30414 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
30415 `trampoline_address' field.
30417 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
30419 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
30420 check (fixes bug #29486)
30422 2002-08-27 Martin Baulig <martin@gnome.org>
30424 * debug-mono-symfile.c: Changed the file format in a way that allows us
30425 open it read-only and to use a specially malloced area for all the
30426 dynamic data. We can now also generate a symbol file on-the-fly if we're
30427 debugging IL code and there is no MCS generated symbol file for it.
30429 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
30431 * object.c: added a define for a good string and array
30432 creation speedup (not enabled by default because we need to deal with
30435 2002-08-26 Martin Baulig <martin@gnome.org>
30437 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
30438 function to create a dynamic symbol file. This is used by the
30439 debugger to create a symbol file for IL code on-the-fly.
30441 2002-08-26 Martin Baulig <martin@gnome.org>
30443 * loader.c (mono_lookup_pinvoke_call): Include the error message
30444 from g_module_error() in the error message.
30446 2002-08-24 Martin Baulig <martin@gnome.org>
30448 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
30449 function to update the symbol file. The symbol file is mmap()ed
30450 writable, but private. This allows us to install the symbol file
30451 together with the assembly.
30453 2002-08-24 Martin Baulig <martin@gnome.org>
30455 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
30456 but they can read the new symbol file format which mcs is now creating.
30458 * debug-symfile.c (mono_debug_find_source_location): Moved to
30459 debug-mono-symfile.c; this is now operating on the new symbol file.
30461 2002-08-23 Martin Baulig <martin@gnome.org>
30463 * debug-helpers.c (mono_method_desc_from_method): New function to get
30464 a MonoMethodDesc from a MonoMethod.
30466 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30468 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
30469 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
30471 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
30473 * string-icalls.[ch]: make helper methods static.
30475 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30477 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
30478 types to it and to SetValueInternal.
30480 * object.c: Moved handle_enum label to its proper place. This was the
30483 This time i compiled mcs and gtk-sharp and they both work.
30485 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30487 * icall.c: reverted partially my previous patch until
30488 object.c:set_value handles enums correcly.
30490 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30493 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
30494 (ves_icall_System_Environment_get_MachineName): removed warning when
30495 compiling under cygwin.
30497 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
30499 * object.c: fixed field_get_value() for reference types.
30501 2002-08-22 Dick Porter <dick@ximian.com>
30503 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
30504 Don't free a buffer while it's still needed. Patch from Jonathan
30505 Liger <Jonathan.liger@wanadoo.fr>
30507 2002-08-21 Miguel de Icaza <miguel@ximian.com>
30509 * icall.c (ves_icall_System_Environment_get_Platform): Add new
30512 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
30514 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
30515 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
30517 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
30518 we call unmanaged code which throws exceptions.
30520 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30522 * appdomain.h: added per-domain entry_assembly.
30523 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
30525 * icall.c: Assembly::GetEntryAssembly icall.
30526 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
30527 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
30529 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30531 * appdomain.h, gc.c: added mono_domain_finalize ().
30533 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30536 (mono_print_unhandled_exception): changed g_warning by g_printerr
30537 because g_log has a 1024 characters limit (yeah, i got a big stack
30538 trace). Don't print exception name, that should be in ToString
30541 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30543 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
30544 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
30546 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30549 (mono_print_unhandled_exception): after previous commit, i realized
30550 that MS calls ToString on the exception. I changed this function to
30551 do that. This way we get stack_trace for free.
30553 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30556 (mono_print_unhandled_exception): invoke Message property instead of
30557 getting 'message' field from Exception. Don't allocate memory for
30558 'trace' and 'message' if not needed.
30560 2002-08-18 Dick Porter <dick@ximian.com>
30562 * unicode.c: Fix asserts to match Encoder.cs checks
30564 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30566 * marshal.c: fix unaligned store issue and a few wrong
30567 opcode argument types.
30569 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30571 * icall.c: added GetUninitializedObjectInternal internal call.
30573 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
30575 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
30576 to the right domain.
30578 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
30580 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
30582 * class.c (class_compute_field_layout): set blittable to false for Strings
30584 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
30586 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30588 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
30589 first chunk of code to create types at runtime. Code to
30590 handle ReflectedType/DeclaringType. Make reflection handles
30593 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
30595 * class.c: set correct name in arrays.
30597 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
30599 * appdomain.c (mono_domain_transfer_object): make it work with
30600 valuetypes. bug fixes.
30602 2002-08-12 Dick Porter <dick@ximian.com>
30604 * object.h: Rename some parameters to avoid c++ keywords (Patch
30605 from Joseph Wenninger <kde@jowenn.at>)
30607 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
30609 * icall.c: added icall to implement Assembly.GetFile*.
30611 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30613 * reflection.h, reflection.c: code to embed managed resources.
30615 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
30617 * class.c: move all the type size stuff into
30618 class_compute_field_layout().
30620 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30622 * class.c: ensure enums have always the correct instance size.
30623 * unicode.c: remove wrong assert.
30625 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
30627 * assembly.c: fix mem corruption issue.
30628 * image.h, image.c: added mono_image_get_resource () to access
30630 * icall.c: implemented Assembly.EntryPoint property and some
30631 Managed Resources related internalcalls.
30634 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30636 * image.c, image.h: impemented mono_image_get_entry_point ().
30637 * appdomain.c: use mono_image_get_entry_point.
30639 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30641 * reflection.c: support the object type argument when loading
30644 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
30646 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
30647 String as return type.
30649 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
30651 * reflection.c: fix encoding of named args for custom attrs to match
30652 the ms implementation. Read them back when instantiating custom
30655 2002-08-02 Radek Doulik <rodo@ximian.com>
30657 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
30658 by Dietmar as quick fix
30659 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
30660 16 as stack size, used on more places as quick fix before Dietmar
30661 will fix it properly
30663 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30665 * object.h, object.c: added accessors for fields and properties.
30667 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30669 * class.c, class.h: made mono_class_get_field_from_name ()
30670 loop on parent types.
30671 Added mono_class_get_property_from_name ().
30673 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
30675 * class.c, class.h: move the code to setup the type vtable in its own
30676 function so that it can be reused also for types created at runtime.
30677 Eliminate the "class" identifier from the header file.
30678 * reflection.c: setup the vtable for enums so that we can create
30679 objects for use in SetConstant ().
30681 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
30683 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
30684 instead of the delegate itself as this pointer (bug #28383)
30686 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
30688 * marshal.c (mono_marshal_get_managed_wrapper): added return type
30691 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30693 * loader.c: don't set the pinvoke bit on icalls.
30695 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
30697 * debug-helpers.c (mono_method_full_name): only print a number to
30698 indicate wrapper type (so that the output is more readable in traces).
30700 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
30702 * class.c (mono_class_init): include method override patch from Paolo
30704 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
30706 * icall.c: fixed GetTypeCode().
30708 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
30710 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
30711 use real delegate invoke function to make it work with multicast
30712 delegates (fix bug# 28291).
30714 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
30716 * object.c: load constant strings.
30718 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
30720 * reflection.c: no magic numbers.
30721 * tabledefs.h: security action enum.
30723 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
30725 * assembly.c: fix possible memory corruption.
30727 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30729 * reflection.h, reflection.c: added support for linking resources.
30730 * verify.c: check we have an updated corlib.
30732 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
30734 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
30736 (mono_marshal_string_array): null terminate unmanaged string arrays.
30737 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
30739 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
30741 * icall.c: Type.GetType () can now return also types from the
30744 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
30746 * loader.h, loader.c: stack walking support.
30747 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
30748 GetCallingAssembly.
30750 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
30752 * marshal.c: added optimisations for blittable types
30754 * class.c (mono_array_class_get): do not set blittable attribute on arrays
30755 (mono_class_setup_mono_type): set blittable attribute for single
30758 * marshal.c (mono_string_utf8_to_builder): impl.
30759 (mono_string_builder_to_utf8): impl.
30760 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
30762 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
30764 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
30765 (mono_marshal_get_managed_wrapper): impl. byref types
30767 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30770 (search_method): don't display debug message.
30772 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
30774 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
30776 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
30778 * appdomain.c: set the missing filename when throwing exception.
30780 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
30782 * metadata.c (mono_type_size): code cleanup
30783 (mono_type_stack_size): removed some test code
30785 2002-07-21 Miguel de Icaza <miguel@ximian.com>
30787 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
30788 mono_get_exception_file_not_found now.
30790 * exception.c (mono_exception_from_name_two_strings): New version
30791 that will call a constructor with two string arguments.
30792 (mono_get_exception_file_not_found): New helper routine, used to
30793 report file-not-found errors.
30795 2002-07-20 Dick Porter <dick@ximian.com>
30798 * process.c: Pass file handles to CreateProcess
30802 * file-io.c: Implemented CreatePipe
30804 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
30806 * metadata.c (mono_get_param_info): set alignment for value types
30808 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30810 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
30811 Constify mono_domain_assembly_open().
30812 * loader.c: handle null namespace in icalls.
30814 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
30816 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
30817 (emit_str_to_ptr_conv): marshal object as structs
30819 * metadata.c (mono_type_to_unmanaged): marshal object as structs
30821 * marshal.c (mono_marshal_get_runtime_invoke): support value types
30823 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
30825 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
30826 (mono_marshal_get_native_wrapper): we an now return value types
30828 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30830 * verify.c: more checks implemented.
30832 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
30834 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
30836 (mono_marshal_get_native_wrapper): allow byref arguments
30837 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
30838 impl. PtrToStringXXX methods
30839 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
30840 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
30841 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
30842 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
30843 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
30845 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30847 * reflection.c: fix buglet in parsing an assembly name.
30849 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
30851 * marshal.c (emit_ptr_to_str_conv): first impl.
30853 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
30855 * object.c, class.h: cache the vtable in the class as suggested by
30856 vargaz@freemail.hu (Zoltan Varga).
30858 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30860 * class.h, loader.c: added mono_field_from_token().
30861 * verify.c: first cut of type checking code.
30863 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
30865 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
30867 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
30869 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
30871 (mono_marshal_get_remoting_invoke): impl.
30872 (mono_delegate_begin_invoke): impl.
30873 (mono_mb_emit_save_args): impl.
30874 (mono_delegate_end_invoke): impl.
30875 (mono_marshal_get_delegate_begin_invoke):
30876 (mono_marshal_get_delegate_end_invoke):
30877 (mono_marshal_get_delegate_invoke): generate a special name for
30878 those methods (including the signature) and associate them whith
30879 the delegate class.
30881 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
30884 (mono_reflection_type_from_name): now it has a MonoImage parameter
30885 which is used as the default image to search the type in. If the image
30886 is NULL or getting the type from it fails, it defaults to corlib.
30888 * icall.c: changed 1 call to mono_reflection_type_from_name to match
30891 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
30893 * reflection.c: update the parameter table index.
30895 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
30897 * domain.c: don't include the mark byte in the string hash.
30899 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
30901 * icall.cs: icall for Type.GetTypeCode ().
30902 * verify: a couple of fixes and disabled local initialization checks.
30904 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
30906 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
30908 * debug-helpers.c (mono_method_full_name): print the type of the
30911 * metadata.c (mono_signature_hash): a hash function for signatures
30912 (mono_signature_hash): better hash algorithm
30914 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
30916 * debug-helpers.c (mono_method_full_name): this can now generate
30917 method names with signatures
30919 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
30920 method dont have this pointers.
30922 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
30924 * reflection.c: fixup typebuilder tokens.
30925 * image.c: fix buglet.
30926 * marshal.h: remove whitespace.
30927 * metadata.h, metadata.c: reinstate code that was removed.
30928 * verify.c: handle catch directives and fix another couple of bugs.
30930 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
30932 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
30933 (mono_marshal_get_native_wrapper): make it comp. with the old code
30934 (mono_marshal_get_native_wrapper): support boolean
30935 (mono_marshal_get_managed_wrapper): support more types
30937 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
30939 * class.c (class_compute_field_layout): compute class->blittable attribute.
30941 2002-07-09 Dick Porter <dick@ximian.com>
30943 * threads.c: Make the thread cleaning up cope with threads that
30946 2002-07-08 Radek Doulik <rodo@ximian.com>
30948 * reflection.c (method_encode_code): use non-translated values to
30949 compute finally_start, this fixes exception handling on ppc, yay!
30951 * decimal.h (struct signscale): fix endianess
30953 2002-07-07 Radek Doulik <rodo@ximian.com>
30955 * reflection.c: swap box_val and not val
30957 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
30959 * reflection.c, reflection.h: handle full assembly info in type name.
30960 Handle Type arguments when loading custom attributes.
30961 * icall.c: updated to use new mono_reflection_type_from_name () method.
30963 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30966 (method_from_memberref): also print assembly name when method not found.
30968 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30971 (ves_icall_TypeGetProperties): fixed bug #27473.
30973 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30975 * reflection.c: display image name and token when cannot find the
30976 .ctor for an attribute.
30978 2002-07-05 Martin Baulig <martin@gnome.org>
30980 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
30982 2002-07-04 Dick Porter <dick@ximian.com>
30984 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
30985 compile on mingw. This will cause mingw builds to not wait for
30986 subthreads to terminate after the main thread does. I've lodged a
30987 bug with the mingw developers for them to wrap OpenThread().
30989 2002-07-03 Dick Porter <dick@ximian.com>
30991 * threads.c: Store thread IDs instead of handles, because
30992 GetCurrentThread() returns a pseudohandle and therefore stores
30993 useless values. mono_thread_cleanup() continues checking the
30994 array of threads until it is empty, to cope with subthreads
30995 spawning new threads after the main thread has finished.
30999 * profiler-private.h: Pass the thread ID to thread profiler
31000 functions, instead of a handle
31002 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31004 * verify.c: fixes to make it more usable.
31005 * pedump.c: added --verify code to verify IL code in an assembly.
31007 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31009 * reflection.c: turn errors into warnings to allow compiling corlib.
31011 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
31013 * reflection.c: add special cases to compile corlib.
31015 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31017 * reflection.c: handle properties with only a set method.
31019 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31021 * opcodes.h: add enum with opcodes in opval order.
31023 2002-07-01 Dick Porter <dick@ximian.com>
31026 * object.c (mono_runtime_run_main): Removed unneeded argument
31028 2002-06-28 Martin Baulig <martin@gnome.org>
31030 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31032 2002-06-27 Dick Porter <dick@ximian.com>
31034 * threads.c: Store the handle in both the parent thread and in the
31035 subthread, to minimise the time between starting a new thread and
31038 2002-06-26 Dick Porter <dick@ximian.com>
31040 * appdomain.c (mono_runtime_cleanup): Close the socket library
31041 after all the threads have finished, not before
31043 2002-06-26 Martin Baulig <martin@gnome.org>
31045 * debug-symfile.c (mono_debug_find_source_location): Added
31046 `guint32 *line_number' argument. If it's not NULL, store the line number
31047 there and return the file name without the line number.
31049 2002-06-25 Dick Porter <dick@ximian.com>
31053 * process.c: Process forking and other support functions
31055 2002-06-25 Dick Porter <dick@ximian.com>
31057 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
31058 things dont happen when the image is closed.
31059 (mono_image_lookup_resource): Walk the resource section looking
31060 for a particular entry
31062 * cil-coff.h: PE resource section decoding
31064 2002-06-25 Dick Porter <dick@ximian.com>
31068 (mono_assembly_foreach): Accessor functions to walk the list of
31070 (mono_assembly_set_main):
31071 (mono_assembly_get_main): Process methods need to know which
31072 assembly is the "main" one
31074 * object.c (mono_runtime_run_main): Record the main assembly
31076 * debug-helpers.c: Fix typo
31078 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
31080 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
31081 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
31083 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31085 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
31087 2002-06-21 Miguel de Icaza <miguel@ximian.com>
31089 * image.c (do_mono_image_open): Initialize reference count,
31090 otherwise we leak the MonoImage.
31092 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31094 * reflection.c: small tweak to handle self-hosting.
31096 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
31098 * reflection.c: fix type name parse code.
31100 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31102 * reflection.c: break out of the loop.
31103 * image.c: special case corlib.
31105 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31107 * reflection.c: add all the custom attrs at the end to ensure the
31108 ctors have been properly initialized when the attributes are defined
31109 in the current assembly.
31111 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31113 * reflection.c: handle correctly multiple-nested types.
31115 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
31117 * row-indexes.h: fix typos.
31118 * reflection.c: adjust for typos and fix method_def_or_ref
31119 encoding in MethodImpl table.
31121 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31123 * reflection.c: fix entry point patching (thanks Serge!).
31125 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
31127 * verify.c: add check for System.Exception
31129 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31131 * image.c, class.c: minifix for code just c&p'ed.
31132 * reflection.c: warning fix.
31133 * object.h, loader.h, domain.c: load also StringBuilder.
31135 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31137 * marshal.h, marshal.c: some support code to handle complex marshaling.
31139 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31141 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
31142 Better signatures with vtable error dump.
31144 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
31146 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
31148 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
31150 * icall.c (ves_icall_Type_GetField): impl.
31152 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31154 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
31155 to retrieve a marshal description blob for a field or param.
31157 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31159 * reflection.h, reflection.c: change order of nested type emission
31160 to avoid table corruption. The NestedTypes table is sorted.
31161 * icall.c: change order of GetConstructor results to workaround mcs bug.
31163 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31165 * reflection.h, reflection.c: handle field and param marshal
31168 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31170 * icall.c, marshal.c marshal.h: more Marshal class implementation.
31172 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31174 * reflection.c: fix call convention.
31176 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31178 * reflection.h, reflection.c: mono_image_get_memberref_token()
31179 takes a type instead of a class, now. Added
31180 mono_image_get_array_token() to create tokens for the special
31181 multi-dim array methods.
31183 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31185 * assembly.c: handle modules (no assembly table). Split
31186 loading references in its own function.
31187 * class.c: handle moduleref resolution scope.
31188 * image.c, image.h: cache module name in image.
31190 2002-06-07 Martin Baulig <martin@gnome.org>
31192 * reflection.c (mono_image_get_type_info): Only add a class layout entry
31193 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
31195 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31197 * icall.c: more signature fixes that used uint instead of int.
31199 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31201 * reflection.c: fixed signature of field refs.
31203 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31205 * class.c, reflection.c: handle typerefs of nested types
31206 (both on read and when writing files).
31208 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31210 * icall.c: fix method signatures that tried to workaround the previous
31213 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31215 * debug-helpers.c: fix typo.
31217 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31219 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
31220 rewrote the PE/COFF writing code (our programs are understood by the
31223 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31225 * gc.c, gc.h, icall.c: weakreference support.
31227 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31229 * Makefile.am, mono-config.c: use $(sysconfdir).
31231 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31233 * icall.c: changed default precision of Double.ToString() to 15.
31234 Fixed memory leak. Unified with Single.ToString.
31236 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31238 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
31240 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31242 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
31243 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
31244 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
31247 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31249 * debug-symfile.c, sysmath.c: yet more compilation fixes.
31251 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31253 * reflection.c, socket-io.c: more compilation fixes.
31255 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31257 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
31258 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
31259 unicode.c: warning and compiler compatibility fixes.
31261 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31263 * class.h, metadata.c: fixed warnings/compilation errors.
31265 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31267 * Makefile.am, mono-config.c, mono-config.h: configuration file
31269 * loader.c, loader.h: make Dll mapping configurable at runtime in the
31270 config file. Export methods to insert and lookup mappings.
31272 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
31274 * reflection.c: handle types and boxed objects in custom attr
31277 2002-05-30 Martin Baulig <martin@gnome.org>
31280 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
31282 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
31284 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
31285 to lookup the implmap row for a P/Invoke method.
31286 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
31287 P/Invoke method from the runtime on an as needed basis.
31289 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
31291 * metadata.c (mono_metadata_parse_signature): impl.
31293 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31295 * class.c: handle .pack directive.
31297 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31299 * object.c: initialize static fields with RVA data.
31301 2002-05-25 Martin Baulig <martin@gnome.org>
31304 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
31306 2002-05-24 Martin Baulig <martin@gnome.org>
31309 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
31310 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
31311 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
31313 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31315 * object.c: special case string ctros in invoke.
31316 * gc.c: silly whitespace changes.
31318 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
31320 * threadpool.[ch]: impl. a threadpool that can
31321 be used by mint and mono.
31323 2002-05-22 Martin Baulig <martin@gnome.org>
31325 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
31326 The first argument is now a `MonoReflectionModuleBuilder *', the return
31327 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
31328 `methods' field to get the method builder. The `token' argument is the
31331 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
31332 invalid characters instead of g_assert_not_reached()ing. This seems
31333 to be the behaviour of mscorlib.
31335 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
31337 * object.c (mono_runtime_invoke_array): applied patch from Rachel
31338 Hestilow to fix bug #25104
31340 2002-05-21 Martin Baulig <martin@gnome.org>
31342 * debug-symfile.c (mono_debug_find_source_location): New function.
31343 Looks up an IL offset in the line number table and returns the source
31344 location as a string.
31346 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31349 (mono_double_ToStringImpl): changed %f by %g until we have something
31352 2002-05-21 Nick Drochak <ndrochak@gol.com>
31354 * icall.c : Use different name for Math.Pow's icall. Needed to check
31355 parameters first in C#.
31357 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31359 * icall.c, reflection.h: added icall to get info about an event.
31361 2002-05-20 Radek Doulik <rodo@ximian.com>
31363 * object.c (mono_value_box): don't use memcpy for boxing on BIG
31365 (mono_value_box): don't use memcpy for small sizes on
31366 architectures with unaligned access
31368 2002-05-20 Martin Baulig <martin@gnome.org>
31370 * reflection.c (mono_reflection_setup_internal_class): Don't crash
31371 if `tb->parent == NULL'.
31372 (mono_reflection_create_internal_class): New function. This is
31373 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
31376 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
31379 2002-05-19 Martin Baulig <martin@gnome.org>
31381 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
31382 argument to get the length, don't default to the array length.
31384 2002-05-18 Miguel de Icaza <miguel@ximian.com>
31386 * assembly.c (mono_assembly_setrootdir): New function used to
31387 override the MONO_ASSEMBLIES directory.
31389 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31391 * icall.c: ValueType_GetHashCode() initialize local var.
31393 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31395 * reflection.c: sort custom attributes table.
31397 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31399 * reflection.c: support named args in custom attributes (write support).
31401 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31403 * reflection.c: fix finally position calculation.
31405 2002-05-15 Radek Doulik <rodo@ximian.com>
31407 * reflection.c: fixed endianess at many places
31409 * icall.c (ves_icall_InitializeArray): comment out debug msg
31411 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
31413 * object.c (mono_unhandled_exception): new function to handle
31414 unhandled exceptions.
31415 (mono_unhandled_exception): call the UnhandledException event.
31416 (mono_runtime_delegate_invoke): impl.
31418 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
31420 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
31421 returns the RVA, not the direct pointer to the data. Handle the case
31422 when the class size is fixed.
31424 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31426 * reflection.c: fix some endianess issues.
31428 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
31430 * object.c (mono_runtime_invoke): is now able to catch exceptions.
31432 * threads.c (mono_thread_init): added a callback which is invoked
31435 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
31437 * icall.c: make GetHashCode return non-negative values.
31439 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
31441 * object.c, icall.c, gc.c: revert to address-based hashcode.
31443 2002-05-13 Miguel de Icaza <miguel@ximian.com>
31445 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
31447 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31449 * icall.c, class.c: special case <Module>.
31451 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
31453 * icall.c: fix bug in GetNow().
31455 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
31457 * object.c (mono_runtime_class_init): make sure that we call all
31458 static class constructors.
31460 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31462 * reflection.c: sort methodsemantics table.
31464 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31466 * reflection.h, reflection.c: honour init locals setting.
31468 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
31470 * icall.c: copied Double ToStringImpl for Single ToStringImpl
31472 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31474 * reflection.c: support ContructorBuilders in attribute blob creation.
31476 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31478 * reflection.c: some changes to build a binary that can be run
31479 directly in windows.
31481 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
31483 * loader.c: print a big message when an icall can't be found.
31485 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31487 * string-icalls.c: fix bug 24248.
31489 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
31491 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
31492 icall.c, reflection.h: separate assembly loading by pathname and by
31493 assembly name. Use the MONO_PATH env var to search for assemblies.
31495 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31497 * assembly.c, image.h: add some support for assemblies
31498 with multiple modules.
31499 * class.c, class.h: export mono_class_from_typeref().
31500 * loader.c: remove duplicated code and use mono_class_from_typeref(),
31503 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31505 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
31506 documentation says (the ECMA one is correct).
31508 2002-05-02 Dick Porter <dick@ximian.com>
31510 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
31511 Don't name the synchronisation mutex.
31513 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
31516 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
31517 Make the prototypes match.
31518 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
31522 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
31523 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
31524 all systems have tm.tm_zone, so use strftime() with %Z to print
31525 the timezone abreviation into a temp string.
31527 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
31528 rather than mono_array_addr() on a MonoString on Big Endian
31531 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
31533 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
31536 2002-04-30 Dick Porter <dick@ximian.com>
31538 * socket-io.c: Cope with SOCKET being an integer rather than a
31541 * threads.c: Added Thread_free_internal, to deal with thread
31542 handle cleanup. Moved calls to handle_store() and handle_remove()
31543 to start_wrapper(), so each can only be called once. Allocate
31544 synchronisation blocks with GC_malloc(), and use GC finalisation
31545 to close the handles.
31547 * icall.c: added System.Threading.Thread::Thread_free_internal
31549 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31551 * icall.c: support Environment.Exit, CommandLineArgs().
31553 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31555 * object.c, object.h: added mono_runtime_run_main () and
31556 mono_runtime_get_main_args () for use in System.Environment.
31558 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31560 * gc.c: fix thinko, enable actual finalization since the jit is now
31563 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31565 * gc.c, object.c: take into account that an object may be offset wrt the address
31566 returned by GC_malloc().
31568 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
31570 * image.c: handle files without entries in the assembly table (modules).
31572 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
31574 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
31575 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
31576 allowed to be null when it's System.Object class setup.
31578 2002-04-27 Martin Baulig <martin@gnome.org>
31580 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
31581 if `tb->parent == NULL' rather than crashing.
31583 2002-04-28 Nick Drochak <ndrochak@gol.com>
31585 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
31586 calling acos() where asin() should have been called.
31588 2002-04-26 Martin Baulig <martin@gnome.org>
31590 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
31591 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
31592 there's a subdirectory called `System', but we don't want to read that
31593 subdirectory as an assembly.
31595 2002-04-25 Martin Baulig <martin@gnome.org>
31597 * debug-symfile.c: Reflect latest MonoString changes.
31599 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31601 * rand.c, rand.h: instance method icalls need to have an explicit
31602 this pointer as first argument in the C implementation.
31604 2002-04-25 Nick Drochak <ndrochak@gol.com>
31606 * icall.c: Fix typo in map for GetNonZeroBytes
31608 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
31610 * string-icalls.c : String does now passes unit tests without any
31611 errors, the following changes has been made:
31613 Implemented replace methods.
31614 Renaming of methods to (try) follow the standard.
31615 Fixed compare ordinal
31616 Made all memory allocated directly to function instead of via icall function.
31617 Small performance fix in is_in_array function
31619 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
31621 c (mono_string_Internal_ctor_charp_int_int):
31622 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
31623 sindex < 0, throw ArgumentOutOfRangeException instead of
31624 ArgumentNullException.
31626 Added new check for length == 0, however
31627 I need to make it return String.Empty from the C code.
31629 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
31630 that calculate the length for us here.
31632 (mono_string_Internal_ctor_sbytep_int_int): Replaced
31633 mono_string_new_utf16 with mono_string_new, since value is utf8.
31635 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31637 * object.c: register the object for finalization if needed.
31638 Allocate one more char in the string for the terminating 0 char.
31640 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31642 * class.c, class.h, image.c: check if a type implemenst a destructor.
31643 Use the proper key for array class lookups.
31644 * icall.c: register the icalls in the System.GC class.
31645 * gc.c, gc.h: GC-related functions and icalls.
31647 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31651 * unicode.c: free some strings gotten from mono_string_to_utf8 and
31652 changed a couple of free () by g_free ().
31654 * decimal.c: one-liner in the comments for decimal2string ().
31656 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
31658 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
31660 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
31662 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
31663 * object.c (mono_runtime_invoke_array) : handle null in params
31665 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
31667 * string-icalls.c: fixed bug in split (one off bug)
31669 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
31671 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
31672 * icalls.c: added String::Equals as internal method
31674 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
31676 * threads.c: fixed bug in the double interlocked functions
31678 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
31680 * threads.c: implemented all of the new interlocked icalls.
31681 * string-icalls.c: fix a bug in insert.
31682 * icalls.c: added the icalls for interlocked, removed old string functions.
31684 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
31686 * loader.c: fix off-by-one error when reading argument names.
31688 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31690 * profiler.c: win32 counter implementation (untested).
31691 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
31692 (the latter needs testing and more complete impl. from win32 folks).
31694 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
31696 * object.c: mono_array_new_full workaround mono_array_class_get
31699 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
31701 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
31702 * object.h (mono_string_chars): Changed casting type.
31704 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
31706 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
31707 method signatures to use gunichar2 instead of gint16.
31709 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
31711 * object.h, object.c: domain-specific versions of mono_object_new and
31714 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
31716 * object.c: changed String layout
31718 * string-icalls.c (mono_string_Internal_ctor_chara): added
31719 internal string constructors.
31721 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
31723 * threads.c: pass 'this' to the thread start routine.
31725 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31727 * string-icalls.c: fix IndexOf and LastIndexOf. Now
31728 InternalCompareStr don't call twice mono_string_cmp_char for the last
31729 character. Improved performance in mono_string_cmp_char.
31731 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31733 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
31734 code into its own library: libmonoruntime.
31736 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
31738 * object.h, object.c: changed array format so that szarrays do not
31739 require a bounds structure.
31740 * icall.c, appdomain.c: support for new szarray format.
31742 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
31744 * metadata.c: compare also the retuns type when comparing signatures:
31745 we didn't do this as an optimization since really overloaded methods
31746 must differ also in the arguments, but this doesn't work with
31747 low-level IL code (or when using explicit conversion operators: see
31748 bug#23498 for an example).
31750 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31752 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
31754 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31756 * icall.c: make MonoType::GetElementType its own icall.
31758 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31760 * icall.c: remove MonoMethod_get_Name().
31761 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
31764 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
31766 * string-icalls.c: optimized a few methods.
31768 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
31770 * icall.c: added all new string internal calls
31771 * string-icalls.c: added, new string internal call implementation.
31772 * object.c: added mono_string_new_size for allocating a string a size
31774 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
31776 * object.c (mono_object_isinst): use the same code as in the
31777 optimized x86 version.
31779 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31781 * profiler.c: TSC-based timer code (faster and more accurate).
31782 Not hooked up in configure, yet (set USE_X86TSC to 1).
31784 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
31786 * profiler.c, profiler.h: track time spent compiling methods.
31787 * threads.c: track thread creation/destruction.
31789 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
31791 * profiler.c, profiler.h, profiler-private.h: profiling interface
31792 and sample implementation. Moved here so that it can be used also by
31795 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
31797 * reflection.c, reflection.h: keep types and other handles separate in
31798 the hash tables for referred tokens. Add guid for modules.
31800 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31802 * assembly.c: fix bugs found with valgrind.
31803 * metadata.h, metadata.c: added mono_metadata_guid_heap().
31805 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
31807 * threads: added icall support for getting current domain for
31810 2002-04-13 Martin Baulig <martin@gnome.org>
31812 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
31813 (MonoDebugVarInfo): Added `index' field for register based addresses.
31814 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
31815 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
31816 `MonoDebugVarInfo *params' and `guint32 this_offset' with
31817 `MonoDebugVarInfo *this_var'.
31819 * debug-symfile.c (relocate_variable): New static function to write
31820 a location description for a local variable or method parameter.
31822 2002-04-12 Martin Baulig <martin@gnome.org>
31824 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
31825 stack offset and begin/end scope address of a local variable.
31826 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
31827 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
31828 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
31830 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
31831 Added new relocation types for start/end scope of a local variable.
31833 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31835 * object.h: add mono_object_domain() macro.
31836 * reflection.c: handle typespecs.
31837 * icall.c: MonoMethod::get_Name() implementation.
31839 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31841 * icall.c: String::GetHashCode() icall implementation.
31843 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31845 * icall.c: String::IndexOfAny icall.
31846 * object.c, object.h: make array->max_length more useful.
31847 Intrduced mono_object_class() and mono_string_length() macros.
31849 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31851 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
31852 instead of g_unichar_isdigit.
31854 2002-04-11 Nick Drochak <ndrochak@gol.com>
31856 * icall.c: Implement a simple Double.ToString().
31858 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
31860 * appdomain.h: only io-layer.h is supposed to be included.
31861 * icall.c: explicitly import environ. Fix warning.
31863 2002-04-10 Nick Drochak <ndrochak@gol.com>
31865 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
31866 return true even if it's not Daylight Savings time.
31867 Only return false for the case where the function isn't
31868 implemented for a plaform (read Windows).
31870 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31872 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
31875 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
31877 * mempool.c (mono_mempool_alloc): only use g_malloc when
31878 absolutely necessary.
31880 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
31882 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
31884 * class.c (mono_class_vtable): use domain mempool to allocate vtable
31885 (mono_class_proxy_vtable): use domain mempool
31887 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31889 * appdomain.h, appdomain.c: split initialization that requires the
31890 execution engine support into mono_runtime_init().
31892 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
31894 * class.c (mono_class_init): don't include vtable inside MonoClass
31895 to save some memory, gather some statistics.
31896 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
31898 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31900 * icall.c: internalcall implementation for ValueType.Equals().
31902 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
31904 * object.c (mono_message_init): moved
31905 (mono_runtime_exec_main): new arch. independent impl.
31906 (mono_runtime_invoke_array): new method - like
31907 mono_runtime_invoke, but you can pass an array of objects.
31908 (mono_remoting_invoke): new arch. independent impl.
31909 (mono_message_invoke): new arch. independent impl.
31910 (mono_runtime_class_init): new arch. independent impl.
31911 (mono_runtime_object_init): new arch. independent impl.
31913 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31915 * metadata.c, object.c, reflection.c: documented the exported
31918 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
31920 * icall.c: simpler code to pass the assembly builder data to corlib.
31921 Implement GetNestedTypes() internalcall.
31923 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31925 * class.c: warn if a type can't be loaded.
31927 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
31929 * image.h: typedef MonoImageOpenStatus
31930 * types.h: removed unused file
31932 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
31934 * icall.c: Enum_ToObject accepts enum value arguments.
31936 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31938 * class.c: move initialization of properties, events and nested
31939 classes, so that they happen for interfaces, too.
31941 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31943 * icall.c: cleanup some ugly casts in Array_SetValue*.
31945 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31947 * icall.c: the values array fro enums is of the correct type, now.
31948 Implement (correctly) getFullName instead of assQualifiedName for
31950 * reflection.h, reflection.c: added mono_type_get_name ().
31952 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31954 * assembly.c, image.h: for each MonoImage, record from wich assembly
31956 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
31957 Make Type.Assembly work.
31959 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
31961 * debug-symfile.h: use char* instead of gpointer to avoid
31964 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
31966 * icall.c (ves_icall_InternalExecute): impl. FielSetter
31967 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
31969 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
31971 * icall.c (mono_message_init): impl. (code cleanup)
31972 (ves_icall_InternalExecute): impl. FieldGetter
31974 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
31975 defined we call all (non-static)methods through the vtable.
31977 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
31979 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
31980 finalizer even though the memory is still referenced (and the chunk of
31981 memory is not freed).
31983 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
31985 * assembly.c: fix brokeness.
31987 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
31989 * class.c: kill some warnings. Check explicit interface method
31990 implementation also without considering the namespace.
31991 Load also literal strings in static class data.
31993 2002-03-29 Miguel de Icaza <miguel@ximian.com>
31995 * assembly.c (default_assembly_name_resolver): Kill memory leak.
31996 (default_assembly_name_resolver): Make the resolver take the
31997 "base" directory where the assembly was originally defined, so we
31998 can load DLLs that are in the same directory as the assembly that
31999 is being referenced.
32001 2002-03-28 Dick Porter <dick@ximian.com>
32007 * unicode.c: Warning cleanups
32009 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
32011 * object.h, reflection.h: use the correct type instead of MonoObject.
32013 2002-03-28 Martin Baulig <martin@gnome.org>
32015 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
32016 (mono_debug_update_symbol_file): Initialize classes if necessary.
32018 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32020 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
32021 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
32023 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
32025 * assembly.h: fix function prototype.
32026 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
32027 * mono-endian.h: use const cast.
32029 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
32031 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
32033 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32035 * loader.c: don't assert when a typeref can't be loaded, give
32036 a chance to the runtime to trow an exception instead.
32037 * loader.h: fix warning.
32039 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
32041 * class.c (mono_class_proxy_vtable): added proxy support
32043 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
32045 * icall.c: removed last of PAL calls, added System.Environment
32046 * file-io.h, file-io.c: MonoIO implementation
32047 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
32049 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32051 * appdomain.c: do not use the byte marker in ldstr table lookup.
32052 * debug-helpers.c: allow two ':' to separate class and method name.
32053 * object.c: allocate arrays bounds with the GC, too.
32054 * verify: add a few more checks.
32056 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
32058 * reflection.c: output also literal strings. Allocate parameter data
32059 with GC_malloc() (thanks, Martin, for catching this!).
32061 2002-03-26 Martin Baulig <martin@gnome.org>
32063 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
32064 include the `this' offset in the `param_offsets'.
32066 2002-03-25 Martin Baulig <martin@gnome.org>
32068 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
32069 mono_debug_get_class() function to get the classes. Added new
32070 relocation types for arrays and strings.
32071 (mono_debug_get_class): New static function to search in all
32072 referenced assemblies for a metadata token.
32074 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
32076 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32078 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
32079 hold gc-allocated objects. Make the string heap a stream like the
32080 others. Removed duplicated code when writing stream info.
32081 Added asserts to catch possible buffer overflows. Set the sorted map
32082 for tables that need sorting. Added some documentation.
32084 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
32086 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
32087 for interned strings and vtables.
32089 2002-03-24 Martin Baulig <martin@gnome.org>
32091 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
32092 it in the array since it was created with g_slist_prepend().
32094 2002-03-24 Martin Baulig <martin@gnome.org>
32096 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
32097 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
32098 (mono_debug_method_from_token): Renamed to
32099 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
32100 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
32102 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
32105 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
32107 2002-03-24 Martin Baulig <martin@gnome.org>
32109 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
32110 (mono_debug_method_from_token): New func.
32112 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
32113 New interncall, calls mono_debug_local_type_from_signature().
32114 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
32115 calls mono_debug_method_from_token().
32117 2002-03-23 Martin Baulig <martin@gnome.org>
32119 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
32120 specifies the number of bytes to be converted, not the array size.
32121 Return the number of chars, not the number of bytes.
32122 (ves_icall_iconv_get_chars): The `byteCount' argument
32123 specifies the number of bytes to be converted, not the array size.
32125 2002-03-23 Martin Baulig <martin@gnome.org>
32127 * reflection.h (MonoReflectionSigHelper): New type.
32129 * reflection.c (mono_reflection_sighelper_get_signature_local),
32130 (mono_reflection_sighelper_get_signature_local): New functions.
32132 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
32133 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
32136 2002-03-23 Martin Baulig <martin@gnome.org>
32138 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
32139 is_writeable is set.
32140 (mono_raw_buffer_update): New function to write the modified map
32143 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
32145 * debug-symfile.c (mono_debug_update_symbol_file): Call
32146 mono_raw_buffer_update() when done writing.
32148 2002-03-23 Martin Baulig <martin@gnome.org>
32150 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
32152 * debug-symfile.c: Added support for arguments and local variables.
32154 2002-03-23 Dick Porter <dick@ximian.com>
32156 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
32157 protected by ifdefs, hence breaking the w32 build.
32159 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32161 * object.c: implement is_interned() the right way.
32163 2002-03-21 Martin Baulig <martin@gnome.org>
32165 * debug-symfile.[ch]: New files to handle debugging information
32166 files. There's also support to dynamically update these symbol
32167 files to include machine dependent information.
32169 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
32171 * threads.c (mono_thread_create): new function to create thread
32174 2002-03-20 Martin Baulig <martin@gnome.org>
32176 * icall.c (ves_icall_InternalInvoke): Create a new object if the
32177 method is a constructor.
32178 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
32179 points to ves_icall_InternalInvoke().
32181 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
32183 * file-io.c: Flush shouldn't throw exceptions.
32185 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
32187 * file-io.c: FileStream flush support; FileSetLength now
32188 restores file pointer.
32190 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32192 * class.c: set image for pointer classes.
32194 2002/03/19 Nick Drochak <ndrochak@gol.com>
32196 * sysmath.c: Forgot one.
32198 2002-03-18 Miguel de Icaza <miguel@ximian.com>
32200 * sysmath.c: Avoid redefining existing names.
32202 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
32204 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
32205 handled by runtime as icall rather than dllimport from libm.so
32206 * file-io.c, file-io.h: fixed handle argument type.
32208 2002-03-18 Dick Porter <dick@ximian.com>
32210 * reflection.c (mono_image_get_type_info): rename interface to
32211 iface, because of "#define interface struct" on windows.
32213 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
32215 * class.c, class.h: rename and export mono_ptr_class_get().
32216 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
32217 * reflection.c, reflection.h, icall.c: better/saner type name
32218 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
32221 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
32223 * class.c (mono_class_init): removed hardcoded GHC_SLOT
32225 * icall.c (ves_icall_InternalInvoke): impl.
32227 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32229 * reflection.c: output the interface map table, too.
32231 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32233 * class.c (class_compute_field_layout): separate computation of
32234 static field layout
32236 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
32238 * icall.c: added System.Buffer support.
32239 * file-io.c: moved file icalls from PAL to FileStream.
32241 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32243 * icall.c (ves_icall_System_Object_GetHashCode): impl.
32245 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
32247 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
32249 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32251 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
32253 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32255 * debug-helpers.{c,h}: moved here from monograph some useful functions
32256 to locate a method by name/signature in a class or image. Included
32257 also a small and flexible IL disassembler.
32259 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32261 * reflection.c: fixup tokens in methods with small header size, too.
32263 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
32265 * object.c (mono_string_to_utf8): remove assert(!error), instead
32268 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
32270 * icall.c: update to the new mono_Array_class_get interface.
32272 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32274 * appdomain.c, object.c: Boehm-GC enable.
32275 * icall.c: make get_data_chunk() support split data requests.
32276 Ensure a class is initialized in more cases. Return only the first
32277 property found in GetProperties() or the compiler gets confused.
32278 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
32279 * reflection.h, reflection.c: add fixup mechanism for field and method
32280 tokens. Initialize assembly->typeref in a single place. Output
32281 properties after events. Support custom attributes for events, too.
32282 Typo fix for paramter custom attrs.
32284 2002-03-07 Martin Baulig <martin@gnome.org>
32286 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
32288 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
32290 * class.c (mono_array_class_get): fix. for multi. dim. arrays
32292 2002-03-06 Martin Baulig <martin@gnome.org>
32294 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
32295 non-zero lower bounds. See testcases #F10-#F13.
32297 2002-03-05 Martin Baulig <martin@gnome.org>
32299 * exception.c (mono_get_exception_argument_out_of_range): New exception.
32301 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
32302 ves_icall_System_Array_GetValue(), only calculate the absolute array position
32304 (ves_icall_System_Array_SetValue): Likewise.
32305 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
32306 as argument and does the actual work. This function is used when copying a
32307 multi-dimensional array.
32308 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
32309 now do all the widening conversions of value types.
32310 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
32312 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32314 * class.c: remove some magic numbers and use the smbolic names,
32315 instead. Added init_events() to load event info at class init time.
32316 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
32317 and mono_metadata_methods_from_event().
32318 * reflection.h, reflection.c: added support for writing out the evnets
32319 related information.
32321 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32323 * reflection.h, icall.c: use a different method (GetInterfaces)
32324 to gather interface info and add isbyref, isprimitive and
32325 ispointer to the ves_icall_get_type_info() return value.
32327 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32329 * class.h: stared adding support for events.
32330 * icall.c: split find_members implementation. Added debug icall to get
32331 the address of an object.
32332 * reflection.c: handle TypeBuilders in mono_type_get_object().
32334 2002-03-01 Martin Baulig <martin@gnome.org>
32336 * icall.c (ves_icall_System_Array_GetLength): This must throw an
32337 ArgumentOutOfRangeException(), not an ArgumentException().
32338 (ves_icall_System_Array_GetLowerBound): Likewise.
32339 (ves_icall_System_Array_GetValue): Improved argument checking.
32340 (ves_icall_System_Array_SetValue): Improved argument checking.
32342 2002-03-01 Martin Baulig <martin@gnome.org>
32344 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
32345 called with invalid arguments rather than just dying with g_assert().
32346 (ves_icall_System_Array_SetValue): Likewise.
32347 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
32348 raise a NotImplementedException instead.
32349 (ves_icall_System_Array_GetLength): Added argument checking.
32350 (ves_icall_System_Array_GetLowerBound): Added argument checking.
32352 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
32354 * object.h (mono_assert): new macros mono_assert and
32355 mono_assert_not_reached
32357 2002-02-28 Martin Baulig <martin@gnome.org>
32359 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
32360 and "System::String::IsInterned" to "System::String::_IsInterned".
32362 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
32364 * icall.c: remove hacks for typebuilder. Added icall to create a
32365 modified type from a tybebuilder.
32366 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
32367 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
32368 to create a backing MonoClass for a TypeBuilder.
32370 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32372 * class.c, class.h: more refactoring of class init.
32373 Export mono_class_setup_mono_type() and mono_class_setup_parent().
32375 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
32377 * marshal.c, marshal.h: start of marshaling interface.
32379 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
32381 * icall.c: fix order in assembly qualified name icall.
32383 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
32385 * class.c: do not free str, since we store it in the hash table.
32386 * reflection.h: add label field to MonoILExceptionInfo.
32387 * reflection.c: handle references to more than one assembly. Handle
32388 case when there isn't a module created in the assembly.
32390 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32392 * class.c: Fix typo. Start refactoring of class init code.
32394 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32396 * appdomain.c: exit with 1 on error.
32397 * class.c: we already have the name in MonoClassField.
32398 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
32399 MonoStreamHeader instead of an offset of image->raw_metadata.
32401 2002-02-26 Miguel de Icaza <miguel@ximian.com>
32403 * appdomain.c (mono_init): Be even more descriptive about the error.
32405 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
32407 * appdomain.c: give the user an informative message when corlib can't
32410 2002-02-26 Martin Baulig <martin@gnome.org>
32412 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
32413 New icall to get the time zone data.
32415 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32417 * reflection.c: set virtual and raw size of section correctly.
32418 * threads.c: transfer domain information to newly created threads.
32420 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
32422 * class.c: when instancing a class in a domain, load the default
32423 vaules for static fields from the constant table. Fix System.Enum to
32425 * icall.c: implement Object::GetType() internalcall. Implemented
32426 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
32427 Fixed checking of binding flags in find_members().
32428 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
32429 * reflection.c: handle enumerations when writing to the constant
32430 table. Use a different object cache for types.
32433 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
32435 * object.c (mono_object_isinst): fix for arrays
32437 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
32439 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
32441 * object.c: don't use mprotect () and fix intern pool hash table
32442 lookup for big endian systems.
32444 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32446 * icall.c: change type_is_subtype_of () signature.
32448 2002-02-21 Mark Crichton <crichton@gimp.org>
32450 * rand.c, rand.h: Added random number generator for
32451 System.Security.Cryptography classes.
32453 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
32455 * icall.c: Added System.Security.Cryptography calls.
32457 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
32459 * class.c, icall.c, metadata.c: better support for pointer types.
32460 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
32461 * reflection.c: Add support for getting custom attrs for properties
32462 and simplify some code.
32464 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32466 * icall.c: change getToken () and add custom attribute GetBlob()helper
32468 * reflection.h: add custom attrs array to the reflection builder structures.
32469 * reflection.c: encode and emit custom attributes for all the relevant
32470 reflection objects. Cache fieldref and methodref tokens. Change
32471 mono_image_create_token() interface to take a MonoDynamicAssembly.
32472 More complete custom attributes decoder. Load custom attributes for
32473 Assembly, Field, Method and Constructor objects, too. Make the
32474 returned array an Attribute[] one, not object[]. Added
32475 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
32476 custom attribute constructor.
32478 2002-02-20 Dick Porter <dick@ximian.com>
32482 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
32483 problem code out for now).
32485 2002-02-19 Radek Doulik <rodo@ximian.com>
32487 * object.c (mono_ldstr): use hash table to avoid multiple swapping
32489 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
32491 * icall.c: register the GetCustomAttributes method.
32492 * object.c, object.h: add mono_string_new_len ().
32493 * reflection.h, reflection.c: added mono_runtime_invoke(),
32494 mono_install_runtime_invoke(). Added
32495 mono_reflection_get_custom_attrs () to load custom attributes and
32496 create the attribute objects.
32498 2002-02-19 Dick Porter <dick@ximian.com>
32499 * threads-dummy-types.c:
32500 * threads-dummy-types.h:
32503 * threads-pthread-types.c:
32504 * threads-pthread-types.h:
32505 * threads-pthread.c:
32506 * threads-pthread.h: Deleted obsolete files
32508 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
32510 * class.c (mono_class_vtable): runtime init the class when we
32511 allocate static class data.
32513 * icall.c (ves_icall_System_Array_SetValue): check for null values.
32515 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
32516 and String - but we will need generic marshalling support in the
32518 (mono_init): set the domain name in a ms compatible way
32520 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
32523 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
32525 * object.c (mono_array_clone): use alloca() instead of g_malloc
32528 * appdomain.c (mono_domain_unload): impl.
32530 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32532 * appdomain.c, object.c: fix intern pool implementation.
32533 * class.c: fix alignment code.
32535 2002-02-16 Radek Doulik <rodo@ximian.com>
32537 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
32538 and s2 > s1, just copy lower bytes to be compatible with little
32539 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
32540 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
32542 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
32543 force big_endian to be 1 for big endian machines
32544 (ves_icall_iconv_new_decoder): ditto
32546 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
32548 * socket-io.c (convert_sockopt_level_and_name): If the system
32549 doesn't define SOL_IP or SOL_TCP, get them by hand using
32550 getprotobyname() and caching the values (because this could be a
32552 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
32553 Use the appropriate struct when the system does support it. Ie,
32554 not all systems have struct ip_mreqn so use struct ip_mreq when
32557 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
32559 * reflection.c: handle finally clauses.
32561 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
32563 * socket-io.c: use g_snprintf() instead of snprintf.
32565 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
32567 * reflection.c (mono_param_get_objects): Cast second argument to
32568 mono_method_get_param_names to a const char** to silence the
32571 * appdomain.c (mono_domain_assembly_open): Put parens around the
32572 truth statement in the for-loop.
32574 * unicode.c (iconv_convert): Got rid of a compiler warning about
32575 int i being unused when the system has a new iconv.
32576 (iconv_get_length): Same.
32578 * image.c (load_class_names): Cast the second argument to
32579 g_hash_table_insert() to char* to hush compiler warnings about the
32581 (mono_image_open): Same here.
32583 * socket-io.c: Don't conditionally include sys/filio.h or
32584 sys/sockio.h here anymore since we now get them from
32585 io-layer/io-layer.h
32586 (inet_pton): If the system doesn't support inet_aton, implement
32587 using inet_addr and also #define INADDR_NONE if it isn't defined
32590 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
32592 * metadata.c, metadata.h: added function to get packing and size info
32594 * reflection.h, reflection.c: handle field RVA data. Save info about
32595 the table layout if needed. Assign typedef indexes to all the types
32596 before dumping the info about them to avoid forward reference problems.
32598 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
32600 * socket-io.c (convert_sockopt_level_and_name): ifdef
32601 SO_ACCEPTCONN because it is not defined on my system (old debian)
32603 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32605 * opcode.c: use stddef.h to get NULL.
32607 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
32609 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
32610 for FIONBIO, FIONREAD and SIOCATMARK.
32611 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
32612 define INADDR_NONE and besides, inet_addr() is deprecated and
32613 should not be used. Use inet_pton() instead - it also has the
32614 added bonus that it can easily handle IPv6 addresses as well.
32615 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
32617 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32619 * decimal.c: remove _MSC_VER conditional.
32621 2002-02-13 Dick Porter <dick@ximian.com>
32624 * icall.c: Internal calls for Blocking, Select, Shutdown,
32625 GetSocketOption and SetSocketOption
32627 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32629 * assembly.cs: better resolver: use it instead of some kludgy
32632 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
32634 * reflection.c: the best way to speed-up the compiler is to avoid
32637 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
32639 * class.c (mono_class_vtable): changed the object layout
32640 (obj->vtable->class).
32641 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
32643 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32645 * assembly.c: look for assemblies in the assembly dir, too.
32647 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32649 * class.c: fix thinko in mono_class_from_type().
32651 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32653 * exception.h, exception.c: added TypeLoadException.
32654 * object.h, object.c: added mono_array_clone ().
32655 * icall.c: handle throwOnError in AssemblyGetType().
32656 Added Array.Clone().
32657 * opcode.h, opcode.c: use a single value for the opcode val.
32658 Compile fix for non-gcc compilers.
32660 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
32662 * opcodes.c, opcodes.h: export interesting info about opcodes.
32664 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
32666 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
32669 * class.c (class_compute_field_layout): set element_class for enums
32670 (mono_class_create_from_typedef): set element_class for normal classes
32672 * icall.c (ves_icall_System_Enum_get_value): impl.
32674 * class.c (mono_class_create_from_typedef): do not set valuetype
32675 flag for System.ValueType and System.Enum
32677 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
32679 * unicode.c (iconv_convert): fix big endian problem.
32681 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32683 * class.c: add asserts if we are ever going to scribble over memory.
32684 * socket-io.c: not all systems have AF_IRDA defined.
32686 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
32688 * class.c (class_compute_field_layout): do not consider static
32689 fields to compute alignment
32691 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
32693 * appdomain.c (mono_appdomain_get): impl.
32694 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
32696 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32698 * icall.c: ignore "file://" prefix when loading an assembly.
32700 2002-01-23 Dick Porter <dick@ximian.com>
32704 * Makefile.am: Added socket support
32706 2002-01-23 Miguel de Icaza <miguel@ximian.com>
32708 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
32709 code back. This should return the assemblies that are loaded by
32710 the runtime on behalf of an application domain.
32712 The current implementation is still broken, it just returns every
32713 assembly loaded, but until we get real applications domain this
32716 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
32718 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
32721 2002-01-23 Miguel de Icaza <miguel@ximian.com>
32723 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
32724 the mono_class_from_name lookup.
32725 (ves_icall_get_parameter_info): ditto.
32726 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
32728 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
32730 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
32732 * class.c: load also nested classes on class init.
32733 System.ValueType instance methods gets passed boxed
32734 values, unless methods in derived classed that get a pointer to the
32736 * icall.c: use better name parsing code in GetType().
32737 * image.c, image.h: add mono_image_loaded ().
32738 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
32739 * reflection.c, reflection.h: added mono_reflection_parse_type().
32741 2002-01-22 Veronica De Santis <veron78@interfree.it>
32743 * icall.c : Added mapping of internal calls for Manual and Auto reset events
32744 * threads.c : Added the implementation of internal calls for events
32745 * threads.h : Added prototypes of internal calls for events
32747 2002-01-21 Radek Doulik <rodo@ximian.com>
32749 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
32751 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
32753 * class.c (mono_class_init): set min_align to 1 (instead of 0)
32754 (mono_class_value_size): use min_align
32756 2002-01-20 Dick Porter <dick@ximian.com>
32759 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
32760 so it compiles on w32.
32762 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
32764 * metadata.c (mono_type_stack_size): impl.
32766 * class.c (mono_class_get_field): impl. memberref token
32768 2002-01-16 Veronica De Santis <veron78@@interfree.it>
32770 * icall.h : Added the internal calls mapping for CreateMutex_internal
32771 and ReleaseMutex_internal.
32772 * threads.h : Added the prototype of mutexes internal calls.
32773 * threads.c : Added the implementations of mutexes internal calls.
32775 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
32777 * metaparse.h: removed unused file.
32778 * reflection.c, reflection.h: added stream_data_align () function
32779 to align data in streams and keep stream aligned. Add support for
32780 exception support in method headers.
32782 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
32784 * unicode.c: make iconv_convert () return the number of bytess written
32785 in the output buffer.
32787 2002-01-15 Dick Porter <dick@ximian.com>
32788 * threads.c: Make the runtime's idea of infinite timeouts coincide
32789 with the class library's
32791 Fix a particularly egregious bug in mono_thread_cleanup(). That
32792 code was so utterly bogus it must have been written on a Monday.
32794 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
32796 * reflection.h: add subtypes field to TypeBuilder.
32797 * reflection.c: encode constants for literal fields.
32798 Handle subtypes. Fix user string token (and add a zero byte)
32801 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
32803 * class.c (mono_class_init): bug fix: assign slot numbers for
32806 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32808 * reflection.c: don't try to output a code RVA for abstract methods.
32809 Small fixes for method header format. Output parameter info to the
32810 ParamDef table. Save method overriding info to MethodImpl table.
32811 Fix property support. Allow typedef.extends to be a type in the
32813 * verify.c: fix off-by-one error.
32815 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
32817 * class.c: fix mono_class_from_mono_type () for szarray types.
32818 Remove unused cache check in mono_class_from_type_spec().
32819 * icall.c: *type_from_name () functions handle simple arrays and byref.
32820 * reflection.c: handle byref and szarray types. Handle methods without
32821 body (gets P/Invoke compilation working). Handle types and fields in
32823 * reflection.h: add rank to MonoTypeInfo.
32825 2002-01-10 Dick Porter <dick@ximian.com>
32827 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
32830 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
32832 * icall.c: initialize class in type_from_handle ().
32833 Loop also in parent classes for get_method ().
32834 * reflection.c: properly encode class and valuetype types.
32835 Start on encoding TypeBuilder types. Handle fieldrefs.
32836 Use correct length when registering a user string.
32837 Handle ConstructorBuilder and MonoMethod in get_token ().
32838 Make mono_type_get_object () aware of cached types.
32839 * object.c: back out change to mono_string_new ().
32841 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
32842 * object.c: mono_string_new should return a NULL when the string
32843 passed in is NULL -- not try to deference it.
32845 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
32847 * icall.c: hack to make IsSubType work for TypeBuilders.
32848 * reflection.c: emit constructors before methods.
32849 Retrieve param names in mono_param_get_objects().
32851 2002/01/05 Nick Drochak <ndrochak@gol.com>
32853 * Makefile.am: fix list of headers and sources so automake 1.5
32854 doesn't complain. Removed \# at end of list.
32856 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
32858 * reflection.c: get token for a method ref. Set return type of
32859 constructor to void.
32860 * loader.c: debug message.
32861 * class.c: typo fix.
32863 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
32865 * icall.c: fix array init with rank > 1. FindMembers
32866 loops in parent class as well.
32867 * image.c: do not insert nested types in name cache.
32868 * reflection.c: warning fix.
32869 * reflection.h: add override method (for interface impl).
32871 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
32873 * metadata.c: fix customattr decoding.
32875 2001-12-21 Miguel de Icaza <miguel@ximian.com>
32877 * rawbuffer.cs: Added native Win32 implementation, avoids using
32878 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
32880 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
32882 * class.c: make the low-level routines handle the cache.
32884 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
32886 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
32888 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
32890 * class.c: fix mono_array_element_size() for objects.
32891 * class.h, class.c: add properties to MonoClass and load them
32893 * icall.c: check with isinst() when assigning a value to an array
32894 instead of requiring the classes to match exactly.
32895 Implemented icall for System.Type::GetType().
32896 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
32897 enums. Handle bindingflags when looking for methods and fields.
32898 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
32899 and mono_metadata_methods_from_property().
32900 * reflection.h, reflection.c: added structures for propreties,
32901 parameters and enums. Implemented mono_property_get_object() and
32902 mono_param_get_objects().
32904 2001-12-18 Dick Porter <dick@ximian.com>
32906 * file-io.c: Use mono_string_to_utf16() instead of
32907 mono_string_chars()
32909 * object.c: Added mono_string_to_utf16(), which copies the non
32910 NULL-terminated MonoString into a new double-null-terminated
32913 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
32915 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
32917 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
32919 * file-io.c: raise exceptions if handle is invalid.
32921 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
32923 * assembly.c: yet another check for mscorlib.
32924 * class.c, class.h: load nesting info for classes.
32925 * icall.c: many new functions to support the Reflection classes.
32926 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
32927 * reflection.h, reflection.c: mono_image_create_token(),
32928 mono_assembly_get_object(), mono_type_get_object(),
32929 mono_method_get_object(), mono_field_get_object(): methods to return
32930 objects that parallel the C representation of assemblies, types,
32933 2001-12-11 Dick Porter <dick@ximian.com>
32936 * file-io.c: Internal calls for file IO.
32938 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
32940 * tabledefs.h: missing FileAttributes.
32941 * verify.h, verify.c: use is_valid_string () to simplify and check for
32942 valid strings more correctly. Fix warnings and speeling.
32943 Check more tables: Filed, File, ModuleRef, StandAloneSig.
32944 Check code: branches, maxstack, method calls.
32946 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
32948 * object.c (mono_object_allocate): removed static, so that the jit
32949 can allocate value types.
32951 * icall.c (ves_icall_System_DateTime_GetNow): impl.
32953 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
32955 * class.c: init enum types right away and register the
32956 token->MonoClass map in mono_class_create_from_typedef ().
32957 * verify.h, verify.c: first cut of the verifier.
32958 * pedump.c: add --verify switch to verify metadata tables.
32959 * tabledefs.h: add some missing enums.
32961 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
32963 * class.c (mono_install_runtime_class_init): impl.
32964 (mono_class_init): renamed mono_class_metadata_init to
32965 mono_class_init, also removed the metadata_inited flag
32967 * object.c (mono_object_isinst): use faster algorithm
32969 2001-11-30 Radek Doulik <rodo@ximian.com>
32971 * mono-endian.h: reverted last change
32972 added function prototypes
32974 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
32975 add mono-endian.c back
32977 * mono-endian.c: returned back, as Paolo pointed out, it's needed
32978 for unaligned access, I've mistaked it with endianess. I am
32980 (mono_read16): fix reverted endianess
32981 (mono_read64): ditto
32982 (mono_read32): ditto
32984 2001-11-30 Dick Porter <dick@ximian.com>
32986 * exception.c: Implement mono_exception_from_name()
32988 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
32990 * metadata.h, metadata.c: remove params_size and locals_size and their
32991 calculation from the metadata code: they are only usefult to the
32994 2001-11-29 Radek Doulik <rodo@ximian.com>
32996 * object.c (mono_ldstr): swap bytes here, it's probably not the
32997 best place, but works for me now, I'll redo it once I know mono
32998 better, also note that I add PROT_WRITE and don't reset back, also
32999 note that it's only affects big endians, so x86 should be OK
33001 * mono-endian.h (read16): use just glib macros for both endians
33003 * mono-endian.c: removed as glib macros are used in in
33004 mono-endian.h so we don't need to care about endianess for read
33005 macros as glib does that for us already
33007 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
33009 * class.h, class.h: take minimum alignment into consideration so
33010 that the fields of a class remain aligned also when in an array.
33012 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33014 * loader.h, loader.c: add mono_method_get_param_names().
33015 * class.c: 0-init class fields.
33017 2001-11-26 Dick Porter <dick@ximian.com>
33021 * threads.c: New file that handles System.Threading on all platforms
33024 * object.h: Remove the synchronisation struct from MonoObject,
33025 replace it with a pointer that gets initialised on demand
33027 * Makefile.am: Replace all the system-specific threading code with
33028 a single file that uses the new wrapper library
33030 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
33032 * class.c, class.h: add mono_install_trampoline() so that the runtime
33033 can register a function to create a trampoline: removes the ugly
33034 requirement that a runtime needed to export arch_create_jit_trampoline.
33035 * object.h, object.c: added mono_install_handler() so that the runtime
33036 can install an handler for exceptions generated in C code (with
33037 mono_raise_exception()). Added C struct for System.Delegate.
33038 * pedump.c: removed arch_create_jit_trampoline.
33039 * reflection.c: some cleanups to allow registering user strings and
33040 later getting a token for methodrefs and fieldrefs before the assembly
33042 * row-indexes.h: updates and fixes from the new ECMA specs.
33044 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
33046 * class.h, class.c: add enum_basetype field to MonoClass.
33047 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
33048 to get index in the constant table reated to a field, param or
33050 * reflection.h, reflection.c: handle constructors. Set public-key and
33051 version number of the built assembly to 0.
33052 * row-indexes.h: update from new ECMA spec.
33054 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33056 * class.h, class.c: add a max_interface_id to MonoClass.
33057 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
33058 since it's used to do that. Added mono_type_type_from_obj().
33059 Make GetType() return NULL instead of segfaulting if the type was not
33060 found. Handle simple arrays in assQualifiedName.
33061 * object.h: add a struct to represent an Exception.
33062 * reflection.c: output call convention in method signature.
33063 Add code to support P/Invoke methods and fixed offsets for fields.
33065 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
33067 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
33069 * icall.c: use mono_array_addr instead of array->vector: fixes the
33070 reflection image writing.
33071 * reflection.c: init call convention byte to 0 in method signature.
33072 Encode the property signature. Don't output property-related methods
33073 twice. Really process the properties for a type (don't cast a field to
33074 a property, my mom always told me that).
33075 Fix 64 bit issues in pointer alignment in a different and more
33078 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
33080 * loader.h: Removed type class from MonoDefaults, added monotype
33082 * loader.c: Loaded MonoType, removed loading of Type
33084 * icall.c (my_mono_new_object): Now returns a System.MonoType,
33085 and fills in System.Type._impl with a RuntimeTypeHandle rather
33086 than the actual MonoClass *
33088 (ves_icall_type_from_handle): change from type_class to
33091 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
33094 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
33097 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
33099 (ves_icall_System_Reflection_Assembly_GetType): implemented
33101 (ves_icall_System_MonoType_assQualifiedName): implemented
33103 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
33105 2001-11-09 Miguel de Icaza <miguel@ximian.com>
33107 * assembly.c (mono_assembly_open): Implement a cache for the
33110 (mono_assembly_close): only destroy the assembly when the last
33113 2001-11-09 Dick Porter <dick@ximian.com>
33115 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
33117 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
33119 * class.c (mono_class_metadata_init): bug fix: compute the right slot
33121 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33123 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
33124 from Martin Weindel.
33125 * object.h: add mono_string_chars ().
33127 2001-11-07 Miguel de Icaza <miguel@ximian.com>
33129 * reflection.c (build_compressed_metadata): Eliminates warnings
33130 and uses 64-bit clean code.
33132 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
33133 (mono_type_equal): Change signature to eliminate warnings.
33135 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33137 * icall.c, loader.c: remove the internalcall array constructors.
33138 Changes to match the new MonoArray structure.
33139 * object.h, object.c: an array object doesn't allocate an extra
33140 vector. Add mono_array_new_full () to create jagged arrays easily.
33142 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33144 * metadata.h, metadata.c: add mono_metadata_field_info () to
33145 retreive all the info about a field from vairous tables.
33146 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
33147 * class.h, class.c: augment MonoClassField with more info.
33148 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
33149 policy and load a field's RVA if needed.
33151 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
33153 * class.c (mono_class_metadata_init): create a trampoline for all
33154 virtual functions instead of actually compiling them.
33156 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
33158 * class.h, class.c: include name in MonoClassField.
33159 * class.c: fix fundamental type of System.Object and System.String.
33160 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
33162 * icall.c: remove internalcalls for the Reflection stuff that is now
33164 * loader.c: mono_field_from_memberref () implementation.
33165 * mono-endian.c: thinko (s/struct/union/g).
33166 * object.c, object.h: make the mono_string_* prototypes actually use
33167 MonoString instead of MonoObject.
33168 * reflection.c, reflection.h: updates for changes in the reflection
33169 code in corlib: we use C structures that map to the actual C# classes.
33170 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
33171 fat method header if needed and use the info from the ILGenerator for
33172 methods. Handle fields in types. Misc fixes.
33174 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
33176 * class.c (mono_class_metadata_init): bug fix: always allocate
33177 space for static class data
33179 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
33181 * class.c (mono_compute_relative_numbering): use relative
33182 numbering to support fast runtime type checks.
33184 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
33186 * class.c (mono_class_create_from_typeref): added debugging output
33187 to print class name when MonoDummy is returned instead of real class
33189 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
33191 * class.c (mono_class_metadata_init): interface offset table now
33192 contains pointers into the vtable - this is more efficient for the jit
33194 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
33196 * class.c (mono_class_metadata_init): use a temporary vtable (the
33197 old algorithm only worked for the interpreter, but not for the jit)
33199 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
33201 * loader.c (method_from_memberref): use mono_class_get to get the
33202 class of an array instead of using System.Array directly.
33203 (mono_get_method): also add MEMBERREF methods to the method cache
33204 which usefull for arrays.
33206 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
33208 * pedump.c (arch_compile_method): added to compute vtable entry
33210 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
33211 number of interfaces.
33213 * class.h: merged MonoArrayClass into MonoClass
33215 * class.c (mono_class_create_from_typedef): compute the vtable size and
33216 allocate space to include the vtable inside MonoClass
33217 (mono_class_metadata_init): initialize the vtable
33219 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
33221 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
33222 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
33223 * image.c: endian fixes by Laurent Rioux.
33224 * object.h, object.c: rename MonoStringObject to MonoString and
33225 MonoArrayObject to MonoArray. Change some function names to conform to
33226 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
33227 guint16* as first argument, so don't use char*.
33228 Provide macros to do the interesting things on arrays in a portable way.
33229 * threads-pthread.c: updates for the API changes and #include <sched.h>
33230 (required for sched_yield()).
33231 * icall.c: updates for the API changes above.
33232 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
33233 platforms that need them.
33235 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33237 * class.c: set the correct type for all the fundamental
33238 type when loading the class.
33240 2001-10-05 Dick Porter <dick@ximian.com>
33242 * threads-pthread.c (pthread_mutex_timedlock): Simple
33243 compatibility version for C libraries that lack this call.
33245 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33247 * class.c: MonoTypes stored in MonoClass are stored as
33248 fundamental MonoTypes when the class represents a
33249 fundamental type (System.Int32, ...).
33250 The TypeHandle return by ldtoken is a MonoType*.
33251 * icall.c: ves_icall_get_data_chunk () write out all the
33252 PE/COFF stuff. Implement ves_icall_define_method (),
33253 ves_icall_set_method_body (), ves_icall_type_from_handle ().
33254 * image.c: properly skip unknown streams.
33255 * loader.h, loader.c: add type_class to mono_defaults.
33256 * metadata.c, metadata.h: export compute_size () as
33257 mono_metadata_compute_size () with a better interface.
33258 Typo and C&P fixes.
33259 * pedump.c: don't try to print the entry point RVA if there is no entry point.
33260 * reflection.c, reflection.h: many cleanups, fixes, output method
33261 signatures and headers, typedef and typeref info, compress the metadata
33262 tables, output all the heap streams, cli header etc.
33263 * row-indexes.h: typo fixes.
33265 2001-10-04 Dick Porter <dick@ximian.com>
33267 * object.h: Add a synchronisation mutex struct to MonoObject
33269 * object.c (mono_new_object): Initialise the object
33270 synchronisation mutexes
33272 * icall.c: System.Threading.Monitor internal calls
33274 * threads-pthread.h:
33275 * threads-pthread.c: System.Threading.Monitor internal calls
33277 * threads-types.h: New file, includes the system-specific thread
33280 * threads-pthread-types.h:
33281 * threads-pthread-types.c: New files, handle pthread-specific
33282 synchronisation types
33284 * threads-dummy-types.h:
33285 * threads-dummy-types.c: New files of dummy support for
33286 thread-specific types
33290 * pedump.c: include mono-endian.h not endian.h
33292 * Makefile.am: More threads files.
33293 Name mono-endian.h not endian.h
33295 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
33297 * Makefile.am, reflection.h, reflection.c: move here the reflection related
33298 stuff and implement a few more bits.
33299 * icall.c: a field needs to be dereferenced twice. Do not use the same
33300 name for two variables in the same scope.
33301 * image.c, image.h: cleanups.
33303 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
33305 * class.c (mono_class_metadata_init): bug fix: compute the right size
33307 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
33309 * icall.c: implemented some of the Reflection internalcalls.
33310 * image.c, image.h: start writing out the PE/COFF image.
33311 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
33312 that does the reverse than decode_blob_size ().
33313 * object.c: use mono_metadata_encode_value (). Move here
33314 temporary implementation of mono_string_to_utf8 ().
33315 * rawbuffer.c: make malloc_map static.
33317 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33319 * metadata.c: fix type comparison for arrays.
33320 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
33321 Added a couple of new classes to monodefaults.
33322 * icall.c: added a couple of Reflection-related internalcalls.
33323 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
33324 Added a byval_arg MonoType to MonoClass.
33326 2001-09-28 Dick Porter <dick@ximian.com>
33329 * threads-pthread.h:
33330 * threads-pthread.c: Implemented internal calls for
33331 LocalDataStoreSlot operations. Applied mutexes around all shared
33332 data. Reworked the thread creation and Start() operations to
33333 avoid a race condition.
33336 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
33338 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
33340 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
33342 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
33344 * class.c, loader.c: warn and return NULL instead of erroring out.
33345 * icall.c: added System.AppDomain::getCurDomain().
33346 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
33348 2001-09-25 Dick Porter <dick@ximian.com>
33350 * threads-pthread.h:
33351 * threads-pthread.c: Implemented timed thread joining and added
33352 System.Threading.Thread::Join_internal internal call
33354 * icall.c: Added System.Threading.Thread::Join_internal internal call
33357 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
33359 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
33361 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
33362 mono_string_intern () to implement the semantics of the ldstr opcode
33363 and the interning of System.Strings.
33364 * icall.c: provide hooks to make String::IsIntern and String::Intern
33367 2001-09-23 Dick Porter <dick@ximian.com>
33370 * threads-dummy.h: New files of dummy threading routines
33372 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
33373 support code based on system specifics
33375 Rename PTHREAD_LIBS to THREAD_LIBS
33377 2001-09-23 Dick Porter <dick@ximian.com>
33379 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
33380 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
33382 (mono_thread_init): Set up a Thread object instance to return when
33383 the main thread calls Thread.CurrentThread
33384 (mono_thread_cleanup): Wait for all subthreads to exit
33386 * icall.c: New internal calls for System.Threading.Thread::Sleep
33387 (including Schedule) and CurrentThread
33389 * threads.h: New file, to insulate thread-specific stuff from the
33392 2001-09-21 Dick Porter <dick@ximian.com>
33394 * threads-pthread.h:
33395 * threads-pthread.c: New file, for handling pthreads-style
33396 threading support. Start() now starts a new thread and executes
33397 the ThreadStart delegate instance.
33399 * icall.c: Added the internalcall for
33400 System.Threading.Thread::Start_internal
33402 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
33404 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
33406 * loader.c: work around the different signatures for delegates
33407 constructors csc generates in compiled code vs the ones compiled in mscorlib.
33409 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
33411 * class.h, class.c: add mono_class_get_field_from_name ().
33412 * *: Fix C comments and other ANSI C issues.
33414 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
33416 * endian.h, assembly.c: fix some endianness issues.
33418 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
33420 * loader.h, load.c: add delegate_class to mono_defaults.
33421 Handle runtime provided methods in mono_get_method ().
33423 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
33425 * loader.c (mono_get_method): use pinvoke for internal call
33427 * icall.c: use pinvoke for internal call
33429 * loader.c (method_from_memberref): set the method name
33431 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
33433 * metadata.c: help the compiler generate better code for
33434 mono_class_from_mono_type ().
33436 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
33438 * class.c (mono_class_metadata_init): delayed computing of the
33439 class size to mono_class_metadata_init ()
33441 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
33443 * class.c, class.h: add an interfaces member to MonoClass.
33444 * image.c, image.h: add assembly_name field to MonoImage
33445 from the assembly table.
33446 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
33448 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
33450 * class.c: Handle Array in mono_class_from_mono_type ().
33451 * metadata.c, pedump.c: some endian fixes.
33453 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33455 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
33456 * metadata.c: fix small problem introduced with the latest commit.
33458 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
33460 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
33461 We don't need a MonoMetadata pointer anymore to compare signatures in
33462 mono_metadata_signature_equal (), update callers.
33463 Reduced memory usage an number of allocations for MonoMethodHeader and
33464 MonoMethodSignature.
33466 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
33468 * metadata.c: added compare for szarray.
33470 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
33472 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
33473 and add a couple more types to it and mono_defaults. Give an hint on
33474 classes that need implementing in our corlib and are referenced
33477 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
33479 * class.h, class.c: keep track if a class is also an Enum.
33480 * loader.c: Implement a couple more types for use in libffi
33481 marshalling. Gives better diagnostics when failing to dlopen
33482 a library. Set method->klass for P/Invoke methods, too.
33484 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
33486 * class.c, class.h: add a MonoType this_arg to MonoClass that
33487 represents a pointer to an object of the class' type that
33488 can be used by the interpreter and later the type cache.
33489 Add best guess alignment info for valuetype objects.
33491 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
33493 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
33494 into MonoType: one less level of indirection and allocation and
33495 simplifies quite a bit of code. Added cache for MonoTypes that are
33496 used frequently, so that we don't need to allocate them all the time.
33498 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
33500 * class.c (mono_class_create_from_typedef): System.Enum is also a
33501 value type, although it does not derive from System.ValueType
33502 (maybe a bug in the ms compiler?)
33504 * metadata.c (mono_type_size): return the right size for value types
33506 * loader.c (mono_get_method): only initialize method header if not abstract
33508 * class.c (mono_class_from_mono_type): use mono_default values.
33510 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
33512 * *: use MonoClass pointers instead of <type_tokens>
33514 * class.h: new flag: metadata_inited.
33516 * class.c (mono_class_metadata_init): impl.
33517 (mono_class_instance_size): impl.
33518 (mono_class_data_size): impl.
33520 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33522 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
33523 MonoClass now has the name and name_space fields.
33524 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
33525 mono_get_method () takes and optional MonoClass as argument.
33526 Removed mono_typedef_from_name() and added mono_class_token_from_name()
33527 instead that takes advantage of a map from class names to typedef
33528 tokens in MonoImage.
33530 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
33532 * metadata.c: zero is not a valid alignment boundary.
33533 Merge MONO_TYPE_VOID in default decoding code.
33535 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
33537 * image.h: merged MonoMetadata into MonoImage
33539 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
33540 identify the type of elements.
33542 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
33544 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
33545 * cil-coff.h: split MonoMSDOSHeader and add size info.
33546 * image.c: add some consistency checks.
33547 * metadata.c: fix row size computation: one programmer
33548 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
33549 add explanation for the locator routine.
33550 Fix decoding of size in method header.
33552 2001-08-20 Miguel de Icaza <miguel@ximian.com>
33554 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
33555 (g_concat_dir_and_file): Bring g_concat_dir_and_file
33556 function from gnome-libs. This uses the right path separator
33557 based on the OS, and also works around a bug in some systems where
33558 a double slash is not allowed.
33559 (default_assembly_name_resolver): Use g_concat_dir_and_file
33560 (mono_assembly_open): ditto.
33562 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
33564 * metadata.c (mono_metadata_signature_equal): impl.
33566 * *: void is now a realy MonoType (instead of using NULL)
33568 * metadata.c (do_mono_metadata_parse_type): use
33569 mono_metadata_parse_type to parse void value.
33571 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
33573 * metadata.c, metadata.h: in the signature and method header store
33574 only the space required for holding the loca vars and incoming arguments.
33576 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
33578 * metadata.c (do_mono_metadata_parse_type): treat void like any
33579 other type (instead of assigning NULL);
33581 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
33583 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
33585 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
33587 * image.c (do_mono_image_open): added a cache for arrays.
33589 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
33591 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
33592 decode a single column from a row in a metadata table and changes
33593 to take advantage of it in the typedef locator (gives a nice speed up).
33594 Store offset info for function params.
33596 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
33598 * image.h (MONO_IMAGE_IS_CORLIB): removed
33600 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
33602 * assembly.c: how could mono_assembly_close () had ever worked?
33603 * metadata.c, metadata.h: provide offset info for local vars.
33604 Implement mono_type_size () to take care of alignment as well
33605 as size (it was mono_field_type_size in cli/class.c before).
33607 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
33609 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
33611 * assembly.h (CORLIB_NAME): set to corlib.dll
33613 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
33615 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
33617 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
33618 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
33619 tokentype.h: massive namespace cleanup.
33621 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
33623 * metadata.h, metadata.c: decode exception clauses when parsing method header.
33625 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
33627 * metadata.c (mono_metadata_free_type): added check for type !=
33628 NULL (void) before calling mono_metadata_free_type()
33630 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
33632 * metadata.h, row_indexes.h: added header with enumerations to use
33633 to index in the columns from tables in metadata and to decode coded
33634 tokens: we should start using this instead of embedding magic numbers
33637 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
33639 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
33640 Move metadata_t info from cli_image_info_t to MonoImage, where
33641 it's easily accessible. Changed all the uses accordingly.
33642 Added the method and class caches to MonoImage.
33643 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
33644 and mono_metadata_decode_value () signature to be more consistent
33645 with the other parse functions (and simplify code). Taken advantage
33646 of zero-length array allocation with GCC. Removed reduntant (and
33647 wrong) MonoFieldType struct and use MonoParam instead. Changed
33648 mono_metadata_parse_field_type () to use common code for parsing.
33649 Added mono_metadata_typedef_from_field () and
33650 mono_metadata_typedef_from_method () to lookup a typedef index from a
33651 field or method token.
33652 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
33654 2001-07-23 Miguel de Icaza <miguel@ximian.com>
33656 * metadata.c (mono_metadata_parse_field_type): Implement.
33657 (do_mono_metadata_parse_type): Split engine from
33658 mono_metadata_parse_type, so that we can create smaller structures
33659 for things that just have one pointer to the MonoType (look at
33662 2001-07-20 Miguel de Icaza <miguel@ximian.com>
33664 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
33665 as Jan Gray found out, it is incorrect.
33667 2001-07-18 Miguel de Icaza <miguel@ximian.com>
33669 * assembly.c: Implement asssembly loading. This loads an image
33670 and loads all the referenced assemblies. Come to think of it, we
33671 could always do lazy loading of the assemblies.
33673 * image.c (mono_image_open): Keep loaded images in a hashtable.
33675 * image.h (MonoImage): Add reference count.
33677 2001-07-17 Miguel de Icaza <miguel@ximian.com>
33679 * assembly.c (mono_assembly_open): Keep track of the file name in
33680 case the assembly has no ASSEMBLY table.
33682 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
33685 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
33687 * metadata.c, metadata.h: decode local vars in method header
33688 parse function. Change callers accordingly.
33690 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
33692 * metadata.h, cil-coff.h: protect against multiple inclusion.
33693 Added some new structures to hold information decoded from metadata:
33694 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
33695 and relevant decoding/free functions.
33696 * metadata.c: implement decoding functions. Add warning for out of bounds
33697 index in mono_metadata_locate(). Implement mono_get_method () to retreive
33698 all the info about a method signature and invocation. Remove check on
33699 uninitialized local var in parse_mh() and fix memory leak.
33701 2001-07-12 Miguel de Icaza <miguel@ximian.com>
33703 * metadata.h: More macros.
33705 * tokentype.h: New file.
33707 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
33709 * assembly.c: added a consistency check and initialize
33710 some structures with g_new0().
33711 * metadata.c: fixed a couple more bugs in table size computation
33712 and add other checks for out-of bound access to metadata.
33714 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
33716 * metatada.c: fix bugs computing table sizes. Spew a
33717 warning when index in string heap is out of bounds.
33719 2001-07-04 Miguel de Icaza <miguel@ximian.com>
33721 * metadata.h: Add a couple of macros to manipulate tokens.
33723 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
33725 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
33726 cli_section_tables).
33728 2001-07-01 Miguel de Icaza <miguel@ximian.com>
33730 * metadata.c (mono_metadata_user_string): New function, provides
33731 access to the UserString heap.
33733 2001-06-27 Miguel de Icaza <miguel@ximian.com>
33735 * metadata.c: Add inline documentation.
33737 2001-06-26 Miguel de Icaza <miguel@ximian.com>
33739 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
33742 2001-06-22 Miguel de Icaza <miguel@ximian.com>
33744 * typeattr.h: New file, TypeAttribute flags.
33746 2001-06-21 Miguel de Icaza <miguel@ximian.com>
33748 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
33749 mono_assembly_ensure_section): Section loading code.
33750 (load_section_tables): Load the sections.
33752 * mono/metadata/metadata.c (mono_metadata_locate_token,
33753 mono_metadata_locate): Functions to locate the information
33754 definition given a token or a table and an index.
33755 (mono_metadata_compute_table_bases): New.
33756 (compute_size): New function to compute the sizes of the various
33759 * mono/metadata/metadata.h: Finish listing the different index
33762 * mono/metadata/pedump.c: Improve to dump new information.
33764 2001-06-19 Miguel de Icaza <miguel@ximian.com>
33766 * mono/metadata/metadata.c: Entered all the tables matching
33769 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2