1 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
3 * loader.c (method_from_memberref): Don't abort if the array
4 method is not found. A regular loader failure is more informative
9 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
11 *loader.c: Guard MonoImage::method_cache/methodref_cache
12 using the image lock instead of the loader lock.
14 * metadata.h: Add comments about which fields are protected by
17 2009-02-16 Zoltan Varga <vargaz@gmail.com>
19 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
21 * generic-sharing.c (mono_method_construct_object_context): Remove the
22 wrapper_type == NONE assert, it is not needed.
24 2009-02-15 Zoltan Varga <vargaz@gmail.com>
26 * reflection.c (clear_cached_object): New helper function.
27 (mono_method_clear_object): New function to clear the cached reflection
28 objects for a dynamic method.
30 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
31 Partly fixes # 463323.
33 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
37 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
39 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
41 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
42 take the image lock instead of the loader lock.
44 * metadata-internals.h: Export new functions.
46 2009-02-12 Miguel de Icaza <miguel@novell.com>
48 * domain.c (app_config_parse): Remove another use of stat that is
49 not necessary as g_file_get_contents already does the presence
52 2009-02-13 Zoltan Varga <vargaz@gmail.com>
54 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
56 * marshal.c: Move the bstr handling code to cominterop.c.
58 * marshal.c: Remove some COM interop code missed previously.
60 2009-02-12 Miguel de Icaza <miguel@novell.com>
62 More Paolo patches from the Wii port:
64 * security.c: Remove ves_icall_System_Environment_get_UserName
67 * icall.c: And put ves_icall_System_Environment_get_UserName
70 * appdomain.c (mono_set_private_bin_path_from_config): Remove
71 redundant call to stat that was only used to test for the file
72 existence. Patch from Paolo.
74 * gc.c (run_finalize): If COM is disabled, do not link in
75 mono_marshal_free_ccw.
77 * generic-sharing.c: Use alloca.h here as well.
79 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
81 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
83 2009-02-13 Zoltan Varga <vargaz@gmail.com>
85 * cominterop.c cominterop.h: New files.
87 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
88 function/typedefs which are needed by cominterop.c global.
90 2009-02-12 Mark Probst <mark.probst@gmail.com>
92 * generic-sharing.c: Don't take the loader lock to guard image
95 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
97 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
98 called without the loader lock which is required to guard MonoImage:tokens.
100 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
106 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
108 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
110 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
111 Rework the code to use regular mono_image_alloc/0.
113 * loader.c: Rework the code to use regular mono_image_alloc/0.
115 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
117 2009-02-12 Bill Holmes <billholmes54@gmail.com>
119 * object-internals.h : Fixing a typo in the
120 MonoReflectionComVisibleAttribute struct.
122 * marshal.c (cominterop_com_visible): Check the implemented
123 interfaces for ComImport.
125 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
126 assume that bools should be treated as VARIANTBOOLs.
128 * marshal.c (emit_marshal_boolean): Adding cases for
129 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
131 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
132 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
134 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
135 should be treated as VARIANTBOOLs.
137 Code is contributed under MIT/X11 license.
139 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
141 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
142 allocation with the image lock.
144 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
146 This patch is the last of a series to remove explicit reference of MonoImage::mempool
147 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
149 * object.c: Add mono_string_to_utf8_image.
151 * object-internals.h: Export mono_string_to_utf8_image.
153 * reflection.c: Rework all explicit references to the the image mempool to go thought
154 the mono_image_alloc set of functions.
156 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
158 This patch is the third of a series to remove explicit reference of MonoImage::mempool
159 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
160 and generics-sharing.c.
162 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
163 as first argument. Note that this function remains broken as it doesn't perform locking around the
166 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
168 * image.c: Add g_slist_append_image.
170 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
171 the supplied image for allocation. Move code into mono_metadata_field_info_full.
173 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
174 Fix all related code to do the same.
176 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
178 * metadata-internals.h: Fix the signatures.
180 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
182 This patch is the second of a series to remove explicit reference of MonoImage::mempool
183 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
184 and similar to work using MonoImage.
186 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
189 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
191 * class.c (mono_metadata_signature_deep_dup): Same.
193 * class.c (inflate_generic_type): Same.
195 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
197 * metadata.c (mono_metadata_signature_dup_full): Same.
199 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
200 mono_metadata_signature_dup_full.
202 * metadata.c (mono_metadata_type_dup): Same.
204 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
206 * reflection.c: Same.
208 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
210 * metadata-internals.h: Fix the signatures.
212 * class-internals.h: Same.
214 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
216 This patch is the first of a series to remove explicit reference of MonoImage::mempool
217 and use mono_image_alloc set of functions instead.
219 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
220 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
223 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
225 * class.c (g_list_prepend_mempool): Removed.
227 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
229 * image.c: Add g_list_prepend_image.
231 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
233 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
236 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
238 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
241 * image.c (mono_image_init): Init the lock field.
243 * image.c (mono_image_init): Cleanup the lock field.
245 * image.c: Add mono_image_(un)lock functions.
247 2009-02-11 Mark Probst <mark.probst@gmail.com>
249 * class.c, class-internals.h: mono_method_get_context_general()
250 combines the functionality of mono_method_get_context() and
251 mini_method_get_context().
253 * generic-sharing.c, domain-internals.h:
254 mono_method_construct_object_context() and
255 mono_domain_lookup_shared_generic() moved from mini.
257 * icall.c (ves_icall_InternalInvoke): Handle the case where the
258 method doesn't have the correct instantiation because it's shared
259 generic code. Fixes #473999.
261 2009-02-11 Zoltan Varga <vargaz@gmail.com>
263 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
265 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
267 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
269 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
271 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
273 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
274 and recheck the cache for dups after it.
276 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
278 Fixes one of the deadlocks found in #473150.
280 2009-02-11 Bill Holmes <billholmes54@gmail.com>
282 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
283 For Win32, add additional break conditions for accept.
285 Code is contributed under MIT/X11 license.
287 2009-02-10 Zoltan Varga <vargaz@gmail.com>
289 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
290 lazily initialize the native wrapper cache.
291 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
292 cache, since they are different from the normal wrappers.
294 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
296 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
297 AOT compiled native wrappers.
299 2009-02-09 Geoff Norton <gnorton@novell.com>
302 * security-core-clr.c: Allow enabling core-clr from the embedding
305 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
307 * socket-io.c: when requesting all the local ips, if there are no
308 interfaces up and running, MS returns 127.0.0.1.
310 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
312 * mono-perfcounters-def.h: processor time is an inverse time.
315 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
317 * socket-io.c: an empty host name returns the list of local IPs.
318 Fixes bug #386637 part 1/2.
320 2009-02-07 Zoltan Varga <vargaz@gmail.com>
322 * verify.c (mono_class_interface_implements_interface): Call
323 mono_class_setup_interfaces ().
324 (merge_stacks): Ditto.
326 2009-02-06 Zoltan Varga <vargaz@gmail.com>
328 * class.c (mono_class_setup_interfaces): New function to lazily initalize
330 (mono_generic_class_get_class): Don't initalize klass->interfaces.
331 (mono_generic_class_get_class): Ditto.
333 2009-02-06 U-QUACK\miguel <miguel@quack>
335 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
336 they live in security.c
338 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
339 another bit from Paolo's code.
341 2009-02-06 Zoltan Varga <vargaz@gmail.com>
343 * object.c (build_imt_slots): Add a small optimization to avoid inflating
344 methods which will be discarded by add_imt_builder_entry ().
346 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
349 * loader.c: Add a statistics for the size of the memberref signature cache.
351 * loader.c (find_cached_memberref_sig): New helper function.
352 (cache_memberref_sig): Ditto.
354 * loader.c: Cache the result of parsing memberref signatures, since otherwise
355 they will be parsed again for every generic instantiation, leading to unbounded
358 2009-02-05 Zoltan Varga <vargaz@gmail.com>
360 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
361 parameters of generic methods.
363 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
364 after the original method is copied to the inflated method.
365 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
367 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
368 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
370 * class.c metadata.c: Update after the changes above.
372 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
374 * metadata-verify.c: Simplified error handling and added
375 section table validation.
377 2009-02-05 Zoltan Varga <vargaz@gmail.com>
379 * class-internals.h (MonoClassExt): New structure containing rarely used
381 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
382 through a new 'ext' field.
384 * class.c (mono_class_alloc_ext): New helper function to allocate
387 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
389 2009-02-05 Mark Probst <mark.probst@gmail.com>
391 * object.c (mono_object_get_virtual_method): Properly inflate
392 generic methods. Fixes #472692.
394 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
396 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
397 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
398 for the parent type, the created type must be ready to be used on a generic
400 We fill this_arg/byval_arg if the parent is a generic instance to make sure
401 we won't have duplicated entries in generic_inst_cache.
405 2009-02-05 Miguel De Icaza <miguel@novell.com>
407 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
408 replace with plain BSD per the comments on the bug MONO77637.
410 2009-02-05 Zoltan Varga <vargaz@gmail.com>
412 * class.c (mono_class_get_generic_class): New accessor function.
413 (mono_class_get_generic_container): Ditto.
415 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
416 fields, similar to the ones in MonoMethod.
418 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
419 (mono_class_create_from_typedef): Set klass->is_generic if needed.
421 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
423 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
424 the same information as element_class->byval_arg.
426 * class.c reflection.c: Remove references to class->byval_arg.
428 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
429 klass->enum_basetype directly.
431 * verify.c metadata.c object.c icall.c reflection.c: Use
432 mono_class_enum_basetype () instead of accessing klass->enum_basetype
435 2009-02-04 Miguel de Icaza <miguel@novell.com>
437 * icall-def.h: Remove internal calls for sockets when
438 DISABLE_SOCKET is defined, file system writing features when the
439 OS only support reading and not writing data and Policy support if
440 the Policy is disabled.
442 * image.c (do_mono_image_open): Apply Paolo's patches for using
443 mono_file_map_ APIs here.
445 * assembly.c: Add support for platforms to avoid prefix
448 2009-02-04 Zoltan Varga <vargaz@gmail.com>
450 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
453 * class.c (mono_class_inflate_generic_class): New helper function.
455 * class.c: Use mono_class_inflate_generic_class in a few places. Add
456 statistics for inflated methods/classes.
458 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
460 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
461 the call is made from Delegate.CreateDelegate () for the invoke method of
464 * loader.c: Add a statistics for the memory occupied by inflated signatures.
466 * metadata.c (mono_metadata_signature_size): New helper function.
468 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
471 * metadata.c (inflated_method_in_image): Avoid calling
472 mono_method_signature () if the method does not already have a signature.
474 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
476 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
477 valuetype is compatible with target type, check by inheritance as a
478 VT is not really compatible with System.ValueType, for example.
480 * verify.c (do_invoke_method): Improve error message.
482 * verify.c (do_box_value): If boxing a nullable, use the type argument
485 * verify.c (do_newobj): Improve error message.
489 2009-02-03 Miguel de Icaza <miguel@novell.com>
491 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
493 2009-02-03 Mark Probst <mark.probst@gmail.com>
495 * generic-sharing.c: Don't hold domain lock when calling
496 instantiate_other_info(). Fixes #471958.
498 * domain-internals.h, loader.c: Describe locking policy of domain
501 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
503 * verify.c (mono_delegate_signature_equal): Make it possible to check
504 first-arg-bound delegates to static method.
506 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
507 static methods with the first arg bound.
511 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
513 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
516 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
517 under strict mode. Any type, when boxed can be seen as a reference type.
521 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
523 * object.h: The lower bound of an array is a signed integer value.
524 Introduce mono_array_lower_bound_t typedef. It should be used instead of
525 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
527 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
528 calculate the upper bound.
532 2009-02-02 Miguel de Icaza <miguel@novell.com>
534 From Paolo's work, refactored, cleared up:
536 * threadpool.c, icall.c: ifdef code that requires a working socket
539 * metadata.c (mono_metadata_field_info): Do not attempt to return
540 a value from a function declared as void.
542 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
543 from the console stack.
545 * assembly.c: use strrchr instead of rindex.
547 * class.c, object.c, marshal.c, icall.c, reflection.c: include
548 alloca.h on systems that have it.
550 * environment.c: Avoid code that uses stuff from
553 * appdomain.c: Include sys/time.h.
555 * console-io.c: include sys/ioctl.h if it is available.
557 2009-02-03 Zoltan Varga <vargaz@gmail.com>
559 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
561 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
564 * marshal.c: Set mb->skip_visibility instead of setting it on the method
565 after it was created and cached, as the later is not thread safe.
567 2009-02-02 Zoltan Varga <vargaz@gmail.com>
569 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
570 called while the debugging module is not initialized. Fixes #471669.
572 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
574 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
578 2009-02-02 Mark Probst <mark.probst@gmail.com>
580 * generic-sharing.c (lookup_or_register_other_info): Make sure the
581 loader lock is not taken while the templates lock is held. Fixes
584 2009-02-02 Mark Probst <mark.probst@gmail.com>
586 * metadata.c (type_in_image): Added a check to fix a monodis
589 2009-02-02 Zoltan Varga <vargaz@gmail.com>
591 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
594 * object.c (mono_runtime_invoke_array): Ditto.
596 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
597 freeing wrappers of dynamic methods.
599 * loader.c (mono_free_method): Call it. Fixes #463323.
601 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
602 methods taking vtype/byref arguments, to fix yet another bug caused by
603 the sharing of runtime invoke wrappers. Partly fixes #471259.
605 2009-02-01 Zoltan Varga <vargaz@gmail.com>
607 * debug-mono-symfile.c (check_line): Return NULL instead of returning
608 <first file in file table>:1 when the IL offset does not have an associated
611 2009-01-31 Zoltan Varga <vargaz@gmail.com>
613 * mono-debug.c (mono_debug_lookup_locals): New function to return local
614 variable info for a method.
616 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
618 2009-01-30 Jb Evain <jbevain@novell.com>
620 * pedump.c: reuse code from monodis to make sure pedump honors
621 MONO_PATH, which is needed to verify net_2_1 assemblies.
623 2009-01-29 Zoltan Varga <vargaz@gmail.com>
625 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
626 there is no line number info.
628 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
630 Avoid some MonoType allocations
631 * reflection.c (mono_reflection_initialize_generic_parameter):
632 Reuse MonoType from param->pklass rather than allocating one.
633 (mono_dynamic_image_free): Update to changes.
635 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
637 Rearrange some code to improve consistency
638 * reflection.c (mono_reflection_setup_generic_class): Move body ...
639 (mono_reflection_initialize_generic_parameter): ... here.
641 2009-01-28 Zoltan Varga <vargaz@gmail.com>
643 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
644 with type constraints as an experiment.
646 * boehm-gc.c (on_gc_notification): Update mono_stats.
648 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
650 Avoid some allocations
651 * class-internals.h (_MonoGenericInst::type_argv): Convert from
652 pointer to tail array to avoid extra allocation.
653 * metadata.c (free_generic_inst): Update to changes.
654 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
657 2009-01-27 Zoltan Varga <vargaz@gmail.com>
659 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
660 return TRUE if the two type objects are the same.
662 2009-01-26 Zoltan Varga <vargaz@gmail.com>
664 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
665 (mono_class_native_size): Use klass->marshal_info->min_align instead of
666 klass->min_align, since klass->min_align contains the managed alignment,
667 while the native alignment can be different, like for longs on x86.
670 * class-internals.h (MonoMarshalType): Add a min_align field.
672 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
674 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
677 2009-01-26 Zoltan Varga <vargaz@gmail.com>
679 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
680 some comments about the usage of the used_regs field.
682 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
685 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
687 * appdomain.c: return NULL instead of throwing FileNotFoundException
688 when LoadAssembly() fails.
690 2009-01-23 Mark Probst <mark.probst@gmail.com>
692 * metadata.c (mono_metadata_generic_param_equal): Only compare the
693 image if the owner is NULL. Fixes the AOT failures.
695 2009-01-23 Zoltan Varga <vargaz@gmail.com>
697 * metadata.c (mono_metadata_load_generic_params): Initialize the
698 MonoGenericParam structure using memset so the image field is initialized
701 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
703 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
706 2009-01-21 Zoltan Varga <vargaz@gmail.com>
708 * class.c (mono_class_setup_vtable_general): In the generic instance
709 optimization, set method->slot for abstract virtual methods. Fixes part of
712 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
714 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
715 which signals that the unloading has started but all appdomain services must
718 * appdomain.c (mono_domain_unload): The initial state for unloading now
719 is unloading_start and we switch to unloading after the managed call to
720 AppDomain::DomainUnload has finished.
722 The new unloading state has to be created because managed code in the
723 DomainUnload event can depend on things like the threadpool still working.
724 The domain must remain fully functional while the event executes.
726 This shown as an issue due to Process::WaitForExit, which waits for
727 async reads of stdout and stderr to complete. Since those are processed
728 in the threadpool the code deadlocks because the DomainUnload callback
729 waits for the async read finished event, which should have been set by a
730 threadpool job but has been discarded due to the domain been in unload
733 2009-01-21 Mark Probst <mark.probst@gmail.com>
735 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
738 2009-01-21 Mark Probst <mark.probst@gmail.com>
740 * reflection.c (resolve_object): For fields, inflate the class and
741 then get the field in the inflated class.
743 2009-01-20 Mark Probst <mark.probst@gmail.com>
745 * object-internals.h (struct _MonoException): Added a comment
746 explaining the new use of trace_ips.
748 2009-01-20 Mark Probst <mark.probst@gmail.com>
750 * generic-sharing.c (inflate_other_data): Inflate array methods
753 * loader.c, class-internals.h: Rename search_in_array_class() to
754 mono_method_search_in_array_class() and make it non-static.
756 2009-01-19 Zoltan Varga <vargaz@gmail.com>
758 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
759 Hopefully fixes #458168.
761 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
763 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
764 as it is performed elsewhere.
766 Code is contributed under MIT/X11 license
768 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
770 * mono-perfcounters-def.h: Add counters for asp.net requests total and
772 * object.c (mono_raise_exception): Increment the exceptions total
773 counter when an exception is thrown.
774 * class-internals.h: Add a location for storing the total number of
775 asp.net requests served.
776 * mono-perfcounters.c: Implement update support for asp.net counters
777 from the class libraries. Implement read support for asp.net counters
778 and exceptions total counter.
780 2009-01-19 Zoltan Varga <vargaz@gmail.com>
782 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
783 accessing klass->methods. Fixes #467385.
785 2009-01-18 Zoltan Varga <vargaz@gmail.com>
787 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
788 for byval arguments without an [Out] attribute. Fixes #467212.
790 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
791 Fix compilation under android.
793 * sgen-gc.c: Instead of scanning gray objects after all roots have been
794 processed, scan them directly after they are copied, to achieve better locality
797 * socket-io.c: Applied patch from Koushik Dutta
798 (koush@koushikdutta.com). Disable IPV6 when running under android.
800 2009-01-18 Zoltan Varga <vargaz@gmail.com>
802 * icall.c (ves_icall_InternalExecute): Add write barriers.
804 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
807 * sgen-gc.c: Implement write barriers in IL code.
809 2009-01-17 Geoff Norton <gnorton@novell.com>
811 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
813 2009-01-17 Geoff Norton <gnorton@novell.com>
815 * image.c: When unloading the image->references table, there can be gaps
816 in it. Ensure that we iterate every entry to avoid leaking assembly references
817 when unloading an appdomain.
819 2009-01-16 Zoltan Varga <vargaz@gmail.com>
821 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
822 speed up ptr-in-nursery checks.
824 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
825 threads_lock () to prevent deadlocks.
827 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
828 does not need to be scanned during minor collections, since writes to it
829 must use write barriers.
831 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
833 * metadata-verify.c: Add pe nt header verification.
835 2009-01-15 Zoltan Varga <vargaz@gmail.com>
837 * gc.c: Fix a few warnings when using SGEN.
839 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
841 * metadata-verify.c: Add pe optional header verification.
843 2009-01-15 Zoltan Varga <vargaz@gmail.com>
845 * sgen-gc.c: Add support for user defined marker functions, used by
846 MonoGHashTable to avoid registering a GC root for every hash node.
848 2009-01-14 Zoltan Varga <vargaz@gmail.com>
850 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
851 non-pinned roots into separate hashes to avoid having to traverse them
852 in functions which are only interested in one kind.
854 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
856 * metadata-verify.c: Add pe header machine field verification.
858 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
860 * metadata-verify.c: Add pe header size verification.
862 2009-01-14 Zoltan Varga <vargaz@gmail.com>
864 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
865 using the GC, they don't contain references.
867 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
869 2009-01-13 Geoff Norton <gnorton@novell.com>
871 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
872 AppDomains created on the native side can be cleaned up on the native side.
874 2009-01-13 Geoff Norton <gnorton@novell.com>
876 * appdomain.c: Ensure that we call mono_context_init for the embedding api
877 as well as the managed api.
879 2009-01-13 Geoff Norton <gnorton@novell.com>
881 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
882 with a MonoAppDomain initialized against it.
884 2009-01-13 Zoltan Varga <vargaz@gmail.com>
886 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
888 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
890 * marshal.c: Avoid setting the exception clauses after a method has been entered
891 into the wrapper caches. Fixes #465700.
893 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
895 (mono_mb_create_method): Set the clauses from the method builder.
897 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
899 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
900 Patch from Makoto Kishimoto.
902 2009-01-13 Zoltan Varga <vargaz@gmail.com>
904 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
905 encoding them as ROOT_DESC_COMPLEX.
906 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
908 2009-01-12 Zoltan Varga <vargaz@gmail.com>
910 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
911 no longer point to the nursery.
913 * sgen-gc.c: Add a few comments/FIXMEs.
915 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
917 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
918 initialization of the various _method variables thread safe. Fixes
921 2009-01-12 Mark Probst <mark.probst@gmail.com>
923 * domain.c, domain-internals.h: Remove the shared_generics_hash
924 and its lookup functions.
926 2009-01-12 Bill Holmes <billholmes54@gmail.com>
928 * socket-io.c: Fixing the MSVC build.
930 Code is contributed under MIT/X11 license.
932 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
934 * metadata-verify.c: Add pe header watermark verification.
936 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
938 * metadata-verify.c: Add lfanew verification.
940 2009-01-12 Jb Evain <jbevain@novell.com>
942 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
943 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
945 2009-01-10 Zoltan Varga <vargaz@gmail.com>
947 * socket-io.c: Fix the build.
949 * environment.c: Fix an #ifdef.
951 2009-01-09 Zoltan Varga <vargaz@gmail.com>
953 * threadpool.c (async_invoke_thread): Handle the wait function returning
954 WAIT_IO_COMPLETION as well.
955 (async_invoke_io_thread): Ditto.
957 2009-01-09 Bill Holmes <billholmes54@gmail.com>
959 * threads.c: Fixing the Windows build.
961 Code is contributed under MIT/X11 license.
963 2009-01-09 Zoltan Varga <vargaz@gmail.com>
965 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
967 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
968 the thread to wait again.
970 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
972 * metadata-verify.c: Initial skeleton of the metadata verifier.
974 * pedump.c: Add support for the metadata verifier.
976 * verify-internal.h: Export the whole assembly metadata verifier function.
978 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
980 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
982 2009-01-09 Zoltan Varga <vargaz@gmail.com>
984 * Makefile.am: Upgrade dtrace-prelink.sh location.
986 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
988 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
989 well. Otherwise the shutdown deadlock that happens on unix will can happen
991 If the main thread code finishes too fast it's possible that the finalizer
992 thread won't have executed yet, won't record itself as the finalizer thread
993 and the shutdown sequence will wait on it forever.
995 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
997 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
1000 2009-01-08 Miguel de Icaza <miguel@novell.com>
1002 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
1003 Robert Jordan for pointing this out.
1005 2009-01-08 Christian Prochnow <cproch@seculogix.de>
1008 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
1009 ves_icall_System_IO_DriveInfo_GetDriveType.
1011 2009-01-07 Miguel de Icaza <miguel@novell.com>
1013 * icall.c: Wrap calls to mono_strtod in CriticalSection
1014 invocations when using eglib, to work around #464316.
1016 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1018 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
1019 return value of GetCurrentDirectory to never access unitialized memory.
1021 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1023 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
1024 return value of GetCurrentDirectory and expand the buffer if needed.
1028 2009-10-07 Tom Hindle <tom_hindle@sil.org>
1030 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
1031 Adding a call to mono_init_com_types.
1033 Code is contributed under MIT/X11 license.
1035 2009-01-07 Geoff Norton <gnorton@novell.com>
1037 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
1038 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
1039 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
1040 be the value of the ip buffer.
1042 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
1044 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
1045 interfaces_packed here.
1047 Fixes part of #463294.
1049 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
1051 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
1053 Fixes part of #463294.
1055 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
1057 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
1058 is a boxed complex as well.
1060 Fixes part of #463294.
1062 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
1064 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
1065 control if a methodspec should be created for the generic method definition from external assemblies.
1066 Caching of methodspec is done using the handleref hash table.
1070 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
1072 * loader.c (find_method): When searching the interfaces of a class
1073 check the transitive closure of implemented interfaces.
1077 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
1079 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
1081 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
1083 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
1084 interfaces calculation to fill_valuetype_array_derived_types.
1086 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
1087 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
1090 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
1091 interfaces for valuetypes if needed.
1093 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
1094 for their basetype as well. Types are array expanded if rank is > 0.
1098 2008-12-30 Bill Holmes <billholmes54@gmail.com>
1100 * socket-io.h : Changing the signature of
1101 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
1104 * icall-def.h : Changing the signature of
1105 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
1107 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
1108 For Windows only. Avoid blocking when calling accept by
1109 querying for a connection via select. The loop also queries
1110 the thread state every 1000 micro seconds for the thread
1111 stop state. This will avoid the process hanging on shutdown
1112 when using a TcpChannel that is never connected to.
1114 Code is contributed under MIT/X11 license.
1116 2008-12-30 Marek Safar <marek.safar@gmail.com>
1118 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
1120 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1122 * class.c (get_implicit_generic_array_interfaces): Extract common
1123 code to a helper function making it a lot easier on the eyes.
1125 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1127 * class.c (get_implicit_generic_array_interfaces): If the internal
1128 enumerator is an interface inflate System.Object instead of itself.
1132 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
1134 * object.c (mono_runtime_invoke_array): Don't assert with
1135 byref nullable types.
1137 * marshal.c (mono_marshal_get_runtime_invoke): To handle
1138 byref nullables we unbox the object and store it on the
1140 We can't use the boxed object since it is the T of Nullable<T>
1141 and the boxed representation of a nullable it's underlying type
1143 We could cheat and create a boxed nullable and use the same
1144 machinery of other byref VTs but this feels like a hack and
1145 using the stack has the bonus of reducing heap pressure.
1149 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
1151 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
1156 2008-12-19 Bill Holmes <billholmes54@gmail.com>
1158 * icall-def.h : Adding an internal call definition for
1159 System.Environment.internalBroadcastSettingChange.
1161 * icall.c : Adding a Windows only implementation to broadcast a
1162 WM_SETTINGCHANGE when an environment variable has changed.
1164 Code is contributed under MIT/X11 license.
1166 2008-12-19 Mark Probst <mark.probst@gmail.com>
1168 * class.c, class-internals.h: Made
1169 mono_class_has_parent_and_ignore_generics() non-static.
1171 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
1173 * image.c: deal with the mmap failing when loading an image.
1175 2008-12-17 Geoff Norton <gnorton@novell.com>
1177 * threadpool.c: Ensure that the io_queue_lock is initialized
1178 in all circumstances, as we always attempt to cleanup against it.
1180 2008-12-17 Miguel de Icaza <miguel@novell.com>
1182 * icall.c (ves_icall_System_Environment_get_Platform): For
1183 compatibility reasons for existing client code we will keep
1184 returning 4 for a while.
1186 For how long will depend on the documentation being updated, and
1187 for us to give client code a chance to be updated.
1189 This reverts the original decison on #433108 since we did not
1190 catch roughly 33 instances of the broken code in our own source
1191 code base, we did not catch failures on the buildbots, and QA did
1192 not bring this as a problem.
1194 Only today I found some customer's code breaking due to our own
1195 class libraries not being fully updated and tracked it down to
1196 this change. I am reverting it because if we could not even get
1197 our story straight in our own code base, how can we hope that our
1198 end user code be fixed?
1200 As of this morning, our Wiki page that documents how to detect
1201 Unix had not been fixed.
1203 2008-12-16 Zoltan Varga <vargaz@gmail.com>
1205 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
1207 * class.c (mono_class_get_fields): Handle loading errors.
1209 2008-12-12 Mark Mason <mmason@upwardaccess.com>
1211 * 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.
1213 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
1215 * mono-perfcounters.c: avoid warning.
1217 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1219 * reflection.c (ensure_runtime_vtable): Work on generic instances and
1220 make sure all interfaces have MonoClass::interface_id set.
1222 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
1223 method table is property set.
1225 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1227 * class.c: New function mono_class_setup_interface_id that setup
1228 MonoClass::interface_id if needed.
1230 * class-internals.h: Export new function.
1232 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1234 * class.c: Add code to sanity check the vtable after setup_vtable_general
1237 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1239 * icall.c: make Assembly.GetExecutingAssembly work properly when
1240 reflection is used to invoke the method.
1243 2008-12-11 Mark Probst <mark.probst@gmail.com>
1245 * metadata/generic-sharing.c: Look for constraints in all type
1246 arguments, not just the first one.
1248 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1250 * appdomain.c: return the correct CodeBase for an Assembly instance
1251 that was loaded from the shadow-copy directories.
1254 2008-12-10 Zoltan Varga <vargaz@gmail.com>
1256 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
1258 * sgen-gc.c (check_object): New debugging helper function.
1260 * object.c: Fix calls to mono_value_copy_array ().
1262 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1264 * class.c (mono_class_setup_fields): If working on an inflated class
1265 first check if the generic definition did init with success.
1269 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1271 pedump.c (main): Fix a warning.
1273 2008-12-10 Bill Holmes <billholmes54@gmail.com>
1275 * object-internals.h : Adding a definition for
1276 MonoReflectionComVisibleAttribute.
1278 * marshal.c (cominterop_com_visible) : Method added to check the
1279 ComVisible attribute of a class.
1281 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
1282 cominterop_raise_hr_exception added to consolidate common code
1283 to raise hr exceptions.
1285 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
1286 if a managed class should support IDispatch.
1289 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
1290 Added additional checks for managed object when getting
1291 an IDispatch interface.
1293 Code is contributed under MIT/X11 license.
1295 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1297 pedump.c (main): Handle mono_get_method () returning NULL.
1299 2008-12-09 Zoltan Varga <vargaz@gmail.com>
1301 * marshal.h: Fix a warning.
1303 2008-12-09 Bill Holmes <billholmes54@gmail.com>
1305 * marshal.c : Adding cominterop_release_all_rcws to release all
1306 runtime callable wrappers held by the runtime.
1308 * marshal.h : Adding declaration for cominterop_release_all_rcws.
1310 Code is contributed under MIT/X11 license.
1312 2008-12-09 Zoltan Varga <vargaz@gmail.com>
1314 * metadata.c (mono_image_alloc_lock): New helper function.
1315 (mono_image_alloc0_lock): Ditto.
1317 * metadata.c: Use the alloc_lock () helper functions for allocating
1318 memory from the image mempool.
1320 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1322 * class.c (mono_class_from_generic_parameter): Document it's
1323 locking behavior. Fix double checked locking here, we stored in
1324 param->pklass a partially initialized MonoClass and no membar was used.
1326 2008-12-05 Marek Habersack <mhabersack@novell.com>
1328 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
1329 (3) functions are present in the C library use them to do the
1330 job. If they are absent, make sure that the sum of int_part and
1331 dec_part is rounded before returning. This is necessary due to the
1332 division of dec_part by the power of 10 before the final addition
1333 is performed - if the result is not rounded in some cases it will
1334 yield invalid results.
1336 2008-12-04 Zoltan Varga <vargaz@gmail.com>
1338 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
1339 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
1340 instruction instead of a pointer constant.
1342 2008-12-03 Zoltan Varga <vargaz@gmail.com>
1344 * loader.c (mono_method_get_header): Do most of the work outside the
1345 loader lock, to avoid assembly load hook deadlocks.
1347 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
1348 (mono_metadata_parse_type_full): Ditto.
1350 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1352 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
1353 Make the stack depth fixed. Ensure proper argument passing to the backtrace
1354 funtions. Finally, use a lock to produce well ordered output.
1356 The lock looks silly, as all calls to the corlib mempool should be guarded
1357 with the loader lock, but for some reason this fact doesn't help.
1359 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
1361 2008-12-02 Mark Probst <mark.probst@gmail.com>
1363 * socket-io.c: 64 bit big-endian fixes.
1365 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1367 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
1368 targets that require strict compatibility between the types.
1370 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
1371 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
1372 Kill the strict argument and create a new one valuetype_must_be_boxed.
1374 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
1375 state that all valuetypes must be boxed.
1379 2008-11-29 Kornél Pál <kornelpal@gmail.com>
1381 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
1382 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
1384 Contributed under MIT/X11 license.
1386 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
1388 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
1389 the inflate_generic_type machinery should handle it.
1391 This avoids a crash when the field's flags is zero and it's type is
1393 What happens is that mono_metadata_parse_type_full will see that opt_attrs
1394 is zero and will return one of the cached built-in primitive types. Since
1395 those types live in read-only memory, the code that copies it crashes.
1397 2008-11-28 Mark Probst <mark.probst@gmail.com>
1399 * object.c: Don't put function descriptors into generalized IMT
1402 2008-11-28 Mark Probst <mark.probst@gmail.com>
1404 * class.c: Enable generic code sharing on PPC64.
1406 2008-11-27 Mark Probst <mark.probst@gmail.com>
1408 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
1411 * generic-sharing.c: Allocate the method template slists from the
1412 image mempool so it doesn't leak.
1414 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1416 * class.c (generic_array_methods): Release the linked list.
1418 2008-11-27 Mark Probst <mark.probst@gmail.com>
1420 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
1421 invocation to g_utf16_to_utf8().
1423 2008-11-26 Mark Probst <mark.probst@gmail.com>
1425 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
1426 arguments on big endian archs.
1428 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1430 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
1431 the type name (test added in corlib).
1433 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1435 * pedump.c: initialize perf. counters. Fixes a segv.
1437 2008-11-25 Martin Baulig <martin@ximian.com>
1439 * mono-debug-debugger.c
1440 (mono_debugger_runtime_invoke): Return the exception object if an
1441 exception was thrown. Visual Studio displays the exception object
1442 in the locals window.
1444 2008-11-24 Mark Probst <mark.probst@gmail.com>
1446 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
1449 2008-11-24 Mark Probst <mark.probst@gmail.com>
1451 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
1452 MONO_TYPE_U are sizeof (gpointer), too.
1454 2008-11-24 Mark Probst <mark.probst@gmail.com>
1456 * marshal.c (mono_type_native_stack_size): Fixed size and
1457 alignment for reference types.
1459 2008-11-23 Mark Probst <mark.probst@gmail.com>
1461 * class.c (mono_class_generic_sharing_enabled): Disable generic
1462 code sharing for PPC64.
1464 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1466 * icall.c (mono_method_get_equivalent_method): Make sure
1467 method->klass->methods is inited before looping over it.
1469 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1471 * object.c: when calling ExecuteAssembly in a newly created domain,
1472 the configuration file and application base are already set up.
1473 Bug #446353 take 2 fixed.
1475 2008-11-20 Zoltan Varga <vargaz@gmail.com>
1477 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
1478 Fixes #444715. Fix a warning.
1480 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
1482 * appdomain.c: write the full path of the assembly to the .ini file
1483 created when "shadow-copying"
1486 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1488 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
1489 if signature==FALSE.
1491 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1493 * marshal.h : Fix the cygwin build.
1494 marshal.c:12442: undefined reference to `_IID_IMarshal'
1496 Code is contributed under MIT/X11 license.
1498 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1500 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
1501 free threaded marshaler when QueryInterface is called on a COM callable
1502 wrapper requesting the IMarshal interface.
1504 Code is contributed under MIT/X11 license.
1506 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1508 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
1510 * reflection.c (mono_type_get_object): Special case the very common
1513 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
1516 2008-11-13 Bill Holmes <billholmes54@gmail.com>
1518 * process.h : Adding method declaration for
1519 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1521 * process.c : Adding implementation for
1522 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1524 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
1525 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1527 Code is contributed under MIT/X11 license.
1529 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
1531 * appdomain.c (unload_thread_main): Clean up threadpool by
1532 calling mono_thread_pool_remove_domain_jobs.
1534 * domain-internals.h (struct _MonoDomain): Add new fields to
1535 help coordinate the cleanup of the threadpool.
1537 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
1538 that cleans up the threadpool of all jobs associated with an appdomain.
1539 It does that by cleaning up the queues and making sure all active
1540 threads are accounted.
1542 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
1543 unloaded or in the process of. Take this is such way that there is
1544 no race condition between another thread starting the unload and the
1545 current thread acknowledging it.
1547 * threadpool.c (async_invoke_thread): Same.
1549 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
1550 firing the new thread.
1552 * threadpool.c (start_tpthread): Same.
1554 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
1556 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
1558 2008-11-06 Jonathan Chambers <joncham@gmail.com>
1560 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
1561 Add support for DuplicateHandle.
1563 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
1564 Add support for DuplicateHandle.
1566 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
1567 Add support for DuplicateHandle.
1569 Code is contributed under MIT/X11 license.
1571 2008-11-06 Mark Probst <mark.probst@gmail.com>
1573 * class-internals.h: Make min_align into a whole byte.
1575 * class.c: Set min_align for SIMD types to 16.
1577 2008-11-05 Geoff Norton <gnorton@novell.com>
1579 * attach.c: Default the attacher to enabled for all cases including
1582 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1584 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
1587 2008-11-04 Mark Probst <mark.probst@gmail.com>
1589 * monitor.c, monitor.h: New function for querying offsets of
1590 members of MonoThreadsSync.
1592 2008-11-04 Zoltan Varga <vargaz@gmail.com>
1594 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
1595 to speed up this function and to avoid the boundless memory growth caused by
1596 the signature_dup () calls.
1598 2008-11-02 Zoltan Varga <vargaz@gmail.com>
1600 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
1603 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
1606 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
1608 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
1611 * domain-internals.h: made mono_set_private_bin_path_from_config()
1613 * object.c: call the above function after setting the configuration
1614 file path for the root domain.
1617 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
1619 * assembly.c: when the assembly is loaded from an absolute path, end
1620 basedir with a directory separator.
1623 2008-10-30 Mark Probst <mark.probst@gmail.com>
1625 * monitor.c (mono_monitor_get_fast_enter_method): If
1626 CompareExchange is not available, don't create the fastpath
1627 instead of asserting. (The method is missing in the 1.1 profile.)
1629 2008-10-30 Mark Probst <mark.probst@gmail.com>
1631 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
1633 * monitor.c, monitor.h: Code for generating Monitor.Enter and
1634 Monitor.Exit IL fastpaths.
1636 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1638 * class.c (mono_class_create_from_typedef): Added Vector2ul.
1640 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1642 * class.c (mono_class_create_from_typedef): Added Vector2l.
1644 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
1646 * class.c (mono_class_create_from_typedef): Added Vector2d.
1648 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1650 * appdomain.c: translate \ into / for cache_path.
1651 * domain-internals.h: new mono_is_shadow_copy_enabled().
1652 * icall.c: (fill_reflection_assembly_name) do the same path
1653 manipulations that get_code_base does.
1654 (get_code_base) use mono_is_shadow_copy_enabled.
1656 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1658 * appdomain.c: shadow-copied assemblies go to CachePath +
1659 ApplicationName when both are set. DynamicBase has nothing to do with
1663 2008-10-26 Zoltan Varga <vargaz@gmail.com>
1665 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
1666 STANDALONESIG table.
1668 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
1669 standalone signatures.
1671 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
1672 comparison code: instead of comparing the signatures using a custom
1673 equals function, transform them to a common signature and compare that. This
1674 works better with AOT.
1676 2008-10-25 Zoltan Varga <vargaz@gmail.com>
1678 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
1680 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
1681 call for generic instances.
1682 (mono_class_setup_properties): Call setup_properties () before accessing
1685 * class.c (mono_class_get_virtual_methods): New helper function to iterate
1686 over the virtual methods of a class using metadata if possible, avoiding the
1687 creation of MonoMethod's for non-virtual methods.
1689 * class.c (mono_class_setup_vtable_general): Rewrite this to use
1690 get_virtual_methods () to iterate over the virtual methods of classes.
1692 2008-10-25 Martin Baulig <martin@ximian.com>
1694 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
1696 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1698 * class.c (mono_class_create_from_typedef): Added Vector4i.
1700 2008-10-24 Mark Probst <mark.probst@gmail.com>
1702 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
1703 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
1704 special-casing applies to eliminate the call completely.
1706 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1708 * class.c (mono_class_create_from_typedef): Added Vector8s.
1710 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
1712 * class.c (mono_class_create_from_typedef): Added Vector16sb.
1714 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
1716 * icall.c: get rid of annoying warning.
1718 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
1720 * threadpool.c: in 1.x, if you change the background status of the
1721 threadpool thread, it's not reset.
1722 Remove unnecessary calls to SetState.
1724 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1726 * threadpool.c: asynchronously create a set of idle threads upon first
1727 use of the threadpool. SetMinThreads will now start the appropriate
1728 number of idle threads if they are not already running. The default is
1729 1 threadpool thread per CPU. Increased the maximum number of threads
1732 2008-10-22 Martin Baulig <martin@ximian.com>
1734 Revert r116521 from Zoltan, it breaks the debugger:
1736 * class.c (mono_class_get_virtual_methods): New helper function to iterate
1737 over the virtual methods of a class using metadata if possible, avoiding the
1738 creation of MonoMethod's for non-virtual methods.
1740 * class.c (mono_class_setup_vtable_general): Rewrite this to use
1741 get_virtual_methods () to iterate over the virtual methods of classes.
1743 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1745 * threads.c: when creating a threadpool thread, set its state to
1747 * threadpool.c: reset the background state of a threadpool thread
1748 after finishing each work item
1751 2008-10-22 Zoltan Varga <vargaz@gmail.com>
1753 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
1755 * class.c (mono_class_setup_vtable_general): Add an optimized version for
1756 generic instances which works by inflating the methods in the container
1759 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
1760 variant which doesn't make a copy if no inflation was done.
1761 (mono_class_setup_fields): Use it.
1763 * metadata.c (mono_metadata_get_shared_type): New helper function to
1764 return a shared instance of a given MonoType.
1766 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
1767 a copy of most non-generic types.
1769 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1771 * threadpool.c: remove one more GetSystemInfo () call.
1773 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
1775 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
1776 use the code in mono-proclib.h to get processor information.
1778 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1780 * appdomain.c: fixed the logic that determines whether assemblies in a
1781 directory are "shadow-copied" or not. Bug #433483 fixed.
1783 2008-10-22 Zoltan Varga <vargaz@gmail.com>
1785 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
1788 2008-10-21 Zoltan Varga <vargaz@gmail.com>
1790 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
1793 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
1794 reflection.c: Use mono_field_get_name () for accessing a field's name.
1796 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
1799 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
1802 * loader.c (find_method_in_class): Reenable the metadata optimization by
1803 not using it for generic instances.
1805 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
1806 data/def_type fields from MonoClassField into a separate structure.
1807 (struct MonoClassField): Remove data/def_type fields.
1808 (struct _MonoClass): Add a 'field_def_values' array to store the default
1809 values/RVA for fields.
1811 * class.c reflection.c: Update after the changes.
1813 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
1814 for accessing field->data.
1816 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
1818 * loader.c (find_method_in_class): Revert the last change for now as
1819 it breaks Mono.C5 unit tests.
1821 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
1822 'field_generic_types' and 'field_objects' which contain the information
1823 previously stored in MonoInflatedField.
1824 (MonoInflatedField): Delete.
1825 (struct _MonoClassField): Delete 'generic_info' field.
1827 * reflection.c: Store the information which was previously in
1828 field->generic_info in MonoDynamicGenericClass instead.
1830 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
1831 MonoClassField changes.
1833 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
1835 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
1836 store the value inside the data array of the MonoMethodWrapper.
1837 This saves memory, is faster and fixes the lifetime issues (methods
1838 were never removed from the hash previously). May also fix bug#436996.
1840 2008-10-21 Zoltan Varga <vargaz@gmail.com>
1842 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
1843 generic instances, compute the type from the generic definition instead of
1844 looking in field->generic_info.
1846 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
1847 for inflated fields, the only user was get_fieldref_token () which no
1850 * class.c (mono_class_init): Revert the last change as it seems to cause
1853 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
1854 bytes on 64 bit platforms.
1856 * object.c (mono_class_create_runtime_vtable): Fix a warning.
1858 * object.c (mono_class_create_runtime_vtable): Don't initalize
1859 field->data/field->def_type here, it is done lazily by
1860 mono_class_get_field_default_value ().
1862 * icall.c (ves_icall_get_enum_info): Call
1863 mono_class_get_field_default_value () instead of directly accessing
1864 field->data and field->def_type.
1866 * object.c (get_default_field_value): Ditto.
1868 * class.c (mono_field_get_data): Ditto.
1870 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
1871 call for generic instances.
1873 * loader.c (find_method_in_class): If klass != from_class, then inflate
1874 the method with the context of from_class, since the caller assumes this.
1876 2008-10-20 Zoltan Varga <vargaz@gmail.com>
1878 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
1879 for accessing method->slot.
1881 2008-10-20 Cedric Vivier <cedricv@neonux.com>
1883 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
1885 2008-10-19 Zoltan Varga <vargaz@gmail.com>
1887 * class.c (mono_method_get_vtable_index): Use
1888 mono_method_get_vtable_slot () for accessing method->slot.
1890 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
1891 accessing klass->methods.
1893 * class.c (mono_method_get_vtable_slot): New helper function.
1894 (mono_class_get_vtable_entry): Ditto.
1895 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
1896 accessing method->slot.
1898 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
1899 method to get_inflated_method ().
1901 * class.c (mono_class_get_inflated_method): New helper method to obtain
1902 a method of an inflated class without calling setup_methods ().
1903 (mono_class_get_cctor): Use get_inflated_method.
1905 * generic-sharing.c (mono_class_get_method_generic): Ditto.
1907 * marshal.c image.c: Lazily create all the marshal caches.
1909 * image.c (mono_image_init): Move initialization of runtime_invoke
1910 caches to marshal.c.
1912 * marshal.c (get_cache): New helper function to lazily initialize a
1914 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
1916 * debug-helpers.c (mono_method_full_name): Include generic arguments.
1918 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
1920 * loader.c: fixed check for interface type.
1922 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1924 * appdomain.c: check for NULL setup before it's referenced.
1927 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1929 * class.c: remove the unused old vtable setup code.
1931 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1933 * class.c: don't depend on interface order in
1934 setup_interface_offsets (bug #435777).
1935 * reflection.c: sort the InterfaceImpl table (patch from
1936 Jb Evain <jbevain@novell.com>).
1938 2008-10-13 Zoltan Varga <vargaz@gmail.com>
1940 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
1941 the low level assemblies lock.
1943 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
1945 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
1946 object.c, reflection.c, socket-io.c, threads.c: introduced
1947 mono_framework_version () to return the major framewrok version,
1948 changed the code that was using more complex patterns to use it.
1949 Return the correct value for PlatformID for OSX.
1951 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
1953 * icall-def.h, process.h, process.c: added an icall to get info about
1954 processes using mono-proclib.
1956 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
1958 * mono-perfcounters.c: use the mono-proclib functions to
1959 access process information.
1961 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1963 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
1964 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
1965 reflection.c: remove rawbuffer usage: mmap support is more sanely
1966 provided by utils/mono-mmap.
1968 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
1970 * gc.c: use posix semaphores when possible so that
1971 mono_gc_finalize_notify() is signal safe.
1973 2008-10-11 Zoltan Varga <vargaz@gmail.com>
1975 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
1976 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
1977 be #ifdef-ed out, the linker will remove the rest.
1979 * marshal.c: Implement DISABLE_COM.
1981 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
1983 2008-10-11 Miguel de Icaza <miguel@novell.com>
1985 * locales.c (string_invariant_compare_char): Optimization: do not
1986 call g_unichar_type unless we actually need the information.
1988 2008-10-10 Mark Probst <mark.probst@gmail.com>
1990 * object.c, class-internals.h: Also create remoting trampolines
1991 for generic methods. Pass the domain to the remoting trampoline
1992 creation function, too.
1994 2008-10-10 Zoltan Varga <vargaz@gmail.com>
1996 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
1998 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2000 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
2003 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
2006 * locales.c: remove the use of g_strdown. Fixes bug #322313.
2008 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2010 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
2011 for the least possible amount of time (extending the fix in r113458).
2013 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2015 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
2017 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2019 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
2020 as possible simd intrinsic types.
2021 Optimized the test to check for the common prefix first.
2023 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
2025 * class.c: back out part of a broken optimization committed on
2026 May 23th (bug #433908).
2028 2008-10-09 Mark Probst <mark.probst@gmail.com>
2030 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
2031 Win32. Should fix #432388 for most cases until we have the new
2034 2008-10-08 Zoltan Varga <vargaz@gmail.com>
2036 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
2037 instead of using inst->id so the hash is stable for AOT.
2039 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
2042 * icall.c: create a .ini file for shadow-copied assemblies that
2043 contains the location of the original assembly. Use this to return the
2044 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
2045 Also fix the number of '/' for windows when returning the CodeBase.
2048 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2050 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
2052 Code is contributed under MIT/X11 license.
2054 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2056 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
2057 if if the class vtable needs initialized.
2059 Code is contributed under MIT/X11 license.
2061 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2063 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
2064 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
2065 STRING->BSTR, and CLASS->INTERFACE.
2067 Code is contributed under MIT/X11 license.
2069 2008-10-07 Marek Habersack <mhabersack@novell.com>
2071 * sysmath.h: changed the declaration of the
2072 ves_icall_System_Math_Round2 icall by adding an extra
2073 away_from_zero parameter.
2075 * sysmath.c (ves_icall_System_Math_Round2): added support for
2076 away from zero rounding. The icall now takes an extra boolean
2077 parameter to signal that away from zero operation is requested.
2079 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2081 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
2082 the delegate klass so it can work with full-aot.
2083 (mono_marshal_get_delegate_end_invoke): Ditto.
2084 (mono_marshal_get_delegate_invoke): Ditto.
2086 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
2088 * gc.c, attach.h, attach.c: remove a bad pattern:
2089 add_finalizer_callback () is not implemented correctly, it can't
2090 without adding more overhead to the finalizer loop and it's not
2091 even needed, since we know exactly what we need to call, so there is
2092 no need to do so through an expensive function pointer.
2094 2008-10-04 Zoltan Varga <vargaz@gmail.com>
2096 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
2098 * attach.c (mono_attach_init): Remove the #ifdef.
2100 2008-10-04 Andreas Färber <andreas.faerber@web.de>
2102 * attach.c (mono_attach_init): Don't use
2103 mono_gc_add_finalizer_thread_callback when compiling without GC.
2106 Code is contributed under MIT/X11 license.
2108 2008-10-03 Zoltan Varga <vargaz@gmail.com>
2110 * class.c (mono_class_create_from_typedef): Remove the
2111 #ifndef DISABLE_SIMD stuff.
2113 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2115 * class-internals.h (MonoClass): Added simd_type bit field.
2117 * class.c (mono_class_create_from_typedef): Check if type is a simd
2120 2008-10-03 Mark Probst <mark.probst@gmail.com>
2122 * object.c (mono_method_add_generic_virtual_invocation): Only add
2123 instantiations to the thunk whose count is at least as large as
2126 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2128 * icall.c: changed the Type of the exception thrown when trying to
2129 invoke a constructor on an abstract class. Part of the fix for bug
2132 2008-10-02 Mark Probst <mark.probst@gmail.com>
2134 * class.c, class-internals.h (mono_method_get_vtable_index): New
2135 function which returns the index into the vtable and properly
2136 handles inflated virtual generic methods.
2138 2008-10-01 Mark Probst <mark.probst@gmail.com>
2140 * object.c, domain.c, object-internals.h, domain-internals.h:
2141 Generalize IMT thunk machinery to also handle thunks for virtual
2142 generic method invokes. When a virtual generic method is invoked
2143 more than a number of times we insert it into the thunk so that it
2144 can be called without lookup in unmanaged code.
2146 * generic-sharing.c, class-internals.h: Fetching a
2147 MonoGenericInst* for a method from an (M)RGCTX.
2149 2008-10-01 Zoltan Varga <vargaz@gmail.com>
2151 * marshal.c (emit_marshal_string): Applied a variant of a patch by
2152 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
2153 marshalling. Fixes #431304.
2155 2008-10-01 Bill Holmes <billholmes54@gmail.com>
2157 * marshal.c (emit_marshal_variant) : Change the attribute checks to
2158 handle when ref is specified without In or Out.
2160 Code is contributed under MIT/X11 license.
2162 2008-09-30 Mark Probst <mark.probst@gmail.com>
2164 * loader.c (mono_get_method_constrained): Don't expand method with
2165 the class's context, because it's already a method of that class.
2167 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
2169 * attach.c : should be correct build fix.
2171 2008-09-29 Zoltan Varga <vargaz@gmail.com>
2173 * attach.c: Fix the previous change.
2175 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
2177 * attach.c : quick w32 build fix.
2179 2008-09-27 Miguel de Icaza <miguel@novell.com>
2181 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
2182 crashes MonoDevelop: #430455.
2184 2008-09-27 Zoltan Varga <vargaz@gmail.com>
2186 * domain-internals.h (struct _MonoDomain): Move most fields used only by
2187 the JIT do MonoJitDomainInfo in ../mini/mini.h.
2189 * domain.c: Remove initialization/cleanup of the removed fields.
2191 2008-09-27 Mark Probst <mark.probst@gmail.com>
2193 * class.c (mono_class_generic_sharing_enabled): Enable generic
2194 code sharing for PPC.
2196 2008-09-26 Bill Holmes <billholmes54@gmail.com>
2198 * attach.c : Fixing the Windows builds.
2200 Code is contributed under MIT/X11 license.
2202 2008-09-25 Zoltan Varga <vargaz@gmail.com>
2204 * class.c (mono_class_generic_sharing_enabled): Experimentally change
2205 the default generic sharing mode to 'all'.
2207 2008-09-25 Mark Probst <mark.probst@gmail.com>
2209 * generic-sharing.c, class-internals.h: New function for checking
2210 whether a method needs a static RGCTX invoke wrapper. A few
2211 funtions moved from mini/generic-sharing.c.
2213 * icall.c: New function used.
2215 2008-09-25 Mark Probst <mark.probst@gmail.com>
2217 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
2218 Static RGCTX invoke wrapping applies to value type methods, too.
2220 * class.c (mono_class_setup_vtable_general): In generic-shared
2221 value types, wrap methods with a static RGCTX invoke wrapper.
2223 2008-09-25 Zoltan Varga <vargaz@gmail.com>
2225 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
2228 2008-09-24 Zoltan Varga <vargaz@gmail.com>
2230 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
2231 register a callback which is called when the finalizer thread is woken
2233 (finalizer_thread): Call the callback if it exists.
2235 * attach.h attach.c: New files, implementing the attach mechanism.
2237 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
2239 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
2240 by the previous change.
2242 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2244 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
2245 loader.c, marshal.c, metadata-internals.h, metadata.c,
2246 method-builder.c, object.c, reflection.c: introduced specific functions
2247 to allocate from the domain and image mempools and cleaned up most of
2248 the code to use them (still missing a few in reflection.c).
2249 Keep the loader bytes counter updated.
2251 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
2253 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
2254 loader-related counters.
2256 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
2258 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
2259 added more MS-compatible counters.
2261 2008-09-22 Zoltan Varga <vargaz@gmail.com>
2263 * class.c (mono_class_setup_fields): Call setup_fields before accessing
2264 class->blittable. Fixes #428217.
2266 2008-09-21 Zoltan Varga <vargaz@gmail.com>
2268 * reflection.c (mono_image_get_field_on_inst_token): Call
2269 field_encode_signature () since that handles custom modifiers too.
2272 2008-09-20 Zoltan Varga <vargaz@gmail.com>
2274 * reflection.c (add_custom_modifiers): New helper function to merge custom
2275 modifiers stored in objects to a MonoType.
2276 (fieldref_encode_signature): Encode custom modifiers.
2277 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
2278 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
2280 2008-09-19 Kornél Pál <kornelpal@gmail.com>
2282 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
2283 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
2284 64-bit IL only images because imports are not resolved for IL only images.
2285 Special thanks to Bill Holmes for finding this bug and testing the patch.
2286 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
2288 Contributed under MIT/X11 license.
2290 2008-09-19 Miguel de Icaza <miguel@novell.com>
2292 * mono-config.c (dllmap_start): Add support for the bits keyword
2293 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
2295 2008-09-19 Mark Probst <mark.probst@gmail.com>
2297 * reflection.c (inflate_mono_method): When the class the method is
2298 to be inflated for is itself not inflated, just return the method.
2300 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
2302 * mono-perfcounters.c: use more user friendly process instance names.
2304 2008-09-18 Bill Holmes <billholmes54@gmail.com>
2306 * marshal.c (emit_marshal_variant) : Change the attribute checks to
2307 handle "[in] ref" and "[in][out] ref" cases.
2309 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
2310 to mono_mb_create_method. This was causing problems calling native to
2311 managed passing Variants by value.
2313 Code is contributed under MIT/X11 license.
2315 2008-09-18 Zoltan Varga <vargaz@gmail.com>
2317 * class.c (can_access_internals): Call mono_assembly_load_friends ()
2318 before accessing the friend_assembly_names field.
2320 * assembly.c (mono_assembly_load_friends): Make this callable multiple
2322 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
2323 called lazily when it is needed.
2325 * metadata-internals.h (struct _MonoAssembly): Add
2326 'friend_assembly_names_inited' flag.
2328 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
2330 * mono-perfcounters-def.h: fix the types of a few counters.
2331 * mono-perfcounters.c: implemented the instance names getter
2334 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
2336 * culture-info-table.h : regenerated.
2338 2008-09-17 Robert Jordan <robertj@gmx.net>
2340 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
2341 context bound objects. Fixes #415577.
2343 Code is contributed under MIT/X11 license.
2345 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
2347 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
2348 implementation (bug #423582).
2350 2008-09-16 Zoltan Varga <vargaz@gmail.com>
2352 * object.c (mono_object_get_virtual_method): Handle the case method->slot
2353 is not set. Fixes #426309.
2355 2008-09-16 Jb Evain <jbevain@novell.com>
2357 * class.c (mono_class_from_name): fix the exported type look up
2358 when the type is defined in a referenced assembly.
2360 2008-09-16 Jb Evain <jbevain@novell.com>
2362 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
2363 increment the next index counter on each iteration to make that work
2364 for more than one type forwarder. Unmanaged part to fix #422929.
2366 2008-09-15 Mark Probst <mark.probst@gmail.com>
2368 * object-internals.h: enum ComInterfaceType in
2369 MonoInterfaceTypeAttribute is guint32, not guint16.
2371 2008-09-12 Mark Probst <mark.probst@gmail.com>
2373 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
2376 2008-09-11 Mark Probst <mark.probst@gmail.com>
2378 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
2381 2008-09-11 Mark Probst <mark.probst@gmail.com>
2383 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
2384 Endianness fixes for MonoSymbolFileOffsetTable.
2386 2008-09-10 Bill Holmes <billholmes54@gmail.com>
2388 * process.c (complete_path) : Removing quotes from the
2389 input path. The glib file routines do not handle file paths
2390 that have quotes around them.
2392 Code is contributed under MIT/X11 license.
2394 2008-09-10 Bill Holmes <billholmes54@gmail.com>
2396 * socket-io.h : Adding a comment to provide locations where
2397 changes to MonoSocketAsyncResult need to be synced.
2399 Code is contributed under MIT/X11 license.
2401 2008-09-10 Zoltan Varga <vargaz@gmail.com>
2403 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
2404 parameters as well. Fixes #425001.
2406 2008-09-08 Miguel de Icaza <miguel@novell.com>
2408 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
2411 2008-09-07 Miguel de Icaza <miguel@novell.com>
2413 * console-io.c: Add support for tracking the window size if it
2416 The setup is very simple: the TtySetup function will now return a
2417 pointer to a location in memory that tracks the current console
2418 size. The managed code checks its current value every time its
2419 queried against the last value set, and updates accordingly.
2421 With this setup we can work with multiple consoles, and we do not
2422 require to poke into managed code from a signal handler.
2424 Additionally, the environment for COLUMNS and LINES is now handled
2427 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
2429 2008-09-07 Mark Probst <mark.probst@gmail.com>
2431 * marshal.c (mono_type_native_stack_size): Treat
2432 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
2434 2008-09-04 Jb Evain <jbevain@novell.com>
2436 * class.c (mono_class_is_assignable_from): fix assignability of nullables
2439 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
2441 * verify.c (verify_type_compatibility_full): Revert change
2442 to allow converting a native int to unmanaged pointer be verifiable
2443 under non-strict mode.
2444 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
2446 * verify.c: Added some TODOs.
2448 2008-09-02 Bill Holmes <billholmes54@gmail.com>
2450 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
2451 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
2452 Changed to use GlobalAlloc for the memory returned on Windows platforms.
2454 Code is contributed under MIT/X11 license.
2456 2008-09-02 Jb Evain <jbevain@novell.com>
2458 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
2460 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
2462 reflection.c (typebuilder_setup_fields): Handle classes with
2465 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
2467 class.c (mono_class_setup_events): Add memory barrier due to
2468 double checked locking.
2470 class.c (mono_class_setup_properties): Same.
2472 2008-08-31 Zoltan Varga <vargaz@gmail.com>
2474 * class.c (mono_class_is_assignable_from): Fix the build.
2476 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
2477 before accessing klass->interface_bitmap. Fixes #421744.
2479 2008-08-28 Zoltan Varga <vargaz@gmail.com>
2481 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
2482 the runtime into no-exec mode, useful when running the AOT compiler.
2484 * appdomain.c gc.c object.c: Avoid executing managed code when running
2487 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
2489 * reflection.c (_mono_reflection_get_type_from_info): Handle the
2490 special case when the mono_assembly_loaded () returns NULL because the
2491 search hook is not installed.
2493 2008-08-25 Zoltan Varga <vargaz@gmail.com>
2495 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
2496 crashes in bstr marshalling on linux.
2498 2008-08-24 Zoltan Varga <vargaz@gmail.com>
2500 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
2501 with more than one parameter.
2503 2008-08-24 Miguel de Icaza <miguel@novell.com>
2505 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
2506 start/stop flow control as well when turning off ICANON (allows
2507 C-s and C-q to be read by Console.ReadKey).
2509 2008-08-24 Zoltan Varga <vargaz@gmail.com>
2511 * class.c (mono_class_init): Move the initialization of nested classes
2512 into mono_class_get_nested_types (). Fixes #418433.
2514 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
2517 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
2518 iterating tough the nested classes of a class.
2520 2008-08-23 Zoltan Varga <vargaz@gmail.com>
2522 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
2525 2008-08-22 Miguel de Icaza <miguel@novell.com>
2527 * console-io.c (sigcont_handler): Support signal chaining for
2530 (console_set_signal_handlers): Use best practices with sigaction,
2531 clear the structure before using it.
2533 2008-08-22 Robert Jordan <robertj@gmx.net>
2535 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
2536 Fix the Windows build.
2538 2008-08-22 Zoltan Varga <vargaz@gmail.com>
2540 * class.c (mono_class_generic_sharing_enabled): Make the default
2541 sharing mode 'corlib'.
2543 2008-08-21 Zoltan Varga <vargaz@gmail.com>
2545 * console-io.c (console_set_signal_handlers): Fix a warning.
2547 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
2548 method normally, the JIT will take care of avoiding recursion.
2550 2008-08-20 Bill Holmes <billholmes54@gmail.com>
2552 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
2554 Code is contributed under MIT/X11 license.
2556 2008-08-20 Miguel de Icaza <miguel@novell.com>
2558 * console-io.c (sigcont_handler): We need to restore the entire
2559 termios state, not only the original settings, as things like echo
2560 can be controlled after this (Booish exposes this issue with its
2561 own ReadLine implementation).
2563 Additionally, we need to set the terminal back into keypad_xmit
2566 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
2567 string as a paramter as well. Otherwise we get different
2570 2008-08-20 Zoltan Varga <vargaz@gmail.com>
2572 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
2573 delegates with byref out parameter passing. Fixes #351520.
2575 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
2577 (mono_type_get_desc): Add the type arguments for GENERICINST.
2578 (mono_method_full_name): Stringify the class name using mono_type_full_name
2579 so it picks up generic arguments.
2581 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
2583 * console-io.c: Removed debug output.
2585 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
2587 reflection.c (mono_reflection_create_runtime_class): Alloc
2588 the nested classes linked list using the dynamic image mempool.
2589 Fixes leak in corlib compilation.
2591 2008-08-19 Miguel de Icaza <miguel@novell.com>
2593 * console-io.c: Fix incredibly annoying behavior on the console
2594 after resuming execution after control-z. This affected every
2595 console application.
2597 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
2599 * mempool-internals.h: Header for mono private mempool functions. The first
2600 two function are for allocating glib linked lists using pools.
2602 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
2604 * Makefile.am: Added mempool-internals.h.
2606 2008-08-16 Zoltan Varga <vargaz@gmail.com>
2608 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
2609 (mono_domain_free): Ditto.
2611 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
2612 be used by the JIT to store its domain-specific information, instead of putting
2613 it directly into MonoDomain.
2615 * domain.c (mono_install_create_domain_hook): New helper function to install
2616 a hook which initializes domain->runtime_info.
2618 * domain.c (mono_install_free_domain_hook): Ditto.
2620 2008-08-15 Zoltan Varga <vargaz@gmail.com>
2622 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
2623 asserting if the ares parameter is null.
2625 * mono-perfcounters.c: Fix warnings.
2627 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
2628 is not needed, don't check for interruptions either.
2629 (mono_marshal_get_delegate_end_invoke): Ditto.
2631 2008-08-15 Marek Habersack <mhabersack@novell.com>
2633 * mono-perfcounters.c (predef_readonly_counter): added support for
2634 reading the ASP.NET Requests Queued counter from another process.
2636 2008-08-12 Zoltan Varga <vargaz@gmail.com>
2638 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
2639 MonoImage to simplify the AOT code.
2641 2008-08-10 Zoltan Varga <vargaz@gmail.com>
2643 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
2644 marshalling. Fixes #416078.
2646 2008-08-08 Zoltan Varga <vargaz@gmail.com>
2648 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
2649 it is set, looking up the icall address is deferred to the JIT, since
2650 in embedded scenarios, the icall might not be registered in the runtime
2651 doing the AOT compilation. Backported from the 2.0 branch.
2653 2008-08-08 Zoltan Varga <vargaz@gmail.com>
2655 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
2658 2008-08-05 Marek Habersack <mhabersack@novell.com>
2660 * Makefile.am: added support for cross-compilation.
2662 2008-08-04 Zoltan Varga <vargaz@gmail.com>
2664 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
2666 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
2668 * mono-perfcounters.c: jitted methods and jitted bytes counters.
2670 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
2672 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
2673 mono-perfcounters.c: performance counters implementation.
2675 2008-07-31 Zoltan Varga <vargaz@gmail.com>
2677 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
2678 to gpointer, letting the AOT code decide what to store in it.
2680 2008-07-31 Bill Holmes <billholmes54@gmail.com>
2682 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
2683 mono_class_setup_methods if the methods are not initialized.
2685 Code is contributed under MIT/X11 license.
2687 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
2689 * verify.c: Remove some debug code I commited by accident.
2691 * verify.c (mono_method_is_valid_in_context): Change the return value
2692 to make possible to distinguish between invalid and unverifiable.
2694 * verify.c (verifier_load_method): Don't return NULL for unverifiable
2697 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
2699 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
2700 constraints. Fixes regression in gtest-253.
2702 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
2704 * verify.c (mono_verifier_verify_class): Don't allow generic types
2705 with explicit layout.
2707 * verify.c (mono_method_verify): Check locals and argument types.
2709 2008-07-29 Zoltan Varga <vargaz@gmail.com>
2711 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
2712 wait if the thread is in StopRequested state.
2714 * class.c (mono_class_from_name): Refactor the module searching code into
2715 a separate function so it can be reused in the AOT case too.
2717 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
2719 * verify.c (mono_type_is_valid_in_context): Improve the error message.
2720 Check both the type and it's generic type definition for loader errors.
2722 * verify.c (mono_method_is_valid_in_context): Don't generate another
2723 error when a type errors occur, this leads to the wrong exception been
2726 2008-07-28 Dick Porter <dick@ximian.com>
2730 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
2731 New internal calls to duplicate and close a process handle.
2733 2008-07-27 Andreas Färber <andreas.faerber@web.de>
2735 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
2737 2008-07-27 Zoltan Varga <vargaz@gmail.com>
2739 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
2741 2008-07-27 Robert Jordan <robertj@gmx.net>
2743 * class.c (mono_class_init): Don't compute class.has_finalize for
2744 valuetypes. Fixes #412477.
2746 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
2748 * verify.c: Implement constraint equivalence checking.
2749 This is required when a generic parameter is used as
2750 argument to a constrained one.
2754 2008-07-24 Zoltan Varga <vargaz@gmail.com>
2756 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2758 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
2760 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
2761 synch with managed object layout.
2763 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
2765 * verify.c (do_branch_op): Handle valuetypes and generic
2768 * verify.c (do_cmp_op): Same.
2772 2008-07-24 Mark Probst <mark.probst@gmail.com>
2774 * generic-sharing.c: Fix memory leaks.
2776 * class.c, class-internals.h: Make
2777 mono_class_inflate_generic_type_with_mempool() non-static.
2779 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
2781 * pedump.c (dump_verify_info): Dump full class name.
2783 2008-07-24 Mark Probst <mark.probst@gmail.com>
2785 * generic-sharing.c: Removed some old code that didn't do anything.
2787 2008-07-24 Massimiliano Mantione <massi@ximian.com>
2788 * profiler.c: Added runtime_initialized_event,
2789 mono_profiler_install_runtime_initialized and
2790 mono_profiler_runtime_initialized. This new hook tells the profiler
2791 when the runtime is sufficiently initialized to be able to call
2792 mono_thread_attach on the root appdomain.
2793 * profiler.h, profiler-private.h: Likewise.
2795 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
2797 * verify.c (do_cast): Do boxing for generic arguments as well.
2799 * class.c (is_nesting_type): Drop generic instantiations before
2800 checking for nesting.
2802 * class.c (can_access_instantiation): Allow access to generic
2805 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
2807 * verify.c (verify_class_for_overlapping_reference_fields):
2808 On some cases, the field size might be zero, guard against that.
2809 Fix the explicit layout check to work as expected.
2811 2008-07-23 Zoltan Varga <vargaz@gmail.com>
2813 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
2814 mono_thread_resume () during shutdown, since the thread we want to abort
2817 2008-07-22 Zoltan Varga <vargaz@gmail.com>
2819 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
2822 * debug-mono-symfile.c: Fix a warning.
2824 * mono-perfcounters.c (get_cpu_times): Fix a warning.
2826 * object.c (mono_class_vtable): Check if exception_type is set, and return
2827 NULL as defined by the function comments.
2829 2008-07-22 Mark Probst <mark.probst@gmail.com>
2831 * mempool.c: Use malloc for every single mempool allocation if the
2832 configure option is set. This makes it easier to track mempool
2833 allocations with tools like Valgrind.
2835 2008-07-22 Jb Evain <jbevain@novell.com>
2837 * reflection.c (create_dynamic_mono_image): emit the same
2838 metadata version that SL2 does when creating a SL2 image.
2840 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
2843 * icall.c: New icall System.Enum:get_hashcode. This function
2844 avoids the overhead of boxing the enum to the underlying type.
2846 2008-07-21 Mark Probst <mark.probst@gmail.com>
2848 * reflection.c (mono_method_get_object): Don't let static RGCTX
2849 invoke wrappers get into MonoReflectionMethods.
2851 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
2853 * object-internals.h:
2854 * object.c: New mono_runtime_class_init_full function
2855 that makes throwing the exception optinal.
2857 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
2858 for the case where the exception object is supplied.
2860 2008-07-16 Kornél Pál <kornelpal@gmail.com>
2862 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
2865 Contributed under MIT/X11 license.
2867 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
2869 * string-icalls.c (ves_icall_System_String_InternalSplit):
2870 Optimize array allocation by caching the MonoClass of the
2873 * icall.c (ves_icall_Type_GetMethodsByName): Same.
2875 * reflection.c (mono_param_get_objects): Same.
2877 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
2880 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
2881 It inflates the given type using the class context.
2883 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
2885 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
2886 the vtable if it already exists.
2888 * object-internals.h: Add mono_class_try_get_vtable as part of the
2891 * reflection.c (mono_type_get_object): Use the MonoObject from the
2892 vtable when possible. Reduces locking contention on reflection heavy
2895 2008-07-15 Zoltan Varga <vargaz@gmail.com>
2897 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
2898 g_bit_nth_msf () since that macro is not implemented in eglib.
2900 2008-07-13 Zoltan Varga <vargaz@gmail.com>
2902 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
2903 on platforms which do not support it.
2905 2008-07-12 Zoltan Varga <vargaz@gmail.com>
2907 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
2909 2008-07-11 Martin Baulig <martin@ximian.com>
2911 * mono-debug-debugger.h
2912 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
2914 * mono-debug-debugger.c
2915 (_mono_debugger_interruption_request): New global volatile variable.
2916 (mono_debugger_check_interruption): New public function.
2919 (mono_thread_current_check_pending_interrupt): Call
2920 mono_debugger_check_interruption().
2921 (mono_thread_interruption_checkpoint_request): Likewise.
2923 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2925 * verify.c: Add more type checks for loaded types. Verify the result
2926 handle from ldtoken.
2928 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2930 * loader.c (field_from_memberref): Don't crash if the field
2933 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2935 * verify.c: Verify if type and method instantiations
2936 don't have invalid VAR or MVAR arguments.
2938 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2940 * verify.c: Fix double free of function pointer list.
2942 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2944 * object.c (mono_string_to_utf8): Comment the new code as it
2947 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
2949 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
2951 2008-07-07 Bill Holmes <billholmes54@gmail.com>
2953 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
2954 is not throw too many times.
2956 Code is contributed under MIT/X11 license.
2958 2008-07-07 Zoltan Varga <vargaz@gmail.com>
2960 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
2961 debugging is turned off.
2963 2008-07-06 Zoltan Varga <vargaz@gmail.com>
2965 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
2967 2008-07-04 Mark Probst <mark.probst@gmail.com>
2969 * class-internals.h, class.c: Added new generic sharing option:
2970 Share only stuff in System.Collections.Generic, which is now the
2973 2008-07-04 Mark Probst <mark.probst@gmail.com>
2975 * generic-sharing.c, class-internals.h: New function for getting a
2976 generic method in a generic class given the corresponding method
2977 for a different instantiation of the class. Partly refactored
2978 from mini-trampolines.c.
2980 * class.c: Make sure generic methods have a class_inst if they are
2981 part of a generic class.
2983 * metadata.c (mono_type_stack_size_internal): Handle type
2986 2008-07-04 Mark Probst <mark.probst@gmail.com>
2988 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
2989 Signifies whether information on the this/vtable/mrgctx variable
2992 2008-07-04 Mark Probst <mark.probst@gmail.com>
2994 * object.c, object-internals.h, icall.c: New function
2995 mono_delegate_ctor_with_method(), which does the same as
2996 mono_delegate_ctor(), but takes an explicit method argument
2997 instead of taking the method from the jit info.
2999 * marshal.c: When creating a delegate with an inflated method take
3000 the "this" argument as the target class for the castclass.
3002 2008-07-03 Mark Probst <mark.probst@gmail.com>
3004 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
3005 mono_jit_info_table_find() to perform very badly in some cases.
3007 2008-07-02 Zoltan Varga <vargaz@gmail.com>
3009 * icall.c (type_from_typename): Handle 'string'.
3011 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
3012 wrappers into the wrapper_hash, since the key is not a MonoMethod.
3014 2008-07-01 Zoltan Varga <vargaz@gmail.com>
3016 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
3018 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
3019 number of available managed allocator types.
3021 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
3022 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
3024 2008-06-30 Zoltan Varga <vargaz@gmail.com>
3026 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
3027 which is a low level lock protecting just the 'jit_code_hash' hash table.
3029 * domain.c: Initialize+cleanup jit_code_hash_lock.
3031 2008-06-30 Kornél Pál <kornelpal@gmail.com>
3033 * coree.c (mono_load_coree): Set coree_module_handle global variable only
3034 after initialization.
3036 * coree.h: Make MonoFixupExe internal.
3038 Contributed under MIT/X11 license.
3040 2008-06-30 Kornél Pál <kornelpal@gmail.com>
3042 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
3043 because that is platform independent. Check NumberOfRvaAndSizes in PE32
3045 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
3046 image being loaded is a CLI image and _CorValidateImage gets called.
3048 * coree.h: Add MonoLoadImage.
3050 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
3051 instead of LoadLibrary.
3053 Contributed under MIT/X11 license.
3055 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
3057 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
3058 for any primitive type.
3060 2008-06-29 Zoltan Varga <vargaz@gmail.com>
3062 * object.c (mono_array_new_specific): Optimize this and the other allocation
3065 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
3066 domains too if mono_dont_free_domains is set.
3068 * domain-internals.h (mono_dont_free_domains): New internal option controlling
3069 whenever to free appdomain data after it has been unloaded.
3071 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
3073 2008-06-28 Zoltan Varga <vargaz@gmail.com>
3075 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
3076 (mono_method_get_equivalent_method): Fix a warning.
3078 * object.c (mono_message_init): Avoid looking up array types for each call.
3080 2008-06-27 Zoltan Varga <vargaz@gmail.com>
3082 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
3085 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
3088 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
3091 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
3094 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
3096 * object.c (mono_value_box): Fix boxing of nullables.
3098 2008-06-26 Kornél Pál <kornelpal@gmail.com>
3100 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
3101 mono_module_handle that is defined by the linker; no initialization required.
3102 * coree.h: Remove mono_module_handle, add __ImageBase, update
3103 mono_image_open_from_module_handle.
3104 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
3105 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
3106 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
3107 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
3108 to 4 GB away from image base address. IA64 version is not tested but was very
3109 easy to implement and should work if we ever need it.
3110 * domain.c (mono_init_internal): Avoid system error message boxes.
3111 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
3112 with has_entry_point. Handle do_mono_image_load fauilre correctly.
3113 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
3114 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
3115 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
3117 Contributed under MIT/X11 license.
3119 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3121 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
3122 as part of the private mono API.
3124 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
3125 Do proper argument checking for methods that belong to generic classes.
3126 Do proper type resolution for GMFH/2.
3129 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3131 * verify.c (do_switch): Fix a memory corruption bug with
3132 the jump index is out of bound.
3134 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3136 * verify.c: Disable debug code.
3138 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3140 * reflection.c (mono_image_get_methodbuilder_token): Use
3141 mono_image_get_methodspec_token_for_generic_method_definition
3142 instead of mono_image_get_memberref_token. We cache more memberef
3145 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
3147 * verify.c: Inflate exception clause types.
3150 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
3152 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
3155 * reflection.c (mono_image_get_ctorbuilder_token): Same.
3157 * reflection.c (mono_image_create_method_token): Same.
3159 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
3161 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
3162 It does the same as mono_image_get_methodref_token but works on
3165 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
3166 and always generate a methodspec. This follows the old behavior and fixes
3167 the regressions in System.Core.
3169 2008-06-24 Zoltan Varga <vargaz@gmail.com>
3171 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
3172 don't event mono_class_get () succeeds. Fixes #402182.
3174 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
3176 * metadata-internals.h: Added MonoDynamicImage::methodspec
3177 hashtable to store methodspec tokens created for MethodBuilders.
3179 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
3180 MethodBuilders as open instantiations if a methodspec was requested.
3182 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
3184 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
3186 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
3190 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
3192 * loader.c (method_from_methodspec): Avoid crashing if the
3193 method lookup fails.
3195 2008-06-20 Dick Porter <dick@ximian.com>
3197 * socket-io.c (get_socket_assembly): Cope with Moonlight network
3198 classes being in a different assembly. Fixes bug 399184.
3200 2008-06-20 Zoltan Varga <vargaz@gmail.com>
3202 * loader.c (mono_loader_init): Make this callable multiple times.
3203 (mono_dllmap_insert): Call mono_loader_init () so this works even before
3204 the runtime is initialized. Fixes #401755.
3206 2008-06-19 Dick Porter <dick@ximian.com>
3208 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
3211 2008-06-19 Dick Porter <dick@ximian.com>
3214 * icall-def.h: Implement Socket generic Send() and Receive()
3215 methods. Fixes bug 395168.
3217 2008-06-19 Kornél Pál <kornelpal@gmail.com>
3219 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
3221 Contributed under MIT/X11 license.
3223 2008-06-18 Martin Baulig <martin@ximian.com>
3225 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
3226 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
3227 set to 80.0. The debugger <-> runtime interface is now frozen as
3231 (mono_debug_debugger_version): Bump to 4.
3233 2008-06-18 Martin Baulig <martin@ximian.com>
3235 * debug-mono-symfile.c
3236 (load_symfile): Don't check the minor version.
3238 * debug-mono-symfile.h: Bump the version number to 50.0.
3240 2008-06-18 Martin Baulig <martin@ximian.com>
3242 * debug-mono-symfile.c
3243 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
3244 minimum required version.
3246 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
3248 * reflection.c (mono_custom_attrs_from_property): Fix support for
3249 retriveving cattrs of dynamic inflated generic types.
3251 * reflection.c (mono_custom_attrs_from_event): Same.
3253 * reflection.c (mono_custom_attrs_from_field): Same;
3255 * reflection.c (typebuilder_setup_events): Same cattrs of events.
3257 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
3258 Moved to metadata.c.
3260 * metadata.c: New functions to retrive the equivalent field, event
3261 of property from the generic type definition.
3263 * metadata-internals.h: Added new functions from metadata.c.
3265 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
3267 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
3268 to cached in a mempool is used.
3270 * metadata.c (free_generic_class): In some situations field generic_info type
3271 is not properly dup'ed and leads to double free'ing.
3275 2008-06-17 Mark Probst <mark.probst@gmail.com>
3277 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
3278 this arguments (will be needed later for generic methods).
3281 2008-06-17 Mark Probst <mark.probst@gmail.com>
3283 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
3284 Create a static RGCTX invoke wrapper for methods which require it.
3286 2008-06-17 Mark Probst <mark.probst@gmail.com>
3288 * object.c, class-internals.h: New function for checking whether
3289 an individual field is special static.
3291 2008-06-15 Zoltan Varga <vargaz@gmail.com>
3293 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
3294 linear search since the table is sorted.
3296 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
3299 2008-06-14 Zoltan Varga <vargaz@gmail.com>
3301 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
3302 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
3304 * gc.c (mono_domain_finalize): Allow an infinite timeout.
3306 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
3308 * threads.c (mono_thread_request_interruption): Get rid of locking, use
3309 InterlockedCompareExchange to query and modify
3310 thread->interruption_requested.
3312 * object-internals.h (struct _MonoThread): Change interruption_requested
3313 to a gint32 so it can be modified by atomic operations. Add
3314 'critical_region_level' from the managed side, change small_id to a guint32,
3315 add new set of 'unused' fields.
3317 * appdomain.c: Bump corlib version.
3319 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3321 * class.c (mono_class_from_name): Search modules as well. Fixes
3324 2008-06-13 Mark Probst <mark.probst@gmail.com>
3326 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
3327 templates. Templates are generalized with an additional type_argc
3328 argument. RGCTX templates have type_argc==0, MRGCTX templates
3331 * domain-internals.h, domain.c: New hash table for looking up
3334 * metadata.c, metadata-internals.h: Rename hash and equal
3335 functions for MonoGenericInst's and make them public.
3337 * class-internals.h: New data structures for the MRGCTX. Macros
3338 for distinguishing slots in the RGCTX and the MRGCTX.
3340 2008-06-13 Mark Probst <mark.probst@gmail.com>
3342 * object.c (mono_method_get_imt_slot): Put the same methods of
3343 different instantiations of the same generic interface in the same
3344 IMT slots, to make generic sharing simpler.
3346 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
3348 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
3350 * metadata.c (mono_metadata_field_info_with_mempool): Added.
3351 This function works just like mono_metadata_field_info, but
3352 accept a mempool as argument to be used allocating memory.
3354 * marshal.c (mono_marshal_load_type_info): Use new function
3355 to load marshal data into image mempool.
3357 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
3359 * class.c (mono_class_inflate_generic_type_with_mempool):
3360 This function allows to inflate a generic type using
3363 * class.c (inflate_generic_type): Take a mempool as argument
3364 and use it to do type dup'ing.
3366 * class.c (mono_class_setup_fields): Field type for generic
3367 generic classes are allocated from the image mempool.
3369 * metadata.c (free_generic_class): Inflated field type is
3370 now allocated in the image mempool.
3372 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
3374 * threads.c (thread_cleanup): Free MonoThread::name.
3376 2008-06-12 Marek Habersack <mhabersack@novell.com>
3378 * appdomain.c (ensure_directory_exists): avoid unnecessary
3379 mkdir(2) calls when the shadow directory already exists.
3380 (mono_make_shadow_copy): copy also satellite assemblies from the
3381 private bin directories.
3383 2008-06-11 Zoltan Varga <vargaz@gmail.com>
3385 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
3387 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
3388 a page boundary. Fixes #396219.
3390 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3392 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
3393 due to double-checked locking.
3395 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3397 * assembly.c (build_assembly_name): Release memory on failure.
3399 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
3401 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3403 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
3406 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3408 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
3411 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3413 * loader.c (field_from_memberref): Check if field signature type is equal
3414 to the non-inflated type of the field. Fixes #398980.
3416 2008-06-11 Zoltan Varga <vargaz@gmail.com>
3418 * assembly.c (mono_assembly_load_from_full): Call
3419 mono_assembly_load_friends () outside the assemblies lock, since it can
3420 acquire the loader lock. Fixes #323696.
3422 * reflection.c (resolve_object): Inflate the inst with the context for
3423 FieldOnTypeBuilderInst. Fixes #399010.
3425 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3427 * reflection.c (mono_image_get_field_on_inst_token): Don't
3428 inflate the field to encode it's signature. If it's a
3429 VAR or MVAR it should stay that way in the signature.
3432 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3434 * reflection.c (resolve_object): Release memory of inflated types.
3436 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3438 * loader.c (mono_method_get_signature_full): Remove assert about
3439 loading a methodspec to a generic method. We have such methods, such as
3440 System.Threading.Interlocked::CompareExchange<T>.
3441 This assert was removed since it crashes the verifier when it checks
3442 methods calling CompareExchange<T>.
3444 2008-06-10 Marek Safar <marek.safar@gmail.com>
3446 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
3447 of Type array and not MonoType.
3449 2008-06-10 Marek Habersack <mhabersack@novell.com>
3451 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
3454 2008-06-10 Martin Baulig <martin@ximian.com>
3456 * debug-mono-symfile.h
3457 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
3458 changes to the file format, but we were generating incorrect
3459 source file indices in the line number table due to a bug, which
3460 made backtraces report an incorrect source file.
3462 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3464 * mono-debug.c: Moved mono_debug_free_method_jit_info from
3465 mini/debug-mini.c to here.
3467 * mono-debug.c (il_offset_from_address): Free memory from find_method.
3469 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
3470 use it to release structs returned by mono_debug_find_method.
3472 2008-06-10 Zoltan Varga <vargaz@gmail.com>
3474 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
3475 since it needs to set method->slot for all interface methods.
3477 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3479 * class-internals.h: Forgot to add.
3481 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3483 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
3485 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
3486 Lookup the custom attributes from property_hash.
3488 * reflection.c (mono_save_custom_attrs): Save the custom attributes
3489 in property_hash. Allocate all data using the image mempool.
3491 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
3492 for dynamic_custom_attrs to checks if the image is dynamic.
3494 2008-06-09 Zoltan Varga <vargaz@gmail.com>
3496 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
3499 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
3500 runtime functions while holding the domain assemblies lock.
3502 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3504 * verify.c: Reapplied the last bit of the reverted changes.
3506 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3508 * verify.c: Reapplied more of the reverted changes.
3510 2008-06-09 Martin Baulig <martin@ximian.com>
3512 * debug-mono-symfile.c (load_symfile): Check the major version
3513 first; if it's wrong, don't print the minor version in the error message.
3515 2008-06-09 Zoltan Varga <vargaz@gmail.com>
3517 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
3518 lock instead of the domain lock to avoid deadlocks, since the thread might
3519 already hold the loader lock.
3521 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
3522 (mono_thread_attach): Ditto.
3524 * monitor.c: Use a TLS variable for holding the current thread id instead
3525 of calling pthread_self ().
3526 (mono_monitor_init_tls): New internal function to initialize the TLS
3528 (mono_monitor_try_enter_internal): Put the owner == id check after the
3531 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
3532 missed optimizations when using gcc-4.3.
3534 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
3536 * reflection.c (mono_dynamic_image_free): Free the memory
3537 used by MonoGenericParam in MonoDynamicImage::gen_param.
3539 * reflection.c (mono_reflection_setup_generic_class): Allocate
3540 container from mempool.
3542 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
3543 container from mempool.
3545 2008-06-07 Zoltan Varga <vargaz@gmail.com>
3547 * threads.c (mono_set_pending_exception): New internal function to set the
3548 pending exception of the current thread.
3549 (mono_thread_get_and_clear_pending_exception): Check for
3550 thread->pending_exception as well.
3552 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
3554 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
3555 it can trigger a collection.
3557 2008-06-06 Martin Baulig <martin@ximian.com>
3559 Merged the `debugger-kahalo' branch.
3562 (MONO_DEBUGGER_VERSION): Bumped to 72.
3564 * debug-mono-symfile.h
3565 (MonoSymbolFileMethodIndexEntry): Removed.
3566 (MonoSymbolFileMethodEntry): New public typedef.
3567 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
3568 (MonoSymbolFileSourceEntry): Remove everything except `index' and
3570 (MonoSymbolFileMethodEntry): Removed.
3571 (MonoSymbolFileLexicalBlockEntry): Removed.
3572 (MonoSymbolFileLineNumberEntry): Removed.
3573 (MonoDebugLexicalBlockEntry): Removed.
3574 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
3575 removed `num_il_offsets' and `il_offsets'.
3576 (MonoSymbolFile): Replace `version' with `major_version' and
3578 (MONO_SYMBOL_FILE_VERSION): Replace with
3579 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
3580 `MONO_SYMBOL_FILE_MINOR_VERSION'.
3582 * debug-mono-symfile.c
3583 (mono_debug_symfile_lookup_location): Add support for the new line
3584 number table format.
3586 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3588 * metadata.c (free_generic_class): Release the inflated
3589 MonoClass of dynamic generic classes if it's not a generic
3592 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3594 * verify.c: Reapplied more of the reverted changes.
3596 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3598 * reflection.c (lookup_custom_attr): Clean the cached flag or
3599 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
3602 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3604 * verify.c: Reapplied a small part of the reverted changes.
3606 2008-06-07 Zoltan Varga <vargaz@gmail.com>
3608 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3610 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
3611 previously in managed code.
3612 (mono_monitor_exit): Ditto.
3613 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
3615 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
3616 the managed definition.
3618 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
3620 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
3622 2008-06-06 Zoltan Varga <vargaz@gmail.com>
3624 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
3626 * monitor.c: Add some micro optimizations.
3628 * icall.c (type_from_typename): Handle 'bool'.
3630 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
3632 * verify.c: Implement constructor verification per P III 1.8.1.4.
3635 2008-06-06 Zoltan Varga <vargaz@gmail.com>
3637 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
3638 holding the assemblies lock here too.
3640 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3642 * verify.c: Kill stack_top function.
3644 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3646 * verify.c: Kill stack_get function.
3648 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3650 * verify.c (mono_method_verify): Last change broke the build. Fixed.
3652 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3654 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
3657 * verify.c (mono_method_verify): Inflate params and locals to avoid
3658 mismatch when checking for compatibility.
3660 2008-06-05 Jonathan Chambers <joncham@gmail.com>
3662 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
3663 Length prefix should be size in bytes. Fix bug #339530.
3665 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
3666 Length prefix should be size in bytes. Fix bug #339530.
3668 Code is contributed under MIT/X11 license.
3670 2008-06-05 Bill Holmes <billholmes54@gmail.com>
3672 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
3674 Contributed under MIT/X11 license.
3676 2008-06-05 Martin Baulig <martin@ximian.com>
3678 * mono-debug-debugger.c
3679 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
3681 2008-06-05 Zoltan Varga <vargaz@gmail.com>
3683 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
3684 while holding the assemblies lock to prevent deadlocks. Handle the case
3685 where the search hook returns NULL but the assembly was still loaded.
3688 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
3689 modify domain state.
3691 2008-06-05 Andreas Färber <andreas.faerber@web.de>
3693 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
3694 * Makefile.am (pedump_LDADD): Post-process object files and
3695 add dtrace-generated object file, if necessary.
3697 Code is contributed under MIT/X11 license.
3699 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
3701 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
3703 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
3705 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
3707 2008-06-04 Mark Probst <mark.probst@gmail.com>
3709 * threads.c: Try to free everything from the delayed free table
3710 when shutting down threads, and set the variable to NULL after the
3711 table is freed so that calling
3712 mono_thread_hazardous_try_free_all() when shutting down the root
3713 domain doesn't crash.
3715 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
3717 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
3718 the caller if resulting type was inflated.
3720 * class.c (mono_class_create_from_typespec): Free the MonoType if it
3723 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
3726 2008-06-04 Zoltan Varga <vargaz@gmail.com>
3728 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
3729 class library tests.
3731 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
3732 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
3735 2008-06-04 Mark Probst <mark.probst@gmail.com>
3737 * domain.c, domain-internals.h: The JIT infos are now freed by the
3738 JIT info table code. They are freed immediately if there only a
3739 single JIT info table in circulation. If there is more, the free
3740 is delayed via a queue.
3742 * threads.c, threads-types.h: New hazard pointer function for
3743 freeing all freeable delayed items in one sitting.
3745 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3747 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
3749 * reflection.c (typebuilder_setup_properties): Same.
3751 * reflection.c (typebuilder_setup_events): Same.
3753 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3755 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
3756 and use it for allocating memory.
3758 * reflection.c (mono_marshal_spec_from_builder): Same.
3760 * reflection.c: Change code to use new signatures.
3762 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
3764 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3766 * decimal.c (rescale128): Put back one line which was accidently commented
3769 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
3772 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3774 * reflection.c (mono_reflection_generic_class_initialize): Name must
3775 be always malloc'ed so we can free it later on. Do this for field, property
3778 * metadata.c (free_generic_class): Free field, property and event names.
3780 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3782 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
3783 instead of g_memdup.
3785 * reflection.c (typebuilder_setup_fields): Same.
3787 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3789 * decimal.c (rescale128): Optimize this function a bit more.
3791 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3793 * metadata.c (free_generic_class): Release some memory from
3794 SRE generic classes.
3796 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3798 * reflection.c (mono_image_get_generic_field_token): No reference
3799 to name is kept, free it.
3801 * reflection.c (mono_reflection_generic_class_initialize): Free
3802 more memory of the inflated field.
3804 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3806 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
3809 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
3811 * reflection.c (mono_dynamic_image_free): Release memory used by
3812 MonoDynamicImage::array_methods elements.
3814 * reflection.c (assembly_add_win32_resources): Release memory after
3817 2008-06-02 Zoltan Varga <vargaz@gmail.com>
3819 * decimal.c (log2_32): Use an optimized version for this function too.
3821 * decimal.c (log2_64): Fix this on 32 bit machines.
3823 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
3825 * class.c (mono_dup_array_type): Implement allocation using a mempool.
3827 * class.c (mono_metadata_signature_deep_dup): Same.
3829 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
3832 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
3834 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
3836 * metadata-internals.h: Added mono_metadata_signature_dup_full.
3838 * class-internals.h: Update signatures to take a MonoMemPool.
3840 2008-06-02 Dick Porter <dick@ximian.com>
3842 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
3844 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
3845 FormatMessage API to get the error text. Fixes bug 321827.
3847 2008-06-02 Zoltan Varga <vargaz@gmail.com>
3849 * decimal.c: Add some micro optimizations to make decimal operations faster.
3851 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
3853 * reflection.c (method_encode_clauses): Take a mempool
3854 as parameter and use it to allocate the clause array.
3856 * reflection.c (mono_image_get_field_on_inst_token): Free
3857 the inflated type after encoding it.
3859 * reflection.c (mono_dynamic_image_free): Free each element
3860 of MonoDynamicImage::gen_params.
3862 * reflection.c (reflection_methodbuilder_to_mono_method):
3863 Allocate the generic param array from the mempool.
3864 Allocate signature params from the mempool.
3866 * reflection.c (mono_reflection_generic_class_initialize):
3867 Free inflated fields after been used.
3869 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
3871 * icall.c: Reapply the memory leak fixes as they no
3872 longer make mono crash.
3874 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
3876 * reflection.c (mono_type_get_object): Don't store the suplied
3877 MonoType with type_hash. A caller which pass a type that
3878 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
3879 might end with a pointer to freed memory.
3880 The solution is to use byval_arg or this_arg from the associated
3881 MonoClass of the supplied type.
3883 2008-05-29 Zoltan Varga <vargaz@gmail.com>
3885 * icall.c: Revert the rest of the last change as it breaks the build too.
3887 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
3889 * icall.c: Revert a leak fix as it's breaking the build.
3891 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
3893 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
3895 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
3897 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
3899 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
3901 * icall.c: Fix some memory leaks.
3903 2008-05-29 Dick Porter <dick@ximian.com>
3905 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
3906 async socket operations from the pending list when a socket
3907 closes. Leaving it until the threadpool services the event
3908 exposes a race condition when a socket descriptor is reused.
3911 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3913 * object.c: Fix negative index check for array alocation.
3915 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3917 * icall.c, marshal.c: Delegate wrappers should skip visibility.
3918 This check is performed by the verifier for IL created delegates
3919 and by Delegate::CreateDelegate for programatically created ones.
3922 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3924 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
3925 Fix code to use mono_array_size_t instead of int.
3927 Based on patch by Luis F. Ortiz.
3928 Contributed under X11 license.
3929 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3931 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3933 * icall.c: Added ves_icall_System_Array_GetLongLength and
3934 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
3937 * icall.h: Export both new functions.
3939 Based on patch by Luis F. Ortiz.
3940 Contributed under X11 license.
3941 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3943 2008-05-28 Martin Baulig <martin@ximian.com>
3945 The debugger now requires exactly r103463.
3947 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
3948 This version is not supported by the debugger, wait for 72.
3950 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3952 * object.h: Changed array related functions to use
3953 mono_array_size_t instead of guint32. Forgot to commit this file.
3955 Patch by Luis F. Ortiz.
3956 Contributed under X11 license.
3957 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3960 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3962 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
3963 don't define it. Use the number literal instead.
3965 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3967 * icall.c: Changed array related functions to use
3968 mono_array_size_t instead of guint32.
3970 * icall.c (ves_icall_System_Array_GetLength): Check for length
3971 overflow under MONO_BIG_ARRAYS.
3973 Based on patch by Luis F. Ortiz.
3974 Contributed under X11 license.
3975 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3977 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3979 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
3981 Based on patch by Luis F. Ortiz.
3982 Contributed under X11 license.
3983 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3985 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3987 * object.c, object.h: Changed array related functions to use
3988 mono_array_size_t instead of guint32.
3990 Patch by Luis F. Ortiz.
3991 Contributed under X11 license.
3992 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3994 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3996 * object.h: Introduced mono_array_size_t typedef. This must be used
3997 in all places an array length is expected. This is 64bits wide if
3998 MONO_BIG_ARRAYS is enabled.
4000 Patch by Luis F. Ortiz.
4001 Contributed under X11 license.
4002 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4004 2008-05-27 Zoltan Varga <vargaz@gmail.com>
4006 * security-manager.c class.c: Set the class exception info by calling
4007 mono_class_set_failure ().
4009 * class.c (mono_class_get_exception_data): New accessor function.
4010 (mono_class_set_failure): Store exception_data in the property hash.
4012 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
4013 the struct as a property.
4015 * loader.c (mono_get_method_full): Store the lookup result for method
4016 tokens in method_cache, the others in methodref_cache to decrease the memory
4017 usage of hash tables.
4019 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
4020 (mono_image_init): method_cache is lazy inited now.
4022 * metadata-internals.h (struct _MonoImage): Change method_cache to
4023 a MonoValueHashTable, add a separate methodref_cache.
4025 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
4027 * number-formatter.h: Fix tables to avoid arithemtic overflow in
4028 Double.ToString as exposed by Bug #383531.
4030 2008-05-26 Zoltan Varga <vargaz@gmail.com>
4032 * number-formatter.h: Make some tables static.
4034 * class.c (mono_method_set_generic_container): New accessor function.
4035 (mono_method_get_generic_container): Ditto.
4037 * class-internals.h (struct _MonoMethod): Remove rarely used
4038 'generic_container' field, store it in the property hash instead. Add
4039 'is_generic' boolean field instead.
4041 * image.c (mono_image_init): Initialize property_hash.
4042 (mono_image_close): Destroy property_hash.
4044 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
4045 hold rarely used fields of runtime structures belonging to this image.
4047 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
4048 to get/set method->generic_container.
4050 * loader.c (mono_get_method_from_token): Avoid loading the method header for
4053 2008-05-25 Zoltan Varga <vargaz@gmail.com>
4055 * class.c (mono_class_inflate_generic_method_full): Don't increase
4056 mono_stats.inflated_method_count for methods found in the cache.
4058 * threads.c (mono_thread_request_interruption): Add a comment about
4061 2008-05-24 Zoltan Varga <vargaz@gmail.com>
4063 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
4064 interface_offsets_packed table.
4066 * class.c (mono_class_init): Remove some dead code.
4068 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
4069 mono_class_setup_vtable () when CAS is active to detect security problems.
4071 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
4073 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
4075 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
4076 parameters as it's irrelevant for delegate checking.
4078 2008-05-23 Zoltan Varga <vargaz@gmail.com>
4080 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
4082 * class.c (mono_class_init): Control the creation of a generic vtable using
4083 a global which is true by default, but set to false by the runtime startup code.
4085 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
4086 Disabled for now since it breaks the embedding API.
4087 Move the setup of class->methods for arrays to mono_class_setup_methods ().
4088 (mono_class_setup_methods): Add a memory barrier.
4090 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
4091 when mono_class_init () doesn't compute the generic vtable.
4093 2008-05-23 Massimiliano Mantione <massi@ximian.com>
4094 * profiler.c: Added mono_profiler_install_statistical_call_chain,
4095 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
4096 to support call chains (backtrace) in the stat profiler.
4097 * profiler.c, profiler-private.h: Likewise.
4099 2008-05-22 Mark Probst <mark.probst@gmail.com>
4101 * generic-sharing.c: Init generic class when a method of it is
4102 requested via a runtime generic context.
4104 2008-05-22 Zoltan Varga <vargaz@gmail.com>
4106 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
4108 * reflection.c (mono_type_get_object): Add a FIXME.
4110 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
4112 * class.c (mono_class_get_method_by_index): New helper function, returning an
4113 entry in the class->methods array.
4115 2008-05-21 Zoltan Varga <vargaz@gmail.com>
4117 * class.c (mono_class_init): Only do the array optimization for szarrays.
4118 Avoid creating a generic vtable for generic instances as well.
4119 (mono_class_get_method_from_name_flags): Don't search in the metadata for
4122 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
4124 * loader.c (mono_get_method_constrained): Inflate the signature
4125 with class context. Fix #325283.
4127 2008-05-21 Zoltan Varga <vargaz@gmail.com>
4129 * object.c (mono_class_create_runtime_vtable): Add a comment.
4131 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
4133 (setup_interface_offsets): Handle the case when this is called twice for arrays.
4134 (mono_class_setup_vtable_general): Add an assert.
4135 (mono_class_init): Avoid creating a generic vtable for arrays.
4137 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
4138 here, let mono_class_init () do that.
4140 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
4141 interfaces in mscorlib.
4143 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
4144 interfaces. Add some comments.
4145 (mono_class_init): Call mono_class_setup_methods () here since it is no
4146 longer called by mono_class_setup_vtable ().
4148 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
4149 not set in class->vtable.
4150 (mono_class_create_runtime_vtable): Reenable the disabled code.
4152 * object.c (mono_class_create_runtime_vtable): Disable the last change for
4153 now as it causes some test failures.
4155 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
4156 if using the vtable trampoline. Also remove some strange code which put the
4157 generic methods themselves into the vtable slots. Remove the AOT init_vtable
4158 stuff as it is no longer needed.
4160 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4162 * pedump.c: Give make --verify all option check code as well.
4163 Using --verify code won't check for metadata now.
4165 2008-05-19 Martin Baulig <martin@ximian.com>
4167 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
4170 (_mono_debug_using_mono_debugger): New global variable; it's set
4171 directly by the debugger, so mono_debug_using_mono_debugger() also
4172 works after attaching.
4174 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
4176 * object.c (mono_class_create_runtime_vtable): Use memory barriers
4177 as we do double checked locking on MonoClass::runtime_info and
4178 MonoClassRuntimeInfo::domain_vtables.
4180 2008-05-18 Zoltan Varga <vargaz@gmail.com>
4182 * debug-helpers.c (print_field_value): Fix a warning.
4184 2008-05-16 Zoltan Varga <vargaz@gmail.com>
4186 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
4187 set in the AOT case.
4189 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
4191 * class.c (mono_class_setup_vtable_general): Use memory barriers
4192 as we do double checked locking on MonoClass::vtable.
4194 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
4196 * reflection.c (resolve_object): Inflate only if the generic context
4197 is not null. Fixes #389886.
4199 2008-05-15 Jonathan Chambers <joncham@gmail.com>
4201 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
4204 Code is contributed under MIT/X11 license.
4206 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
4208 * class.c: Revert unrelated change.
4210 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
4212 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
4213 a generic instantiation, use mono_class_from_mono_type instead of playing
4214 with MonoType directly.
4216 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
4218 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
4219 checks must ignore generic instantiations, so mono_class_has_parent is not
4220 suitable. Fixes #390128.
4222 2008-05-14 Zoltan Varga <vargaz@gmail.com>
4224 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
4225 it to avoid registering tokens during metadata generation. Fixes #390023.
4227 2008-05-14 Kornél Pál <kornelpal@gmail.com>
4229 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
4232 Contributed under MIT/X11 license.
4234 2008-05-14 Kornél Pál <kornelpal@gmail.com>
4236 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
4237 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
4238 to fixup the EXE image.
4239 (mono_cleanup): Use mono_close_exe_image.
4240 (mono_close_exe_image): New function.
4241 * image.c: Include "marshal.h".
4242 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
4243 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
4244 counting when the image is loaded outside of mono_image_open_full. Set status
4245 based on GetLastError.
4246 * coree.c: Include required headers. Add init_from_coree.
4247 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
4248 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
4249 (_CorExeMain): Set init_from_coree.
4250 (CorExitProcess): Only call ExitProcess for now.
4251 (CorBindToRuntimeEx): New stub implementation.
4252 (CorBindToRuntime): New function.
4253 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
4254 (MonoFixupExe): ILONLY executables require no fixups.
4255 (mono_set_act_ctx): New function to set activation context.
4256 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
4257 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
4258 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
4259 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
4261 * domain-internals.h: Add mono_close_exe_image.
4263 Contributed under MIT/X11 license.
4265 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
4267 * metadata.c (mono_metadata_compute_size): Correctly calculate field
4268 size for generic param and event tables. Fixes #388977.
4270 2008-05-13 Zoltan Varga <vargaz@gmail.com>
4272 * loader.c (mono_method_signature): Use memory barriers because of the double
4273 checked locking pattern.
4275 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
4276 aborting or aborted as well. Fixes #376391.
4278 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
4279 existing runtime state in the Suspend handler during shutdown.
4281 2008-05-12 Zoltan Varga <vargaz@gmail.com>
4283 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
4285 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
4286 which are starting up or shutting down.
4288 * threads.c (mono_threads_set_shutting_down): Don't return a value since
4289 this function never returns if the runtime is already shutting down.
4291 * icall.c (ves_icall_System_Environment_Exit): Update after
4292 mono_threads_set_shutting_down () signature change.
4294 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
4296 * class.c: Added can_access_instantiation to verify if the instantiation
4297 is visible. Fix access check for nested types as they returned TRUE
4298 before doing type and generic instantiation visibility checks.
4300 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
4302 * reflection.c (mono_reflection_create_generic_class): The created type
4303 must have a different container from its TypeBuilder. Otherwise they
4304 will end sharing generic arguments, which is wrong.
4306 Due to the sharing, making a generic instance of the created type using
4307 the TypeBuider generic arguments resulted in the generic type definition
4308 been returned, which is wrong as well.
4310 As a bonus the code was leaking the type_params array. This memory should
4311 be allocated from the image mempool.
4313 This fixes bug #354047.
4315 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
4317 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
4318 to here as they are now used in assembly.c new code.
4319 Added a skipverification flag to MonoAssembly.
4320 New internal function mono_assembly_has_skip_verification.
4322 * assembly.c: New function mono_assembly_has_skip_verification. It checks
4323 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
4326 2008-05-07 Zoltan Varga <vargaz@gmail.com>
4328 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
4329 needed. Fixes #387034.
4331 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
4333 2008-05-06 Miguel de Icaza <miguel@novell.com>
4335 * assembly.c (mono_assembly_load_reference): Prevent crash while
4336 disassembling Silverlight 2.0 executables while we still do not
4337 have GACed libraries.
4339 2008-05-07 Zoltan Varga <vargaz@gmail.com>
4341 * reflection.c: Special case generic type definitions as well. Fixes #383444.
4343 2008-05-06 Zoltan Varga <vargaz@gmail.com>
4345 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
4346 of the dynamic case. Fixes #387404.
4348 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4350 *verify.c (mono_verifier_is_class_full_trust): If under
4351 verify_all and the verifier mode was not set, only
4352 gac and corlib types are fulltrust. This makes --verify-all
4353 usable to detect unverifiable code, which is the expected
4356 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4358 * verify.h: Ops, commited the header with debug
4361 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4363 * verify.c (merge_stack): Use the new value on unverifiable
4366 * verify.c (verify_type_compatibility_full): Comparison
4367 of nullable types can't use mono_class_is_assignable_from.
4369 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
4370 that makes all verification errors be reported.
4372 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
4375 2008-05-05 Robert Jordan <robertj@gmx.net>
4377 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
4378 support for value types. See #386415.
4380 * object.c: comments.
4382 Code is contributed under MIT/X11 license.
4384 2008-05-05 Martin Baulig <martin@ximian.com>
4386 * debug-mono-symfile.h
4387 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
4388 for old pre-terrania symbol files.
4390 2008-05-05 Andreas Färber <andreas.faerber@web.de>
4392 * mono-config.c: Add ppc64 architecture.
4394 Code is contributed under MIT/X11 license.
4396 2008-05-05 Andreas Färber <andreas.faerber@web.de>
4398 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
4399 PPC64 uses function descriptors as well.
4401 Code is contributed under MIT/X11 license.
4403 2008-05-04 Zoltan Varga <vargaz@gmail.com>
4405 * object.c (compute_class_bitmap): Ignore literal static fields.
4407 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
4408 var has an invalid format.
4409 (describe_ptr): Add some sanity checks for the vtable.
4410 (add_nursery_frag): Clear unused nursery fragments.
4411 (major_collection): Clear all remaining nursery fragments.
4413 2008-05-03 Robert Jordan <robertj@gmx.net>
4415 * image.c, metadata-internals.h: add thunk_invoke_cache.
4417 * marshal.c, marshal.h: implement
4418 mono_marshal_get_thunk_invoke_wrapper ().
4420 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
4422 Code is contributed under MIT/X11 license.
4424 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
4426 * verify.c (do_leave): Empty the stack.
4428 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
4430 * class.c (mono_class_is_assignable_from): Variance
4431 doesn't work between reference and value types. For example,
4432 given type C<T+>, C<int32> is not assignable to C<object>.
4433 Break the argument checking loop on first error.
4435 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
4437 * icall.c : base64_to_byte_array() needs some more strict
4438 check for sequence of '=' characters. Patch by Santa
4439 Marta (http://deee.g.hatena.ne.jp/santamarta).
4441 Contributed under MIT/X11 license.
4442 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
4444 2008-05-02 Jonathan Chambers <joncham@gmail.com>
4446 * domain.c: Disable LoadLibrary support to fix Win32 build.
4448 Code is contributed under MIT/X11 license.
4450 2008-05-02 Zoltan Varga <vargaz@gmail.com>
4452 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
4453 to help with cache behaviour.
4455 2008-05-01 Miguel de Icaza <miguel@novell.com>
4457 * appdomain.c (mono_domain_from_appdomain): Add new accessor
4460 2008-05-01 Zoltan Varga <vargaz@gmail.com>
4462 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
4464 2008-05-01 Dick Porter <dick@ximian.com>
4466 * process.c (process_get_fileversion): Only pass 16 bits of
4467 language ID to VerLanguageName. Fixes bug 381204.
4469 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4471 * verify.c (mono_method_verify): Fix the comparison
4472 operator for code bounds check.
4474 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4476 * verify.c (mono_method_verify): Check the bounds of
4477 all access of the code array.
4479 2008-04-29 Kornél Pál <kornelpal@gmail.com>
4481 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
4483 2008-04-28 Zoltan Varga <vargaz@gmail.com>
4485 * image.c (mono_image_strong_name_position): Fix return value when the rva is
4488 2008-04-28 Kornél Pál <kornelpal@gmail.com>
4490 * loader.c (mono_get_method_from_token, mono_method_signature): Add
4491 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
4492 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
4493 fixup main EXE images when using mono.exe for mixed-mode assembly support.
4494 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
4496 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
4497 runtime initialization from metadata.
4498 * assembly.c: Remove obsolete ceGetModuleFileNameA.
4499 (mono_set_rootdir): Use mono_get_module_file_name.
4500 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
4502 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
4503 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
4504 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
4505 MonoCLIImageInfo. Add support for module handles.
4506 (load_cli_header): Update mono_cli_rva_image_map signature.
4507 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
4508 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
4509 (mono_image_rva_map): Add support for module handles.
4510 (mono_image_ensure_section_idx): Add support for module handles.
4511 (mono_image_close): Add support for module handles.
4512 (do_load_header): Add support for module handles.
4513 (mono_image_open_from_module_handle): New function for internal use.
4514 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
4515 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
4516 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
4518 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
4519 * image.h: Add mono_image_fixup_vtable.
4520 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
4522 * coree.h: New file.
4523 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
4524 unsupported native code.
4525 (mono_marshal_set_callconv_from_modopt): New function splitted from
4526 mono_marshal_get_managed_wrapper.
4527 (mono_marshal_get_managed_wrapper): Use
4528 mono_marshal_set_callconv_from_modopt.
4529 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
4530 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
4531 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
4532 that results in a deadlock when the runtime is loaded in _CorDllMain.
4533 * Makefile.am: Add coree.c and coree.h.
4535 Contributed under MIT/X11 license.
4537 2008-04-28 Mark Probst <mark.probst@gmail.com>
4539 * generic-sharing.c: Search for type arguments in array element
4542 2008-04-28 Mark Probst <mark.probst@gmail.com>
4544 * class-internals.h, generic-sharing.c: New, small runtime generic context.
4546 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
4548 * object.c: Don't setup the RGCTX when the vtable is created,
4549 because we're setting it up lazily now.
4551 2008-04-26 Zoltan Varga <vargaz@gmail.com>
4553 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
4556 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
4558 * verify.c (verify_class_for_overlapping_reference_fields):
4559 If class is under fulltrust allow reference types to overllap
4560 if they have the same RVA.
4562 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
4564 * pedump.c: Added new flag valid-only, that makes the verifier
4565 behaves just like --security=validil. It won't fail type load
4566 due to unverifiable restrictions.
4568 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
4570 * class-internals.h (struct MonoMethod): Added a verification_success
4571 field to cache verifier executions. Reduced MonoMethod:slot size by
4574 2008-04-23 Zoltan Varga <vargaz@gmail.com>
4576 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
4577 instead of a 'vt' argument to save an indirection and to allow these to be used
4579 (scan_vtype): New helper function to scan an area using a gc descriptor.
4580 (mono_gc_wbarrier_value_copy): Implement this.
4581 (handle_remset): Add support for REMSET_VTYPE.
4582 (find_in_remset_loc): Ditto.
4583 (mono_gc_base_init): Allow some debugging options to be controlled through the
4584 use of the MONO_GC_DEBUG env variable.
4585 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
4586 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
4588 2008-04-23 Martin Baulig <martin@ximian.com>
4590 * domain.c (mono_domain_create): Move the call to
4591 mono_debug_domain_create() down, after allocating the domain id.
4593 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
4595 verify.c (verify_class_for_overlapping_reference_fields): Skip
4596 static fields while verifying for overlapping fields as they
4597 don't matter at all.
4599 2008-04-23 Marek Habersack <mhabersack@novell.com>
4601 * domain-internals.h: added a declaration of
4602 mono_make_shadow_copy.
4604 * assembly.c (mono_assembly_open_full): shadow copying of
4605 assemblies moved to here, so that all the assemblies within the
4606 application domain's private binary directories can be
4607 processed. Fixes bug #380546
4609 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
4610 mono_make_shadow_copy and made non-static. The decision whether
4611 to shadow-copy an assembly is made based on its location - it's
4612 copied if it's in one of the private application domain binary
4613 directories and its different to the target file in the shadow
4614 directory. Fixes bug #380546
4616 2008-04-22 Zoltan Varga <vargaz@gmail.com>
4618 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
4620 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
4623 * reflection.c (mono_image_create_token): Handle
4624 Method/ConstructorOnTypeBuilderInst.
4625 (resolve_object): Ditto.
4626 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
4627 so it can be called from resolve_object. Also handle the case when the inflated
4628 class already has its methods setup.
4630 2008-04-21 Martin Baulig <martin@ximian.com>
4632 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
4634 2008-04-20 Geoff Norton <gnorton@novell.com>
4636 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
4637 pointer dereference.
4639 2008-04-15 Marek Habersack <mhabersack@novell.com>
4641 * appdomain.c (try_load_from): if IOMAP is in effect, call the
4642 portability API to look up the assembly file. Fixes behavior in
4643 situations when the application has a bin/ directory, but the
4644 assembly search patch refers to Bin/ (and thus the requested file
4645 name is Bin/SomeLibrary.dll). Fixes bug #379888
4647 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
4649 verify.c (mono_type_is_generic_argument): Extracted this check
4650 from a dozen places to here.
4652 verify.c: Fixed all issues related to boxing generic arguments
4653 and their constraints.
4655 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
4657 verify.c (mono_class_interface_implements_interface): Fix win32 build.
4659 2008-04-14 Zoltan Varga <vargaz@gmail.com>
4661 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
4662 isn't finished yet. Fixes #363447.
4664 2008-04-13 Zoltan Varga <vargaz@gmail.com>
4666 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
4669 2008-04-13 Jb Evain <jbevain@novell.com>
4671 * domain.c: update the 2.1 profile versions.
4672 Merged from the Moonlight 2 branch.
4674 2008-04-12 Zoltan Varga <vargaz@gmail.com>
4676 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
4677 mscorlibs for the non-refonly case as well.
4679 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
4680 in mono_assembly_load_from_full (). Fixes #378924.
4682 2008-04-11 Geoff Norton <gnorton@novell.com>
4684 * icall.c: The global extern environ doesn't exist on Mac. We
4685 need to call NSGetEnviron instead.
4687 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4689 verify.c: Add generic method constraint verification.
4691 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4693 class.c (mono_class_inflate_generic_method_full): Add a long
4694 explanation to the is_mb_open hack. Remove the FIXME.
4696 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4698 * verify.c (mono_method_verify): Mark all unknown opcodes
4699 as invalid. Mark jmp as unverifiable.
4701 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4703 * verify.c: Add code to do type constraint verification on class instances.
4705 * verify.c (mono_verifier_verify_class): Use the type constraint
4708 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4710 * class.c (mono_class_get_field_default_value): Don't pass cindex
4711 as hint to mono_metadata_get_constant_index. The local is not initialized
4712 and should contain garbage most of the time. This could only work
4715 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
4717 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
4719 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
4721 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
4723 * class.c (mono_class_from_generic_parameter): Save the token of the
4724 generic param in MonoClass::sizes.generic_param_token.
4726 * reflection.c (mono_custom_attrs_from_class): If the class type is
4727 VAR or MVAR retrieve the attributes of the generic param.
4729 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
4731 * class.c (mono_class_init): Do class verification if the verifier
4734 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
4736 * verify-internal.h: Added mono_verifier_verify_class.
4738 * verify.c: Added mono_verifier_verify_class. It checks for
4739 classes with explicit layout that have overlapping reference fields.
4741 * pedump.c: Init the verifier state prior to verification. Fixed
4742 command line arguments.
4744 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
4746 * Makefile.am: Added verify-internals.h, hopefully fix the build.
4748 2008-04-08 Zoltan Varga <vargaz@gmail.com>
4750 * verify-internals.h: Fix a warning.
4752 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
4754 * verify-internals.h: New header with the verifier configuration
4755 extracted from mini.c.
4757 * verify.c: Implemented the new functions exported by verify-internals.h.
4759 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
4761 * verify.c: Add proper verification of ckfinite.
4763 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4765 * verify.c (do_conversion): Improved error message to something
4768 * verify.c (check_is_valid_type_for_field_ops): Fix to work
4769 with primitive types.
4771 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4773 * verify.c: Added tail prefix checking. Marked icall
4776 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4778 * verify.c: Fix the detection of branches to the middle
4781 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
4783 * verify.c: Implemented verification of volatile. and
4784 unaligned. prefix. Check if a type is valid after retrieving it.
4786 2008-04-01 Dick Porter <dick@ximian.com>
4788 * process.c (process_get_fileversion): If there's no string block,
4789 set the file language to en_US. Fixes the other new part of bug
4792 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
4794 * class.c: New functions mono_method_can_access_field_full and
4795 mono_method_can_access_method_full. They perform type visibility
4796 and type site check.
4798 * class-internal.h: Added exported functions.
4800 * verify.c: Use new functions to implement proper visibility checks.
4802 2008-03-29 Zoltan Varga <vargaz@gmail.com>
4804 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
4806 2008-03-28 Dick Porter <dick@ximian.com>
4808 * process.c (process_get_fileversion): Use the first language ID
4809 we see, rather than insisting on an invariant language. Fixes bug
4812 2008-03-28 Zoltan Varga <vargaz@gmail.com>
4814 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
4815 the streams to fix reading of invalid memory later.
4817 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
4820 2008-03-26 Zoltan Varga <vargaz@gmail.com>
4822 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
4823 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
4825 2008-03-26 Massimiliano Mantione <massi@ximian.com>
4826 * threads.h: Added MonoThreadManageCallback type and
4827 mono_thread_set_manage_callback prototype
4828 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
4829 (used to store the mono_thread_manage callback).
4830 * threads.c: Added mono_thread_set_manage_callback, and handle
4831 "MonoThread->manage_callback" in build_wait_tids.
4833 2008-03-26 Dick Porter <dick@ximian.com>
4835 * process.c (process_get_fileversion): Set FileVersionInfo strings
4836 to Empty when the resource doesn't have the particular info.
4839 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
4841 * verify.c (mono_method_verify): Proper prefix validation.
4843 2008-03-25 Zoltan Varga <vargaz@gmail.com>
4845 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
4846 itself in a separate argument instead of throwing them. Fixes #373448.
4848 * appdomain.c: Bump corlib version.
4850 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
4852 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
4854 2008-03-20 Kornél Pál <kornelpal@gmail.com>
4856 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
4859 2008-03-20 Mark Probst <mark.probst@gmail.com>
4861 * generic-sharing.c, class-internals.h: Code for putting
4862 reflection types into the runtime generic context.
4864 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
4866 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
4870 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
4872 * verify.c (VerifyContext): Added instruction prefix data to the struct.
4874 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
4876 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
4878 * verify.c (do_cast): Let the result value keep the boxed status.
4880 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
4882 2008-03-17 Jb Evain <jbevain@novell.com>
4884 * reflection.c: when running on a 2.0 runtime, emit
4885 unconditionally the #~ header version as 2.0, and the
4886 CLI header version as 2.5, for symmetry's sake with csc.
4888 2008-03-16 Zoltan Varga <vargaz@gmail.com>
4890 * class.c: Remove the unused cache_interface_offsets stuff.
4892 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
4893 profiler.c: Fix warnings.
4895 2008-03-16 Mark Probst <mark.probst@gmail.com>
4897 * generic-sharing.c, class-internals.h: Support for putting
4898 methods into the runtime generic context.
4900 2008-03-16 Zoltan Varga <vargaz@gmail.com>
4902 * class.c (mono_class_setup_fields): Ignore calls made to this function for
4903 classes which are generic instances of not-yet finished typebuilders. Fixes
4906 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
4908 2008-03-15 Zoltan Varga <vargaz@gmail.com>
4910 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
4912 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
4913 field, replace it with a hash table in MonoDynamicImage.
4915 * reflection.c (inflate_mono_method): Access the generic definition object from
4916 image->generic_def_objects instead of imethod->reflection_info.
4918 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
4920 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
4922 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
4923 function in reflection.c so it is easier to keep in sync with the dynamic image
4926 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
4927 mono_image_close ().
4929 2008-03-15 Mark Probst <mark.probst@gmail.com>
4931 * class.c (mono_class_generic_sharing_enabled): Disable generic
4932 sharing for all architectures except AMD64 and x86 to fix build.
4934 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
4936 * verify.c: Use the generic definition MonoGenericContext when available.
4937 Remove code for checking generics instance compatibility in favor of
4938 mono_class_is_assignable_from.
4940 2008-03-14 Mark Probst <mark.probst@gmail.com>
4942 * marshal.c, marshal.h, metadata-internals.h, image.c,
4943 wrapper-types.h: New wrapper for invoking a shared static method
4944 without having to pass the runtime generic context argument.
4946 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
4948 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
4950 2008-03-14 Zoltan Varga <vargaz@gmail.com>
4952 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
4954 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
4955 create a token from a FieldOnTypeBuilderInst.
4956 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
4957 (resolve_object): Ditto.
4959 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
4960 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
4962 2008-03-14 Martin Baulig <martin@ximian.com>
4964 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
4966 * debug-mono-symfile.h
4967 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
4968 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
4970 2008-03-10 Martin Baulig <martin@ximian.com>
4972 * debug-mono-symfile.h
4973 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
4974 `lexical_block_table_offset'.
4975 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
4977 (MonoSymbolFile): Added `version'.
4980 (MonoDebugLexicalBlockEntry): Removed.
4981 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
4984 * mono-debug.c (mono_debug_add_method): Don't compute lexical
4985 blocks here; the debugger now does this internally.
4987 2008-02-27 Martin Baulig <martin@ximian.com>
4989 * object.c (mono_runtime_exec_main): Call
4990 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
4991 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
4993 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
4995 * verify.c (verify_type_compatibility_full): Allow native int to be converted
4996 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
4998 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
5000 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
5001 ldftn with a virtual method.
5003 2008-03-13 Geoff Norton <gnorton@novell.com>
5005 * decimal.c: Only include memory.h if the platform has it.
5007 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
5009 * assembly.c, class.c, metadata-internals.h: make sure public key
5010 tokesns are compared in a case-insensitive way. Also, all
5011 the lookups in the GAC use a lowercase public key token
5012 (gaacutil already does the lowercasing on install). Fixes
5015 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
5017 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
5020 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
5022 * image.c: when someone loads a mscorlib from a file, return the
5023 currently loaded mscorlib (fixes bug #369253).
5025 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
5027 * class.c: handle types with no parents by forcing them to have
5028 System.Object as a parent and marking them as broken (this currently
5029 allows the first part of bug #369173 to work as well, likely because
5030 we don't check for typeload exceptions everywhere yet).
5032 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
5034 * class.c: more complete check that types belong to corlib
5035 (fixes second part of bug #369173).
5037 2007-03-10 Bill Holmes <billholmes54@gmail.com>
5039 * generic-sharing.c: Including glib.h for the MSVC builds to define
5040 "inline" to "__inline" before including mono-membar.h.
5042 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
5043 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
5046 Contributed under MIT/X11 license.
5048 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
5050 * verify.c (do_invoke_method): Remove return type validation.
5052 * verify.c (do_ret): Do return type validation at return site instead of
5055 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
5057 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
5059 * verify.c: Some todos cleaned and improved a few error messages.
5061 2008-03-08 Zoltan Varga <vargaz@gmail.com>
5063 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
5065 2008-03-07 Zoltan Varga <vargaz@gmail.com>
5067 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
5068 system types correctly.
5070 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
5073 2008-03-06 Zoltan Varga <vargaz@gmail.com>
5075 * assembly.c (build_assembly_name): Fix a warning.
5077 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5079 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
5080 the called function takes an object type argument. Fixes storing or
5081 valuetypes across remoting as well as reducing memory usage.
5082 * image.c, metadata-internals.h: remove now unused ldfld_remote and
5083 stfld_remote wrapper caches.
5085 2008-03-06 Zoltan Varga <vargaz@gmail.com>
5087 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
5090 * reflection.c (mono_image_register_token): New helper function to save
5091 a token->object mapping.
5093 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
5096 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
5097 one dimension arrays. Fixes #367670.
5098 (mono_reflection_get_type_internal): Ditto.
5100 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
5102 * marshal.c: mono_load_remote_field_new() always returns object.
5103 so use the proper signature (fixes bug #366445).
5105 2008-03-04 Zoltan Varga <vargaz@gmail.com>
5107 * class-internals.h (MonoMethod): Remove unused uses_this flag,
5108 add an 'inline_failure' flag instead.
5110 2008-03-04 Mark Probst <mark.probst@gmail.com>
5112 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
5113 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
5114 contains the location of "this", used for exception handling.
5116 2008-03-04 Zoltan Varga <vargaz@gmail.com>
5118 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
5119 their size on all platforms for perf reasons.
5121 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5123 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
5126 * object-internal.h: Same.
5128 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5130 * reflection.h: Fix the build I just broke.
5132 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5134 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
5135 Test if a token is valid, this remove explicit usage of
5136 MonoDynamicImage::tokens from the verifier code.
5138 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
5140 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
5141 instead of direct access to MonoDynamicImage::tokens.
5143 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5145 * verify.c (token_bounds_check): Fix the build I just broke.
5147 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5149 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
5151 * verify.c (verifier_load_method): Fixed the errors message.
5153 * verify.c (mono_method_verify): Fixed a debug message.
5155 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
5157 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
5158 mono-perfcounters.h, class-internals.h: support for predefined
5159 writable counters, query of categories and counters, bugfixes.
5161 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
5163 * verify.c (do_refanytype): Verify the refanytype opcode.
5165 * verify.c (mono_method_verify): Use do_refanytype.
5167 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
5169 * verify.c (do_mkrefany): Verify the mkrefany opcode.
5171 * verify.c (mono_method_verify): Use do_mkrefany.
5173 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
5175 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
5176 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
5179 2008-02-27 Zoltan Varga <vargaz@gmail.com>
5181 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
5182 the type load exception.
5184 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
5186 * verify.c: Added a few FIXME for method signatures
5188 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
5189 of mono_method_get_signature and get vararg call working. Removed unused
5190 checks for return value.
5192 * verify.c (do_refanyval): Verify the refanyval opcode.
5194 * verify.c (mono_method_verify): Implemented verification of arglist and
5197 2008-02-27 Zoltan Varga <vargaz@gmail.com>
5199 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
5200 vtypes to marshal.c.
5202 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
5203 it works for AOT as well.
5205 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
5207 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
5208 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
5209 the system time is adjusted.
5211 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
5213 * icall.c, icall-def.h: use the new time functions (fixes the
5214 non-monotonic behaviour of TickCount).
5216 2008-02-26 Zoltan Varga <vargaz@gmail.com>
5218 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
5219 it breaks the build.
5221 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
5222 cattr is not finished yet.
5224 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
5226 * verify.c: Proper token validation for field, method and type.
5228 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
5230 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
5232 * loader.c (method_from_memberref): Generate type load error instead of method missing
5233 if the type is not found.
5235 2008-02-23 Zoltan Varga <vargaz@gmail.com>
5237 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
5238 some of the conversions caused the generation of a marshal directive exception.
5240 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
5242 verify.c: Report which exception should be thrown by the JIT.
5243 Added a lot of FIXME notes.
5245 2008-02-22 Mark Probst <mark.probst@gmail.com>
5247 * generic-sharing.c: Runtime generic context slots are not
5248 instantiated on init anymore. Instead, provide function to do the
5249 instantiating on demand.
5251 * class-internals.h: Added vtable to runtime generic context.
5252 Macros for encoding direct and indirect slot offsets in one
5255 2008-02-21 Mark Probst <mark.probst@gmail.com>
5257 * object.c, generic-sharing.c: Moved some generic sharing code
5258 from object.c to generic-sharing.c.
5260 * generic-sharing.c: Added support for extensible runtime generic
5263 * metadata-internals.h: Two new hash tables in MonoImage for
5264 extensible runtime generic context support.
5266 * domain.c: Unregister generic vtables upon domain unloading.
5268 * image.c: Destroy new hash tables upon image unloading.
5270 * metadata.c: Unregister generic subclasses upon image unloading.
5272 * class-internals.h: New data structure for runtime generic
5273 context template. New fields in the runtime generic context for
5276 * Makefile.am: Added generic-sharing.c.
5278 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
5280 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
5281 there is a pending loader exception, raise it.
5283 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
5286 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
5291 2008-02-20 Zoltan Varga <vargaz@gmail.com>
5293 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
5295 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
5297 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
5298 ref-only requests for compatibility with MS.
5300 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
5302 * reflection.c (mono_custom_attrs_from_method): Don't silently
5303 return an empty list for generic method instances.
5304 (mono_custom_attrs_from_param): Likewise.
5306 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
5307 Raja R Harinath <harinath@hurrynot.org>
5310 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
5311 * class.c (mono_class_inflate_generic_method_full): Initialize it
5312 when a fully-open method is instantiated.
5313 * metadata.c (inflated_method_equal, inflated_method_hash): Update
5315 * reflection.c (inflate_mono_method): Don't create a temporary context.
5317 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
5319 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
5320 Compute correct value, to prepare for imethod->reflection_info going away.
5322 2008-02-19 Zoltan Varga <vargaz@gmail.com>
5324 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
5326 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
5328 * verify.c: Implement skip visibility flag.
5330 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
5332 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
5333 which contains an extra field to tell the kind of exception that should be thrown.
5335 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
5337 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
5339 * loader.c (mono_method_get_param_names): Initialize 'klass' after
5340 'method' is updated.
5342 2008-02-11 Zoltan Varga <vargaz@gmail.com>
5344 * class.c (mono_class_layout_fields): Set class->min_align for classes using
5345 explicit layout as well. Fixes #360375.
5347 2008-02-11 Geoff Norton <gnorton@novell.com>
5349 * loader.c: Guard and dereference against inflated generic methods
5351 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
5353 * class.c: Include Retargetable spec in assembly name.
5354 * assembly.c: Always include PublicKeyToken spec in assembly name
5355 (with value "null" if assembly is not signed), and include
5357 * icall-def.h: Added icall for Assembly.get_fullname.
5358 * icall.c: Added icall returning the fullname of an assembly.
5360 2008-02-09 Zoltan Varga <vargaz@gmail.com>
5362 * class.c (mono_class_setup_vtable_general): Add a missing call to
5363 mono_class_setup_methods () which is needed in the AOT case.
5365 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
5367 * verify.c (mono_type_get_stack_name): Added. Return the name for the
5368 stack type of the given MonoType.
5370 * verify.c (verify_type_compatibility_full): Handle the void type.
5372 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
5373 way stack merging works.
5375 * verify.c (store_local): Improved verification message.
5377 * verify.c (do_branch_op): If the merging is invalid, the method
5378 is unverifiable and not invalid. Improved error message.
5380 * verify.c (merge_stacks): Properly merge a boxed valuetype and
5381 a reference type diferent than System.Object. Improved error
5384 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
5386 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
5388 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
5389 type of an enum even if the argument is byref.
5391 * verify.c: Replace all explicit uses of enumtype and enum_basetype
5392 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
5394 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
5396 *verify.c (verify_type_compatibility_full): Make enum types
5397 compatible with their base types.
5399 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
5400 types are compatible for the special case of a boxed valuetype and
5403 * verify.c (verify_stack_type_compatibility): The function
5404 is_compatible_boxed_valuetype was extracted from here.
5406 * verify.c (push_arg): Only set ctx->has_this_store if the method
5409 * verify.c (do_ldelem): Fixed a typo in an error message and added
5410 strict check for mixing int32 and native int as the array type
5413 * verify.c (merge_stacks): Consider boxed valuetypes in the
5414 compatibility checks.
5416 2008-02-07 Massimiliano Mantione <massi@ximian.com>
5417 * profiler.h: (MonoGCEvent): Added start-stop the world events.
5419 2008-02-06 Massimiliano Mantione <massi@ximian.com>
5420 *class.c: use_new_interface_vtable_code: renamed the env var to have
5421 a "MONO_" prefix, and fix the logic to enable it by default.
5423 2008-02-06 Massimiliano Mantione <massi@ximian.com>
5425 mono_class_setup_vtable_general: rewrote the way in which interface
5426 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
5427 makes the code more maintainable.
5428 For now the old code is still there, and can be activated setting
5429 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
5431 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
5433 * verify.c: guarded some debug functions around and #ifdef.
5435 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
5437 2008-02-06 Zoltan Varga <vargaz@gmail.com>
5439 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
5440 changes for now since they seem to break too many things.
5442 2008-02-05 Mark Probst <mark.probst@gmail.com>
5444 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
5445 mono_marshal_find_nonzero_bit_offset): Added macro and function
5446 for finding the byte- and bit-offset of a bitfield within a
5449 2008-02-05 Zoltan Varga <vargaz@gmail.com>
5451 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
5452 (mono_marshal_get_struct_to_ptr): Ditto.
5454 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
5457 2008-02-03 Zoltan Varga <vargaz@gmail.com>
5459 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
5460 between methods for non-corlib types.
5462 2008-02-02 Geoff Norton <gnorton@novell.com>
5464 * loader.c (mono_method_get_param_names): Populate the parameter name for
5465 generic parameters as well. (Fixes #342536)
5467 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
5469 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
5471 * verify.c (do_invoke_method): Fix for calling with byref structs.
5473 * verify.c (do_cast): push a boxed value type based on the type token and not
5476 2008-01-31 William Holmes <billholmes54@gmail.com>
5478 * process.c (process_module_string_read): Check the size returned form
5479 VerQueryValue to avoid out of memory exception.
5481 2008-01-30 Zoltan Varga <vargaz@gmail.com>
5483 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5484 Handle properly modules which are not in the moduleref table. Fixes
5487 2008-01-29 Zoltan Varga <vargaz@gmail.com>
5489 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
5490 the dynamic case which is now in managed code.
5491 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
5493 * marshal.c (mono_string_to_bstr): Fix a warning.
5494 (init_com_provider_ms): Ditto.
5496 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
5498 * exception.c (mono_get_exception_out_of_memory): New helper function.
5500 2008-01-28 Jonathan Chambers <joncham@gmail.com>
5502 * marshal.c: Add support for BSTR marshalling
5503 using other COM systems.
5505 Code is contributed under MIT/X11 license.
5507 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
5509 * object.c (mono_runtime_invoke_array): reverted previous
5510 commit as it breaks the build.
5512 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
5514 * object.c (mono_runtime_invoke_array): Verify arguments for
5515 invalid types. Fixes #348522.
5517 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
5519 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
5520 non-final virtual calls using call.
5522 * verify.c (do_invoke): fixed some TODOs.
5524 * verify.c (push_arg): set has_this_store for "ldarga 0".
5526 2008-01-27 Zoltan Varga <vargaz@gmail.com>
5528 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
5529 which belong to an inflated class. Fixes #356531.
5531 2008-01-26 Robert Jordan <robertj@gmx.net>
5533 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
5534 which resort to FindFirstFile when a certain error condition
5535 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
5536 Code is contributed under MIT/X11 license.
5538 2008-01-24 Jonathan Chambers <joncham@gmail.com>
5540 * marshal.c (emit_marshal_string): Fix out string marshalling
5541 to use specified encoding. Fixes #323900.
5543 Code is contributed under MIT/X11 license.
5545 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
5547 * class.c (mono_class_inflate_generic_method_full): Don't modify
5548 iresult->context after cache check.
5550 2008-01-23 Zoltan Varga <vargaz@gmail.com>
5552 * class.c (mono_class_inflate_generic_method_full): Change the
5553 struct assignments to memcpy for better visibility and add some comments.
5555 2008-01-23 Dick Porter <dick@ximian.com>
5557 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
5558 procedure, and make it work on windows.
5560 2008-01-22 Zoltan Varga <vargaz@gmail.com>
5562 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
5563 a MonoReflectionTypeBuilder since it is always of that type.
5565 * reflection.c (mono_type_get_object): Remove an unneccesary check.
5567 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
5569 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
5571 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
5573 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
5575 * reflection.c (mono_reflection_create_runtime_class): Remove already created
5576 instantiations from the type cache.
5578 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5580 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
5582 * verify.c (do_unbox_value): push a controled mutability managed pointer.
5584 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5586 * verify.c (do_ldstr): added, verifies if the #US token is valid.
5588 * verify.c (mono_method_verify): removed old TODO
5590 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5592 * verify.c (do_newobj): add visibility check.
5594 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5596 * verify.c (do_load_function_ptr): add visibility check.
5598 2008-01-21 Massimiliano Mantione <massi@ximian.com>
5600 mono_generic_class_get_class: hook profiler events.
5601 mono_field_get_offset: added to support heap-shot in the new profiler.
5602 *class.h: exported mono_field_get_offset.
5604 mono_reflection_setup_internal_class: hook profiler events.
5606 2008-01-20 Zoltan Varga <vargaz@gmail.com>
5608 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
5609 argument here too and use it to avoid checking for pending exceptions if
5612 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
5614 * assembly.c (build_assembly_name): add arg for passing the assembly
5615 flags. Do not consider a PublicKey with value "null" valid.
5616 (mono_assembly_name_parse_full): added boolean argument that will be
5617 set if the assembly name contains a PublicKeyToken spec. Added support
5618 for the Retargetable spec for which only Yes or No are allowed as valid
5619 value. Consider assembly name invalid if Retargetable spec is set, but
5620 either version, culture or public key (token) are not specified.
5621 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
5622 with implementation in assembly.c.
5623 * icall.c (fill_reflection_assembly_name): also copy assembly flags
5624 from MonoAssemblyName.
5625 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
5626 introduced argument for mono_assembly_name_parse_full to know if the
5627 assembly name has a PublicKeyToken spec, and if it has instruct
5628 fill_reflection_assembly_name to use default value for keyToken (if
5629 PublicKeyToken is null).
5631 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
5633 * verify.c (mono_method_verify): fixed ovf ops with
5634 float values. They are unverifiable now.
5636 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
5638 * class.c (set_failure_from_loader_error): add BadImageException to the
5639 list of exceptions that can cause a type to fail to load.
5641 * class.c (mono_class_get_exception_for_failure): same.
5643 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
5645 * verify.c (in_any_exception_block): added, check if offset
5646 is part of any exception handling clause.
5648 * verify.c (get_stack_type): added VAR and MVAR types.
5650 * verify.c (do_stobj): better error messages.
5652 * verify.c (do_cpobj): added, check cpobj.
5654 * verify.c (do_initobj): added, check initobj.
5656 * verify.c (do_sizeof): added, check sizeof.
5658 * verify.c (do_localloc): added, check localloc.
5660 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
5662 2008-01-17 Zoltan Varga <vargaz@gmail.com>
5664 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
5665 save_lmf/restore_lmf opcodes.
5667 * threads.c (mono_threads_install_notify_pending_exc): New function to
5668 install a callback notifying the JIT there is a pending exception on a thread.
5669 (mono_thread_request_interruption): Call the new callback.
5670 (mono_thread_get_and_clear_pending_exception): New function to return the
5671 exception pending on a thread.
5673 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
5674 to turn off checking for pending exceptions.
5675 (mono_marshal_get_native_wrapper): Ditto.
5677 2008-01-16 Zoltan Varga <vargaz@gmail.com>
5679 * threads-types.h: Get rid of the unnecessary extern declarations.
5681 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
5683 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
5684 return field from parent class if not private.
5685 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
5686 returns fields from parent class if they are not private.
5687 (method_nonpublic): added function to determine if a given method
5688 should be considered non-public. Returns false for private methods
5689 on parent class, and internal methods from parent on the 1.0 profile.
5690 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
5691 use method_nonpublic function to determine whether method should be
5693 (property_accessor_public): use newly introduced method_nonpublic
5694 function to determine whether accessor is non-public.
5695 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
5696 event from parent class if not private. Only return static event if
5697 Static flag is set, and only return static event from parent class if
5698 FlattenHierarchy flag is set.
5699 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
5700 include non-private events from parent class.
5702 2008-01-16 Zoltan Varga <vargaz@gmail.com>
5704 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
5707 2008-01-16 Wade Berrier <wberrier@novell.com>
5709 * security.c: Add assembly.h header to appease some warnings
5711 2008-01-16 Dick Porter <dick@ximian.com>
5713 * process.c (process_module_string_read): Remove trailing null
5716 2008-01-16 Mark Probst <mark.probst@gmail.com>
5718 * class-internals.h: A new data structure describing the layout of
5719 a runtime generic context (MonoRuntimeGenericContextTemplate).
5721 * metadata-internals.h: Added a hash table to MonoDomain that maps
5722 from open generic classes to their runtime generic context
5725 * object.c: Building of the runtime generic context, including
5726 proper handling of generic type arguments of superclasses.
5727 Building of the runtime generic context according to the template.
5729 2008-01-15 Zoltan Varga <vargaz@gmail.com>
5731 * class.c (mono_class_setup_fields): Set field.count for generic instances.
5734 * image.c (do_mono_image_open): Pass TRUE as last_exists to
5735 mono_portability_find_file (). Fixes #325466.
5736 (mono_image_get_public_key): Fix a warning.
5738 2008-01-14 Zoltan Varga <vargaz@gmail.com>
5740 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
5742 (mono_class_from_name_case): Ditto.
5744 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
5746 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
5747 common storage for the tables used in the System/NumberFormatter class.
5749 2008-01-13 Zoltan Varga <vargaz@gmail.com>
5751 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
5753 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
5755 * verify.c (get_boxable_mono_type): check if the token is valid.
5757 * verify.c (set_stack_value): changed to add an error if an
5758 invalid type is set on stack. Changed all callers due to signature change.
5760 * verify.c (do_stobj): implement stobj validation.
5762 2008-01-11 Zoltan Varga <vargaz@gmail.com>
5764 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
5765 set container->is_method, it was set earlier.
5767 * metadata.c (type_in_image): Handle MVARs which belong to not finished
5770 * reflection.c (mono_reflection_initialize_generic_parameter): Set
5771 is_method of the generic container to TRUE for methods.
5773 2008-01-10 Zoltan Varga <vargaz@gmail.com>
5775 * metadata.c (type_in_image): Handle type parameters properly.
5777 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
5778 memory ownership of this structure.
5780 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
5782 * verify.c (get_boxable_mono_type): make typedref types been just
5783 unverifiable. check for void type.
5785 * verify.c (do_unbox_any): added, verify opcode unbox.any.
5787 * verify.c (do_load_function_ptr): accept method spec tokens.
5789 2008-01-10 Zoltan Varga <vargaz@gmail.com>
5791 * marshal.c (mono_class_native_size): Always set *align even if this is called
5794 2008-01-09 Zoltan Varga <vargaz@gmail.com>
5796 * verify.c (mono_verify_corlib): Remove this as it was not used and was
5799 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5801 * verify.c: removed some old unused tables. A huge bunch of small fixes
5802 to things found while testing the verifier with mono basic.
5804 * verify.c (dump_stack_value): dump null literal flag to.
5806 * verify.c (verify_type_compatibility_full): fix comparison
5807 for types that have a generic super type.
5809 * verify.c (verify_stack_type_compatibility): fix compatibility
5810 between null literals and reference types. fix compatibility between
5811 boxed valuetypes and object. fix corner case test for enums.
5813 * verify.c (do_cmp_op): proper verification of cgt.un in case
5816 * verify.c (do_invoke_method): fix error message.
5818 * verify.c (do_store_indirect
5820 * verify.c (check_is_valid_type_for_field_ops): proper verification
5821 of managed pointers to valuetypes and boxed valuetypes. proper verification
5824 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
5825 allow token to be a reference type.
5827 * verify.c (do_cast): proper handling of boxes valuetypes.
5829 * verify.c (do_stelem): proper handling of storing a boxed valuetype
5832 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
5833 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
5834 fixed the decoding of unbox_any
5836 2008-01-08 Zoltan Varga <vargaz@gmail.com>
5838 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
5840 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
5842 * verify.c (do_newobj): do delegate verification.
5844 * verify.c (verify_delegate_compatibility): perform delegate
5847 * verify.c (verify_ldftn_delegate): perform tests related to
5850 * verify.c (mono_delegate_signature_equal): perform the
5851 slightly diferent signature comparison required by delegates.
5853 * metadata.c (mono_metadata_type_equal_full): added and exported
5854 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
5855 allows signature only comparison.
5857 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
5860 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
5862 * verify.c: added a bunch of stack_slot_* functions to
5863 make access to stack slot type easier. This is required to
5864 allow optional flags, like null literal, boxed value and
5866 All access paths to IlStackDesc::stype have been changed
5867 to use these new funcions.
5868 Removed a bunch of unused functions and cleared all warnings.
5869 This patch introduces the usage of the this pointer and
5872 2008-01-07 Zoltan Varga <vargaz@gmail.com>
5874 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
5876 2008-01-06 Zoltan Varga <vargaz@gmail.com>
5878 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
5879 match managed version.
5881 * appdomain.c: Bump corlib version.
5883 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
5886 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
5888 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
5889 Set public key token to zero-length byte array if assembly is not
5892 2008-01-05 Zoltan Varga <vargaz@gmail.com>
5894 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
5895 writing a vtype array elem.
5897 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
5899 * assembly.c (build_assembly_name): return FALSE if length of token is
5900 not 16 (if not "null").
5901 (mono_assembly_name_parse_full): return FALSE if value of version,
5902 culture, token or key is 0.
5903 * icall.c (fill_reflection_assembly_name): add boolean arguments to
5904 specify whether public key and public key token must be set to default
5905 value (zero-length byte array) if not available. Set versioncompat to
5906 SameMachine. If public key is available or the default is set, then
5908 (ves_icall_System_Reflection_Assembly_FillName): if no public key
5909 is available, use empty byte array as default value. On the 2.0
5910 profile, use default value for public key token if not set.
5911 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
5912 profile, use default value for public key if not set. On the 2.0
5913 profile, use default value for public key token if not set.
5914 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
5915 default values for public key and public key token.
5917 2008-01-05 Zoltan Varga <vargaz@gmail.com>
5919 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
5920 field to keep it in synch with the managed object.
5922 * marshal.c (emit_marshal_object): Add support for byref marshalling of
5923 delegates. Fixes #351520.
5925 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
5926 contains defined memory.
5928 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
5930 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
5932 * sgen-gc.c (check_consistency): New helper function to do a consistency check
5933 of the GC data structures.
5935 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
5937 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
5939 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
5941 (mono_array_clone_in_domain): Ditto.
5942 (mono_array_clone_in_domain): Ditto.
5944 * threads.c (start_wrapper): Register the thread start argument as a GC root.
5945 (cache_culture): Use a write barrier.
5947 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
5948 (ves_icall_get_property_info): Ditto.
5950 * object.h (MONO_STRUCT_SETREF): New macro.
5952 * class-internals.h (MonoStats): Add some GC statistics.
5954 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
5956 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
5958 * exception.c (mono_exception_from_name_two_strings):
5959 Break from loop after method is found.
5961 2008-01-04 Dick Porter <dick@ximian.com>
5963 * process.c (process_module_string_read): Rename variable to
5964 reflect correct usage, after fixing bug 345972.
5966 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
5968 * verify.c (mono_type_create_fnptr_from_mono_method):
5969 created a MonoType function pointer instance to be used during
5970 verification. The verifier releases this memory at end.
5972 * verify.c (mono_method_is_constructor): extracted repeated
5973 checks for constructor into a single class.
5975 * verify.c (do_push_field): use new extracted method
5976 for constructor check.
5978 * verify.c (do_newobj): same.
5980 * verify.c (do_ldftn): renamed to do_load_function_ptr
5981 and make it verify ldvirtftn too.
5983 * verify.c (mono_method_verify: proper verification
5984 of ldvirtftn. release created MonoMethod instances.
5986 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
5988 * verify.c (token_bounds_check): added.
5990 * verify.c (do_ldftn): added.
5992 * verify.c (mono_method_verify): proper verificartion of ldftn.
5994 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
5996 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
5997 than the table row count. It's the resposibility of the caller to
5998 make the bounds check and raise the correct error.
6000 * metadata.c (mono_metadata_decode_row_col): Same.
6002 * loader.c (mono_get_method_from_token): perform bounds check
6003 on token for methoddef table.
6005 2007-12-29 Miguel de Icaza <miguel@novell.com>
6008 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
6009 assert into a negative result, the managed code already coped with
6012 Some folks on Windows reported this error.
6014 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
6016 * appdomain.c: Bump corlib version.
6018 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
6019 CultureInfo.CreateCulture to create CultureInfo for name.
6020 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
6021 create CultureInfo for name. Fixes bug #347174.
6023 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
6025 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
6028 * verify.c (is_valid_branch_instruction): allow branching to the
6029 first instruction of the protected block.
6031 * verify.c (is_valid_cmp_branch_instruction): same.
6033 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
6034 avoid double initialization.
6036 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
6037 detect which cases the eval stack should just be copied.
6039 * verify.c (mono_method_verify): check if the eval stack
6040 is empty when entering a protected block.
6042 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
6044 * verify.c: added is_clause_in_range, is_clause_inside_range,
6045 is_clause_nested and verify_clause_relationship. They perform
6046 the verifications stated in P1 12.4.2.7.
6048 * verify.c (mono_method_verify): remove some unused variables,
6049 add the new exception clause checks, add instruction border
6050 checks for protected block start/end, improved some error
6051 messages and fixed a bug in the way invalid instruction access
6054 2007-12-26 Zoltan Varga <vargaz@gmail.com>
6056 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
6057 from GC 7.0 if available.
6059 * object.c: Remove an unused define.
6061 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
6063 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
6065 * null-gc.c (mono_gc_make_descr_for_array): Implement.
6067 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
6069 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
6070 to take the same arguments as the other make_descr functions.
6072 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
6074 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
6077 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
6080 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
6083 * boehm-gc.c (mono_gc_register_root): Fix a warning.
6085 * null-gc.c (mono_gc_register_root): Fix a warning.
6087 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
6089 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
6090 (mono_gc_base_init): Call GC_init ().
6092 * null-gc.c: Define mono_gc_register_root () as a no-op.
6094 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
6096 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
6098 * verify.c: add prototype for merge_stacks at top
6100 * verify.c (do_switch): added.
6102 * verify.c (merge_stacks): on some cases the stack merging
6103 was not happening properly. Unequal stack sizes at merge
6104 points should be invalid.
6106 * verify.c (mono_method_verify): added more debug info on stack state.
6107 verify switch properly.
6109 2007-12-24 Zoltan Varga <vargaz@gmail.com>
6111 * method-builder.h: New file, moved the mono_mb_ declarations here from
6114 * boehm-gc.c marshal.c: Include method-builder.h.
6116 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
6118 * marshal.c: Remove some code which is now in method-builder.c.
6120 2007-12-23 Zoltan Varga <vargaz@gmail.com>
6122 * method-builder.c: New file, extraction of the method builder functionality
6125 * marshal.c: Move the mb functions into method-builder.c.
6127 * marshal.h marshal.c: Export some mono_mb_... functions.
6129 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
6131 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
6134 * class.c (mono_class_get_full): Check the token type in the dynamic case.
6136 * loader.c (mono_field_from_token): Ditto.
6138 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
6141 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
6144 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
6145 a helper function for setting it.
6147 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
6150 * assembly.c: Significally simplify code now that referenced assemblies are
6151 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
6153 * threads.h: Don't include the internal threads-types.h header file. Fixes
6156 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
6158 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
6159 instructions that were target of branches or are at protected block boundaries.
6161 * verify.c (in_same_block): handle filter clauses.
6163 * verify.c (is_valid_branch_instruction): added. checks the target of
6164 instructions br or brtrue/false.
6166 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
6167 binary branch instructions such as beq and bge.
6169 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
6170 and made it pin the instruction as been part of the exception block.
6172 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
6175 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
6178 * verify.c (do_ret): ret from a protected block is unverifiable and
6181 * verify.c (do_static_branch): verify br and br.s instructions.
6183 * verify.c (merge_stacks): add extra param to support detection
6184 of branches in the middle of instructions.
6186 * verify.c (mono_method_verify): verify branches and exception blocks
6187 that target the middle of instructions. Proper verification of br and br.s.
6189 2007-12-21 Zoltan Varga <vargaz@gmail.com>
6191 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
6192 skip_visibility field.
6193 (reflection_methodbuilder_from_dynamic_method): Ditto.
6195 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
6196 registrations. Fixes #348193.
6198 * threads.h: Move the internal mono_thread_get_pending_exception () to
6199 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
6201 2007-12-20 Zoltan Varga <vargaz@gmail.com>
6203 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
6204 icall registration. Fixes #348193.
6206 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
6207 for corlib classes into object. Fixes #349621.
6209 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
6211 * icall.c (property_accessor_nonpublic): new function to determine
6212 whether an accessor allows a property to be considered non-public.
6213 Returns false for private accessor(s) from parent class, and internal
6214 accessor(s) from parent on 2.0 profile (and higher).
6215 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
6216 to determine whether property should be included if NonPublic flag
6217 is set. Fixes bug #349078.
6219 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
6221 * verify.c (init_stack_with_value): added.
6223 * verify.c (mono_method_verify): extracted common
6224 code for exception initialization into init_stack_with_value.
6226 * verify.c (mono_method_verify): initialize the exception
6227 for handler clauses as well.
6229 * verify.c (mono_method_verify): fix the exception clause
6230 ordering rules, it should use handler end offset and not
6233 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
6235 * rawbuffer.c: remove useless warning.
6237 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
6239 * threads.h, threads-types.h: move functions to the correct header
6242 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
6244 * verify.c (mono_method_verify): proper verification
6245 of exception handling clauses ranges and fallthru in
6246 and out of protected blocks.
6248 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
6250 * verify.c (mono_method_verify): fixed compilation issue.
6252 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
6254 * verify.c (mono_method_verify): a printf slipped in, changed
6255 to use verifier debug macro.
6257 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
6259 * verify.c (is_correct_leave): check for filter clauses.
6261 * verify.c (do_filter): added.
6263 * verify.c (mono_method_verify): property verification of leave.
6266 2007-12-18 Mark Probst <mark.probst@gmail.com>
6268 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
6269 Win32 build, until we figure out how to do the proper thing on
6272 2007-12-17 Zoltan Varga <vargaz@gmail.com>
6274 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
6275 by the previous patch.
6277 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
6278 the assembly resolve handler for refonly assemblies.
6280 2007-12-17 Mark Probst <mark.probst@gmail.com>
6282 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
6283 Make sure only one thread is allowed to commence shutdown, and
6284 don't allow new threads to be started once shutdown is in
6287 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
6289 * verify.c (is_correct_endfilter): added.
6291 * verify.c (is_unverifiable_endfilter): added.
6293 * verify.c (do_endfilter): added.
6295 * verify.c (mono_method_verify): property verification of endfilter
6296 and fixed a corner case or endfinally.
6298 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
6300 * verify.h: new flags to support fail fast of unverifiable code and
6301 do non-strict verification. Non-strict verification is required to
6302 have MS runtime compatibility. There are a huge amount of unverifiable
6303 code that it accepts as verifiable. The strict mode verifies the code
6305 Non-strict mode will be required in cases where code needs to be
6306 accepted as verifiable but fails under strict mode.
6308 * pedump.c: added support to fail fast and non-strict verification.
6310 * verify.c: added support for both fail fast and non-strict verification.
6312 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
6314 * verify.c (is_correct_endfinally): added.
6316 * verify.c (mono_method_verify): property verification of endfinally.
6318 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
6320 * verify.c (in_any_block): check for filter clauses.
6322 * verify.c (is_correct_rethrow): added.
6324 * verify.c (mono_method_verify): property verification of rethrow.
6326 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
6328 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
6330 * verify.c (do_throw): added.
6332 * verify.c (mono_method_verify): property verification of throw
6334 2007-12-11 Zoltan Varga <vargaz@gmail.com>
6336 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
6337 assemblies. Fixes #346425.
6339 2007-12-10 Zoltan Varga <vargaz@gmail.com>
6341 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
6344 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
6346 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
6347 prevent asserts when this is called with a token which might not be valid.
6349 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
6350 lookup_dynamic_token_class with valid_token == FALSE.
6352 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
6354 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
6356 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
6358 2007-12-10 Mark Probst <mark.probst@gmail.com>
6360 * gc.c: Don't delay threadpool thread finalization unless Mono is
6363 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6365 * threads.c: turn an assert into a non-fatal warning.
6367 2007-12-09 Robert Jordan <robertj@gmx.net>
6369 * icall.c (GetVirtualMethod): Add missing argument validation.
6371 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6373 * verify.c (do_cast): added.
6375 * verify.c (mono_method_verify): property verification of castclass and isinst.
6378 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6380 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
6382 * verify.c (do_stelem): added.
6384 * verify.c (mono_method_verify): property verification of stelem.X.
6386 2007-12-07 Mark Probst <mark.probst@gmail.com>
6388 * class.c, class-internals.h: Introduce an environment variable
6389 (MONO_GENERIC_SHARING) through which the extent of generic code
6390 sharing can be controlled (share all classes, share only corlib
6391 classes, or share nothing).
6393 * object.c: Only create runtime generic context for classes for
6394 which sharing is enabled.
6396 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6398 * verify.c (do_ldelem): refactor it to work with ldelem.any.
6400 * verify.c (mono_method_verify): property verification of ldelem.any.
6402 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6404 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
6405 added ldelem.X opcodes.
6407 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
6409 * verify.c: proper verification of ldelem.X
6411 2007-12-06 Zoltan Varga <vargaz@gmail.com>
6413 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
6415 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
6417 * verify.c (mono_method_verify): null literal requires special handling,
6418 the value pushed on stack need to be flagged as so.
6420 * verify.c (do_ldelema): Verify ldelema properly.
6422 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
6424 * verify.c: Verify ldlen properly.
6426 2007-12-05 Zoltan Varga <vargaz@gmail.com>
6428 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
6429 to the target object's type. Fixes #346160.
6431 2007-12-05 Dick Porter <dick@ximian.com>
6433 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
6434 Solaris needs the same workaround as BSD-derived systems. Fixes
6435 bug 323524, patch by Burkhard Linke
6436 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
6438 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
6440 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
6441 handle to use when error dialog is shown; otherwise, update mask
6442 to show no error dialog when an error occurs.
6444 2007-12-03 Zoltan Varga <vargaz@gmail.com>
6446 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
6448 * class.c (mono_class_get_field_default_value): New helper function to initialize
6449 field->def_type and field->data.
6451 2007-11-30 Zoltan Varga <vargaz@gmail.com>
6453 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
6456 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
6458 * marshal.c: Avoid depending on delegate->method_info being set.
6460 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
6462 * object.c (mono_delegate_ctor): Set delegate->method.
6464 * object-internals.h (struct _MonoDelegate): Add 'method' field.
6466 * appdomain.c: Bump corlib version.
6468 2007-11-27 Raja R Harinath <harinath@gmail.com>
6470 * metadata.c (mono_generic_inst_equal_full): Short-circuit
6471 equality check if we're comparing canonicalized MonoGenericInsts.
6473 2007-11-23 Zoltan Varga <vargaz@gmail.com>
6475 * class.c (generic_array_methods): Call mono_class_setup_methods () before
6476 accessing class->methods.
6478 2007-11-22 Dick Porter <dick@ximian.com>
6480 * threads.c: Ensure that the synch_cs is set before trying to use
6483 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
6485 * profiler.c: r89126 broke the statistial profiler, unbreak.
6487 2007-11-22 Martin Baulig <martin@ximian.com>
6489 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
6492 (mono_debug_debugger_version): Bump to 3.
6493 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
6494 -> mono_debugger_class_initialized().
6496 * mono-debug-debugger.c
6497 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
6500 (mono_debugger_start_class_init_func): Removed.
6501 (mono_debugger_class_loaded_methods_func): Added.
6502 (mono_class_setup_methods): Call it here.
6504 2007-11-22 Martin Baulig <martin@ximian.com>
6507 (mono_debug_add_delegate_trampoline): New public method.
6508 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
6511 (MonoSymbolTable): Added `global_data_table'.
6512 (MonoDebuggerTypeKind): Removed.
6514 2007-11-21 Zoltan Varga <vargaz@gmail.com>
6516 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
6519 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6521 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
6523 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
6525 2007-11-20 Martin Baulig <martin@ximian.com>
6527 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
6529 * mono-debug-debugger.c
6530 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
6531 (mono_debugger_remove_breakpoint): Likewise.
6532 (mono_debugger_check_breakpoints): Likewise.
6533 (mono_debugger_register_class_init_callback): New public method.
6534 (mono_debugger_remove_class_init_callback): Likewise.
6535 (mono_debugger_add_type): Likewise.
6537 * mono-debug-debugger.h
6538 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
6540 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
6542 * class.c: more interface implementations needed for the
6543 array enumerator (fixes bug #341112).
6545 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
6547 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
6548 fix ParamName of ArgumentNullExceptions.
6550 2007-11-17 Miguel de Icaza <miguel@novell.com>
6552 * reflection.c (mono_reflection_encode_sighelper): Generate the
6553 modopts and modreqs. I have a useless test that crashes monodis,
6554 but that shows the code working.
6556 2007-11-17 Zoltan Varga <vargaz@gmail.com>
6558 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
6559 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
6561 2007-11-15 Dick Porter <dick@ximian.com>
6563 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
6564 When joining a thread, it's the thread that's calling Join that
6565 gets WaitSleepJoin state not the target. Fixes the standalone
6566 test case in bug 334740, and hopefully the whole bug too.
6568 2007-11-15 Dick Porter <dick@ximian.com>
6570 * process.c: Read file version info from the files pointed at by
6571 process modules, not the current process. Fixes bug 315969.
6573 Use windows typedef names in some places to fix warnings on the
6576 2007-11-15 Mark Probst <mark.probst@gmail.com>
6578 * image.c, metadata-internals.h: Added a generic_class_cache hash
6579 to MonoImage for looking up generic classes when sharing generics.
6581 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6583 * sgen-gc.c: warning cleanups.
6585 2007-11-15 Zoltan Varga <vargaz@gmail.com>
6587 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
6588 inherited properties.
6590 2007-11-14 Mark Probst <mark.probst@gmail.com>
6592 * object.c, class-internals.h: Added more information to the
6593 runtime generic context.
6595 2007-11-13 Zoltan Varga <vargaz@gmail.com>
6597 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
6598 instead of just the target method. Generalize the abstract method handling to
6599 handle any non-static method.
6601 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
6602 mono_marshal_get_delegate_invoke () signature change.
6604 2007-11-13 Mark Probst <mark.probst@gmail.com>
6606 * class.c, class-internals.h: Made
6607 mono_type_get_basic_type_from_generic () public. Fixed member
6608 access check for shared generics.
6610 * loader.c: Don't insert field into field cache if it's part of a
6611 non-inflated generic class.
6613 * domain.c, domain-internals.h: The generic sharing context is now
6614 part of the jit info data structure. Added two accessor
6617 2007-11-12 Zoltan Varga <vargaz@gmail.com>
6619 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
6620 the array Get/Set/Address methods, since the JIT inlines them.
6622 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
6624 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
6625 (mono_image_init): Initialize runtime_invoke_direct_cache.
6627 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
6628 mono_marshal_get_delegate_invoke signature change.
6630 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
6631 an additional argument. Add support for invoking abstract methods.
6633 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
6635 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
6637 2007-11-09 Mark Probst <mark.probst@gmail.com>
6639 * class.c: Do field layout for open generic classes as well.
6641 2007-11-09 Mark Probst <mark.probst@gmail.com>
6643 * gc.c, gc-internal.h: Don't finalize threadpool threads with
6644 other objects, because the threadpool is still around. Put them
6645 in a list instead and after finalizing all other objects in the
6646 root domain shut down the thread pool and then finalize the
6647 threads. Fixes bug #337383.
6649 * threads.c, thread-types.h: New mono_thread_create_internal()
6650 function for marking a thread with the threadpool flag before it
6651 started. Set synch_cs to NULL after freeing it.
6653 * threadpool.c: Mark threadpool threads before they start.
6655 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6657 * reflection.h, reflection.c: don't export random functions
6658 and lazy load dbnull and missing objects.
6660 2007-11-07 Jonathan Chambers <joncham@gmail.com>
6662 * class.c: Initialize COM types if COM interfaces
6663 are present (not just COM classes).
6665 Code is contributed under MIT/X11 license.
6667 2007-11-07 Massimiliano Mantione <massi@ximian.com>
6669 create_dynamic_mono_image: hook module profiler events (dynamic case).
6670 mono_image_basic_init: hook assembly profiler events (dynamic case).
6672 2007-11-07 Massimiliano Mantione <massi@ximian.com>
6674 simple_appdomain_unload: completely terminate the profiler
6675 instead of only processing the statistical samples.
6676 simple_shutdown: make sure this is really called exactly once,
6677 even in multithreaded applications, and always listen to
6679 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
6680 here, the "[un]load" functions will do it.
6681 Fixes bugs #333791 and #325261.
6683 2007-11-07 Geoff Norton <gnorton@novell.com>
6685 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
6686 rather than depend on __APPLE__.
6688 2007-11-07 Mark Probst <mark.probst@gmail.com>
6690 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
6692 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
6694 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
6695 UTF16 MonoString. Fix the crash from bug #335488
6697 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
6699 * marshal.c: Correct (for non-Win32 OS) length != size in
6700 mono_string_from_bstr. Fix #339530.
6702 2007-11-06 Geoff Norton <gnorton@novell.com>
6704 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
6707 2007-11-05 Kornél Pál <kornelpal@gmail.com>
6709 * process.c: Added run-time GetProcessId API detection for Windows.
6711 2007-11-04 Miguel de Icaza <miguel@novell.com>
6713 * reflection.c (mono_param_get_objects): If a parameter has the
6714 attribute [System.Runtime.InteropServices.Optional] we should
6715 set the DefaultValue of the ParameterInfo to be
6716 System.Reflection.Missing instead of DBNull.
6720 (mono_get_reflection_missing_object): New method,
6721 returns the System.Reflection.Missing.Value singleton instance.
6723 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
6725 * culture-info-table.h : regenerated.
6727 2007-11-02 Jonathan Chambers <joncham@gmail.com>
6729 * icall.c: Use GetEnvironmentStrings on windows
6730 so we are using the same environment block as
6731 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
6734 Code is contributed under MIT/X11 license.
6736 2007-10-31 Martin Baulig <martin@ximian.com>
6738 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
6740 * mono-debug-debugger.h
6741 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
6743 2007-10-30 Zoltan Varga <vargaz@gmail.com>
6745 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
6748 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
6750 * culture-info-table.h : regenerated.
6752 2007-10-30 Robert Jordan <robertj@gmx.net>
6754 * icall-def.h, icall.c:
6755 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
6757 Code is contributed under MIT/X11 license.
6759 2007-10-29 Zoltan Varga <vargaz@gmail.com>
6761 * class.c (mono_class_setup_vtable): Find the inflated methods in the
6762 inflated class instead of inflating them again.
6764 * class.c (mono_class_setup_vtable): Inflate the override methods in the
6767 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
6768 Call setup_supertypes () after klass->parent is set.
6769 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
6771 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
6772 for inflated instances of not yet created dynamic generic classes.
6773 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
6774 times from inflated_method.
6775 (methodbuilder_to_mono_method): Ditto.
6777 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
6779 * gc.c: code cleanup and removed old untested option of not creating the
6782 2007-10-29 Zoltan Varga <vargaz@gmail.com>
6784 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
6785 creating a jump trampoline for dynamic methods.
6787 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
6789 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
6790 generic TypeBuilders when called from another method of the same type (bug #335131).
6793 2007-10-27 Zoltan Varga <vargaz@gmail.com>
6795 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
6796 doesn't seem to work perfectly.
6798 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
6799 called multiple times.
6800 (methodbuilder_to_mono_method): Ditto.
6801 (resolve_object): Inflate FieldBuilder's.
6803 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6805 * string-icalls.c, string-icalls.h, appdomain.c: patch from
6806 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
6807 RemoveEmptyEntries in the string.Split implementation (bug #322375).
6809 2007-10-26 Dick Porter <dick@ximian.com>
6811 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
6812 Thread initialisation changes
6814 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
6816 * verify.c: fix compatibility check between arrays and System.Array
6818 2007-10-26 Zoltan Varga <vargaz@gmail.com>
6820 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
6823 2007-10-25 Zoltan Varga <vargaz@gmail.com>
6825 * object.c (mono_value_box): Use typed allocation here.
6827 2007-10-23 Zoltan Varga <vargaz@gmail.com>
6829 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
6830 trampoline instead of compiling the method right away.
6832 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
6834 2007-10-21 Zoltan Varga <vargaz@gmail.com>
6836 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
6837 related fields for dynamic classes. Fixes #334493.
6839 2007-10-20 Zoltan Varga <vargaz@gmail.com>
6841 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
6843 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
6845 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
6846 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
6848 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
6850 * reflection.c (create_generic_typespec): Initialize klass->generic_container
6852 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
6854 2007-10-18 Jonathan Chambers <joncham@gmail.com>
6856 * marshal.c: Use correct key when removing item
6859 Code is contributed under MIT/X11 license.
6861 2007-10-17 William Holmes <billholmes54@gmail.com>
6863 *marshal.c: Adding a case to marshal booleans to U1
6865 Code is contributed under MIT/X11 license.
6867 2007-10-18 Zoltan Varga <vargaz@gmail.com>
6869 * class.c (mono_class_from_name): Search the modules compromising dynamic
6870 assemblies. Fixes #331601.
6872 2007-10-16 Zoltan Varga <vargaz@gmail.com>
6874 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
6875 exception if the type name contains an assembly component. Fixes #334203.
6877 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
6878 modules inside dynamic assemblies. Fixes #334200.
6880 * reflection.c: Set image->public_key and image->public_key_length;
6882 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
6885 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
6887 2007-10-16 Mark Probst <mark.probst@gmail.com>
6889 * metadata.c: Implemented correct comparing of generic classes.
6890 An inflated generic class can be equal to a non-inflated one if it
6891 is inflated with generic type variables as type arguments. Fixes
6894 2007-10-15 Dick Porter <dick@ximian.com>
6896 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
6897 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
6900 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
6901 instead of a monitor lock. This means that monitor_try_enter and
6902 co can set the thread state safely.
6903 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
6904 thread_interrupt_requested, so interrupt actually works.
6906 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
6907 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
6908 state accessor function
6910 2007-10-15 Martin Baulig <martin@ximian.com>
6913 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
6914 the debugger with the current runtime.
6916 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6918 * object.c, object-internals.h: added the ability to set a single
6919 trampoline for all the slots in a vtable.
6921 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6923 * marshal.c: deal with a possible race condition during multicast
6924 delegate invocation.
6926 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6928 * class.c: ensure value type methods don't have the synchronized
6931 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6933 * string-icalls.c, string-icalls.h: reverted unapproved patch that
6936 2007-10-11 Joel Reed <joelwreed@comcast.com>
6938 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
6939 to take an options parameter so that empty entries can be removed during
6940 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
6942 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6944 * marshal.c: make sure we don't store the signature from a dynamic
6945 method into the runtime invoke cache (bug #327189).
6947 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
6949 * marshal.c: make sure the wrapper methods are properly initialized.
6951 2007-10-11 Mark Probst <mark.probst@gmail.com>
6953 * metadata.c, metadata-internals.h: Generalized
6954 mono_type_stack_size() to mono_type_stack_size_internal() which
6955 takes an additional argument specifying whether it allows open
6958 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6960 * verify.c (do_invoke_method): handle typedbyref params
6961 correctly and check for unverifiable return values.
6963 * verify.c (do_newobj): fix a warning.
6965 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6967 * verify.c: don't tread typedbyref as allways unverifable,
6968 so uses, like (ld/st)loc.0 are valid. verify for the cases
6969 that it matters, like boxing related operations.
6971 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6973 * verify.c: add verification of the newobj opcode. verification
6974 of delegate instantation still missing due ldftn and virldftn not
6975 pushing the function type on stack
6977 2007-10-08 Mark Probst <mark.probst@gmail.com>
6979 * class-internals.h: Runtime generic context data structure
6982 * object.c: Initialization of runtime generic context at runtime
6983 vtable creation time.
6985 2007-10-08 Massimiliano Mantione <massi@ximian.com>
6986 * class.c (mono_class_create_from_typedef,
6987 mono_class_from_generic_parameter, mono_ptr_class_get,
6988 mono_fnptr_class_get, mono_bounded_array_class_get)
6989 * domain.c (mono_domain_create, mono_domain_free)
6990 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
6991 * image.c (do_mono_image_load, mono_image_close):
6992 Hooked up load-unload profiler events.
6994 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6996 * domain.c: track statistics about the actual amount of native code
6999 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7001 * class.c: the valuetype enumerators don't have the additional
7002 supertypes interfaces.
7004 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7006 * class.c: need more interfaces setup for the IEnumerator<T>
7007 object created for arrays (tests/ienumerator-interfaces.2.cs).
7009 2007-10-05 Zoltan Varga <vargaz@gmail.com>
7011 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
7013 2007-10-05 Alp Toker <alp@atoker.com>
7015 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
7016 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
7019 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
7021 * verify.c (verify_type_compatibility_full): verification of
7022 compatibility improved, validates correctly non-strict checks between
7023 native int and I4 types different than (unsigned)int32.
7025 * verify.c (do_store_indirect): added, do all verification of
7028 * verify.c (get_load_indirect_mono_type): renamed to
7029 get_indirect_op_mono_type, as it now returns the MonoType for
7030 ldind.X and stind.X opcodes.
7032 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
7034 * reflection.c: Fix the encoding of generic type definition for
7037 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
7038 mono_image_typedef_or_ref but allows to specify if typespec lookups should
7039 be made. Typespec check is done prior to typeref cache lookup.
7041 * reflection.c (mono_image_typedef_or_ref): now just delegate to
7042 mono_image_typedef_or_ref_full.
7044 * reflection.c (encode_generic_class): encode the generic class
7045 directly instead of calling encode_type.
7047 * reflection.c (encode_type): encode the generic type definition
7048 MonoClass as a generic instantiation.
7050 * reflection.c (create_typespec): cache typespec tokens in
7051 the assembly->typespec cache. Don't create typespec for a generic
7052 instance MonoClass. Create typespec for the generic type defintion.
7054 * reflection.c (create_generic_typespec): encode the generic
7055 class directly instead of calling encode_type.
7057 * reflection.c (mono_image_create_token): encode the generic
7058 type definition not using a typespec for MonoType instances.
7061 2007-10-04 Raja R Harinath <rharinath@novell.com>
7064 * class.c (mono_image_init_name_cache): Don't return nested
7065 'protected internal' classes.
7066 (mono_class_from_name_case): Likewise.
7068 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
7070 * icall-def.h, icall.c : get_bundled_machine_config() is now the
7071 common function used by both DefaultConfig in System.dll and
7072 InternalConfigurationHost in System.Configuration.dll.
7074 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7076 * class.c: automatically add to vectors only a few essential explicit
7077 generic interfaces. The rest of the interfaces that arrays should
7078 provide are currently implicitly added (but still not lazily, see the
7079 design in the discussion of bug#325495 for the details of what is
7080 needed for that). Additionally, implicit interfaces are assigned the
7081 same vtable slot as the explicit interfaces (as they are compatible):
7082 this enables huge memory savings since we don't need to instantiate
7083 as many memthods and as large vtables anymore. Also, Since
7084 GetEnumerator<T> returns an instance of a type that is required to
7085 support a similarly large set of interfaces as arrays, we add
7086 implicit interfaces and interface offset sharing support to those
7087 types, too. This change adds all the required interfaces so that
7088 the anonarray.cs test case in the bug report works (we don't add
7089 all the interfaces to arrays of arrays 3-level deep and more because
7090 of the memory requirements explained in the bug and since they are much
7091 less common: the lazy-loading support will enabled them to work, too).
7093 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
7095 * verify.c (merge_stacks): major clean up, all type compatibility
7096 checks are done by verify_type_compatibility. This fix my earlier lack
7097 of understanding of the CLR type system and merge_stacks no longer looks
7100 * verify.c: fixed some bad spelling.
7102 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
7104 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
7105 a given stack slock.
7107 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
7108 verify_type_compatibility_full. This removed a near indentical function and fixed
7109 handling of Int32 and IntPtr across all opcodes.
7111 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7113 * class.c: only vectors have the additional generic interfaces.
7115 2007-10-01 Jonathan Chambers <joncham@gmail.com>
7117 * mono-config.c: Use g_strcasecmp instead of
7118 strcasecmp like everywhere else to fix
7119 compilation with MSVC.
7121 Code is contributed under MIT/X11 license.
7123 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7125 * object.c, object-internals.h: refactored the IMT code to enable
7126 building a single slot at a time and lazily creating the IMT trampolines
7129 2007-09-29 Zoltan Varga <vargaz@gmail.com>
7131 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
7133 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
7136 2007-09-29 Raja R Harinath <harinath@gmail.com>
7138 * loader.c (method_from_methodspec): Rearrange to avoid
7139 un-necessary exposition. Don't assert out if the method's
7140 declaring type is a generic type definition.
7142 2007-09-28 Martin Baulig <martin@ximian.com>
7144 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
7146 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
7148 * class-internals.h: optimize field layout of MonoClass to
7149 requires less cachelines at runtime and save a few bytes on 64 bit
7152 2007-09-28 Jb Evain <jbevain@novell.com>
7154 * reflection.c: when encoding type names in custom attributes,
7155 if the type is a closed generic type, its generic arguments
7156 have to be serialized as AssemblyQualifiedName, so that when
7157 they are deserialized, it's possible to re-create them properly.
7161 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7163 * object.c, class-internals.h: added delegate-creation counter.
7165 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7167 * class.c: cleanup of the code that synthetizes interfaces for
7168 arrays in 2.0: saves quit a bit of corlib mempool memory.
7169 Code to fix bug #325495 ifdeffed out for now until the issues
7170 with memory usage and O(n^2) behaviour are fixed.
7172 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7174 * marshal.c: when possible, do not duplicate the name of the methods
7175 in the method builder and in the generated MonoMethod.
7177 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
7178 * verify.c: added support for type checking ldind_* opcodes.
7180 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
7182 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
7183 which is used to distinguish the fully open instantiation of a TypeBuilder
7184 with the rest. This temporary hack is required to restore the property that
7185 the fully open instantiation is the same type of the generic type definition.
7187 * class-internals.h (mono_generic_class_is_generic_type_definition):
7188 new function as part of the internal API.
7190 * class.c (inflate_generic_type): return NULL when the generic inst is
7191 fully open. The fully open generic type is now the same as the generic type
7192 definition for non TypeBuilder types.
7194 * class.c (mono_generic_class_get_class): removed assert since it is
7195 no longer valid, gklass->cached_class can point to the generic type definition.
7197 * class.c (mono_generic_class_is_generic_type_definition): new.
7199 * metadata.c (mono_generic_class_hash): added is_tb_open field
7200 to the hash calculation.
7202 * metadata.c (free_generic_class): if the generic class is associated
7203 with the generic type definition, its field will come from the mempool and
7206 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
7207 new, this function identifies the corner case of a TypeBuilder fully open
7210 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
7211 for lookup. Set gclass->cached_class to be the container class in case of
7212 the fully open instantiation of non TypeBuilder types.
7214 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
7215 to compare generic classes.
7217 * reflection.c (method_encode_methodspec): remove assert that
7220 * reflection.c (mono_reflection_generic_class_initialize): add
7221 an aditional assert to ensure the proper type is used.
7223 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
7225 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
7228 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
7230 * verify.c (push_arg): Fixed support for ldarga
7231 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
7232 MonoType used as first arg in case of instance calls.
7234 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
7236 * verify.c: Support for verifying VAR and MVAR types,
7238 2007-09-25 Zoltan Varga <vargaz@gmail.com>
7240 * icall.c (ves_icall_get_property_info): Set the reflected type of the
7241 accessors correctly.
7243 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7245 * threads.c: support OSX and other systems in
7246 mono_thread_get_stack_bounds (bug #328026).
7248 2007-09-25 Martin Baulig <martin@ximian.com>
7251 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
7253 2007-09-24 Martin Baulig <martin@ximian.com>
7256 (MonoDebugClassEntry): Moved the definition of this struct into
7257 mono-debug.c to make it private.
7260 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
7261 type table per symbol file, we don't need to store the symfile id
7264 2007-09-24 Martin Baulig <martin@ximian.com>
7266 Create one type table per symbol file, since a `MonoClass *' gets
7267 invalid when its image is unloaded.
7269 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
7270 (MonoDebugHandle): Added `type_table'.
7272 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
7274 * mempool.c, mempool.h: added mono_mempool_new_size () API
7275 to be able to specify a smaller initial size for the pool.
7276 Adjusted the code to slowly increase pool size before using
7277 the previous default size.
7278 * image.c: use a small initial size for image mempools.
7280 2007-09-23 Zoltan Varga <vargaz@gmail.com>
7282 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
7285 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
7286 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
7288 2007-09-22 Zoltan Varga <vargaz@gmail.com>
7290 * metadata.c (mono_type_create_from_typespec): Remove an invalid
7291 free. Fixes #327438.
7293 2007-09-21 Raja R Harinath <harinath@gmail.com>
7295 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
7296 generic instantiations, etc.
7297 <MONO_TYPE_ARRAY>: Likewise.
7299 2007-09-21 Martin Baulig <martin@ximian.com>
7301 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
7302 these structs were never defined.
7303 (MonoDebugHandle): Removed the `_priv' field, it was never used.
7305 2007-09-21 Martin Baulig <martin@ximian.com>
7307 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
7309 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
7311 * image.c: removed the guid hash tables: we can get the same info
7312 without the additional memory usage hit (partially fixes also bug #327052).
7314 2007-09-10 Massimiliano Mantione <massi@ximian.com>
7316 * profiler.h, profiler-private.h, profiler.c: add a new profiler
7317 event to handle unloading methods. After the event is called, the
7318 corresponding MonoMethod* must be considered invalid.
7319 * loader.c (mono_free_method): call the new mono_profiler_method_free
7322 2007-09-20 Mark Probst <mark.probst@gmail.com>
7324 * domain-internals.h: New flag in MonoJitInfo which marks shared
7325 generic methods. New hash table (shared_generics_hash) in
7326 MonoDomain to keep track of shared generic methods. Prototypes
7327 for functions to register and lookup shared generic methods.
7329 * domain.c: Support for registering and looking up shared generic
7330 methods via a hash table (shared_generics_hash) in MonoDomain.
7332 * class-internals.h: New exception to signal failure of shared
7333 compilation of a generic method. New counters for generics
7334 sharing in MonoStats.
7336 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
7338 * image.c, metadata-internals.h: don't keep a file descriptor open
7339 for loaded assemblies (bug#325988).
7341 2007-09-19 Raja R Harinath <rharinath@novell.com>
7343 * metadata.c (signature_in_image): New. Carve out of type_in_image.
7344 (ginst_in_image, gclass_in_image): Simplify. Change signature to
7345 use the corresponding datatypes.
7346 (type_in_image): Update to changes.
7347 (CleanForImageUserData): Simplify.
7348 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
7349 Avoid quadratic behaviour in handling the "stolen" list by
7350 separating the filter predicate out, and by prepending the stolen
7351 items rather than appending them.
7352 (steal_ginst_in_image): Likewise.
7353 (mono_metadata_clean_for_image): Update to changes.
7355 2007-09-19 Martin Baulig <martin@ximian.com>
7357 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
7359 2007-09-19 Martin Baulig <martin@ximian.com>
7361 * mono-debug.c (mono_debug_cleanup): Don't call
7362 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
7364 2007-09-19 Raja R Harinath <harinath@gmail.com>
7366 Fix crash on 'make run-test' in mcs/errors
7367 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
7368 Avoid more potential allocations in mono_class_from_mono_type.
7369 (ginst_in_image): Update to changes.
7370 (gclass_in_image): Rearrange slightly.
7372 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7374 * class.c (mono_class_init): Move the code that sets up class->methods to
7375 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
7377 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
7378 canonical instance of an inflated generic signature.
7379 (mono_type_create_from_typespec): Remove an invalid free.
7381 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
7383 2007-09-18 Marek Habersack <mhabersack@novell.com>
7385 * domain-internals.h: added a declaration of the
7386 mono_assembly_load_full_nosearch internal function.
7388 * assembly.c (mono_assembly_load_with_partial_name): use
7389 mono_try_assembly_resolve return value properly.
7390 (mono_assembly_load_full_nosearch): copied the function body from
7391 mono_assembly_load_full, without the code to invoke assembly
7393 (mono_assembly_load_full): calls the above new function and if the
7394 assembly is not resolved, invokes the search hooks.
7396 * appdomain.c (mono_runtime_init): restore the global postload
7397 assembly search handlers.
7399 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7401 * class.c (mono_class_init): Make sure class->methods and class->properties
7402 are never NULL in the generics case.
7404 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
7406 2007-09-17 Zoltan Varga <vargaz@gmail.com>
7408 * metadata.c (free_generic_class): Disable some code to fix the build.
7410 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
7412 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
7413 from the image mempool.
7415 * metadata.c (free_generic_class): Free more data from the inflated class.
7417 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
7419 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
7421 (mono_type_create_from_typespec): Ditto.
7423 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
7424 MonoImage to the caller.
7425 (mono_init_internal): Save the opened image in a global variable.
7426 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
7428 * reflection.c (resolve_object): Fix a leak.
7430 * metadata.c: Fix the freeing of data in the generics caches.
7432 * metadata.c (free_generic_inst): Comment this out to fix the build.
7433 (free_generic_class): Ditto.
7435 * metadata.c: Free cached generic methods, instantinations and classes when
7436 they are removed from the caches.
7437 (mono_metadata_free_type): Free the type itself.
7439 * class.c: Free the result of mono_class_inflate_generic_type () in a few
7442 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
7444 * boehm-gc.c: restrict managed allocs to __thread supporting
7447 2007-09-16 Zoltan Varga <vargaz@gmail.com>
7449 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
7450 (mono_generic_class_get_class): Fix a leak.
7452 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
7453 mono_metadata_free_type ().
7454 (mono_metadata_inflate_generic_inst): Fix a leak.
7456 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7458 * mono-debug.c (free_header_data): Fix a leak missed earlier.
7460 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
7463 * mono-debug.c (mono_debug_close_image): Fix call to
7464 g_hash_table_remove ().
7466 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
7468 * icall-def.h: redirect all the string ctor to the managed
7469 CreateString () methods.
7470 * string-icalls.c, string-icalls.h: removed dead code for string
7473 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7475 * mono-debug.c: Fix memory leaks.
7477 2007-09-14 Jonathan Chambers <joncham@gmail.com>
7479 * threads-types.h: Implement mono_hazard_pointer_set and
7480 mono_hazard_pointer_clear macros using do/while(0) to fix
7481 compilation with MSVC.
7483 Code is contributed under MIT/X11 license.
7485 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7487 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
7488 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
7490 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7492 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
7495 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7497 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
7498 managed-code allocated as well.
7500 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7502 * class.c (mono_class_is_assignable_from): Add support for generic variance.
7504 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
7506 * boehm-gc.c: fixed the build after the AOT changes.
7508 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7510 * wrapper-types.h: Add an ALLOC wrapper type.
7512 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
7513 reference managed allocator methods.
7515 2007-09-12 Marek Safar <marek.safar@gmail.com>
7517 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
7518 of Type array and not MonoType, a fix suggested by Hari.
7520 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7522 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
7523 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
7525 Code is contributed under MIT/X11 license.
7527 2007-09-10 Massimiliano Mantione <massi@ximian.com>
7529 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
7531 2007-09-12 Marek Habersack <mhabersack@novell.com>
7533 * image.c (do_mono_image_open): if assembly file fails to open and
7534 MONO_IOMAP is in effect, try to find the path in a
7535 case-insensitive way.
7537 * appdomain.c (mono_runtime_init): do not install postload hooks -
7538 tests show that MS.NET doesn't use anything of that sort to
7539 trigger the AppDomain.AssemblyResolve event.
7540 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
7542 (mono_runtime_init): init portability helpers here.
7544 * assembly.c (mono_assembly_load_with_partial_name): if other
7545 attempts fail, trigger the AppDomain.AssemblyResolve event handler
7546 to resolve the assembly.
7548 * domain-internals.h: added mono_try_assembly_resolve and marked
7551 2007-09-11 Jb Evain <jbevain@novell.com>
7553 * object-internals.h (MonoReflectionDynamicMethod): add
7554 a `MonoReflectionType *owner` field. The owner is used
7556 (mono_reflection_create_dynamic_method): use the owner of the dynamic
7557 method as the class declaring the dynamic method.
7558 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
7559 dynamic method to the declaring type of the methodbuilder.
7561 2007-09-11 Mark Probst <mark.probst@gmail.com>
7563 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
7564 rules for calling methods via reflection.
7566 2007-09-11 Zoltan Varga <vargaz@gmail.com>
7568 * reflection.c (resolve_object): Add support for MonoGenericClass.
7571 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
7573 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
7574 provide a managed method that does fast allocations without needing
7575 a managed->unmanaged transition. Boehm GC implementation currently
7576 enabled for ptrfree objects on sane architectures.
7578 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
7580 * marshal.c, marshal.h: exported a couple of useful functions and
7581 added mono_mb_get_label () to easily handle backward branches.
7583 2007-09-10 Zoltan Varga <vargaz@gmail.com>
7585 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
7587 2007-09-10 Massimiliano Mantione <massi@ximian.com>
7589 * loader.c (find_method): Fixed the regression introduced while
7592 2007-09-09 Zoltan Varga <vargaz@gmail.com>
7594 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
7597 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
7598 icall.c reflection.c: Pass a MonoGenericContext argument to
7599 mono_lookup_dynamic_token ().
7601 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
7604 2007-09-09 Robert Jordan <robertj@gmx.net>
7606 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
7607 for generic methods.
7609 * object.c (mono_object_get_virtual_method): Handle generic methods.
7612 Code is contributed under MIT/X11 license.
7614 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
7616 * image.c: fix locking in mono_image_load_file_for_image ().
7618 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
7620 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
7621 used only as a cache: added an icall to fill it.
7623 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
7625 * reflection.h: exposed mono_reflection_free_type_info
7626 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
7627 since mono_reflection_bind_generic_parameters makes a copy of it.
7628 * reflection.c (free_type_info): subinfos should be freed.
7629 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
7631 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
7632 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
7633 this fixes #82695 and #81726.
7636 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
7638 * process.h, process.c: added support for user profile/info in
7639 ProcessStartInfo. For now only Windows works.
7641 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7643 * metadata.c: consider the generic arguments when comparing
7644 signatures (bug #82614).
7646 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7648 * cil-coff.h, image.c: updated assembly loader to cope with the
7649 PE32+ 64 bit file format.
7651 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7653 * assembly.c, class.c, domain.c, loader.c: remove useless
7654 inclusion of cil-coff.h.
7656 2007-08-29 Jonathan Chambers <joncham@gmail.com>
7658 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
7659 if interface is marked with CoClassAttribute.
7661 Code is contributed under MIT/X11 license.
7663 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
7665 * sgen-gc.c: ensure no object from the to space is copied again or finalized
7666 if it's seen twice in major collections.
7668 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7670 * sgen-gc.c: big objects are not copied to the gray area, but they
7671 need to be considered for scanning, too, if they are brought alive
7672 by an object ready for finalizations or a survived one.
7674 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7676 * sgen-gc.c: properly account the number of disappearing links when
7679 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
7681 * sgen-gc.c: share the code to scan the registered roots between the
7682 different types of collections.
7684 2007-08-28 Zoltan Varga <vargaz@gmail.com>
7686 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
7688 2007-08-28 Zoltan Varga <vargaz@gmail.com>
7690 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
7691 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
7693 2007-08-28 Mark Probst <mark.probst@gmail.com>
7695 * security-manager.c (mono_security_manager_get_methods):
7696 LinkDemandSecurityException now has 2 arguments instead of 3.
7698 2007-08-27 Zoltan Varga <vargaz@gmail.com>
7700 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
7701 platforms which need it.
7703 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7705 * sgen-gc.c: unregister thread data structures with a pthread_key_t
7708 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
7710 * threads.c: free the thread static data on thread exit.
7712 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
7714 * class.c: walk the hierarchy to find the generic definition for
7715 a class (fixes runtime part of bug #82498).
7717 2007-08-24 Zoltan Varga <vargaz@gmail.com>
7719 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
7722 * image.c (mono_image_close): Here. Hopefully fixes #82510.
7724 2007-08-24 Mark Probst <mark.probst@gmail.com>
7726 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
7728 2007-08-24 Robert Jordan <robertj@gmx.net>
7730 * appdomain.c: don't perform the ':'->';' substitution on Win32.
7732 2007-08-24 Jb Evain <jbevain@novell.com>
7734 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
7737 2007-08-24 Mark Probst <mark.probst@gmail.com>
7739 * threads.c: Make sure a thread gets cleaned up only once. Fixes
7742 2007-08-24 Zoltan Varga <vargaz@gmail.com>
7744 * assembly.c: Fix a warning.
7746 2007-08-23 Marek Habersack <mhabersack@novell.com>
7748 * appdomain.c: parse the <runtime> section looking for the probing
7749 element with the 'privatePath' attribute, which sets additional
7750 directories in which the runtime should look for assemblies.
7752 2007-08-23 Robert Jordan <robertj@gmx.net>
7754 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
7757 2007-08-23 Martin Baulig <martin@ximian.com>
7759 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
7760 _mono_debug_init_corlib() and remove it from the header file.
7762 2007-08-23 Martin Baulig <martin@ximian.com>
7764 * mono-debug-debugger.c
7765 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
7766 don't notify the debugger about it.
7768 * mono-debug-debugger.h
7769 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
7771 2007-08-23 Robert Jordan <robertj@gmx.net>
7773 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
7774 Code is contributed under MIT/X11 license.
7776 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7778 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
7780 2007-08-22 Martin Baulig <martin@ximian.com>
7782 * mono-debug.c: Store debugging info on a per-domain basis and
7783 free it on domain unload. Add support for unloading symbol files.
7786 (MonoDebugList): New typedef.
7788 - add `data_tables and `type_table'.
7789 - replace 'symbol_files' and `num_symbol_files' with a
7791 (mono_debug_data_table): Removed.
7792 (mono_debug_list_add): New public function.
7793 (mono_debug_list_remove): New public function.
7794 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
7795 (mono_debug_init_2_memory): Renamed into
7796 mono_debug_open_image_from_memory().
7797 (mono_debug_close_image): New public function.
7798 (mono_debug_domain_create): Likewise.
7799 (mono_debug_domain_unload): Likewise.
7800 (MONO_DEBUGGER_VERSION): Bump to 60.
7802 * mono-debug-debugger.h
7803 (MonoDebuggerEvent):
7804 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
7805 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
7806 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
7807 - rename `THREAD_CREATED' and `THREAD_EXITED' into
7808 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
7809 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
7811 (mono_debugger_add_symbol_file): Removed.
7812 (mono_debugger_add_type): Removed.
7813 (mono_debugger_lookup_type): Removed.
7814 (mono_debugger_lookup_assembly): Removed.
7817 (mono_domain_create): Call mono_debug_domain_create().
7818 (mono_init_internal): Call mono_debug_init_corlib().
7821 (mono_assembly_close): Call mono_debug_close_image().
7823 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
7825 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
7828 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
7830 * sgen-gc.c: ensure section->pin_queue_end is initialized
7831 correctly when non pinning objects in the section have been found.
7833 2007-08-22 Marek Habersack <mhabersack@novell.com>
7835 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
7836 containing a list of directories separated by ':'. MSDN docs say
7837 the directories should be separated with ';'. Part of a bugfix for
7840 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
7842 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
7843 it should MonoType and not MonoClass.
7845 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
7847 * culture-info-table.h : regenerated.
7849 2007-08-20 William Holmes <billholmes54@gmail.com>
7851 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
7852 to call ReplaceFile Kernel32 on windows or in io-layer.
7853 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
7854 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
7855 as an internal call.
7857 Code is contributed under MIT/X11 license.
7859 2007-08-20 Jb Evain <jbevain@novell.com>
7861 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
7862 and MONO_EXCEPTION_FIELD_ACCESS.
7864 * debug-helpers.[c|h]: new mono_field_full_name function.
7866 2007-08-20 Mark Probst <mark.probst@gmail.com>
7868 * class.c: Removed class_security_level() and moved it to
7869 security-core-clr.c.
7871 * security-core-clr.c, security-core-clr.h: class_security_level()
7872 is now public and renamed to mono_security_core_clr_class_level().
7873 It also looks for security attributes in the classes a class is
7876 2007-08-20 Mark Probst <mark.probst@gmail.com>
7878 * security-core-clr.c, security-core-clr.h: CoreCLR security
7881 * Makefile.am: Added security-core-clr.[ch].
7883 * security-manager.c, security-manager.h: Functions and enum for
7884 setting and getting the security mode.
7886 * class.c: CoreCLR security checks.
7888 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7890 * icall-def.h, process.c, process.h: implemented icall to get
7891 user/system processor times.
7893 2007-08-17 Mark Probst <mark.probst@gmail.com>
7895 * domain.c, threads.c, class-internals.h, domain-internals.h: New
7896 reader-lock-free jit_info_table.
7898 2007-08-17 Zoltan Varga <vargaz@gmail.com>
7900 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
7902 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
7904 * object-internals.h (MonoException): Add missing _data member.
7906 2007-08-08 Massimiliano Mantione <massi@ximian.com>
7908 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
7909 checking that only methods with matching qname or fqname are picked
7910 from implemented interfaces.
7912 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
7914 * verify.c (do_newarr):added, do type verification of
7915 newarr ops, push the right value on the eval stack.
7916 * verify.c (mono_method_verify): use do_newarr
7919 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
7921 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
7922 factored the common code into get_boxable_mono_type, which
7923 is now using mono_type_get_full, this fixed byref related tests.
7925 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
7927 * class.c: added mono_type_get_full, this function has the same
7928 behavior of mono_class_get_full but the returned MonoType has
7929 all metadata of the associated token in case of a typespec token.
7930 * class.c: added mono_type_retrieve_from_typespec, used by
7931 mono_type_get_full to retrieve the token type.
7932 * class.c (mono_class_create_from_typespec): changed to use
7933 mono_type_retrieve_from_typespec.
7934 * class.c (mono_ldtoken): changed to use mono_type_get_full
7935 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
7936 * class-internals.h: exported mono_type_get_full for internal use.
7938 2007-08-16 Jb Evain <jbevain@novell.com>
7940 * domain.c (supported_runtimes): add entry for
7941 the 'moonlight' runtime version.
7943 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
7945 * verify.c (mono_method_verify): small typo sliped in.
7947 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
7949 * verify.c (do_unbox_value): added, do type verification of
7951 * verify.c (mono_method_verify): use do_unbox_value
7954 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
7956 * verify.c (dump_stack_value): fixed typo, was printing string
7957 instead of object on stack.
7958 * verify.c (do_box_value): moved the byref check up as it leads
7959 to invalid code and should be done earlier.
7960 * verify.c: improved error messages for and ldobj
7962 2007-08-15 William Holmes <billholmes54@gmail.com>
7964 * marshal.c (emit_marshal_custom): Omit the call to
7965 marshal_native_to_managed when calling native to managed
7966 and the argument is specified as an out argument.
7968 Code is contributed under MIT/X11 license.
7970 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
7972 * verify.c: fixed the type checks for generics, function pointers and vectors.
7973 Added type verification for ldobj and ldtoken. The verifier
7974 would segfault if header or signature of a method contained references
7975 to non-existant types.
7977 2007-08-15 Jonathan Chambers <joncham@gmail.com>
7979 * marshal.c (cominterop_get_ccw): Patch from
7980 Bill Holmes to no walk up interface hierarchy.
7981 All parent methods should be present in the interface for COM.
7983 Code is contributed under MIT/X11 license.
7985 2007-08-15 Jonathan Chambers <joncham@gmail.com>
7987 * marshal.c (emit_marshal_com_interface): Patch from
7988 Bill Holmes to handle COM Interfaces as return values
7989 for native->managed calls.
7991 Code is contributed under MIT/X11 license.
7993 2007-08-14 Jonathan Chambers <joncham@gmail.com>
7995 * marshal.c (cominterop_get_idispatch_for_object): Implement
7996 for runtime callable wrappers.
7998 Code is contributed under MIT/X11 license.
8000 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
8002 * pedump.c (main): changed from mono_init to mono_init_from_assembly
8003 so 2.0 types are accessible
8006 2007-08-13 Miguel de Icaza <miguel@novell.com>
8008 * domain.c (mono_init_internal): Call mono_assembly_load_friends
8009 once we load mscorlib. Due to the order in which we initialize,
8010 the mono_assembly_load_full routine that loads mscorlib did not
8011 load friends. We now load it once we load the
8012 mono_defaults.internals_visible_class class.
8014 * assembly.c: Expose the mono_load_friend_assemblies method.
8016 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
8018 * verify.c: improved the handling of boxing, better
8019 type checking for unary ops and conversion. Fix bug
8020 regarding managed pointer compatibility checking
8022 2007-08-11 Zoltan Varga <vargaz@gmail.com>
8024 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
8026 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
8028 2007-08-09 Raja R Harinath <rharinath@novell.com>
8030 * reflection.c (dup_type): Remove.
8031 * class.c (dup_type): Remove.
8032 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
8033 instead of the dodgy 'dup_type'.
8034 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
8035 handle the case where 'dup_type' needed the second argument.
8037 2007-08-08 Zoltan Varga <vargaz@gmail.com>
8039 * domain.c: Fix a warning.
8041 2007-08-08 Massimiliano Mantione <massi@ximian.com>
8043 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
8044 checking that methods with the same fqname are not overridden
8045 with a method from an ancestor.
8047 2007-08-07 Zoltan Varga <vargaz@gmail.com>
8049 * threads.c (free_thread_static_data_helper): Avoid a crash if
8050 thread->static_data is not yet set.
8052 2007-08-07 Jonathan Chambers <joncham@gmail.com>
8054 * marshal.c: Use correct image when emitting
8055 native wrapper for COM calls.
8057 Code is contributed under MIT/X11 license.
8059 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
8061 * icall-def.h, security.c, security.h :
8062 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
8064 2007-08-07 Martin Baulig <martin@ximian.com>
8066 * mono-debug-debugger.h
8067 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
8069 * domain.c (mono_domain_free): Call
8070 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
8072 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
8074 * verify.c (check_underflow, check_overflow): error message now returns IL offset
8075 * verify.c (in_same_block): code should test if either offset is inside the clauses
8076 * verify.c (mono_method_verify): push the exception into the eval stack of exception
8079 2007-08-03 Zoltan Varga <vargaz@gmail.com>
8081 * image.c (mono_image_close): Fix a leak.
8083 * object.c (mono_runtime_invoke_array): Avoid using alloca.
8085 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
8087 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8089 * domain.c, threads.c, threads-types.h: fix memory retention issue
8090 with thread static variables not being cleared on domain unload.
8091 Reuse thread static slots after domain unload.
8093 2007-08-03 Zoltan Varga <vargaz@gmail.com>
8095 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
8098 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
8099 now done in mono_runtime_invoke_array.
8101 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
8102 receiver is a nullable type.
8104 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
8107 2007-08-03 Jonathan Chambers <joncham@gmail.com>
8109 * marshal.c: Implement COM Objects as return type for
8110 managed->unmanaged calls. Added Release calls for COM Object
8111 out/return values in managed->unmanaged calls.
8113 Code is contributed under MIT/X11 license.
8115 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
8117 * threads.h, threads-type.h: move the hazard pointer declarations
8118 to the private header.
8120 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8122 * file-io.c, appdomain.c: memory leak fixes.
8124 2007-08-02 Dick Porter <dick@ximian.com>
8127 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
8128 SO_REUSEADDR setting into io-layer/sockets.c.
8130 2007-08-01 Zoltan Varga <vargaz@gmail.com>
8132 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
8133 from Object when called on a generic parameter. Fixes #82211.
8135 2007-08-01 Dick Porter <dick@ximian.com>
8137 * file-io.c (convert_share): Test FileShare values bit-by-bit.
8138 Fixes bug 79250 yet again.
8140 2007-07-30 Martin Baulig <martin@ximian.com>
8142 Merged the `debugger-dublin' branch.
8145 (MonoDebugDataTable): New typedef.
8146 (MonoDebugMethodAddressList): New typedef.
8147 (MonoDebugWrapperData): Removed.
8148 (MonoDebugSymbolTable): Removed `current_data_table',
8149 `current_data_table_size', `current_data_table_offset'.
8150 (MonoDebugDataItemType): Moved into mono-debug.c.
8151 (MonoDebugMethodJitInfo): Remove `address'.
8152 (mono_debug_data_table): New global variable.
8153 (mono_debug_lookup_method_addresses): New public function.
8154 (mono_debug_find_method): Take a `MonoMethod *', not a
8155 `MonoDebugMethodInfo *'.
8157 * mono-debug.c: Drop support for the old symbol tables.
8159 2007-06-28 Martin Baulig <martin@ximian.com>
8161 * mono-debug.c (mono_debug_debugger_version): New public variable.
8163 2007-07-31 William Holmes <billholmes54@gmail.com>
8165 * metadata.c Changed mono_type_create_from_typespec to not insert
8166 the type into the hash map until after
8167 do_mono_metadata_parse_type has completed.
8169 Code is contributed under MIT/X11 license.
8171 2007-07-31 Zoltan Varga <vargaz@gmail.com>
8173 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
8174 generic parameter. Fixes #82211.
8176 2007-07-27 Jb Evain <jbevain@novell.com>
8178 * pedump.c (dump_metadata, dump_metadata_header): dump
8179 versions contained in the metadata header.
8181 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
8183 * threads.c: register small_id_table with the GC.
8185 2007-07-27 Mark Probst <mark.probst@gmail.com>
8187 * threads.c, threads.h, class-internals.h, object-internals.h:
8188 Hazard pointers, to be used by lock-free parallel algorithms.
8190 2007-07-26 Dick Porter <dick@ximian.com>
8192 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
8193 routine on non-windows platforms, as I've not managed to think of
8194 a non-kludgy way of doing this. Finishes off bug 78739.
8196 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
8198 * object.c: properly setup interface_bitmap in proxy vtables.
8200 2007-07-25 Marek Habersack <mhabersack@novell.com>
8202 * appdomain.c (get_shadow_assembly_location): do not use TickCount
8203 to create unique shadow copy target directories, use the domain's
8204 serial number instead. Each domain gets a unique target directory
8207 * domain.c (mono_domain_create): added code to increment domain
8208 shadow copy serial number and cache the value in the current
8211 * domain-internals.h (struct _MonoDomain): added a new field -
8212 shadow_serial to hold the serial number used in generation of
8213 shadow-copy directories. This is to make sure that the directory
8214 name is unique for each and every domain created. We avoid a race
8215 condition with overriding assemblies already in use by other app
8218 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
8220 * class.c (mono_bounded_array_class_get): fixed memory leak when
8221 binding generic parameters.
8223 2007-07-24 Raja R Harinath <rharinath@novell.com>
8225 * metadata.c (do_mono_metadata_parse_generic_class): Use
8226 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
8229 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8231 * loader.c, class-internals.h, reflection.c: removed the per-method
8232 generics hashtable: we use the global one through the call of
8233 mono_class_inflate_generic_method ().
8235 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8237 * class.c, metadata.c, class-internals.h: introduce yet another
8238 generics global cache for inflated methods (fixes 98% of the perf
8239 issue in bug #81806).
8241 2007-07-23 Raja R Harinath <rharinath@novell.com>
8243 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
8244 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
8245 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
8246 return a MonoGenericInst containing (a copy) of those types.
8247 (mono_metadata_inflate_generic_inst): Update to changes.
8248 (mono_metadata_parse_generic_inst): Likewise.
8249 (mono_get_shared_generic_inst): Likewise.
8250 * reflection.c (mono_class_bind_generic_parameters): Likewise.
8251 (mono_reflection_bind_generic_method_parameters): Likewise.
8252 * metadata-internals.h: Likewise.
8253 * icall.c (free_generic_context): Kill.
8254 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
8256 * reflection.c (reflection_methodbuilder_to_mono_method): Use
8257 mono_metadata_type_dup.
8258 * marshal.c (mono_mb_create_method): Likewise.
8260 * metadata.c (mono_metadata_type_dup): Rename from
8261 mono_metadata_type_dup_mp. Take an optional mempool instead of a
8262 MonoImage. Handle a few more cases, esp. when no mempool is given.
8263 * marshal.c, metadata-internals.h: Update to changes.
8265 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
8267 * class.c: fixed a small leak for array classes and removed warning.
8269 2007-07-22 Zoltan Varga <vargaz@gmail.com>
8271 * loader.c (mono_method_get_param_token): Make this work on generic methods.
8272 Return 0x8000000 for return parameters. Fixes #82161.
8274 2007-07-21 Marek Habersack <grendello@gmail.com>
8276 * appdomain.c (get_shadow_assembly_location): append the current
8277 ticks value to the path. Avoids overwriting the same assemblies by
8278 several threads at the same time.
8280 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
8281 and Raja R Harinath <rharinath@novell.com>
8283 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
8285 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
8286 property for testing if a method is a generic method definition.
8288 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
8290 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
8292 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8294 * verify.c: used function from private branch, reverted to the one in class.h
8296 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8298 * verify.c: a typo slipped in and the code wont compile
8300 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8302 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
8303 disabled box instruction as it is doing the wrong thing
8304 improved stack dump messages, now it is easier to debug type related issues
8307 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
8309 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
8311 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8313 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
8314 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
8315 grouped with class and valuetype. This change will simply
8316 the code as it should be handled just like unmanaged pointers.
8318 2007-07-19 Mark Probst <mark.probst@gmail.com>
8320 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
8322 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8324 * verify.c: several stack merge issues fixed, reference comparisons now
8325 check the type size. strict type check now works correctly.
8326 added more uses of IS_MANAGED_POINTER macro.
8327 fixed issues pointed by running the test suite against .net.
8330 2007-07-19 Mark Probst <mark.probst@gmail.com>
8332 * class.c, loader.c, class-internals.h: Removed the
8333 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
8336 * icall.c: Better error checking in some internal reflection
8339 2007-07-18 William Holmes <billholmes54@gmail.com>
8341 * filewatcher.c : removed unused variable 'filename' in
8342 ves_icall_System_IO_FSW_SupportsFSW
8344 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8346 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
8349 2007-07-15 Zoltan Varga <vargaz@gmail.com>
8351 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
8353 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
8355 2007-07-14 Zoltan Varga <vargaz@gmail.com>
8357 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
8358 Implement generics support.
8359 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
8361 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
8362 type_args and method_args arguments.
8363 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
8364 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
8365 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
8367 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
8369 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
8370 It adds a rootimage parameter to mono_reflection_get_type_internal,
8371 adds new function mono_reflection_get_type_with_rootimage and use
8372 the rootimage to resolve the types instead of the current image
8374 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
8376 * culture-info-table.h: Forgot to update after r78304.
8378 2007-07-13 Raja R Harinath <rharinath@novell.com>
8380 * class.c (mono_class_is_open_constructed_type)
8381 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
8383 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
8385 * class.c (mono_bounded_array_class_get): method fails if used with
8386 an incomplete TypeBuilder enum (no basetype field), fixed it by
8387 avoiding calculating the size for such array as it cannot be instantiated.
8390 2007-07-12 Raja R Harinath <rharinath@novell.com>
8392 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
8394 * metadata.c, reflection.c: Update to changes.
8396 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
8398 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
8399 mono_class_is_valid_enum, they are used to valide a enum when loading.
8400 * reflection.c: used new functions to throw TypeLoadException when and
8401 invalid enum is build with TypeBuilder. Fixes #82018
8403 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
8405 * object.c: forgot commit of mono_class_setup_methods () to access
8407 * object-internals.h: added a few more handy fields to
8410 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8412 * object.c (build_imt): Call mono_class_setup_methods () before accessing
8415 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
8417 * class-internals.h, object-internals.h, object.c: IMT-based
8418 interface invocation core from Massimiliano Mantione
8419 (massi@ximian.com) with a reworked arch-specific interface,
8420 bsearch implementation and a few bugfixes and memory savings by me.
8422 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
8424 * class.c (mono_class_create_from_typedef): mono would segfault if
8425 an enum did not have a __value field. It now throws a TypeLoadException
8426 for such cases. Fix bug #82022
8428 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8430 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
8432 2007-07-09 Mark Probst <mark.probst@gmail.com>
8434 * class.c (mono_class_init): If a class is already inited but has
8435 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
8437 2007-07-09 Mark Probst <mark.probst@gmail.com>
8439 * class.c: Properly handle the case of an unimplemented interface
8440 method. Fixes: 81673.
8442 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8444 * class-internals.h, object.c: cleanup patch from massi: use
8445 MonoVTable->interface_bitmap since the vtable interfaces offset array
8448 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8450 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
8451 GetMDStreamVersion icall instead.
8453 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8455 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
8456 not use mono_dl_build_path() with a full library name: makes
8457 fallbacks to libgaim and libfam work.
8459 2007-07-06 William Holmes <billholmes54@gmail.com>
8461 * assembly.c: Added a continue statement in probe_for_partial_name when
8462 parse_assembly_directory_name fails. Fixes : 82002
8464 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
8466 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
8467 and added a verification for TYPEDBYREF.
8468 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
8469 make native int interchangeable with int32 and some small cleanup and formating.
8470 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
8471 handle byref of byref.
8472 * verify.c (push_local): handle byref of byref.
8473 * verify.c (do_binop): invalid mix of values is unverifiable
8474 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
8475 added visibility checks
8476 * verify.c (field related method): added visibility checks
8477 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
8479 2007-07-06 Zoltan Varga <vargaz@gmail.com>
8481 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
8484 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8486 * profiler.c (mono_profiler_load): Fix an off-by-one error.
8488 * marshal.c (emit_marshal_string): When returning a string from managed code,
8489 allways make a copy even for unicode strings. Fixes #81990.
8491 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
8493 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
8494 of byref generic inst types (bug #81997).
8496 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
8498 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
8499 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
8501 2007-07-02 Zoltan Varga <vargaz@gmail.com>
8503 * marshal.c (emit_marshal_string): Add support for unicode strings in
8504 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
8506 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
8508 * verify.c: field load/store are now verified, missing only access checks now
8510 2007-06-28 Martin Baulig <martin@ximian.com>
8512 * mono-debug.c (mono_debug_debugger_version): New public variable.
8514 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
8516 * locales.c: When constructing DateTimeFormat or NumberFormat for
8517 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
8518 MonoCultureInfo contructed from the current locale is always
8519 read-only and has UseUserOverride set to true. All MonoCultureInfo
8520 instances returned for GetCultures have both IsReadOnly and
8521 UseUserOverride set to true. Fixes part of bug #81930.
8523 2007-06-22 Jonathan Chambers <joncham@gmail.com>
8525 * icall-def.h: Update System.__ComObject icalls
8526 * marshal.c: Avoid managed transition (and object creation)
8527 when looking up COM interface in RCW.
8530 Code is contributed under MIT/X11 license.
8532 2007-06-22 Zoltan Varga <vargaz@gmail.com>
8534 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
8535 to avoid crashes during assembly unloading.
8537 2007-06-22 Raja R Harinath <rharinath@novell.com>
8539 Fix MethodInfo.IsGenericMethodDefinition
8540 * reflection.c (mono_reflection_bind_generic_method_parameters):
8541 Rearrange code to ensure we always uses a generic method definition.
8542 * class.c (mono_class_inflate_generic_method_full): Set
8543 'generic_container' field only for generic method definitions.
8544 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
8545 Use presense of 'generic_container' field as indication of being a
8546 generic method definition.
8548 2007-06-21 Zoltan Varga <vargaz@gmail.com>
8550 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8552 * object-internals.h: Reflect changes in the layout of the managed Delegate
8555 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
8556 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
8557 runtime memory used by the dynamic method. Fixes #77146.
8559 2007-06-21 Dick Porter <dick@ximian.com>
8562 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
8563 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
8566 2007-06-21 Raja R Harinath <rharinath@novell.com>
8568 * reflection.c (method_encode_methodspec): Add a tripwire.
8569 * class.c (inflate_generic_type): The fully open generic type is
8570 not the same as the generic type definition.
8572 2007-06-21 Martin Baulig <martin@ximian.com>
8574 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
8576 * mono-debug-debugger.h
8577 (MonoDebuggerBreakpointInfo): Removed.
8578 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
8579 (mono_debugger_remove_breakpoint): Likewise.
8580 (mono_debugger_breakpoint_callback): Likewise.
8581 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
8583 2007-06-21 Raja R Harinath <rharinath@novell.com>
8585 * metadata.c (mono_metadata_lookup_generic_class): The fully open
8586 generic type is not the same as the generic type definition.
8587 * class.c (mono_generic_class_get_class): Likewise.
8589 2007-06-20 Geoff Norton <gnorton@customerdna.com>
8591 * icall.c: The second argument to
8592 System.Reflection.MethodBase.GetMethodFromHandleInternalType
8593 is a MonoType not a MonoClass.
8595 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
8597 * verify.c: support for function pointers in the verifier
8599 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
8601 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
8603 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
8605 * assembly.c: removed Mono.Data.SqliteClient from the list of
8606 forward-compatible assemblies as it breaks the ABI (bug #81899).
8608 2007-06-19 Raja R Harinath <rharinath@novell.com>
8610 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
8611 lookup/update with the loader lock.
8612 * reflection.c (mono_class_bind_generic_parameters): No need to
8613 protect mono_metadata_lookup_* with the loader lock.
8614 * class.c (inflate_generic_type): Likewise.
8616 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
8617 on a generic instantiated type.
8619 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
8621 *verify.c: produce meanfull error messages on verification error
8622 *verify.c: fixed some cases of verification errors reported as validation errors
8623 *pedump.c: fixed the error name array, now it shows validation errors properly
8624 *verify.h: fixed the contant that should be used for verification errors
8626 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8628 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
8629 for bug #77596, 81858 and 80743 (generics data structures on domain
8632 2007-06-15 Raja R Harinath <rharinath@novell.com>
8634 Avoid allocating 'MonoGenericContext' on the heap.
8635 * class-internals (_MonoMethodInflated::context): Make field
8636 inline, not a pointer.
8637 * loader.c (method_from_methodspec): Allocate 'new_context' on the
8638 stack. Use the context embedded within the inflated method as the
8639 hash key, rather than 'new_context'.
8640 * class.c (inflate_generic_context): Simplify. Return a struct
8641 rather than allocating on the heap.
8642 (mono_class_inflate_generic_method_full): Update to changes. Now,
8643 doesn't salt away a copy of the context -- simplifying the
8644 lifetime rules of a 'MonoGenericContext *'.
8645 (mono_method_get_context): Return pointer to embedded context.
8646 (setup_generic_array_ifaces): Allocate temporary context on stack.
8647 * reflection.c (inflate_mono_method): Likewise.
8648 (mono_reflection_bind_generic_method_parameters): Likewise.
8649 Use the context embedded within the inflated method as the hash key.
8651 Avoid a source of allocation of 'MonoGenericContext'.
8652 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
8653 and 'cached_context' fields into embedded 'MonoGenericContext' field.
8654 * class.c: Update to changes.
8655 (mono_generic_class_get_context): Simplify drastically. Now just
8656 returns a pointer to the field.
8657 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
8658 argument as a const pointer.
8659 (mono_metadata_generic_context_equal): Likewise.
8660 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
8663 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
8665 * verify.c improved the handling of brtrue/brfalse, factored out common code
8667 2007-06-14 Raja R Harinath <rharinath@novell.com>
8669 Kill MonoGenericMethod.
8670 * class-internals.h (MonoGenericContext::method_inst): Rename from
8671 'gmethod' and convert to a MonoGenericInst.
8672 (MonoGenericMethod): Remove.
8673 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
8674 * loader.c (method_from_methodspec): Update to changes. Use a
8675 MonoGenericContext as the key to the hashtable.
8676 * metadata.c (mono_metadata_generic_context_equal): Rename from
8677 'mono_metadata_generic_method_equal' and take MonoGenericContext.
8678 (mono_metadata_generic_context_hash): Likewise from
8679 'mono_metadata_generic_method_hash'. Change hash function.
8680 (mono_metadata_load_generic_params): Update to changes.
8681 (mono_get_shared_generic_method): Remove.
8682 * metadata-internals.h (mono_get_shared_generic_method): Remove.
8683 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
8684 (inflate_generic_context): Likewise.
8685 (mono_class_inflate_generic_method_full): Likewise.
8686 (setup_generic_array_ifaces): Likewise.
8687 (mono_class_create_from_typespec): Likewise.
8688 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
8689 (method_encode_methodspec): Update callsite.
8690 (reflection_methodbuilder_to_mono_method): Update to changes.
8691 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
8692 MonoGenericContext as the key to the hashtable.
8693 (inflate_mono_method): Update to changes.
8695 * class-internals.h (MonoGenericMethod::container): Remove.
8696 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
8698 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
8700 * profiler-private.h, profiler.c, profiler.h: added API to profile
8703 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
8705 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
8707 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
8709 * verify.c: method invocation is now validated, now we verify parameter types on stack.
8710 Fixed overflow and underflow not aborting the verification process.
8712 2007-06-13 Mark Probst <mark.probst@gmail.com>
8714 * class-internals.h (MonoStats): Added stats entries for dynamic
8717 2007-06-12 Zoltan Varga <vargaz@gmail.com>
8719 * loader.c (mono_free_method): Free header->locals and header->clauses.
8721 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
8724 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
8726 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
8728 2007-06-12 Raja R Harinath <rharinath@novell.com>
8730 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
8733 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
8735 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
8737 2007-06-11 Raja R Harinath <harinath@gmail.com>
8739 MonoGenericMethod on a diet
8740 * class-internals.h (_MonoMethodInflated::reflection_info): Move
8742 (_MonoGenericMethod::reflection_info): ... from here.
8743 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
8745 * reflection.c (inflate_mono_method): Likewise.
8746 (mono_reflection_bind_generic_method_parameters): Likewise.
8748 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
8750 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
8751 *verify.c: factored long ldarg forms to share code with short forms
8753 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
8755 *verify.c: fixed code formating factored some duplicate code
8758 *verify.h: fixed binary incompatibility introduced earlier
8760 *pedump.c: fixed formating
8762 2007-06-11 Raja R Harinath <harinath@gmail.com>
8764 Fix assertion when disassembling Mono.C5.dll
8765 * loader.c (method_from_methodspec): Avoid inflating a method
8766 twice with the same context. If the methodref is inflated, use
8767 the declaring method instead.
8769 * class.c (mono_class_from_generic_parameter): Fix case similar to
8770 bug #81830 handled below, but for method containers.
8772 2007-06-10 Raja R Harinath <harinath@gmail.com>
8774 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
8775 get_shared_generic_class. Directly inflate the instance.
8776 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
8777 (inflate_generic_class): Delete.
8778 (get_shared_generic_class): Delete. Move setting of
8779 'cached_class' and 'cached_context' ...
8780 * metadata.c (mono_metadata_lookup_generic_class): ... here.
8782 * metadata.c (mono_metadata_lookup_generic_class): Change
8783 signature to take the components of a MonoGenericClass rather than
8784 an allocated MonoGenericClass. Change semantics to be intern-like.
8785 * reflection.c (mono_class_bind_generic_parameters): Update to
8786 changes. Make locking region tighter.
8787 * class.c (inflate_generic_class): Update to changes.
8788 (get_shared_generic_class): Likewise.
8789 * metadata-internals.h: Likewise.
8791 * reflection.c (mono_class_bind_generic_parameters): Take and
8792 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
8793 (mono_reflection_bind_generic_parameters): Use
8794 'mono_class_bind_generic_parameters' rather than duplicate the code.
8795 * class.c (mono_bounded_array_class_get): Update to changes.
8796 * object-internals.h: Likewise.
8798 * reflection.c (mono_class_bind_generic_parameters): Only support
8799 parameterizing generic type definitions. Remove support for other
8802 2007-06-08 Zoltan Varga <vargaz@gmail.com>
8804 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
8806 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
8807 in the dynamic case.
8809 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
8811 * threads.c: When cleaning up thread, reset the Background bit.
8814 2007-06-08 Jonathan Chambers <joncham@gmail.com>
8816 * metadata.c: Move variable declarations to top of scope.
8817 * verify.c: Move variable declarations to top of scope.
8819 Code is contributed under MIT/X11 license.
8821 2007-06-08 Raja R Harinath <rharinath@novell.com>
8823 * reflection.c (mono_class_bind_generic_parameters): Replace
8824 open-coded loop with mono_metadata_inflate_generic_inst.
8826 * class.c (get_shared_generic_class): Don't call
8827 mono_get_shared_generic_inst. Use the container's own
8830 * metadata.c (mono_metadata_load_generic_params): Move
8831 initialization of 'context' field here from ...
8832 * class.c (mono_class_create_from_typedef): ... here, and ...
8833 * loader.c (mono_get_method_from_token): ... here.
8835 * class.c (get_shared_generic_class): Rename from
8836 mono_get_shared_generic_class and make static.
8837 (mono_get_shared_generic_inst): Move to metadata.c.
8838 * loader.c (mono_get_shared_generic_method): Likewise.
8839 * class-internals.h, metadata-internals.h: Update to changes.
8842 * class.c (mono_class_from_generic_parameter): Don't assume a
8843 generic container owner exists. Generic containers from monodis
8846 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
8848 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
8849 * verify.h: new typedefs to returns the non-verifiable status
8850 * verify.c: initial implementation of generics, stack merging and object compatibility check
8852 2007-06-06 Mark Probst <mark.probst@gmail.com>
8854 * class.c, image.c, class-internals.h (MonoImage): class_cache is
8855 a MonoInternalHashTable again (fixed bug in internal hash table
8858 2007-06-06 Mark Probst <mark.probst@gmail.com>
8860 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
8861 MonoInternalHashTable again (fixed bug in internal hash table
8864 2007-06-06 Mark Probst <mark.probst@gmail.com>
8866 * class.c, image.c, class-internals.h, domain.c,
8867 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
8868 changes. Have to figure out what makes them break the SWF
8871 2007-06-04 Mark Probst <mark.probst@gmail.com>
8873 * class.c, image.c, class-internals.h (MonoImage): class_cache is
8874 a MonoInternalHashTable now.
8876 2007-06-04 Mark Probst <mark.probst@gmail.com>
8878 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
8879 MonoInternalHashTable now.
8881 2007-05-31 Zoltan Varga <vargaz@gmail.com>
8883 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
8886 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
8888 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
8889 dependent trampoline.
8891 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8893 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
8895 2007-05-29 Robert Jordan <robertj@gmx.net>
8897 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
8899 2007-05-28 Zoltan Varga <vargaz@gmail.com>
8901 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
8903 2007-05-25 Jonathan Chambers <joncham@gmail.com>
8905 * marshal.c: Fix interface lookup loops for
8906 cominterop_get_com_slot_for_method and
8907 cominterop_get_method_interface. Only need to lookup
8908 if type is a class, else use interface type method is on.
8910 Code is contributed under MIT/X11 license.
8912 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
8914 * reflection.c: HasSecurity can be present even if no specially
8915 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
8916 SecurityAttribute). Fix CAS regression tests on buildbot.
8918 2007-05-24 Jonathan Chambers <joncham@gmail.com>
8920 * appdomain.c: Add configure checks for header files.
8921 * image.c: Add configure checks for header files.
8922 * file-io.c: Add configure checks for header files.
8923 * debug-mono-symfile.c: Add configure checks for header files.
8924 * threadpool.c: Add configure checks for header files.
8925 * console-io.c: Add configure checks for header files.
8926 * profiler.c: Add configure checks for header files.
8927 * rawbuffer.c: Add configure checks for header files.
8928 * icall.c: Add configure checks for header files.
8929 * rand.c: Add configure checks for header files.
8930 * socket-io.c: Add configure checks for header files.
8932 Code is contributed under MIT/X11 license.
8934 2007-05-24 Zoltan Varga <vargaz@gmail.com>
8936 * reflection.c (mono_custom_attrs_from_builders): Remove the
8937 assertion as it breaks the build.
8939 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
8941 * reflection.c (lookup_custom_attr): Make a copy here too.
8943 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
8946 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
8949 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
8952 2007-05-22 Zoltan Varga <vargaz@gmail.com>
8954 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
8955 (load_cattr_value): Ditto.
8957 2007-05-20 Zoltan Varga <vargaz@gmail.com>
8959 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
8961 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
8963 * threads.c: In "start_wrapper", set apartment_state to MTA if
8964 apartment_state is Unknown and we're running on 2.0 profile or
8966 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
8967 to main method, then set apartment_state to Unknown on 1.0 profile,
8968 and MTA on 2.0 profile.
8970 2007-05-16 Jb Evain <jb@nurv.fr>
8972 * class-internals.h (MonoDefaults): Add an attribute_class and
8973 customattribute_data_class.
8974 * domain.c (mono_init_internal): Populate them.
8975 * reflection.c: Use them to remove duplicates. Make a vew
8976 MonoClass variables `static'.
8978 2007-05-15 Massimiliano Mantione <massi@ximian.com>
8980 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
8981 step in implementing IMT, so that all isinst checks now can go
8983 This was needed because vtables for TransparentProxy need to look
8984 like the vtable of the "target" class, so they need to point to
8985 its interface bitmap directly.
8987 * object.c: inside "mono_class_create_runtime_vtable" and
8988 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
8990 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
8992 * object-internals.h
8993 culture-info.h : added territory field in MonoCulture and
8994 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
8995 * locales.c : fill territory field above too.
8996 * culture-info-table.h : regenerated.
8998 2007-05-12 Zoltan Varga <vargaz@gmail.com>
9000 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
9003 2007-05-11 Jonathan Chambers <joncham@gmail.com>
9005 * object.c: Always initialize apartment, even if
9006 there is no custom attributes on entry point.
9008 Code is contributed under MIT/X11 license.
9010 2007-05-10 Jonathan Chambers <joncham@gmail.com>
9012 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
9013 * metadata.c: If no encoding is set, check for unicode
9016 Code is contributed under MIT/X11 license.
9018 2007-05-09 Jonathan Chambers <joncham@gmail.com>
9020 * threads.c: Handle if mono_thread_current returns NULL
9022 Code is contributed under MIT/X11 license.
9024 2007-05-09 Jonathan Chambers <joncham@gmail.com>
9026 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
9027 in start_wrapper. Added mono_thread_init_apartment_state and
9028 mono_thread_cleanup_apartment_state.
9029 * object.c: Initialize thread apartment state on main thread
9030 by checking for STAThreadAttribute on entry point.
9031 * object-internals.h: Add apartment_state field to MonoThread.
9032 * threads-types.h: Add unmanaged definition of
9033 System.Threading.ApartmentState, MonoThreadApartmentState.
9035 Code is contributed under MIT/X11 license.
9037 2007-05-08 Jonathan Chambers <joncham@gmail.com>
9039 * class.c: Fix windows build.
9040 * class-internals.h: Fix windows build.
9042 Code is contributed under MIT/X11 license.
9044 2007-05-08 Robert Jordan <robertj@gmx.net>
9046 * process.c (CreateProcess_internal):
9047 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
9048 .CreateNoWindow was specified. Fixes #81496.
9050 2007-05-08 Massimiliano Mantione <massi@ximian.com>
9052 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
9053 step in implementing IMT, replaced it with two compact arrays
9054 (interfaces_packed and interface_offsets_packed) and a bitmap that
9055 is used for isinst checks (interface_bitmap).
9057 * class.c: (compare_interface_ids): compare function to pass to
9058 bsearch when looking for an interface with a given id.
9059 (mono_class_interface_offset): reimplemented using bsearch on
9060 interfaces_packed, getting the offset from interface_offsets_packed.
9061 (print_implemented_interfaces): utility debugging function.
9062 (setup_interface_offsets): reworked to initialize interfaces_packed,
9063 interface_offsets_packed and interface_bitmap.
9065 * object.c: replaced all accesses to "MonoClass.interface_offsets"
9066 with uses of interfaces_packed and interface_offsets_packed.
9068 2007-05-08 Massimiliano Mantione <massi@ximian.com>
9070 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
9071 mono_class_interface_offset prototype to wrap all accesses to
9072 "MonoClass.interface_offsets".
9074 * class.c: Implemented mono_class_interface_offset, and wrapped all
9075 accesses to "MonoClass.interface_offsets".
9077 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
9078 "MonoClass.interface_offsets".
9080 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
9082 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
9083 GetMethodFromHandle overloads (bug #78637).
9085 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
9087 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
9088 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
9090 2007-05-01 Zoltan Varga <vargaz@gmail.com>
9092 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
9095 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
9097 (mono_custom_attrs_from_index): Ditto.
9099 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
9102 2007-04-30 Zoltan Varga <vargaz@gmail.com>
9104 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
9105 is now allocated from a mempool.
9107 2007-04-28 Zoltan Varga <vargaz@gmail.com>
9109 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
9110 caller holds threads_lock, leading to deadlocks. Fixes #81476.
9112 2007-04-26 Zoltan Varga <vargaz@gmail.com>
9114 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
9115 mono_loader_clear_error () too late. Fixes #81463.
9117 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
9119 * culture-info-table.h : regenerated.
9121 2007-04-25 Zoltan Varga <vargaz@gmail.com>
9123 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
9126 2007-04-25 Dick Porter <dick@ximian.com>
9128 * Makefile.am: Put the mingw enforced-optimisation back into the
9129 PLATFORM_WIN32 section.
9131 2007-04-24 Zoltan Varga <vargaz@gmail.com>
9133 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
9136 * image.c (mono_image_load_module): New API function to load a module reference.
9138 * image.c (load_modules): Load modules lazily. Fixes #80812.
9140 * class.c (mono_class_from_typeref): Use mono_image_load_module.
9142 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
9144 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
9145 to mono_image_load_module_dynamic.
9147 2007-04-23 Jonathan Chambers <joncham@gmail.com>
9149 * marshal.c: Fix calling convention for CCW on non-windows
9150 platforms. STDCALL on windows, CDECL everywhere else to work
9151 with XPCOM and MainWin COM.
9153 Code is contributed under MIT/X11 license.
9155 2007-04-23 Martin Baulig <martin@ximian.com>
9160 (method_from_memberref): Added `gboolean *used_context' argument.
9161 (mono_get_method_from_token): Likewise.
9162 (mono_get_method_full): Don't insert the method in the cache when
9163 `used_context' is true.
9165 2007-04-23 Raja R Harinath <rharinath@novell.com>
9167 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
9169 * reflection.c (mono_reflection_bind_generic_parameters): Don't
9170 create new MonoTypes for returned types.
9171 * class.c (mono_generic_class_get_class): Export mono-internal.
9172 * class-internals.h: Update to changes.
9174 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
9176 * threadpool.c, threadpool.h, icall-def.h: patch from
9177 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
9179 2007-04-18 Zoltan Varga <vargaz@gmail.com>
9181 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
9183 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
9185 * threads.c (mono_thread_get_stack_bounds): New helper function.
9187 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
9188 Correctly compute stack bounds when attaching. Fixes #81394.
9190 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
9192 * reflection.c: fix handling of doubles in custom attributes
9193 for the arm-fpa format (bug #81368).
9195 2007-04-18 Raja R Harinath <rharinath@novell.com>
9197 * reflection.c (assembly_add_win32_resources): Mildly relax an
9198 bounds check to let the end pointer point just past the end of the
9199 allocated buffer. (may fix #81384)
9201 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
9203 * culture-info-table.h : regenerated.
9205 2007-04-07 Zoltan Varga <vargaz@gmail.com>
9207 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
9208 the thread is aborted early.
9210 2007-04-05 Dick Porter <dick@ximian.com>
9212 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
9213 FindFirstFile()/FindNextFile() to find entries. This lets the
9214 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
9217 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
9219 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
9221 2007-04-04 Martin Baulig <martin@ximian.com>
9224 (mono_method_desc_full_match): Add support for nested classes.
9226 2007-04-02 Zoltan Varga <vargaz@gmail.com>
9228 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
9230 2007-04-01 Zoltan Varga <vargaz@gmail.com>
9232 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
9233 waiting for too many threads.
9235 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
9237 * environment.c: Fix return value check on uname so we can get the
9238 executing version on Solaris operating systems.
9240 2007-03-28 Jb Evain <jbevain@gmail.com>
9242 * class.c (mono_type_get_name_recurse): Complete the
9243 fix for the creation of assembly qualified names for
9244 pointer types. Fixes #81208.
9246 2007-03-27 Dick Porter <dick@ximian.com>
9248 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
9249 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
9253 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
9254 the value of ReleaseMutex().
9256 2007-03-27 Dick Porter <dick@ximian.com>
9258 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
9259 in little-endian order, not network endian, so must be converted
9260 to host endian here. Fixes bug 80593.
9262 2007-03-22 Jb Evain <jbevain@gmail.com>
9264 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
9265 qualified names for pointer types. Fixes #81208.
9267 2007-03-21 Jonathan Chambers <joncham@gmail.com>
9269 * marshal.c: Add support for PreserveSigAttribute.
9271 Code is contributed under MIT/X11 license.
9273 2007-03-14 Zoltan Varga <vargaz@gmail.com>
9275 * process.c: Fix endianness issues. Fixes #81126.
9277 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
9278 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
9280 * image.c (mono_image_lookup_resource): Make this work on big-endian
9281 machines.Change API contract so the caller needs to free the return value.
9283 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
9286 2007-03-14 Martin Baulig <martin@ximian.com>
9288 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
9289 mono_type_get_desc() as well.
9291 2007-03-13 Jonathan Chambers <joncham@gmail.com>
9293 * icall.c: Fix environ access in VS.
9295 2007-03-13 Alp Toker <alp@atoker.com>
9297 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
9298 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
9301 2007-03-12 Zoltan Varga <vargaz@gmail.com>
9303 * reflection.c (mono_reflection_create_dynamic_method): Add support for
9304 circular references among dynamic methods. Fixes #81091.
9306 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
9308 2007-03-09 Martin Baulig <martin@ximian.com>
9310 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
9312 2007-03-09 Jonathan Chambers <joncham@gmail.com>
9314 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
9315 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
9317 Code is contributed under MIT/X11 license.
9319 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
9321 * loader.c: Reapply patch for bug #79424.
9323 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9325 * metadata.c (mono_type_to_unmanaged): Only convert object to
9326 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
9328 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
9330 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
9331 (and incorrectly set) is_reference field from MonoGenericInst.
9333 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9335 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
9338 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
9340 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
9342 2007-03-05 Miguel de Icaza <miguel@novell.com>
9344 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
9345 FileOptions.1 value to mean "temporary", map that to
9346 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
9350 2007-03-03 Marek Habersack <mhabersack@novell.com>
9352 * appdomain.c: implement MS .Net style shadow copying. Copies of
9353 the assemblies are made in a subdirectory of the dynamic base
9354 directory, the assembly names are preserved.
9355 Copy .mdb and .config files along with the assemblies being shadowed.
9357 2007-02-28 Zoltan Varga <vargaz@gmail.com>
9359 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
9360 (emit_marshal_handleref): Ditto.
9362 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
9363 on Visual C++. Fixes #80671.
9365 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9367 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
9368 for clone operations.
9370 2007-02-28 Zoltan Varga <vargaz@gmail.com>
9372 * marshal.c: Fix warnings.
9374 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
9376 * loader.c: allow case-insensitive matching of the dll name
9377 in dllmap handling when prefixed with "i:".
9379 2007-02-20 Jonathan Chambers <joncham@gmail.com>
9381 * threads.c: Fix #ifdef for dummy_apc function for VS.
9383 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9385 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
9387 2007-02-19 Massimiliano Mantione <massi@ximian.com>
9388 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
9389 giving precedence to the methods with a fully qualified name
9390 (InterfaceName.MethodName) when building the interface sections
9393 2007-02-16 Dick Porter <dick@ximian.com>
9395 * threadpool.c (append_job): Fix fast-path array handling, so it's
9396 less likely the array will grow exponentially when the load is
9399 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9401 * metadata-internals.h, loader.c: fix dllmap lookup order
9402 for non-function maps, too, and prepare for fallback code.
9404 2007-02-12 Robert Jordan <robertj@gmx.net>
9406 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
9407 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
9408 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
9409 GlobalFree. Fixes a part of bug #77075.
9411 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
9413 * loader.c: implemented typedef parent in field memberref.
9415 2007-02-11 Jonathan Chambers <joncham@gmail.com>
9417 * marshal.c: Fix warnings and remember to call Release on
9420 Code is contributed under MIT/X11 license.
9422 2007-02-10 Miguel de Icaza <miguel@novell.com>
9424 * class-internals.h: Add MonoHandleRef definition, and
9425 handleref_class to mono_defaults.
9427 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
9428 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
9430 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
9431 (do nothing on this stage)
9432 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
9433 (emit_marshal_handleref): New method, used for argument handling
9436 2007-02-08 Jonathan Chambers <joncham@gmail.com>
9438 * class.c (mono_class_setup_parent): Lazily init com types.
9439 * domain.c (mono_init_internal, mono_init_com_types): Lazily
9441 * object.c (mono_remote_class_vtable): Lazily init com types.
9442 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
9443 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
9444 * domain-internals.h: Expose mono_init_com_types.
9445 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
9446 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
9447 Add support for COM Callable Wrapper marshalling.
9448 * marshal.h: Add icall definitions.
9449 * gc.c: Handle freeing of CCWs in finalizer code.
9451 Code is contributed under MIT/X11 license.
9453 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
9455 * reflection.c: changed all the signature encoding code to use
9456 a variable-sized buffer.
9458 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9460 * marshal.c: locking fixes: never take the loader lock
9461 or other runtime locks when holding the marshal lock
9464 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
9466 * marshal.c: make the delegate function pointer mapping
9467 work for the moving GC.
9469 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
9471 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
9474 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9476 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
9479 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9481 * threadpool.c: made the code moving-GC safe.
9483 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
9485 * assembly.c, boehm-gc.c, class-internals.h, class.c,
9486 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
9487 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
9489 * reflection.c: warning cleanup, some threading and moving GC fixes.
9491 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
9493 * class.c, loader.c: create the needed Set/Get/Address array methods
9494 as well as the .ctors in mono_class_init (), fixes bug #80567.
9496 2007-01-24 Zoltan Varga <vargaz@gmail.com>
9498 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
9499 we doesn't decrease its alignment. Should fix the sparc build.
9501 2007-01-24 Dick Porter <dick@ximian.com>
9504 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9505 Create the returned object if we need to ignore an unsupported
9506 socket option. Fixes a segfault reported by Atsushi.
9508 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
9510 * class.c, object.c: restrict GC-tracked fields to
9511 UIntPtr fields used inside corlib, so we provide better
9512 type info to the GC and also allow broken packing as in
9515 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
9517 * sgen-gc.c: removed duplicated function.
9519 2007-01-19 Miguel de Icaza <miguel@novell.com>
9521 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
9522 value that means that the value is not supported, but that we
9523 should not return a failure, but instead report this as a
9524 successful operation.
9526 2007-01-19 Raja R Harinath <rharinath@novell.com>
9528 Fix tests/bug79956.2.il
9529 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
9530 (mono_generic_class_get_class): If the generic definition in an
9531 enum, copy over other fields related to it.
9533 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9535 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
9536 genericinst enums (bug #79215).
9538 2007-01-17 Massimiliano Mantione <massi@ximian.com>
9539 * class.c: Fix bug 80307.
9541 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
9543 * image.c: if the file table is not present, try to load
9544 all the modules, since we don't have info about them
9545 having or not metadata (bug #80517).
9546 * assembly.c: allow mono_assembly_load_references () to
9547 work for netmodules.
9549 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9551 * image.c, metadata-internals.h, object.c: execute module
9552 cctors when running on the 2 runtime if present (bug #80487).
9554 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
9556 * icall.c: optimized InitializeArray() on bigendian.
9558 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
9560 * icall.c: fix for the broken ARM FPA double format.
9562 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9564 * icall.c: handle endian issues for r4 and r8 types, too, in
9565 the InitializeArray() icall.
9567 2007-01-15 Miguel de Icaza <miguel@novell.com>
9569 * loader.c (mono_loader_error_prepare_exception): Clear the error
9570 once we have extracted the information from it, do this before we
9571 call into the JIT's class loading mechanisms.
9573 * object.c (mono_class_create_runtime_vtable): Do not clear the
9574 loader error before calling mono_class_get_exception_for_failure
9575 as the loader error is needed inside
9576 mono_class_get_exception_for_failure to throw the error (thinko).
9580 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9582 * reflection.c: align fields rva data so it's faster to load at
9585 2007-01-12 Raja R Harinath <rharinath@novell.com>
9587 Prepare to simplify GenericMethod handling.
9588 * class-internals.h (mono_method_get_context): New accessor function.
9589 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
9590 rather than directly accessing '->context' field.
9592 * class-internals.h (_MonoGenericParam.method): Move ...
9593 (_MonoGenericContainer): ... here. Add into union with klass field.
9594 * class.c, icall.c, loader.c, metadata.c, reflection.c:
9597 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
9599 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
9600 the wrapper type enum and reduce relocations.
9602 2007-01-12 Raja R Harinath <rharinath@novell.com>
9604 * reflection.c (inflate_mono_method): Reuse method instantiation
9605 from the generic method, if available.
9607 2007-01-11 Jonathan Chambers <joncham@gmail.com>
9609 * marshal.c (emit_marshal_variant): Fix conv_arg
9610 type in last commit, based on whether parameter is byref.
9612 2007-01-11 Jonathan Chambers <joncham@gmail.com>
9614 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
9616 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
9617 MONO_TYPE_OBJECT back for VARIANT support.
9619 2007-01-11 Jonathan Chambers <joncham@gmail.com>
9621 * marshal.c, marshal.h, icall-def.h: Implement
9622 Marshal.ReAllocCoTaskMem.
9624 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
9626 * marshal.c: memory retention fixes: use the proper
9627 image cache for runtime_invoke method lookups.
9629 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9631 * mempool.c: added code to help debug mempool allocations.
9633 2007-01-11 Dick Porter <dick@ximian.com>
9635 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
9636 support (experimenting with faking it with IP_MTU_DISCOVER for
9637 systems that don't have IP_DONTFRAGMENT.)
9638 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
9641 * icall-def.h: new System.Net.Sockets.Disconnect icall.
9643 * socket-io.h: Add new fields to MonoSocketAsyncResult
9644 corresponding to the new ones in Socket.cs.
9646 2007-01-11 Raja R Harinath <rharinath@novell.com>
9648 Fix IronPython regression mentioned in #80249
9649 * metadata.c (do_mono_metadata_parse_generic_class): Clear
9650 'cached_context' field, since it may have been initialized as a
9651 side-effect of metadata parsing.
9653 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
9654 (_MonoGenericClass.cached_class): Move here and rename from lone
9655 remaining field of ...
9656 (_MonoInflatedGenericClass): ... this. Remove.
9657 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
9660 Fix mcs/tests/test-128.cs regression.
9661 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
9662 2007-01-10 change below.
9663 [MONO_TYPE_OBJECT]: Recurse into array case.
9665 2007-01-11 Raja R Harinath <harinath@gmail.com>
9667 * class-internals.h (mono_get_inflated_generic_class): Remove.
9668 * class.c (mono_get_inflated_generic_class): Remove.
9669 (mono_generic_class_get_class): Rename from
9670 mono_class_create_generic.
9671 (mono_class_from_mono_type) [GENERICINST]: Use it.
9672 * reflection.c, metadata.c: Update to changes. Use
9673 'mono_class_from_mono_type'.
9675 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
9677 * reflection.c: use passed type when encoding an array element
9678 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
9680 2007-01-09 Robert Jordan <robertj@gmx.net>
9682 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
9683 result arguments (someDelegate.EndInvoke (unrelatedAres)).
9686 2007-01-09 Raja R Harinath <rharinath@novell.com>
9688 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
9690 * object.c (set_value): Avoid aliasing between type->data.klass
9691 and type->data.generic_class.
9693 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
9695 2007-01-08 Raja R Harinath <rharinath@novell.com>
9697 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
9698 between type->data.klass and type->data.generic_class.
9700 2007-01-08 Lluis Sanchez <lluis@ximian.com>
9702 * marshal.c: In MS.NET, StringBuilder objects are not copied by
9703 value in out parameters.
9705 2007-01-08 Raja R Harinath <rharinath@novell.com>
9707 Simplify invariant for MonoGenericClass::klass field.
9708 * class.c (mono_class_create_generic): Verify 'klass' is null.
9709 * metadata.c (do_mono_metadata_parse_generic_class): Don't
9710 initialize 'klass' field.
9712 2007-01-05 Raja R Harinath <rharinath@novell.com>
9714 Ongoing work to avoid redundant data and simplify invariants.
9715 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
9716 'generic_class', and change type to a GenericInst.
9717 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
9718 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
9720 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
9722 * class.c : skip io-layer under PLATFORM_WIN32.
9724 2007-01-03 Tor Lillqvist <tml@novell.com>
9726 Fix #80305: In a bundled executable, look in the bundled exe
9727 assembly to determine the runtime version. Add the possibility to
9728 bundle also the machine.config file.
9730 * assembly.c (mono_assembly_open_from_bundle): Make
9731 non-static. Allow being called even if we have no bundled
9732 assemblies, and return NULL right away in that case.
9734 * domain-internals.h: Declare mono_assembly_open_from_bundle()
9737 * domain.c (app_config_parse): Take an assembly exe file name as
9738 parameter instead of a config file name. Check for a bundled
9739 config file for that assembly by calling
9740 mono_config_string_for_assembly_file() (see below) before looking
9741 for one in the file system.
9742 (get_runtimes_from_exe): Corrsponding change to call of
9744 (get_runtimes_from_exe): Check for bundled assembly exe file first
9745 by calling mono_assembly_open_from_bundle(). If no bundled
9746 assembly exe file is found, call mono_image_open() as before to
9747 look it up in the file system.
9749 * mono-config.c: Add variable bundled_machinec_onfig.
9750 (mono_config_string_for_assembly_file): New function.
9751 (mono_config_for_assembly): Move code snippet that looks for a
9752 bundled assembly .config file into the above new function. Call
9754 (mono_register_machine_config, mono_get_machine_config): New
9755 functions to set and retrieve
9757 * assembly.h: Declare mono_register_machine_config().
9759 * mono-config.h: Declare mono_get_machine_config() and
9760 mono_config_string_for_assembly_file().
9762 * icall.c: No declaration of environ necessary on Win32. It is
9763 declared (as a macro expanding to a function call) in stdlib.h.
9764 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
9765 New internal mono function. Returns the value of
9766 mono_get_machine_config() as a Mono string.
9768 * icall-def.h: Add get_bundled_machine_config().
9770 2007-01-04 Raja R Harinath <rharinath@novell.com>
9772 Remove redundant field
9773 * class-internals.h (_MonoGenericContext.container): Remove field.
9774 * loader.c (mono_method_get_signature_full): Don't parse a
9775 "container" for a signature parse when the signature is inflated
9777 (method_from_methodspec): Likewise, for a generic_inst.
9778 * class.c, metadata.c, reflection.c: Update to changes.
9780 2006-01-04 Raja R Harinath <rharinath@novell.com>
9782 * class-internals.h (_MonoGenericClass): Rename 'context' field to
9783 'cached_context', and change semantics -- it starts off NULL, and
9784 is initialized on demand.
9785 * class.c (mono_generic_class_get_context): New accessor to
9786 replace 'context' field accesses.
9787 (mono_class_get_context): New helper.
9788 (*): Update to changes.
9789 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
9791 2007-01-03 Miguel de Icaza <miguel@novell.com>
9793 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
9794 before the memcpy. Fixes Marshal2 regression.
9796 2007-01-02 Jb Evain <jbevain@gmail.com>
9798 * blob.h: add a MONO_TYPE_ENUM definition
9799 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
9800 fix the encoding of arrays of enums in custom attributes.
9804 2007-01-01 Miguel de Icaza <miguel@novell.com>
9806 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
9807 string is null terminated, but only cut the string short if it
9808 overflows the buffer.
9810 (mono_string_to_byvalstr): Also fix this routine. The code here
9811 was not properly terminating a string (it was only terminated
9812 because of the previous catch-all memset).
9814 I left the memset, because I do not know if applications expect
9815 the runtime to clear this region.
9819 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
9820 Clear the error before returning to unmanaged code to prevent the
9821 runtime from being confused later on (fixes 80420).
9822 (ves_icall_type_from_name): Always call mono_loader_clear_error
9823 after parsing a type that could have failed.
9824 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
9826 * loader.c (mono_loader_clear_error): Fix indentation.
9828 2006-12-28 Martin Baulig <martin@ximian.com>
9830 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
9832 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9834 * reflection.c: patch from Rolf Bjarne Kvinge to fix
9835 getting a token for an EnumBuilder.
9837 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
9839 * reflection.c: be more careful in case resource generation
9840 fails to create the data array.
9842 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9844 * sgen-gc.c: write barrier for clone and fix unregister handles.
9846 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9848 * reflection.c: some fixes needed in the generics code for the moving GC.
9850 2006-12-22 Robert Jordan <robertj@gmx.net>
9852 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
9853 account. Fixes bug #80299.
9855 2006-12-21 Raja R Harinath <rharinath@novell.com>
9857 Fix WaitHandle usage in delegates.
9858 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
9859 * object.c (mono_wait_handle_new): Use the property set method to
9860 initialize the handle.
9861 (mono_wait_handle_get_handle): New.
9862 * threadpool.c (mono_async_invoke): Use it.
9863 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
9865 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
9867 2006-12-21 Jonathan Chambers <joncham@gmail.com>
9869 * marshal.c (emit_marshal): Call emit_marshal_variant and
9870 emit_marshal_com_interface when applicable.
9871 (emit_marshal_variant, emit_marshal_com_interface): Add
9872 methods for this case and remove if's from emit_marshal_object.
9874 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
9876 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
9878 2006-12-19 Jonathan Chambers <joncham@gmail.com>
9880 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
9881 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
9882 and GlobalFree on Windows. Remove FIXME.
9884 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9886 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
9887 implementation for managed objects.
9889 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9891 * object.c: implemented code to be used for checking
9892 that no reference field overlaps with non-references.
9894 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9896 * threadpool.c: fix queue code to be compatible with the
9899 2006-12-18 Miguel de Icaza <miguel@novell.com>
9901 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
9902 in structures by throwing ArgumentNullException.
9904 (emit_marshal_safehandle): Also when they are null parameters.
9906 (emit_marshal_safehandle): Add support for ref
9907 SafeHandles parameters
9909 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9911 * profiler.c: updated to use the mono-dl API instead of
9914 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9916 * profiler.c: updated to use the mono-dl dynamic loading
9917 API instead of gmodule.
9919 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9921 * profiler.c: use readlink, older versions of glib don't have
9922 g_file_read_link ().
9924 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9926 * profiler.c: try to detect the path to mono if libc fails to provide
9927 a useful name (bug #80286).
9929 2006-12-16 Raja R Harinath <rharinath@novell.com>
9932 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
9933 instance, use the generic type definition instead.
9934 (ves_icall_Type_GetNestedTypes): Likewise.
9935 * class.c (mono_class_create_generic): Always set the
9936 nested_classes of a generic instance to NULL, even if the generic
9937 type definition has nested types.
9939 2006-12-15 Jonathan Chambers <joncham@gmail.com>
9941 * marshal.c (mono_string_from_bstr): Revert previous Windows change
9944 2006-12-15 Miguel de Icaza <miguel@novell.com>
9946 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
9947 my arguments were in the wrong order. I also fixed the Windows
9948 version which seems to have had the same issue.
9950 (mono_free_bstr): On Unix, this is g_free.
9951 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
9952 conversions (for the tests in corlib to pass).
9954 2006-12-14 Miguel de Icaza <miguel@novell.com>
9956 * marshal.c (emit_ptr_to_object_conv): For now, ignore
9957 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
9958 exception if a ref SafeHandle in a struct has changed).
9960 (emit_struct_conv): Do not perform layout checks for classes
9961 derived from SafeHandle, as those are specially handled.
9963 (emit_object_to_ptr_conv): Add support for
9964 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
9966 (emit_marshal_safehandle): Implement conversion of return values
9967 of safehandles (MARSHAL_ACTION_CONV_RESULT).
9969 * threads.c: WaitHandle now is compiled with two different handles
9970 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
9973 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
9974 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
9975 these routines to cope with both kinds of fields.
9977 2006-12-12 Miguel de Icaza <miguel@novell.com>
9979 * metadata.c (mono_type_to_unmanaged): Handle the case where
9980 type->data.klass is a SafeHandle, and in that case, return the
9981 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
9982 MONO_MARSHAL_CONV_SAFEHANDLE.
9984 2006-12-11 Miguel de Icaza <miguel@novell.com>
9986 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
9987 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
9988 calling emit_marshal_object.
9990 (emit_marshal_safehandle): Implement marshalling of
9991 SafeHandle parameters (no ref support yet).
9993 (MarshalAction): Document the defines as I implement
9994 them for SafeHandle.
9996 (emit_marshal_object): indentation police.
9998 * class-internals.h: Define MonoSafeHandle.
9999 Add safehandle_class to MonoDefaults type.
10001 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
10002 list of classes to check for fields.
10004 * domain.c (mono_init_internal): Add SafeHandle to the list of
10005 mono_defaults loaded.
10007 2006-12-15 Raja R Harinath <rharinath@novell.com>
10010 * reflection.c (mono_reflection_bind_generic_parameters): If the
10011 generic type definition is a type builder, ensure that it is fully
10012 initialized before instantiating it. Kill some dead code.
10014 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10016 * object.c: clear the loader_error () before loading
10017 more metadata stuff (bug #80258).
10019 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
10021 * icall.c, icall-defs.h: type modifiers icalls for
10022 parameters and properties.
10024 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
10026 * object.c, icall.c: fixed warnings.
10028 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10030 * marshal.c: fixed a couple of leaks and coding style in a few places.
10032 2006-12-08 Dick Porter <dick@ximian.com>
10034 * process.c: Cope with NULL ProcessStartInfo arguments on windows
10035 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
10038 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
10040 * process.c: ProcessStartInfo may have only filename set and
10041 arguments can be NULL.
10043 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
10045 * icall.c: fix leak found by Robert Jordan.
10047 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10049 * marshal.c, marshal.h: generate managed method to access an element
10050 of a multi-dimensional array.
10052 2006-11-30 Paolo Molaro (lupus@ximian.com)
10054 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
10056 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10058 * icall.c: back out GetFields () fix until the serialization code is
10059 fixed to not depend on the incorrect behaviour.
10061 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
10063 * profiler.c: provide defaults if none are set.
10065 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
10067 * Makefile.am, attrdefs.h: new public header file with
10068 constants for attributes for use by embedders.
10070 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
10072 * icall.c: GetFields () fix for bug #80064.
10074 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
10076 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
10077 removed long unused icalls.
10079 2006-11-27 Jonathan Chambers <joncham@gmail.com>
10082 (mono_marshal_emit_managed_wrapper): Level of indirection for
10083 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
10084 can be generated without a delegate class.
10085 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
10087 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
10089 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10091 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
10094 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10096 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
10097 icall-def.h: added icalls needed by System.GC.
10099 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
10101 * loader.c: ensure the class in catch clauses is handled
10102 correctly for generics methods (fixes bug#79980).
10104 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
10106 * monitor.h, monitor.c: added mono_locks_dump () function
10107 to help debug deadlocks involving managed locks.
10109 2006-11-13 Dick Porter <dick@ximian.com>
10111 * file-io.c (get_file_attributes): If the file is a symlink try
10112 and get the stat data for the target, but also add the
10113 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
10114 the specs for the windows symlink support, but will probably have
10115 to be reworked when I have test data from a vista machine. Fixes
10118 2006-11-13 Dick Porter <dick@ximian.com>
10120 * gc.c (mono_domain_finalize):
10121 * marshal.c (mono_delegate_begin_invoke):
10122 * threadpool.c (socket_io_init, mono_thread_pool_init)
10123 (mono_thread_pool_finish):
10124 * monitor.c (mono_monitor_try_enter_internal):
10125 * threads.c (mono_thread_resume, mono_thread_init)
10126 (mono_thread_suspend_all_other_threads)
10127 (mono_thread_execute_interruption):
10128 * appdomain.c (mono_domain_unload): Check for NULL error returns
10129 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
10132 2006-11-11 Miguel de Icaza <miguel@novell.com>
10135 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
10136 Only close the handle if the value of the handle is not
10137 INVALID_HANDLE_VALUE. This just makes the process a bit more
10140 Improvement for #75733, so that we do not run into this problem.
10143 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
10144 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
10145 internal variables. Fixes #79462
10148 2006-11-09 Dick Porter <dick@ximian.com>
10150 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
10151 Use poll() not select(). Fixes bug 79397.
10153 2006-11-09 Raja R Harinath <rharinath@novell.com>
10156 * assembly.c (mono_assembly_load_from_full): Check that the given
10157 image has an assembly manifest.
10159 2006-11-09 Ankit Jain <jankit@novell.com>
10161 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
10162 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
10163 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
10165 2006-11-07 Dick Porter <dick@ximian.com>
10167 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
10168 Put the old resolver behaviour back for pre-2.0 profiles.
10170 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
10172 * threadpool.c: precise GC and locking fixes.
10174 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
10176 * class.c: don't load types that have an explicit unaligned
10177 managed reference. Provide better info in the TypeLoad exception.
10178 Part of the fix for bug #79744.
10179 * object.c: use the correct check for class type load issues.
10181 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
10183 * class.c: enforce alignment of fields with managed references
10184 even when Pack=1 is forced by the user (bug #77788).
10186 2006-11-03 Dick Porter <dick@ximian.com>
10188 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
10189 If the address reverse lookup fails, return it as the hostname
10190 anyway. Fixes bug 79721.
10192 2006-11-03 Dick Porter <dick@ximian.com>
10194 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
10195 Fix build on Windows.
10197 2006-11-02 Dick Porter <dick@ximian.com>
10200 * object-internals.h:
10201 * exception.c (mono_get_exception_thread_interrupted):
10202 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
10205 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
10206 Check for pending Thread.Interrupt.
10208 2006-10-27 Massimiliano Mantione <massi@ximian.com>
10209 * loader.c: Fixed bug 79684.
10211 2006-10-27 Dick Porter <dick@ximian.com>
10213 * file-io.c (get_file_attributes): Force symlinks to directories
10214 to be returned as a regular file. Fixes bug 79733.
10215 2006-10-26 Dick Porter <dick@ximian.com>
10217 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
10218 CreateFile to open a directory then we need to set the
10219 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
10221 2006-10-23 Zoltan Varga <vargaz@gmail.com>
10223 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
10226 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10228 * sgengc.c: small cleanup of timer code.
10230 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
10232 * sgen-gc.c: fix some warnings and start adding support for
10233 complete object removal on domain unload.
10235 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
10237 * assembly.c: build_assembly_name should not consider a version
10238 number without build or revision number invalid. Fixes bug #79715.
10240 2006-10-18 Jonathan Chambers <joncham@gmail.com>
10242 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
10243 call kernel32 function OutputDebugString directly.
10245 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
10247 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
10249 * reflection.c: small cleanup, using a function to insert a MonoString
10250 in the string heap.
10252 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
10254 * reflection.c: moving GC fixes.
10256 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
10258 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
10259 all the objects with finalizers belonging to an unloading appdomain.
10261 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
10263 * sgen-gc.c: added ability to allocate even when the nursery is fully
10264 pinned and fixed a couple of bugs.
10266 2006-10-15 Zoltan Varga <vargaz@gmail.com>
10268 * threads.h: Revert the last change for now.
10270 * threads.h (mono_thread_get_pending_exception): Rename this to
10271 mono_thread_get_undeniable_exception ().
10273 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
10275 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
10276 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
10277 when fname does not refer to valid assembly. This result in a more
10278 meaningful error message.
10279 * exception.c: added mono_get_exception_bad_image_format2 which
10280 constructs a BadImageFormatException using the ctor taking a custom
10281 message and the file name. Passing in a NULL msg results in a default
10283 * exception.h: define mono_get_exception_bad_image_format2 function.
10284 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
10285 when file name pointed to an invalid IL image. Use
10286 mono_get_exception_file_not_found2 to construct FileNotFoundException,
10287 as this results in a more meaningful error message.
10289 2006-10-15 Zoltan Varga <vargaz@gmail.com>
10291 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
10294 2006-10-12 Zoltan Varga <vargaz@gmail.com>
10296 * metadata.c (mono_type_size): Change the align parameter to guint32 for
10297 consistency with the other _size functions.
10298 (mono_type_stack_size): Ditto.
10300 * class.c object.c icall.c: Fix warnings caused by the above change.
10302 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
10304 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
10306 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
10308 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
10310 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
10311 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
10312 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
10313 threadpool.h, threads-types.h: mark more internal functions.
10315 2006-10-11 Dick Porter <dick@ximian.com>
10317 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
10318 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
10319 reproduce the bug even before applying the fix.)
10321 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
10323 * reflection.c: allow retrieving attributes for arguments in generic
10324 methods (bug #79241).
10326 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
10328 * debug-mono-symfile.c: properly check fopen () result (found by
10331 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
10333 * reflection.c: make error message clearer and fixed two
10334 issuelets found by Coverity.
10336 2006-10-10 Zoltan Varga <vargaz@gmail.com>
10338 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
10340 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
10342 * object-internals.h, gc-internal.h, profiler-private.h:
10343 mark internal functions.
10345 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
10347 * reflection.c: put data in the text section.
10348 * icall.c: recognize more types in type_from_typename ().
10349 * process.c, marshal.c: added some GC FIXMEs.
10351 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
10353 * loader.c: check for NULL before initializing.
10355 2006-10-09 Zoltan Varga <vargaz@gmail.com>
10357 * gc.c (finalizer_thread): Use a non-alertable wait here.
10359 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
10360 until the correct solution is found.
10362 2006-10-06 Zoltan Varga <vargaz@gmail.com>
10364 * reflection.c (mono_module_get_object): Avoid an assert when operating on
10365 modules with no metadata. Fixes #79596.
10367 * image.c (load_metadata_ptrs): Put back the error message when
10368 the #- heap is encountered since the support is not complete yet.
10370 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
10372 * gc.c: do not allow the user to SuppressFinalize () a
10373 delegate because it would leak the trampoline if present.
10375 2006-10-06 Zoltan Varga <vargaz@gmail.com>
10377 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
10380 2006-10-05 Zoltan Varga <vargaz@gmail.com>
10382 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
10384 * metadata.c (mono_metadata_get_param_attrs): Ditto.
10386 * row-indexes.h: Add definitions for *Ptr tables.
10388 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
10390 * metadata.c (mono_metadata_translate_token_index): New helper function to
10391 translate table indexes used in uncompressed metadata.
10392 (mono_metadata_decode_table_row): Ditto.
10393 (mono_metadata_decode_table_row_col): Ditto.
10395 * metadata.c: Add table schema for *Ptr tables.
10397 * class.c loader.c: Use the new helper function to access the affected metadata
10400 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
10403 2006-10-04 Zoltan Varga <vargaz@gmail.com>
10405 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
10406 sequences which can be unbounded in size. Fixes #79583.
10408 2006-10-02 Zoltan Varga <vargaz@gmail.com>
10410 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
10411 static initialization.
10413 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
10415 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
10417 * domain.c (mono_domain_free): Free up type_init_exception_hash.
10419 * object.c (mono_runtime_class_init): Implement correct semantics when a static
10420 ctor fails, i.e. throw the same exception on subsequent accesses.
10422 2006-09-0 Jonathan Chambers <joncham@gmail.com>
10424 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
10425 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
10426 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
10427 Handle marshalling of interfaces and VARIANTs contained in structs.
10429 Code is contributed under MIT/X11 license.
10431 2006-09-30 Zoltan Varga <vargaz@gmail.com>
10433 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
10435 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
10438 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10440 * console-io.c: ignore previous SIGINT handler.
10442 2006-09-27 Zoltan Varga <vargaz@gmail.com>
10444 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
10445 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
10446 #79460, #79461, #79485.
10448 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
10450 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
10453 2006-09-26 Zoltan Varga <vargaz@gmail.com>
10455 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
10456 could be generated from it.
10458 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
10460 * rand.c: fix read loop to correctly handle EINTR.
10462 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10464 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
10465 internal calls are defined to keep methods closer to the declaring
10466 type and allow a significant reduction in runtime relocations and
10469 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
10471 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
10472 exception message to have FileNotFoundException use the default
10473 assembly load error message. Fixes bug #79426.
10474 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
10476 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10478 * threadpool.c: (start_thread_or_queue) use the root domain when
10479 creating the thread instead of the async object one.
10481 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
10483 * class.c, object.c, class-internals.h, reflection.c:
10484 for arrays, store element_size inside MonoClass (speedup
10485 for array object creation).
10487 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
10489 * icall.c: fixed CodeBase to use the file name and not the module
10492 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
10494 * mono-debug.c, mono-debug.h: export find_method as
10495 mono_debug_find_method ().
10497 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10499 * debug-helpers.c, class-internals.h: added a few functions useful
10500 when debugging under gdb.
10502 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10504 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
10505 characters that need special handling.
10507 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
10509 * mono-config.c: make the os/cpu specification more flexible,
10510 allowing lists and negation.
10512 2006-09-18 Jonathan Chambers <joncham@gmail.com>
10514 * marshal.c: COM Interop fixes. Handle case where method->klass.
10515 is interface. Handle BSTR/MonoString when null. Use CDECL as
10516 calling convention on non-windows platforms. This is for
10517 compatibility with XPCOM and MainWin COM.
10519 Code is contributed under MIT/X11 license.
10522 2006-09-18 Zoltan Varga <vargaz@gmail.com>
10524 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
10525 correctly. Fixes #79217.
10527 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
10529 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
10531 * mono-config.c: allow both an os and cpu attribute for dllmap
10532 and dllentry elemnets to enable a single config file to be used
10533 for multiple architectures.
10535 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
10537 * loader.c: MonoLoaderError was cleared too soon on load failure.
10540 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
10542 * icall.c: use the defining class vtable when accessing a
10543 static field, not a pobblibly derived class.
10545 2006-09-17 Zoltan Varga <vargaz@gmail.com>
10547 * icall.c string-icalls.c: Remove references to unicode.h.
10549 * unicode.h unicode.c Makefile.am: Remove these unused source files.
10551 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
10553 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
10554 indicating the image where custom marshaller types should be looked up.
10555 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
10556 custom marshallers, instead of corlib. Fixes #79425.
10558 2006-09-14 Zoltan Varga <vargaz@gmail.com>
10560 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
10562 2006-09-14 Jonathan Chambers <joncham@gmail.com>
10564 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
10565 Implement Environment.ProcessorCount.
10567 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
10568 Implement Environment.ProcessorCount.
10571 Add Environment.ProcessorCount icall.
10573 Patch by Jason McFall.
10575 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10577 * assembly.c: don't append .exe/.dll when the filename already contains
10578 one of those extensions.
10580 2006-09-12 Martin Baulig <martin@ximian.com>
10582 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
10583 to array interfaces.
10585 2006-09-11 Martin Baulig <martin@ximian.com>
10587 * reflection.c (mono_image_build_metadata): Create the
10588 MethodImpl's after emitting all types and methods, so we don't
10589 need another fixup pass for them.
10591 2006-09-11 Zoltan Varga <vargaz@gmail.com>
10593 * class.c (mono_class_from_name_case): Fix regression introduced by the last
10596 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
10598 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
10601 2006-09-10 Zoltan Varga <vargaz@gmail.com>
10603 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
10604 args is not set. Fixes #78926.
10606 2006-09-08 Zoltan Varga <vargaz@gmail.com>
10608 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
10610 * image.c (load_class_names): Move this to class.c, and rename it to
10611 'mono_image_init_name_cache'.
10612 (load_modules): Fix a warning.
10614 * class.c icall.c image.c: Initialize image->name_cache lazily.
10616 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
10617 on its name using information in the AOT file.
10619 * class.c (mono_class_from_name): Use the new hook function.
10621 2006-09-06 Zoltan Varga <vargaz@gmail.com>
10623 * reflection.c (mono_param_get_objects): Handle enum default parameter values
10626 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
10629 2006-09-06 Martin Baulig <martin@ximian.com>
10631 * icall.c (mono_lookup_internal_call): Small fix.
10633 2006-09-05 Raja R Harinath <rharinath@novell.com>
10635 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
10638 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
10640 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
10641 when --debug is specified.
10643 2006-09-04 Zoltan Varga <vargaz@gmail.com>
10645 * class.c (setup_generic_array_ifaces): Fix a warning.
10647 2006-09-04 Miguel de Icaza <miguel@novell.com>
10649 * Temporarily remove the patch to assemly.c that checks the
10650 assembly versions as it breaks our gacutil.
10652 2006-09-03 Zoltan Varga <vargaz@gmail.com>
10654 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
10656 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
10659 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
10660 created using the default ctor. Fixes #79152.
10661 (mono_string_builder_to_utf16): Ditto.
10663 2006-09-01 Martin Baulig <martin@ximian.com>
10665 Fix handling of the generic array interfaces.
10667 * class-internals.h
10668 (MonoDefaults): Removed `generic_array_class' and added
10669 `generic_ilist' class.
10672 (mono_bounded_array_class_get): Add the new generic array interfaces.
10673 (setup_generic_array_ifaces): New static method; create vtable
10674 entries for each method in the generic array interfaces.
10677 (select_container): Allow "parent-less" generic methods.
10680 (mono_marshal_get_generic_array_helper): New public method.
10683 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
10684 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
10685 moved the interncall into System.Array.
10687 2006-09-01 Raja R Harinath <rharinath@novell.com>
10689 A few more cases of avoiding work on types with ->byref set.
10690 Has the real fix for #79238
10691 * icall.c (is_generic_parameter): New helper.
10692 (ves_icall_Type_GetGenericParameterPosition): Use it.
10693 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
10694 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
10695 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
10696 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
10698 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
10700 (ves_icall_Type_get_IsGenericInstance): Likewise.
10701 (ves_icall_Type_get_IsGenericType): Likewise.
10703 2006-09-01 Zoltan Varga <vargaz@gmail.com>
10705 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
10708 * mempool.h (mono_mempool_get_allocated): New helper function.
10710 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
10713 * mempool.c: Fix warnings and the calculation of stats.
10715 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
10717 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
10719 * loader.c (mono_get_method_from_token): Update method_count stat.
10721 * class-internals.h (MonoStats): Add some stats.
10723 2006-08-31 Robert Jordan <robertj@gmx.net>
10725 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
10726 with managed variants.
10727 All code is contributed under the MIT/X11 license.
10729 2006-08-31 Zoltan Varga <vargaz@gmail.com>
10731 * reflection.c (reflection_methodbuilder_to_mono_method): Set
10732 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
10734 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
10736 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
10737 with cycles in classes.
10739 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
10741 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
10742 missing a [MarshalAs] directive. Fixes #79203.
10744 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
10745 klass->marshal_info. Fixes #79217.
10747 2006-08-30 Martin Baulig <martin@ximian.com>
10749 Committing a patch from Joachim Ante <joe@otee.dk>:
10750 Add support for binary data symbol stores.
10752 * debug-mono-symfile.c
10753 (mono_debug_open_mono_symbol_file): Renamed into
10754 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
10758 (mono_debug_open_image): Added `raw_contents' and `size' args.
10759 (mono_debug_init_2_memory): New public function.
10761 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
10763 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
10765 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10767 * appdomain.c: implement support for ShadowCopyFiles.
10769 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
10771 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
10772 when value is NULL (and should remove CID #51).
10774 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10776 * image.c: moved 2 functions to ../utils.
10778 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10780 * gc.c: cope with the target object of a GC handle being NULL
10783 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10785 * class.c: recursively check parent's explicit implementations
10786 of interface methods (fixes bug #79125).
10788 2006-08-19 Miguel de Icaza <miguel@novell.com>
10790 * filewatcher.c: Avoid warnings when building, do not redefine
10791 constants that are defined.
10795 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10797 * image.c: don't fail when the link points to an absolute path.
10799 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
10801 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
10804 2006-08-17 Miguel de Icaza <miguel@novell.com>
10806 * image.c (full_path): A new method used to obtain the actual path
10807 of an assembly even in the presence of symbolic links.
10809 This is necessary for the case where we are running a binary that
10810 has been GACed, but we are using the "published" path name
10811 ($prefix/mono/1.0/blah.exe) which happens to point to the real
10814 This was the source of the failure for the `xsp' command with the
10815 recent AppDomain changes, as far as the runtime was concerned,
10816 there were two different assemblies: $prefix/mono/1.0/blah.exe and
10817 $prefix/mono/gac/blah/version/blah.exe.
10819 (do_mono_image_open): use full path
10821 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10823 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
10825 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
10827 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
10828 domain_id is supplied. Fix CID #241 and corlib's unit tests.
10830 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10832 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
10833 small structures. Fixes #78990.
10835 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10837 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
10839 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
10841 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10844 * marshal.c: don't load all the assemblies from a domain into newly
10845 created ones. The new domains might have different rules and load
10846 assemblies from different locations. Fixes bug #76757.
10848 Patch by Lluis. Conflicts resolved by Brian Crowell.
10850 2006-08-16 Alp Toker <alp@atoker.com>
10852 * socket-io.c: First half of the fix for #79084.
10853 Set sa_size to the length of the content, not that of the struct.
10854 Don't add NULL suffix to the content, this should be done in
10855 managed code if needed.
10857 2006-08-14 Raja R Harinath <rharinath@novell.com>
10860 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
10861 mono_metadata_parse_type returns NULL.
10863 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
10865 * normalization-tables.h : new file for string normalization data.
10866 * locales.c, locales.h, icall.c :
10867 added load_normalization_resource() for string normalization,
10869 * Makefile.am : added normalization-tables.h to the sources.
10871 2006-08-13 Zoltan Varga <vargaz@gmail.com>
10873 * marshal.c: Add more helper functions to reduce code duplication and use them
10876 2006-08-12 Zoltan Varga <vargaz@gmail.com>
10878 * marshal.c: Fix non-x86 stdcall warnings.
10880 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
10883 2006-08-11 Jonathan Chambers <joncham@gmail.com>
10885 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
10886 type check on multi-dimensional arrays. Fixes #79000.
10888 2006-08-10 Jonathan Chambers <joncham@gmail.com>
10890 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
10891 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
10892 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
10893 * class-internals.h: add is_com_object to class structure.
10894 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
10895 null checks to COM object marshalling. Fix .ctor call on RCW.
10896 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
10898 All code is contributed under the MIT/X11 license.
10900 2006-08-09 Dick Porter <dick@ximian.com>
10902 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
10903 racing mono_monitor_allocator_lock() somewhere, so don't delete
10904 the critical section for now. Found by running and exiting
10907 2006-08-10 Zoltan Varga <vargaz@gmail.com>
10909 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
10910 (ves_icall_System_ComObject_FindInterface): Ditto.
10911 (ves_icall_System_ComObject_CacheInterface): Ditto.
10913 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
10914 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
10916 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10918 * threadpool.c: treat pipes from process asynchronous reads as sockets
10919 when reading from them, so we get select/poll or epoll to wait for
10922 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
10924 * loader.c: Fix a typo (CID #233) in the null check.
10926 2006-08-07 Zoltan Varga <vargaz@gmail.com>
10928 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
10929 Hopefully fixes #78949.
10931 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
10932 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
10933 bytes. Fixes #78972.
10935 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10937 * filewatcher.c: we need to set errno here.
10939 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10941 * filewatcher.c: let Win32Exception get the error value.
10943 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10945 * filewatcher.c: translate errno into win32 errors for Win32Exception
10946 to know what happened.
10948 2006-08-01 Zoltan Varga <vargaz@gmail.com>
10950 * threadpool.c: Fix more warnings.
10952 * assembly.c (search_loaded): Fix warnings.
10954 * threadpool.c (mono_thread_pool_finish): Fix warnings.
10955 (mono_async_invoke): Ditto.
10957 2006-07-28 Jonathan Chambers <joncham@gmail.com>
10959 * object.c (mono_remote_class_vtable): Need to create proxy vtable
10960 entries for __ComObject type in addition to ComImport types.
10961 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
10964 All code is contributed under the MIT/X11 license.
10966 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
10968 * image.c: avoid tentative loading of modulerefs that contain
10969 no metadata (P/Invoke library names).
10971 2006-07-28 Dick Porter <dick@ximian.com>
10973 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
10974 mono_loader_lock() somewhere, so don't delete the critical section
10975 for now. Found by running and exiting monodevelop.
10977 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10979 * filewatcher.c: define the inotify syscalls when we're building on
10980 linux and have sys/syscall.h. The build system might not have support
10981 for inotify but the target system might have it.
10983 2006-07-26 Miguel de Icaza <miguel@novell.com>
10985 * domain.c: Documentation updates.
10987 * loader.c (mono_free_method): Do not release the method
10988 information if we are being profiled, as profilers will use this
10989 information at shut down to present some data to the user.
10991 This is needed so that the profiler does not crash, as the
10992 profiler tends to keep MonoMethods around, and they might become
10993 invalid if we free these.
10995 (mono_get_method_constrained): Return the original CIL stream
10996 method as well, so verification can be performed against it.
10998 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11000 * filewatcher.[ch]: support for inotify file system watcher.
11001 * icall.c: add new internal calls for the inotify file system watcher.
11003 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11005 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
11008 2006-07-20 Dick Porter <dick@ximian.com>
11010 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
11013 2006-07-20 Dick Porter <dick@ximian.com>
11015 * threads.c (start_wrapper): Do the thread cleanup while we still
11016 hold a reference to its object. Fixes bug 78123.
11018 2006-07-18 Kornél Pál <kornelpal@gmail.com>
11020 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
11021 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
11022 "managed-to-managed".
11023 * icall.c: Redirect string constructors that take sbyte* to
11024 ves_icall_System_String_ctor_RedirectToCreateString.
11025 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
11026 to CreateString () methods with matching signature.
11027 * reflection.c: Use original security informations for
11028 MONO_WRAPPER_MANAGED_TO_MANAGED.
11029 * security-manager.c: Use original security informations for
11030 MONO_WRAPPER_MANAGED_TO_MANAGED.
11031 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
11032 that is a placeholder and only its address should be used.
11033 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
11034 that is a placeholder and only its address should be used.
11036 2006-07-15 Jonathan Chambers <joncham@gmail.com>
11038 Begin implementing COM Interop.
11039 * appdomain.c: Increment corlib version.
11040 * class.c: Set ComImport classes' parent to __ComObject.
11041 * loader.c: Mark cominterop methods as such.
11042 * domain.c: Add __ComObject class to MonoDefaults structure.
11043 * image.c: Add 2 hashtables to the image for COM Interop related methods
11044 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
11045 using the mempool allocator
11047 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
11048 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
11049 declaration for mono_metadata_type_dup_mp.
11051 * debug-helpers.c: Added strings for two additional wrapper types
11052 * object.c: Create proxy objects for ComImport classes
11053 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
11054 and added __ComObject class to MonoDefaults structure.
11056 * object-internals.h: Finish MonoRealProxy definition, and add definition of
11057 MonoComInteropProxy and MonoComObject.
11059 * marshal.c: Added support for COM Interop
11060 (signature_cominterop): Converts managed signature to corresponding
11061 unmanaged COM signature.
11062 (cominterop_get_function_pointer): gets unmanaged function pointer via
11064 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
11065 (cominterop_get_method_interface): returns interface type that method is defined on
11066 (mono_mb_emit_cominterop_call): emits native call to function pointer
11068 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
11069 that matches signature of unmanaged function.
11070 (cominterop_get_native_wrapper): wrapper around adjusted method call.
11071 (cominterop_get_invoke): forwards call from proxy to __ComObject
11072 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
11073 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
11074 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
11076 * marshal.h: Added Marshal icall declarations.
11077 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
11078 so we can access them in finalizer
11080 2006-07-14 Dick Porter <dick@ximian.com>
11082 * object.c (mono_type_initialization_cleanup): Fix a race
11083 condition by temporarily commenting out the critical section
11086 2006-07-14 Zoltan Varga <vargaz@gmail.com>
11088 * reflection.c (create_custom_attr): Fix some warnings.
11089 (create_custom_attr_data): Ditto.
11090 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
11091 types. Fixes #78855.
11093 2006-07-11 Zoltan Varga <vargaz@gmail.com>
11095 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
11097 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
11099 2006-07-08 Zoltan Varga <vargaz@gmail.com>
11101 * reflection.c (resolve_object): Add support for DynamicMethod.
11103 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
11104 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
11106 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
11108 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
11109 don't leak GPtrArray's pdata has we have no use (nor free) for it.
11111 2006-07-01 Zoltan Varga <vargaz@gmail.com>
11113 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
11116 2006-06-30 Raja R Harinath <rharinath@novell.com>
11118 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
11119 slightly: remove a shadow local variable.
11121 2006-06-29 Raja R Harinath <rharinath@novell.com>
11123 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
11124 definition that introduces the virtual function slot.
11125 Also fix Coverity #105.
11127 2006-06-29 Zoltan Varga <vargaz@gmail.com>
11129 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
11130 for dynamic assemblies. Fixes #78724.
11132 2006-06-28 Zoltan Varga <vargaz@gmail.com>
11134 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
11137 2006-06-21 Martin Baulig <martin@ximian.com>
11140 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
11143 2006-06-21 Zoltan Varga <vargaz@gmail.com>
11145 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
11147 2006-06-20 Raja R Harinath <rharinath@novell.com>
11149 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
11151 * class.c (mono_class_create_from_typespec): Add 'context' argument.
11152 Inflate result if necessary.
11153 (mono_class_get_full): Remove old version. Rename from
11154 'mono_class_get' and add 'context' argument. Pass it to
11155 ..._create_from_typespec.
11156 (mono_class_get): New. Simple wrapper to mono_class_get_full.
11157 (mono_ldtoken): Revert change below.
11159 2006-06-20 Martin Baulig <martin@ximian.com>
11161 * class.c (mono_ldtoken): Don't pass the generic context to
11162 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
11164 2006-06-15 Zoltan Varga <vargaz@gmail.com>
11166 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
11167 and later freeing it. Fixes #78638.
11169 2006-06-15 Miguel de Icaza <miguel@novell.com>
11171 * icall.c (mono_class_get_throw): Revert over-zealous error
11172 throwing, the caller for mono_class_get_throw will cope with
11173 errors when classes are not properly initialized already.
11175 The code still copes with loader exceptions though.
11177 Fixes the regression in reftype1 and reftype3 from the CAS tests.
11179 2006-06-14 Miguel de Icaza <miguel@novell.com>
11181 Fixes the `make run1' version of RuntimeAbort (to be commited,
11182 source is in Bugzilla).
11184 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
11185 FALSE on class loading failure instead of returning true.
11187 * class.c (mono_class_create_from_typedef): It is possible for
11188 mono_metadata_interfaces_from_typedef_full to fail if a class is
11189 not found, cope with this.
11192 2006-06-14 Dick Porter <dick@ximian.com>
11195 * process.c: Fix a bunch of signed/unsigned warnings from gcc
11198 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
11200 * culture-info-table.h : oops, forgot to make it nsync with r61548.
11202 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
11204 * icall.c: Another fix for building mono in Visual Studio.
11206 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
11208 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
11210 2006-06-09 Martin Baulig <martin@ximian.com>
11212 * debug-mono-symfile.c: Put this back and really fix it this
11213 time. Sorry for all the trouble.
11215 2006-06-08 Zoltan Varga <vargaz@gmail.com>
11217 * icall.c (mono_class_get_throw): Fix a warning.
11218 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
11219 ReflectionTypeLoadException if needed. Fixes #78606.
11221 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
11222 (mono_class_init): Ditto.
11224 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
11225 ref_only exceptions.
11226 (mono_loader_clear_error): Make this work even if there is no error.
11228 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
11230 * object-internals.h marshal.c marshal.h icall.c: Implement method
11231 Marshal.GetComSlotForMethodInfo using internal call.
11233 2006-06-07 Zoltan Varga <vargaz@gmail.com>
11235 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
11236 a function for signalling it.
11238 * class.c (mono_class_from_typeref): Use the new kind of loader error when
11239 a referenced assembly is not found.
11241 * loader.c (mono_loader_error_prepare_exception): Add support for
11242 LOADER_ERROR_ASSEMBLY. Fix formatting.
11244 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
11246 * domain.c appdomain.c class-internals.h marshal.c: Add support
11247 for VARIANT marshalling on windows and increment corlib version
11248 since Variant struct was added.
11250 2006-06-03 Miguel de Icaza <miguel@novell.com>
11252 * debug-mono-symfile.c: Revert Martin's previous patch which broke
11253 stack trace line information:
11255 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
11256 (Martin) when looking up B which is between A and C, return A not C.
11260 Thanks to Alexander Olk for tracking this down.
11262 2006-06-02 Zoltan Varga <vargaz@gmail.com>
11264 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
11266 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
11267 avoid clobbering its value.
11268 (mono_string_to_lpstr): Fix a warning on windows.
11270 2006-05-31 Zoltan Varga <vargaz@gmail.com>
11272 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
11274 * reflection.c loader.c: Removed references to 'dummy' flag.
11276 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
11278 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
11279 it gets GC tracking.
11281 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
11284 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
11286 * marshal.c threadpool.c: Update callers of mono_async_result_new.
11288 * appdomain.c: Bump corlib version.
11290 2006-05-30 Zoltan Varga <vargaz@gmail.com>
11292 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
11293 CEE_STIND_REF when working with object references.
11295 2006-05-31 Zoltan Varga <vargaz@gmail.com>
11297 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
11300 2006-05-30 Miguel de Icaza <miguel@novell.com>
11302 * loader.c (method_from_memberref): Fix argument value for
11303 mono_loader_set_error_method_load (I was passing the MonoClass
11304 instead of the class name char *).
11306 2006-05-30 Zoltan Varga <vargaz@gmail.com>
11308 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
11309 CEE_STIND_REF when working with object references.
11311 2006-05-30 Martin Baulig <martin@ximian.com>
11313 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
11314 mono_method_full_name() change and replace the ':' with a '.'
11317 2006-05-30 Martin Baulig <martin@ximian.com>
11319 * debug-mono-symfile.c
11320 (mono_debug_symfile_lookup_location): Fix the algorithm:
11321 when looking up B which is between A and C, return A not C.
11323 2006-05-29 Martin Baulig <martin@ximian.com>
11326 (MonoDebugMethodInfo): Make the typedef public.
11327 (MonoDebugSourceLocation): New public struct.
11330 (mono_debug_source_location_from_address): Removed.
11331 (mono_debug_source_location_from_il_offset): Removed.
11332 (mono_debug_il_offset_from_address): Removed.
11333 (mono_debug_address_from_il_offset): Removed.
11334 (mono_debug_lookup_method): New public function.
11335 (mono_debug_lookup_source_location): New public function; replaces
11336 the old mono_debug_source_location_from_*() functions; see the
11337 inline documentation.
11338 (mono_debug_free_source_location): New public function.
11339 (mono_debug_print_stack_frame): New public function; see the
11340 inline documentation.
11342 * debug-mono-symfile.c
11343 (mono_debug_find_source_location): Renamed into
11344 mono_debug_symfile_lookup_location(); only take a
11345 `MonoDebugMethodInfo *' and an `offset' argument; added inline
11347 (mono_debug_find_method): Renamed into
11348 mono_debug_symfile_lookup_method().
11350 2006-05-27 Zoltan Varga <vargaz@gmail.com>
11352 * assembly.c (mono_assembly_open_full): Dont overwrite the status
11353 returned by mono_image_open_full ().
11355 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
11356 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
11359 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
11362 2006-05-27 Miguel de Icaza <miguel@novell.com>
11364 * class.c (mono_class_from_typeref): handle missing images
11365 earlier, deals with bug #78418. Refactor code;
11367 Fix a warning introduced in my previous commit (some stale code
11368 from before I revisited my patch).
11370 * class.c (mono_class_create_from_typedef): On failure, remove the
11371 class from the MonoImage->class_cache as the class is not
11372 initialized; Fixes the leak pointed out by Paolo.
11374 2006-05-25 Dick Porter <dick@ximian.com>
11376 * threads.c (mono_thread_cleanup): Build fix. Comment out the
11377 DeleteCriticalSections until I figure out which one may still be
11378 sometimes locked when mono_thread_cleanup is called.
11380 2006-05-24 Dick Porter <dick@ximian.com>
11382 * threads.c (mono_thread_cleanup): Move the threading cleanup out
11383 of mono_thread_manage and back into its own function, so it can be
11384 called after the finalizer thread has finished.
11386 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
11388 2006-05-24 Zoltan Varga <vargaz@gmail.com>
11390 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
11393 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
11394 with non-blittable elements.
11395 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
11397 2006-05-24 Martin Baulig <martin@ximian.com>
11399 * mono-debug-debugger.h (MonoDebuggerEvent): Added
11400 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
11402 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
11403 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
11404 `mono_debugger_event_handler' to NULL.
11406 2006-05-24 Martin Baulig <martin@ximian.com>
11408 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
11410 2006-05-24 Martin Baulig <martin@ximian.com>
11412 * mono-debug-debugger.h
11413 (mono_debugger_create_notification_function): Added
11414 `MonoCodeManager *' argument.
11416 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
11418 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
11420 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
11422 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
11423 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
11426 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
11428 * icall.c: precise GC support: objects can't be stored in unmanaged
11429 memory anymore, even if they are kept alive by other references: since
11430 they can move the GC needs to be able to always find them.
11432 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11434 * object.c: precise GC support for static fields. Support
11435 for moving GCs: write barriers and pinned allocation for interned
11438 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
11440 * domain.c, domain-internals.h: precise GC support for the MonoDomain
11443 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11445 * class.c, gc.c: sgen and precise GC updates.
11447 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
11449 * marshal.h, marshal.c: added write barrier wrapper and precise type
11452 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
11454 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
11457 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
11459 * reflection.c: precise and sgen GC updates.
11461 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
11463 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
11465 2006-05-22 Zoltan Varga <vargaz@gmail.com>
11467 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
11469 2006-05-20 Zoltan Varga <vargaz@gmail.com>
11471 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
11472 MONO_TYPE_OBJECT. Fixes #78462.
11474 2006-05-18 Zoltan Varga <vargaz@gmail.com>
11476 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
11477 and blittable types.
11479 2006-05-17 Miguel de Icaza <miguel@novell.com>
11481 * class.c (mono_class_get_exception_for_failure): Implement parts
11482 of a TODO: if the loader error is set (instead of the class
11483 error), we return a Loader exception that can be properly thrown
11486 This was exposed by some Winforms 2.0 code that I tried to run
11487 (Atsushi pointed me to it).
11489 2006-05-17 Zoltan Varga <vargaz@gmail.com>
11491 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
11492 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
11494 * marshal.c (emit_marshal_vtype): Add limited support for
11495 UnmanagedType.LPStruct. Fixes #78427.
11497 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
11498 Applied a patch from kangaroo to fix #77523.
11500 2006-05-17 Martin Baulig <martin@ximian.com>
11503 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
11504 (debugger_thread_created): Removed.
11505 (debugger_thread_exited): Removed.
11507 2006-05-15 Zoltan Varga <vargaz@gmail.com>
11509 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11511 * object-internals.h (MonoReflectionResource): Sync with managed version.
11513 2006-05-12 Wade Berrier <wberrier@novell.com>
11515 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
11517 2006-05-12 Zoltan Varga <vargaz@gmail.com>
11519 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
11520 functions try to allocate from the image mempool.
11522 2006-05-12 Dick Porter <dick@ximian.com>
11524 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
11526 2006-05-12 Lluis Sanchez <lluis@ximian.com>
11528 * object.c: The FieldGetter and FieldSetter methods require the full
11529 name of the class, not only the name. Fixes bug #78277.
11531 2006-05-11 Miguel de Icaza <miguel@novell.com>
11533 * loader.c (method_from_memberref): Do not pass the NULL klass to
11534 mono_loader_set_error_() methods. Pass the non-NULL value
11537 2006-05-11 Zoltan Varga <vargaz@gmail.com>
11539 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
11540 (mono_assembly_close): Null out assembly->image->references after freeing it.
11542 * image.c (mono_image_close): Free image->references.
11544 * reflection.c (mono_image_basic_init): Fix a small memory leak.
11546 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
11548 * marshal.c: In function mono_mb_add_local don't use the mb pointer
11549 before checking if it's NULL (g_assert).
11551 2006-05-10 Martin Baulig <martin@ximian.com>
11553 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
11554 I thought I already killed that two months ago, but now it somehow reappeared.
11556 2006-05-10 Martin Baulig <martin@ximian.com>
11558 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
11560 2006-05-10 Zoltan Varga <vargaz@gmail.com>
11562 * reflection.c: Allocate memory for dynamically created methods in the image
11565 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
11567 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
11568 don't use the ad pointer before checking if it's NULL (g_assert).
11570 2006-05-09 Zoltan Varga <vargaz@gmail.com>
11572 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
11573 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
11575 * marshal.c: Allocate all signatures from mempools.
11577 * marshal.c: Allocate some more signatures from mempools.
11579 2006-05-09 Miguel de Icaza <miguel@novell.com>
11581 * object.c (mono_load_remote_field): The code used to provide a
11582 temporary variable for returning results if the user did not
11583 provide a result pointer. But our temporary variable was allocted
11586 Fix calling code to always pass a result area. Coverity ID 103.
11588 2006-05-06 Zoltan Varga <vargaz@gmail.com>
11590 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
11591 value, not the old. Fixes #78312.
11592 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
11594 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
11595 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
11598 * assembly.c (mono_assembly_close): Free image->references.
11600 * assembly.c (mono_assembly_names_equal): Fix a warning.
11601 (mono_assemblies_cleanup): Cleanup more global data.
11603 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
11605 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
11606 ptr_cache and image->modules.
11608 * image.c (mono_image_init): Allocate array_cache lazily.
11610 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11612 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
11613 behavior was changed recently and has bad side effects.
11615 2006-05-05 Zoltan Varga <vargaz@gmail.com>
11617 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
11619 * assembly.c (mono_assembly_close): Remove a debug printf.
11621 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
11623 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
11624 to also allow for temporary references between mono_image_open ()/close ().
11626 * domain.c (get_runtimes_from_exe): Add a FIXME.
11628 2006-05-04 Zoltan Varga <vargaz@gmail.com>
11630 * marshal.c: Fix support for dynamic methods.
11632 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
11634 * marshal.c (mono_marshal_cleanup): New cleanup function.
11636 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
11639 * class.c (mono_class_init): Fix leaking class->nested_classes.
11641 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
11643 * image.c (mono_image_init): Initialize the new cashes.
11645 * image.c (mono_image_close): Destroy the new cashes.
11647 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
11649 * mempool.c (mono_mempool_strdup): New helper function.
11651 * class-internals.h: Add prototype for mono_loader_unlock ().
11653 * domain.c (mono_jit_info_table_find): Fix a warning.
11654 (mono_debugger_check_runtime_version): Ditto.
11656 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
11657 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
11658 functions to these modules.
11660 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
11663 * marshal.c (mono_free_bstr): Fix a warning.
11665 * assembly.c (mono_assembly_open_full): Fix another small leak.
11667 * object.c: Fix some unload leaks in the remoting code.
11669 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
11672 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
11674 * reflection.c: Fix some unload leaks in dynamic assemblies.
11676 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
11678 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
11679 * marshal.h: Add BSTR support on Win32
11680 * icall.c: Add BSTR icalls
11681 * metadata.h: Add BSTR enums
11683 2006-04-28 Miguel de Icaza <miguel@novell.com>
11685 Work to catch the crash from #76795 and turn it into an
11686 exception. As I stubbed out pieces of the VisualBasic support,
11687 I found a number of places where the code was failing and I added
11688 checks to those places.
11690 * metadata.c (do_mono_metadata_parse_generic_class): Make this
11691 function return a status code. If we fail to parse the signature
11692 from mono_metadata_parse_generic_inst, return FALSE.
11694 * loader.c (mono_get_method_from_token): If we fail to load the
11695 method (mono_class_get) return NULL.
11697 * (method_from_memberref): Return NULL if we are unable to parse
11698 the method signature
11700 (mono_loader_error_prepare_exception): Since we now use the
11701 loader_error flag internally to stop processing, and obtaining
11702 exceptions that might be thrown will walk this code path the
11703 proper way of going from a MonoLoaderError into a
11704 MonoException was convoluted. This new routine encapsulates the
11705 process of turning the error into an exception and *clearing* the
11708 2006-04-27 Miguel de Icaza <miguel@novell.com>
11710 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
11711 with missing assemblies), and to cope with:
11713 * Missing fieldref from a non-existing assembly.
11714 * Missing methodref from a non-existing assembly.
11716 The first batch of work to address *some* of the issues from 76661.
11718 * object.c (mono_class_create_runtime_vtable): If we fail to
11719 initialize the class raise the exception here.
11721 * metadata.c (mono_class_get_overrides_full): If any methods fail
11722 to load return the failure to the caller.
11724 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
11725 flagging assemblies that failed to load.
11727 Do not crash if we are unable to load the assembly.
11729 (mono_assembly_close): Do nothing with REFERENCE_MISSING
11732 * loader.c (mono_loader_set_error_type_load): Change the
11733 convention to always pass unallocated strings, so we make our own
11734 copies (I know our own code had duplicated strings before, but
11735 this keeps the normal conventions).
11736 (method_from_memberref): Call mono_loader_set_error_method_load
11737 for all possible failures of loading the class.
11738 Remove assert, turn into a loader error.
11740 (mono_loader_error_to_exception): Move this routine from mini
11741 (mini_loader_error_to_exception) there was no need to have that in
11744 * class.c (mono_class_from_typeref): If we were not able to load
11745 the assembly with mono_assembly_load_reference, call the
11746 mono_loader_set_error_type_load to register the problem.
11748 (mono_class_setup_fields): If we fail to load the type from
11749 mono_metadata_parse_type_full, call mono_class_set_failure and
11750 break from the loop.
11752 If class->exception_type is set, we do not layout the fields as
11753 that might crash the runtime, and instead return (from breaking
11754 from the previous loop).
11756 (mono_class_setup_vtable): This now returns a boolean indicating
11757 whether the table was properly setup. The decision is driven by
11758 mono_class_get_overrides_full which might run into non-existing
11761 (mono_class_init): Returns TRUE on success or FALSE if there was a
11762 problem in loading the type (incorrect assemblies, missing
11763 assemblies, methods, etc).
11765 When we call mono_class_setup_fields we also check for a potential
11766 error inside this call (either a class exception or a general
11769 (mono_class_create_from_typedef): If the parent fails to load
11770 (calling mono_class_get_full) return NULL.
11774 calls to mono_metadata_parse_type_full should be checked
11775 everywhere and set the mono_class_set_failure
11776 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
11778 The current patch checks the places where my manually constructed
11779 tests show the errors are showing up, but we should do it
11784 mono_class_init return values should be tested everywhere, like
11785 the previous case this is something that we should audit
11786 everywhere and not only on the cases exposed by the tests I
11789 2006-04-26 Miguel de Icaza <miguel@novell.com>
11791 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
11792 boolean parameter and instead pass the information on `options'
11793 parameter (FileOptions).
11795 * icall.c: Register the new signature for MonoIO.Open.
11797 * debug-helpers.c (dis_one): Trying to understand how coverity
11798 works. Fix Run 5, item 78.
11800 2006-04-26 Dick Porter <dick@ximian.com>
11802 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
11805 2006-04-25 Martin Baulig <martin@ximian.com>
11807 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
11809 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
11810 debugger_thread_created().
11811 (debugger_gc_push_all_stacks): Don't handle the main thread in any
11813 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
11814 (mono_debugger_finalize_threads): New function; undo the effects
11815 of mono_debugger_init_threads().
11816 (mono_debugger_create_all_threads): Removed.
11818 2006-04-24 Zoltan Varga <vargaz@gmail.com>
11820 * image.c (mono_image_close): Tidy up trace messages.
11822 * assembly.c (mono_assembly_close): Ditto.
11824 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
11825 no longer references an already freed assembly. Fixes #78168.
11827 2006-04-21 Dick Porter <dick@ximian.com>
11829 * threads.c (mono_thread_detach): Fix reference counting when
11832 2006-04-21 Zoltan Varga <vargaz@gmail.com>
11834 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
11837 2006-04-19 Zoltan Varga <vargaz@gmail.com>
11839 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
11840 (mono_type_to_stind): Ditto.
11842 * marshal.c: Use the new helper functions to simplify code.
11844 * image.c (mono_image_close): Add some code for help debug assembly unloading
11847 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
11850 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
11851 assembly was already loaded in another appdomain. Fixes #78083.
11853 2006-04-13 Zoltan Varga <vargaz@gmail.com>
11855 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
11856 referenced assemblies.
11857 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
11859 * domain.c (mono_domain_free): Add a trace message.
11861 * appdomain.c (add_assemblies_to_domain): Ditto.
11863 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
11866 2006-04-12 Zoltan Varga <vargaz@gmail.com>
11868 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
11870 2006-04-12 Martin Baulig <martin@ximian.com>
11872 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
11873 `USE_INCLUDED_LIBGC'.
11875 2006-04-12 Zoltan Varga <vargaz@gmail.com>
11877 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
11878 the patch contains ../ and a small directory name later. Hopefully fixes
11881 2006-04-10 Martin Baulig <martin@ximian.com>
11883 Clean up the debugger's thread-handling code.
11885 The debugger's thread-handling code has been moved from
11886 ../mini/debug-debugger.c to threads.c. We now iterate directly
11887 over the `threads' hash, keep track of exiting threads and also
11888 use proper locking.
11890 We can now debug XSP and XSP based applications with the debugger.
11892 * object-internals.h (MonoThread): Added `gpointer end_stack'.
11895 (MonoThreadCallbacks): Removed; this was only used by the debugger.
11896 (mono_install_thread_callbacks): Likewise.
11898 * threads.c (mono_thread_callbacks): Removed.
11899 (debugger_thread_created, debugger_thread_exited): New static functions.
11900 (start_wrapper): Call debugger_thread_created().
11901 (thread_cleanup): Call debugger_thread_exited().
11902 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
11903 (mono_debugger_init_threads): New public function.
11904 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
11905 iterate directly over the `threads' hash and also use proper locking.
11907 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
11909 * mono-debug-debugger.h
11910 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
11912 2006-04-10 Zoltan Varga <vargaz@gmail.com>
11914 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
11915 argument type=array. Fixes #78057.
11917 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
11919 * culture-info-table.h : regenerated. Fixed bug #69652.
11921 2006-04-07 Zoltan Varga <vargaz@gmail.com>
11923 * loader.c metadata.c: Reapply a variant r59116.
11925 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
11927 * class.c (mono_class_setup_interface_offsets): New internal function.
11929 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
11930 interfaces too. Fixes #77398.
11932 * reflection.c (encode_cattr_value): Add support for
11933 parameter type=object, argument type=array.
11934 (load_cattr_value): Ditto. Fixes #77916.
11936 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
11937 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
11939 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
11940 a byval char array and CharSet is Ansi.
11942 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
11944 2006-04-06 Zoltan Varga <vargaz@gmail.com>
11946 * metadata.c: Add some locking comments.
11948 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
11950 (mono_metadata_free_method_signature): Don't free the signature itself.
11952 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
11954 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
11955 reference the same MonoImage.
11956 (mono_assembly_load_from_full): Add an assert.
11958 2006-04-05 Zoltan Varga <vargaz@gmail.com>
11960 * image.c (mono_image_close): Don't put the image we are about to free into the
11961 loaded_images_guid_hash.
11963 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
11964 to reduce code duplication.
11966 * marshal.c: Register the native functions called by this module as icalls, to
11967 somewhat centralize the creation of MonoMethodSignature's.
11969 * loader.c (mono_method_signature): Add a cache for method signatures.
11971 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
11972 the parameter attributes of a method.
11973 (mono_metadata_parse_method_signature_full): Refactored the computation of
11974 parameter attributes into a separate function. Also avoid one allocation in
11977 * assembly.c (mono_assembly_close): Ditto.
11979 * image.c (mono_image_close): Log trace messages with INFO level.
11981 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
11983 * image.c reflection.c: Correct reference counting of image modules.
11985 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
11986 of this function from the image mempool.
11988 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
11989 to allow more cached types to be used.
11991 * mono-debug.c (mono_debug_add_method): Appled patch from
11992 David S. Miller <davem@sunset.davemloft.net>: Access
11993 minfo->lexical_blocks[] entry elements using read32().
11995 2006-04-04 Zoltan Varga <vargaz@gmail.com>
11997 * loader.c (mono_free_method): No longer free the method header for non-dynamic
11998 methods as it is allocated from the mempool.
12000 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
12003 * metadata-internals.h: Add comments describing the reference counting scheme
12004 used for MonoImage and MonoAssembly.
12006 * image.c assembly.c reflection.c: Rework reference counting of images and
12007 assemblies so they are freed when the runtime is shut down. Free some
12008 additional memory structures when an image is unloaded.
12010 2006-04-03 Zoltan Varga <vargaz@gmail.com>
12012 * class.c loader.c reflection.c: Allocate more data structures in
12015 2006-03-31 Miguel de Icaza <miguel@novell.com>
12018 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
12019 build on pre glib 2.4 systems.
12021 2006-03-31 Zoltan Varga <vargaz@gmail.com>
12023 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
12025 * icall.c: Fix some warnings.
12027 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
12029 * culture-info-table.h : regenerated.
12031 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
12033 * threads.c, object-internals.h, verify.c: changed the culture caching
12034 code to use a normal MonoArray for storage so the GC can keep track of
12035 them easily. Fixed bits of the cache logic, too and simplified the
12038 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
12040 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
12041 thread for non-Boehm GCs.
12043 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
12045 * domain.c, object.c, domain-internals.h: reduce the amount of memory
12046 needed to keep track of the data for static fields.
12048 2006-03-29 Raja R Harinath <rharinath@novell.com>
12051 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
12052 for interface classes. Use 'num_methods' instead.
12053 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
12054 before using '->vtable_size' field.
12056 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
12058 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
12059 doesn't contain managed pointers, so use a normal hashtable.
12061 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
12063 * reflection.c, class-internals.h, domain.c: fixed handling of types
12064 used as values for objects in custom attributes (bug #77915):
12066 2006-03-24 Martin Baulig <martin@ximian.com>
12068 * class.c (mono_class_setup_fields): Added support for generic
12069 instances; fixes #77580.
12071 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12073 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
12075 2006-03-24 Dick Porter <dick@ximian.com>
12077 * file-io.c (get_file_attributes): More stat macro breakage.
12080 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
12082 * profiler.c: added the file=filename option in the default profiler
12083 to output the profile data to filename.
12085 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12087 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
12090 2006-03-22 Martin Baulig <martin@ximian.com>
12092 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
12093 allocated `MonoClassField *' in `fb->handle'.
12095 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12097 * class.c, image.c, metadata-internals.h: implemented new mechanism to
12098 allocate interface ID to save memory and allow better ID reuse on
12099 appdomain unload. setup_generic_vtable () removal from Martin.
12101 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
12103 * object.h, appdomain.c, domain.c, exception.c, icall.c,
12104 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
12105 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
12106 write barriers for reference stores with managed objects accessed with
12107 C structures in the runtime and in embedding programs.
12109 2006-03-20 Raja R Harinath <rharinath@novell.com>
12111 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
12112 'interface_id' and 'max_interface_id' fields of MonoClasses
12113 representing open generic types.
12115 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
12117 * object.h, object.c, icall.c: added functions to deal with
12118 storing valuetypes that contain references in managed objects.
12119 * reflection.c, string-icalls.c, threads.c, marshal.c: small
12120 fixes and comments around uses of mono_array_addr ().
12122 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
12124 * object.h, icall.c, monitor.c: object.GetHashCode ()
12125 implementation that supports the moving garbage collector.
12127 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12129 * icall.c, threads-types.h, threads.c: implemented finalizer for
12130 LocalDataStoreSlot.
12132 2006-03-15 Zoltan Varga <vargaz@gmail.com>
12134 * metadata.c (mono_type_size): Add a fixme.
12135 (mono_type_stack_size): Ditto.
12137 * object-internals.h (MonoReflectionAssemblyBuilder): Added
12138 'type_forwarders' field.
12140 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
12141 attribute from net 2.0.
12143 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
12146 * class.c (mono_class_setup_fields): Fix a warning.
12148 * class.c (mono_class_from_name): Add support for assemblyref entries
12149 in the EXPORTEDTYPE table.
12151 * reflection.c: Add support for handling type forwarders under net 2.0.
12153 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12155 2006-03-14 Zoltan Varga <vargaz@gmail.com>
12157 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
12158 overwriting entries in ModuleBuild->types, also clean up the code
12159 a little. Fixes #77774.
12161 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12163 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
12164 load friend assembly info when present.
12166 2006-03-14 Raja R Harinath <rharinath@novell.com>
12168 Fix crasher on gtest-158.cs.
12169 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
12170 the return value if the MonoClass we want is yet in an
12171 inconsistent state.
12172 * class.c (mono_class_create_from_typedef): Add an comment
12173 explaining an order dependency between mono_class_setup_parent and
12174 mono_class_setup_mono_type.
12176 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
12178 * class.c: documentation updates and events bug fix.
12180 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
12182 * class.c: some cleanup, locking fixes.
12184 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12186 * class.c: fix the generics code to setup nested
12187 type info to the instantiated type (bug #77770).
12189 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
12191 * marshal.c: fixed a few type correctness issues.
12193 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12195 * loader.c: the Set/Get/Addrtess array methods should be public.
12197 2006-03-11 Zoltan Varga <vargaz@gmail.com>
12199 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
12201 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
12204 2006-03-10 Zoltan Varga <vargaz@gmail.com>
12206 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
12208 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
12210 * mempool.c (mono_mempool_alloc): Speed this up a bit.
12211 (mono_mempool_alloc0): Ditto.
12213 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12216 (create_object_from_sockaddr): it was allocating 4 extra bytes
12217 for the AF_UNIX data. Fixes bug #77747.
12219 2006-03-09 Zoltan Varga <vargaz@gmail.com>
12221 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
12223 2006-03-09 Dick Porter <dick@ximian.com>
12225 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
12226 Fixes bug 76966 again.
12228 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
12230 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
12232 * appdomain.c: Bumped corlib version to 48 (due to r57532)
12234 2006-03-07 Martin Baulig <martin@ximian.com>
12237 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
12239 2006-03-07 Martin Baulig <martin@ximian.com>
12242 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
12243 regression introduced in r56970; see gtest-252.cs.
12245 * loader.c (mono_get_method_constrained): Correctly handle generic
12246 methods; see gtest-253.cs.
12248 2006-03-04 Zoltan Varga <vargaz@gmail.com>
12250 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
12252 2006-03-04 Martin Baulig <martin@ximian.com>
12254 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
12255 compute the parent type at runtime, just like we're already doing
12259 (mono_reflection_bind_generic_parameters): Don't compute the
12260 parent type anymore.
12262 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
12264 2006-03-04 Martin Baulig <martin@ximian.com>
12266 * mono-debug-debugger.h
12267 (mono_debugger_create_notification_function): Allocate memory at
12268 runtime and return a pointer to it.
12270 2006-03-03 Zoltan Varga <vargaz@gmail.com>
12272 * assembly.c: Fix windows build.
12274 * assembly.c: Fix build.
12276 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
12278 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
12280 2006-03-03 Dick Porter <dick@ximian.com>
12283 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
12284 Check parameters before dereferencing them. Fixes Aaron's part of
12287 2006-03-03 Raja R Harinath <rharinath@novell.com>
12289 Fix performance regression.
12290 * loader.c (find_method_in_class): Add 'from_class' argument.
12291 Rename 'klass' argument to 'in_class'. The signature is compared
12292 against the method in 'in_class', and the corresponding method is
12293 returned from 'from_class'.
12294 (find_method): Walk both 'in_class' and 'from_class' in parallel.
12295 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
12296 type definition and generic instantiation in parallel.
12297 (mono_get_method_constrained): Update to changes.
12299 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12301 * threads.c: make sure the domain is correct, too when doing
12302 mono_thread_attach ().
12304 2006-03-01 Zoltan Varga <vargaz@gmail.com>
12306 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
12307 windows. Fixes #77683.
12309 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12311 * object.h, *: introduced specific way to set elements of an array
12312 of references to be used as write barrier. Still need to audit the
12313 uses of mono_array_addr.
12315 2006-03-01 Miguel de Icaza <miguel@novell.com>
12317 * object-internals.h: New field to cache the assmebly name, patch
12318 from Tambet Ingo (tambet@ximian.com)
12320 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
12322 * decimal.h, class-internals.h, metadata-internals.h,
12323 file-io.h: mark a few function declarations as internal, to
12324 reduce the number of PLT entries.
12326 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12328 * file-io.c: fix typo in warning message.
12330 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
12332 * loader.c: on unix, lookup the "*A" version of a function
12333 if charset is auto as a second option before failing.
12335 2006-02-28 Raja R Harinath <rharinath@novell.com>
12337 * class.h (mono_class_inflate_generic_method): Revert to two
12339 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
12340 (mono_class_inflate_generic_method_full): Add.
12341 * class.c (mono_class_inflate_generic_method_full): Rename from
12342 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
12343 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
12344 * loader.c, reflection.c: Update to changes.
12346 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
12348 * icall.c: const fixes and small improvements.
12350 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12352 * threadpool.c: for asynchronous connect(), enable the same workaround
12353 for BSD 6 as for the Mac. Fixes bug #77637.
12355 2006-02-24 Zoltan Varga <vargaz@gmail.com>
12357 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
12358 formatted classes. Fixes #77524.
12360 2006-02-24 Raja R Harinath <rharinath@novell.com>
12362 * class.c (inflate_generic_type): Add a couple more
12363 micro-optimizations.
12364 (inflate_generic_context): Don't use the 'gmethod' from
12366 (mono_class_inflate_generic_method): If the method has generic
12367 parameters, but the passed-in context doesn't have a 'gmethod',
12368 create one. Use the possibly simplified generic instantiation
12369 from the declaring class instead of the one passed in.
12371 2006-02-24 Raja R Harinath <harinath@gmail.com>
12373 Make generic method signature and method header handling lazy.
12374 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
12375 (inflate_generic_header): Likewise.
12376 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
12377 parameter to avoid inflating types.
12378 (mono_get_inflated_method): Empty out.
12379 * class.h (mono_class_inflate_generic_method): Update to changes.
12380 * loader.c (mono_get_method_from_token): Don't parse signature for
12381 generic methods, nor methods of generic classes.
12382 (mono_method_signature): Rename from 'mono_method_signature'.
12383 Inflate signature on demand.
12384 (mono_method_get_header): Inflate method header on demand.
12385 * reflection.c: Update to changes.
12387 2006-02-23 Raja R Harinath <rharinath@novell.com>
12389 * metadata.c (mono_metadata_inflate_generic_inst): If the
12390 instantiation is closed, don't bother expanding it in the new
12392 * class.c (inflate_generic_class): If the generic instantiation
12393 doesn't change after inflation, return the argument itself.
12394 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
12396 (inflate_generic_context): If neither the generic class nor the
12397 generic method instantiations change, return the original context.
12398 * reflection.c (mono_method_get_object): Do
12399 'mono_get_inflated_method' before accessing the ->klass field.
12400 (inflate_mono_method): Don't create a MonoGenericMethod unless
12402 (inflate_method): Don't pass a constructed type as the declaring
12403 type of a methodbuilder.
12405 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
12407 * object.c: fix memory overwrite.
12409 2006-02-22 Dick Porter <dick@ximian.com>
12411 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
12412 it doesn't work any more.
12413 (mono_threads_request_thread_dump): Fix unused variable warnings.
12415 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12417 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
12418 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
12419 the public header file.
12421 2006-02-21 Zoltan Varga <vargaz@gmail.com>
12423 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
12425 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12427 * class-internals.h, object.c: reduce the size of MonoVTable
12428 and store the interface_offsets array at negative offsets.
12430 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
12432 * metadata.c: tweak table descriptors data structures to reduce
12433 size and runtime relocations.
12435 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12437 * marshal.c: fix some types and opcodes to be type-safe
12438 in marshaling wrappers.
12440 2006-02-21 Ankit Jain <jankit@novell.com>
12442 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
12444 2006-02-21 Raja R Harinath <rharinath@novell.com>
12446 * metadata.c (get_constraints): Relax debugging checks for monodis.
12448 2006-02-21 Ankit Jain <jankit@novell.com>
12450 * metadata.c (mono_metadata_load_generic_params): Move the code
12451 checking for ambiguous generic params from here to mono/dis/get.c
12452 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
12454 2006-02-21 Raja R Harinath <harinath@gmail.com>
12456 Fix assertion triggered when compiling nemerle.
12457 * class.c (mono_get_shared_generic_inst): Rename from
12458 get_shared_inst and make non-static.
12459 * loader.c (mono_get_shared_generic_method): New. Used to create
12460 the MonoGenericContext-equivalent of a MonoGenericContainer.
12461 (mono_get_method_from_token): Initialize the 'context' field of
12462 the created MonoGenericContainer.
12463 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
12464 * metadata.c (get_constraints): Add sanity check.
12465 * class-internals.h: Add new internal methods.
12467 * reflection.c (verify_safe_for_managed_space): New sanity check.
12468 Currently checks that owner-less generic parameters aren't allowed
12470 (mono_type_get_object): Use it.
12471 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
12472 that are now in mono_type_get_object.
12473 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
12475 2006-02-19 Raja R Harinath <harinath@gmail.com>
12477 * metadata.c (mono_type_create_from_typespec): Rename from
12478 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
12479 argument and caching of types in the generic container.
12480 (unwrap_arrays, find_generic_param): Remove.
12481 * metadata-internals.h: Update.
12482 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
12484 2006-02-18 Zoltan Varga <vargaz@gmail.com>
12486 * class.c (mono_class_get_exception_for_failure): Fix a warning.
12488 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
12489 return values. Fixes #77581.
12491 * class.c (mono_fnptr_class_get): Switch name and name_space.
12493 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
12494 classes and add support for [In, Out] attributes.
12495 (mono_marshal_free_asany): Ditto. Fixes #77524.
12497 2006-02-18 Raja R Harinath <harinath@gmail.com>
12499 * class.c (mono_class_from_generic_parameter): Make more robust to
12500 incomplete MonoGenericContainers from monodis.
12502 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
12504 * class-internals.h: added some more exception types.
12505 * class.c, metadata.c: added a few checks to handle missing
12508 2006-02-17 Raja R Harinath <rharinath@novell.com>
12510 Use owner-less generic-params some more.
12511 * class.c (my_mono_class_from_generic_parameter): Remove.
12512 (mono_class_from_generic_parameter): Handle null image,
12513 param->name and param->owner.
12514 (mono_class_from_mono_type): Update.
12515 (mono_class_create_from_typespec): Remove 'container' parameter.
12516 If that parameter is non-null, the result is always inflated by
12517 'mono_class_get_full' anyway.
12518 (mono_class_get): Rename from _mono_class_get. Remove 'container'
12520 (mono_class_get_full): Update.
12522 * class.c (inflate_generic_type) [GENERICINST]: If the generic
12523 instance is not open, don't bother inflating.
12524 (mono_class_setup_fields): Hoist some loop-invariants. Don't
12525 parse metadata for inflated classes.
12526 (_mono_class_get): Change GenericContext* parameter to
12528 (mono_class_create_from_typespec): Likewise. Simplify, and
12529 implement trivially. All the cases are handled in
12530 mono_class_from_mono_type. Don't inflate returned class.
12531 (mono_class_get_full): Delegate GENERICINST optimization to
12532 inflate_generic_type.
12533 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
12535 2006-02-16 Dick Porter <dick@ximian.com>
12537 * socket-io.c (create_object_from_sockaddr): Fix typo.
12538 (create_sockaddr_from_object): Check array lengths before
12539 potentially accessing items off the end.
12540 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
12541 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
12542 (ves_icall_System_Net_Sockets_Socket_Send_internal)
12543 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
12544 length checks to avoid wraparound overflows.
12545 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
12546 contents of the array of sockets
12547 (hostent_to_IPHostEntry2)
12548 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
12549 Check return value of inet_ntop ().
12550 (addrinfo_to_IPHostEntry): Fix typo
12552 2006-02-16 Raja R Harinath <rharinath@novell.com>
12554 Type metadata parsing doesn't use generic-instantiation information.
12555 * metadata.c (mono_metadata_parse_array_full): Change
12556 MonoGenericContext* parameter to MonoGenericContainer*.
12557 (mono_metadata_parse_type_full): Likewise.
12558 (mono_type_create_from_typespec_full): Likewise.
12559 (mono_metadata_parse_mh_full): Likewise.
12560 (mono_metadata_parse_generic_inst): Likewise.
12561 (do_mono_metadata_parse_generic_class): Likewise.
12562 (do_mono_metadata_parse_type): Likewise.
12563 * metadata-internals.h: Update to changes.
12564 * class.c (mono_class_find_enum_basetype): Likewise.
12565 (mono_class_setup_fields): Likewise.
12566 (mono_class_create_from_typespec): Likewise.
12567 * loader.c (method_from_methodspec): Likewise.
12568 (mono_get_method_from_token): Likewise.
12569 (mono_method_get_header): Likewise.
12571 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12573 * marshal.c: handle additional GENERICINST case (patch from
12574 Thong Nguyen <tum@veridicus.com>).
12575 Fix a few cases where LDIND_I/STIND_I was used for references.
12577 2006-02-16 Raja R Harinath <rharinath@novell.com>
12579 * reflection.c (mono_reflection_get_token): Remove unused variable.
12581 2006-02-16 Martin Baulig <martin@ximian.com>
12583 * reflection.c (mono_reflection_get_token): Add support for fields
12584 in instantiated generic types.
12587 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
12589 2006-02-15 Martin Baulig <martin@ximian.com>
12592 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
12593 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
12594 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
12595 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
12597 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
12599 * class.c, metadata.c, metadata.h, object.c, icall.c,
12600 marshal.c: changed mono_type_get_underlying_type () to do
12601 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
12602 Fixed handling of instantiated generic valuetypes (bug #75479).
12604 2006-02-15 Raja R Harinath <rharinath@novell.com>
12606 * metadata.c (mono_metadata_decode_signed_value): Simplify.
12607 Delegate to mono_metadata_decode_value, and work on the returned value.
12609 * icall.c (ves_icall_MonoType_GetGenericArguments):
12610 Add consistency check here too.
12612 2006-02-15 Ankit Jain <jankit@novell.com>
12614 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
12617 2006-02-15 Ankit Jain <jankit@novell.com>
12619 * metadata.c (mono_metadata_decode_signed_value): New function to decode
12620 signed values, used only for representing lower bounds of arrays.
12621 (mono_metadata_parse_array_full): Use new
12622 mono_metadata_decode_signed_value to decode lower bounds.
12624 2006-02-14 Martin Baulig <martin@ximian.com>
12627 (mono_reflection_get_token): Support "MonoGenericMethod" and
12628 "MonoGenericCMethod" and allow generic instances / methods.
12630 2006-02-11 Zoltan Varga <vargaz@gmail.com>
12632 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
12633 to obtain the terminal size using an ioctl.
12635 * object.c (mono_nullable_init): Revert this as nullable reference
12636 types are not valid.
12637 (mono_nullable_box): Ditto.
12639 2006-02-09 Dick Porter <dick@ximian.com>
12641 * threads.c (mono_thread_detach): Drop a reference to the thread
12644 2006-02-09 Zoltan Varga <vargaz@gmail.com>
12646 * object.c (mono_nullable_init): Handle nullable reference types.
12647 (mono_nullable_box): Ditto. Fixes #77446.
12649 2006-02-07 Martin Baulig <martin@ximian.com>
12651 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
12653 2006-02-07 Ankit Jain <jankit@novell.com>
12655 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
12656 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
12657 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
12658 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
12659 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
12660 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
12662 2006-02-02 Zoltan Varga <vargaz@gmail.com>
12664 * class.c (mono_class_create_generic): Set type_token as well.
12666 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
12667 compatible with MS.
12669 2006-02-02 Martin Baulig <martin@ximian.com>
12671 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
12672 has never been used so far.
12674 2006-02-02 Martin Baulig <martin@ximian.com>
12676 * mono-debug-debugger.h: Changed comment at the top of this file;
12677 the header is not installed, but it's safe to #include it from
12680 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
12681 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
12683 2006-02-02 Martin Baulig <martin@ximian.com>
12686 (MonoSymbolTable): Removed the `metadata_info' field.
12689 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
12691 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
12692 (mono_debugger_add_builtin_types): Removed.
12693 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
12694 (mono_debugger_create_notification_function): We now operate on a
12695 pre-allocated area; take a `gpointer' and return `void'.
12697 * mono-debug-debugger.c
12698 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
12699 (mono_debugger_add_builtin_types): Removed.
12701 2006-02-02 Martin Baulig <martin@ximian.com>
12703 * threads.c (mono_debugger_create_all_threads): New public method.
12705 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
12707 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
12708 breaks on several platforms.
12710 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
12712 * assembly.c: the VS.NET build doesn't supply default values for
12713 MONO_ASSEMBLIES and MONO_CFG_DIR.
12715 2006-02-01 Zoltan Varga <vargaz@gmail.com>
12717 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
12720 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
12722 * loader.c (method_from_memberref): Fix a warning.
12724 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
12726 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
12727 with explicit layout. Fixes #77433.
12729 2006-01-31 Zoltan Varga <vargaz@gmail.com>
12731 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
12732 max_interface_id is initialized before using it. Fixes #77398.
12733 (ves_icall_Type_GetInterfaces): Ditto.
12735 2006-01-30 Raja R Harinath <rharinath@novell.com>
12737 * metadata.c (mono_metadata_parse_method_signature_full): Don't
12738 allocate memory for parameter attributes when parsing memberref
12740 * loader.c (mono_loader_set_error_method_load): Don't warn.
12741 (method_from_memberref): Ensure MissingMethodException gets thrown
12742 if method is not found. Make warning more informative.
12744 2006-01-29 Raja R Harinath <harinath@gmail.com>
12747 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
12748 return true if is byref.
12749 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
12750 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
12751 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
12753 2006-01-27 Raja R Harinath <rharinath@novell.com>
12755 Fix tests/find-method.2.il
12756 * loader.c (find_method, find_method_in_class): Remove is_inflated
12757 argument. Revert 2006-01-18 change.
12758 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
12759 is generic, search for method in its generic definition.
12760 * class.c (mono_class_setup_vtable_general): Print generic
12761 arguments of generic types in debugging printf.
12763 2006-01-26 Zoltan Varga <vargaz@gmail.com>
12765 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
12767 * threads.c (mono_threads_request_thread_dump): New helper function.
12769 2006-01-25 Raja R Harinath <rharinath@novell.com>
12771 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
12773 2006-01-25 Ankit Jain <jankit@novell.com>
12775 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
12776 move definition to ..
12777 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
12779 2006-01-25 Ankit Jain <jankit@novell.com>
12780 Raja R Harinath <rharinath@novell.com>
12782 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
12783 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
12786 2006-01-25 Martin Baulig <martin@ximian.com>
12788 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
12789 `MonoDebuggerThread' into debug-debugger.c.
12791 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12793 * profiler.c: fix printing of data.
12795 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
12797 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
12798 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
12800 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
12802 * object.c: fix deadlock related to string interning.
12804 2006-01-23 Martin Baulig <martin@ximian.com>
12806 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
12808 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
12810 2006-01-23 Martin Baulig <martin@ximian.com>
12812 * mono-debug.h: Moved the prototypes of some functions which are
12813 used by the JIT here from mono-debug-debugger.h.
12815 2006-01-21 Martin Baulig <martin@ximian.com>
12817 * Makefile.am: Don't install mono-debug-debugger.h.
12819 2006-01-21 Martin Baulig <martin@ximian.com>
12821 * mono-debug-debugger.h: Enforce the private status of this header
12822 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
12823 Moved some stuff from mono-debugger-jit-wrapper.h here.
12825 2006-01-20 Raja R Harinath <rharinath@novell.com>
12827 * class.c (mono_class_from_typeref): Add a sanity test to help
12828 catch lack of assembly load/search hooks.
12830 2006-01-19 Zoltan Varga <vargaz@gmail.com>
12832 * marshal.c (emit_struct_conv): Relax the fields with same offset
12833 check even more. Fixes #77230.
12835 2006-01-18 Martin Baulig <martin@ximian.com>
12837 * loader.c (find_method_in_class): Added `gboolean is_inflated'
12838 argument; if false, we compare the uninstantiated signatures.
12839 (method_from_memberref): Compare the uninstantiated signatures;
12842 2006-01-18 Robert Jordan <robertj@gmx.net>
12844 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
12845 Clear the weak link. Fixes bug #77170.
12847 * gc.c (mono_gchandle_free):
12848 Reflect *-gc.c changes (tiny optimization).
12850 2006-01-18 Zoltan Varga <vargaz@gmail.com>
12852 * metadata.c (mono_metadata_signature_dup): Applied patch from
12853 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
12856 2006-01-17 Zoltan Varga <vargaz@gmail.com>
12858 * marshal.c (emit_struct_conv): Allow fields with the same offset when
12859 marshalling from native to managed code. Fixes #77230.
12861 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12863 * threadpool.c: fix problem (Mac only) when more than one asynchronous
12864 connect. Fixes bug #77020.
12866 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
12868 * class.c: fixed id assignement for nested interfaces (bug #77275).
12869 Added also better info for --print-vtable debugging.
12871 2006-01-12 Martin Baulig <martin@ximian.com>
12873 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
12874 interfaces on-the-fly; fixes #76625.
12876 * class-internals.h
12877 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
12878 don't need that anymore.
12880 2006-01-12 Miguel de Icaza <miguel@novell.com>
12883 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
12884 To avoid initing the nested_classes when not needed I turned the
12885 PeerCredData as a toplevel internal class, as it has to be shared
12888 Fixes the CASA issue.
12890 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
12892 * domain.c: Accessors for MonoJitInfo
12894 * profiler-private.h: Add jitinfo to the end jit hook
12896 * profiler.[ch]: Define new hooks, called after jitting which give
12897 the MonoJitInfo that was compiled
12899 2006-01-10 Martin Baulig <martin@ximian.com>
12901 * class.c (mono_class_setup_events): Add support for generic
12902 classes; fixes #76440.
12904 2006-01-06 Raja R Harinath <rharinath@novell.com>
12907 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
12908 on passed-in method.
12910 2006-01-03 Zoltan Varga <vargaz@gmail.com>
12912 * object.c (mono_runtime_invoke_array): Add Nullable support.
12914 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
12916 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
12918 * file-io.c: Don't consider sockets as directory and avoid an endless
12919 loop. Fix bug #76966.
12921 2006-01-03 Zoltan Varga <vargaz@gmail.com>
12923 * object.c (mono_nullable_init): New helper function.
12924 (mono_nullable_box): Ditto.
12926 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
12928 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
12930 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
12932 2006-01-02 Zoltan Varga <vargaz@gmail.com>
12934 * class.c (mono_class_is_assignable_from): Make T assignable to
12937 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
12939 * appdomain.c: Bump corlib version to 46.
12940 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
12941 serialization purpose) and changed ves_icall_System_Reflection_
12942 Assembly_get_code_base signature to accept a boolean (to escape, or
12943 not, the assembly code base).
12945 2005-12-23 Dick Porter <dick@ximian.com>
12949 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
12950 CreateEvent icall now returns "created" boolean parameter.
12952 2005-12-22 Zoltan Varga <vargaz@gmail.com>
12954 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
12957 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
12958 when attr_klass is an interface. Fixes #77045.
12960 2005-12-20 Zoltan Varga <vargaz@gmail.com>
12962 * marshal.c (emit_struct_conv): Fix previous patch.
12964 * marshal.c (emit_struct_conv): Add a check for fields with the same
12967 2005-12-20 Raja R Harinath <rharinath@novell.com>
12969 Fix regression in Mono.C5.
12970 * class.c (mono_class_create_generic): If 'klass' is an interface
12971 set up the interface offsets.
12972 (mono_class_is_assignable_from): Don't throw away generic arguments.
12974 2005-12-19 Raja R Harinath <rharinath@novell.com>
12976 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
12979 2005-12-15 Raja R Harinath <rharinath@novell.com>
12981 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
12983 (do_mono_metadata_parse_generic_class): Don't pass the current
12984 generic context when parsing the type being instantiated: it
12985 cannot use it, anyway.
12987 * loader.c (method_from_memberref): Don't inflate a signature if
12988 it doesn't contain any type parameters.
12990 2005-12-15 Zoltan Varga <vargaz@gmail.com>
12992 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
12994 2005-12-14 Martin Baulig <martin@ximian.com>
12997 (mono_type_get_name_recurse): Don't return null for type
12998 parameters and open generic classes.
12999 (mono_class_setup_methods): Don't exclude generic instances.
13000 (mono_get_unique_iid): Use different IDs for different
13001 instantiations of the same generic type.
13002 (mono_class_setup_vtable): Only use setup_generic_vtable() for
13003 open generic instances; create a normal vtable for closed generic
13005 (mono_class_setup_vtable_general): We're now also called for
13006 closed generic instances.
13009 (mono_reflection_bind_generic_parameters): Correctly use
13010 mono_metadata_lookup_generic_inst() everywhere.
13012 2005-12-14 Zoltan Varga <vargaz@gmail.com>
13014 * object.c (mono_class_create_runtime_vtable): Call
13015 mono_class_setup_vtable ().
13017 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
13019 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
13022 * loader.c (mono_loader_set_error_type_load): Print the type load
13023 warnings to the console so they are more visible to the user.
13024 (mono_loader_set_error_method_load): Ditto.
13026 * reflection.c (ensure_runtime_vtable): Revert the last change as it
13029 * reflection.c (ensure_runtime_vtable): Fix build.
13031 * reflection.c (ensure_runtime_vtable): Disable an optimization which
13032 doesn't work in all cases.
13034 2005-12-13 Zoltan Varga <vargaz@gmail.com>
13036 * object.c (mono_array_new_full): Treat a single dimensional array
13037 with 0 lower bounds as an szarray. Fixes #76973.
13039 * reflection.c (custom_attr_visible): Really fix this.
13041 2005-12-12 Zoltan Varga <vargaz@gmail.com>
13043 * reflection.c (custom_attr_visible): Allow nested public attributes
13046 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
13049 2005-12-12 Raja R Harinath <harinath@gmail.com>
13051 * class.c (set_generic_param_owner): Delete.
13052 (mono_class_create_from_typedef): Don't set ->owner field of
13053 generic parameters to "param containers" of enclosing classes.
13054 * reflection.c (mono_reflection_initialize_generic_parameter):
13057 2005-12-11 Zoltan Varga <vargaz@gmail.com>
13059 * reflection.c (custom_attr_visible): Fix build.
13061 2005-12-10 Zoltan Varga <vargaz@gmail.com>
13063 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
13064 private attributes.
13066 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
13067 handling of null parameter defaults.
13069 2005-12-09 Raja R Harinath <rharinath@novell.com>
13071 * class.c (mono_class_from_generic_parameter): Don't set
13072 klass->generic_container.
13073 (my_mono_class_from_generic_parameter): Likewise.
13075 2005-12-07 Zoltan Varga <vargaz@gmail.com>
13077 * reflection.c (load_public_key): Fix a warning.
13078 (method_encode_code): Fix unaligned accesses.
13080 2005-12-07 Martin Baulig <martin@ximian.com>
13082 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
13085 (write_generic_param_entry): Encode our custom attrs.
13087 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
13089 2005-12-07 Martin Baulig <martin@ximian.com>
13091 * reflection.c (encode_new_constraint): Removed; we don't use the
13092 `NewConstraintAttribute' anymore.
13094 2005-12-06 Zoltan Varga <vargaz@gmail.com>
13096 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
13097 not fire a TypeResolve event when Assembly.GetType () is called.
13099 2005-12-05 Ben Maurer <bmaurer@ximian.com>
13101 Beginning of support for nullable types in the runtime. Parts of
13102 this patch are from Martin.
13104 * appdomain.c (MONO_CORLIB_VERSION): Bump
13106 * domain.c (mono_init_internal): get the nullable type
13108 * class.c (mono_class_is_nullable): New method
13109 (mono_class_get_nullable_param): New mehod
13110 (mono_class_create_generic): In types T? set cast_class to T
13112 * class-internals.h (MonoDefaults): new nullable default class
13113 (mono_class_get_nullable_param, mono_class_get_nullable_param):
13116 2005-12-05 Raja R Harinath <rharinath@novell.com>
13118 * metadata.c (select_container): New. Refactor code to select the
13119 appropriate GenericContainer given the type of generic parameter
13120 we are looking for.
13121 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
13122 not a MonoGenericContext. Use select_container. Update parameters.
13123 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
13124 and MONO_TYPE_MVAR.
13125 (unwrap_arrays): Remove duplicate tests.
13126 (find_generic_param): Rename from 'has_same_context'. Now walks a
13127 generic instantiated class to find any arguments that are generic
13129 (mono_type_create_from_typespec_full): Use find_generic_param to
13130 avoid evicting some generic instantiations from the typespec
13133 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
13135 * reflection.c: fixed writing of doubles on ARM FPA.
13137 2005-12-02 Robert Jordan <robertj@gmx.net>
13139 * icall.c: Fixed EventInfo.ReflectedType (#76829).
13141 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13143 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
13144 least on SUSE 10 they are not the same (on debian, they are just the
13147 2005-12-01 Raja R Harinath <rharinath@novell.com>
13149 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
13150 DeclaringType for VARs and MVARs.
13151 * class.c (set_generic_param_owner): Fix initialization of owner
13154 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
13156 * icall.c: fixed Enum.ToObject() to correctly convert the values.
13158 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13160 * threadpool.c: workaround for a bug that shows up on the Mac:
13161 select()+connect() on a blocking socket is not like it should
13162 be, so we proceed to connect() in that case, wasting the I/O
13163 threadpool thread until connect succeedes. Fixes bug #75436.
13165 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13167 * threadpool.c: fix typo when setting file descriptor states.
13169 2005-11-28 Raja R Harinath <rharinath@novell.com>
13171 * class-internals.h (MonoGenericContainer.is_signature): Remove.
13172 * metadata.c (mono_metadata_parse_method_signature_full): Don't
13173 create a temporary signature container.
13174 (mono_metadata_parse_generic_param): Update to changes.
13175 (mono_type_create_from_typespec_full): Update to changes.
13176 * loader.c (method_from_memberref): Don't use a
13177 MonoGenericContainer while parsing a memberref signature.
13178 (method_from_methodspec): Remove dead-store of the 'container'
13179 variable. It's overwritten before use.
13181 * metadata.c (mono_type_create_from_typespec_full): Make debugging
13183 (mono_metadata_parse_generic_param): Likewise.
13184 * loader.c (find_method_in_class): Does not need a
13185 MonoGenericContainer. Use 'mono_method_signature' rather than
13186 'mono_method_signature_full'.
13187 (find_method, mono_get_method_constrained, method_from_memberref):
13190 * metadata.c (mono_type_create_from_typespec_full): Ensure that
13191 owner-less generic-parameters are never evicted from the typespec
13194 * loader.c (method_from_memberref): Don't use the current context
13195 when parsing signatures.
13196 (method_from_methodspec, mono_get_method_from_token): Update to changes.
13198 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
13199 side-effects in g_assert.
13200 * loader.c (mono_get_method_from_token): Resolve klass earlier so
13201 that we don't potentially lose information.
13203 2005-11-26 Dick Porter <dick@ximian.com>
13206 * threads.c: icalls to implement basic (ie, not named)
13207 System.Threading.Semaphore.
13209 2005-11-24 Dick Porter <dick@ximian.com>
13212 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
13213 Use GetProcessId() if it's available.
13215 2005-11-23 Zoltan Varga <vargaz@gmail.com>
13217 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
13219 2005-11-23 Raja R Harinath <rharinath@novell.com>
13220 Ankit Jain <jankit@novell.com>
13222 * loader.c (mono_get_method_from_token): Initialize 'method' field
13223 of all generic parameters before parsing the signature. Remove
13224 code that "fixed"-up MVAR references.
13226 2005-11-23 Ankit Jain <jankit@novell.com>
13228 * metadata.c (mono_metadata_has_generic_params):
13229 (mono_metadata_load_generic_param_constraints):
13230 (mono_metadata_load_generic_params): Move duplicate code ...
13231 (mono_metadata_get_generic_param_row): ... here. Returns the
13232 first row-id in GenericParam table for a given owner (token).
13233 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
13236 2005-11-23 Raja R Harinath <rharinath@novell.com>
13237 Ankit Jain <jankit@novell.com>
13239 * metadata.c (mono_metadata_class_equal): Pass signature_only when
13240 comparing VARs too.
13241 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
13242 type->data.generic_param only if the type is an MVAR.
13243 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
13244 leak owner-less VARs and MVARs into managed space.
13246 2005-11-21 Martin Baulig <martin@ximian.com>
13248 * class-internals.h
13249 (MonoMethod): Moved the `generic_container' here from
13250 `MonoMethodNormal' since we now also need it for
13251 `MonoMethodPInvoke';
13252 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
13253 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
13254 an union containing both `MonoMethodNormal' and
13255 `MonoMethodPInvoke'.
13258 (mono_get_method_from_token): Allow implementing generic methods
13262 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
13265 2005-11-17 Dick Porter <dick@ximian.com>
13269 * process.c: Split the Process Start_internal icall into
13270 ShellExecuteEx_internal and CreateProcess_internal, which are
13271 called depending on whether UseShellExecute is true. Fixes bug
13274 * appdomain.c (MONO_CORLIB_VERSION): Incremented
13276 2005-11-17 Zoltan Varga <vargaz@gmail.com>
13278 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
13279 'msize' parameters, use the information in 'mspec' instead.
13280 (emit_object_to_ptr_conv): Ditto.
13282 * marshal.c (emit_struct_conv): Handle explicit layout structs with
13283 fields out of order. Fixes #76733.
13285 2005-11-17 Ankit Jain <jankit@novell.com>
13287 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
13289 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
13291 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
13294 2005-11-16 Zoltan Varga <vargaz@gmail.com>
13296 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
13297 for types with non-auto layout. Fixes #76717.
13299 2005-11-16 Ankit Jain <jankit@novell.com>
13301 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
13302 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
13303 if generic_context is null.
13304 (mono_metadata_generic_param_equal): param->owner can be null.
13305 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
13308 2005-11-16 Zoltan Varga <vargaz@gmail.com>
13310 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
13313 2005-11-15 Martin Baulig <martin@ximian.com>
13315 * object.c (set_value): Use mono_class_from_mono_type() instead of
13316 the hack for generic instances; fixes #76136.
13318 2005-11-15 Zoltan Varga <vargaz@gmail.com>
13320 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
13323 * image.c (load_metadata_ptrs): Initialize the new fields.
13325 * reflection.c (create_dynamic_mono_image): Ditto.
13327 * reflection.c (build_compressed_metadata): Use the new fields.
13329 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
13332 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
13335 2005-11-15 Ankit Jain <jankit@novell.com>
13336 Raja R Harinath <harinath@gmail.com>
13338 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
13339 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
13340 new per-generic_container cache if the cached MonoType's context matches
13341 the current context.
13342 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
13343 to the expected context.
13344 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
13346 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13348 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
13349 we changed the signature of an icall.
13350 * icall.c: Modify to mono_double_ParseImpl return true/false
13351 depending on the success, instead of throwing the exception. This will
13352 help us in Double.TryParse methods.
13354 2005-11-14 Zoltan Varga <vargaz@gmail.com>
13356 * marshal.c (emit_marshal_object): Throw an exception when
13357 marshalling 'object' instead of crashing. Fixes #76696.
13359 2005-11-11 Zoltan Varga <vargaz@gmail.com>
13361 * class-internals.h: Add prototype for mono_type_get_full_name ().
13363 2005-11-11 Dick Porter <dick@ximian.com>
13365 * threads.c (mono_thread_manage): Make sure the main thread has
13366 abandoned all its mutexes when cleaning up. Fixes bug 74680.
13368 2005-11-11 Zoltan Varga <vargaz@gmail.com>
13370 * loader.c (mono_loader_set_error_type_load): Log a warning to the
13371 console about the missing type.
13372 (mono_loader_set_error_method_load): Ditto.
13374 2005-11-09 Miguel de Icaza <miguel@novell.com>
13376 * mono-config.c (mono_get_config_dir): Set the system defaults if
13379 * assembly.c (mono_set_dirs): New API entry point to set the
13380 assembly and the config directory in one call
13382 2005-11-09 Zoltan Varga <vargaz@gmail.com>
13384 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
13385 the ftnptr was created from a delegate in a domain other than the
13386 current domain. Fixes #75377.
13388 * exception.h exception.c: Add mono_get_exception_not_supported ().
13390 2005-11-08 Martin Baulig <martin@ximian.com>
13392 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
13394 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
13396 * security-manager.h: Added definitions to deal with strongname key
13397 pairs bigger (and smaller) than 1024 bits.
13398 * reflection.c: Remove hardcoded strongname size (128 bytes) and
13399 adjust wrt the public key length being used.
13401 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
13403 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
13404 Windows build (r51396-51397).
13406 2005-11-03 Martin Baulig <martin@ximian.com>
13408 * class.c (mono_class_setup_vtable_general): Also add generic
13409 methods to the vtable; fixes #76581.
13411 2005-11-01 Miguel de Icaza <miguel@novell.com>
13413 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
13414 sure that we lookup GetString method from the System.Text.Encoding
13415 class, not the derived class or we get an empty method.
13417 Fixed class #76612.
13419 2005-10-25 Miguel de Icaza <miguel@novell.com>
13421 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
13422 if it has been previously set (embedders).
13424 Make mono_set_rootdir available also on Unix.
13426 005-10-24 Robert Jordan <robertj@gmx.net>
13428 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
13430 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
13432 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
13433 only calls which are made to native code use this flag.
13435 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
13437 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
13439 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
13440 Add support for FieldBuilders.
13442 2005-10-29 Martin Baulig <martin@ximian.com>
13445 (mono_debug_using_mono_debugger): New public method; returns
13446 whether we're running inside the debugger.
13448 2005-10-27 Zoltan Varga <vargaz@gmail.com>
13450 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
13451 for Method/Constructor/FieldBuilders.
13453 2005-10-26 Zoltan Varga <vargaz@gmail.com>
13455 * reflection.c (module_add_cattrs): Save custom attributes for global methods
13456 and fields as well.
13458 2005-10-26 Martin Baulig <martin@ximian.com>
13460 * mono-debug-debugger.c
13461 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
13463 2005-10-24 Raja R Harinath <harinath@gmail.com>
13465 * icall.c (base64_to_byte_array): Don't pass an out-of-range
13466 integer to isspace.
13468 2005-10-21 Zoltan Varga <vargaz@gmail.com>
13470 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
13471 when passing valuetypes byref. Fixes #76502.
13473 2005-10-19 Jackson Harper <jackson@ximian.com>
13475 * profiler.c: Don't put a . in front of types that are not in a
13478 2005-10-18 Zoltan Varga <vargaz@gmail.com>
13480 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
13482 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
13484 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
13486 (mono_marshal_get_ldflda_wrapper): Fix a warning.
13488 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13490 * assembly.c metadata-internals.h icall.c: Define an additional
13491 parameter for mono_assembly_name_parse_full, so we can avoid creating
13492 S.R.AssemblyName.Version when no version info wasn't passed.
13494 2005-10-09 Miguel de Icaza <miguel@novell.com>
13496 * class.c (mono_type_get_full_name): Reimplement method that was
13499 * image.c: Some docs
13501 2005-10-10 Zoltan Varga <vargaz@gmail.com>
13503 * profiler.c (output_newobj_profile): Fix printing of Total memory
13506 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
13508 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
13510 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
13512 * threads.c: remove debug output.
13514 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
13516 * threads.c (mono_thread_manage): Fix crashes if more than 64
13517 threads need to be aborted. Hopefully fixes #75899.
13519 * assembly.c (mono_stringify_assembly_name): New helper function.
13521 * class.c: Use mono_stringify_assembly_name instead of the similar
13524 * assembly.h assembly.c: Add support for calling a postload search
13525 hook if an assembly cannot be loaded.
13527 * appdomain.c: Register new search hooks which call the AssemblyResolve
13528 events in AppDomain. Fixes #75231
13530 2005-10-07 Martin Baulig <martin@ximian.com>
13532 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
13533 methods without debug info.
13535 2005-10-07 Zoltan Varga <vargaz@gmail.com>
13537 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
13540 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13542 * file-io.c: now that we return symlinks, use lstat and, when the file
13543 is a symbolic link, stat, to get the file attributes. Also avoid the
13544 conversion to/from utf16/external.
13546 2005-10-06 Zoltan Varga <vargaz@gmail.com>
13548 * class.c (mono_class_layout_fields): Compute klass->has_references
13549 correctly if an embedded valuetype is not yet initialized. Fixes
13552 2005-10-04 Martin Baulig <martin@ximian.com>
13555 (mono_metadata_load_generic_param_constraints): New public
13556 function; splitted the constraints loading out from
13557 mono_metadata_load_generic_params().
13559 * class.c (mono_class_create_from_typedef): Call
13560 mono_metadata_load_generic_param_constraints() after setting up
13561 the type and creating our parent; fixes #75329.
13563 2005-10-04 Martin Baulig <martin@ximian.com>
13565 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
13566 non-dynamic parent classes.
13568 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
13570 * file-io.c : win32 build fix (ETXTBSY seems not found).
13572 2005-10-04 Martin Baulig <martin@ximian.com>
13575 (mono_image_get_methodspec_token): Make the cache actually work;
13578 2005-10-04 Martin Baulig <martin@ximian.com>
13580 * class.c (mono_class_name_from_token): Removed the unneccessary
13581 `MonoGenericContext *' argument.
13583 2005-10-04 Martin Baulig <martin@ximian.com>
13586 (method_from_methodspec): Make the caching work again; fixes the
13587 performance regression from #76262.
13589 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13593 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
13594 GetFileSystemEntries that performs the same work but without going
13595 into io-layer, locking, etc.
13597 2005-09-30 Zoltan Varga <vargaz@gmail.com>
13599 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
13600 ThreadState_Stopped as well. Fixes #76047.
13602 2005-09-29 Martin Baulig <martin@ximian.com>
13605 (inflate_generic_context): If the new context has a `gmethod', set
13606 its `container' that that gmethod's `container'.
13609 (mono_metadata_parse_generic_param): Simplify things;
13610 `generic_container = generic_context->container;' is just fine.
13612 * loader.c (method_from_methodspec): Code cleanups.
13614 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13616 * decimal.c: fix warning (and let gcc generate correct
13617 code on ARM with optimizations).
13619 2005-09-28 Martin Baulig <martin@ximian.com>
13622 (method_from_memberref): Added `MonoGenericContext *class_context'
13623 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
13624 (method_from_methodspec): If we're a memberref, use the enclosing
13625 context when parsing its parent. Fixes #76262; see gtest-206.cs.
13627 2005-09-28 Martin Baulig <martin@ximian.com>
13629 * object.c (mono_runtime_invoke_array): Added support for
13630 MONO_TYPE_GENERICINST; fixes #75917.
13632 2005-09-27 Martin Baulig <martin@ximian.com>
13634 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
13635 `k->byval_arg.type' to determine the actual type.
13637 * loader.c (method_from_methodspec): Removed some hacks.
13639 2005-09-27 Ben Maurer <bmaurer@ximian.com>
13641 * class-internals.h (mono_field_is_deleted): Do the test for
13642 rtspecialname before we check the actual name of the field. This
13643 prevents us from dereferencing a pointer into the string table,
13644 saving us from accessing a few pages
13646 * *.c: Replace the use of {Enter,Leave}CriticalSection with
13647 macros. This will allow a deadlock debugger to easily be plugged
13650 2005-09-27 Martin Baulig <martin@ximian.com>
13652 * loader.c (method_from_methodspec): Create a "signature"
13653 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
13655 2005-09-27 Martin Baulig <martin@ximian.com>
13658 (inflate_generic_class): Correctly set the new context's
13662 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
13663 instead of a `MonoGenericContext *'.
13664 (mono_method_signature_full): Take a `MonoGenericContainer *'
13665 instead of a `MonoGenericContext *'.
13668 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
13669 instead of a `MonoGenericContext *'.
13670 (mono_metadata_parse_method_signature_full): Likewise.
13672 2005-09-26 Martin Baulig <martin@ximian.com>
13675 (mono_class_from_generic_parameter): Set `klass->generic_container'
13676 (mono_class_from_generic_parameter): Likewise.
13677 (mono_bounded_array_class_get): We inherit the generic container
13678 from the element class.
13681 (find_method, find_method_in_class): Take a `MonoGenericContext *'
13682 argument rather than computing it here.
13683 (method_from_memberref): Correctly set the generic context before
13684 parsing the signature. Fixes #75681.
13686 2005-09-26 Zoltan Varga <vargaz@gmail.com>
13688 * object.c (mono_class_has_special_static_fields): Fix warnings.
13690 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13692 * assembly.c: Add parse_public_key function, to
13693 par the public keys. Also added mono_assembly_name_parse_full,
13694 to define it the parsed key should be freed or not.
13695 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
13696 to parse a long format assembly name.
13697 * metadata-internals.h: Keep mono_assembly_name_parse_full as
13698 private, since calling it to preserve the key requires
13699 freeing it manually.
13701 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
13703 * locales.c : removed HAVE_ICU part.
13705 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
13707 * object.c (mono_class_create_runtime_vtable): Avoid calling
13708 field_is_special_static if the klass has no special static fields.
13710 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
13711 (MonoCachedClassInfo): Likewise.
13713 * object.c (mono_class_has_special_static_fields): New helper function.
13715 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13717 * class.c (mono_class_create_from_typedef): Don't call
13718 interfaces_from_typedef_full for enums.
13719 (mono_class_create_from_typedef): Compute the base types of enums directly
13720 without calling mono_class_setup_fields ().
13721 (mono_class_find_enum_basetype): New helper function.
13723 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
13724 one place inside the string heap.
13726 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
13728 * class.c: locking fixes, code cleanups, some docs added.
13729 Allocate some data structures in the image mempool.
13731 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13733 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
13736 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
13738 * class-internals.h, class.c, reflection.c: reduce memory taken by
13741 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
13743 * metadata.c, metadata.h, loader.h: documentation updates, code and
13746 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13748 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
13751 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
13752 page faults caused by the runtime while reading metadata.
13754 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13756 * socket-io.c: the field names were changed 3 months ago and no one
13757 realized until bug #76077 got filed!
13759 2005-09-20 Martin Baulig <martin@ximian.com>
13761 * icall.c (assembly_icalls): Removed some unused debugger icalls.
13763 2005-09-20 Martin Baulig <martin@ximian.com>
13765 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
13766 write the rank into the class entry.
13768 2005-09-20 Martin Baulig <martin@ximian.com>
13770 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
13772 2005-09-19 Zoltan Varga <vargaz@gmail.com>
13774 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13776 * icall.c (custom_attrs_defined_internal): New icall.
13778 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
13780 (mono_custom_attrs_construct_by_type): New helper function.
13782 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
13784 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
13785 terminate the resulting string. Fixes #76123.
13787 2005-09-16 Martin Baulig <martin@ximian.com>
13790 (mono_debug_add_method): Ignore inflated methods for the moment.
13792 2005-09-14 Martin Baulig <martin@ximian.com>
13794 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
13796 2005-09-13 Zoltan Varga <vargaz@gmail.com>
13798 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
13799 return a success/failure indication.
13800 (mono_metadata_interfaces_from_typedef_full): Ditto.
13801 (get_constraints): Ditto.
13803 2005-09-12 Zoltan Varga <vargaz@gmail.com>
13805 * marshal.c (emit_marshal_array): Fix handling of null arrays.
13807 * marshal.c (emit_marshal_array): Add support for returning string
13808 arrays from delegates. Fixes #76063.
13810 * marshal.c: Use the emit_ldloc/stloc macros where possible.
13812 2005-09-11 Zoltan Varga <vargaz@gmail.com>
13814 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
13817 2005-09-09 Zoltan Varga <vargaz@gmail.com>
13819 * reflection.c icall.c: Fix after mono_get_exception_type_load
13822 * assembly.c (mono_assembly_get_assemblyref): New helper function.
13823 (mono_assembly_load_reference): Use the new helper.
13825 * class-internals.h (MonoLoaderError): New structure containing
13826 information about type loading errors.
13828 * class-internals.h loader.c: Add APIs to store per-thread loader
13831 * loader.c class.c: Set the loader error if needed.
13833 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
13835 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
13837 * decimal.c: fixed to handle the broken ARM fp format.
13839 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
13841 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
13844 2005-09-06 Martin Baulig <martin@ximian.com>
13846 * domain.c (supported_runtimes): Added v2.0.50727.
13848 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
13850 * culture-info.h: reduce the size of some structures.
13852 2005-09-05 Martin Baulig <martin@ximian.com>
13854 Reflect latest API changes in the August CTP.
13857 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
13858 ("MonoType.HasGenericArguments"): Removed.
13859 ("MonoMethod.BindGenericParameters"): Renamed to
13860 "MakeGenericMethod".
13861 ("MethodBuilder.BindGenericParameters"): Renamed to
13862 "MakeGenericMethod".
13864 2005-09-05 Martin Baulig <martin@ximian.com>
13866 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
13868 2005-09-05 Martin Baulig <martin@ximian.com>
13870 Applying a patch from Michal Moskal <malekith@nemerle.org>.
13872 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
13873 generic_container is non-NULL.
13875 2005-09-05 Martin Baulig <martin@ximian.com>
13877 Applying a patch from Michal Moskal <malekith@nemerle.org>.
13879 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
13881 2005-08-29 Michal Moskal <malekith@nemerle.org>
13883 * reflection.c (encode_locals,
13884 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
13885 for large generic types.
13887 2005-09-05 Martin Baulig <martin@ximian.com>
13889 Applying a patch from Michal Moskal <malekith@nemerle.org>.
13891 * class.c (mono_dup_array_type): New public method.
13892 (mono_metadata_signature_deep_dup): New public method.
13893 (dup_type): Correctly duplicate array and function types.
13895 2005-09-05 Martin Baulig <martin@ximian.com>
13897 Applying a patch from Michal Moskal <malekith@nemerle.org>.
13899 * reflection.c (get_default_param_value_blobs): Handle generic types
13900 and generic methods.
13902 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
13904 * class.c: Fixed error reporting (method/class were inversed) for
13905 inheritance demands.
13906 * security-manager.c|h: Added the AppDomain when calling the managed
13907 System.Security.SecurityManager.InheritanceDemand method.
13909 2005-09-01 Raja R Harinath <rharinath@novell.com>
13911 * reflection.c (encode_marshal_blob): 'marshaltype' and
13912 'marshaltyperef' are alternate sources for the custom marshaler
13915 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
13917 * class.c: fix creation of array classes with rank == 1
13918 (patch by Ankit Jain <jankit@novell.com>).
13920 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
13922 * object.c: fix check for creating the bound data for arrays vs
13925 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13927 * object.c: configuration file name is now based on the executable name,
13928 not the image name. Fixes bug #75931.
13930 2005-08-29 Zoltan Varga <vargaz@gmail.com>
13932 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
13933 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
13935 2005-08-25 Zoltan Varga <vargaz@gmail.com>
13937 * rand.c: Use wincrypt.h instead of WinCrypt.h.
13939 2005-08-24 Ankit Jain <jankit@novell.com>
13940 Raja R Harinath <rharinath@novell.com>
13942 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
13943 called by it recursively.
13944 (mono_class_init): Remove special case in pending_init handling, since it's
13945 superseded by the fix to mono_class_from_typeref.
13947 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
13949 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
13950 BROKEN_THREAD_START stuff.
13952 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
13954 * class-internals.h object.c: Add a new kind of trampoline called a delegate
13957 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
13959 * object.c (mono_delegate_ctor): Replace the original function address with
13960 a delegate trampoline.
13962 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
13964 * icall.c: add boolean argument to base64_to_byte_array and
13965 InternalFromBase64String to control whether a whitespace-only string
13966 is allowed (or should casue a FormatException to be thrown). We need
13967 this as the behavior has changed between MS.NET 1.x and 2.0, and we
13968 to match the MS behaviour in both profiles.
13969 * appdomain.c: Bump corlib version.
13971 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13973 This patch implements a big portion of publisher policy
13974 support, used to bind assembly versions and redirect
13975 one assembly from version A to version B.
13978 New GSList loaded_assembly_bindings, for storing the cached
13980 (assembly_binding_maps_name): New static function for checking if a
13981 assembly binding information maps an assembly name.
13982 (mono_assembly_binding_info_free): New function for freeing
13983 assembly binding information resources.
13984 (get_publisher_policy_info): New static function for retrieving
13985 assembly binding information from a MonoImage.
13986 (compare_versions): New static function for comparing an assembly
13987 binding information data and the version of an assembly name.
13988 (check_policy_versions): New static function for checking if an
13989 assembly binding info mapping an assembly name is valid for it.
13990 (mono_assembly_load_publisher_policy): New static function for
13991 loading the 'policy.major.minor.MyAssembly' image for an assembly
13992 with an assembly name 'aname'.
13993 (mono_assembly_bind_version): New static function for updating
13994 assembly redirection.
13995 (mono_assembly_apply_binding): New static function for applying
13997 (search_binding_loaded): New static function for searching
13998 loaded assembly binding infos in the cache domain.
13999 (mono_assembly_load_full): Don't apply assembly binding for
14000 reflection only assemblies.
14002 * metadata-internals.h: Add MonoAssemblyBindingInfo,
14003 which contains information about assembly binding. Also
14004 declare signature for mono_config_parse_publisher_policy ()
14005 function, used to retrieve pub policy info.
14008 (publisher_policy_start): New static function used to parse publisher
14009 policy config files.
14010 (publisher_policy_parser): New static MonoParseHandler containing
14011 the functions used when parsing config files.
14012 (mono_config_parse_publisher_policy): New function for parsing
14013 publisher policy files.
14015 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
14017 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
14019 * marshal.c (mono_delegate_free_ftnptr): Ditto.
14021 * object.c (mono_get_addr_from_ftnptr): New helper function.
14023 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
14025 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14027 2005-08-19 Dick Porter <dick@ximian.com>
14029 * threads.c, threads.h, appdomain.c, appdomain.h,
14030 profiler-private.h, monitor.c, object.c, object-internals.h,
14031 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
14032 store the thread ID, so it can hold a 64 bit value if needed.
14034 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
14036 * reflection.c (mono_reflection_create_dynamic_method): Store the
14037 handle class into the method references as well so ldtoken works in
14040 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
14043 2005-08-19 Ankit Jain <jankit@novell.com>
14046 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
14047 here rather than using the method signature of a arbitrary function
14048 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
14050 Hack done with Harinath.
14052 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14054 * threadpool.c: disable printing stack traces when we get a exception
14055 in a threadpool thread. I need to do more testing to figure out which
14056 cases actually print this. Fixes bug #75828.
14058 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14060 * icall.c: there might be ignored whitespace after the last '='. This
14061 fixes length computation and bug #75840.
14063 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
14065 * assembly.c (mono_assembly_load_full): Consider .exe extension as
14066 well. Fixes #75809.
14068 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
14071 * reflection.c (create_custom_attr_data): Ditto.
14073 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
14075 * locales.c, culture-info.h : removed RegionLCIDMap.
14076 * culture-info-tables.h : regenerated.
14078 2005-08-16 Martin Baulig <martin@ximian.com>
14080 * class.c (mono_type_get_name_recurse): Small fix.
14082 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
14084 * locales.c : indentation fixie.
14086 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
14088 * object-internals.h,
14092 icall.c : added RegionInfo table support.
14093 * culture-info-table.h : regenerated for region support.
14095 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
14097 * reflection.c (resolve_object): handle all kinds of MonoMethod
14098 including generic ones
14100 2005-08-12 Ankit Jain <jankit@novell.com>
14102 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
14103 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
14105 2005-09-12 Lluis Sanchez <lluis@ximian.com>
14107 * process.c: Don't close a thread handle when it's NULL. This is a
14108 workaround for bug #75733.
14110 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
14112 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
14114 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
14116 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
14118 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14120 * threadpool.c: if a work item in the thread pool has a callback that
14121 catches a exception, don't propagate it after invoking the callback.
14124 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
14126 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
14128 * class-internals.h (MonoCachedClassInfo): Add some new fields.
14130 * class.c (mono_class_init): Load field info lazily in the AOT case.
14132 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
14134 2005-08-03 Ankit Jain <jankit@novell.com>
14137 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
14138 PInvoke calling convention is 0.
14140 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
14142 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
14143 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
14145 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
14147 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
14148 to handle threads not started by the GC (patch by Michael Meeks
14149 <michael.meeks@novell.com>).
14151 2005-07-31 Kamil Skalski <nazgul@omega.pl>
14153 * reflection.c: Make buffer used in emitting types larger for some
14154 big generic types (patch by Michal Moskal).
14156 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
14158 * mono-debug.c: Fix some (not all) alignment problems.
14160 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14162 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
14163 Invoke mono_image_load_from_data_full passing the refonly
14167 (mono_assembly_open_from_bundle): Add the refonly argument,
14168 in order to pass it to other methods it calls to.
14169 (do_mono_assembly_open): Add the refonly argument, in order
14170 to pass it to other methods it calls to.
14171 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
14172 the refonly parameter to it.
14174 * image.c: Add loaded_images_refonly_hash and
14175 loaded_images_refonly_guid_hash to cache the reflection
14176 only loaded images.
14177 (mono_images_init): Initialize the hash tables used for
14178 caching the reflection only images.
14179 (load_modules): Invoke mono_image_open_full passing the refonly
14180 parameter to load the modules the correct way.
14181 (build_guid_table): Add the refonly argument, to re-build the
14182 correct hash table.
14183 (do_mono_image_open): Added the refonly argument, in order to
14184 define it for the loaded image.
14185 (mono_image_loaded_full): New function, which receives an
14186 additional parameter to look for the image in the refonly or
14187 non-refonly section.
14188 (mono_image_loaded): Updated, using mono_image_loaded_full.
14189 (mono_image_loaded_by_guid_full): The same case that happens
14190 with mono_image_loaded_full.
14191 (mono_image_loaded_by_guid): Likewise.
14192 (register_image): Use the ref_only variable inside MonoImage
14193 to decide in which hash table store the current image.
14194 (mono_image_open_from_data_full): Rename
14195 mono_image_open_from_data to mono_image_open_from_data_full,
14196 adding the refonly argument, to define the ref_only variable
14198 (mono_image_open_from_data): Return
14199 mono_image_open_from_data_full.
14200 (mono_image_open_full): Rename mono_image_open to
14201 mono_image_open_full, receiving the new refonly argument,
14202 to pass it to inner methods.
14203 (mono_pe_file_open): Update this function, to open
14204 a MonoImage as a non-refonly image.
14205 (mono_image_close): Use the refonly variable inside
14206 MonoImage to remove the image from the correct caches.
14208 * image.h: Add the signatures of mono_image_open_full,
14209 mono_image_open_from_data_full, mono_image_loaded_full,
14210 mono_image_loaded_by_guid_full.
14212 * metadata-internals.h: Add the ref_only field to
14215 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14217 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
14218 Fix the last behavior, which used to load the assemblies and
14219 extract MonoReflectionAssemblyName information, instead of
14220 extract it from the metadata tables. Needed for Reflection
14223 2005-07-29 Martin Baulig <martin@ximian.com>
14225 * mono-debug-debugger.c
14226 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
14230 (mono_debug_address_from_il_offset): Check whether we have
14231 debugging support before attempting to take the lock.
14232 (mono_debug_source_location_from_address): Likewise.
14233 (mono_debug_source_location_from_il_offset): Likewise.
14234 (mono_debug_il_offset_from_address): Likewise.
14235 (mono_debug_address_from_il_offset): Likewise.
14237 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
14239 * class.c (mono_class_from_name_case): Add support for dynamic images.
14242 * object.c (mono_class_compute_gc_descriptor): Add a workaround
14245 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
14247 * reflection.c (mono_method_get_object): Fix warning.
14249 2005-07-28 Martin Baulig <martin@ximian.com>
14252 (mono_debug_add_wrapper): Also write the wrapper type.
14254 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
14256 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
14258 * class.c (mono_class_init): Avoid reading nested classes if the AOT
14259 data indicates the class has none.
14261 2005-07-26 Ben Maurer <bmaurer@ximian.com>
14263 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
14264 loader lock with the debugger lock. Prevents deadlocks for beagle.
14266 Beagle can now run on an smp box for a weekend without any
14269 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
14271 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
14272 in a module. Fixes #75629.
14274 2005-07-26 Martin Baulig <martin@ximian.com>
14276 * mono-debug.c (mono_debug_add_wrapper): New static method.
14277 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
14278 interncall or a wrapper.
14280 * mono-debug.h (MonoDebugWrapperData): New public typedef.
14281 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
14282 (MONO_DEBUGGER_VERSION): Bump to 51.
14284 * mono-debug-debugger.c
14285 (mono_debugger_add_type): Removed this empty function.
14286 (mono_debugger_add_method): Likewise.
14288 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
14290 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
14291 before accessing method->slot.
14293 2005-07-21 Jb Evain <jbevain@gmail.com>
14295 * reflection.c (method_encode_clauses/class): Handle filters clauses.
14298 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
14300 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
14303 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
14305 * image.h image.c: Add mono_image_get_guid () API function.
14307 2005-07-19 Ben Maurer <bmaurer@ximian.com>
14309 There were issues when multiple threads tried to load
14310 assemblies. A deadlock was created between assemblies_mutex and
14311 mono_domain_assemblies_lock. This fixes the issue by making the
14312 assembly ref counting be lock free. See bug 75586.
14314 * image.c (mono_image_close): The add ref function here was using
14315 Interlocked operations while the unref was using a mutex and a
14316 --. I don't think this was ever a bug that would be exposed in a
14317 non-pendantic way (ie, by an embedder doing a ref on one thread
14318 and an unref on another), but for the sake of correctness, this is
14321 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
14322 (mono_assembly_load_reference): Call mono_assembly_addref rather
14323 than touching the refcount ourselves.
14324 (mono_assembly_close): Use InterlockedDecrement to unref the
14325 assembly. Don't acquire the lock unless it is actually needed.
14327 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
14329 * class.c (mono_class_layout_fields): Fix calculation of has_references
14332 2005-07-12 Martin Baulig <martin@ximian.com>
14334 Applying a patch from Michal Moskal <malekith@nemerle.org>.
14337 (mono_type_hash): Provide better hashing for generic instances.
14338 (mono_generic_inst_hash): Improve hashing.
14339 (mono_generic_class_hash): Likewise.
14341 * reflection.c (mymono_metadata_type_hash): Improve hashing for
14344 2005-07-12 Martin Baulig <martin@ximian.com>
14346 * reflection.c (mono_reflection_create_runtime_class): Remove the
14347 hack for generic type definitions and non-`Run' assemblies.
14348 (mono_reflection_bind_generic_parameters): Also use
14349 `klass->wastypebuilder' to check for TypeBuilders.
14351 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
14353 * class.c (mono_class_layout_fields): Fix calculation of has_references
14356 * class.c (inflate_generic_class): Fix a leak.
14357 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
14360 2005-07-11 Martin Baulig <martin@ximian.com>
14362 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
14365 2005-07-11 Martin Baulig <martin@ximian.com>
14367 * loader.c (find_method): Also lookup in
14368 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
14370 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14372 * appdomain.c (mono_domain_unload): Don't free the error message
14373 before passing it to mono_get_exception_...
14375 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
14377 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
14379 * threads.c: try to better guess an available RT signal (bug #75387).
14381 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14383 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
14386 2005-07-07 Martin Baulig <martin@ximian.com>
14388 * class.c (mono_type_get_name_full): Return NULL for
14389 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
14392 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14394 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
14395 exit the appdomain as well being aborted.
14397 * threadpool.c: Create all threadpool threads inside the root appdomain, and
14398 change back to the root domain after calling managed code. This enables
14399 appdomains using threadpools to be unloaded.
14401 2005-07-07 Martin Baulig <martin@ximian.com>
14403 * class-internals.h
14404 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
14405 into `MonoDynamicGenericClass' since we only need it for dynamic
14408 * reflection.c (mono_class_bind_generic_parameters): We don't need
14409 to compute the `parent' here.
14411 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
14413 * culture-info-table.h : regenerated.
14415 2005-07-06 Martin Baulig <martin@ximian.com>
14418 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
14420 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
14422 2005-07-06 Martin Baulig <martin@ximian.com>
14424 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
14425 we're doing a signature-only comparision; fixes #74945.
14427 2005-07-06 Martin Baulig <martin@ximian.com>
14429 * class-internals.h (MonoGenericClass): Moved some things out into
14430 a new `MonoInflatedGenericClass' type.
14431 (MonoInflatedGenericClass): New type; the `klass' of a
14432 `MonoGenericClass' is now computed lazyly in
14433 mono_get_inflated_generic_class().
14435 * class.c (mono_get_inflated_generic_class): New public function.
14436 (mono_class_inflate_generic_method): Removed the unused
14437 `MonoClass *' argument.
14438 (setup_generic_vtable): Don't call mono_get_inflated_method() on
14440 (mono_class_create_generic): Make this static and merge it with
14441 mono_class_create_generic_2(); we're now called automatically from
14442 mono_get_inflated_generic_class().
14444 * loader.c (mono_method_signature): Call
14445 mono_get_inflated_method() here.
14447 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
14449 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
14450 type of fields with RVA.
14452 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
14453 for this pseudo class.
14454 (my_mono_class_from_generic_parameter): Likewise.
14455 (mono_class_init): Allow interfaces to have cctors.
14457 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
14459 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
14460 lazily for AOT methods.
14462 2005-07-05 Martin Baulig <martin@ximian.com>
14464 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
14465 returns FALSE for a successful match, not TRUE.
14467 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
14469 * loader.c (mono_method_get_index): Optimize this a bit.
14471 2005-07-04 Martin Baulig <martin@ximian.com>
14474 (class_compute_field_layout): Move the check for generic type
14475 definitions into mono_class_layout_fields(). Fixes #74684.
14476 (mono_class_from_generic_parameter): Correctly compute
14477 `klass->parent'; fixes #75457.
14479 * reflection.c (register_assembly, register_module): Make sure
14480 `domain->rejobject_hash' is already created.
14482 2005-07-02 Martin Baulig <martin@ximian.com>
14484 * class-internals.h
14485 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
14486 `MonoDynamicGenericClass'.
14488 2005-07-01 Lluis Sanchez <lluis@ximian.com>
14490 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
14491 returned by a field getter is null, since null is a valid value.
14493 2005-07-01 Martin Baulig <martin@ximian.com>
14495 * reflection.c (mono_reflection_generic_class_initialize): Update
14496 the `dgclass->fields [i].parent' to the correct class.
14497 (mono_image_get_fieldref_token): Use the declaring type, not the
14500 2005-07-01 Martin Baulig <martin@ximian.com>
14502 * loader.c (find_method): Also look in the interfaces; fixes #75429.
14504 2005-06-30 Ben Maurer <bmaurer@ximian.com>
14506 * threads.c (thread_cleanup): assert that thread != NULL
14507 (wait_for_tids_or_state_change): We were using the wrong variable
14508 when accessing wait->threads. `i' was always out of the bounds of
14511 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14513 * loader.c: map user32 and kernel32 to libMonoSupportW
14515 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
14517 * appdomain.c (unload_thread_main): Mark this as WINAPI.
14519 2005-06-28 Martin Baulig <martin@ximian.com>
14521 * loader.c (method_from_methodspec): Fix #75334.
14523 2005-06-28 Martin Baulig <martin@ximian.com>
14525 Fix #74953 - Arrays now implement the generic IList<T> interface
14526 on the 2.0 platform.
14528 * class-internals.h (MonoDefaults): Added `generic_array_class'.
14530 * reflection.c (mono_class_bind_generic_parameters): New public
14531 function; similar to mono_reflection_bind_generic_parameters(),
14532 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
14534 * domain.c (mono_init_internal): Try to initialize.
14535 `mono_defaults.generic_array_class' here; this'll only succeed if
14536 we're using the 2.0 corlib.
14539 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
14540 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
14541 (mono_lookup_internal_call): Added support for nested classes.
14544 (mono_get_method_from_token): Set `result->signature->pinvoke' if
14545 we're an interncall and have generic arguments.
14548 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
14549 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
14550 instance of System.Array.InternalArray<T> for arrays, so they
14551 implement the generic IList<T> interface.
14553 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
14555 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
14556 (chastamar@yahoo.com). Fixes #75374.
14558 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
14560 * culture-info-table.h: regenerated.
14562 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14564 * icall.c: handle spaces correctly for base64 strings.
14566 2005-06-26 Ben Maurer <bmaurer@ximian.com>
14568 * *.c: Kill some warnings.
14570 2005-06-23 Duncan Mak <duncan@novell.com>
14572 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
14573 that this builds on Solaris 10 (x86).
14575 2005-06-23 Martin Baulig <martin@ximian.com>
14578 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
14579 generic type definitions.
14581 2005-06-23 Martin Baulig <martin@ximian.com>
14585 * metadata.c (mono_class_get_overrides): Renamed to
14586 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
14587 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
14588 pass it to mono_get_method_full().
14590 2005-06-22 Ben Maurer <bmaurer@ximian.com>
14592 * reflection.c (mono_reflection_create_runtime_class): take the
14593 mono_domain_lock in this method. Prevents deadlocks
14595 2005-06-22 Martin Baulig <martin@ximian.com>
14597 * loader.c (method_from_methodspec): Fix #75330.
14599 2005-06-22 Martin Baulig <martin@ximian.com>
14601 * reflection.c (type_get_qualified_name): Use
14602 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
14603 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
14604 argument; use it if we don't have an assembly name.
14606 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
14608 * object.c: In mono_message_init, set "copy out" flag for in
14609 parameters with the [Out] flag.
14611 2005-06-21 Martin Baulig <martin@ximian.com>
14614 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
14617 2005-06-21 Martin Baulig <martin@ximian.com>
14619 * class.c (mono_class_init): Don't initialize `class->fields' for
14620 generic instances since they're initialized again in
14621 compute_field_layout().
14622 (compute_field_layout): Set the field's `generic_info' here; fix
14625 2005-06-21 Martin Baulig <martin@ximian.com>
14627 * class-internals.h
14628 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
14630 * metadata.c (mono_metadata_generic_method_equal): Also
14631 distinguish the `generic_class'; fixes #75334.
14633 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14637 * domain-internals.h:
14638 * reflection.c: 'domain_assemblies' field is now protected by its own
14639 lock. Don't call into managed code to run the AssemblyLoad event if we
14640 now there are no registered delegates for it.
14642 2005-06-20 Martin Baulig <martin@ximian.com>
14644 * class.c (mono_class_is_assignable_from): Use a custom version of
14645 mono_class_has_parent() to make things work for generic instances;
14648 2005-06-20 Martin Baulig <martin@ximian.com>
14650 * loader.c (method_from_methodspec): Apply a patch from
14651 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
14653 2005-06-20 Martin Baulig <martin@ximian.com>
14655 * class.c (mono_class_init): Reverted Zoltan's last change; it
14658 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
14660 * threads.c (wait_for_tids_or_state_change): Add missing locking.
14662 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14664 * socket-io.c: fix the index in the socket array for writable/error
14665 sockets. Fixes bug #75306.
14667 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
14669 * class.c (mono_class_init): Allow interfaces to have static ctors.
14671 2005-06-17 Martin Baulig <martin@ximian.com>
14673 * loader.c (method_from_methodspec): Use `context->container' when
14674 parsing the `gmethod->inst'.
14676 2005-06-17 Martin Baulig <martin@ximian.com>
14678 * class.c (mono_type_get_name_recurse): Don't add the assembly
14679 name for type arguments.
14681 2005-06-15 Martin Baulig <martin@ximian.com>
14683 * reflection.c (mono_image_get_inflated_method_token): Encode
14684 correct klass; fixes #75260.
14686 2005-06-13 Michal Moskal <malekith@nemerle.org>
14688 * icall.c: Make GetCorrespondingMethod/Constructor take
14689 MonoReflectionMethod method not MonoMethod. Removed
14690 MonoType.GetCorrespondingField, and make
14691 MonoGenericType.GetCorrespondingField take name not
14694 2005-06-13 Michal Moskal <malekith@nemerle.org>
14696 * reflection.c (field_encode_signature, encode_locals):
14697 Make sizes of buffers for types larger (for big generic types).
14698 (create_generic_typespec,
14699 mono_reflection_sighelper_get_signature_local,
14700 mono_reflection_sighelper_get_signature_field):
14701 Add asserts for too small buffers.
14703 2005-06-15 Martin Baulig <martin@ximian.com>
14705 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
14706 if our parent is not a dynamic type.
14708 2005-06-15 Martin Baulig <martin@ximian.com>
14710 * class-internals.h (MonoTypeNameFormat): New enum.
14713 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
14714 (mono_type_get_full_name): Removed.
14715 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
14716 argument instead of the boolean's.
14718 * icall.c (ves_icall_System_MonoType_getFullName):
14719 Added `gboolean assembly_qualified'.
14722 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
14724 * reflection.c (mono_reflection_parse_type): Parse the new type
14727 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14729 * icall.c: no need to convert from utf16 to utf8 and then back again
14730 after the call to GetLogicalDrives.
14732 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14734 * icall.c: frombase64. Fix problems exposed by new tests.
14736 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14738 * icall.c: added internal calls for converting char [] and strings in
14739 base64 into byte [].
14741 2005-06-10 Martin Baulig <martin@ximian.com>
14743 * class.c (mono_class_create_generic_2): Read the nested classes
14744 from the metadata rather than from `gklass->nested_classes' since
14745 `gklass' might not be initialized yet.
14747 2005-06-09 Duncan Mak <duncan@novell.com>
14749 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
14750 all public headers. Fixes #74919.
14752 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
14754 * domain.c: The key for proxy_vtable_hash is now a pointer
14755 array. Added new GHashFunc and GCompareFunc functions for this.
14757 * class.h: The list of interfaces in MonoRemoteClass is known in
14758 advance and can't grow (we create a new MonoRemoteClass if needed),
14759 so now the interface array can be allocated together with
14762 * object.c: Added a new method create_remote_class_key.
14763 Fixed mono_remote_class so it does not depend on
14764 mono_upgrade_remote_class.
14765 Removed extend_interface_array.
14766 Added new method clone_remote_class(), which makes a copy of a remote
14767 class and adds a new interface or class to it.
14768 mono_upgrade_remote_class() now creates a new remote class (or gets
14769 it from the cache) if an vtable upgrade is needed. In this way
14770 we make sure that other objects sharing the same remote class
14771 don't get the new vtable with unwanted interfaces.
14773 * object-internals.h:
14774 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
14776 * marshal.c: Track changes in mono_upgrade_remote_class().
14778 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
14779 * icall.c: Add runtime methods for obtaining members of inflated
14780 class, which were created from supplied non-inflated members. It
14781 is used in internal Get{Method,Constructor,Field} methods in
14784 2005-06-09 Martin Baulig <martin@ximian.com>
14787 (mono_reflection_bind_generic_method_parameters): Fix #75169.
14789 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14790 * reflection.c (mono_image_basic_init): Define
14791 Version in MonoDynamicAssembly.
14793 2005-06-08 Martin Baulig <martin@ximian.com>
14798 (mono_method_signature_full): New public method; takes a
14799 `MonoGenericContext *'.
14800 (find_method): Use mono_method_signature_full() and pass the
14801 klass'es context to it.
14803 * class.c (mono_class_is_inflated_method): Use
14804 mono_method_signature_full() and pass the context to it.
14806 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
14808 * object.c: add proper locking in mono_remote_class_vtable(),
14809 fixes possible memory corruption.
14811 2005-06-08 Michael Meeks <michael.meeks@novell.com>
14813 * marshal.c (mono_remoting_marshal_init): set
14814 initialized after initialization.
14816 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
14818 * locales.c : hush.
14820 2005-06-06 Michael Meeks <michael.meeks@novell.com>
14822 * object.c (extend_interface_array): fix really silly
14823 memory corrupting / comparison bug.
14825 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14827 * reflection.c: Functions added to support the creation
14828 of CustomAttributeData, which includes Attribute data
14829 used by ReflectionOnly methods.
14831 * reflection.h: mono_reflection_get_custom_attrs_data and
14832 mono_custom_attrs_data_construct added (functions exposed).
14834 * icall.c: Added mono_reflection_get_custom_attrs_data
14837 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
14839 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
14842 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
14844 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
14846 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
14847 dynamic DllImportAttribute.
14849 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
14850 dynamic DllImportAttribute.
14852 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
14855 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14857 * threads.c: avoid segfault when an unstarted thread is aborted.
14859 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
14861 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
14862 Returns the name and version of the runtime for reporting.
14864 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14866 * appdomain.c: bump corlib version.
14867 * object-internals.h: new field in MonoReflectionAssembly.
14869 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14871 * object-internals.h: Carlos forgot to add this field.
14873 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14875 * icall.c: Added create_version to create instances
14876 of Version of MonoReflectionAssemblyName. This change helps
14877 the AssemblyName tests to keep running fine.
14879 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
14881 * object.c (mono_method_return_message_restore): A somehow less
14882 intrusive fix for #75138.
14884 2005-06-03 Raja R Harinath <rharinath@novell.com>
14886 * object.c (mono_method_return_message_restore): Fix computation
14887 of expected number of out args.
14889 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
14891 * reflection.c (mono_image_get_method_info): Fix the case when the
14894 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
14896 * object.c: Added missing null check in
14897 mono_method_return_message_restore.
14899 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
14901 * reflection.c (mono_image_get_method_info): Handle the case when
14904 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
14906 * object.c: When creating the vtable for a proxy, take into account
14907 all inherited interfaces, not only the ones registered in
14908 iclass->interfaces. This fixs bug #74996.
14909 Also, in mono_method_return_message_restore, verify that the array
14910 of out args has the expected lengh.
14912 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14914 * socket-io.c: update the timeout in Poll when the call is interrupte.
14916 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14918 * socket-io.c: support abort/suspend in Select_internal after last
14921 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14923 * threadpool.c: remove warning.
14925 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14928 * socket-io.[ch]: Select_internal uses poll() now when available, thus
14929 removing the 1024 limit from select(). Runtime part of the fix for
14932 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14934 * socket-io.c: when resolving the addresses for the same
14935 host returned by gethostname(), get the local IPs from the interface
14936 list. Loopback addresses are discarded if the are interfaces up with
14937 non-loopback ones. Fixes bug #63265.
14939 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
14941 * appdomain.c, verify.c, object-internals.h, reflection.c:
14942 bumped corlib number to 36, and added new extra_flags field
14943 to ReflectionMethodBuilder and friends. Fixes #75060.
14945 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
14947 * gc.c: register a new weak link only if the object is non-null
14950 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
14952 * culture-info.h : short time pattern too.
14954 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
14956 * culture-info.h : expand long time pattern string length.
14958 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
14960 * culture-info-table.h : update (more French date format; #72788).
14962 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
14964 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
14965 the method is static. Fixes #75029.
14967 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
14969 * reflection.c: Update the table_idx field of method builders after
14970 saving the module, since it can change. This is a workaround for
14973 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
14975 * culture-info-table.h : update (additional French date format).
14977 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
14979 * icall.c (ves_icall_type_Equals): Revert last change.
14981 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
14983 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
14985 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
14987 * class-internals.h: Added executioncontext_class field to
14988 MonoDefaults structure.
14989 * domain.c: Cache System.Threading.ExecutionContext class in
14991 * object.c: Capture the ExecutionContext for asynchroneous calls in
14992 mono_async_result_new.
14993 * object-internals.h: Added execution_context and original_context
14994 fields to MonoAsyncResult. Added execution_context to MonoThread.
14995 * security-manager.c|.h: Added mono_get_context_capture_method to
14996 return the capture method (if required by the security manager or by
14997 the framework version used).
14998 * threadpool.c: Apply capture (if present) ExecutionContext in
14999 mono_async_invoke and revert to original context after it completes.
15001 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
15003 * culture-info-table.h : updated (real hacky solution for zh-CHT).
15005 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
15007 * culture-info-table.h : zh-CHT related workaround.
15009 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
15011 * marshal.c (emit_marshal_custom): Add some error checking and call the
15012 methods in the ICustomMarshaler interface. Fixes #74875.
15014 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
15015 native->managed wrappers.
15017 2005-05-12 Martin Baulig <martin@ximian.com>
15019 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
15020 here and use the loader lock.
15022 * mono-debug.c: Properly lock when the debugger is not attached.
15023 (mono_debug_init): Release the initial lock if we're not running
15026 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
15028 * marshal.c (emit_marshal_custom): Pass through NULL values without
15029 calling the custom marshalling routines.
15031 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
15032 conversion in structures. Fixes #74882.
15034 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
15036 * culture-info-table.h : zh-* cultures were missing.
15038 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
15040 * threads.c: Added a new event background_change_event which is signaled
15041 when a thread changes its background mode.
15042 Moved here several checks previously done in managed code. The checks
15043 require the thread lock, and using the thread lock in managed code
15044 can result in deadlocks.
15045 Merged Start_internal and Thread_internal into a single method. Now
15046 Thread_internal does all work of creating and starting a thread.
15047 Added icalls for setting and getting the state of the object. Moved from
15048 managed code to avoid locking there.
15049 Added wait_for_tids_or_state_change() which is called instad of
15050 wait_for_tids when waiting for non-backround threads to end. This method
15051 will return if one of the threads ends or the background_change_event
15053 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
15054 the background mode. This method signals the background_change_event
15057 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
15058 removed Start_internal.
15060 2005-05-11 Martin Baulig <martin@ximian.com>
15062 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
15063 to order of some fields to get proper alignment on 64-bit machines.
15065 2005-05-11 Martin Baulig <martin@ximian.com>
15067 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
15068 changes as they're broken and completely fuck up the debugger.
15070 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
15072 2005-05-10 Martin Baulig <martin@ximian.com>
15074 * reflection.c (mono_reflection_generic_class_initialize): Don't
15075 call mono_class_setup_parent() here.
15077 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15079 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
15080 send/receive timeout use an integer in milliseconds. We were using a
15083 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15086 (internal_get_cultures): reserve the first slot of the array for the
15087 InvariantCulture, which will be filled in managed code.
15089 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
15091 * reflection.c (mono_image_fill_module_table): Initialize the
15092 GENERATION field as well.
15094 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15096 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
15097 Monitor.Enter on the object.
15099 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
15101 * threads.c: Enable the wait for running threads when exiting.
15102 * icall.c: Suspend all threads before exiting.
15104 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
15106 * assembly.c (mono_assembly_load_reference): Fix warning.
15108 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15110 * threadpool.c: changed the default number of threads per cpu. From now
15111 on, the default will be 20 + (5 * number of cpus) instead of 50.
15113 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
15115 * loader.c (mono_method_get_signature_full): Add locking here.
15117 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
15119 * appdomain.c: Moved methods for parsing and freeing assembly
15120 names to assembly.c.
15121 * assembly.c, domain-internals.h: Created public methods for parsing
15122 assembly names. Fixed mono_assembly_load_with_partial_name:
15123 it now finds the best match, taking into account the version,
15124 token and culture specified in the partial name. Also return
15125 the latest version if no version information is specified.
15127 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
15129 * threadpool.c: replace check for SocketAsyncCall class.
15131 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15133 * threadpool-internals.h:
15134 * Makefile.am: added threadpool-internals.h
15136 * threadpool.c: call mono_unhandled_exception on exceptions not handled
15137 that happen in threadpool threads (tested on MS).
15138 (mono_thread_pool_remove_socket): new function that dispatch any pending
15139 AIO call on a socket that is closing. By now only epoll really needs it,
15140 as select/poll wake up when the socket closes.
15143 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
15145 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
15147 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
15149 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
15151 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
15153 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
15155 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
15156 has an abort request, convert it into a suspend request.
15158 2005-04-30 Ben Maurer <bmaurer@ximian.com>
15160 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
15161 warning for the usage of `UnmanagedFunctionPointerAttribute' which
15162 is not supported yet.
15164 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15166 * image.c: register assemblies loaded from data (bundles) in the loaded
15167 assemblies hash. Fixes bug #74772.
15169 2005-04-29 Martin Baulig <martin@ximian.com>
15171 * class.c (mono_type_get_name_recurse): Update to the new naming
15172 schema from the latest .NET 2.x beta2.
15173 (mono_class_setup_vtable_general): If we're a generic instance,
15174 copy the vtable from our generic type definition and inflate all
15177 * loader.c (find_method): Update to the new naming schema from the
15178 latest .NET 2.x beta2.
15180 2005-04-29 Raja R Harinath <harinath@gmail.com>
15182 * class.c (mono_class_init): Add a mono_loader_unlock to the
15185 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
15187 * icall.c (ves_icall_System_Environment_Exit): Remove the
15188 suspend_all_other_threads () call for the time being, since it can hang.
15190 * threads.c (mono_thread_manage): Similarly, disable the waiting for
15191 the background threads to exit, since it can also hang.
15193 * class.c (mono_class_init): Applied patch from Ankit Jain
15194 (radical@gmail.com). Avoid pending init errors when a field refers
15195 to a nested class using a typeref. Fixes #74734.
15197 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
15198 this for dynamic modules.
15200 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15202 * threads.c: don't wait for threads that are in the process of aborting
15203 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
15204 and waiting for background threads to finish. This makes xsp and
15205 mod-mono-server exit without random length delays and/or hangs.
15207 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15209 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
15211 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
15213 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
15214 dynamic types to prevent infinite loops. Fixes #74727.
15216 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
15217 ..._is_assignable_to.
15219 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
15221 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
15223 2005-04-25 Martin Baulig <martin@ximian.com>
15225 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
15228 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
15230 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
15232 * reflection.c (build_compressed_metadata): Set metadata header
15235 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
15237 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
15238 number into an integral and a decimal part. Fixes #70473.
15240 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
15242 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
15244 * culture-info-table.h : reflected the latest locale-builder output.
15246 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15248 * threadpool.c: check for SuspendRequested too when deciding if
15249 mono_thread_interruption_checkpoint should be called.
15251 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15253 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
15254 * threads.c: remove interruption_mutex and use Interlocked instead. When
15255 suspending all the threads, wait for all the suspended events at once.
15256 If we're shutting down and get an APC that is going to be queued,
15257 call mono_thread_execute_interruption immediately, as the thread might
15258 be sleeping on a pthread condition or mutex.
15260 * icall.c: call mono_runtime_set_shutting_down before suspending the
15263 Fixes bug #74693. And now xsp is happier when exiting.
15265 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
15267 * loader.c (mono_stack_walk): Fix #74690.
15269 2005-04-22 Martin Baulig <martin@ximian.com>
15271 * mono-debug.h (MonoDebugMethodJitInfo): Added
15272 `MonoDebugMethodJitInfo *jit'.
15274 * mono-debug.c (mono_debug_read_method): Cache the
15275 MonoDebugMethodJitInfo in `address->jit'.
15276 (mono_debug_free_method_jit_info): New public method.
15278 2005-04-22 Martin Baulig <martin@ximian.com>
15280 * class.c (mono_class_is_assignable_from): Disallow
15281 type parameter -> interface.
15283 2005-04-21 Dick Porter <dick@ximian.com>
15285 * threads.c (mono_thread_create): Turn an assertion into an error.
15287 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
15289 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
15291 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
15292 Fix some gcc 4.0 warnings.
15294 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
15296 * file-io.c: fix alt dir separator char on unix systems
15297 and cleanup (fixes bug #71214).
15299 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
15301 * marshal.c: Use CALLVIRT instead of CALL when dispatching
15302 a call to a remote domain, since the method may be an
15303 interface method in the client domain. This fixes bug #74192.
15305 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15307 * threadpool.c: recv/send are now performed before going back to managed
15308 code to save one transition.
15310 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15312 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
15314 * metadata/threadpool.c: removed hack to workaround the bug above.
15318 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
15320 * reflection.c reflection.h: Fix handling of parameter defaults in
15321 dynamic methods. Also fixes handling of parameter attributes.
15324 * mono-debug.c (mono_debug_close_image): Fix warning.
15326 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15328 * socket-io.h: replaced old unused field with new 'blocking'.
15329 * threadpool.c: restore socket blocking state on windows(tm).
15331 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
15333 * icall.c: don't return the codebase in the AssemblyName[] returned by
15334 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
15335 * object-internals.h: Removed FIXME (fields were presents) and fixed
15336 versioncompat declaration.
15338 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15340 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
15341 not closed, so don't cleanup when it happens.
15343 2005-04-13 Chris Toshok <toshok@ximian.com>
15345 * mono-debug-debugger.h: change prototype for
15346 mono_debugger_lookup_type.
15348 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
15349 this function, although it should probably be named
15350 mono_debugger_init_type.
15352 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15354 * threadpool.c: fix non-AIO case.
15356 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
15358 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
15359 the built-in profiler to measure just JIT compilation times.
15361 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15363 * threadpool.c: the epollfd might be closed by another thread at
15364 any time, so ignore EBADF at treat it as a "we're closing" sign.
15366 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15368 * threadpool.c: release the semaphores with a count equals to the number
15369 of working threads in both IO and regular pools. Fixed typo that messed
15370 up the count of IO pool threads. Don't initialize the pipe handles if
15373 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15375 * threadpool.c: some systems don't like a NULL when deleting the socket
15378 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15380 * threadpool.c: fix semaphore allocation.
15382 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15384 * threadpool.c: added epoll() based implementation for asynchronous IO
15385 that is used instead of the default poll() when available.
15386 It can be disabled by setting MONO_DISABLE_AIO.
15388 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15390 * threadpool.c: windows needs 'closesocket' and instead of returning
15391 0 when the stream is closed while in select, it returns -1. Fixes bug
15394 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
15396 * class.c (class_compute_field_layout): Fix the regression caused by
15399 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15401 * threadpool.c: separate pool for socket async. IO.
15402 * threadpool.h: mono_max_worker_threads is not a global any more.
15404 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
15406 * class.c (class_compute_field_layout): Fix #74549.
15408 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15410 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
15411 use 2 connected sockets instead.
15413 2005-04-08 Miguel de Icaza <miguel@novell.com>
15415 * mono-config.c: Add new entry point for mkbundle
15416 mono_config_parse_memory.
15418 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15420 * threadpool.c: removed another unused function.
15422 2005-04-08 Ankit Jain <radical@corewars.org>
15424 * reflection.c (get_default_param_value_blobs): Add 'types'
15425 parameter to get the types encoded in the constant table.
15426 (mono_param_get_objects): Use the type from the constant table,
15427 not the type of the parameter, when creating default values.
15428 Handle null default values correctly.
15430 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15437 * socket-io.c: removed dead code for async IO.
15439 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15441 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
15443 * threadpool.c: intercept socket async. calls and pass them to a thread
15444 that is polling and dispatching the job items to the threadpool as
15445 socket become ready. Fixes bugs #71217, #71933.
15447 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
15448 between char and short/ushort arrays.
15450 * socket-io.c: remove dead code.
15452 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
15455 icall.c : removed InternalToUpper_Comp() and
15456 InternalToLower_Comp().
15458 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
15460 * char-conversions.h : The tables were incorrectly generated. Should
15461 be generated against invariant culture.
15463 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
15465 * object.c (mono_runtime_invoke_array): Fix return value when
15466 passing pre-created valuetype objects to ctors.
15468 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
15469 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
15472 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
15474 * domain.c: removed g_assert for runtimesecurityframe_class. This is
15475 only used with --security and hides the wrong corlib version error.
15477 2005-03-30 Joshua Tauberer <tauberer@for.net>
15479 * class.c: Changed mono_class_name_from_token so that types
15480 outside of a namespace don't have an initial period. Improved
15481 the g_warning message used in _mono_class_get when loading
15483 * assembly.c: In mono_assembly_load_reference, when an assembly
15484 can't be found, "No such file or directory" is misleading and
15485 unhelpful because a few paths were checked for the presence of
15486 the assembly. When that happens (ENOENT), display a nicer
15487 message indicating the directories that were searched. In all
15488 cases, the warning is made easier to read for non-hackers.
15490 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
15492 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
15494 * appdomain.h|domain.c: Removed inline from functions.
15495 * appdomain.c: Reduced warnings when compiling on windows.
15496 * icall.c: Fixed output_debug declaration to gunichar2*.
15497 * mono-config.c: Reduced warnings when compiling on windows.
15498 * rand.c: Added missing "windows.h". Added missing return value.
15499 * rawbuffer.c: Added missing winsock2.h for windows.
15500 * sysmath.h: Added mono-compiler.h header to allow/ease
15501 compilation with non-GCC compilers.
15502 * threads.c: Fixed declarations to compile with VS.NET C compiler.
15503 Removed cast warnings.
15505 Adapted from the work of J Lothian (for VC6).
15507 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
15509 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
15512 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
15514 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
15517 2005-03-27 Raja R Harinath <harinath@gmail.com>
15519 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
15520 has to be in $(exec_prefix). $(prefix) is for arch-independent
15521 stuff, and it would probably use $(prefix)/share rather than
15524 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15526 * console-io.c: added 2 includes that might be missing.
15528 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
15530 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
15533 * reflection.c (create_custom_attr): Allocate the params array using
15534 alloca so it gets GC tracking.
15536 2005-03-23 Chris Toshok <toshok@ximian.com>
15538 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
15541 2005-03-24 Raja R Harinath <rharinath@novell.com>
15543 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
15544 changes to pick up any changes in prefix, etc.
15546 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
15548 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
15550 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
15551 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
15553 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
15555 * class-internals.h object-internals.h class.c reflection.c: Extend the
15556 mono_lookup_dynamic_token () function to return the class of the
15559 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
15560 well. Fixes #73848.
15562 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
15564 * security-manager.c: Skip inheritance checks for intra-corlib
15565 class inheritance and method overrides. This skips a lot of checks
15566 and (anyway) permissions cannot work until corlib is loaded.
15568 2005-03-23 Martin Baulig <martin@ximian.com>
15570 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
15571 MONO_TYPE_GENERICINST.
15573 2005-03-23 Martin Baulig <martin@ximian.com>
15575 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
15577 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15579 * class.c: added locking comments to some functions.
15580 Cache the interface offsets arrays (saves about 20 KB
15581 of runtime memory in a typical app).
15582 Reduce the time overhead in mono_class_setup_supertypes ().
15584 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
15586 * icall.c: speedup and fix leaks in GetMethodsByName and
15587 GetPropertiesByName.
15589 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
15591 * reflection.c: some locking fixes.
15593 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
15595 * metadata.c: added missing break in case statement.
15597 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
15599 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
15600 typedbyref return values. Fixes #73941.
15602 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
15604 * security-manager.c|h: Added demandunmanaged method and
15605 suppressunmanagedcodesecurity class to MonoSecurityManager.
15606 Renamed aptc class to allowpartiallytrustedcallers.
15608 2005-03-17 Martin Baulig <martin@ximian.com>
15610 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
15612 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15614 * file-io.c: disabled file async. IO using aio_*. It uses the
15615 threadpool now. Workaround for bug #73718.
15617 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
15619 * assembly.h, mono-config.c: added code to deal with bundled configs
15620 for bundled assemblies.
15622 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
15624 * *.c, private.h: cleanup, removing old private.h header file.
15626 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
15628 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
15629 and throw_on_unmappable_char attributes.
15631 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
15633 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
15634 _ProcessName_internal.
15636 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
15638 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
15641 * icall.c threads.c threads-types.h: Remove slothash icalls as they
15642 are no longer used.
15644 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
15646 * object.c (compute_class_bitmap): Add support for generics. Fixes
15649 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
15651 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
15653 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15655 * filewatcher.c: commented out the code for windows watcher, as we don't
15656 use it (we use the managed implementation instead).
15658 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
15660 * object-internals.h (MonoThread): Remove 'unused1' field.
15662 * appdomain.c: Bump corlib version.
15664 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
15666 * reflection.c (mono_reflection_create_runtime_class): Remove the
15667 AssemblyBuilder.Save optimization since it causes too many problems.
15669 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
15671 * exception.c|h: Added mono_get_exception_reflection_type_load to
15672 create a ReflectionTypeLoadException object.
15673 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
15674 to return NULL is a InheritanceDemand fails during reflection. Updated
15675 ves_icall_System_Reflection_Assembly_GetTypes to throw a
15676 ReflectionTypeLoadException if an InheritanceDemand fails during
15677 reflection. Added icall mapping for GetLinkDemandSecurity.
15678 * security-manager.c|h: Added ves_icall_System_Security_
15679 SecurityManager_GetLinkDemandSecurity internal call to return the
15680 class and methods permissions set for a LinkDemand. Removed unused
15681 fields in MonoSecurityManager.
15683 2005-03-10 Martin Baulig <martin@ximian.com>
15685 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
15686 it's a generic instance.
15688 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
15690 * reflection.c (mono_get_object_from_blob): Applied patch from
15691 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
15693 * class.c (mono_class_is_assignable_from): Another try at fixing
15694 #73469 without breaking anything.
15696 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
15698 * class.c: (mono_class_is_assignable_from): Revert the last changes
15699 since they don't work with generics.
15701 * class.c (mono_class_is_assignable_from): Fix build bustage.
15703 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
15704 the managed IsAssignableFrom method. Fixes #73469.
15706 * reflection.c (mono_reflection_call_is_assignable_from): New helper
15709 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
15711 * object.c (mono_load_remote_field_new): Fix returning uninitialized
15712 memory when the remoting callback does not sets the out arguments.
15715 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
15718 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
15720 * object-internals.h (MonoStackFrame): Sync with managed object layout.
15722 * appdomain.c: Bump corlib version.
15724 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
15726 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
15729 * threads.c (mono_thread_attach): Detect threads which are not started
15730 by the GC pthread wrappers.
15732 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
15734 * icall.c: Added new icall for RNG.
15735 * rand.c|h: Added new icall to open the RNG. This allows to share a
15736 single handle on Linux to access /dev/urandom and fix #73183.
15738 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
15740 * object.c: setting the new vtable in a transparent proxy object must
15741 not change the GC descriptor.
15743 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15745 * object.c: fixed compilation without GCJ support.
15746 * reflection.c: for runtime-created types ensure klass->has_references
15747 is correct (bug #73215).
15749 2005-03-02 Martin Baulig <martin@ximian.com>
15751 * class.c (mono_class_is_assignable_from): Make this work if
15752 `oklass' is a generic instance; fixes #72831.
15754 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
15756 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
15759 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
15761 * marshal.c: Reorganize native->managed marshalling code to also use
15762 the emit_marshal_... functions.
15764 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
15766 * object.c: typed allocs have issues with bitmap sizes > 30,
15767 so check for max_set >= 30.
15769 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
15771 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
15772 managed code. Fixes #73012.
15774 * metadata.h (MonoMarshalSpec): Add elem_mult field.
15776 * metadata.c reflection.c: Load/Emit elem_mult as well.
15778 * metadata.h (MonoMarshalSpec): Add comment.
15780 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
15782 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
15783 num_elem to -1 if not given.
15785 * object-internals.h (MonoReflectionMarshal): Add has_size field.
15787 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
15790 2005-03-01 Marek Safar <marek.safar@seznam.cz>
15792 * null-gc.c (mono_gc_free_fixed): Was not compilable.
15794 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
15796 * reflection.c (encode_marshal_blob): Encode param_num field as well.
15798 * object-internals.h (MonoReflectionMarshal): Add param_num field.
15800 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
15802 * object.c: generalized the reference bitmap creation
15803 and added hooks for the new GC.
15804 * class-internals.c: removed the gc_bitmap field from MonoClass.
15806 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15808 * domain.c: help the compiler to produce better code
15809 in mono_jit_info_table_find ().
15811 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
15813 * object.c: make all allocations look typed.
15815 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15817 * socket-io.c: load Mono.Posix if it's not loaded already
15820 2005-02-24 Martin Baulig <martin@ximian.com>
15822 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
15823 * reflection.c (dup_type): Likewise.
15825 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
15827 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
15828 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
15830 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15832 * domain.c, threads.c, object-internals.h: make the critical thread
15833 local vars use the fast access mode (even when we're compiled in
15834 a lib). Provide accessors to be used by the jit during codegen.
15836 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
15838 * appdomain.c: Changed hook functios behavior to include
15839 support for the reflection only assemblies. Some icalls were changed
15840 to support the mentioned assemblies too. Signatures of static methods
15841 try_assembly_resolve and real_load now have an additional parameter:
15844 * assembly.c: General changes to mono_assembly_ methods to support
15845 reflection only api. Functions mono_assembly_open, mono_assembly_load,
15846 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
15847 suffix, to support an additional gbool parameter to specify whether
15848 the assembli is reflection only or not. Created some new hook functions
15849 to add support for reflection only assemblies. Signatures of static
15850 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
15851 have now an additional parameter: refonly.
15853 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
15854 indicating whether the assembly is reflection only or not.
15856 * exception.c: Add mono_get_exception_invalid_operation.
15858 * icall.c: Throw an InvalidOperationException when trying to invoke
15859 a property/method/event, or trying to set/get the value of a field.
15860 Also add an icall to retrieve the ref_only flag to the
15861 MonoReflectionAssembly.
15863 2005-02-23 Chris Toshok <toshok@ximian.com>
15865 Part of fix for #72827.
15866 * mono-debug.c (mono_debug_add_method): add lexical block data to
15867 the info we write. Kind of a hack at the moment - we copy the
15868 lexical block info from the MonoDebugMethodInfo to the
15869 MonoDebugMethodJitInfo here, before writing it.
15870 (mono_debug_read_method): read the lexical block info.
15872 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
15874 * debug-mono-symfile.h: add lexical block support.
15876 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
15879 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
15881 * loader.c (mono_lookup_pinvoke_call): Fix warning.
15883 * object.c (mono_runtime_free_method): Call mono_free_method () and
15884 put the TODOs there.
15886 * loader.c (mono_free_method): Free up most memory allocated for
15889 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15891 * reflection.c: properly flag a Type argument to a
15892 named custom attr value (bug #72248).
15894 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15896 * reflection.c: reduce code duplication in named custom
15897 attribute encoding.
15899 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
15901 * reflection.c: properly encode custom attrs of type object
15904 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
15906 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
15908 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
15910 * socket-io.c: load System.dll if it's not loaded already
15911 (bug #72850 and #70477).
15913 2005-02-21 Martin Baulig <martin@ximian.com>
15915 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
15918 2005-02-21 Martin Baulig <martin@ximian.com>
15920 * reflection.c (mono_image_build_metadata): We also need to
15921 "fixup" the MethodImpl table after we computed the final method
15922 indices. Call fixup_methodimpl() to do that.
15923 (fixup_methodimpl): New private method.
15925 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
15927 * assembly.c: special case mscorlib.dll (bug#72536),
15928 patch from Carlos Alberto Cortez.
15930 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
15932 * threads-types.h threads.c: Fix build bustage.
15934 * threads.c: Use a union for long<->double conversions.
15936 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
15937 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
15939 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
15940 containing the checkpoint call with NOT_TAKEN.
15942 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
15943 checkpoint before pushing the arguments, so they won't have to be
15946 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15948 * domain.c, assembly.c, domain-internals.h: make some data
15949 const and relocation-free.
15951 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
15953 * object.c, appdomain.c, class-internals.h: introduce the
15954 MonoClassRuntimeInfo structure to hold the info needed to
15955 use a class at runtime. Made mono_class_vtable() lock-free
15956 for all the appdomains.
15958 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
15960 * metadata-internals.h, image.c: introduce a per-image mempool to
15961 be used for memory that has the same lifetime as the image.
15963 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
15965 * domain.c: In mono_init_internal(), instead of selecting the first
15966 runtime version supported by an executable, get a list of all
15967 supported versions and select the one for which an mscorlib exists
15968 (since even if the runtime supports a given version, it doesn't mean
15969 that the framework for that version is installed).
15970 Modified get_runtimes_from_exe to support this behavior.
15971 In supported_runtimes, added information about additional system
15974 * assembly.c: Added support for more than one system assembly version
15975 per runtime version. Updated the assembly list.
15976 In mono_assembly_remap_version, removed the initial version check,
15977 since we don't know to which version we need to compare until we
15978 get the version set on which the assembly is based.
15979 Moved the code for loading corlib into the new method
15980 mono_assembly_load_corlib(), so it can be used by the initialization
15983 * domain-internals.h: Updated data structures and added declaration
15984 for mono_assembly_load_corlib.
15986 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
15988 * reflection.c (resolve_object): Fix the creation of the signature in
15989 the SignatureHelper case.
15991 * assembly.c (mono_assembly_remap_version): Fix binary search.
15993 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
15995 * class.c: Added inheritance check when a method is overloaded (from a
15996 virtual method or when implementing an interface) and when a class is
15997 inherited. Added functions to set a failure for a class and to
15998 retreive the exception from a failure.
15999 * class-internals.h: Added fields to MonoClass to keep the exception
16000 information status for inheritance (or other exceptions) to be thrown
16001 later (i.e. not at load time).
16002 * object.c: Throw the inheritance SecurityException when a type is to
16003 be created with either class or method inheritance violations.
16004 * reflection.c|h: Fix when getting declsec from a class. Removed
16005 unrequired code for class. Improved sanity in parameter naming.
16006 * security-manager.c|h: Added functions to check for class and method
16009 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
16011 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
16012 and has_finalize in dynamic types as well.
16014 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
16016 * culture-info-table.h : fixed currency format for en-GB (and so on).
16018 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
16020 * gc.c: ensure the GC handles never have 0 as a value.
16022 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
16024 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
16025 a pointer to a struct to unmanaged code. Fixes #72625.
16027 2005-02-16 Martin Baulig <martin@ximian.com>
16029 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
16031 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
16033 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
16035 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
16037 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
16039 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
16040 UnmanagedFunctionPointerAttribute, use it for determining calling convention
16043 * reflection.c (mono_custom_attrs_get_attr): New helper function.
16045 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
16047 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
16049 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
16050 changes to make the current context a field in MonoThread.
16052 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
16054 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
16057 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
16058 extracted from mono_marshal_get_native_wrapper.
16060 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
16061 to create wrappers around native functions.
16063 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
16064 delegates for arbitrary function pointers. Fixes #71472.
16066 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
16068 * threads.c: cleaned up the code a little.
16070 2005-02-15 Martin Baulig <martin@ximian.com>
16072 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
16075 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
16076 allocate larger chunks if needed.
16078 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
16080 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
16083 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
16085 * domain.c: keep the domains in an array and ensure the domain ids
16086 are kept small, so they can be used as indexes to domain-specific data
16087 with a small memory overhead.
16089 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
16091 * icall.c: Handle byref types in Type icalls. Fixes #72544.
16093 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
16095 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
16097 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
16099 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
16101 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
16104 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
16106 2005-02-12 Ben Maurer <bmaurer@ximian.com>
16108 * domain-internals.h: add the hashtable here.
16110 * class-internals.h: Remove `info' from MonoMethod
16112 * domain.c: Add a new hashtable, jit_trampoline_hash
16114 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16116 * object.c: don't set the value of static fields
16119 2005-02-11 Martin Baulig <martin@ximian.com>
16121 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
16122 (mono_debug_add_method): Silently ignore the method if it's too big.
16123 (mono_debug_add_type): Likewise.
16125 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
16127 * threads.c, appdomain.c: remove #ifdefs from the code.
16129 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
16131 * metadata-internals.h: Added flags to MonoAssembly to cache the most
16132 common security informations. This allows us to stay in unmanaged code
16133 when doing LinkDemand and it's special cases (except for the first
16134 time for initialization). The flags a very much used with --security.
16135 * reflection.c|h: Added code to get declarative security attributes
16136 for LinkDemand and InheritanceDemand. This required to refactor the
16137 existing code for Demand.
16138 * security-manager.c|h: Added new method fields for the special cases
16141 2005-02-10 Martin Baulig <martin@ximian.com>
16143 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
16144 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
16146 2005-02-10 Martin Baulig <martin@ximian.com>
16148 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
16149 debugging code; this is almost a complete rewrite.
16151 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
16153 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16155 * domain.c, object.h: expose mono_string_equal () and
16156 mono_string_hash ().
16157 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
16158 it's implemented in managed code.
16160 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16162 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
16163 lo leak objects between appdomains.
16165 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16167 * assembly.c: old compilers compilation fix from
16168 robertj@gmx.net (Robert Jordan).
16170 2005-02-09 Ben Maurer <bmaurer@ximian.com>
16172 * class-internals.h: Little reminder for the future.
16174 * debug-helpers.c: Fix up wrapper_type_names
16176 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16178 * image.c, metadata-internals.h: when loading an image from a file,
16179 mmap all of it and use the same codepaths as when using a
16180 in-memory image: the code is simpler and we use less memory
16181 (both writable and readonly).
16183 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
16185 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
16186 API to alloc runtime data structures that need to be tracked by the
16187 GC and contain pointers.
16188 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
16189 make the code more readable and eventually use a different GC.
16191 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
16193 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
16196 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
16198 * object.c: In release_type_locks(), don't release the cctor lock
16199 if it has already been released. This fixes a crash in the
16202 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16204 * gc.c, marshal.c, icall.c: register a delegate for finalization
16205 only when the native function pointer has been allocated for it.
16207 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16209 * object.c: cleaned up some code, allocate objects that are
16210 pointer free with the atomic malloc variant. Allocate memory
16211 for static data from the mempool if it's pointer-free.
16212 Allocate the bounds array at the end of the array data, when needed.
16213 * object-internals.h, object.h: move a private function in a private
16215 * class.c: handle missing case in tracking references in fields.
16217 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
16219 * class.c, class-internals.h: keep track if a type has
16220 reference fields in either the instance or static fields.
16222 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
16224 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
16225 and renamed to MonoRuntimeInfo. Added fields to store the expected
16226 framework assembly version. Changed mono_get_framework_version and
16227 mono_get_runtime_version for a single mono_get_runtime_info method.
16229 * assembly.c: Added method to remap system assembly versions to the
16230 current executing runtime version. Removed old mapping code.
16231 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
16233 * icall.c, reflection.c: Track api changes.
16235 2005-02-06 Miguel de Icaza <miguel@novell.com>
16237 * loader.c (method_from_memberref): Improve error reporting,
16238 produce the class name instead of the typeref/typedef index.
16240 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
16242 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
16244 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
16246 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
16247 stdcall and charset name mangling. Reorganize the code and add
16248 some tracing stuff.
16250 2005-02-05 Ben Maurer <bmaurer@ximian.com>
16252 * monodiet.c: More iters!
16254 * marshal.c: Iter usage.
16256 * icall.c: Iter usage.
16258 * object.c: Use iters.
16260 * debug-helpers.c: More iters
16262 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
16264 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
16267 2005-02-05 Ben Maurer <bmaurer@ximian.com>
16269 * mono-debug-debugger.c: use iters
16271 * class.c, class-internals.h: mono_class_setup_events is static
16274 * All callers: use iters
16276 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
16278 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
16279 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
16281 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
16283 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
16285 * marshal.h: Add prototypes for ldfld/stfld_remote.
16287 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
16288 this is called during startup.
16290 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
16292 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
16293 MonoThreadsSync struct private in monitor.c. Changed the way
16294 MonoThreadsSync is allocated so it's faster and there is no
16295 need to keep track of it with a finalizer and it uses less memory.
16296 This also finally allows us to allocate mono objects as ptrfree when
16297 there are no reference fields.
16299 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
16301 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
16302 disappearing link to the GC interface and use them to simplify
16303 the gchandles code.
16305 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
16307 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
16308 stfld_remote which call mono_load/store_field_new. This allows methods
16309 calling ldfld/stfld wrappers to be AOTed.
16311 * console-io.c: Include sys/filio.h under solaris.
16313 * console-io.c: Include curses.h if needed correctly.
16315 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
16317 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
16318 method->klass as well.
16320 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
16322 * class.c (mono_class_init): Switch on lazy initialization of
16325 * class.c (mono_class_get_finalizer): Handle the case when the
16326 finalizer is inherited.
16328 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16330 * console-io.c: <curses.h> is needed by term.h on solaris.
16332 2005-02-03 Ben Maurer <bmaurer@ximian.com>
16334 * icall.c, class-internals.h, monodiet.c, class.c: Remove
16335 mono_class_setup_properties where possible. Remove this ftn from
16336 the header file, and make it static.
16338 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
16340 * loader.c: Add missing setup_... call.
16342 * class.c: Add missing setup_... calls.
16344 * class.c (mono_class_init): Switch on lazy initialization of
16345 the generic vtable.
16347 * class.c (mono_class_init): Fix generics broken by the recent changes.
16349 * monodiet.c (handle_type): Add missing setup_... calls.
16351 * class.c: Back out garbage in previous patch.
16353 * class.c: Add missing setup_... calls.
16355 * class.c (mono_class_get_method_from_name_flags): Avoid calling
16356 mono_class_setup_methods () if possible.
16358 * class-internals.h (MonoClass): Add 'has_cctor' flag.
16360 * class-internals.h (MonoCachedClassInfo): New structure.
16362 * class.c: Initialize properties and events fields of MonoClass lazily.
16364 * class.c: Add infrastructure for lazily initializing the methods and
16365 vtable fields of MonoClass. Not yet used.
16367 * class.c (mono_class_get_finalizer): New helper function.
16369 * class.c: Add infrastructure for loading some class related data from
16372 * object.c: Add infrastructure for initializing the vtable from data
16375 * gc.c (run_finalize): Use mono_class_get_finalizer ().
16377 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
16378 appropriate initialization function before accessing parts of the
16379 MonoClass structure.
16381 * marshal.c: Fix warnings.
16383 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
16385 * mono-debug-debugger.c (get_exception_message): Use
16386 mono_class_get_method_from_name_flags ().
16388 2005-02-02 Ben Maurer <bmaurer@ximian.com>
16390 * reflection.c, appdomain.c: Replace a few manual searches that
16391 Zoltan missed. (Paolo approved this part of my initial patch).
16393 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
16395 * profiler.c: disable recording statistical events at report time.
16397 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16399 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
16400 to byteswap arrays of enum values, too (bug #72080).
16402 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
16404 * appdomain.c (set_domain_search_path): Allow this to be called if
16405 domain->setup is not yet set.
16407 * loader.c (mono_method_get_index): New helper function.
16409 * loader.c reflection.c: Use mono_method_get_index ().
16411 * class.c (mono_class_get_method_from_name_flags): New helper method.
16413 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
16416 * class.c (mono_class_get_cctor): New helper method.
16418 * string-icalls.c object.c class.c marshal.c reflection.c: Use
16419 mono_class_get_method () to look up methods.
16421 2005-02-01 Miguel de Icaza <miguel@novell.com>
16423 * console-io.c: Fix the build, this should work on Windows.
16425 2005-01-31 Ben Maurer <bmaurer@ximian.com>
16427 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
16428 be set to null to keep things valid
16430 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16432 * icall.c: added Console 2.0 icalls.
16433 * Makefile.am: added console-io.[ch]
16434 * console-io.[ch]: internal calls for Console 2.0 API.
16436 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16438 * class.c: make sure we consider all the interfaces
16439 when calculating max_interface_id (bug found by
16440 Jeroen Frijters running ikvm).
16442 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
16444 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
16445 valuetype fields to null.
16447 * object.c (set_value): Ditto. Fixes #71669.
16449 2005-01-31 Martin Baulig <martin@ximian.com>
16451 * metadata.c (mono_metadata_has_generic_params): New public
16452 function; checks whether something is a generic method.
16454 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16456 * appdomain.c: fix infinite recursion when adding assemblies.
16458 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
16460 * object.c: Fix small typo to return all items for Environment.
16461 GetCommandLineArgs.
16463 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16465 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
16466 reflection.c: more domain and assembly-unload related fixes
16467 and memory leaks plugs.
16469 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
16471 * 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.
16473 2005-01-29 Ben Maurer <bmaurer@ximian.com>
16475 * loader.c (mono_method_signature): Make this method lazy
16476 (mono_get_method_from_token): Don't computate the signature here.
16478 Doing this saves quite a bit of memory. I got 90 kb on starting up
16479 monodoc. It should also save some disk reads on startup.
16481 * *: MonoMethod->signature might be NULL now. You *MUST* use
16482 mono_method_signature.
16484 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
16486 * object.c (mono_runtime_get_main_args): Return an array from the
16487 current domain here. Fixes #71938.
16489 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
16491 * monitor.c: formatting changes to comply with the
16492 mono coding style and remove #ifdefs from the code.
16494 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
16496 * metadata.c, private.h: remove some unneeded data
16497 and use a more compact representation for table schemas.
16499 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16501 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
16502 to get a better distribution in hash tables.
16503 * *.c: use mono_aligned_addr_hash() where appropriate.
16504 * assembly.c: make var static.
16506 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
16508 * domain-internals.h: Put MonoJitInfo on a diet.
16510 * domain.c: Fix a warning.
16512 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16514 * gc.c: rework the gc handles code to reuse handles
16517 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
16519 * domain.c: fixed long standing bug in mono_string_equal() which
16520 was brought to light with the ldstr changes.
16522 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
16524 * reflection.c: Remove warning by adding missing include for marshal.h
16526 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16528 * domain.c, object.c: change the ldstr_table to hold
16529 MonoString* as keys: makes the runtime isinterned lookup
16530 faster and simplifies memory management.
16532 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
16534 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
16535 possible to add imperative security checks before calling the icall.
16536 * reflection.c: Return security attributes on the original MonoMethod
16537 (and not the wrapped one). This fix permissions on icalls.
16539 2005-01-25 Dick Porter <dick@ximian.com>
16541 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
16542 the check for mktime() support actually test the mktime() return
16543 value. "Fixes" bug 71682, though the output is still different to
16546 2005-01-25 Martin Baulig <martin@ximian.com>
16548 * class.c (mono_class_is_assignable_from): Make this work for
16551 2005-01-24 Ben Maurer <bmaurer@ximian.com>
16553 * marshal.c (mono_string_utf8_to_builder)
16554 (mono_string_builder_to_utf16): We might not have ownership of the
16555 string. In thise case, we need to create a new buffer.
16557 * object-internals.h (mono_stringbuilder_capacity): sb->str might
16558 be null, in which case, use the default capacity.
16560 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16562 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
16563 GC events to the profiler.
16565 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
16567 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
16568 if you don't want the GC to run.
16570 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
16572 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
16573 start providing a GC API and keeping different implementations in
16575 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
16577 2005-01-22 Ben Maurer <bmaurer@ximian.com>
16579 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
16580 mmap rather than allocating a huge buffer.
16581 (mono_debug_close_mono_symbol_file): Free the buffer allocated
16584 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
16586 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
16587 and CheckExecutionRights.
16588 * reflection.c|h: Keep the index of the declarative security to be
16589 used, instead of the pointer, when AOT compiler is used. Also add
16590 class initialization when requesting demands.
16591 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
16592 CheckExecutionRights. Both properties are now FALSE by default, and
16593 unmodifiable, unless the --security option is used.
16595 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16597 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
16598 reflection.c: properly refcount images and assemblies, many leaks fixed.
16600 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16602 * threadpool.c: increase the timeout for threads in the thread pool to
16603 10s. Fixes bug #67159.
16605 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
16607 * class-internals.h: Sun's compiler insists on explicit
16608 signed on bit fields to handle then correctly.
16610 2005-01-19 Miguel de Icaza <miguel@ximian.com>
16612 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
16613 Make the size of the array fit only the number of invalid path
16614 chars that we have.
16616 * class.c (_mono_class_get): Improve the error reporting when a
16617 class referenced is not found, to assist debugging.
16619 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
16621 * threads.c: fix off-by-one error.
16622 * domain.c: free data allocated in the domain.
16624 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
16626 * reflection.c (mono_method_body_get_object): Fill out exception info
16629 * object-internals.h: Add MonoReflectionExceptionHandlingClause
16632 2005-01-19 Martin Baulig <martin@ximian.com>
16634 * loader.c (mono_get_method_constrained): Make this work again.
16636 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
16638 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
16639 guint16 to match the managed side.
16641 * reflection.c (mono_reflection_body_get_object): Fill out local
16644 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
16647 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
16648 'local_var_sig_token'.
16650 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
16652 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
16655 * reflection.c (mono_method_body_get_object): Handle abstract and
16658 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
16660 * marshal.c, loader.c, class-internals.h, reflection.c:
16661 store the emthod data for a wrapper in an array instead of a list.
16663 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
16665 * marshal.c: change the code to allocate memory more
16666 conservatively for method wrappers.
16668 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16670 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
16671 fields from MonoClass to the marshal info structure where they belong.
16673 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16675 * class.c, object.c, class-internals.h, marshal.c: rearrange
16676 some fields and tweak some types to lower memory usage.
16678 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
16680 * threads.c (signal_thread_state_change): Handle the case when the
16681 target thread is the current thread.
16683 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
16685 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
16686 emit_ptr_to_object_conv.
16688 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
16689 marshalling. Fixes #71352.
16691 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16693 * metadata.h, blob.h: move table enum to blob.h so it can be included
16695 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
16696 cut the size of MonoImage/MonoDynamicImage.
16698 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
16700 * profiler.c (mono_profiler_install_simple): Fix default arguments.
16702 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
16704 * reflection.c, reflection.h, icall.c: add a function to check
16705 if an attribute type is defined for a metadata object.
16707 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
16709 * object-internals.h: Added some needed fields from StringBuilder class.
16710 * marshal.c: Set the maxCapacity when creating a StringBuilder.
16712 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
16714 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
16715 threads before shutting down the runtime.
16717 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
16719 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
16721 * object-internal.h, threads.c: implement stacksize and
16722 parameterized thread start functionality (requires
16723 matching corlib). Marked broken code for later removal.
16725 2005-01-12 Martin Baulig <martin@ximian.com>
16727 * class-internals.h (MonoGenericClass): Moved the `initialized'
16728 flag to MonoDynamicGenericClass, removed `init_pending'.
16729 (MonoGenericInst): Added `is_reference' flag.
16731 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
16733 * reflection.c (mono_image_create_pefile): Only set the pe_offset
16734 inside the MSDOS header. Fixes #71201.
16736 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
16738 (mono_domain_finalize): Ditto.
16740 2005-01-12 Martin Baulig <martin@ximian.com>
16742 * class.c (mono_get_shared_generic_class): Use the cache for
16743 non-dynamic generic classes.
16745 * class-internals.h (mono_class_create_generic_2): Removed
16746 function prototype, this function is now static inside class.c.
16748 * class.c (mono_class_create_generic_2): Made this static, only
16749 call it from mono_class_init() and mono_class_setup_parent().
16750 (collect_implemented_interfaces_aux): Call mono_class_init() on
16751 the interfaces we collect.
16752 (mono_class_setup_vtable): Call mono_class_init (class->parent).
16754 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
16756 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
16757 it a real thread handle.
16759 * domain-internals.h: Move exvar_offset from MonoJitInfo to
16760 MonoJitExceptionInfo, since each catch clause needs its own variable.
16762 2005-01-11 Dick Porter <dick@ximian.com>
16764 * image.c (mono_pe_file_open): New variant on mono_image_open()
16765 that does not set up the CLI metadata; used for FileVersionInfo so
16766 it can get the data for windows binaries too.
16768 * process.c (process_read_string_block): Don't read off the end of
16769 the StringTable block.
16771 These both fix bug 70766.
16773 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
16775 * gc.c: set some fields to NULL at GC cleanup time.
16776 * threads.c: if we quit the main thread, call exit ().
16778 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
16780 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
16782 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
16784 * threads.h, threads.c, object.c: added accessor and settor for
16785 main_thread. Handle it specially when exiting from it: wait
16786 for other foreground threads to exit.
16788 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
16790 * process.c, verify.c: remove some bloat.
16792 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
16794 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
16795 the calling convention to cdecl under win32.
16797 2005-01-08 Ben Maurer <bmaurer@ximian.com>
16799 * object.c (mono_object_get_size): New function to get the size of
16800 an object instance.
16802 * profiler.c (simple_allocation): Use above.
16804 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
16806 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
16807 ves_icall_System_AppDomain_getRootDomain (as it's not required to
16808 get an appdomain by it's id and we can't assume the root's id is 0).
16809 * domain-internals.h: Change the function prototype to match.
16810 * icall.c: Change the icall table for AppDomain.
16812 2005-01-08 Miguel de Icaza <miguel@ximian.com>
16814 * locales.c (string_invariant_compare_char): Only compute
16815 GUnicodeTypes in the case where we need them. Test for ordinality
16816 first and return if so.
16821 * FIXME: here we must use the information from c1type and c2type
16822 * to find out the proper collation, even on the InvariantCulture, the
16823 * sorting is not done by computing the unicode values, but their
16824 * actual sort order.
16827 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16829 * loader.c: for P/Invoke methods, allow the "Internal" shared
16830 library name to refer to the calling process symbol namespace.
16832 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
16834 * Makefile.am: Add the security manager to the build.
16835 * security-manager.c|h: New. Initialization of the security manager.
16837 2005-01-07 Dick Porter <dick@ximian.com>
16840 * monitor.c: Update thread state during Monitor and WaitHandle
16841 waits. Fixes bug 71031.
16843 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
16845 * reflection.c (property_encode_signature): Correctly handle when the
16846 property has no methods.
16848 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
16850 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
16852 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
16853 fields from mb, not rmb. Fixes #71017.
16855 * marshal.c (emit_ptr_to_str_conv): Add support for
16856 ByValTStr -> string conversion. Fixes #71015.
16858 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
16860 * mempool.c (mono_mempool_contains_addr): New helper function.
16862 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
16864 * metadata.c (mono_metadata_compute_size): Fix size calculation of
16865 HasSematics encoded fields.
16867 * metadata.c (mono_type_to_unmanaged): Improve error message for
16868 invalid string marshalling.
16870 * metadata.c: Fix warnings.
16872 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16874 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
16877 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
16879 * domain.c object.c domain-internals.h: Revert part of r38077 since the
16880 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
16883 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
16885 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
16886 so methods containing these can be AOTed.
16888 2005-01-03 Martin Baulig <martin@ximian.com>
16890 * loader.c (find_method): Removed the hack for generic instances.
16891 (method_from_memberref): If our parent is a generic instance, pass
16892 its generic type definition to find_method() and then inflate the
16894 (mono_get_method_constrained): Pass the generic type definition to
16895 find_method() and inflate the method later.
16897 * class-internals.h (MonoStats): Added `generic_class_count'.
16899 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
16900 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
16902 * reflection.c (mono_custom_attrs_from_params): Don't ignore
16903 generic type definitions.
16905 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
16907 * loader.c icall.c: Fix warnings.
16909 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
16911 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
16912 blittable types. Fixes #70864.
16914 2004-12-29 Martin Baulig <martin@ximian.com>
16917 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
16919 * reflection.c (mono_method_get_object): Create a
16920 "System.Reflection.MonoGenericMethod" for inflated methods; don't
16921 call mono_get_inflated_method().
16923 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
16925 2004-12-27 Martin Baulig <martin@ximian.com>
16927 * class-internals.h (MonoMethod): Added `is_inflated' flag.
16928 (MonoMethodInflated): Added `inflated' field.
16930 * class.c (mono_class_inflate_generic_method): Don't really
16931 inflate the method here; just set the `is_inflated' flag in the
16933 (mono_class_get_inflated_method): Actually inflate the method here
16934 if it's not already inflated; we use the MonoMethodInflated's new
16935 `inflated' field as a cache.
16937 2004-12-26 Martin Baulig <martin@ximian.com>
16940 (inflate_generic_class): Moved some code out of inflate_generic_type().
16941 (mono_class_inflate_generic_method): If we're already inflated,
16942 inflate the context and use the declaring method; ie. make sure
16943 the declaring method of an inflated method is always the generic
16945 (mono_class_create_from_typedef): Create
16946 `class->generic_container->context->gclass'.
16948 2004-12-24 Ben Maurer <bmaurer@ximian.com>
16950 * metadata-internals.h, marshal.c, reflection.c: More
16951 MonoGHashTable->GHashTable.
16953 * domain-internals.h, class.c: Change MonoGHashTable's into
16954 GHashTables for some cases where no gc stuff is used
16956 All users: update apis
16958 2004-12-23 Ben Maurer <bmaurer@ximian.com>
16960 * metadata.c (builtin_types): Make this `const'. Makes this get
16961 put into the shareable section.
16962 (mono_metadata_init): Casts to make gcc happy.
16964 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
16966 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
16968 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
16970 * icall.c: Added an internal call to retrieve the position and length
16971 of assembly-level declarative security attributes (RequestMinimum,
16972 RequestOptional and RequestRefuse). This is used by the Assembly class
16973 to re-create the corresponding permission sets.
16975 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
16977 * marshal.c: fix the stelemref wrapper to be type correct
16980 2004-12-20 Ben Maurer <bmaurer@ximian.com>
16982 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
16983 to do key & 0x7fffffff. Hashtable already does this. It just
16984 results in longer code.
16986 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
16988 * appdomain.c: Bump corlib version.
16989 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
16990 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
16991 * reflection.c|h: Add functions to get declarative security infos
16992 (blob position and length) for assemblies, classes and methods.
16994 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
16996 * reflection.c: sort the constant table (bug #70693).
16998 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
17000 * object-internals.h, threads.c, domain.c: add accessors for
17001 the MonoThread and MonoDomain tls keys.
17003 2004-12-18 Martin Baulig <martin@ximian.com>
17005 * class.c (inflate_generic_type): If we're inflating a generic
17006 instance, set `ngclass->context->container = context->container';
17007 ie. the container we inflated into.
17009 * metadata.c (mono_metadata_parse_generic_param): Reflect above
17010 inflate_generic_type() changes.
17012 2004-12-17 Martin Baulig <martin@ximian.com>
17014 * class-internals.h
17015 (MonoGenericClass): Replaced `MonoType *generic_type' with
17016 `MonoClass *generic_class'. Removed `dynamic_info'; if
17017 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
17018 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
17020 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
17022 * exception.c (mono_exception_from_token): New helper function.
17024 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
17026 * assembly.c (mono_assembly_load_with_partial_name): Call
17027 mono_assembly_loaded before invoking the preload hooks. Fixes
17030 * object-internals.h (MonoThread): Change culture_info and
17031 ui_culture_info into an array.
17033 * threads.c: Cache culture info objects from more than one appdomain.
17035 * threads.c threads-types.h icall.c: Add icalls for manipulating the
17036 current UI culture.
17038 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
17040 * threads.h threads.c appdomain.c: Clear the culture_info field of
17041 all threads during unloading if they point to an object in the dying
17044 2004-12-13 Ben Maurer <bmaurer@ximian.com>
17046 * culture-info.h (TextInfoEntry): New struct
17047 * object-internals.h: sync with managed
17048 * locales.c: fill the `text_info_data' field
17049 * culture-info-tables.h: update
17051 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17053 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
17056 2004-12-12 Ben Maurer <bmaurer@ximian.com>
17058 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
17059 (ves_icall_ModuleBuilder_getMethodToken): Ditto
17061 2004-12-12 Martin Baulig <martin@ximian.com>
17063 * mono-debug-debugger.c (write_type): If we're an enum and the
17064 builtin types have already been initialized, call mono_class_init().
17066 2004-12-11 Martin Baulig <martin@ximian.com>
17068 * metadata.c (mono_metadata_load_generic_params): Added
17069 `MonoGenericContainer *parent_container' argument; automatically
17070 compute `container->is_method'; pass the correct owner to
17073 * reflection.c (compare_genericparam): Sort the GenericParam table
17074 according to increasing owners.
17076 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
17078 * profiler.c: allow disabling the default profiler.
17080 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
17082 * decimal.c, icall.c: allow disabling System.Decimal support.
17084 2004-12-09 Marek Safar <marek.safar@seznam.cz>
17086 * reflection.c: Add support for null attribute arguments.
17088 2004-12-09 Martin Baulig <martin@ximian.com>
17090 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
17091 names to get rid of compiler warnings.
17093 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
17095 * marshal.c (mono_marshal_get_struct_to_ptr): Call
17096 mono_marshal_load_type_info (). Fixes #69625.
17097 (mono_marshal_get_ptr_to_struct): Likewise.
17099 2004-12-08 Martin Baulig <martin@ximian.com>
17101 * mono-debug.h: Bumped version number to 47.
17103 * mono-debug-debugger.c
17104 (mono_debugger_event_handler, mono_debugger_event): Take two
17105 guint64 arguments insteed of a gpointer and a guint32.
17107 2004-12-08 Martin Baulig <martin@ximian.com>
17109 * debug-mono-symfile.h
17110 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
17111 `address' to `native_offset'.
17113 2004-12-08 Martin Baulig <martin@ximian.com>
17115 * class.c (mono_class_create_from_typespec): Only inflate if we
17116 either have `context->gclass' or `context->gmethod'.
17118 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
17120 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
17122 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
17124 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
17126 * reflection.c (mono_assembly_get_object): Remove the workaround put
17127 in for the release.
17129 * appdomain.c: Use the corlib_internal field from MonoAssembly.
17131 * appdomain.c: Bump corlib version.
17133 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
17134 be visible in other appdomains.
17136 2004-12-07 Ben Maurer <bmaurer@ximian.com>
17138 * threads.c: Interlocked inc and dec for longs were messed up,
17139 use a KISS based impl for this. Fixes 70234
17141 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
17143 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
17145 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
17147 * icall.c: fix to follow policy not to allow struct
17148 arguments in icalls.
17150 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17152 * process.c: make the patch that handles spaces in file paths work
17153 on mono/windows too.
17155 2004-12-06 Martin Baulig <martin@ximian.com>
17157 * class.c (mono_class_create_generic): Call
17158 mono_class_setup_supertypes() if we're dynamic.
17159 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
17161 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
17163 * object-internals.h: Add new fields to MonoThread.
17165 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17167 * icall.c threads-types.h threads.c: Add new icalls.
17169 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
17171 * object-internals.h (MonoReflectionAssembly): Sync object layout with
17174 * appdomain.c: Bump corlib version.
17176 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
17177 internal assemblies. Fixes #69181.
17179 2004-12-05 Martin Baulig <martin@ximian.com>
17181 * class.c (mono_class_inflate_generic_signature): Make this a
17182 no-op if `context' is NULL or we don't have any type parameters;
17183 also copy `sentinelpos'.
17185 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
17187 * image.c: Add unbox_wrapper_cache.
17189 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
17191 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
17192 function generator.
17194 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
17197 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
17199 2004-12-04 Martin Baulig <martin@ximian.com>
17201 * loader.c (mono_method_get_signature_full): New public function;
17202 like mono_method_get_signature(), but with an additional
17203 `MonoGenericContext *' argument.
17205 * class.c (mono_class_inflate_generic_signature): Formerly known
17206 as inflate_generic_signature(); make this public.
17208 2004-12-04 Martin Baulig <martin@ximian.com>
17211 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
17212 instead of a `MonoGenericContainer *'.
17213 (mono_metadata_parse_array_full): Likewise.
17214 (mono_metadata_parse_signature_full): Likewise.
17215 (mono_metadata_parse_method_signature_full): Likewise.
17216 (mono_metadata_parse_generic_inst): Likewise.
17217 (mono_metadata_parse_generic_param): Likewise.
17218 (mono_metadata_parse_mh_full): Likewise.
17219 (mono_type_create_from_typespec_full): Likewise.
17221 2004-12-03 Martin Baulig <martin@ximian.com>
17223 * class-internals.h (MonoGenericContainer): Replaced the
17224 `MonoGenericContext * pointer with a `MonoGenericContext'
17225 structure and made it the first element.
17227 2004-12-03 Martin Baulig <martin@ximian.com>
17230 (inflate_generic_type): Set the `context->container' when creating
17231 a new MonoGenericContext.
17232 (mono_class_inflate_generic_method): Likewise.
17233 (mono_class_create_from_typespec): Just use `context->container'
17234 to get the container.
17236 * loader.c (method_from_methodspec): Set `context->parent' from
17237 `context->container' - and if that's a method container, use its
17238 parent. Also set the `context->container' when creating a new
17239 MonoGenericContext.
17240 (mono_get_method_from_token): Use just `context->container' to get
17243 * metadata.c (do_mono_metadata_parse_generic_class): Also set
17244 `gclass->context->container'.
17246 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
17247 the `context->container' when creating a new MonoGenericContext.
17249 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
17251 * reflection.c (compare_genericparam): Sort params with identical
17252 owner by their number. Fixes gen-111 on sparc.
17254 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
17256 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
17257 around the domain changes.
17259 * appdomain.c (mono_domain_unload): Handle the case when the thread
17260 calling Unload is itself being aborted during unloading. Fixes #70022.
17262 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
17264 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
17265 checkpoint_func as an icall so it gets a wrapper.
17266 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
17267 in the cross-appdomain wrappers too.
17269 * threads.c (mono_thread_has_appdomain_ref): Make this public.
17271 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
17273 * reflection.c: Fix some memory leaks.
17275 2004-12-02 Martin Baulig <martin@ximian.com>
17277 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
17279 * metadata.c (generic_class_cache): New static hashtable.
17280 (mono_metadata_lookup_generic_class): New public method.
17282 2004-12-02 Martin Baulig <martin@ximian.com>
17284 * class.c (mono_class_create_from_typedef): Call
17285 mono_class_setup_parent() and mono_class_create_mono_type() before
17286 parsing the interfaces.
17288 2004-12-02 Martin Baulig <martin@ximian.com>
17290 * metadata.c (generic_inst_cache): New static hashtable.
17291 (mono_metadata_lookup_generic_inst): New public function.
17292 (mono_metadata_inflate_generic_inst): New public function.
17293 (mono_metadata_parse_generic_inst): New public function.
17294 (do_mono_metadata_parse_generic_class): Use the new
17295 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
17296 since this'll also use the cache.
17298 * reflection.c (mono_reflection_bind_generic_method_parameters):
17299 Use mono_metadata_lookup_generic_inst() to use the new cache.
17301 * class.c (inflate_mono_type): Use
17302 mono_metadata_inflate_generic_inst() to inflate a generic
17303 instance; this'll also use the new cache.
17305 * loader.c (method_from_methodspec): Use
17306 mono_metadata_parse_generic_inst() and
17307 mono_metadata_inflate_generic_inst() rather than parsing it
17308 manually, so we can use the new cache.
17310 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
17312 * threads.c (wait_for_tids): Do not incorrectly free threads when
17313 the wait times out.
17315 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17317 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
17318 iter->args based on whether parameters are passed in registers (i.e.
17319 MONO_ARCH_REGPARMS is defined)
17321 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
17323 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
17324 the exception message. Fixes #70070.
17325 (method_from_methodspec): Fix warnings.
17327 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17329 * process.c: (complete_path) return the path quoted
17331 2004-12-01 Martin Baulig <martin@ximian.com>
17333 * class-internals.h (MonoGenericInst): New structure.
17334 (MonoGenericClass): Replaced `type_argc', `type_argv' and
17335 `is_open' with `MonoGenericInst *inst'.
17336 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
17337 `is_open' with `MonoGenericInst *inst'.
17339 2004-11-30 Martin Baulig <martin@ximian.com>
17341 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
17343 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
17344 to `generic_class_cache'.
17347 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
17348 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
17349 (mono_generic_inst_is_valuetype): Renamed to
17350 mono_generic_class_is_valuetype().
17352 * class-internals.h
17353 (MonoGenericInst): Renamed to MonoGenericClass.
17354 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
17355 (MonoClass): Renamed `generic_inst' to `generic_class'.
17356 (MonoGenericContext): Renamed `ginst' to `gclass'.
17358 * object-internals.h
17359 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
17361 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
17362 mono_reflection_generic_class_initialize().
17364 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
17365 now known as "System.Reflection.MonoGenericClass".
17366 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
17368 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
17370 * class-internals.h: Added a flag field to MonoClass to cache the
17371 declarative security attributes actions associated with the class.
17372 * domain-internals.h: Added booleans to MonoJitInfo to cache the
17373 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
17374 applicable to the JITted method.
17375 * reflection.c|h: Added functions to extract (as flags) which security
17376 actions are available (declaratively) for a method, class or assembly.
17377 * metadata.c|h: Added functions to search the declarative security
17378 table in the metadata.
17380 2004-11-29 Ben Maurer <bmaurer@ximian.com>
17382 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
17383 EXPORTEDTYPES are already in the class name cache, so there is no
17384 need to add extra code here to look at them. Just removes a bit of
17387 (ves_icall_System_Environment_get_TickCount): No need for #if
17388 WINDOWS. We already have the code in io-layer.
17390 2004-11-28 Martin Baulig <martin@ximian.com>
17393 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
17396 2004-11-27 Miguel de Icaza <miguel@ximian.com>
17398 * assembly.c (do_mono_assembly_open): Instead of having a
17399 conditional WITH_BUNDLE, incorporate support for bundles here, by
17400 having a global `bundles' variable holding a pointer to the actual
17403 (mono_register_bundled_assemblies): New API call used by the
17406 See mkbundle.1 for details.
17408 2004-11-27 Martin Baulig <martin@ximian.com>
17410 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
17411 the vtable for generic methods.
17413 2004-11-26 Martin Baulig <martin@ximian.com>
17416 (mono_metadata_generic_method_hash): New public function.
17417 (mono_metadata_generic_method_equal): Likewise.
17419 * class-internals.h
17420 (MonoGenericContainer): Added `GHashTable *method_hash'.
17422 * reflection.c (ReflectionMethodBuilder): Added
17423 `MonoGenericContainer *generic_container'.
17424 (reflection_methodbuilder_to_mono_method): Don't create a new
17425 MonoGenericContainer each time we're called.
17426 (mono_reflection_bind_generic_method_parameters): Use
17427 `container->method_hash' to cache the results so we don't create a
17428 different method if we're called several times with the same
17431 * loader.c (method_from_methodspec): Use the new
17432 `container->method_hash' here, too.
17434 2004-11-26 Martin Baulig <martin@ximian.com>
17436 * class.c (inflate_generic_signature): Correctly compute
17437 `res->has_type_parameters'.
17438 (mono_class_vtable): Use the `has_type_parameters' flag to
17439 determine whether we're a generic method.
17441 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
17443 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
17445 * object.c (mono_runtime_run_main): Fix a small memory leak.
17447 2004-11-25 Martin Baulig <martin@ximian.com>
17449 * class.c (set_generic_param_owner): Fixed the loop.
17451 2004-11-25 Martin Baulig <martin@ximian.com>
17453 * object.c (mono_class_vtable): Don't create any JIT wrappers for
17456 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
17458 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
17459 names. Fixes #69787.
17461 2004-11-24 Martin Baulig <martin@ximian.com>
17463 * class.c (mono_class_create_generic_2): If we don't have a
17464 `ginst->parent', inflate `gklass->parent' to get our parent.
17466 2004-11-24 Martin Baulig <martin@ximian.com>
17468 * reflection.c (compare_genericparam): Correctly sort the
17469 GenericParam table; fixes #69779.
17471 2004-11-23 Ben Maurer <bmaurer@ximian.com>
17473 * reflection.c: When writing a PE file, don't create a huge
17474 buffer in memory. Just write the arrays we have to the file.
17475 This reduces memory usage.
17477 * metadata-internals.h: MonoDynamicStream pefile is no longer used
17480 2004-11-17 Martin Baulig <martin@ximian.com>
17482 * class.c (mono_class_init): Don't setup `class->parent' for
17483 dynamic instances; moved this to mono_class_generic_2().
17484 (mono_class_create_generic): Also set `klass->inited' for dynamic
17486 (mono_class_create_generic_2): Don't do anything for dynamic
17487 generic instances. Set `klass->parent' here and also call
17488 mono_class_setup_parent() here.
17490 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
17491 `MonoType *parent' argument; set `ginst->parent' before calling
17492 mono_class_create_generic_2(), so we set the correct parent.
17494 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
17496 * reflection.c: allow getting attributes from ModuleBuilder
17499 2004-11-17 Martin Baulig <martin@ximian.com>
17501 * class.c (mono_class_create_from_typedef): If a type parameter is
17502 inherited from an outer class, set its owner to that class.
17504 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
17506 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
17507 for (int*) written size. This fixes bug #69592.
17509 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
17511 * icall.c: Added IsAuthenticodePresnet internal call.
17512 * image.c|h: New function that check a MonoImage for an Authenticode
17513 signature in the certificate PE data directory.
17514 * security.c|h: New internal call to ask the runtime if an
17515 Authenticode signature seems referenced in the PE header.
17517 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
17519 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
17521 * reflection.c (mono_image_create_pefile): Free the assembly streams
17522 after writing out the assembly file.
17524 * object.c (mono_runtime_run_main): Fix small memory leak.
17526 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
17527 property access modifiers. Fixes #69389.
17529 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17531 * domain.c, object.c, object-internals.h, domain-internals.h,
17532 object.h, marshal.c: keep dynamic code info per domain.
17534 2004-11-15 Martin Baulig <martin@ximian.com>
17536 * class.c (mono_type_get_name_recurse): Put type arguments in
17537 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
17540 2004-11-15 Martin Baulig <martin@ximian.com>
17542 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
17543 (mono_class_setup_vtable): When computing `the_cname' for a
17544 generic instance, don't include the namespace since we'd otherwise
17547 2004-11-15 Martin Baulig <martin@ximian.com>
17549 * class.c (mono_class_create_generic): Changed return type to void.
17550 (mono_class_create_generic_2): New public function; setup
17551 `class->method', `class->field' and `class->interfaces' here
17552 instead of in mono_class_init().
17554 * class.h (mono_class_create_generic): Moved to class-internals.h.
17556 2004-11-14 Ben Maurer <bmaurer@ximian.com>
17558 * reflection.c (mono_image_create_pefile): take a file HANDLE.
17559 rather than writing to memory, write to this file. Right now,
17560 we are just writting into a buffer, and copying that. However
17561 we can avoid the buffer later.
17563 (mono_dynamic_stream_reset): new function
17565 * icall.c, object-internals.h: update for the above.
17567 2004-11-13 Ben Maurer <bmaurer@ximian.com>
17569 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
17570 have been using gc'd memory. First it is slower, unlikely
17571 the comment in the source code said, secondly, it increases
17572 our footprint to do it in the gc.
17574 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
17575 the method so that it does not have to copy to managed code.
17577 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
17579 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
17581 2004-11-12 Martin Baulig <martin@localhost>
17583 * reflection.c (mono_image_create_token): Allow generic method
17584 definitions here, since they may appear in an `.override'; see
17585 gen-98/gen-99 for an example.
17587 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
17589 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
17592 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
17595 2004-11-11 Martin Baulig <martin@ximian.com>
17597 * class.c (mono_class_setup_vtable): In an explicit interface
17598 implementation, the method name now includes the arity.
17600 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
17602 * object.c (mono_array_full_copy): Fix warning.
17604 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
17606 * appdomain.c: Removed look_for_method_by_name(). Use the new method
17607 mono_class_get_method_from_name() instead.
17609 * class-internals.h: Added two new types of wrappers.
17610 Added MonoRemotingTarget enum. Added new trampoline function type, which
17611 takes an additional MonoRemotingTarget value as parameter, so it is
17612 possible to request a trampoline for a specific target.
17614 * class.c: Added new mono_class_get_method_from_name() method.
17616 * class.h: In MonoRemoteClass, we can have now to vtables, one for
17617 general remoting sinks and one specific for cross domain calls.
17619 * debug-helpers.c: Added new wrapper names.
17621 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
17624 * image.c: Porperly delete value objects form the remoting invoke hashtable.
17626 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
17627 with several other methods (mono_marshal_get_xappdomain_dispatch,
17628 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
17629 and others) can generate a fast remoting wrapper for cross domain calls.
17630 More information can be found in docs/remoting.
17631 Other changes: Removed mono_find_method_by_name, and used
17632 mono_class_get_method_from_name instead.
17633 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
17634 is stored in the remoting invoke hashtable.
17636 * marshal.h: published the new method for getting the xdomain wrapper,
17637 and also added a method for getting the adequate wrapper for a given
17640 * object-internals.h, object.c: Added a couple of methods for capying and
17642 Modified mono_install_remoting_trampoline, which takes the new remoting
17643 trampoline that has a remoting target as parameter.
17644 mono_class_proxy_vtable now also takes a remoting target as parameter, and
17645 will return the most suitable vtable for the target.
17646 Added mono_remote_class_vtable, which returns the vtable of a remote class
17647 (which can be the normal remoting vtable or the xdomain vtable).
17649 * threads.c: the xdomain invoke and dispatch wrappers must also be
17650 protected against interruptions.
17652 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17654 * icall.c: use memmove in BlockCopyInternal when the source and
17655 destination arrays are the same.
17657 2004-11-09 Martin Baulig <martin@ximian.com>
17659 * class-internals.h (MonoGenericContainer): Removed `method' and
17660 `signature', replaced them with `is_method' and `is_signature'
17661 flags. Added `context'.
17663 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
17664 instead of a `MonoGenericContainer *'.
17666 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
17667 for dynamic type parameters.
17668 (mono_metadata_load_generic_params): Setup `container->context'.
17670 * reflection.c (mono_reflection_setup_generic_class): Setup
17671 `tb->generic_container->context'.
17672 (do_mono_reflection_bind_generic_parameters): Use
17673 mono_class_inflate_generic_type() to correctly inflate types,
17674 rather than using our own hack just for MONO_TYPE_VAR.
17676 2004-11-09 Martin Baulig <martin@ximian.com>
17678 * class.c (mono_class_inflate_generic_method): Small fix; don't
17682 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
17683 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
17684 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
17685 (ves_icall_Type_BindGenericParameters): Likewise.
17686 (ves_icall_Type_get_IsGenericInstance): Likewise.
17687 (ves_icall_Type_GetGenericParameterPosition): Likewise.
17688 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
17689 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
17690 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
17692 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
17694 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
17695 assembly versions and public key tokens. Fixes #69113.
17697 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
17699 * metadata.c: fix bug introduced with the type cache changes
17702 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
17704 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
17705 the MonoClass pointer instead of the token in exception clauses.
17706 * reflection.c: updates for the above and make the code not depend
17707 on the structure of MonoExceptionClause.
17709 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
17711 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
17712 Add support for dynamic assemblies. Fixes #69114.
17714 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
17716 2004-11-07 Ben Maurer <bmaurer@ximian.com>
17718 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
17719 since most only those methods use it. the code member of
17720 MonoMethodPInvoke was dead, so that can be removed too. Also,
17721 remove inline_count (again, not used), and move slot so that it
17722 can share bits with some other flags. This saves 8 bytes in the
17723 structure and gives us about 50 kb back for mcs helloworld.cs
17725 * *.[ch]: Do naming changes for the above.
17727 * loader.c (mono_method_get_header): Lazily init the header
17729 (mono_get_method_from_token): don't init the header here
17730 (mono_free_method): the header may never be allocated
17732 Overall, this saves 150 kb of unmanaged allocations
17733 for mcs helloworld.cs. That accounts for 10% of the unmanaged
17736 * loader.c, loader.h (mono_method_get_header): new accessor.
17738 * *.[ch]: use the above method. Prepares us to lazily load
17741 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
17742 three warnings, which are actual bugs (see 69206).
17744 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
17745 unused. Saves a cool 4 bytes / method.
17747 2004-11-06 Ben Maurer <bmaurer@ximian.com>
17749 * metadata.c (builtin_types): Add types for System.Object here.
17750 (mono_metadata_parse_type_full): Cache MonoType*'s that are
17751 for a class or valuetype from klass->this_arg or klass->byval_arg.
17753 On mcs for a hello world, this gets us down from 21836 MonoType's
17756 (mono_metadata_free_type): Account for the above change.
17758 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
17760 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
17761 exception instead of asserting if name is null.
17762 (ves_icall_System_AppDomain_GetData): Ditto.
17764 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
17766 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
17769 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
17770 Return NULL when the domain does not have entry_assembly set.
17772 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
17773 Add a 'resource_modules' argument.
17774 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
17776 * reflection.c (mono_reflection_create_runtime_class): Move setting
17777 of wastypebuilder here, so mono_get_type_object () returns a MonoType
17780 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
17781 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
17782 Throw an ArgumentNullException if 'ptr' is null.
17784 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
17785 assemblies here. Fixes #69020.
17787 2004-11-05 Geoff Norton <gnorton@customerdna.com>
17789 * reflection.c (build_compressed_metadata): Fix the previous patch for
17790 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
17793 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
17795 * assembly.c (mono_assembly_names_equal): Allow a match if one of
17796 the cultures is false. Fixes #69090.
17798 * reflection.c (build_compressed_metadata): Fix invalid memory read
17799 detected by valgrind.
17801 * reflection.c (mono_reflection_get_type): Avoid triggering a
17802 TypeResolve multiple times for the same type. Fixes #65577.
17804 2004-11-04 Ben Maurer <bmaurer@ximian.com>
17806 * marshal.c: Avoid using ldftn to call managed functions. It is
17807 much slower than just a call.
17809 * reflection.c (mono_module_get_object): free the basename we
17810 allocate here from glib.
17812 * reflection.c (ensure_runtime_vtable): make sure to free
17813 overrides. Also, we were allocating an array of MonoMethod not an
17814 array of MonoMethod*.
17816 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
17818 * image.c (mono_image_close): free image->guid here.
17820 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
17822 * reflection.c: Fix some spec conformance issues with the PE file
17823 structures so mcs compiled apps run on the Net 2.0 beta.
17825 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
17827 * string-icalls.c (ves_icall_System_String_ctor_encoding):
17828 Implement this. Fixes #67264.
17830 * debug-helpers.h debug-helpers.c marshal.c: Move
17831 mono_find_method_by_name to debug-helpers.c.
17833 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
17835 * object.c (mono_release_type_locks): type_initialization_hash is
17838 * reflection.c object.c object-internals.h: Fix warnings.
17840 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
17841 without accessors. Fixes #61561.
17843 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
17844 application base from the root domain if not set. Fixes #65641.
17845 (mono_runtime_init): Fix warning.
17847 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17849 * appdomain.c: call mono_thread_pool_init.
17850 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
17851 of worker threads based on the number of CPUs and the environment
17852 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
17853 for non-windows (windows) systems.
17855 2004-10-27 Chris Toshok <toshok@ximian.com>
17857 * mono-debug-debugger.c (write_class): don't call mono_class_init
17858 here, as even with the check for (!klass->init_pending), we get
17859 into a situation where we're hitting cycles in class
17860 initialization. Fixes #68816.
17862 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
17864 * image.c: Avoid overwriting values in the loaded_images_hash when an
17865 assembly is loaded multiple times. Fixes #61152.
17867 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
17868 so multiple satellite assemblies for the same name can be loaded.
17871 * mono_domain_assembly_preload: Actually return the loaded assembly,
17874 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
17875 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
17877 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
17878 pending finalizers are not invoked after the appdomain has been
17879 unloaded. Fixes #67862.
17881 2004-10-22 Martin Baulig <martin@ximian.com>
17883 * mono-debug-debugger.c
17884 (mono_debugger_runtime_invoke): Don't box valuetypes.
17886 2004-10-22 Chris Toshok <toshok@ximian.com>
17888 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
17889 don't hide private methods.
17891 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
17893 * icall.c: Allows the runtime to "share" (when known) the public key
17894 token of an assembly. This avoid the need to recalculate the token
17895 (from the public key) in managed code.
17897 2004-10-21 Chris Toshok <toshok@ximian.com>
17899 * debug-helpers.c (append_class_name): argh, revert last patch.
17901 2004-10-21 Chris Toshok <toshok@ximian.com>
17903 * debug-helpers.c (append_class_name): use '+' as the delimiter,
17904 not '/', so that it matches what the debugger uses to look up
17907 2004-10-21 Martin Baulig <martin@ximian.com>
17909 * mono-debug-debugger.c (mono_debugger_throw_exception): New
17910 public method; this is called each time an exception is thrown and
17911 allows the debugger to use exception catch points.
17913 2004-10-21 Martin Baulig <martin@ximian.com>
17915 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
17916 the stack pointer and the exception object in some struct and pass
17917 that to the debugger.
17919 2004-10-21 Chris Toshok <toshok@ximian.com>
17921 * mono-debug-debugger.c (do_write_class): add instance/static
17922 event support. We don't expose "raise" or "other" yet.
17923 (event_is_static): new method.
17925 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
17927 * mono-debug-debugger.c
17928 (mono_debugger_handle_exception): Remove
17929 bogus return value for fussy compilers.
17931 2004-10-20 Martin Baulig <martin@ximian.com>
17933 * mono-debug-debugger.c
17934 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
17935 (mono_debugger_handled_exception): Likewise.
17937 2004-10-20 Martin Baulig <martin@ximian.com>
17939 * mono-debug-debugger.h (MonoDebuggerEvent): Added
17940 MONO_DEBUGGER_EVENT_EXCEPTION.
17942 * mono-debug-debugger.c (mono_debugger_handle_exception): New
17943 public function to send the debugger a notification for an
17944 exception and inform it about a catch/finally clause.
17946 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
17948 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
17949 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
17952 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
17954 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
17956 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
17957 marshalled as [In,Out]. Fixes #58325.
17959 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
17961 * reflection.c (mono_method_body_get_object): Implement some fields.
17963 2004-10-12 Martin Baulig <martin@ximian.com>
17965 * reflection.c (mono_reflection_bind_generic_parameters): Small
17966 fix, correctly retrieve our parent from a generic instance.
17968 2004-10-12 Martin Baulig <martin@ximian.com>
17970 * metadata.c (mono_metadata_generic_param_equal): We always have
17974 (mono_class_from_generic_parameter): We need to have an owner.
17975 (my_mono_class_from_generic_parameter): Likewise.
17977 * reflection.c (mono_reflection_setup_generic_class): Renamed to
17978 mono_reflection_create_generic_class() and added a new
17979 mono_reflection_setup_generic_class().
17980 (mono_reflection_initialize_generic_param): If we're a nested
17981 generic type and inherited from the containing class, set our
17982 owner to the outer class.
17984 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
17986 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
17988 * reflection.c (mono_method_body_get_object): New function to create
17989 a MethodBody object.
17991 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
17993 2004-10-11 Martin Baulig <martin@ximian.com>
17995 * metadata.c (_mono_metadata_type_equal): Renamed to
17996 do_mono_metadata_type_equal() and made static.
17998 2004-10-11 Martin Baulig <martin@ximian.com>
18000 * appdomain.c: Bump corlib version number to 28.
18002 2004-10-10 Martin Baulig <martin@ximian.com>
18004 * class-internals.h
18005 (MonoGenericInst): Added `MonoGenericContainer *container'.
18006 (MonoGenericMethod): Likewise.
18007 (MonoGenericContext): Likewise.
18008 (MonoGenericParam): Added `MonoGenericContainer *owner'.
18011 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
18012 (do_mono_metadata_parse_generic_inst): Likewise.
18013 (mono_metadata_parse_type_full): New public method. This is the actual
18014 mono_metadata_parse_type() implementation - with an additional
18015 `MonoGenericContainer *' argument.
18016 (mono_metadata_parse_array_full): Likewise.
18017 (mono_metadata_parse_signature_full): Likewise.
18018 (mono_metadata_parse_method_signature_full): Likewise.
18019 (mono_metadata_parse_mh_full): Likewise.
18020 (mono_type_create_from_typespec): Likewise.
18021 (mono_metadata_interfaces_from_typedef_full): New public method;
18022 this is similar to the other _full() methods, but we take a
18023 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
18024 (mono_metadata_parse_generic_param): Take an additional
18025 `MonoGenericContainer *' argument and lookup the MonoGenericParam
18026 from that container.
18027 (mono_metadata_generic_param_equal): New static method to compare
18028 two type parameters.
18029 (_mono_metadata_type_equal): New static method; takes an
18030 additional `gboolean signature_only' argument - if true, we don't
18031 compare the owners of generic parameters.
18032 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
18033 with a TRUE argument - do a signature-only comparision.
18035 * loader.c: Use the new _full() methods and pass the
18036 MonoGenericContainer to them.
18038 * object-internals.h (MonoReflectionTypeBuilder): Added
18039 `MonoGenericContainer *generic_container' field.
18040 (MonoReflectionMethodBuilder): Likewise.
18042 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
18044 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
18045 case initial images of dynamic assemblies.
18047 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
18049 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
18051 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
18052 length of event->other array.
18053 (typebuilder_setup_events): Ditto.
18055 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
18056 'assembly_by_name' and add an 'assemblies' list.
18058 * assembly.h assembly.c: Add a new search hook for determining whenever
18059 an assembly is already loaded. Use this instead of searching in the
18060 loaded_assemblies list.
18062 * domain.c appdomain.c: Implement the new search hook so loaded
18063 assemblies are now scoped by appdomain. Fixes #67727.
18065 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
18067 * threads.c (mono_thread_attach): Initialize synch_lock field so
18068 mono_thread_detach works again.
18070 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
18071 'lib' too. Fixes #63130.
18073 2004-10-06 Jackson Harper <jackson@ximian.com>
18075 * culture-info-tables.h: regenerated.
18077 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
18079 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
18080 implemented by other interfaces in the result. Fixes #65764.
18082 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
18083 Handle unloadable modules without crashing.
18085 * image.c (load_modules): Revert the previous patch since modules must
18086 have a fixed index inside the array.
18088 * image.c (load_modules): Don't include native modules in the modules
18091 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
18093 * reflection.h: Add param_defaults field.
18095 * reflection.c: Add support for parameter defaults in dynamic methods.
18098 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
18099 an empty string when a type has no namespace. Fixes #64230.
18101 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
18103 * tabledefs.h: Added "internal" security actions to support non-CAS
18104 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
18105 Note: they do not seems to be used anymore in 2.0 (new metadata format)
18107 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
18109 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
18110 constructor of abstract class. Fixes #61689.
18112 2004-10-04 Martin Baulig <martin@ximian.com>
18114 * class-internals.h (MonoGenericContainer): New type.
18115 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
18116 `MonoGenericContainer *generic_container'.
18117 (MonoClass): Replaced `gen_params' and `num_gen_params' with
18118 `MonoGenericContainer *generic_container'.
18120 * metadata.c (mono_metadata_load_generic_params): Return a
18121 `MonoGenericContainer *' instead of a `MonoGenericParam *';
18122 removed the `num' argument.
18124 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
18126 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
18127 for dynamic images.
18129 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
18132 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
18134 * reflection.c: Save pe_kind and machine values into the generated
18137 * appdomain.c: Bump corlib version number.
18139 * object-internals.h: Reorganize layout of LocalBuilder.
18141 * class-internals.h class.c (mono_class_get_implemented_interfaces):
18142 New helper function.
18144 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
18145 created MonoType for dynamic types. Fixes #66180.
18147 2004-10-02 Ben Maurer <bmaurer@ximian.com>
18149 * threadpool.c: the ares hashtable needs a critical section around it.
18150 this prevents some nasty segfaults
18152 2004-10-02 Massimiliano Mantione <massi@ximian.com>
18154 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
18155 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
18158 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
18160 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
18162 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
18164 * image.c: Always canonicalize image file names, to avoid loading
18165 the same assembly twice when referenced using a relative path.
18167 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
18169 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
18171 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
18173 * marshal.c: Fix warnings.
18175 2004-09-29 Geoff Norton <gnorton@customerdna.com>
18177 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
18178 attempting to marshal the delegate_trampoline as the method_addr.
18179 This patch has a static hashtable of marshalled delegates so that
18180 we can map delegate_trampoline addresses back to delegates. This
18181 allows a delegate passed to managed code to be passed back into native
18184 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
18186 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
18188 * reflection.c (method_encode_code): Align method headers properly.
18191 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
18193 * marshal.c: In the runtime invoke wrapper, reset the abort
18194 exception if it is cached. This avoids the automatic rethrowal of
18195 the exception after the catch of the wrapper. Also check for pending
18196 interruptions before calling the managed method. This is done using
18197 the new method emit_thread_force_interrupt_checkpoint, since the
18198 normal checkpoint method is ignored when running the invoke wrapper.
18199 * object.c: If the abort exception is rethrown, set the abort_exc
18200 field of the thread, so it will be rethrown aftere every catch.
18201 * threadpool.c: Only run an interruption checkpoint if what has been
18202 requested is a stop of the thread (aborts will be ignored).
18203 * threads.c: By default, a thread will now never be interrumped while
18204 running the runtime invoke wrapper (this ensures that runtime_invoke
18205 will always return to the caller if an exception pointer is provided).
18206 There is a new special method mono_thread_force_interruption_checkpoint()
18207 to force an interruption checkpoint even if running a protected
18208 wrapper, which is used by the same runtime invoke wrapper to do a check
18211 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
18213 * object.c, object-internals.h: Implemented mono_release_type_locks,
18214 which releases the cctor locks held by a thread.
18215 * threads.c, threads.h: In thread_cleanup, release cctor locks held
18216 by a thread. Added mono_thread_exit() method to be used to safely stop
18219 2004-09-28 Raja R Harinath <rharinath@novell.com>
18221 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
18222 Move null check before dereference. Avoid indexing beyond the end
18223 of the 'modules' array.
18225 2004-09-28 Raja R Harinath <rharinath@novell.com>
18227 * metadata-internals.h (MonoImage): Add module_count field.
18228 * image.c (load_modules): Set image->module_count.
18229 (mono_image_load_file_for_image): Use image->module_count.
18230 * reflection.c (mono_image_load_module): Append to image->modules array
18231 of dynamic assembly.
18232 (mono_module_get_object): Fix loop to actually increment index.
18233 Use image->module_count.
18234 * assembly.c (mono_assembly_load_references): Use image->module_count.
18235 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
18238 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
18240 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
18241 Avoid assert on generic types.
18243 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
18245 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
18247 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
18249 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
18250 function to convert a MarshalSpec structure to its managed counterpart.
18252 * reflection.c: Fix warnings.
18254 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
18257 * icall.c (mono_create_icall_signature): Fix build.
18259 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
18261 * icall.c: Add MakePointType icall.
18263 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
18266 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18268 * threadpool.c: reuse allocated slots in the queue.
18270 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
18272 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
18274 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
18276 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
18279 * tabledefs.h: Add constants for pinvoke attributes BestFit and
18280 ThrowOnUnmappableChar.
18282 * icall.c (ves_icall_Type_GetPacking): New icall.
18284 2004-09-24 Martin Baulig <martin@ximian.com>
18286 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
18288 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18291 (mono_domain_set): allow setting a domain that is being unloaded.
18292 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
18295 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
18297 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
18298 the GetCustomAttributes icall.
18300 2004-09-23 Martin Baulig <martin@ximian.com>
18302 * object-internals.h (MonoReflectionGenericParam): Replaced
18303 'has_ctor_constraint', `has_reference_type' and `has_value_type'
18304 with `guint32 attrs'.
18306 2004-09-23 Martin Baulig <martin@ximian.com>
18308 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
18310 2004-09-23 Martin Baulig <martin@ximian.com>
18312 * object-internals.h (GenericParameterAttributes): New enum.
18314 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
18316 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
18318 * class.c (init_events): Fill out event->other field.
18320 * class.c: Fix warnings.
18322 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
18324 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
18326 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
18327 walk which doesn't supply the IL offset.
18329 2004-09-22 Martin Baulig <martin@ximian.com>
18331 * reflection.c (mono_reflection_setup_internal_class): If we're
18332 System.ValueType, System.Object or System.Enum, set
18333 `klass->instance_size' and create the vtable.
18334 (mono_reflection_create_internal_class): If we're an enum type,
18335 get the base class from our current corlib.
18337 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
18339 * reflection.h (MonoResolveTokenError): New type.
18341 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
18344 * icall.c: Add an 'error' argument to the ResolveToken icalls.
18346 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
18348 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
18349 Support also calling constructors, but only for already allocated objects.
18351 2004-09-17 Geoff Norton <gnorton@customerdna.com>
18353 * reflection.c (type_get_qualified_name): If the klass is null
18354 return the typename to avoid a NullRefEx.
18355 (encode_cattr_value): Get the qualified name of the boxed type,
18356 not the underlying enumtype. Fixes #62984.
18358 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
18360 * marshal.c: Fix problems with previous checkin.
18362 2004-09-21 <vargaz@freemail.hu>
18364 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
18365 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
18367 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
18369 2004-09-21 Geoff Norton <gnorton@customerdna.com>
18371 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
18372 should only return a type for pointers, arrays, and passbyref types.
18375 2004-09-21 Martin Baulig <martin@ximian.com>
18377 * domain.c (mono_debugger_check_runtime_version): New public
18380 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
18382 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
18384 * reflection.c: Added missing sort to the declarative security
18385 attributes table. MS implementation stops seeing the attributes if the
18386 token number regress in the table (as shown by ildasm and permview).
18388 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
18390 * object-internals.h (MonoReflectionModule): Add 'token' field.
18392 * reflection.c (mono_reflection_get_token): Add support for Module
18394 (mono_module_get_object): Set 'token' field.
18395 (mono_module_file_get_object): Set 'token' field.
18397 * icall.c: Add new Assembly and Module icalls.
18399 * appdomain.c: Bump corlib version.
18401 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
18403 * loader.h loader.c class.h class.c: Add helper functions for obtaining
18404 tokens of metadata objects.
18406 * reflection.h reflection.c (mono_reflection_get_token): New function
18407 to obtain the token of a metadata object.
18409 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
18411 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
18413 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
18415 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
18417 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
18419 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
18420 * object-internals.h: Added 3 MonoArray* members to MonoReflection
18421 AssemblyBuilder to access the permissions set in the class lib.
18422 * reflection.c: Added security attributes encoding step in
18423 mono_image_build_metadata.
18424 * tabledefs.h: Added new security actions defined in 2.0:
18425 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
18427 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
18429 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
18432 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
18434 * locales.c: nullify the ICU_collator member of CompareInfo when it is
18435 finalized. There where random SIGSEVs at program termination, when
18436 an object being finalized was trying to do a string comparison and
18437 the current culture was already finalized.
18439 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18441 * threads.c: call thread_cleanup before finishing the thread if we get
18444 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
18446 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
18447 assemblies from the parent. Fixes #65665.
18449 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
18451 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
18454 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
18456 * reflection.h: add prototype for mono_get_dbnull_object
18457 * reflection.c: add prototypes for get_default_param_value_blobs
18458 and mono_get_object_from_blob for fussier compilers
18460 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
18462 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
18463 false deadlock checks in class initialization.
18465 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
18467 * image.c (mono_image_addref): Fix comment.
18469 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
18472 2004-09-12 Jambunathan K <kjambunathan@novell.com>
18474 * reflection.c (mono_param_get_objects): Modified to return
18475 ParameterInfo.DefaultValue object.
18477 (get_default_param_value_blobs):
18478 (mono_get_object_from_blob):
18479 (mono_get_dbnull_object): New helper routines.
18481 * object.c (mono_get_constant_value_from_blob): New helper routine
18482 carved out from get_default_field_value ()
18484 * object-internals.h (mono_get_constant_value_from_blob): Added
18485 function declaration.
18487 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
18489 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
18490 referenced assemblies. Fixes #62135.
18492 * exception.h exception.c (mono_get_exception_file_not_found2): New
18495 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
18497 * class.h class.c: Add mono_type_get_underlying_type ().
18499 2004-09-09 Geoff Norton <gnorton@customerndna.com>
18501 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
18502 Fix GetTypes() to support dynamically created assemblies.
18504 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
18506 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
18508 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
18511 * reflection.h reflection.c loader.c: Allow dynamic construction of
18512 pinvoke methods. Fixes #65571.
18514 * reflection.c (mono_reflection_get_type): Revert previous change since
18515 it causes regressions.
18517 2004-09-08 Martin Baulig <martin@ximian.com>
18519 * class.c (class_compute_field_layout): Don't call
18520 mono_class_layout_fields() for open generic instances.
18522 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
18523 * threads.c appdomain.c: fix typo in GC macro
18525 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18527 * threads.c: don't call mono_thread_detach() in start_wrapper(),
18528 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
18530 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
18532 * image.c (mono_image_close): Applied patch from
18533 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
18534 assembly is loaded multiple times from data.
18536 * image.c (mono_image_open): Fix warning.
18538 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18540 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
18541 once. Fixes #58334.
18543 * reflection.c (mono_reflection_create_runtime_class): Initialize
18544 klass->nested_classes. Fixes #61224.
18546 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
18548 * threads.c: sched_yield() on exit, to allow threads to quit.
18550 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18552 * object.c (mono_unhandled_exception): Remove leftover debug code.
18554 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
18556 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
18558 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18560 * marshal.c (emit_marshal_array): Really null terminate string arrays.
18562 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
18564 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18566 * marshal.c (emit_marshal_array): Null terminate string arrays.
18568 * marshal.c (raise_auto_layout_exception): Fix warning.
18570 * reflection.c (mono_param_get_objects): Initialize the default value
18571 with DBNull.Value, not null. Fixes #62123.
18573 2004-09-01 Miguel de Icaza <miguel@ximian.com>
18575 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
18576 throw an exception with a cute explanation.
18578 2004-09-06 Dick Porter <dick@ximian.com>
18580 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
18581 Close the new process's thread handle, as we don't use it. The
18582 handle stays around forever otherwise.
18584 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18586 * object.c (arith_overflow): Fix warning.
18588 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
18589 calling conventions in method refs. Fixes #65352.
18591 * reflection.c: Fix warnings.
18593 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
18595 * icall.c: Add a new icall for Array.Clear
18597 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
18599 * object.c: When allocating an array, we have to throw
18600 an overflow exception if any of the lengths are < 0.
18602 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18604 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
18605 properly. Also move implementation of string array marshalling to
18606 managed code. Fixes #42316.
18608 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18610 * assembly.c: provide more information when loading an assembly fails.
18612 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18614 * filewatcher.c: don't expect the development fam package to be
18617 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
18619 * marshal.c: Make a copy of the signature cookie since it will be
18620 freed by the caller.
18622 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
18624 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
18626 * metadata.c (mono_metadata_free_marshal_spec): New function to free
18629 * marshal.c: More refactoring.
18631 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
18634 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
18636 * object.c: In mono_message_invoke, fill the output parameter array after
18637 calling the managed method (it was done before the call). This fixes
18640 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18642 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
18645 2004-09-02 Martin Baulig <martin@ximian.com>
18647 * class.c (mono_class_instance_size): Don't allow generic type
18648 definitions or open generic instances.
18649 (mono_class_array_element_size): If we're a value type, call
18650 mono_class_instance_size() on the original class.
18652 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
18653 handle generic instances.
18655 * mono-debug-debugger.c (write_type): Handle generic instances
18658 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18660 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
18661 the allocation request fails. Fixes #65089.
18663 * object.c (mono_runtime_free_method): Do not call mono_free_method.
18665 * object.c (mono_runtime_free_method): New function to free a dynamic
18668 * marshal.c (mono_delegate_free_ftnptr): New function to free the
18669 delegate trampoline.
18671 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
18672 with hasthis as dynamic,
18674 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
18676 * domain.c (mono_jit_info_table_remove): New function to remove an
18677 entry from the jit info table.
18679 * class-internals.h (MonoMethod): Add 'dynamic' field.
18681 * loader.c: Fix warnings.
18683 2004-09-01 Martin Baulig <martin@ximian.com>
18685 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
18686 instead of mono_debugger_lock() because the latter one is a no-op
18687 unless running in the debugger.
18689 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
18691 * class.c (class_compute_field_layout): Classes with auto-layout or
18692 reference fields are not blittable.
18694 2004-09-01 Dick Porter <dick@ximian.com>
18696 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
18697 mono_image_get_filename() to get the assembly location.
18700 * metadata.h: Fix compile warnings
18702 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
18704 * class.c (class_compute_field_layout): System.Object is blittable.
18706 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
18707 as in/out. Fixes #59909.
18709 2004-09-01 Martin Baulig <martin@ximian.com>
18711 * metadata.h (MONO_TYPE_ISREFERENCE): Call
18712 mono_metadata_generic_inst_is_valuetype() if we're a generic
18713 instance to check whether our underlying type is a reference type.
18715 2004-09-01 Martin Baulig <martin@ximian.com>
18717 * metadata.c (mono_type_size): If we're a generic instance, call
18718 mono_class_value_size() for value types.
18720 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
18722 * marshal.c: Implement more custom marshalling functionality. Fixes
18725 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
18727 * mono-debug.c, debug-mono-symfile.c: add some locking love.
18729 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
18731 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
18733 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
18735 * icall.c: Fix some warnings.
18737 * threads.c (abort_appdomain_thread): Fix unref errors.
18738 (mono_thread_current): Fix THREAD_DEBUG define.
18740 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
18742 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
18744 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
18746 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
18748 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
18751 2004-08-28 Martin Baulig <martin@ximian.com>
18754 (mono_metadata_generic_inst_is_valuetype): New public function.
18756 * metadata.h (MONO_TYPE_ISSTRUCT): Call
18757 mono_metadata_generic_inst_is_valuetype() if we're a generic
18758 instance to check whether our underlying type is a valuetype.
18760 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
18762 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
18765 2004-08-25 Martin Baulig <martin@ximian.com>
18767 * loader.c (mono_get_method_from_token): Abstract methods can also
18768 be generic and thus have type parameters.
18770 * metadata-internals.h
18771 (MonoDynamicImage): Added `GPtrArray *gen_params'.
18773 * reflection.c (mono_image_get_generic_param_info): Don't create a
18774 metadata row, just add an entry to the `gen_params' array.
18775 (build_compressed_metadata): Sort the `gen_params' array and then
18776 actually create the metadata.
18778 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18780 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
18782 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
18784 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
18786 2004-08-24 Martin Baulig <martin@ximian.com>
18788 * class.cs (mono_class_is_subclass_of): Like an interface, a
18789 generic instance also derives from System.Object.
18791 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
18793 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
18794 custom modifiers to be in any order. Fixes #61990.
18796 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
18798 * object.c: Register mono_object_new_fast icall.
18800 * object.c (mono_class_get_allocation_ftn): Return to calling
18801 mono_object_new_fast, since it seems faster to compute the object
18802 size in unmanaged code than passing it as a parameter.
18804 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
18806 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
18807 this function with Boehm as the oom handler, so we don't have to check
18808 the result of GC_malloc.
18810 * object.c: Remove checks for oom.
18812 * object.h object.c (mono_class_get_allocation_ftn): New function to
18813 return the icall which can be used to allocate an instance of a given
18816 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
18818 * class-internals.h: Add 'enabled' field.
18820 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
18822 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
18824 2004-08-18 Jambunathan K <kjambunathan@novell.com>
18825 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
18828 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
18830 * appdomain.c: use the Tls function for appdomain too,
18831 at Zoltan's request. Actually return in mono_context_get
18833 * appdomain.c, profiler.c, threads.c: use __thread
18835 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
18837 * appdomain.c threads.c: Call GC_CreateThread on windows.
18839 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
18840 multiple libraries since this don't work on windows.
18842 2004-08-18 Martin Baulig <martin@ximian.com>
18844 * class-internals.h
18845 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
18848 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
18849 MonoMethodNormal since we also need it for abstract and interface
18853 (build_compressed_metadata): Sort the GenericParam table.
18854 (mono_image_create_token): Added `gboolean create_methodspec'
18855 argument; this is false when generating a MethodImpl token.
18856 (reflection_methodbuilder_to_mono_method): Abstract and interface
18857 methods may also have generic parameters.
18859 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
18861 * appdomain.c: thread local alloc
18863 2004-08-17 Martin Baulig <martin@ximian.com>
18865 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
18868 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
18871 * class.c (mono_type_get_full_name): New public function.
18872 (mono_type_get_name): Don't include the type arguments.
18874 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
18876 * Makefile.am: Build static versions of libmetadata and libmonoruntime
18877 for inclusion into the mono executable.
18879 2004-08-16 Martin Baulig <martin@ximian.com>
18881 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
18882 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
18884 2004-08-14 Martin Baulig <martin@ximian.com>
18886 * class.c (dup_type): Also copy the `byref' field.
18888 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
18890 * reflection.c (create_dynamic_mono_image): Revert the last change
18891 since it breaks bootstrap.
18893 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
18895 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
18897 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
18898 not free them with g_free.
18900 2004-08-11 Martin Baulig <martin@ximian.com>
18902 * reflection.c (mono_reflection_setup_internal_class): Also call
18903 mono_class_setup_mono_type() if we already have a `tb->type.type'.
18905 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
18907 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
18908 called during default (first) AppDomain creation. Keep track of
18909 Evidence when loading assemblies.
18911 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
18913 * opcodes.c, opcodes.h: reduce runtime relocations.
18915 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
18917 * culture-info.h, locales.c: fixes and chages to sue the new
18918 optimized format of the locale data.
18919 * culture-info-tables.h: regenerated.
18921 2004-08-06 Geoff Norton <gnorton@customerdna.com>
18923 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
18925 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
18927 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
18928 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
18929 * domain-internals.h: icall declaration.
18930 * icall.c: icall registration.
18931 * object-internals.h: New fields in MonoAssembly for CAS.
18933 2004-08-05 Duncan Mak <duncan@ximian.com>
18935 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
18938 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
18940 * reflection.c: fix to deal with object[] arrays in custom ctors
18943 2004-08-05 Martin Baulig <martin@ximian.com>
18945 * class.c (mono_class_array_element_size): Added support for
18946 generic instances and correctly handle "recursive" types.
18948 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
18950 * assembly.c: Fix warnings.
18952 2004-08-04 Martin Baulig <martin@ximian.com>
18955 (mono_type_get_name_recurse): Added `gboolean include_arity'
18956 argument specifying whether or not we should include the generic
18957 arity in the type name.
18958 (_mono_type_get_name): New static function.
18959 (mono_class_setup_vtable): If we're a generic instance, don't
18960 include the generic arity in the names of explicit method
18963 2004-08-03 Martin Baulig <martin@ximian.com>
18965 * class.c (mono_type_get_name_recurse): Enclose the generic type
18966 arguments in `<', '>'.
18968 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
18970 * gc.c: make GC warning messages use the trace API, they are just
18971 noise to most of the users.
18973 2004-08-03 Martin Baulig <martin@ximian.com>
18975 * debug-mono-symfile.c (read_string): Correctly read the string.
18977 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
18979 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
18981 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
18983 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
18985 2004-07-30 Martin Baulig <martin@ximian.com>
18987 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
18988 Reflect latest symbol writer changes.
18990 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
18992 * object.c: always create an object if null is passed
18993 to Invoke() where a valuetype is expected.
18995 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
18997 * marshal.c (mono_marshal_init): make managed
18998 signatures match native ones better for 64bits.
19000 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19002 * appdomain.c: hack to build correctly the private bin path on windows.
19005 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
19007 * assembly.c: Load mscorlib from the correct framework directory
19008 (mono/<version>/mscorlib.dll).
19009 * appdomain.h: Added prototypes for new functions.
19010 * internals.h: Added some prototypes.
19011 * domain.c: When initializing the runtime, get from the executable and
19012 the configuration files the runtime version that the app supports.
19013 Added support methods for reading app.exe.config. Added list of versions
19014 supported by the JIT. Added two new methods: mono_init_from_assembly,
19015 which initializes the runtime and determines the required version from
19016 the provided exe file, and mono_init_version, which initializes
19017 the runtime using the provided version.
19018 * icall.c: Get machine.config from version-specific directory.
19019 * reflection.c: When generating an image, embed the version number
19020 of the current runtime.
19022 2004-07-28 Dick Porter <dick@ximian.com>
19025 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
19026 returned sockaddr size before creating the remote address object.
19027 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
19030 2004-07-28 Dick Porter <dick@ximian.com>
19032 * locales.c (string_invariant_compare_char): Fix invariant char
19033 compares between upper and lower cases. Fixes bug 61458.
19035 2004-07-27 Ben Maurer <bmaurer@ximain.com>
19037 * marshal.c: actually cache stelem.ref wrappers.
19039 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19041 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
19042 sections and remove the mono_cli_rva_map () function.
19044 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19046 * debug-mono-symfile.c: fix one more endianess issue, from a patch
19047 by Geoff Norton (<gnorton@customerdna.com>).
19049 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
19051 * class.c: fix class loads for pointer types (typeof(int) !=
19054 2004-07-27 Martin Baulig <martin@ximian.com>
19056 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
19057 reading the debugging information from an external ".mdb" file.
19059 2004-07-24 Martin Baulig <martin@ximian.com>
19061 * reflection.c (mono_image_get_type_info): Only write a class
19062 layout entry if we actually have a size or a packing size.
19064 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
19066 * reflection.c (type_get_fully_qualified_name):
19067 insert cast to get type checking of ?: with non-gcc compilers
19069 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
19071 * rand.c: use g_getenv for both lookups of
19074 2004-07-17 Martin Baulig <martin@ximian.com>
19076 * reflection.c (mono_reflection_bind_generic_method_parameters):
19077 Set `gmethod->reflection_info'.
19079 2004-07-17 Martin Baulig <martin@ximian.com>
19081 * class.c (mono_class_create_from_typedef): Insert the newly
19082 created class into the hash table before computing the interfaces
19083 since we could be called recursively.
19085 2004-07-16 Ben Maurer <bmaurer@ximain.com>
19087 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
19088 function to implement stelem.ref in managed code
19089 * class-internals.h, debug-helpers.c: a new wrapper type
19092 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
19094 * gc.c: allow GC handles to work even when no GC is compiled in.
19095 Fix part of bug #61134 (GetAddrOfPinnedObject).
19097 2004-07-13 Peter Williams <peter@newton.cx>
19099 * process.c (complete_path): Make sure we don't attempt to execute
19102 2004-07-12 Geoff Norton <gnorton@customerdna.com>
19104 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
19105 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
19106 and will add/subtract the hour if needed
19108 2004-07-12 Martin Baulig <martin@ximian.com>
19110 * reflection.c (mono_field_get_object): If we have
19111 `field->generic_info', take the attributes from
19112 `field->generic_info->generic_type'.
19114 2004-07-12 Martin Baulig <martin@ximian.com>
19116 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
19117 This function must be called before initializing the runtime.
19118 (mono_debug_init_1): New function; call this after initializing
19119 the runtime, but before loading the assembly. It tells the
19120 debugger to load corlib and the builtin types.
19122 * mono-debug-debugger.c: Did some larger changes in the debugging
19123 code; support recursive class declarations, make sure we actually
19126 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19128 * debug-helpers.c: undo my previous patch and fixed the real issue in
19129 ../mini/exceptions-x86.c
19131 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19133 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
19134 when no HOME env. variable was set and a NullRef was thrown in a .cctor
19135 called from other .cctors.
19137 2004-07-09 Miguel de Icaza <miguel@ximian.com>
19139 * loader.c: Removed the mono_loader_wine_init hack now that we are
19140 doing a managed version of Windows.Forms.
19142 2004-07-09 Ben Maurer <bmaurer@ximian.com>
19144 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
19145 threadpool.c, threads.c: remove static data from rootset.
19147 2004-07-09 Dick Porter <dick@ximian.com>
19149 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
19150 Don't do any more processing if the matched length was 0. It was
19151 increasing the size of the string before. Fixes bug 61167.
19153 2004-07-09 Dick Porter <dick@ximian.com>
19157 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
19158 Add support for SO_PEERCRED if its available.
19160 2004-07-09 Peter Bartok <pbartok@novell.com>
19161 * loader.c: winelib.exe.so error message is now only displayed if
19162 MONO_DEBUG is set. To help us avoid questions when people are trying
19163 out the new Managed.Windows.Forms.
19165 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
19167 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
19168 for isinst and castclass wrappers.
19170 * class-internals.h icall.c: Move registration and lookup of JIT icalls
19171 to libmetadata from the JIT, so they could be used by the marshalling
19172 code and the interpreter.
19174 * marshal.c: Register marshalling related JIT icalls here instead of
19175 in mini.c. Use CEE_MONO_ICALL instead of the family of
19176 CEE_MONO_PROC<x> opcodes to call marshalling functions.
19178 * metadata.h: Remove unneeded marshalling conversions.
19180 * opcodes.c: Update for new opcodes.
19182 2004-07-08 Martin Baulig <martin@ximian.com>
19184 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
19185 (mono_debug_get_domain_data): Make this function static.
19187 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
19189 * gc.c, object.h: add nice GC handle API for embedders.
19191 2004-07-06 Ben Maurer <bmaurer@ximian.com>
19193 * reflection.c: more changes for the new api
19195 * object.c: When we reflect on a field w/ a constant value, it
19196 will not have a memory location, so we must access metadata. Also,
19197 allow easier reading of strings so that we can read them from
19200 * class.c (mono_class_layout_fields): no need for literal fields here.
19202 * class-internals.h: api changes for const fields
19204 * icall.c (ves_icall_get_enum_info): use new apis for const fields
19206 2004-07-06 Martin Baulig <martin@ximian.com>
19208 * mono-debug.h: Increment version number to 44.
19210 * mono-debug.c (mono_debug_add_wrapper): The second argument is
19211 now a gpointer, rewrote this whole method.
19213 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
19214 function. Add information about the wrapper in a new "misc table".
19216 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
19217 for the new misc table.
19219 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
19221 * metadata-internals.h image.c: Add a cache for helper signatures.
19223 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
19225 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
19227 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
19228 delegates from a delegate. Fixes #61033.
19230 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
19231 marshalling of stringbuilder arrays. Fixes #59900.
19233 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
19235 * icall.c: Add EnumBuilder:setup_enum_type icall.
19237 2004-06-30 Ben Maurer <bmaurer@ximian.com>
19239 * icall.c: Added a new icall for the property version of
19240 OffsetOfStringData.
19242 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
19244 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
19245 it has a constant size across platforms.
19247 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
19250 2004-06-29 Martin Baulig <martin@ximian.com>
19252 * mono-debug.c (mono_debug_add_method): Protect the whole function
19253 in mono_debugger_lock(), not just parts of it.
19255 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19257 * reflection.c: make sure padding bytes in heaps are zeroed.
19259 2004-06-24 David Waite <mass@akuma.org>
19261 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
19262 image.c, loader.c, locales.c, marshal.c, metadata.c,
19263 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
19264 string-icalls.c, threads.c: change to C90-style comments from C99 /
19267 2004-06-24 Dick Porter <dick@ximian.com>
19270 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
19271 return createdNew. Fixes bug 60412.
19274 * icall.c: Add createdNew parameter to CreateMutex icall
19276 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19278 * reflection.c, object-internals.h: save default value in params.
19280 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19282 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
19283 no need to build a new path combining that with the application base.
19286 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19288 * reflection.c: fixed minor standard compliance issues.
19290 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
19292 * reflection.c: fixed issue with encoding some custom attributes
19293 (arrays in properties and fields, bug #60411).
19295 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19297 * reflection.c: fix start address when copying the public key token.
19299 2004-06-23 Martin Baulig <martin@ximian.com>
19301 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
19302 the `exc' object in a static object to put it into the GC's root set.
19304 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19306 * reflection.c: make mono_reflection_setup_internal_class ()
19307 callable a second time to setup a new parent class.
19309 2004-06-23 Dick Porter <dick@ximian.com>
19311 * threads.c: Check for WAIT_IO_COMPLETION return values.
19313 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
19315 * appdomain.c: Removed the g_free on the public key token. Now copy
19316 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
19317 * assembly.c: Added public key token string value when loading
19318 assemblies. Fix bug #60439.
19319 * icall.c: Added missing informations (like public key) in
19320 GetReferencedAssemblies. Fix #60519.
19321 * image.h: Changed definition for public key token from const char*
19322 public_tok_value to guchar public_key_token [17];
19323 * reflection.c: Updated for changes to public key token.
19325 2004-06-22 Lluis Sanchez Gual
19327 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
19328 for the field in base classes.
19330 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
19332 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
19333 mark headers as not supported, they are installed only for use by the
19336 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
19338 * *.c, *.h: avoid namespace pollution in public headers.
19340 2004-06-21 Martin Baulig <martin@ximian.com>
19342 * exception.c (mono_get_exception_security): It's in
19343 "System.Security", not in "System".
19345 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
19346 the exception classes.
19348 2004-06-21 Martin Baulig <martin@ximian.com>
19350 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
19351 Protect the exception object from being finalized.
19353 2004-06-21 Martin Baulig <martin@ximian.com>
19355 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
19358 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
19360 * reflection.c: Load the assembly in mono_reflection_type_from_name,
19361 if it was not loaded before. Fix parts of #60439.
19363 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
19365 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
19366 code that was broken since Ben's change: wrappers are now
19367 dependent on the method signature only again.
19369 2004-06-21 Martin Baulig <martin@ximian.com>
19371 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
19372 added interface support.
19374 2004-06-21 Martin Baulig <martin@ximian.com>
19376 * class.c (mono_vtable_get_static_field_data): New public method.
19378 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
19380 * filewatcher.c : Windows build fix to be compliant with API changes.
19382 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19384 * class.h, class.c: more accessors.
19385 * metadata.h, metadata.c: prepare for hiding MonoType and
19386 MonoMethodSignature: people should use the accessors from now on
19387 outside of the tree.
19389 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19391 * *.c, *.h: more API cleanups.
19393 2004-06-18 Jackson Harper <jackson@ximian.com>
19395 * assembly.c: Trace loading assemblies.
19396 * loader.c: Trace loading native libraries.
19397 * mono-config.c: Trace loading config files.
19399 2004-06-18 Dick Porter <dick@ximian.com>
19401 * locales.c: Tell ICU the lengths of strings, it can cope with
19402 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
19404 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19406 * image.c: swapped name/filename;
19408 2004-06-18 Martin Baulig <martin@ximian.com>
19410 * mono-debug-debugger.c (write_class): Write the parent class at
19411 the end of the header.
19413 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
19415 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
19417 2004-06-17 Raja R Harinath <rharinath@novell.com>
19419 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
19420 (bundle_obj): New conditional define.
19421 (BUILT_SOURCES): Remove.
19422 ($(bundle_srcs)): Make parallel-make safe.
19423 (libmonoruntime_la_LIBADD): Make unconditional.
19424 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
19425 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
19427 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
19429 * culture-info-tables.h: It was inconsistent with the latest
19432 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
19434 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
19437 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
19440 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19442 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
19443 cleaned up public header threads.h.
19445 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19447 * Makefile.am, *.c, *.h: more API cleanups.
19449 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19451 * Makefile.am: removed monosn from compilation.
19452 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
19453 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
19454 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
19455 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
19456 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
19457 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
19459 2004-06-15 Jackson Harper <jackson@ximian.com>
19461 * assembly.c: Make locales lower case when searching the GAC for
19462 assemblies. gacutil will always make locales lowercase when
19463 installing so this effectively makes them case insensitive.
19465 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
19467 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
19468 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
19469 parameter which allows to choose whether the wait can be interrupted or
19470 not. Also added the method mono_monitor_enter(), which locks the monitor
19471 using an infinite wait and without allowing interruption.
19472 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
19474 * object.h: Added new fields in MonoThread. suspend_event holds the event
19475 used to susped/resume the thread. synch_lock is the lock object to use for
19476 modifying the thread state.
19477 * threads.c: Use the new synch_lock object for locking, instead of "this",
19478 which can generate deadlocks.
19479 Moved thread state change in Thread.Sleep and Thread.Join from managed
19480 to unmanaged code. This avoids a deadlock when the thread was suspended
19481 just after acquiring the thread lock.
19482 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
19483 Implemented Thread.Suspend using an event instead of ThreadSuspend,
19484 which is not fully implemented in the io-layer.
19485 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
19487 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
19489 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
19490 threads-types.h: more API cleanups.
19492 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19494 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
19495 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
19496 threadpool.c, threads.c: first pass at the exported API cleanup.
19498 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19500 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
19502 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19504 * icall.c: added internalGetHome.
19506 2004-06-14 Dick Porter <dick@ximian.com>
19508 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
19509 possible to return successfully when '.' or '..' were the only
19510 entries in a directory, but were skipped. The MonoIOStat was not
19511 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
19514 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19516 * reflection.c: make binaries run on .Net 1.1 by default.
19518 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19520 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
19522 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
19524 * marshal.c: keep track of struct size with explicit layout
19527 2004-06-12 Martin Baulig <martin@ximian.com>
19529 * mono-debug-debugger.c: Comment out a debugging g_message().
19531 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
19533 * reflection.c, reflection.h: do not free custom attrs that are cached.
19534 * icall.c: use braces to make code clearer.
19536 2004-06-11 Martin Baulig <martin@ximian.com>
19538 * class.h (MonoInflatedField): New type.
19539 (MonoClassField): Replaced `MonoType *generic_type' with
19540 `MonoInflatedField *generic_info'.
19543 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
19545 2004-06-11 Martin Baulig <martin@ximian.com>
19547 * reflection.c (mono_image_create_method_token): Correctly encode
19550 2004-06-11 Martin Baulig <martin@ximian.com>
19552 * metadata.c (mono_metadata_parse_method_signature): When parsing
19553 a MethodDef which has VarArgs, also set sentinelpos if we don't
19554 have any parameters.
19556 2004-06-11 Martin Baulig <martin@ximian.com>
19558 * verify.c (mono_method_verify): In CEE_CALL, use
19559 mono_method_get_signature() to get the method's signature, unless
19560 we're a PInvoke method.
19562 2004-06-10 Jackson Harper <jackson@ximian.com>
19564 * assembly.c: Use <path>/lib/mono/gac for the extra paths
19565 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
19566 logical name as the supplied path is just a prefix to the gac not
19567 the direct path to it.
19569 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
19571 * reflection.c: make the token for a created method match
19572 the token of the MethodBuilder it was created from
19573 (IKVM requires this behaviour now).
19575 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
19577 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
19578 reflection.c, socket-io.c: leak fixes.
19580 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19582 * icall.c: handle sentinel pos in vararg methods in position different
19585 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19587 * culture-info-tables.h: freshly generated.
19589 2004-06-09 Martin Baulig <martin@ximian.com>
19591 * loader.c (mono_get_method_constrained): Call `mono_class_init
19592 (constrained_class)'.
19594 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
19596 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
19597 any methods. Fixes #59629.
19599 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
19601 * culture-info-tables.h: reflecting locale-builder updates.
19603 2004-06-08 Dick Porter <dick@ximian.com>
19606 * locales.c: Fixed compile warnings, including a real bug in
19607 CompareInfo_internal_compare.
19609 2004-06-08 Dick Porter <dick@ximian.com>
19612 (ves_icall_System_Globalization_CompareInfo_internal_index):
19613 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
19614 Double-check the resuls of usearches, because ICU currently
19615 ignores most of the collator settings here. Fixes bug 59720.
19617 2004-06-08 Dick Porter <dick@ximian.com>
19620 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
19621 Fix memory leak and segfault-causing typo. No idea how this one
19622 lasted so long without being noticed.
19624 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
19626 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
19627 any methods. Fixes #59629.
19629 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19632 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
19633 own the critical section before). Removed dead code (that's done
19634 in the preload hook).
19636 (mono_assembly_load_with_partial_name): call the preload hook.
19638 2004-06-08 Martin Baulig <martin@ximian.com>
19640 * metadata.c (mono_metadata_signature_alloc): Default
19641 `sentinelpos' to -1.
19643 * reflection.c (mono_image_get_array_token): Likewise.
19645 2004-06-08 Martin Baulig <martin@ximian.com>
19647 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
19649 * metadata.c (mono_metadata_parse_method_signature): When parsing
19650 a MethodDef which has VarArgs, set sentinelpos.
19652 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
19653 `gint16' since we're using -1 for non-varargs methods.
19656 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
19657 (method_encode_signature): Added varargs support.
19658 (method_builder_encode_signature): Likewise.
19659 (mono_image_get_varargs_method_token): New static method.
19660 (mono_image_create_method_token): New public method; this is
19661 called via an icall instead of mono_image_create_token() when
19662 calling a varargs method.
19664 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
19666 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
19668 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
19670 * culture-info-tables.h : Reflecting the latest locale-builder that
19671 fixed empty array representation ({} to {0}).
19673 2004-06-07 Jackson Harper <jackson@ximian.com>
19675 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
19676 looking up extra gac paths. This allows MONO_GAC_PATH to act
19677 exactly like a prefix.
19679 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
19681 * reflection.c (mono_reflection_type_from_name): Make a copy of the
19682 type name before modifying it. Fixes #59405.
19684 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
19686 * culture-info.h: added fields for "all datetime patterns".
19687 * locales.c: ( ves_icall_System_Globalization_CultureInfo
19688 _construct_datetime_format ()): fill xxx_patterns fields.
19689 * object.h: added fields for "all datetime patterns" to
19690 MonoDateTimeFormatInfo.
19691 * culture-info-tables.h: reflecting locale-builder updates.
19693 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
19695 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
19696 the event has no add and remove methods. Fixes #59629.
19698 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
19700 * object.c: Fixed possible integer overflow when allocating large
19703 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
19705 * culture-info-tables.h: reflecting locale-builder updates.
19707 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
19709 * culture-info-tables.h: reflecting locale-builder updates.
19711 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
19713 * culture-info-tables.h: reflecting locale-builder updates.
19715 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
19717 * threads.c: Made Thread.Sleep abortable.
19719 2004-06-02 Martin Baulig <martin@ximian.com>
19721 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
19723 * debug-mono-symfile.h: Bumped symbol file version number to 37.
19725 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
19727 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
19729 2004-05-30 Jackson Harper <jackson@ximian.com>
19731 * reflection.c: Do not hardcode assembly versions or public key
19732 tokens anymore. All of this except the corlib section was dead
19735 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
19737 * object.c (mono_runtime_invoke_array): Automatically create boxed
19738 objects for byref valuetypes if needed. Fixes #59300.
19740 * object.c (mono_method_return_message_restore): Handle
19741 MONO_TYPE_OBJECT as well.
19743 2004-05-28 Jackson Harper <jackson@ximian.com>
19745 * reflection.c: The modified type encoding was causing build
19746 problems. Reverted for now.
19748 2004-05-28 Jackson Harper <jackson@ximian.com>
19750 * reflection.c/h: Take an assembly ref so that we dont create
19751 fully qualified names when encoding types in the same assembly as
19752 the custom attribute being emitted.
19753 * appdomain.c: Increment version number.
19755 2004-05-26 Duncan Mak <duncan@ximian.com>
19758 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19759 Set the full version number (major, minor, build, revision).
19761 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
19763 * marshal.c (emit_struct_conv): increment src/dst after blit
19764 (mono_marshal_get_managed_wrapper,
19765 mono_marshal_get_native_wrapper): make sure we have marshalling
19766 info before marshalling params (info computation affects
19769 * class.c (class_compute_field_layout): correctly deal with
19771 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
19772 value types (as per what windows dows by default)
19773 (mono_class_setup_mono_type): System.ValueType is blittable
19774 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
19777 * marshal.c (mono_marshal_load_type_info): flag types as
19778 non-blittable if the native layout doesn't match the managed
19781 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19783 * appdomain.c: don't add stuff in the private search path that is
19784 above the application base. If application base is not set, there's
19785 no private search path.
19787 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
19789 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
19790 byref struct arguments in native->managed marshalling.
19792 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
19794 * marshal.c (mono_marshal_get_runtime_invoke): correctly
19795 cache methods using signature (special case for methods
19796 that are value type or string class)
19798 * image.c (mono_image_close): clean up allocated GSList's
19799 in runtime_invoke_cache.
19801 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19803 * mono-config.c: set the correct path for mono_cfg_dir on windows when
19804 there's no MONO_CFG_DIR environment variable defined.
19806 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19808 * threads.c: windows version must be >= 0x0500 to include OpenThread.
19810 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
19812 * threadpool.c: Really wait for 500ms after the async call, even if the wait
19814 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
19815 before waiting for it, and call CloseHandle after the wait to unref it.
19816 This will make sure that handles are not disposed too early.
19818 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19823 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
19826 * object.c: se the application_base only for the domain that runs
19827 Main. Fixes bug #59216,
19829 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19832 * object.c: only the domain in which Main is run have
19833 SetupInformation.ConfigurationFile set, so moved a few lines from
19834 appdomain.c to object.c.
19836 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19838 * appdomain.c: we tried to load [name].(dll|exe), but according
19839 to bug #57710, we must also try [culture]/[name].(dll|exe) and
19840 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
19841 There's a test case attached to bug #58922.
19843 2004-05-27 Dick Porter <dick@ximian.com>
19846 * file-io.c: Implemented icalls for locking and unlocking regions
19848 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
19849 FALSE on error (fixes both compiler warning and real bug.)
19851 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
19853 * culture-info-tables.h: reflecting locale-builder updates.
19855 (Added missing ChangeLog entry for 05/26)
19857 2004-05-27 Jackson Harper <jackson@ximian.com>
19859 * locales.c: Fix some cut and paste errors.
19861 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19863 * mono-config.c: set the correct path for config. directory on windows.
19865 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
19867 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
19870 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
19872 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
19873 from pinvoke functions.
19875 * marshal.c (mono_ftnptr_to_delegate): Implement this.
19877 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
19879 * culture-info-tables.h: reflecting locale-builder updates.
19881 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
19883 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
19886 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
19888 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
19889 * icall.c: Modified icalls for RNG.
19890 * rand.c|h: Changed RNG interface to allow thread-safe usage under
19891 Windows (CryptoAPI).
19893 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
19895 * locales.c: Fix build.
19897 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
19899 * culture-info-tables.h: reflecting locale-builder updates.
19901 2004-05-25 Jackson Harper <jackson@ximian.com>
19903 * locales.c: When creating the current culture use the $LANGs
19904 specific culture. So DateTimeFormat and NumberFormat entries are created.
19906 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
19908 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
19909 a char array as parameter.
19911 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
19913 * image.c: In mono_image_open(), always use an absolute path name to
19914 look for already loaded images.
19916 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
19918 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
19919 missing in the windows build (like older cygwin include files).
19921 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
19923 * icall.c: Fixed check for possible integer overflow in Buffer_
19924 BlockCopy icall. Replaced comments style // by /* */.
19926 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
19928 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
19930 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
19931 check after MONO_VTADDR. Fixes pinvoke2.exe.
19933 * marshal.h marshal.c metadata.h: Add beginnings of support for
19934 ftnptr -> delegate marshalling.
19936 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
19938 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
19939 * threads.c: Fix warnings.
19941 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
19943 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
19944 * icall.c: Registered icalls for Suspend and Resume.
19945 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
19947 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
19948 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
19949 * process.c: Use WaitForSingleObjectEx.
19950 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
19952 * threads.c, threads.h: Make use of new Ex wait methods. Improved
19953 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
19954 for Suspend and Resume. Added new mono_thread_stop, used for stoping
19955 background threads. Added basic support for Abort in Windows.
19956 Start new threads using a managed delegate invoke wrapper. This wrapper
19957 has an interruption checkpoint that is needed since an interruption
19958 can be requested before the thread leaves the unmanaged code that starts
19960 * marshal.c: Added interruption checkpoint after every native call, and
19961 also before managed calls for wrappers called from unmanaged code to
19962 go into managed code.
19963 * object.h: Added new field in MonoThread to keep track of interruption
19966 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
19968 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
19971 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19978 * rand.c: getenv -> g_getenv (windows!)
19980 * process.c: complete_path is also used on non-windows platforms.
19982 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19984 * icall.c: new signature for Process_Start.
19986 * process.[ch]: new signature for Process_Start. If we're on windows
19987 and UseShellExecute is false, we have to search for the program by
19988 ourselves if we don't get a full path.
19990 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
19992 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
19993 marshalling and call CleanUpNativeData if needed. Fixes #58646.
19995 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19997 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
20000 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20002 * process.c: use double quotes to quote program name and arguments on
20003 windows. Fixes bug #58575.
20005 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20007 * file-io.c: don't return "." and ".." when using windows Find*File.
20009 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
20011 * marshal.c: Don't pass wrappers to message init because method
20012 addressed used to lookup metadata. part of remoting[2|3] fix.
20014 2004-05-15 Jackson Harper <jackson@ximian.com>
20016 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
20017 path is essentially the same as MONO_PATH except that it points to
20018 GACs instead of lib directories.
20019 * loader.h: The user gac is gone so we dont need function to
20021 * mono-config.c: user gac option is now gone.
20023 2004-05-15 Jackson Harper <jackson@ximian.com>
20025 * culture-info.h: Make defines more consistent, add calendar data
20026 to the culture info table.
20027 * culture-info-tables.h: Add basic calendar data. Basically
20028 everyone gets default gregorian until all the data is
20030 * locales.c: Use the new consistent defines. Set calendar data for
20031 culture info objects.
20032 * object.h: add a field for calendar data to CultureInfo
20034 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
20036 * image.c: image->runtime_invoke_cache is keyed on signatures now.
20037 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
20039 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
20040 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
20041 an extra param that is the pointer of the method to invoke. The IL for
20042 the invoke method is no longer specific to the method, but to the
20043 signature of the method. Thus, we can share the same code for multiple
20044 methods. This reduces the number of methods that have to be compiled.
20046 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
20048 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
20050 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20052 * icall.c: Optimize Buffer.BlockCopy.
20054 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20056 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
20057 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
20058 quote). Changed them to "MMMM yyyy".
20060 2004-05-12 Miguel de Icaza <miguel@ximian.com>
20063 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
20065 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
20067 * reflection.h: Updated after changes to managed structures.
20069 * appdomain.c: Bump corlib version.
20071 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20073 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
20076 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20078 * Makefile.am: link to ../os/libmonoos.la on windows.
20081 -If MONO_DEBUG, warn about non-existing directories in
20083 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
20084 compile time variable.
20085 -Removed init_default_path and call mono_set_rootdir from
20086 libmonoos.a instead (windows only).
20088 * assembly.h: declare mono_assembly_getrootdir().
20091 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
20093 * loader.c: s/getenv/g_getenv/
20095 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
20097 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
20099 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
20101 * metadata.h: Add new marshalling conversions.
20103 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
20106 * reflection.c (mono_reflection_get_type): Lookup the type in all
20107 modules of a multi-module assembly. Fixes #58291.
20109 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
20111 * threads.c: Before aborting a background, set the StopRequested
20112 state. This avoids throwing the Abort exception.
20113 In mono_thread_manage, don't continue with the shutdown until all
20114 aborted threads have actually stopped.
20116 2004-05-10 Jackson Harper <jackson@ximian.com>
20118 * locales.c: Remove the modifier from culture names.
20120 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20122 * Makefile.am: monosn is not installed any more. It has been deprecated
20125 2004-05-07 Jackson Harper <jackson@ximian.com>
20128 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
20129 Fix array construction, add bailout if the length is 0.
20131 2004-05-07 Dick Porter <dick@ximian.com>
20133 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
20134 machine doesn't have a DNS entry. Patch by Urs Muff
20135 (umuff@quark.com), fixes bug 57928.
20137 2004-05-06 Jackson Harper <jackson@ximian.com>
20139 * reflection.c: Handle null PublicTokens properly. alloc mem for
20140 assembly names culture so we dont crash when freeing it.
20142 2004-05-06 Jackson Harper <jackson@ximian.com>
20144 * assembly.c: Check the usergac when loading with partial names.
20146 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
20148 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
20149 does nothing for now (not required for Linux/Windows) but the class
20150 library can call it (and a newer or modified runtime could need it).
20151 * icall.c: Registred icall.
20153 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20155 * loader.c: prints a message on module loading error we set MONO_DEBUG
20156 environment variable.
20158 2004-05-05 Jackson Harper <jackson@ximian.com>
20160 * appdomain.c: Handle PublicKeyToken=null properly.
20162 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
20164 * environment.c|h: Added icall ves_icall_System_Environment_
20165 GetOSVersionString to get the current OS version as a string.
20166 * icall.c: Registred icall.
20168 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
20170 * object.c: in mono_object_get_virtual_method(), take into account that
20171 non-virtual methods don't have a slot in the vtable. Check needed when
20172 the object is a proxy.
20174 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
20176 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
20177 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
20179 * object.c (mono_class_compute_gc_descriptor): Fix warning.
20181 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
20182 passed when a valuetype is expected.
20184 * object.c (mono_unhandled_exception): Only set the exit code if the
20185 exception happens in the main thread. Fixes thread5.exe.
20187 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
20188 invalid names. Fixes #58047.
20190 2004-05-03 Jackson Harper <jackson@ximian.com>
20192 * assembly.c: This line was committed accidently and is unneeded.
20194 2004-05-03 Jackson Harper <jackson@ximian.com>
20196 * icall.c: Add new icall for Assembly::LoadWithPartialName
20197 * assembly.c/.h: new function that probes the GAC to load partial
20198 assembly names by Paolo Molaro.
20200 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20202 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
20203 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
20204 (type_get_fully_qualified_name): Added PublicKeyToken when building a
20207 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20209 * appdomain.c: fixed check for 'neutral' culture and removed warning.
20210 * reflection.c: fix bug when parsing a full type name and Version is not
20211 the last thing in the string.
20213 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
20215 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
20216 crashes when it is freed.
20218 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20220 * assembly.c: print the compat warning to stderr.
20222 2004-05-01 Miguel de Icaza <miguel@ximian.com>
20224 * assembly.c (mono_assembly_load_references): Add a compatibility
20225 hack to run old applications that might be still referencing the
20226 3300-based assemblies, only do this for System.xxx.
20228 2004-05-01 Jackson Harper <jackson@ximian.com>
20230 * appdomain.c: If the culture is neutral we set it to "".
20232 2004-04-29 Jackson Harper <jackson@ximian.com>
20234 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
20236 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
20238 * string-icalls.c: added low overhead function for copying chars
20239 * icall.c: added needed icall for the above function
20241 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20243 * icall.c: fix return value of get_global_assembly_cache. Implemented
20244 Environment.GetLogicalDrives.
20246 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
20248 * rand.c: try and talk to egd or prngd
20249 for random bytes if opening devices fail.
20251 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
20253 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
20254 alignment for the type using the native alignment of its members
20255 instead of using klass->min_align.
20257 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
20259 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20262 * socket-io.c: added check for sys/aio.h.
20264 2004-04-28 Dick Porter <dick@ximian.com>
20266 * threads.c: Don't abort a thread thats already aborting, when
20267 terminating everything.
20269 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20271 * icall.c: added 2 new async calls for Socket.
20273 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
20274 IO on *nix systems.
20276 * threadpool.c: removed unused variable.
20278 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
20280 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
20282 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
20284 * locales.c: put back string_invariant_tolower () and
20285 string_invariant_toupper ().
20287 2004-04-26 David Waite <mass@akuma.org>
20292 * unicode.h: remove comma from end of enumeration declarations
20294 2004-04-26 David Waite <mass@akuma.org>
20296 * debug-mono-symfile.h:
20299 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
20302 2004-04-26 Jackson Harper <jackson@ximian.com>
20304 * appdomain.c: Increment version number.
20306 2004-04-26 Jackson Harper <jackson@ximian.com>
20308 * appdomain.c: Set assembly references public token value when
20309 PublicKeyToken is specified, not the hash_value. Free public token
20310 values when free assembly name data. Previously the public key
20311 token was hex decoded, however we are using hex encoded public key
20312 tokens, so this is not neccasary.
20313 * assembly.c: Lookup assemblies in the gac if their public token
20314 value is set. Add function to allow enabling user gac
20315 lookups. Specify whether or not the assembly was loaded from the
20316 GAC. Compare full assembly names when checking the cache for
20317 assemblies (Temporarily disabled see comment in code). Remove
20318 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
20319 specifies trace-loader they get extra info to stdout on the
20320 loading of assemblies.
20321 * image.h: Add a field for an assembly references public token
20322 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
20323 whether an assembly has been loaded from the GAC.
20324 * image.c: Remove a corlib -> mscorlib name mapping.
20325 * loader.h: Add function to enable/disable the user gac.
20326 * mono-config.c: Check if the usergac is enabled in the config
20328 * icall.c: New icall to determine whether or not an assembly has
20329 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
20330 * tabldefs.h: Add constant for assemblyref flag that specifies a
20331 full public key is used instead of a public token.
20332 * reflection.c: Remove mscorlib -> corlib mappings. Set
20333 PublicTokenValue instead of hash value. This value is a hex
20334 string so it does not need to be expanded.
20336 2004-04-26 Martin Baulig <martin@ximian.com>
20338 * mono-debug-debugger.c (mono_debugger_initialize): Set
20339 `mono_debugger_initialized' before calling mono_debug_lock().
20341 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
20343 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
20344 InternalToUpper/InternalToLower.
20345 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
20346 removed invariant culture shortcut. This is now done in managed code.
20347 * locales.c: (string_invariant_toupper/tolower) removed.
20349 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20351 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
20352 Added Poll internal call.
20354 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
20355 call for Poll. Select was too heavy for polling a single socket.
20357 * threadpool.[ch]: added mono_threadpool_cleanup.
20358 * threads.c: use it. Don't use Thread_Abort on windows.
20360 2004-04-23 Martin Baulig <martin@ximian.com>
20362 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
20364 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
20366 * icall.c: Registred new icalls for key pair protection and added an
20367 icall for Environment.GetFolderPath on Windows.
20368 * security.c|h: Added new icalls for key pair protection.
20370 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20372 * socket-io.c: don't display the non-supported family warning for known
20373 families. Now this is not displayed on windows when checking support
20376 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20378 * class.c: don't display the layout warning for static fields.
20380 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
20382 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
20383 * locales.c, locales.h: Added new icalls for culture-specific
20384 Char.ToLower and Char.ToUpper.
20386 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20388 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
20391 2004-04-20 Martin Baulig <martin@ximian.com>
20393 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
20394 of the type name before passing it to mono_reflection_type_from_name().
20396 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
20398 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
20399 encodings here. Fixes #56965.
20401 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
20403 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
20404 fix test on strstr result not that I can see anything that
20405 relies on the result.
20407 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
20409 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
20412 * marshal.c (mono_marshal_get_string_encoding): New helper function.
20414 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
20415 function to determine which marshalling to use for strings. Fixes
20418 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
20420 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
20422 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
20424 * icall.c: #include mono-config.h
20426 2004-04-15 Jackson Harper <jackson@ximian.com>
20428 * culture-info-tables.h: Fix date formats for en-US culture.
20430 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
20432 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
20433 ThreadPool.SetMinThreads.
20434 * threadpool.c: Implemented ThreadPool.GetMinThreads and
20435 ThreadPool.SetMinThreads.
20437 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
20439 * mono-config.c: also load the .config file in the directory
20440 where the assembly was found.
20442 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
20444 * assembly.c: load per-assembly config files.
20445 * icall.c: decrapified code to get the config dir and moved to
20447 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
20448 per-assembly config files. When doing a dll map lookup give precedence
20449 to the per-assembly data.
20451 2004-04-14 Martin Baulig <martin@ximian.com>
20453 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
20454 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
20455 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
20457 * mono-debugger-debugger.c: While the debugger is locked, remember
20458 whether the symbol tables have changes and send one single
20459 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
20461 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
20463 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
20465 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
20468 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
20469 account when marshalling string arrays. Fixes #56965.
20471 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
20473 * icall.c: Add new icalls mapping for security.
20474 * security.c|h: Add internal calls for WindowsIdentity,
20475 WindowsImpersonationContext and WindowsPrincipal.
20477 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
20479 * class.c: Added comment to ensure the System.MonoDummy class
20480 is removed when no longer necessary
20482 2004-04-13 Miguel de Icaza <miguel@ximian.com>
20484 * appdomain.c: Pass arguments to the bootstraping exceptions to
20485 minimize JITed methods at boot
20487 * metadata.c (mono_exception_from_name_two_strings): Allow for the
20488 second string to be null.
20490 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
20491 Change the protocol to minimize the JIT methods at startup. Now
20492 it Returns the internal codepage, if the value of "int_code_page"
20493 is 1 at entry, and we can not compute a suitable code page
20494 number, returns the code page as a string.
20496 2004-04-13 Jackson Harper <jackson@ximian.com>
20498 * culture-info-tables.h: Fix number of decimal digits for all
20501 2004-04-13 Jackson Harper <jackson@ximian.com>
20503 * icall.c: Clairfy out of sync error message. It is not always
20504 your corlib that is out of sync.
20506 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
20508 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
20509 properties when only the set accessor is overriden. Fixes #55874.
20511 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
20513 * assembly.c (mono_assembly_load_references): Make this thread safe.
20516 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
20518 * monosn.c: Add missing initialization calls.
20520 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
20523 ves_icall_System_Globalization_CultureInfo_construct_number_format
20524 Fix g_assert so it compiles on fussier compilers re int/ptr
20527 2004-04-08 Dick Porter <dick@ximian.com>
20530 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
20531 53992. Also rearrange the code so that the internal calls return
20532 an error value and exceptions are thrown from managed code.
20534 * icall.c: Add type info to the socket icalls.
20536 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20538 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
20541 2004-04-07 Martin Baulig <martin@ximian.com>
20543 * class.c (mono_class_from_generic_parameter): Don't default
20544 `klass->parent' to `mono_defaults.object_type'.
20546 2004-04-07 Martin Baulig <martin@ximian.com>
20548 * reflection.c (mono_reflection_initialize_generic_parameter): Set
20549 `param->pklass->reflection_info'.
20551 2004-04-07 Jackson Harper <jackson@ximian.com>
20553 * culture-info-tables.h: Fix date separator symbol.
20555 2004-04-07 Martin Baulig <martin@ximian.com>
20557 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
20558 from System.Type to System.MonoType.
20560 2004-04-07 Martin Baulig <martin@ximian.com>
20563 (MonoReflectionGenericParam): Added `has_reference_type' and
20564 `has_value_type' fields.
20566 * reflection.c (mono_image_get_generic_param_info): Encode the
20567 correct flags if we have the `class' or `struct' constraint.
20569 2004-04-07 Martin Baulig <martin@ximian.com>
20572 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
20574 2004-04-07 Jackson Harper <jackson@ximian.com>
20576 * appdomain.c: Revert extra patches, just wanted to bump the
20579 2004-04-07 Jackson Harper <jackson@ximian.com>
20581 * Makefile.am: Add culture-info private headers.
20582 * icall.c: Add new icalls for contructing locales.
20583 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
20584 * locales.h: Declare new culture info construction methods.
20585 * object.h: Add new fields used to avoid the CultureMap to
20587 * culture-info.h: Definition of structs used in the culture info
20589 * culture-info-tables.h: Autogenerated tables that contain culture
20590 info data. This file was generated with the locale-builder tool.
20591 * appdomain.c: Incement corlib version number.
20593 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
20595 * appdomain.c: (mono_runtime_init) move mono_thread_init
20596 to before mono_object_new calls so critical sections
20597 are initialized before use.
20599 2004-04-07 Martin Baulig <martin@ximian.com>
20602 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
20603 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
20604 (ves_icall_MonoGenericParam_initialize): Removed.
20605 (monogenericparam_icalls): Removed.
20606 (generictypeparambuilder_icalls): Added new table for
20607 System.Reflection.Emit.GenericTypeParameterBuilder.
20610 (mono_reflection_define_generic_parameter): Removed.
20611 (mono_reflection_initialize_generic_parameter): This is now called
20612 from GenericTypeParameterBuilder's .ctor.
20614 2004-04-06 Martin Baulig <martin@ximian.com>
20616 * class.c (mono_class_init): Don't inflate nested classes in a
20618 (mono_type_get_name_recurse): Include the generic arguments for
20619 generic instances and generic type declarations.
20620 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
20621 (_mono_class_get_instantiation_name): Removed.
20622 (mono_class_create_generic): Always use `gklass->name' as our name.
20624 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
20626 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
20627 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
20628 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
20629 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
20630 closed generic methods here.
20633 (mono_reflection_generic_inst_get_nested_types): Removed.
20634 (inflate_mono_method): Copy the generic parameters from the
20635 MonoMethodHeader into out MonoGenericMethod.
20637 2004-04-06 Martin Baulig <martin@ximian.com>
20640 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
20642 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
20644 * reflection.c (build_compressed_metadata): If we have any entries
20645 in the GenericParam, MethodSpec or GenericParamConstraint tables,
20646 set the header version to 1.1.
20648 2004-04-06 Martin Baulig <martin@ximian.com>
20650 * class.c (mono_class_init): If we're a generic instance,
20651 initialize our nested classes, too.
20652 (_mono_class_get_instantiation_name): Deal with the new `!%d'
20655 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20657 * process.c: quote the argument passed to the shell on windows.
20659 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
20661 * threads.c (mono_alloc_special_static_data): Allow this to be
20662 called during startup.
20664 2004-04-02 Martin Baulig <martin@ximian.com>
20667 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
20669 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
20671 * icall.c: Fix build.
20673 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
20675 * Makefile.am: Added security.c|h.
20676 * icall.c: Added icall for get_UserName;
20677 * security.c: New file for security related icalls. Added function
20678 get_UserName for System.Environment (fix #56144).
20679 * security.h: New. Header file for security.c
20681 2004-04-02 Dick Porter <dick@ximian.com>
20683 * icall.c: Deleted the icalls that were obsoleted some time ago
20684 by the ICU string code, and which were mixed into the icall
20685 rearranging. Fixes bug 55969.
20688 * string-icalls.c: Deleted the code that those icalls reference.
20690 2004-04-01 Martin Baulig <martin@ximian.com>
20692 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
20694 * class.c (mono_class_from_generic_parameter): Don't set
20695 TYPE_ATTRIBUTE_INTERFACE.
20696 (my_mono_class_from_generic_parameter): Likewise.
20698 2004-04-01 Martin Baulig <martin@ximian.com>
20700 * loader.c (find_method): Added an optional `MonoClass *ic'
20701 argument to search in a specific interface.
20702 (mono_get_method_constrained): New public function.
20704 2004-04-01 Martin Baulig <martin@ximian.com>
20706 * reflection.c (mono_image_get_generic_field_token): Use the
20707 `handleref' cache here.
20709 2004-04-01 Martin Baulig <martin@ximian.com>
20711 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
20713 * reflection.c (create_generic_typespec): Use the `typespec' hash
20714 here, not the `typeref' one.
20716 2004-04-01 Martin Baulig <martin@ximian.com>
20718 * class.c (mono_class_inflate_generic_type): Moved the
20719 functionality into a new static inflate_generic_type() which
20720 returns NULL if it didn't do anything. Only increment the
20721 `mono_stats.inflated_type_count' if we actually inflated
20723 (mono_class_get_full): Check the classes type to see whether we
20724 need to inflate it; also inflate MONO_TYPE_(M)VAR.
20726 2004-04-01 Jackson Harper <jackson@ximian.com>
20728 * reflection.c: Set culture for assembly references.
20730 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
20732 * reflection.[ch], icall.[ch], Fix support for pinning variables.
20734 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20737 (do_mono_assembly_open): the critical section also covers
20738 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
20740 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20743 (mono_manage_threads): abort the background threads when finishing.
20746 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20748 * gc.c: only close the done_event handle if there was no timeout.
20751 2004-03-30 Martin Baulig <martin@ximian.com>
20753 * icall.c (icall_entries): It's called "System.Activator", not
20754 "System.Activation".
20756 2004-03-30 Martin Baulig <martin@ximian.com>
20758 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
20759 (mono_class_create_from_typespec): Likewise.
20761 2004-03-30 Martin Baulig <martin@ximian.com>
20763 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
20764 `has_ctor_constraint' and `initialized'.
20766 2004-03-30 Martin Baulig <martin@ximian.com>
20768 * reflection.c (encode_new_constraint): New static function to add
20769 the constructor constraint attribute to a type parameter.
20770 (encode_constraints): Call encode_new_constraint() if necessary.
20773 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
20775 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
20777 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
20779 * reflection.c, icall.c: add support for pinning variables.
20781 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
20783 * marshal.c (mono_marshal_get_managed_wrapper):
20784 init bool local with zero rather than null.
20786 2004-03-29 Martin Baulig <martin@ximian.com>
20788 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
20789 the "official" behavior here.
20790 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
20792 2004-03-29 Martin Baulig <martin@ximian.com>
20794 * icall.c: Reflect latest API changes.
20796 2004-03-29 Martin Baulig <martin@ximian.com>
20798 * loader.c (mono_get_method_from_token): Also call
20799 mono_metadata_load_generic_params () for abstract and interface
20800 methods; replace the type arguments in the method signature with
20801 the ones which are loaded from the metadata.
20803 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
20805 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
20806 of the lock is not the current thread. MS.NET don't do it, in spite of
20807 what the documentation says. See bug #56157.
20809 2004-03-28 Martin Baulig <martin@ximian.com>
20811 * class.c (mono_class_init): Don't call init_properties() and
20812 init_events() for generic instances; set `prop->parent' when
20813 inflating properties.
20815 * reflection.c (mono_generic_inst_get_object): Call
20816 `mono_class_init (ginst->klass)'.
20817 (mono_type_get_object): Only create a MonoGenericInst if your
20818 generic type is a TypeBuilder.
20819 (do_mono_reflection_bind_generic_parameters): Only set
20820 `ginst->is_dynamic' if our generic type is a TypeBuilder.
20822 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
20824 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
20827 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20829 * icall.c: added Kill_internal icall.
20830 * process.[ch]: added Kill_internal icall.
20832 2004-03-25 Martin Baulig <martin@ximian.com>
20834 * class.h (MonoStats): Added `generic_instance_count',
20835 `inflated_method_count', `inflated_type_count' and
20836 `generics_metadata_size'.
20838 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20840 * reflection.c: no warnings now.
20842 2004-03-25 Martin Baulig <martin@ximian.com>
20844 * class.c (mono_class_get_full): New public function; does a
20845 mono_class_get(), but also takes a `MonoGenericContext *'.
20847 * loader.c (mono_field_from_memberref): Renamed to
20848 `field_from_memberref', made static and added `MonoGenericContext *'
20850 (mono_field_from_token): Added `MonoGenericInst *' argument.
20851 (method_from_memberef): Likewise.
20852 (mono_get_method_from_token): Likewise.
20853 (mono_get_method_full): New public function; does a
20854 mono_get_method(), but also takes a `MonoGenericContext *'.
20856 * verify.c (mono_method_verify): Get the method's generic context
20857 and pass it to mono_field_from_token(), mono_get_method_full() and
20858 mono_class_get_full().
20860 2004-03-25 Martin Baulig <martin@ximian.com>
20862 * class.c (mono_class_inflate_generic_type): Take a
20863 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
20864 `MonoGenericMethod *'.
20866 2004-03-25 Martin Baulig <martin@ximian.com>
20868 * loader.h (MonoMethodInflated): Store the MonoGenericContext
20869 instead of the MonoGenericMethod here.
20871 2004-03-25 Martin Baulig <martin@ximian.com>
20873 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
20874 each time we create a new MonoGenericInst, we also create a new
20875 context which points back to us.
20877 * class.c (inflate_method): Use `ginst->context' instead of
20878 creating a new context.
20880 * loader.c (method_from_memberref): Use
20881 `klass->generic_inst->context' instead of creating a new context.
20883 2004-03-25 Martin Baulig <martin@ximian.com>
20885 * class.h (MonoGenericContext): New struct.
20886 (MonoGenericMethod): Removed `generic_inst'.
20888 * class.c (mono_class_inflate_generic_method): Take a
20889 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
20891 2004-03-25 Martin Baulig <martin@ximian.com>
20893 * loader.h (MonoMethodInflated): New typedef.
20895 * metadata.h (MonoMethodSignature): Removed `gen_method', make
20896 `generic_param_count' consume just 30 bits, added `is_inflated'
20897 and `has_type_parameters' flags (one bit each).
20899 * class.c (mono_class_inflate_generic_method): Create a
20900 MonoMethodInflated instead of a MonoMethodNormal and set
20901 `is_inflated' in the method signature.
20903 * class.h (MonoGenericMethod): Removed `generic_method'.
20905 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
20907 * image.c: Make sure the name of a MonoImage is always an absolute path.
20908 This fixes bug #54415.
20910 2004-03-24 Martin Baulig <martin@ximian.com>
20912 * class.c (mono_class_setup_vtable): If we're a generic instance,
20913 use our generic type's vtable size.
20915 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
20917 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
20918 MONO_NO_UNLOAD env var as a temporary workaround for unloading
20921 2004-03-23 Martin Baulig <martin@ximian.com>
20923 * class.h (MonoDynamicGenericInst): Added `int count_events' and
20924 `MonoEvent *events'.
20926 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
20927 (typebuilder_icalls): Added "get_event_info"; calls
20928 mono_reflection_event_builder_get_event_info().
20930 * reflection.c (mono_reflection_generic_inst_initialize): Added
20931 `MonoArray *events'.
20932 (mono_reflection_event_builder_get_event_info): New function.
20934 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
20936 * object.h: add mono_type_initialization_init
20938 * object.c (mono_runtime_class_init):
20939 implement class constructor synchronization rules
20940 to cope with threading issues.
20941 add mono_type_initialization_init
20943 * appdomain.c (mono_runtime_init): call
20944 mono_type_initialization_init
20946 * class.h: removing initializing field from MonoVTable
20948 2004-03-23 Martin Baulig <martin@ximian.com>
20950 * class.c (my_mono_class_from_generic_parameter): Use
20951 `param->name' if it's not NULL.
20953 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
20955 * class.c: do not insert non-virtual methods in the vtable.
20956 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
20957 that means the method is non-virtual. This never would have
20960 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
20962 * profiler.c: Added lock for accessing coverage_hash.
20964 2004-03-22 Martin Baulig <martin@ximian.com>
20966 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
20967 `method->method->signature->generic_param_count != 0' to make it
20968 work for interface methods.
20970 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20972 * process.c: quote the string passed to the shell using g_shell_quote.
20974 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20977 (mono_threads_manage): don't remove the finalizer thread and self
20978 from the threads hash table so that mono_thread_manage can be called
20981 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20983 * process.c: quote the arguments when UseShellExecute is true. Fixes
20986 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20988 * threads.c: set mono_thread_detach as a cleanup routine for every
20989 thread. This way it's always executed upon thread termination, either
20990 aborted or finished normally. No more xsp hangs!
20992 2004-03-17 Martin Baulig <martin@ximian.com>
20994 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
20995 `int count_nested' and a `MonoType **nested'.
20997 * reflection.c (mono_reflection_bind_generic_parameters): Moved
20998 most of the functionality into a new static
20999 do_mono_reflection_bind_generic_parameters() and don't take a
21000 `MonoType *nested_in' argument any more. Don't compute nested
21002 (mono_reflection_generic_inst_get_nested_types): New public method
21003 to get nested types.
21005 * class.c (mono_class_create_generic): Set `klass->nested_in' if
21006 we're a nested class.
21008 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
21009 mono_reflection_generic_inst_get_nested_types() to compute the
21012 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
21014 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
21015 descriptive error message under windows.
21017 2004-03-17 Martin Baulig <martin@ximian.com>
21019 * class.c (dup_type): Added `const MonoType *original' argument;
21020 copy the attrs from the original type.
21022 2004-03-17 Martin Baulig <martin@ximian.com>
21024 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
21025 `m->generic_inst_cache' here.
21027 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
21029 * exception.h exception.c: Add stack_overflow_exception.
21031 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21034 (overlapped_callback): call SetEvent *after* invoking the callback.
21035 No need to call CloseHandle.
21037 2004-03-16 Martin Baulig <martin@ximian.com>
21039 * reflection.c (mono_image_get_fieldref_token): Take a
21040 `MonoReflectionField *' instead of a `MonoClassField *' and a
21041 `MonoClass *'; store the `MonoReflectionField *' in the hash.
21043 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21045 * appdomain.c: don't add the culture to the filename we're looking for
21046 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
21048 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21050 * locales.c: don't ignore symbols when doing case insensitive compares.
21051 Thanks Dick! Fixes bug #54046.
21053 * threads.c: surround 'threads' usage with enter/leave in
21054 mono_thread_manage.
21056 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
21058 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
21059 implicitly marshalled as [Out]. Fixes #55450.
21061 (mono_marshal_get_runtime_invoke): Zero out the result if there is
21064 2004-03-16 Martin Baulig <martin@ximian.com>
21066 * class.c (mono_class_from_generic_parameter): Use the actual
21069 2004-03-16 Martin Baulig <martin@ximian.com>
21071 * reflection.c (type_get_signature_size): New static function.
21072 Compues the size of the type in a method signature.
21073 (method_get_signature_size): New static function; calls
21074 type_get_signature_size() to compute the actual size of the
21075 method's signature.
21076 (method_encode_signature): Use method_get_signature_size() to get
21077 the signature's size rather than using `nparams * 10'.
21079 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21081 * file-io.h: define here WapiOverlapped on windows. I don't want the
21082 regular OVERLAPPED one.
21085 * threadpool.c: somehow, BindIoCompletionCallback is not found.
21086 Disabling AIO on windows.
21088 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21090 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
21093 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21095 * appdomain.c: upgraded corlib version.
21097 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
21098 and BeginWrite. Allow opening files for asynchrnous operations.
21100 * file-io.h: new struct that maps FileStreamAsyncResult.
21101 * icall.c: added new icalls.
21102 * process.[ch]: support setting child process environment variables
21103 and use the SHELL or COMSPEC when UseShellExecute is true.
21105 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
21106 callback for async. IO is here and also BindHandle.
21108 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
21111 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
21113 * reflection.c (create_custom_attr): Allow len == 0.
21115 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
21116 computation on big-endian machines.
21118 2004-03-13 Martin Baulig <martin@ximian.com>
21120 * class.h (MonoGenericInst): Added `int count_ifaces'.
21122 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
21123 `ginst->count_ifaces' instead `klass->interface_count' since we
21124 may get called before the vtable is created.
21126 * loader.c (mono_method_get_param_names): If we're a generic
21127 instance, return and don't initialize the class.
21129 * reflection.c (mono_reflection_setup_generic_class): Don't call
21130 ensure_runtime_vtable().
21131 (mono_reflection_bind_generic_parameters): Set
21132 `ginst->count_ifaces'.
21134 2004-03-11 Jackson Harper <jackson@ximian.com>
21138 * unicode.h: Remove unused System.Char icalls.
21140 2004-03-11 Miguel de Icaza <miguel@ximian.com>
21142 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
21143 code when we P/Invoke the first library in Windows.Forms, instead
21144 of when we first open the assembly.
21146 * assembly.c: Drop the lookup from here.
21148 2004-03-10 Martin Baulig <martin@ximian.com>
21150 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
21151 class for properties, fields and events. Finally fixes #54945.
21153 2004-03-10 Martin Baulig <martin@ximian.com>
21155 * metadata.c (mono_metadata_class_equal): New static function;
21156 checks whether two generic instances or two generic parameters are
21158 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
21161 2004-03-10 Martin Baulig <martin@ximian.com>
21163 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
21165 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
21166 argument and write it into the `reflection_info' field.
21169 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
21170 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
21172 2004-03-09 Jackson Harper <jackson@ximian.com>
21174 * char-conversions.h: use 8 bits for numeric data its all we need
21175 * icall.c: numeric data is only 8 bits now.
21177 2004-03-09 Martin Baulig <martin@ximian.com>
21179 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
21181 * class.c (init_properties, init_events): Initialize the new
21184 * reflection.c (typebuilder_setup_properties): Likewise.
21185 (typebuilder_setup_events): Likewise.
21187 * reflection.h (MonoEventInfo): Replaced `parent with
21188 `declaring_type' and `reflected_type'.
21190 * icall.c (ves_icall_get_property_info): Distinguish between
21191 declaring and reflected type.
21192 (ves_icall_get_event_info): Likewise.
21194 2004-03-09 Martin Baulig <martin@ximian.com>
21196 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
21197 (ves_icall_Type_GetField): Correctly set field->klass.
21199 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
21201 * loader.h: Fix warning.
21203 2004-03-08 Miguel de Icaza <miguel@ximian.com>
21205 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
21206 library routine if present. Notice that it will still continue
21207 executing even if its missing, for those working on the Gtk#
21208 edition of Windows.Forms.
21210 * assembly.c (do_mono_assembly_open): If loading the
21211 System.Windows.Forms call mono_loader_wini_init.
21213 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
21215 * class.h: Added MonoRemoteClass struct.
21216 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
21217 function for MonoStrings.
21218 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
21219 Added internal call for getting the proxy type.
21220 * marshal.c: Get the type of transparent proxies from its remote_class.
21221 Added methods that generate the IL for type checks and casts:
21222 mono_marshal_get_isinst, mono_marshal_get_castclass,
21223 mono_marshal_get_proxy_cancast.
21224 * marshal.h: Declaration of the previous new methods.
21225 * object.c: Added new moethods for creating and updating MonoRemoteClass
21226 instances: mono_remote_class, mono_upgrade_remote_class,
21227 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
21228 * verify.c: FIx transparent_proxy_fields layout.
21229 * appdomain.c: Bump corlib version.
21231 2004-03-04 Jackson Harper <jackson@ximian.com>
21233 * icall.c: Add icall to access char conversion tables.
21234 * char-conversions.h: Character conversion tables.
21235 * Makefile.am: Add char-conversions.h private header file.
21237 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
21239 * appdomain.c (unload_thread_main): Increase unloading timeout to
21240 10 sec as a temporary workaround for Nant problems.
21242 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
21244 * gc.c: Add checks for GC_enable and GC_disable.
21246 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
21247 (jaak@zd.com.pl). Fix memory corruption in String.Replace
21250 2004-02-27 Martin Baulig <martin@ximian.com>
21252 * reflection.c (mono_reflection_bind_generic_parameters): Take a
21253 `MonoReflectionType *' instead of a `MonoType *'.
21255 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
21257 * gc.c (run_finalize): Avoid finalizing the object representing the
21259 (finalizer_thread): Fix warning.
21261 2004-02-25 Martin Baulig <martin@ximian.com>
21263 * class.c (_mono_class_get_instantiation_name): Added `int offset'
21264 argument for nested types.
21265 (mono_class_create_generic): Added support for nested generictypes.
21267 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
21270 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
21272 * reflection.c (method_encode_signature): Increase the minimum
21273 value of `size' from 10 to 11.
21274 (mono_reflection_bind_generic_parameters): Take `int type_argc'
21275 and `MonoType **types' arguments instead of the `MonoArray
21276 *types'; added `MonoType *nested_in'. Recursively instantiate
21279 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
21281 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
21282 stack_overflow_ex members which are used by exception handling.
21284 * appdomain.c (mono_runtime_init): Initialize the new members.
21286 * gc.c (mono_gc_enable): New helper function.
21287 * gc.c (mono_gc_disable): New helper function.
21289 2004-02-23 Martin Baulig <martin@ximian.com>
21291 * icall.c: I must have been really stupid - make it actually work
21294 2004-02-23 Martin Baulig <martin@ximian.com>
21296 * loader.c (method_from_memberref): Only inflate the method if
21297 it's in another klass.
21299 2004-02-23 Martin Baulig <martin@ximian.com>
21301 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
21302 (mono_class_init): If we're a generic instance and an interface,
21303 compute `class->interface_id'; also create `class->interfaces'
21304 here and inflate them.
21306 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
21308 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
21310 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
21312 2004-02-15 Miguel de Icaza <miguel@ximian.com>
21314 * reflection.c (method_encode_code): Improved the error message
21315 generated by the exception.
21317 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21319 * icall.c: Martin did not do what he said in the ChangeLog for
21320 2004-02-18, but put back the changes for properties and events.
21321 Commenting those changes out again and adding comment to bug #54518.
21323 * process.c: removed warning.
21325 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
21327 * marshal.c (emit_struct_conv): Print an error message instead of
21328 asserting when a type does not have the StructLayout attribute.
21330 2004-02-20 Martin Baulig <martin@ximian.com>
21332 * reflection.c (mono_type_get_object): Also use the cache for
21334 (mono_reflection_bind_generic_parameters): Always compute
21337 2004-02-20 Martin Baulig <martin@ximian.com>
21339 * class.h (MonoGenericMethod): Removed `klass'.
21341 * class.c (mono_class_inflate_generic_method): Added `MonoClass
21344 2004-02-20 Martin Baulig <martin@ximian.com>
21346 * reflection.c (method_encode_methodspec): Actually use the
21347 uninflated signature for the memberref.
21349 2004-02-20 Martin Baulig <martin@ximian.com>
21351 * class.h (MonoGenericMethod): Removed `declaring'.
21353 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
21354 is NULL, compute it here.
21356 2004-02-20 Martin Baulig <martin@ximian.com>
21358 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
21360 * metadata.c (mono_metadata_generic_inst_hash): New method.
21361 (mono_metadata_generic_inst_equal): New method.
21363 * reflection.c (mono_reflection_bind_generic_parameters): Use the
21364 `klass->image->generic_inst_cache' cache to avoid creating
21365 duplicate MonoGenericInst's.
21367 * class.c (mono_class_inflate_generic_type): Use the cache.
21369 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
21371 * object.c: fixed gc descriptor calculation for embedded valuetypes.
21373 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21375 * icall.c: added Socket.WSAIoctl icall.
21377 * socket-io.[ch]: implemented
21378 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
21380 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
21382 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
21384 2004-02-18 Urs C Muff <umuff@quark.com>
21386 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
21387 this work on PPC and other big-endian architectures.
21389 * debug-mono-symfile.h: Prepended the names of all the `guint32'
21390 fields with an underscore to make sure they're only accessed by
21391 the read32() macro.
21393 2004-02-18 Martin Baulig <martin@ximian.com>
21395 * icall.c: Put the klass->refclass changes back for methods and
21396 fields, but not for properties and events. We're currently not
21397 distinguishing between DeclaringType and ReflectedType for
21398 properties and events, that's what caused the regressions.
21400 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21403 (mono_async_result_new): the handle can be NULL.
21405 * threadpool.c: Use an event instead of a semaphore, don't initialize
21406 it until needed. This saves quite a few semaphores from being created
21407 when using the threadpool.
21409 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
21411 * object.c (mono_string_is_interned_lookup): Fix interning of long
21412 strings. Fixes #54473.
21414 * domain.c (ldstr_equal): Optimize if the two strings are equal.
21416 * icall.c: Revert the klass->refclass changes since they introduce
21417 regressions (bug #54518).
21419 2004-02-18 Martin Baulig <martin@ximian.com>
21421 * class.c (mono_class_init): If we're a generic instance and don't
21422 come from a TypeBuilder, inflate our members here.
21423 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
21424 (mono_class_create_generic): New public method.
21425 (mono_class_initialize_generic): Removed.
21426 (get_instantiation_name): Renamed to
21427 _mono_class_get_instantiation_name() and made it public.
21429 2004-02-18 Martin Baulig <martin@ximian.com>
21431 * class.c (mono_class_inflate_generic_type): Clear the new
21432 instance's `nginst->klass' when inflating a generic instance.
21433 (mono_class_is_subclass_of): Added (basic) support for generic
21436 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
21438 * appdomain.h, domain.c: use a MonoCodeManager instead of a
21439 MonoMempool to hold compiled native code.
21441 2004-02-17 Martin Baulig <martin@ximian.com>
21443 * class.h (MonoDynamicGenericInst): Added `count_properties' and
21446 * reflection.c (mono_reflection_generic_inst_initialize): Added
21447 `MonoArray *properties' argument.
21449 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
21451 2004-02-17 Martin Baulig <martin@ximian.com>
21453 * icall.c (ves_icall_Type_GetFields): Renamed to
21454 ves_icall_Type_GetFields_internal() and added a
21455 `MonoReflectionType *rtype' argument; pass it to
21456 mono_field_get_object() to set the field's "reflected" type.
21457 (ves_icall_Type_GetConstructors): Likewise.
21458 (ves_icall_Type_GetEvents): Likewise.
21459 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
21460 argument; pass it to mono_method_get_object() to set the method's
21463 2004-02-17 Martin Baulig <martin@ximian.com>
21465 * class.h (MonoDynamicGenericInst): New type.
21466 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
21468 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
21469 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
21470 (ves_icall_MonoGenericInst_GetFields): New interncall.
21472 * class.c (mono_class_from_generic): Don't call
21473 mono_class_initialize_generic() if this is a dynamic instance;
21474 ie. it's being created from a TypeBuilder.
21475 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
21476 `class->byval_arg.type'.
21478 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
21479 to `inflate_method' and made static.
21480 (mono_reflection_inflate_field): Removed.
21481 (mono_reflection_generic_inst_initialize): New public method.
21483 * reflection.h (MonoReflectionGenericInst): Removed `methods',
21484 `ctors' and `fields'; added `initialized'.
21486 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
21488 * debug-helpers.c (mono_method_full_name): Fix output for empty
21491 2004-02-12 Martin Baulig <martin@ximian.com>
21493 * class.h (MonoClassField): Added `MonoType *generic_type'.
21495 * reflection.c (mono_image_get_fieldref_token): Added support for
21496 instantiated generic types.
21497 (field_encode_inflated_field): Removed.
21498 (mono_image_get_inflated_field_token): Removed.
21499 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
21501 * reflection.h (MonoReflectionInflatedField): Removed.
21503 2004-02-12 Martin Baulig <martin@ximian.com>
21505 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
21506 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
21508 * reflection.c (mono_image_get_methodspec_token): Take a
21509 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
21510 (mono_image_create_token): Check whether we have a
21511 `method->signature->gen_method' and call
21512 mono_image_get_methodspec_token() if appropriate.
21513 (inflated_method_get_object): Removed.
21514 (mono_reflection_bind_generic_method_parameters): Return a
21515 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
21516 (mono_reflection_inflate_method_or_ctor): Likewise.
21518 * reflection.h (MonoReflectionInflatedMethod): Removed.
21520 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
21522 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
21523 for custom valuetype marshalling.
21525 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
21527 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21529 * icall.c: fixed WSAGetLastError_internal name.
21531 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
21533 * threads.c (mono_thread_attach): Allow this to be called multiple
21534 times for a thread.
21536 * threads.c (build_wait_tids): Do not wait for ourselves.
21538 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
21539 appdomain list is empty.
21541 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
21542 memory returned by mono_string_builder_to_utf16, since it points into
21543 managed memory. Thanks to Bernie Solomon for noticing this.
21545 * icall.c: Add AppDomainSetup icalls.
21547 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
21549 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
21552 * reflection.c (reflection_methodbuilder_to_mono_method): Save
21553 custom attributes to the method_aux struct. Also fix array indexes etc.
21555 * loader.c (mono_method_get_param_names): Make dynamic case work again.
21557 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
21559 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
21560 (both static and runtime) and reduce startup time.
21562 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
21564 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
21565 AsAny marshalling conversion instead of crashing.
21567 * marshal.c: Fix warnings.
21569 2004-02-09 Martin Baulig <martin@ximian.com>
21571 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
21573 * reflection.h (MonoReflectionInflatedMethod): Removed the
21574 `declaring' field, it's now in the unmanaged MonoGenericMethod.
21576 * reflection.c (method_encode_methodspec): Removed the `method'
21577 argument; we get it from `gmethod->declaring'.
21578 (inflated_method_get_object): Removed the `declaring' argument.
21580 2004-02-09 Martin Baulig <martin@ximian.com>
21582 * class.h (MonoGenericMethod): New type.
21583 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
21586 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
21587 a `MonoGenericMethod *gen_method' one.
21589 * class.c (mono_class_inflate_generic_type): Take an additional
21590 `MonoGenericMethod * argument. This is only non-NULL if we're
21591 inflating types for a generic method.
21592 (mono_class_inflate_generic_signature): Renamed to
21593 inflate_generic_signature() and made static; take a
21594 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
21595 (inflate_generic_header): Take a `MonoGenericMethod *' argument
21596 instead of a `MonoGenericInst *' one.
21597 (mono_class_inflate_generic_method): Likewise.
21599 * reflection.c (encode_generic_method_sig): Take a
21600 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
21601 (method_encode_methodspec): Likewise.
21602 (inflated_method_get_object): Likewise.
21604 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
21605 field with a `MonoGenericMethod *gmethod' one.
21607 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
21609 * class.h (mono_class_has_parent): add parens to expansion
21612 2004-02-08 Martin Baulig <martin@ximian.com>
21614 * image.h (MonoImage): Removed `generics_cache'.
21616 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
21617 instead of a `MonoType *' argument; removed the `inflate_methods'
21618 argument. Don't inflate methods here.
21620 * loader.c (find_method): If it's a generic instance, call
21621 mono_class_init() on the `sclass->generic_inst->generic_type'.
21623 * metadata.c (mono_type_size): Make this work on uninitialized
21624 generic instances; call it on the `ginst->generic_type's class.
21626 * reflection.c (mono_reflection_bind_generic_parameters): Call
21627 mono_class_from_generic() to create the `ginst->klass'.
21629 2004-02-08 Martin Baulig <martin@ximian.com>
21631 * class.h (MonoClass): Changed type of `generic_inst' from
21632 `MonoType *' to `MonoGenericInst *'.
21634 2004-02-08 Martin Baulig <martin@ximian.com>
21636 * icall.c (ves_icall_Type_BindGenericParameters): Just call
21637 mono_type_get_object(), this is now creating a `MonoGenericInst'
21638 for MONO_TYPE_GENERICINST.
21639 (ves_icall_MonoGenericInst_GetParentType): Likewise.
21640 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
21642 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
21643 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
21644 (inflated_method_get_object): Added `MonoClass *refclass' argument.
21645 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
21646 and reflected type.
21648 * reflection.h (MonoReflectionInflatedMethod): Removed
21649 `declaring_type' and `reflected_type'.
21651 2004-02-08 Martin Baulig <martin@ximian.com>
21653 * class.h (MonoGenericInst): Added `MonoType *parent' and
21654 `MonoType **ifaces'.
21656 * reflection.h (MonoReflectionGenericInst): Removed `klass',
21657 `parent' and `interfaces'.
21659 * reflection.c (mono_reflection_bind_generic_parameters): Take a
21660 `MonoType *' argument and return a `MonoType *'.
21663 (ves_icall_MonoGenericInst_GetParentType): New interncall.
21664 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
21666 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
21668 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
21669 valuetype marshalling.
21671 2004-02-06 Martin Baulig <martin@ximian.com>
21674 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
21675 (my_mono_class_from_generic_parameter): Likewise.
21677 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
21679 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
21680 contents of the symbol files lazily.
21682 * object.h (MonoThread): Add 'name' and 'name_len' fields.
21684 * threads.h threads.c icall.c: New icalls for getting and setting the
21687 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
21689 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
21690 Raise an exception when the domain is not found.
21692 2004-02-03 Martin Baulig <martin@ximian.com>
21694 * reflection.c (mono_image_get_methodspec_token): Use the
21695 uninflated signature; fixes gen-33.
21697 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
21699 * gc.c threads.c: Make the finalizer thread a normal managed thread so
21700 the finalizer code can use thread functionality.
21702 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
21703 the finalizer thread.
21705 * threads.c: Make some functions more robust.
21707 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
21709 * metadata.h: Add new marshalling conventions.
21711 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
21712 stringbuilder marshalling. Fixes #53700.
21714 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
21716 * reflection.c (mono_image_get_type_info): Save declarative security
21719 * reflection.c (mono_image_get_field_info): Handle uninitialized
21720 unmanaged fields as well.
21722 * appdomain.c: Bump corlib version.
21724 2004-02-01 Martin Baulig <martin@ximian.com>
21726 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
21727 method type arguments.
21729 2004-01-30 Duncan Mak <duncan@ximian.com>
21731 * marshal.h: Add prototype for
21732 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
21734 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
21737 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
21739 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
21740 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
21742 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
21744 * marshal.c (mono_marshal_get_native_wrapper): Add support for
21745 custom marshalling of valuetypes.
21747 * marshal.c: Fix some warnings.
21749 2004-01-29 Martin Baulig <martin@ximian.com>
21751 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
21752 for generic method parameters.
21754 * reflection.c (method_encode_methodspec): Write the uninflated
21755 signature into the methodspec table.
21756 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
21757 is always the uninflated method.
21758 (reflection_methodbuilder_to_mono_method): Copy the generic
21759 parameters from the MethodBuilder into `header->gen_params'.
21761 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
21763 * class.c (mono_class_from_generic_parameter): Fix warning.
21765 2004-01-27 Martin Baulig <martin@ximian.com>
21767 * class.c (mono_class_from_generic_parameter): Don't create
21768 `klass->methods' here.
21770 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
21772 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
21773 extension since it does not work with libraries named lib<FOO>.dll.so.
21775 2004-01-25 Martin Baulig <martin@ximian.com>
21777 * class.c (mono_class_inflate_generic_type): Added support for
21778 MONO_TYPE_GENERICINST.
21780 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
21781 inflate methods on open constructed types.
21783 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21785 * object.c: fire ProcessExit event in the root AppDomain after running
21786 Main. Fixes bug #53299.
21788 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
21790 * socket-io.c: include the new socket-wrappers.h header.
21791 Use the wrappers instead of the unix socket functions to make the code
21794 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
21796 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
21798 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
21801 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
21803 * reflection.c (mono_image_create_pefile): Handle the case when the
21804 entry point is not a MethodBuilder.
21806 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
21807 field to ReflectionMethod since it is not allways a builder.
21809 * reflection.c (type_get_fully_qualified_name): New helper function to
21810 return the fully qualified name of a type.
21812 * reflection.c (encode_marshal_blob): Always emit the fully qualified
21813 type name for custom marshallers.
21815 * reflection.c (mono_marshal_spec_from_builder): Ditto.
21817 * class.c (mono_class_setup_vtable): If a parent class already
21818 implements an interface, use the implementing methods from that class.
21821 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21823 * threadpool.c: just return instead of ExitThread to allow for thread
21826 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
21828 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
21829 when closing resource modules.
21831 * reflection.c (mono_image_create_pefile): Handle the case when the
21832 entry point is not a MethodBuilder.
21834 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
21835 field to ReflectionMethod since it is not allways a builder.
21837 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
21839 * marshal.c (mono_marshal_get_managed_wrapper):
21840 mono_marshal_alloc takes native int so CONV_I
21841 the arg for 64bits.
21843 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
21845 * reflection.c (fixup_cattrs): New function to fixup the methoddef
21846 tokens in the cattr table. Fixes #53108.
21848 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21850 * loader.c: don't trim ".dll" before looking up in the config file.
21851 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
21853 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
21855 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
21856 Return the module which contains the resource as well.
21857 (ves_icall_System_Reflection_Module_Close): New icall.
21859 * appdomain.c: Bump corlib version number.
21861 * image.c (mono_image_addref): New public function.
21863 * assembly.c: Call mono_image_addref.
21865 * reflection.c (mono_module_get_object): Increase reference count of
21868 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
21871 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
21872 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
21873 proper exceptions on DllImport problems.
21875 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
21877 * class.c, metadata.c: eliminate CSIZE macro.
21879 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
21881 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
21882 * object.h: Added async_callback field in MonoAsyncResult.
21883 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
21884 * verify.c: Added async_callback in MonoAsyncResult layout.
21886 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
21888 * reflection.c (mono_reflection_get_custom_attrs): Add support
21891 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
21893 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
21895 (mono_marshal_method_from_wrapper): Add null pointer check.
21897 2004-01-16 Martin Baulig <martin@ximian.com>
21899 * debug-mono-symfile.h: Set version number to 36 and reflect
21900 latest symbol writer changes.
21902 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
21904 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
21905 multi-dimensional arrays.
21906 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
21907 (mono_class_from_mono_type): Use bounded_array_class_get.
21909 * class.c (mono_bounded_array_class_get): New function which takes
21910 a 'bounded' bool argument to distinguish vectors from one dimensional
21913 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
21914 bounded_array_class_get if the array has bounds.
21916 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
21917 Search modules loaded using AssemblyBuilder:AddModule as well.
21919 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21921 * appdomain.c: increased corlib version.
21922 * filewatcher.c: removed g_print.
21924 (get_property_info): only allocate what is actually requested.
21925 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
21927 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21929 * Makefile.am: added filewatcher.[ch]
21930 * filewatcher.[ch]: FileSystemWatcher runtime support.
21931 * icall.c: added new FSW icalls.
21933 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
21935 * string-icalls.c: fix stringbuilder regression as suggested by
21936 Iain McCoy <iain@mccoy.id.au>.
21938 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
21940 * process.c (process_read_stringtable_block): Recognize '007f' as
21941 a language neutral stringtable block.
21943 2004-01-12 Patrik Torstensson
21945 * object.h (MonoStringBuilder) : Changed layout to support our
21946 new stringbuilder class.
21947 * marshal.c: Change marshalling to support the new layout of
21949 * appdomain.c: increased version number because new layout of
21952 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
21954 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
21955 assembly name as an string instead of an AssemblyName, since it is
21956 easier to extract info from it.
21958 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
21959 the culture subdirectories too. Fixes #52231.
21961 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21963 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
21964 It takes 2 new parameters with an optional name for the method to look
21965 for and case ignoring info.
21967 * threadpool.c: removed unused variable.
21969 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21971 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
21972 It takes 2 new parameters with an optional name for the property to look
21973 for and case ignoring info.
21976 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
21978 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
21981 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21984 * assembly.c: escape the uri before passing it to g_filename_from_uri.
21987 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
21989 * reflection.c: Add support for more than one unmanaged resource.
21991 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
21992 in field->def_value, as done in all other cases.
21994 * reflection.c (mono_reflection_get_custom_attrs): Add support for
21997 * reflection.c (mono_reflection_create_runtime_class): Remove
21998 errorneous assignment to klass->element_class, since it is already
21999 done in mono_reflection_setup_internal_class.
22001 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22003 * gc.c: added missing LeaveCriticalSection.
22004 * icall.c: indented a couple of lines.
22005 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
22006 if we call EndInvoke inside a callback. Fixes bug #52601.
22008 2004-01-07 Martin Baulig <martin@ximian.com>
22010 * mono-debug-debugger.h
22011 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
22013 2004-01-06 Miguel de Icaza <miguel@ximian.com>
22015 * appdomain.c: Use messages in NotImplementedException.
22017 * exception.c (mono_get_exception_not_implemented): Now this takes
22018 a message argument.
22020 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
22021 exception instead of g_asserting an aborting when something is not
22024 Add some inline docs.
22026 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
22028 * reflection.h: Update after changes to object layout.
22030 * reflection.c: Implement saving of unmanaged aka win32 resources.
22032 * appdomain.c: Bump version number.
22034 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
22035 Handle missing domains gracefully.
22037 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
22039 * file-io.c : On Windows, there are much more invalid_path_chars.
22041 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
22043 * class.h, object.c: prepare for GetType () speedup.
22045 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
22047 * profiler.c: workaround for --profile null reference exception on
22048 cygwin. Patch by Patrik Torstensson.
22050 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
22052 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
22053 make work for unaligned access.
22055 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
22057 * class.c: small cleanup (class->fields [i] -> field).
22058 * image.c: check address of metadata is valid.
22060 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
22062 * assembly.h assembly.c (mono_assembly_loaded): New public function to
22063 search the list of loaded assemblies.
22065 * reflection.c (mono_reflection_type_from_name): Use
22066 mono_assembly_loaded instead of mono_image_loaded.
22068 * reflection.c: Fix warnings.
22070 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
22072 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
22073 is dynamic. This is needed since an assembly can contain both dynamic and
22074 non-dynamic images.
22076 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
22079 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
22081 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
22082 to store modules loaded using AddModule.
22084 * reflection.c (mono_image_fill_file_table): Generalize this so it works
22087 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
22089 * reflection.c (mono_image_fill_export_table_from_module): New function to
22090 fill out the EXPORTEDTYPES table from a module.
22092 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
22093 into a separate function. Also handle loaded non-dynamic modules.
22095 * reflection.c (mono_image_basic_init): Fix memory allocation.
22097 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
22099 * assembly.c (mono_assembly_load_references): Make this public.
22101 2003-12-19 Martin Baulig <martin@ximian.com>
22103 * class.c (mono_class_initialize_generic): Made this static, take
22104 a `MonoGenericInst *' instead of a `MonoClass *'.
22105 (mono_class_from_generic): Call mono_class_initialize_generic()
22106 unless we're already initialized or being called from
22107 do_mono_metadata_parse_generic_inst().
22109 * class.h (MonoGenericInst): Added `initialized' and
22110 `init_pending' flags.
22112 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
22113 `mono_class_init (gklass)' or mono_class_initialize_generic()
22114 here; set `generic_inst->init_pending' while parsing the
22117 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
22119 * locales.c: include string.h for memxxx prototypes
22121 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
22123 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
22124 constructor when accessing literal fields.
22126 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
22128 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
22130 * reflection.c (assembly_add_resource_manifest): New function to fill
22131 the MANIFESTRESOURCE table.
22133 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
22135 * reflection.h: Update to changes in class layout.
22137 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
22138 Reenable call to mono_runtime_is_shutting_down ().
22140 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
22141 determine if the runtime is shutting down.
22143 2003-12-16 Jackson Harper <jackson@ximian.com>
22145 * icall.c: comment out call to mono_runtime_is_shutting_down to
22148 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
22150 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
22151 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
22153 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
22155 * reflection.c: move definition of swap_with_size
22156 to before its first call
22158 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
22160 * appdomain.c (mono_runtime_is_shutting_down): New public function.
22162 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
22165 * object.c: Fix warnings.
22167 * icall.c (ves_icall_Type_Get...): Only consider inherited static
22168 members if FlattenHierarchy is set.
22170 * reflection.c (mono_image_add_decl_security): New function to emit
22171 declarative security.
22173 * reflection.h reflection.c: Add support for declarative security.
22175 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
22177 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
22179 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
22181 * appdomain.c verify.c: Moved corlib version checking into its own
22182 function in appdomain.c since it needs to create vtables etc.
22184 2003-12-13 Patrik Torstensson <p@rxc.se>
22186 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
22187 instead of unwrapped server.
22189 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
22191 * verify.c (check_corlib): Fix field index.
22193 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
22195 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
22198 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
22200 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
22201 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
22202 cope with sizeof(size_t) != sizeof(guint32).
22204 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22206 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
22207 in case of failure.
22209 2003-12-10 Mark Crichton <crichton@gimp.org>
22211 * icall.c: removed the GetNonZeroBytes. We now handle this case
22214 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
22216 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
22218 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
22221 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
22223 * verify.c (check_corlib): Handle the case when the version field is
22224 initialized by a static constructor.
22226 2003-12-08 Patrik Torstensson <p@rxc.se>
22228 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
22230 2003-12-08 Martin Baulig <martin@ximian.com>
22232 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
22233 a MonoReflectionGenericParameter, also take the parameter index
22234 and name as arguments.
22235 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
22236 (ves_icall_MonoGenericParam_initialize): New interncall.
22237 (ves_icall_Type_make_byref_type): New interncall.
22239 * reflection.h (MonoReflectionGenericParam): Derive from
22240 MonoReflectionType, not just from MonoObject. Added `refobj' and
22243 * reflection.c (mono_reflection_define_generic_parameter): Create
22244 and return a new MonoReflectionGenericParam; don't initialize the
22246 (mono_reflection_initialize_generic_parameter): New public method;
22247 initializes the constraints and creates the `param->pklass'.
22249 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
22251 * reflection.h reflection.c: Use the new fields 'num_types',
22252 'num_fields' and 'num_methods' to track the number of types etc.
22254 * verify.c (check_corlib): Check corlib version number.
22256 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
22258 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
22259 function works on all methods.
22261 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
22263 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
22264 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
22265 the custom_type_info flag of the transparent proxy.
22266 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
22267 objects that supports IRemotingTypeInfo.
22268 * object.h: Added custom_type_info field in transparent proxy.
22270 2003-12-06 Martin Baulig <martin@ximian.com>
22272 * class.c (mono_class_create_from_generic): Removed.
22273 (mono_class_from_generic): Check `ginst->klass' before doing
22274 anything else. This is important to fully support "recursive"
22277 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
22278 empty `generic_inst->klass' before doing anything else.
22280 2003-12-06 Dick Porter <dick@ximian.com>
22285 * locales.c: Use C structs to access class fields. Don't do a
22286 conversion between MonoString and UChar because both are
22287 platform-endian UTF-16. Compare now takes startindex and count
22288 parameters. Add a char overload for IndexOf. Speed up the
22289 invariant string IndexOf.
22291 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
22293 * Makefile.am (monosn_LDADD): Fix parallel build.
22295 2003-12-04 Martin Baulig <martin@ximian.com>
22298 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
22299 (ves_icall_Type_make_array_type): New interncall.
22301 2003-12-04 Martin Baulig <martin@ximian.com>
22303 * locales.c: also change it in the !HAVE_ICU case.
22305 2003-12-04 Dick Porter <dick@ximian.com>
22308 * locales.c: construct_compareinfo is now in CompareInfo, not
22311 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
22313 * image.c (mono_image_load_file_for_image): Cache loaded images in the
22314 image->files array.
22316 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
22319 * assembly.c (mono_assembly_load_references): Only load references
22322 * class.c (mono_class_from_name): Avoid linear search of the
22323 EXPORTEDTYPE table.
22325 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
22327 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
22329 * image.h (MonoImage): Add 'field_cache' field.
22331 * loader.c (mono_field_from_token): Cache field lookups.
22333 * reflection.c (mono_module_get_object): Fix name property.
22335 * icall.c (ves_icall_get_enum_info): Update after changes to
22336 mono_metadata_get_constant_index ().
22338 * icall.c: Get rid of get_type_info icall, use a separate icall for
22339 each type property to avoid needless memory allocations. Fixes #51514.
22341 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
22342 to avoid needless binary searches.
22344 * class.c (class_compute_field_layout): Move the initialization of
22345 field->def_value to mono_class_vtable ().
22347 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
22350 * object.c (mono_object_allocate): Make it inline.
22352 * object.c (mono_object_allocate_spec): Make it inline.
22354 2003-12-02 Dick Porter <dick@ximian.com>
22356 * locales.c (create_NumberFormat): NumberFormatInfo construction.
22357 Patch by Mohammad DAMT (mdamt@cdl2000.com).
22359 2003-12-01 Dick Porter <dick@ximian.com>
22361 * threads.c: Fix signature and call in CreateMutex and
22364 2003-12-01 Dick Porter <dick@ximian.com>
22367 * locales.c: Implement string compares and searching
22369 * object.h: Add extra Thread field
22371 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
22373 * reflection.c (fixup_method): Add support for MonoCMethod.
22375 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
22377 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
22379 * reflection.c (assembly_name_to_aname): Allow extra characters in
22380 assembly names. Fixes #51468.
22382 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
22384 * exception.c (mono_exception_from_name_domain): New helper function.
22386 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
22387 exception object in the correct domain.
22389 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
22390 formatting + make a copy a the input data.
22392 * loader.c (mono_get_method_from_token): Methods which contain
22393 native code do not have entries in the ImplMap.
22395 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
22396 Thanks to Gonzalo for spotting this.
22398 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
22399 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
22401 * assembly.h (mono_assembly_load_from): Split the second part of
22402 assembly loading into a new public function.
22404 * exception.h (mono_get_exception_bad_image_format): New function.
22406 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
22408 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
22409 Enumerate all modules inside a dynamic assembly. Fixes #51293.
22411 * icall.c: Add new icall for creating dynamic methods.
22413 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
22415 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
22417 * reflection.c (mono_reflection_create_dynamic_method): New icall to
22418 create a dynamic method.
22420 * reflection.c (resolve_object): New helper function.
22422 * reflection.c: Generalize ReflectionMethodBuilder and the functions
22423 which manipulate it so they can also work on dynamic methods.
22425 * reflection.c (reflection_method_builder_to_mono_method): Avoid
22426 creating the MonoReflectionMethodAux structure if it is not needed.
22428 * reflection.h verify.c: Update after changes to object layout.
22430 * reflection.c (method_builder_encode_signature): Fix compilation on
22433 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
22435 * appdomain.h: Added support for context static fields. Added static_data
22436 field to MonoAppContext and renamed thread_static_fields to a more
22437 generic special_static_fields in MonoAppDomain, since it can now contain
22438 context static fields.
22439 * domain.c: Updated hashtable name.
22440 * object.c: Replaced field_is_thread_static() for a more generic
22441 field_is_special_static() which also checks for context static attribute.
22442 In mono_class_vtable(), added support for static context fields.
22443 * threads.c: Changed methods that manage thread static fields to more
22444 generic methods so they can be reused both for thread and context static
22446 * threads.h: Declared some new methods.
22448 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
22450 * reflection.h: Update after changes to the managed types.
22452 * reflection.c (encode_custom_modifiers): New helper function.
22454 * reflection.c (method_encode_signature): Emit custom modifiers.
22456 * reflection.c (field_encode_signature): Emit custom modifiers.
22458 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
22460 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
22462 * icall.c (ves_icall_System_ValueType_Equals): New optimized
22465 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
22468 * object.c (mono_field_get_value_object): New function.
22470 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
22473 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
22475 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
22476 return a preallocated out-of-memory exception instance.
22478 * object.c (out_of_memory): Use the new function.
22480 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
22481 flag is before the custom modifiers. Fixes #49802.
22483 2003-11-16 Martin Baulig <martin@ximian.com>
22485 * class.c (mono_class_is_open_constructed_type): Implemented the
22486 MONO_TYPE_GENERICINST case.
22488 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
22490 * assembly.c (mono_assembly_fill_assembly_name): New function to
22491 fill out the MonoAssemblyName structure.
22492 (mono_assembly_open): Use the new function.
22494 * icall.c (fill_reflection_assembly_name): New helper function.
22496 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
22499 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
22501 2003-11-15 Martin Baulig <martin@ximian.com>
22503 * class.c (mono_class_is_open_constructed_type): New public
22504 function; checks whether a type is an open constructed type,
22505 ie. whether it still contains type parameters.
22506 (mono_class_inflate_generic_type): If we're a type parameter and
22507 the inflated type is also a MONO_TYPE_(M)VAR, return the original
22510 * class.h (MonoGenericInst): Added `guint32 is_open'.
22512 * loader.c (method_from_methodspec): Check whether we're an open
22513 or closed constructed type and set `ginst->is_open'.
22515 * reflection.c (mono_reflection_bind_generic_parameters): Check
22516 whether we're an open or closed constructed type and set
22518 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
22519 from open constructed types.
22521 2003-11-15 Martin Baulig <martin@ximian.com>
22523 * reflection.c (mono_reflection_bind_generic_parameters): If we're
22524 a generic instance (instead of a generic type declaration) with
22525 unbound generic parameters, bind them to our actual types.
22527 2003-11-14 Martin Baulig <martin@ximian.com>
22529 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
22531 * reflection.c (mono_reflection_bind_generic_parameters): If we're
22532 an interface type, populate `res->interfaces' with instantiated
22533 versions of all the interfaces we inherit.
22535 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
22537 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
22538 when MONO_PATH is set but doesn't contain the install dir.
22540 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22543 (ves_icall_Type_GetInterfaces): don't return an interface twice when
22544 it's also implemented in base classes. Fixes bug #50927.
22546 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
22548 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
22549 if this method is called from a finalizer. Fixes #50913.
22551 2003-11-12 Miguel de Icaza <miguel@ximian.com>
22553 * threads.c: Implement VolatileRead/VolatileWrite
22555 * icall.c: Add new icalls for VolatileRead/VolatileWrite
22557 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
22559 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
22560 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
22563 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
22564 from Peter Ross (pro@missioncriticalit.com).
22566 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
22568 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
22570 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
22572 * assembly.c (mono_assembly_load_references): Disable check because it
22573 triggers on older corlibs which lots of people have.
22575 2003-11-12 Jackson Harper <jackson@ximian.com>
22577 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
22578 load corlib.dll if mscorlib.dll is not found.
22579 * assembly.h: Remove corlib name define.
22582 * image.c: Change corlib name to mscorlib.
22584 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
22586 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
22588 2003-11-11 Miguel de Icaza <miguel@ximian.com>
22590 * appdomain.h: Added loader_optimization here to sync with the C#
22591 code, and add disallow_binding_redirects field.
22593 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
22595 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
22597 * reflection.c (mono_image_build_metadata): Fix crash on modules
22600 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
22602 * icall.c (ves_icall_get_method_info): Return callingConvention as
22605 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
22606 namespaces from the EXPORTEDTYPE table as well.
22608 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
22609 from all modules inside the assembly.
22611 2003-11-11 Martin Baulig <martin@ximian.com>
22613 * reflection.c (mono_reflection_bind_generic_parameters): Make
22614 this work for interfaces.
22616 2003-11-11 Martin Baulig <martin@ximian.com>
22618 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
22620 2003-11-11 Martin Baulig <martin@ximian.com>
22622 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
22623 "MonoInflatedMethod" and "MonoInflatedCtor".
22625 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
22627 * reflection.c (resolution_scope_from_image): Use the assembly table
22628 from the manifest module, since other modules don't have it.
22630 * debug-helpers.c (mono_type_full_name): New helper function.
22632 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
22634 * image.c (mono_image_load_file_for_image): New public function which
22635 is a replacement for the load_file_for_image in class.c.
22637 * assembly.c (mono_assembly_load_module): A wrapper for the function
22638 above which does assembly association and reference loading too.
22640 * class.c (mono_class_from_name): Call mono_assembly_load_module.
22642 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22644 * appdomain.c: not all of the attributes for the full assembly name
22645 are required and the order doesn't matter. Fixes bug #50787.
22647 2003-11-10 Dick Porter <dick@ximian.com>
22649 * locales.c: Use platform-endian UTF16
22651 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
22653 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
22655 2003-11-10 Martin Baulig <martin@ximian.com>
22658 (mono_metadata_load_generic_params): Make this actually work.
22660 * reflection.c (mono_reflection_bind_generic_parameters): If our
22661 parent is a generic instance, pass all the `types' to it, no
22662 matter whether it has the same number of type parameters or not.
22664 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
22666 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
22668 * assembly.c (mono_assembly_load_references): Move the image<->assembly
22669 assignment code to this function so it gets called recursively for all
22672 * image.c (load_modules): Remove the assembly assignment since it is
22673 now done by mono_assembly_load_references.
22675 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
22676 Add 'module' argument.
22677 (mono_module_get_types): New helper function.
22678 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
22680 2003-11-08 Martin Baulig <martin@ximian.com>
22682 * class.c (mono_class_inflate_generic_method): Interface method
22683 don't have a header.
22685 * reflection.c (mono_image_get_methodspec_token): Take an
22686 additional `MonoGenericInst *' argument instead of reading it from
22687 the header; this is necessary to support interfaces.
22688 (mono_image_create_token): Pass the `MonoGenericInst *' from the
22689 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
22690 (inflated_method_get_object): Take an additional `MonoGenericInst *'
22693 * reflection.h (MonoReflectionInflatedMethod): Added
22694 `MonoGenericInst *ginst'.
22696 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
22698 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
22700 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
22702 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
22704 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
22707 (reflection_methodbuilder_from_method_builder):
22708 (reflection_methodbuilder_from_ctor_builder): New helper functions to
22709 initialize a ReflectionMethodBuilder structure.
22710 (mono_image_get_methodbuilder_token):
22711 (mono_image_get_ctorbuilder_token): New functions to emit memberref
22712 tokens which point to types in another module inside the same assembly.
22714 * reflection.c: Use the new helper functions.
22716 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
22718 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
22719 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
22721 * reflection.c (resolution_scope_from_image): Emit a moduleref if
22724 * reflection.c (mono_image_build_metadata): Emit metadata only for the
22725 current module. Emit the manifest only for the main module.
22727 * reflection.c (mono_image_create_token): Add assertion when a
22728 memberref needs to be created.
22730 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
22732 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
22733 larger buffer for the custom attribute blob. Fixes #50637.
22735 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22737 * threadpool.c: notify listener on async processing handles after
22738 invoking the async callback. Thanks to Zoltan.
22740 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
22742 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
22743 avoid code duplication.
22745 * reflection.h (MonoDynamicImage): New type which is currently unused,
22746 but will be used through the ref.emit code in place of
22747 MonoDynamicAssembly.
22749 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
22752 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
22753 a MonoDynamicImage instead of just a MonoImage.
22755 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
22756 icalls to ModuleBuilder but keep their semantics, so they will work
22757 with moduleb->assemblyb. This will change later.
22759 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
22761 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
22764 * reflection.c (mono_image_build_metadata): Avoid creation of a default
22765 main module, since it is now done by the managed code.
22767 2003-11-03 Martin Baulig <martin@ximian.com>
22769 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
22770 `ginst->klass' here.
22771 (method_encode_methodspec): Don't use the `ginst->generic_method's
22772 klass if it's a generic instance, use `ginst->klass' in this case.
22774 2003-11-03 Martin Baulig <martin@ximian.com>
22776 * reflection.c (mono_image_get_generic_method_param_info):
22777 Removed, use mono_image_get_generic_param_info() instead.
22778 (mono_image_get_type_info): Write the GenericParam table before
22779 the Method table. This is neccessary because in the GenericParam
22780 table, type parameters of the class (ie. '!0' etc.) must come
22781 before the ones from its generic methods (ie. '!!0' etc).
22783 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
22785 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
22787 2003-11-02 Martin Baulig <martin@ximian.com>
22789 * reflection.c (create_generic_typespec): Take a
22790 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
22791 the generic parameters from it.
22793 2003-11-02 Martin Baulig <martin@ximian.com>
22795 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
22796 instead of a `MonoClassField *' since we just need the type.
22797 (create_generic_typespec): New static function. Creates a
22798 TypeSpec token for a generic type declaration.
22799 (mono_image_get_generic_field_token): New static function.
22800 (mono_image_create_token): If we're a FieldBuilder in a generic
22801 type declaration, call mono_image_get_generic_field_token() to get
22804 2003-11-02 Martin Baulig <martin@ximian.com>
22807 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
22808 `MonoReflectionGenericInst *declaring_type' and
22809 `MonoReflectionGenericInst *reflected_type' fields.
22811 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
22812 `MonoReflectionGenericInst *declaring_type' and a
22813 `MonoReflectionGenericInst *reflected_type' argument instead of a
22814 single `MonoReflectionGenericInst *type' one. Set
22815 `res->declaring_type' and `res->reflected_type' from them.
22816 (mono_reflection_inflate_field): Likewise.
22818 2003-11-02 Martin Baulig <martin@ximian.com>
22820 * class.c (mono_class_setup_vtable): Don't store generic methods
22823 2003-11-02 Martin Baulig <martin@ximian.com>
22825 * reflection.h (MonoReflectionGenericInst): Added
22826 `MonoReflectionType *declaring_type'.
22828 * reflection.c (mono_reflection_bind_generic_parameters): Use
22829 `if (tb->parent)' instead of `klass->parent'.
22831 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
22833 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
22834 with an empty ASSEMBLY table.
22836 * reflection.c (mono_image_build_metadata): Avoid using the same loop
22837 variable in the inner and outer loops.
22839 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
22841 * metadata.h (mono_metadata_make_token): Put parentheses around macro
22844 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
22846 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
22847 icalls. Instead, do everything in managed code. This is needed since
22848 it is hard to restore the original domain etc. in unmanaged code in the
22849 presence of undeniable exceptions.
22851 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
22852 New icalls to push and pop appdomain refs.
22854 2003-10-31 Martin Baulig <martin@ximian.com>
22856 * class.c (inflate_generic_type): Renamed to
22857 mono_class_inflate_generic_type() and made it public.
22859 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
22862 * loader.c (mono_field_from_memberref): Also set the retklass for
22865 * fielder.c (mono_image_get_inflated_field_token): New static
22866 method; creates a metadata token for an inflated field.
22867 (mono_image_create_token, fixup_method): Added support for
22868 "MonoInflatedField".
22869 (fieldbuilder_to_mono_class_field): New static function.
22870 (mono_reflection_inflate_field): New public function.
22873 (MonoReflectionGenericInst): Added `MonoArray *fields'.
22874 (MonoReflectionInflatedField): New typedef.
22876 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
22878 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
22879 for Solaris and other platforms without s6_addr16
22881 2003-10-30 Martin Baulig <martin@ximian.com>
22883 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
22884 argument instead of two.
22885 (mono_class_inflate_generic_signature): Likewise.
22886 (inflate_generic_header): Likewise.
22887 (mono_class_inflate_generic_method): Likewise. In addition, if
22888 `ginst->klass' is set, it becomes the new `method->klass'.
22890 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
22893 * reflection.c (encode_generic_method_sig): Write a 0xa as the
22894 first byte. [FIXME]
22895 (method_encode_methodspec): If we have generic parameters, create
22896 a MethodSpec instead of a MethodRef.
22897 (fixup_method): Added support for "MonoInflatedMethod" and
22898 "MonoInflatedCtor".
22899 (mono_image_create_token): Added support for "MonoInflatedMethod"
22900 and "MonoInflatedCtor".
22901 (inflated_method_get_object): New static function; returns a
22902 managed "System.Reflection.MonoInflatedMethod" object.
22903 (mono_reflection_bind_generic_method_parameters): Return a
22904 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
22905 (mono_reflection_inflate_method_or_ctor): Likewise.
22906 (mono_image_get_generic_method_param_info): Initialize unused
22908 (mono_image_get_generic_param_info): Likewise.
22910 * reflection.h (MonoReflectionInflatedMethod): New public
22911 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
22912 "S.R.MonoInflatedCtor" classes.
22914 * loader.c (method_from_memberref): If we're a TypeSpec and it
22915 resolves to a generic instance, inflate the method.
22917 2003-10-28 Dick Porter <dick@ximian.com>
22919 * object.c (mono_runtime_run_main): Convert command-line arguments
22920 into utf8, falling back to the user's locale encoding to do so.
22922 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
22924 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
22927 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
22929 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
22930 up icalls at method definition time. Partially fixes #33569.
22932 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
22934 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
22935 marshalling of arrays. Fixes #50116.
22937 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
22939 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
22940 points to a vtable in the dying appdomain.
22942 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
22943 listeners into unmanaged code inside the lock.
22945 * object.c (mono_class_vtable): Turn off typed allocation in non-root
22946 domains and add some comments.
22948 2003-10-25 Martin Baulig <martin@ximian.com>
22950 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
22952 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
22954 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
22955 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
22956 currently parsing. Create the generic class and store it in
22957 `generic_inst->klass' before parsing the type arguments. This is
22958 required to support "recursive" definitions; see mcs/tests/gen-23.cs
22960 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
22961 to support recursive typespec entries.
22963 * class.c (mono_class_setup_parent): If our parent is a generic
22964 instance, we may get called before it has its name set.
22965 (mono_class_from_generic): Splitted into
22966 mono_class_create_from_generic() and mono_class_initialize_generic().
22968 2003-10-25 Martin Baulig <martin@ximian.com>
22970 * icall.c (ves_icall_Type_BindGenericParameters): Return a
22971 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
22972 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
22973 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
22975 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
22976 (create_typespec): Likewise.
22977 (mono_reflection_bind_generic_parameters): Return a
22978 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
22979 (mono_reflection_inflate_method_or_ctor): New public function.
22981 * reflection.h (MonoReflectionGenericInst): New typedef.
22983 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
22985 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
22986 inside the domain lock. Fixes #49993.
22988 * object.c (mono_class_vtable): When typed allocation is used,
22989 allocate vtables in the GC heap instead of in the mempool, since the
22990 vtables contain GC descriptors which are used by the collector even
22991 after the domain owning the mempool is unloaded.
22993 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
22995 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
22996 reflect what it does. Also invalidate mempools instead of freeing
22997 them if a define is set.
22999 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
23002 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
23003 hold the finalizable objects in this domain.
23005 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
23008 * appdomain.c (mono_domain_set): New function to set the current
23009 appdomain, but only if it is not being unloaded.
23011 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
23012 appdomain which is being unloaded.
23014 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
23015 unloading of the root appdomain.
23017 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
23018 icall to execute a method in another appdomain. Intended as a
23019 replacement for InternalSetDomain, which can confuse the code
23020 generation in the JIT.
23022 * appdomain.c (mono_domain_is_unloading): New function to determine
23023 whenever an appdomain is unloading.
23025 * appdomain.c (mono_domain_unload): New function to correctly unload
23028 * assembly.c (mono_assembly_load_references): Check that an assembly
23029 does not references itself.
23031 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
23032 domain manually, it asks the finalizer thread to do it, then waits for
23033 the result. Also added a timeout.
23035 * icall.c: Register the new icalls.
23037 * threads.h threads.c: Export the mono_gc_stop_world and
23038 mono_gc_start_world functions.
23040 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
23041 function to fill out the mempool with 0x2a.
23043 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
23045 * reflection.h (MonoReflectionMethodAux): New structure to store
23046 information which is rarely used, thus is not in the MonoMethod
23049 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
23050 store the aux info.
23052 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
23053 and marshalling info into the aux structure.
23055 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
23056 from the aux structure.
23058 * loader.c (mono_method_get_param_names): Retrieve the param names from
23061 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
23063 * exception.h exception.c: Add AppDomainUnloadedException && fix
23066 2003-10-21 Dick Porter <dick@ximian.com>
23069 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
23070 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
23072 2003-10-21 Martin Baulig <martin@ximian.com>
23074 * reflection.c (mono_reflection_bind_generic_parameters):
23075 `klass->parent' is NULL for interfaces.
23077 2003-10-21 Martin Baulig <martin@ximian.com>
23079 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
23081 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
23083 * exception.c (mono_exception_from_name_msg): New helper function for
23084 creating exceptions and initializing their message field.
23086 * exception.c: Simplify functions using the new helper.
23088 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
23091 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
23092 mono_raise_exception, since otherwise gcc doesn't generate the function
23093 epilog for raise_exception, confusing the stack unwinding in the JIT.
23096 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
23097 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
23100 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23102 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
23105 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
23107 * icall.c: Removed GetUninitializedObject method because
23108 AllocateUninitializedClassInstance does the same.
23110 2003-10-18 Martin Baulig <martin@ximian.com>
23112 * class.c (inflate_generic_signature): Renamed to
23113 mono_class_inflate_generic_signature() and made it public.
23114 (my_mono_class_from_generic_parameter): New static function; if we
23115 don't already have the generic parameter's MonoClass, create a
23116 very simple one which is just used internally in the runtime and
23117 not passed back to managed code.
23119 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
23121 * metadata.h (MonoMethodSignature): Moved the
23122 `MonoGenericParam *gen_params' to the MonoMethodHeader.
23123 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
23125 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
23126 ves_icall_MonoMethod_GetGenericArguments(); this is now an
23127 interncall on the MonoMethod class, not on MethodInfo.
23128 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
23129 calling mono_reflection_bind_generic_method_parameters() directly.
23131 * loader.c (mono_method_get_signature): If this is a MethodSpec;
23132 return the already computed `method->signature'.
23133 (method_from_methodspec): New static function to load a method
23134 from a MethodSpec entry.
23135 (mono_get_method_from_token): Call the new method_from_methodspec()
23136 for MethodSpec tokens.
23137 (mono_get_method_from_token): If we're a generic method, load the
23140 * reflection.c (mono_image_get_memberref_token): Allow
23141 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
23143 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
23144 (mono_image_create_token): First check whether it's a generic
23145 method (so we'd need to create a MethodSpec), then do the other
23147 (mono_reflection_bind_generic_method_parameters): Return a
23148 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
23149 called directly from the interncall.
23151 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
23153 * reflection.c (load_public_key): Move loading of the public key
23156 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
23158 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
23161 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
23162 culture, hash_alg and public_key. Fixes #49555.
23164 2003-10-17 Martin Baulig <martin@ximian.com>
23166 * class.h (MonoGenericInst): Moved this declaration here and added
23167 `MonoMethod *generic_method'.
23170 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
23171 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
23173 * metadata.c (mono_metadata_type_equal): Two types of
23174 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
23175 index; ie. don't compare the address of the `MonoGenericParam'
23177 (mono_metadata_load_generic_params): Removed the `MonoMethod
23180 * metadata.h (MonoGenericInst): Moved declaration to class.h.
23181 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
23183 * reflection.c (method_encode_signature): Encode the number of
23184 generic parameters.
23185 (encode_generic_method_sig): New static function.
23186 (method_encode_methodspec): New static function; creates an entry
23187 in the MethodSpec table for a generic method.
23188 (mono_image_get_methodspec_token): New static function.
23189 (mono_image_create_token): Call mono_image_get_methodspec_token()
23190 for generic methods.
23191 (mono_reflection_bind_generic_method_parameters): New public
23192 function. Instantiates a generic method.
23194 2003-10-16 Martin Baulig <martin@ximian.com>
23196 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
23197 *gen_params' here from MonoMethodHeader.
23199 * metadata.c (mono_metadata_parse_method_signature): If we have
23200 generic parameters, initialize `method->gen_params' and then set
23201 the correct `type->data.generic_param' in all the parameters.
23203 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
23205 * threads.c (mono_threads_get_default_stacksize): New function to
23206 return the default stacksize.
23208 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
23209 termination of the finalizer thread, since the previous method had
23210 race conditions. Fixes #49628.
23212 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
23213 as for the other managed threads.
23215 2003-10-16 Martin Baulig <martin@ximian.com>
23217 * class.c (inflate_generic_signature): Copy `generic_param_count'
23220 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
23223 * metadata.c (mono_metadata_parse_method_signature): Actually set
23224 the `method->generic_param_count' here.
23225 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
23227 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
23229 * object.h: Add a new field to TypedRef to simplify the implementation
23230 of the REFANY opcodes in the JIT.
23232 * icall.c: Make use of the new field.
23234 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
23237 2003-10-15 Martin Baulig <martin@ximian.com>
23239 * class.c (mono_class_from_gen_param): Renamed to
23240 mono_class_from_generic_parameter() and moved most of the
23241 functionality from mono_reflection_define_generic_parameter()
23242 here; ie. we create a "real" class here.
23243 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
23244 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
23245 previously been called.
23247 * class.h (MonoGenericParam): Moved the declaration of this struct
23248 here from metadata.h and added `MonoMethod *method'.
23250 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
23253 * loader.c (mono_get_method_from_token): If we have any generic
23254 parameters, call mono_metadata_load_generic_params() to read them
23255 from the MONO_TABLE_GENERICPAR.
23257 * metadata.c (mono_metadata_load_generic_params): Added
23258 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
23260 * metadata.h (MonoMethodSignature): Replaced
23261 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
23262 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
23264 * reflection.c (mono_reflection_define_generic_parameter): Moved
23265 most of the functionality into the new
23266 mono_class_from_generic_parameter(); set the `method' field if
23267 we're a method parameter.
23269 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
23271 * marshal.c (emit_struct_conv): if native size is 0
23274 2003-10-14 Martin Baulig <martin@ximian.com>
23276 * icall.c: The generics API has changed in the spec since it was
23277 added to System.Type; these modifications make it match the spec
23279 (ves_icall_Type_GetGenericParameters): Renamed to
23280 `ves_icall_Type_GetGenericArguments'.
23281 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
23282 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
23283 `ves_icall_MonoType_get_HasGenericArguments'.
23284 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
23285 `ves_icall_MonoType_get_IsGenericParameter'.
23286 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
23287 this is no interncall anymore.
23288 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
23289 `ves_icall_TypeBuilder_get_IsGenericParameter'.
23291 2003-10-14 Martin Baulig <martin@ximian.com>
23293 * reflection.c (mono_reflection_bind_generic_parameters): Also
23294 inflate generic methods if we're reading the class from IL.
23296 2003-10-13 Martin Baulig <martin@ximian.com>
23298 * reflection.c (mono_reflection_define_generic_parameter): This
23299 method isn't called directly from the icall anymore; take a
23300 `MonoReflectionAssemblyBuilder *' so we can use this for type and
23301 method generic parameters.
23302 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
23303 (method_builder_encode_signature): Encode generic parameters.
23304 (mono_image_get_method_info): Write generic params to the
23305 MONO_TABLE_GENERICPARAM table.
23307 * reflection.h (MonoReflectionMethodBuilder): Added
23308 `MonoArray *generic_params'.
23310 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
23312 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
23313 wrapper for mono_reflection_define_generic_parameter().
23314 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
23316 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
23318 * marshal.h: Add missing function to fix build.
23320 * marshal.c (mono_marshal_get_native_wrapper): Add support for
23321 the SetLastError pinvoke attribute.
23323 * marshal.c (mono_marshal_set_last_error): New helper function called
23324 by the generated code.
23326 * marshal.c (mono_mb_emit_branch): New helper function.
23328 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
23330 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
23331 classes as parameters and return values of delegates. Fixes #29256.
23333 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
23335 * locales.c: use gint32 in non HAVE_ICU case
23337 2003-10-11 Martin Baulig <martin@ximian.com>
23339 * mono-debug.c (mono_debug_add_method): Added a workaround for
23342 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
23344 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
23345 delegates passed to native code must use the STDCALL calling
23346 convention. Fixes #35987.
23348 2003-10-10 Martin Baulig <martin@ximian.com>
23350 * class.c (inflate_generic_type): If we're inflating for a generic
23351 type instance (and not for a generic method), return
23352 MONO_TYPE_MVAR unchanged.
23354 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23356 * string-icalls.c: Join ignores null strings in the source array.
23357 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
23358 * threads.c: GetAvailableTheads is slightly more accurate.
23360 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
23362 * threads.h threads.c : add mono_threads_set_default_stacksize
23363 and pass default to CreateThread calls.
23365 2003-10-09 Dick Porter <dick@ximian.com>
23369 * locales.c: Internal calls for constructing CultureInfo and
23370 related objects from libicu (if its available.)
23372 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
23374 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
23376 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23378 * threadpool.c: added an argument to async_invoke_thread that is the
23379 item to process, pass the MonoAsyncResult to the thread start function
23380 when creating a new thread. This way we don't need to acquire any lock
23381 when we're creating a new thread. Readded a semaphore for faster
23382 response times (instead of that Sleep i added).
23384 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
23386 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
23387 get daylight change dates better on Windows, fix handling
23388 of platforms without tm_gmtoff.
23390 2003-10-06 Martin Baulig <martin@ximian.com>
23392 * class.c (inflate_generic_method): Renamed to
23393 mono_class_inflate_generic_method() and made public.
23394 (mono_class_init): Don't inflate the generic methods here.
23395 (mono_class_from_generic): Added `gboolean inflate_methods'
23396 argument. Inflate the methods here.
23398 * loader.c (mono_method_get_param_names): Ignore instances of
23399 generic types for the moment.
23401 * reflection.c (fixup_method): Added support for inflated methods.
23402 (mono_image_create_token): Use mono_image_get_methodref_token()
23403 for inflated methods.
23404 (mono_custom_attrs_from_param): Ignore instances of generic types
23406 (mono_reflection_bind_generic_parameters): New public function.
23407 Moved all the functionality from
23408 ves_icall_Type_BindGenericParameters() here and added support for
23410 (mono_reflection_define_generic_parameter): Initialize
23411 `klass->methods' here.
23413 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
23414 functionality into mono_reflection_define_generic_parameter().
23415 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
23416 TypeBuilder, return that TypeBuilder.
23418 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23420 * appdomain.c: removed mono_delegate_semaphore.
23423 (mono_thread_pool_add): moved hash table creation inside and the thread
23424 creation outside of the critical region.
23425 (mono_thread_pool_finish): removed obsolete code.
23426 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
23427 continue or exit the thread depending on the queue.
23429 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
23431 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
23432 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
23433 handle more bool marshalling options
23435 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
23437 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
23438 arrays of structs. Also add a more descriptive error message when
23439 a structure member is marshalled as LPArray.
23441 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
23443 * marshal.c (mono_marshal_get_native_wrapper): Add support for
23444 marshalling arrays of complex types. Fixes #29098. Also remove an
23445 usused and incomplete function.
23447 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
23449 * gc.c: report heap_size - free_bytes as total memory allocated
23452 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
23454 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
23455 fix timezone handling problems on Windows.
23457 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
23458 asserts when the year is outside the range handled by ms the functions.
23460 * class.c (setup_interface_offsets): If the class is an interface,
23461 fill out its interface_offsets slot.
23463 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23465 * threadpool.c: mark threadpool threads as background.
23467 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
23469 * decimal.c - define DECINLINE to nothing if not using GCC
23471 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
23473 * assembly.c: More refcount fixes.
23475 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23477 * string-icalls.c: if we're not trimming, return the same string.
23478 When not splitting, don't create a new string.
23480 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23483 (mono_image_open): increment the ref_count inside the critical section.
23485 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
23487 * image.c (mono_image_open): Fix reference counting bug.
23489 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
23491 * marshal.c (mono_marshal_type_size) struct alignment changed for
23492 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
23493 64bits. Avoid leak in mono_marshal_get_native_wrapper when
23494 mono_lookup_pinvoke_call throws.
23496 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
23498 * reflection.c (mono_reflection_parse_type): Fix #49114.
23500 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
23501 temporary workaround for cygwin header problem.
23503 * object.c (mono_object_isinst): Synchronize this with the code
23504 generated by the JIT for casts.
23506 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
23508 * reflection.c (encode_type): Fix #38332.
23510 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
23512 * marshal.c (mono_marshal_method_from_wrapper): New function to return
23513 the original method from the wrapper method.
23515 2003-09-25 Martin Baulig <martin@ximian.com>
23517 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
23518 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
23519 (ves_icall_Type_get_IsGenericInstance): New interncall.
23521 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
23523 * object.c: fix cast warning in big endian code.
23525 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
23527 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
23529 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23531 * assembly.c: don't call check_env from mono_assembly_load. It's
23532 already done once in mono_assemblies_init and may cause headaches when
23533 multiple threads are loading assemblies.
23535 2003-09-19 Martin Baulig <martin@ximian.com>
23537 * reflection.c (mono_reflection_define_generic_parameter): Don't
23538 allocate `klass->methods', set `klass->flags' to
23539 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
23541 2003-09-18 Martin Baulig <martin@ximian.com>
23543 * class.c (mono_class_init): Don't create `class->methods' if it's
23544 already initialized.
23546 * metadata.c (mono_metadata_load_generic_params): Make this
23549 * reflection.c (mono_reflection_define_generic_parameter): Set
23550 parent class and interfaces from the constraints.
23552 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
23553 to keep this struct in sync with the declaration in TypeBuilder.cs.
23555 2003-09-17 Martin Baulig <martin@ximian.com>
23557 * metadata.h (MonoType): Replaced the data's `int type_param'
23558 field with `MonoGenericParam *generic_param'.
23559 (MonoGenericParam): Added `MonoClass *klass'.
23561 * class.c (mono_class_from_gen_param): Removed the
23562 `MonoImage *image' and `int type_num' arguments.
23564 * metadata.c (mono_metadata_parse_generic_param): New static
23565 method; creates a MonoGenericParam which just contains the index.
23566 (do_mono_metadata_parse_type): Call
23567 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
23570 * reflection.c (mono_image_typedef_or_ref): Generic type
23571 parameters may be in the same assembly, but never use a typedef
23573 (mono_reflection_define_generic_parameter): We're now creating a
23574 "real" class for the type parameter; it's now safe to call
23575 mono_class_from_mono_type() on the class'es type, it'll do the
23578 2003-09-16 Martin Baulig <martin@ximian.com>
23580 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
23581 `symfile->range_entry_size' and `symfile->class_entry_size' here;
23582 the `symfile' data structure must be fully initialized before it
23583 gets added to the table.
23585 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
23587 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
23589 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
23590 class init trampolines.
23592 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
23594 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
23595 to the built-in profiler to turn off time and allocation profiling
23598 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
23600 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
23603 * debug-helpers.c (mono_method_full_name): Print the wrapper type
23604 in human readable form.
23606 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
23608 * reflection.c icall.c: Fixed warnings.
23610 * image.c (load_class_names): Use a temporary hash table to hold the
23611 namespaces in order to avoid doing many string comparisons.
23613 * image.h: Fix typo.
23615 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
23616 Pass NULL instead of g_direct_equal to the GHashTable constructor
23617 since the NULL case is short-circuited inside g_hash_table_lookup,
23618 leading to better performance.
23620 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
23621 obtain the first custom attribute for a given index. Depends on the
23622 CustomAttribute table being sorted by the parent field.
23624 * reflection.c (mono_custom_attrs_from_index): Use the new function
23625 for better performance.
23627 2003-09-07 Martin Baulig <martin@ximian.com>
23629 * class.c (mono_class_init): If we're a generic instance, inflate
23630 all our methods instead of loading them from the image.
23631 (mono_class_from_generic): Set `class->methods = gklass->methods'.
23633 2003-09-07 Martin Baulig <martin@ximian.com>
23635 * mono-debug-debugger.c: Added support for constructors.
23637 2003-09-06 Martin Baulig <martin@ximian.com>
23639 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
23642 * reflection.c (mono_reflection_setup_generic_class): Call
23643 ensure_runtime_vtable() to create the vtable.
23645 2003-09-05 Martin Baulig <martin@ximian.com>
23647 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
23650 2003-09-04 Martin Baulig <martin@ximian.com>
23652 * reflection.c (mono_reflection_define_generic_parameter): Generic
23653 parameters start with zero.
23655 2003-09-04 Martin Baulig <martin@ximian.com>
23657 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
23659 * reflection.h (MonoReflectionGenericParam): New typedef.
23660 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
23661 the generic parameters from the managed TypeBuilder.
23663 * reflection.c (mono_reflection_define_generic_parameter): New function.
23664 (mono_reflection_create_runtime_class): Encode generic parameters.
23665 (mono_reflection_setup_generic_class): New function; this is
23666 called after adding adding all generic params to the TypeBuilder.
23667 (encode_type): Added MONO_TYPE_VAR.
23669 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
23671 * class.h class.c (mono_class_needs_cctor_run): Moved this method
23674 * assembly.h assembly.c: Moved the AOT loading code into an assembly
23677 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
23679 * reflection.h reflection.c class.h class.c: Delete duplicate
23680 definition of mono_type_get_name () from reflection.c and export the
23683 * class.c: Class loading fixes from Bernie Solomon
23684 (bernard@ugsolutions.com).
23686 * reflection.c: Endianness fixes from Bernie Solomon
23687 (bernard@ugsolutions.com).
23689 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
23691 * assembly.h assembly.c: Define a file format version for AOT
23694 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
23696 * appdomain.h (MonoJitInfo): New field to determine whenever the
23697 code is domain neutral.
23699 2003-08-31 Miguel de Icaza <miguel@ximian.com>
23701 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
23703 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
23705 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
23706 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
23707 Avoid caching the result since strings must be domain specific. Fixes
23710 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
23712 * marshal.c (mono_marshal_init): Make this callable multiple times
23713 since it is hard to find a correct place to call it.
23715 * object.c (mono_runtime_class_init): Execute static constructors in
23716 the correct appdomain.
23718 * image.c (build_guid_table): Handle the case when multiple images have
23721 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23723 * icall.c: added a couple of icalls for System.Web.
23725 2003-08-28 Martin Baulig <martin@ximian.com>
23727 * icall.c (ves_icall_Type_BindGenericParameters): Use
23728 `klass->generic_inst' instead of `&klass->byval_arg' in the
23729 mono_type_get_object() call. The returned type must be
23730 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
23732 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
23736 * object.c (mono_class_proxy_vtable): Make it thread safe.
23738 * pedump.c: Fix warning.
23740 * object.c appdomain.h: Get rid of metadata_section.
23741 It is no longer needed and it was causing deadlocks with domain->lock.
23743 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
23745 2003-08-26 Martin Baulig <martin@ximian.com>
23747 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
23749 2003-08-26 Martin Baulig <martin@ximian.com>
23751 * pedump.c (main): Call mono_metadata_init(),
23752 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
23753 and mono_loader_init().
23755 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
23757 * loader.h: Add missing include to fix build.
23759 * image.h: mono_image_load_references is no more.
23761 * assembly.c: Reworked assembly loading to make it really thread safe.
23762 After these changes, the assembly returned by mono_assembly_open is
23763 fully initialized, i.e. all its references assemblies are loaded.
23765 * assembly.c (mono_image_load_references): Renamed to
23766 mono_assembly_load_references, and made private, since clients no
23767 longer need to call it.
23769 * class.c: Removed calls to mono_assembly_load_references, since it was
23770 a source of deadlocks.
23772 * loader.h loader.c class.h class.c: Protect data structures using a
23773 new lock, the loader lock.
23775 * class.c (mono_class_setup_vtable): Create temporary hash tables and
23776 GPtrArrays only when needed.
23778 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
23779 into empty structures by mcs. Fixes pinvoke7.cs.
23781 * domain.c (mono_init): Call a new initialization function.
23783 * appdomain.c (mono_runtime_init): Call the new initializer function
23784 of the marshal module.
23786 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
23787 inserted into empty structures by mcs. Fixes pinvoke7.cs.
23789 * marshal.h marshal.c: Added locks around the wrapper caches to make
23790 this module thread safe.
23792 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
23793 this argument. Fixes pinvoke1.exe.
23795 2003-08-25 Lluis Sanchez <lluis@ximian.com>
23797 * object.h: Added call_type field to MonoMethodMessage and the corresponding
23798 enumeration of values. Removed fields to store remote call output values in
23799 MonoAsyncResult. Not needed any more.
23800 * object.c: Initialize call_type and async_result fields in mono_message_init.
23801 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
23802 dispatching the message.
23803 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
23804 async call to finish. To do it use a message with EndInvoke call type.
23806 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
23808 * loader.h loader.c (mono_method_hash_marhal_info): New function which
23809 determines whenever a method has marshalling info.
23811 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23813 * assembly.c: fix the build on windows.
23815 2003-08-22 Lluis Sanchez <lluis@ximian.com>
23817 * object.cs: Fixed bug #47785.
23819 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
23821 * string-icalls.c (StringReplace): If their are no occurances of
23822 the old string found return a reference to the supplied
23823 string. This saves some memory and matches MS behavoir.
23825 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23827 * socket-io.c: fixed compilation for systems that define AF_INET6
23828 and don't define SOL_IP/SOL_IPV6.
23830 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
23832 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
23833 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
23835 * rawbuffer.c rawbuffer.h: Make this module thread safe.
23837 * domain.c: Make this module thread safe.
23839 * domain.c (mono_init): Call new initialization function.
23841 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
23842 reference types too. Fixes #38812.
23844 * image.c (mono_image_init): Fixed warnings.
23846 * class.c (mono_class_from_typeref): Handle assembly load failure
23849 * appdomain.c (add_assemblies_to_domain): Handle the case when
23850 the references of an assembly are not yet loaded.
23852 * metadata.c image.c assembly.c: Moved initialization of global
23853 variables to a separate function called at startup since lazy
23854 initialization of these variables is not thread safe.
23856 * image.c assembly.c: Made this module thread safe by adding locks in
23857 the appropriate places.
23859 * domain.c (mono_init): Call the new initialization functions of the
23862 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
23864 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
23865 make a direct call. It is proxy's work to make the call asynchronous.
23866 mono_delegate_end_invoke(): If the targe is a proxy, just collect
23868 * object.cs: mono_method_call_message_new(): read AsyncResult and
23869 state object from parameters list, if this info is requested.
23870 * object.h: Added fields to store remote call output values in
23871 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
23873 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
23875 * object.h: add needed fields to MonoThread.
23876 * threads.c, threads.h: allow registering a function to cleanup data
23877 allocated per thread by the JIT.
23879 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23881 * loader.h: portability fix by Bernie Solomon
23882 * <bernard@ugsolutions.com>.
23884 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
23886 * reflection.h reflection.c (mono_param_get_objects): Changed this to
23887 return a MonoArray. This simplifies the code and also ensures that
23888 the cache allways contains an object reference as a value.
23890 * icall.c (ves_icall_get_parameter_info): Simplified using the new
23893 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23895 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
23896 fixes a problem with byte ordering when getting the address family for
23899 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
23901 * .cvsignore: Added monosn.
23903 * reflection.h reflection.c loader.c: Added support for parameter
23904 marshalling to dynamically created types. Fixes #47295.
23906 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
23908 * rand.c: remove useless warnings.
23910 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
23912 * class.c: implemented ldtoken for methods and fieldrefs.
23914 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23916 * threadpool.c: when mono_async_invoke was called, no one took care of
23917 monitoring the queue. So if the method invoked took some time and we
23918 got new async invoke requests after 500 ms (the thread created waited
23919 that long in WaitForSingleObject), the new async invoke was not called
23920 until the previous one finished.
23922 This is fixed now. Thanks to Totte for helping with it.
23924 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23926 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
23928 2003-08-11 Martin Baulig <martin@ximian.com>
23930 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
23932 2003-08-06 Martin Baulig <martin@ximian.com>
23934 * mono-debug-debugger.c: Added support for static fields,
23935 properties and methods.
23937 2003-08-06 Martin Baulig <martin@ximian.com>
23939 * mono-debug-debugger.c: Don't store the MonoString's vtable to
23940 make this work for applications with multiple application domains.
23942 2003-08-04 Martin Baulig <martin@ximian.com>
23944 * mono-debug-debugger.c: Completely reworked the type support; the
23945 most important thing is that we're now just using one single
23946 `MonoType' instance per type.
23948 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
23950 * mono-endian.h, mono-endian.c, icall.c: Added icall
23951 ves_icall_System_Double_AssertEndianity to assert double word endianity
23952 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
23954 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
23956 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
23957 support, icalls and fixes.
23959 2003-07-31 Miguel de Icaza <miguel@ximian.com>
23961 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
23962 classes that are a punctuation character in .NET is not the same a
23965 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23967 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
23969 2003-07-29 Miguel de Icaza <miguel@ximian.com>
23971 * icall.c: Add new MemCopy internalcall.
23972 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
23973 Simplified code; It is not necessary to handle all the cases here,
23974 as the C# code takes care of it. Only handle the case of the name
23975 resource embedded into the assembly.
23977 Changed signature to return the data pointer and the size of the
23980 2003-07-26 Miguel de Icaza <miguel@ximian.com>
23982 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
23983 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
23985 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
23987 * socket-io.c: ignore EINTR error in select.
23989 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
23991 * class.h, class.c: removed unused subclasses field in MonoClass.
23993 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
23995 * icall.c: improve fix of get_base_definition(). If the parent class
23996 doesn't have the mehod, look at the parent of the parent.
23997 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
23998 to check if a parameter is an in or out parameter
23999 (PARAM_ATTRIBUTE_IN is not set by default).
24000 mono_method_return_message_restore(): Use mono_class_value_size to
24001 get the size of a value type. mono_type_stack_size (parameterType)
24002 does not return the correct value if parameterType is byRef.
24003 mono_load_remote_field(), mono_load_remote_field_new(),
24004 mono_store_remote_field(), mono_store_remote_field_new():
24005 raise exception if the remote call returns an exception.
24007 2003-07-28 Martin Baulig <martin@ximian.com>
24009 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
24010 method. This is a wrapper around mono_runtime_invoke() which
24011 boxes the instance object if neccessary.
24013 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24015 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
24016 metadata.h, row-indexes.h, verify.c: first cut of generics support.
24018 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24020 * icall.c: disable mcs bug workaround.
24022 2003-07-21 Miguel de Icaza <miguel@ximian.com>
24024 * object.c (mono_runtime_class_init): Take the metadata_section
24025 mutex before obtaining the domain mutex.
24027 * appdomain.h: Added definition of metadata_section mutex here.
24029 * object.c: define metadata_mutex here.
24031 2003-07-24 Ravi Pratap <ravi@ximian.com>
24033 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
24036 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
24038 * reflection.c: Fix bug #46669
24040 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24045 * object.h: fill in the type name for TypeLoadException.
24047 2003-07-23 Ravi Pratap <ravi@ximian.com>
24049 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
24050 relationship between TypeBuilders while compiling corlib) and bug
24051 45993 (Array types returned from the runtime while compiling
24052 corlib were from the loaded corlib).
24054 2003-07-22 Martin Baulig <martin@ximian.com>
24056 * mono-debug-debugger.c: Reworked the type support a bit more;
24057 distinguish between types and classes.
24059 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
24061 * icall.c: add IsArrayImpl icall.
24063 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
24065 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
24066 initializing real_size only once. Also fix bug #46602.
24068 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
24070 * object.c: Renamed mono_metadata_section to metadata_section.
24072 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
24074 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
24075 empty array if the type is an array. Fixed.
24076 ves_icall_MonoMethod_get_base_definition: if the base method
24077 is abstract, get the MethodInfo from the list of methods of
24079 * reflection.c: ParameterInfo.PositionImpl should be zero-based
24080 and it was 1-based. Fixed in mono_param_get_objects.
24082 2003-07-20 Martin Baulig <martin@ximian.com>
24084 * mono-debug.h: Set version number to 31.
24085 (mono_debug_init): Added `MonoDomain *' argument.
24087 * mono-debug-debugger.c: Reworked the type support; explicitly
24088 tell the debugger about builtin types; pass the `klass' address to
24091 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
24093 * image.c: Allow new metadata tables to be loaded without a
24094 warning. Also update the warning message to give the new constant value.
24096 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
24098 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
24099 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
24100 array type representation changes.
24102 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
24104 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
24105 on Environment.Exit () call.
24107 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
24109 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
24110 requires a matching corlib.
24112 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
24114 * Changelog: My editor decided to add a CR to each line. Sorry about that.
24115 Committed again without the CRs.
24117 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
24119 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
24120 getting it from the "this" socket instance. Did not work
24121 if the socket is a subclass of Socket.
24122 Also fixed bug #35371.
24124 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24126 * metadata.c: fixed size for TypedByRef.
24127 * loader.c: when searching for a method, consider the vararg amrker.
24128 * unicode.c, decimal.c: constify some arrays.
24130 2003-07-15 Dick Porter <dick@ximian.com>
24132 * socket-io.c: Fixed compilation for gcc < 3.2.
24134 Fixed compilation for machines that don't have AF_INET6 (thanks to
24135 Bernie Solomon <bernard@ugsolutions.com> for that part.)
24137 Fixed compile warnings.
24139 Fixed formatting and line endings.
24141 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
24144 * socket-io.c: Added IPv6 support.
24146 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
24148 * class.c (mono_class_is_assignable_from): New function to implement
24149 the is_assignable_from logic. Used by mono_object_isinst,
24150 Type::IsAssignableFrom () and the interpreter.
24152 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
24153 Object, even interfaces.
24155 * object.c (mono_object_isinst): Implement in terms of
24156 is_assignable_from.
24158 * icall.c (ves_icall_type_is_assignable_from): New icall.
24160 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
24162 * domain.c (foreach_domain): fix compiler warning.
24164 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
24166 * image.c (load_metadata_ptrs): use g_strndup because strndup is
24167 not available on all plattforms
24169 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
24171 * image.h image.c: Store the metadata version string in MonoImage.
24172 * icall.c: New icall to retrieve the image version.
24173 * reflection.c (create_dynamic_image): Fill in the image version field
24174 * reflection.c (build_compressed_metadata): Use the image version
24175 from the image structure.
24177 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24179 * appdomain.c: modified comment.
24180 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
24181 That will be its last iteration when mono_gc_cleanup is called from
24182 mono_runtime_cleanup and before the domain is unloaded.
24186 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
24188 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
24191 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24193 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
24194 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
24195 Bernie Solomon <bernard@ugsolutions.com>.
24197 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24199 * object.c, object.h: provide mono_object_new_fast() for faster
24200 allocation in some special cases.
24202 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24204 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
24205 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
24207 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
24209 * threadpool.c: fix leaks.
24211 2003-07-01 Dick Porter <dick@ximian.com>
24213 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
24214 using MonoGHashTables. Fixes threadpool bug posted to list.
24216 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
24218 * image.h, image.c: added support to load an assembly from a byte array.
24219 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
24220 assembly bundle support.
24222 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
24224 * threadpool.c (mono_thread_pool_add): keep a reference to the
24225 AsyncResult to prevent GC
24227 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24229 * class.c: leak fix.
24231 2003-06-25 Dick Porter <dick@ximian.com>
24233 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
24234 for the async object, the WaitHandle object will close the handle.
24237 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24239 * class.c: in mono_array_class_get (), lookup from the hash with the
24240 same type we insert: this works around a bug in
24241 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
24242 lluis. The real fix will have to wait for after the release.
24244 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24246 * icall.c: fix memory leak when getting type members.
24248 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
24250 * reflection.c: added more pubtoken special cases.
24252 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
24254 * class.c: handle field offset correctly when class size
24255 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
24257 2003-06-20 Martin Baulig <martin@ximian.com>
24259 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
24262 2003-06-20 Martin Baulig <martin@ximian.com>
24264 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
24266 2003-06-20 Martin Baulig <martin@ximian.com>
24268 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
24269 just distinguish between variables in registers and variables at
24270 an offset relative to a register.
24272 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24274 * icall.c: #ifdef out latest changes until mcs is fixed.
24276 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24278 * icall.c: return members in metadata order.
24280 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
24282 * icall.c: avoid infinite loop in GetTimeZoneData.
24284 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
24286 * icall.c: added Marshal.Prelink/All icalls.
24288 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
24290 * object.c, object.h: fix warnings and do some overflow checking
24291 when creating arrays.
24293 2003-06-17 Dick Porter <dick@ximian.com>
24296 * file-io.c: File attributes need to be tweaked slightly when
24297 passed from the managed to the w32 world.
24299 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
24300 * profiler.h profiler-private.h profiler.c: Rework last patch
24301 based on suggestion by Paolo.
24303 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
24305 * profiler.h profiler-private.h profiler.c: Added infrastructure for
24306 instruction level coverage data collection.
24307 * profiler.h profiler.c (: Added new callback function which can be
24308 used by the profiler to limit which functions should have coverage
24310 * profiler.c (mono_profiler_load): Call g_module_build_path to
24311 generate the file name of the profiler library.
24313 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24315 * profiler.c, profiler.h, profiler-private.h: added basic block
24316 coverage profiling API.
24318 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
24320 * reflection.c (mono_reflection_create_runtime_class): Add support
24321 for events in dynamically generated code.
24323 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
24326 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24328 * icall.c: when getting timezone info, return reasonable values if we
24329 can't get the actual data.
24331 2003-06-14 Dick Porter <dick@ximian.com>
24333 * threads.c (start_wrapper): Remove the reference to the thread
24334 object in the TLS data, so the thread object can be finalized.
24335 This won't be reached if the thread threw an uncaught exception,
24336 so those thread handles will stay referenced :-( (This is due to
24337 missing support for scanning thread-specific data in the Boehm GC
24338 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
24340 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
24342 * reflection.c: ensure streams and tables are first allocated with
24343 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
24345 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24347 * icall.c: fixed GetElementType for byrefs (bug# 44792).
24349 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
24351 * reflection.c (mono_reflection_create_runtime_class): Add support for
24352 properties to dynamically created classes.
24353 * reflection.c: Fix a few places where non-MonoObjects were inserted
24354 into the tokens hashtable.
24356 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24358 * object.c: some support to handle out of memory exceptions.
24360 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
24362 * marshal.c (mono_marshal_get_native_wrapper): support reference
24365 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24367 * object.h, object.c: more portability stuff from Bernie Solomon.
24368 Unexport mono_object_allocate(). Added mono_object_unbox ().
24369 Set exitcode when an unhandled exception is thrown.
24371 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
24373 * marshal.c (mono_marshal_get_native_wrapper): use custom
24374 marshaler for return types.
24376 2003-06-10 Dick Porter <dick@ximian.com>
24378 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
24379 ip_mreq is available
24381 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
24383 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
24384 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
24385 by Bernie Solomon <bernard@ugsolutions.com>.
24387 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
24389 * gc.c (mono_gc_init): Avoid error message on shutdown when
24390 GC_DONT_GC=1 is used.
24392 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
24393 New icall to return the GUID of a module.
24395 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24397 * class.c: ensure instance size always includes the parent's size
24398 even whem class size is set explicitly (fixes bug#44294).
24400 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24402 * profiler.h, profiler.c: made the simple profiler thread-safe,
24403 get more accurate timing info. Allow the loading of an
24404 externally-developed profiler module.
24406 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
24408 * marshal.c (mono_marshal_get_native_wrapper): improved
24409 class/byref arguments.
24410 (mono_marshal_get_native_wrapper): better string marshaling support.
24412 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24414 * class.c: ensure .pack and .size are handled correctly and
24415 simplified layout of static fields.
24417 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
24420 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
24422 * loader.c (mono_lookup_pinvoke_call): look for modules in the
24423 current directory (fix bug 44008)
24425 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
24427 * marshal.c (mono_marshal_get_native_wrapper): started support for
24429 (mono_delegate_to_ftnptr): consider marshalling specifications
24431 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24433 * reflection.c, reflection.h: emit custom marshal info.
24435 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24437 * object.c: free the GError.
24438 * icall.c: added CloseEvent_internal.
24440 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
24443 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
24445 * loader.c (mono_method_get_signature): Add support for dynamic
24448 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24450 * reflection.c: fixed bug #43905.
24452 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24454 * class.c, domain.c, icall.c, metadata.h, object.h: support for
24455 handling TypedReference and ArgIterator.
24456 * loader.c, loader.h: added function to get signature at call site.
24458 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24460 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
24461 data readonly. Buglets and warning fixes. Some MethodSpec support.
24463 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24465 * class.h, class.c, object.c: remove relative numbering support.
24467 2003-05-26 Miguel de Icaza <miguel@ximian.com>
24469 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
24470 free the string, until we get a chance to fix Gtk#
24472 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24474 * marshal.c: revert last patch.
24476 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
24478 * icall.c: updates for new mono_class_vtable() not calling
24479 the type constructor anymore.
24481 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24483 * object.h, object.c: separate vtable creation from type
24484 initialization. Make running the .cctor thread safe.
24486 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
24488 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
24490 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
24492 * loader.c (mono_get_method): consider calling convention
24494 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
24496 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
24497 to return the invisible global type for a module.
24499 * reflection.c (mono_image_build_metadata): Emit global fields too.
24501 2003-05-20 Peter Williams <peterw@ximian.com>
24503 * loader.c (mono_lookup_internal_call): Add a few newlines.
24505 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
24507 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
24510 * appdomain.c (set_domain_search_path): Recalculate search path when
24511 AppDomainSetup.PrivateBinPath changes.
24513 * object.c (mono_class_compute_gc_descriptor): It turns out some
24514 parts of the class libs (like System.Thread) holds pointers to
24515 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
24516 to treat native int a pointer type here.
24518 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
24520 * appdomain.h, domain.c: add hashtable for jump target resolution.
24522 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
24524 * reflection.h reflection.c icall.c: Added new icalls
24525 GetManifestResourceInfoInternal, GetModulesInternal and support
24528 2003-05-16 Dick Porter <dick@ximian.com>
24532 * file-io.c: Implement System.IO.MonoIO::GetTempPath
24534 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
24536 * object.c: mono_store_remote_field: little fix to previous patch.
24538 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24540 * class.c: add constructors to array classes.
24541 * icall.c: special case array construction for InternalInvoke (),
24543 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
24545 * class.h class.c reflection.c object.c: Added support for field
24546 defaults in dynamically generated classes.
24548 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24550 * reflection.c: properly encode charset for ddlimport.
24552 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
24554 * threads.c: allow compiling without GC.
24556 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24558 * appdomain.h, object.c, object.h, threads.c, threads.h: added
24559 handling of thread static data.
24561 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24563 * reflection.h, reflection.c: added mono_custom_attrs_free ().
24565 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
24567 * class.c (mono_array_class_get): always set the serializable flags
24568 (mono_array_class_get): always set the SEALED attribute for array types
24570 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
24572 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
24573 attributes (fix for bug 42021).
24575 2003-05-12 Dick Porter <dick@ximian.com>
24577 * gc.c: Don't run finalizers when the finalizer thread is
24578 finishing up, because the default domain has already been
24581 2003-05-11 Miguel de Icaza <miguel@ximian.com>
24583 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
24584 value is null, we should throw an exception. This is slightly
24585 different than the other conventions used for the constructor.
24587 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24589 * socket-io.c: fixed windows build.
24591 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24593 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
24595 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
24597 * object.c (mono_string_new_wrapper): Compatibility fix for MS
24600 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
24602 * class.c (mono_class_layout_fields): Add experimental GC aware
24603 auto layout facility. Requires class library changes to work correctly.
24605 (mono_class_setup_vtable): Avoid overriding explicit interface
24606 method implementations. Fixes iface3.exe test.
24608 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
24610 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
24611 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
24613 * metadata.h: Add new type classification macro which determines
24614 whenever the type holds an object reference.
24616 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
24618 * marshal.c (mono_marshal_get_native_wrapper): cleanups
24620 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
24622 * gc.c (finalizer_thread): Work around a GC bug.
24624 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
24626 * marshal.c (emit_struct_conv): allow unions
24628 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
24630 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
24632 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
24634 2003-05-06 Martin Baulig <martin@ximian.com>
24636 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
24638 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24641 (Select_internal): allow NULLs, don't create arrays if not needed.
24642 Coupled with Socket.cs changes.
24645 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
24646 register a finalizer for it that will close the semaphore handle. This
24647 fixes the leak and make Lupus' test run with > 4080 loops.
24649 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
24651 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
24652 Jerome Laban (bug #42287)
24654 2003-05-02 Martin Baulig <martin@ximian.com>
24656 * debug-mono-symfile.h
24657 (MonoSymbolFile): Moved declaration into mono-debug.h.
24658 (MonoDebugMethodJitInfo): Likewise.
24659 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
24661 (_mono_debug_address_from_il_offset): Take a
24662 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
24665 (MonoDebugDomainData): New struct.
24666 (mono_debug_get_domain_data): New function.
24667 (mono_debug_add_method): Take an additional `MonoDomain *'
24669 (mono_debug_source_location_from_address): Likewise.
24670 (mono_debug_il_offset_from_address): Likewise.
24671 (mono_debug_address_from_il_offset): Likewise.
24673 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
24675 * reflection.c: one more check for null type in custom attrs.
24677 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24679 * reflection.c: avoid warning (comparison is always false due to limited
24680 range of data type).
24682 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24684 * icall.c: throw an exception in Type.GetField if the argument 'name'
24687 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
24689 * reflection.c: fixed handling of enums in named arguments to custom
24690 attributes (bug #42123).
24692 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24694 * reflection.c: use the right array element type and handle
24695 a null for a Type argument, too.
24697 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
24699 * reflection.c: handle arrays as arguments to custom attributes.
24701 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
24703 * reflection.c: handle a string value in a custom attr
24704 ctor that takes an object.
24706 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
24708 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
24711 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
24713 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
24715 2003-04-27 Martin Baulig <martin@ximian.com>
24717 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
24718 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
24719 MONO_DEBUGGER_EVENT_BREAKPOINT.
24720 (mono_breakpoint_trampoline_code): Removed.
24721 (mono_debugger_event_handler): The last argument is now a
24723 (mono_debugger_insert_breakpoint_full): Removed the
24724 `use_trampoline' argument.
24725 (mono_debugger_method_has_breakpoint): Likewise.
24726 (mono_debugger_trampoline_breakpoint_callback): Renamed to
24727 mono_debugger_breakpoint_callback(); take the method and
24728 breakpoint number as arguments.
24730 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24732 * metadata.c: fix off by one when loading parameters attributes.
24734 2003-04-24 Martin Baulig <martin@ximian.com>
24736 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
24738 2003-04-24 Martin Baulig <martin@ximian.com>
24740 * mono-debug-debugger.c: Moved all code which interacts with the
24741 Mono Debugger here.
24743 * debug-mono-symfile.c: This code now just deals with the symbol
24744 file itself, the debugger code is now in mono-debug-debugger.c.
24746 2003-04-23 Martin Baulig <martin@ximian.com>
24748 * mono-debug.c (mono_debug_source_location_from_il_offset):
24749 New method; like mono_debug_source_location_from_address(), but
24750 takes an IL offset instead of a machine address.
24752 2003-04-23 Martin Baulig <martin@ximian.com>
24754 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
24755 `line' field; this is now computed by the debugger.
24757 2003-04-23 Martin Baulig <martin@ximian.com>
24759 * mono-debug.[ch]: New files. This is the new debugging interface.
24761 * mono-debug-debugger.[ch]: New files. Moved all code which
24762 interacts with the Mono Debugger here.
24764 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
24766 * domain.c (mono_init): initialize mono_defaults.monitor_class
24768 2003-04-21 Miguel de Icaza <miguel@ximian.com>
24770 * reflection.c (method_encode_code): Add a spicy exception to help
24771 future compiler authors.
24773 2003-04-21 Martin Baulig <martin@ximian.com>
24776 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
24777 Make this work with relative pathnames; g_filename_to_uri() needs
24778 an absolute filename.
24780 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
24782 * icall.c: Track name changes in Object and ValueType.
24784 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
24786 * metadata.c (mono_type_stack_size): size should be a multiple of
24789 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24792 (internal_domain_finalize): moved into mono_domain_finalize. No need
24793 to create another thread because the finalizers will be run in the
24796 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
24797 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
24798 to be run (MS does this too).
24800 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
24802 * object.c (mono_class_compute_gc_descriptor): Update comment.
24804 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
24806 * image.h: Add synchronized wrapper cache.
24808 * image.c (do_mono_image_open): Initialize cache.
24810 * reflection.c (create_dynamic_mono_image): Initialize cache.
24812 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24814 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
24815 ves_icall_System_Buffer_ByteLengthInternal.
24817 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24819 * reflection.c: setup klass->nested_in earlier. Allow
24820 a dash in the assembly name.
24822 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
24824 * metadata.c (mono_type_to_unmanaged): dont access
24825 type->data.klass for MONO_TYPE_OBJECT
24826 (mono_type_to_unmanaged): consider System.Delegate class
24828 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
24830 * class.c: just setup supertypes in the proper place instead of
24831 initializing the full element class for arrays.
24833 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24835 * class.c: ensure the element class of arrays is initialized.
24836 Setup the supertype info for array classes, too.
24838 2003-04-14 Miguel de Icaza <miguel@ximian.com>
24840 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
24842 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24844 * Makefile.am: re-added -m option when running cygpath. This way,
24845 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
24847 * mono-config.c: same codepath for locating mono config file for WIN32
24849 * assembly.c: if mono_assembly_setrootdir is called, don't override
24852 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24854 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
24855 MONO_ASSEMBLIES variable.
24857 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
24859 * icall.c: added Assembly::GetNamespaces() icall.
24861 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24863 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
24865 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
24867 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
24868 * object.c: fixed bug in the construction of vtable for proxies
24870 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
24872 * object.c (mono_array_new): Mark mono_array_new as an icall.
24874 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24876 * class.c: fixed test for public method when overriding interfaces.
24879 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24881 * appdomain.h, domain.c: added mono_domain_foreach() to
24882 be able to access the currently loaded appdomains.
24883 * object.c: make string interning work across sppdomains.
24884 Mark some functions for use as icalls.
24886 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
24888 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
24890 * reflection.h reflection.c: Allocate long living data using
24891 GC_MALLOC_ATOMIC so the collector does not need to scan it.
24893 * reflection.c: Double the allocation size in streams instead of
24894 increasing it, to prevent unneccesary copying on large assemblies.
24896 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
24897 creation if the assembly does not have the Run flag set.
24899 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24901 * class.h: avoid the C++ keywords in header files (Jerome Laban
24902 spotted and fixed this).
24904 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24907 (mono_unhandled_exception): fill in the arguments for the
24908 UnhandledException event. Only trigger that event for the default
24909 domain (as MS does).
24911 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
24913 * object.c: Improve typed allocation stuff based on suggestions from
24914 Paolo. Also turn it on if the GC library supports it.
24916 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
24918 * object.c object.h class.h: Added experimental typed allocation
24919 facility using the interfaces in gc_gcj.h.
24921 * os/gc_wrapper.h: Added new include files.
24923 2003-04-03 Martin Baulig <martin@ximian.com>
24925 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
24926 which is not yet enabled by default.
24928 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
24930 (mono_gc_lock, mono_gc_unlock): New static functions.
24932 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
24933 functions; stop/start the world for the garbage collector. This
24934 is using the windows API; we need to complete the SuspendThread()/
24935 ResumeThread() implementation in the io-layer to make this work on Unix.
24936 (mono_gc_push_all_stacks): New public function; tells the garbage
24937 collector about the stack pointers from all managed threads.
24939 2003-04-03 Martin Baulig <martin@ximian.com>
24941 * object.h (MonoThread): Added `gpointer stack_ptr'.
24943 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
24945 2003-04-03 Martin Baulig <martin@ximian.com>
24947 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
24949 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
24951 * reflection.c (typebuilder_setup_fields): Initialize field.first and
24954 2003-04-02 Miguel de Icaza <miguel@ximian.com>
24956 * loader.c (mono_lookup_internal_call): Report the corlib that is
24959 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
24961 * icall.c (ves_icall_type_GetTypeCode): fixed check for
24962 System.DBNull (it's class not valuetype).
24964 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24966 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
24967 if the array method was already assigned a token (fixes bug#40646).
24969 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
24971 * reflection.c (mono_reflection_get_type): Attempt type resolve even
24972 if no assembly is given.
24974 2003-04-01 Miguel de Icaza <miguel@ximian.com>
24976 * metadata.h: Added the new tables.
24978 * row-indexes.h: Added definitions for new tables.
24980 * metadata.c: Add schemas for new tables, and add support for
24981 computing the sizes of them.
24983 * class.c: Update for handling the new type cases.
24985 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
24987 * metadata.h (MONO_TYPE_IS_VOID): new macro
24989 2003-03-31 Martin Baulig <martin@ximian.com>
24991 * threads.h (MonoThreadCallbacks): Added `thread_created'.
24993 * threads.c (mono_thread_new_init): Call `thread_created' in the
24994 mono_thread_callbacks.
24996 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
24998 * loader.h: added marshalbyrefobject_class to mono_defaults
24999 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
25000 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
25001 generation of output parameters.
25002 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
25003 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
25004 contextbound and the target object belongs to the context of the caller.
25005 * object.h: added context and unwrapped_server variables in MonoRealProxy.
25006 * object.c: Implemented support for interfaces and abstract classes
25007 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
25008 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
25010 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
25012 * class.h class.c (mono_class_is_subclass_of): New function.
25014 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
25015 routines for most common case (calls from ArrayList::ToArray).
25017 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
25018 routine so programs which call Environment::Exit() can be profiled.
25020 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
25021 Added MONO_ARCH_SAVE_REGS.
25023 * icall.c (ves_icall_type_is_subtype_of): Use new function.
25025 2003-03-29 Miguel de Icaza <miguel@ximian.com>
25027 * blob.h: Add a couple of new MonoType types definitions.
25029 * tabledefs.h: Add a couple of new call convs.
25031 2003-03-27 Zoltan Varga <vargaz@freemail.h>
25033 * reflection.h (MonoReflectionDynamicAssembly): track changes in
25034 the layout of the class.
25036 * reflection.c (alloc_table): double the size on overflow to avoid
25037 unnecessary copying.
25039 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
25040 avoid filling out metadata tables and blobs. Also set mb->ilgen to
25041 null so it can be garbage collected.
25043 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
25045 * reflection.c (mono_reflection_get_type): Return the resolved type
25046 only if it is in the assembly we searched.
25048 * reflection.c (ensure_runtime_vtable): Initialize method slots.
25050 * class.c (mono_class_setup_vtable): Set the slot of the overriding
25053 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25056 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
25057 the right one is 'file:///blah', but MS allows it.
25059 (mono_assembly_open): allow 'file://blah'
25061 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
25063 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
25065 * socket-io.c: fixes bug #40310.
25067 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
25069 * reflection.c (mono_reflection_parse_type): handle deeply nested
25072 * reflection.c (mono_image_create_token): Use unique token values
25073 since they will be put into a hash table.
25075 * class.c (mono_class_setup_vtable): If a method occurs in more than
25076 one place in the vtable, and it gets overriden, then change the
25077 other occurances too.
25079 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
25080 object as return type.
25082 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
25084 * icall.c: Deleted "ToString" implementation for double and float
25085 because they are full implemented in managed code.
25087 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25089 * reflection.c, reflection.h: implemented and exported functions
25090 to retrieve info about custom attributes.
25092 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25094 * appdomain.c: moved Uri handling to assembly.c
25095 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
25096 work when using a file Uri in *nix and windows.
25098 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
25099 GetReferencedAssemblies.
25101 2003-03-18 Dick Porter <dick@ximian.com>
25103 * icall.c: Rename a couple of internal calls
25105 * threads.c: Set the thread state to Stopped when a thread exits.
25108 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
25110 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
25113 * object.c (mono_class_vtable): fix warning.
25115 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
25117 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
25119 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
25121 (method_encode_clauses): Create exception info structures in the right
25123 (mono_reflection_setup_internal_class): Initialize supertypes field.
25125 * class.c object.c: Handle interfaces which implement other interfaces
25128 * class.h class.c: Move the supertypes array initialization code into
25129 a separate function so it can be used for dynamic types too. Also call
25130 it earlier, in mono_class_init(), since it can be used before the
25131 type is initialized.
25133 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25137 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
25142 * object.c: remove warnings.
25144 2003-03-13 Martin Baulig <martin@ximian.com>
25146 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
25147 (MonoDebugLexicalBlockEntry): New types.
25149 * debug-mono-symfile.c
25150 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
25152 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25154 * process.c: ret can be any non-zero value accroding to MS doc.
25156 2003-03-07 Miguel de Icaza <miguel@ximian.com>
25158 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
25159 fixing a warning for a miss-used prototype, would have cause
25160 random memory corruption.
25162 2003-03-07 Martin Baulig <martin@ximian.com>
25164 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
25165 getting really annoying ....
25167 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
25169 * reflection.c (fixup_method): added support for array methods.
25171 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
25173 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
25174 (pointed out by Michael Adams).
25176 2003-03-04 Dick Porter <dick@ximian.com>
25178 * icall.c: Temporarily reverted the Double and Single ToString()
25179 change, because it broke nunit.
25181 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
25183 * object.h, threads.h: make include files compatible with C++
25184 (patch by Jerome Laban <jlaban@wanadoo.fr>).
25186 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
25188 * icall.c: Erased ToString helper functions for Double and Single.
25189 Now, that implementations ar all in managed code (Double and Single
25192 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
25194 * appdomain.c: Added method for initializing the default context of
25195 a domain. Added internal call for getting the default context.
25196 * appdomain.h: Added context variable in MonoDomain struct.
25197 * domain.c: mono_domain_set also sets the default context of the domain
25198 * icall.c: Mapped internal method InternalGetDefaultContext.
25199 * object.c: mono_object_get_virtual_method returns always a remoting
25200 wrapper if the object is a transparent proxy.
25201 mono_runtime_invoke_array: when creating an object by calling the
25202 constructor, if the created object is a proxy, then the constructor should
25203 be called using the a remoting wrapper.
25205 2003-03-03 Dick Porter <dick@ximian.com>
25207 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
25208 variable so it compiles on solaris. Problem spotted by
25209 Christopher Taylor <ct@cs.clemson.edu>
25211 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25214 (get_info_from_assembly_name): don't leak value.
25217 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
25220 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
25222 * assembly.c: export mono_image_load_references ().
25223 * class.c: handle function pointers. mono_class_from_name() now
25224 supports nested type names directly.
25226 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
25228 * reflection.h reflection.c: Encode already created dynamic methods
25229 and fields correctly as a DEF instead of a REF.
25231 * reflection.c: Get rid of the force_ref argument to
25232 mono_image_typedef_or_ref since it was wrong in the first place.
25234 * string-icalls.c: add error checking to string constructors according
25237 * reflection.c: Emit types in the order their TypeBuilders were
25238 created. Previously, a new table index was assigned to each type before
25239 the tables were emitted. This was wrong because the signature blob
25240 might already refer to a type by its original table index.
25242 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
25244 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
25247 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25249 * Makefile.am: make assemblies dir have \ instead of / on windows.
25251 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
25253 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
25254 iterate over the NESTEDCLASS table using a linear search since the
25255 table is not guaranteed to be sorted by the secondary key.
25257 * class.c (mono_class_create_from_typedef): fixed up call to
25258 mono_metadata_nesting_typedef.
25260 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
25262 * marshal.c (mono_string_to_byvalstr): clear the memory as
25263 suggested by Jerome Laban <jlaban@wanadoo.fr>
25265 2003-02-26 Dick Porter <dick@ximian.com>
25267 * process.c: Cope with padding in .rsrc blocks
25269 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
25271 * metadata.h: reverted the filter_len change, it breaks reflection
25273 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
25275 * metadata.h: added a new field to store the filter_len
25278 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
25280 * reflection.c: handle custom attributes for types and members
25281 created with Reflection.Emit (bug#38422).
25283 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
25285 * reflection.c: define RTSpecialName automatically for constructors for
25286 compatibility with MS.NET.
25288 * reflection.c (mono_reflection_create_runtime_class): initialize
25289 nested_in field of dynamically created classes.
25291 2003-02-22 Martin Baulig <martin@ximian.com>
25293 * debug-mono-symfile.h: Incremented version number.
25295 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
25297 * object.h icall.c process.c: fix warnings.
25299 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
25301 * appdomain.h appdomain.c:
25302 (mono_domain_try_type_resolve): split the
25303 name_or_tb argument into a name and a tb argument.
25304 (mono_domain_has_type_resolve): new function to check whenever the
25305 application has registered a TypeResolve event handler.
25307 * icall.c reflection.h reflection.c: move the type resolve logic into
25308 mono_reflection_get_type () so it will be invoked when
25309 Assembly::GetType () is called.
25312 (mono_reflection_get_type): renamed to get_type_internal.
25313 (mono_reflection_get_type): fixed type name generation so it works
25314 for nested types too.
25315 (mono_reflection_get_type): call has_type_resolve () to avoid the
25316 costly type name generation if there is no resolve event handler.
25318 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25320 * class.c, image.c: load exported types from file references.
25322 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
25324 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
25325 used to cache the managed methods used to create proxies and make
25326 remote invocation of methods.
25327 * class.h: Added in MonoVTable a flag to indicate that a class needs
25328 to be remotely created.
25329 * object.c: Modified the method mono_class_vtable(). It now initializes
25330 the remote flag of the vtable. Modified mono_object_new_specific(),
25331 so now it checks the remote flag.
25332 * icall.c: Added a couple of internal methods, one for enabling instance
25333 creation interception for a type, and one for creating objects bypassing
25336 2003-02-18 Martin Baulig <martin@ximian.com>
25338 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
25339 New interncall to get a method's metadata token.
25341 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
25342 New interncall for the debugger.
25344 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
25346 * class.c (mono_class_setup_vtable): allocate supertype array
25348 2003-02-18 Martin Baulig <martin@ximian.com>
25350 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
25352 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25355 (assembly_name_to_aname): jump over unknown properties (i've found
25356 something like: 'type, assembly, version=xxx, custom=null, public...',
25357 so now will ignore custom=null and still get the rest of the values).
25359 2003-02-17 Dick Porter <dick@ximian.com>
25361 * threads.c: Have Thread.Start() wait for a semaphore to signal
25362 that the thread has set up all its local data. This fixes bug
25363 34323, where Abort() raced the new thread's TLS data.
25365 Also removes the handle_store() call from start_wrapper, because
25366 threads are now always created suspended and there is no longer a
25367 race between the parent and child threads to store the info.
25369 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
25371 * image.c: explain the #- heap issue in a message, hopefully
25372 avoiding FAQs on mono-list.
25374 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25377 (GetEntryAssembly): if the domain has not invoked
25378 AppDomain.ExecuteAssembly yet, return the assembly of the default
25381 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
25383 * class.c (mono_ldtoken): make it work in dynamic assemblies.
25385 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
25387 * metadata.c, reflection.c: simple speedup to type hash
25390 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
25392 * image.c, image.h, class.c, assembly.c: move module loading
25393 to MonoImage. When loading metadata, consider alignemnet from
25394 the start of metadata, not from the metadata address in memory.
25396 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
25398 * reflection.c (mono_reflection_get_custom_attrs): Added support for
25399 AssemblyBuilder objects. Factored out custom attribute creation into
25400 a separate function.
25401 (create_custom_attr): new function to create custom attributes.
25403 2003-02-12 Miguel de Icaza <miguel@ximian.com>
25405 * Makefile.am: Got tired of typing the full pathname to pedump.
25406 Until there is another option, am installing this.
25408 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
25410 * class.c (class_compute_field_layout): always set field->parent
25411 (mono_ldtoken): use mono_defaults.fieldhandle_class;
25413 2003-02-11 Dick Porter <dick@ximian.com>
25416 * monitor.c: Rewrote Monitor, making lock much faster and
25417 Pulse/Wait work as specified. Also uses much fewer handles, and only
25418 creates them as needed.
25420 * exception.c: Added SynchronizationLockException
25422 * threads.c: Deleted old Monitor implementation. The new one is
25425 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
25427 * class.c: handled TypedReference type code. Set the correct size for
25428 class data. Setup interface_offsets for interface classes, too.
25430 2003-02-09 Martin Baulig <martin@ximian.com>
25432 * debug-mono-symfile.h: Reflect latest symbol writer changes.
25434 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
25436 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
25437 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
25438 * object.c: fixed mono_object_get_virtual_method () for interfaces.
25439 * verify.c: check for code that runs after the end of the method.
25441 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
25443 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
25444 "System.Math::Round2".
25445 * sysmath.h: Added Floor, Round and Round2 definitions.
25446 * sysmath.c: Modified certain functions that were not 100% compliant
25447 with MS.NET (math precision) and added the implementation of Floor,
25450 2003-02-07 Martin Baulig <martin@ximian.com>
25452 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
25454 2003-02-07 Martin Baulig <martin@ximian.com>
25456 * debug-mono-symfile.c: Reflected latest symwriter changes.
25457 (mono_debug_create_mono_symbol_file): Removed.
25458 (mono_debug_open_mono_symbol_file): Take an argument which
25459 specifies whether to create a dynamic symbol file.
25461 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
25463 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
25465 2003-02-05 Martin Baulig <martin@ximian.com>
25467 * reflection.c (mono_image_build_metadata): Make this public,
25468 protect it against being called multiple times, don't create
25469 resources and don't build the compressed metadata here.
25470 (mono_image_create_pefile): Do this here.
25473 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
25475 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25477 * socket-io.c: fixed bug #36322.
25479 2003-02-06 Piers Haken <piersh@friskit.com>
25483 * debug-mono-symfile.c:
25489 * socket-io.c: warning cleanups
25491 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
25493 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
25494 function. works like remoting invoke, but does a check for the Proxy first.
25496 2003-02-05 Miguel de Icaza <miguel@ximian.com>
25498 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
25500 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
25502 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
25504 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
25505 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
25507 * object.c (mono_store_remote_field_new): used by the new jit
25508 instead of mono_store_remote_field
25509 (mono_load_remote_field_new): used by the new jit
25510 instead of mono_load_remote_field
25512 2003-02-05 Patrik Torstensson
25514 * appdomain.c: changed unload to take the domain id instead
25517 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
25520 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25522 * appdomain.c: don't look for assemblies in ApplicationBase if
25523 PrivateBinPathProbe is set.
25525 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25527 * object.c: make the first argument in main_args contain the absolute
25528 path to the assembly. Fixes bug #37511.
25530 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25532 * icall.c: get correct UTC offset for countries not using daylight
25533 time saving. Fixes bug #30030.
25535 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25537 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
25538 and 1 are the family).
25540 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
25542 * icall.c (ves_icall_InternalExecute): removed wrong assertion
25544 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
25546 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
25548 * reflection.c: added support for SignatureHelper tokens, which is
25549 needed by the Calli opcode.
25551 * reflection.h: track changes to SignatureHelper class.
25553 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
25555 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25557 * appdomain.c: fixed loading assemblies from PrivateBinPath.
25559 2003-02-03 Patrik Torstensson
25560 * appdomain.[c|h], domain.c :
25561 - Added support for getting a domain via domain id
25562 - Support for setting and getting domain from System.AppDomain
25563 (used in cross appdomain channel)
25564 - Added support for get/set for a MonoAppContext on a thread
25565 (Context class in System.Runtime.Remoting.Contexts),
25566 - Removed hack in Get/SetData and ExecuteAssembly.
25568 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
25569 the managed world to get control when a proxy is created.
25571 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
25573 2003-02-03 Miguel de Icaza <miguel@ximian.com>
25576 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
25577 Populate the codebase field as well.
25579 2003-02-02 Martin Baulig <martin@ximian.com>
25581 * debug-mono-symfile.c
25582 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
25583 (mono_debug_symfile_add_method): Allow interncalls.
25585 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25587 * icall.c: throw parse exception if strtod fails or the string is empty.
25589 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
25591 * marshal.c: handle object type separately from defined
25594 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
25596 * marshal.c: handle NATIVE_LPSTR for strings when it's
25597 explicitly specified.
25599 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
25601 * reflection.c, reflection.h, icall.c: setup the reflection
25602 handle cache for ModuleBuilders and AssemblyBuilders.
25604 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
25606 * reflection.c (reflection_methodbuilder_to_mono_method): set
25609 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25611 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
25613 2003-01-29 Dick Porter <dick@ximian.com>
25615 * threads.c: No need for the fake_thread kludge now that Thread
25616 doesn't run a class constructor
25618 2003-01-29 Dick Porter <dick@ximian.com>
25620 * threads.c: Use g_direct_hash instead of the rather bogus
25623 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
25625 * marshal.c (mono_marshal_get_native_wrapper): add check for null
25626 (fix pinvoke12.exe)
25627 (mono_marshal_get_struct_to_ptr): generate valid IL code
25628 (mono_marshal_get_ptr_to_struct): generate valid IL code
25629 (*): correctly set sig->pinvoke, we need to memdup the signature
25632 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25634 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
25635 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
25637 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
25639 * profiler.c: provide more callers information.
25641 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
25643 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
25645 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
25647 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
25649 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25651 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
25652 exception instead of going into an infinite loop on dates which it
25655 * string-icalls.c (ves_icall_System_String_get_Chars): raise
25656 out-of-range exception if needed.
25658 * class.c (mono_class_setup_vtable): allow a virtual method to provide
25659 an implementation for an interface method and to override an inherited
25660 method at the same time.
25661 Imagine a scenario when a virtual method is used to override a
25662 virtual abstract method in a parent class, and this same method
25663 provides an implementation for an method inherited from an interface.
25664 In this case, the interface resolution code will set im->slot, which
25665 means that the virtual method override pass will skip this method
25666 which means a pointer to the abstract method inherited from the parent
25667 will remain in the vtable of this non-abstract class.
25669 * class.c: (mono_class_setup_vtable): continue search for a real
25670 method if only an abstract method is found.
25672 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
25674 * reflection.c: add size to encoding for ByValStr and ByValArray
25675 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
25677 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25679 * class.c (mono_class_setup_vtable): pass the override info as an
25682 * class.c (mono_class_setup_vtable): set the slot of overriding methods
25685 * reflection.c (ensure_runtime_vtable); add support for method
25688 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25690 * reflection.c (resolution_scope_from_image): Hack to work to work with
25691 dynamic assemblies.
25693 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
25694 added a 'force_ref' argument to force this function to allways return
25695 a TypeRef. This is needed by mono_image_get_memberref_token ().
25697 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25699 * reflection.c (mono_image_get_type_info): interfaces really don't have
25702 * reflection.c (mono_image_basic_init): fill out missing fields of
25705 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
25706 dynamic assemblies. This is required so dynamic assemblies show up in
25707 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
25708 Type::GetType() etc. This is consistent with MS behaviour.
25710 * image.c image.h reflection.c: add newly created classes to the name
25711 cache so mono_class_get () will find them.
25713 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25715 First part of changes to get IKVM.NET running under mono.
25717 * appdomain.h, appdomain.c: added new function
25718 mono_domain_try_type_resolve() which will emit TypeResolve events.
25719 This function will call AppDomain::DoTypeResolve to do the actual work.
25721 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
25722 moved existing code dealing with dynamic tokens to a new function
25723 called mono_reflection_lookup_dynamic_token (). This function will
25724 raise TypeResolve events when appropriate. Since reflection.c is not
25725 part of libmetadata, a new hook function called
25726 mono_lookup_dynamic_token() is added to class.c which will call this.
25728 * assembly.h assembly.c: make the invoke_load_hook function public,
25729 so it can be called for dynamic assemblies.
25731 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
25733 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
25736 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
25737 MonoGHashTable, since it contains pointers to objects which the GC
25740 * assembly.c (search_loaded): remove unused variable.
25742 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
25744 * object.c: fixed issue exposed by gcc-generated IL programs
25745 that use RVA data for pointers.
25747 2003-01-25 Martin Baulig <martin@ximian.com>
25749 * threads.c (start_wrapper): Moved the initialization of
25750 `start_func' above the mono_new_thread_init() call to which we
25751 pass it as argument.
25753 2003-01-24 Martin Baulig <martin@ximian.com>
25755 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
25756 the MonoThread pointer.
25758 2003-01-21 Miguel de Icaza <miguel@ximian.com>
25760 * icall.c: Rename `PowImpl' to Pow.
25762 2003-01-23 Dick Porter <dick@ximian.com>
25764 * threads.c (start_wrapper): Create a Thread object if needed, so
25765 the Main() thread can do the class initialisation in a subthread
25766 that has been set up to allow managed code execution.
25768 Pass the thread ID instead of the MonoThread pointer to the thread
25769 start and attach callbacks. This change is required, because the
25770 jit thread start callback must be called _before_ the Thread
25771 object can be created.
25773 (mono_thread_init): Removed much object creation code that is no
25774 longer needed. No managed code is called from here now.
25776 * object.c (mono_runtime_exec_managed_code): Create a subthread
25777 for Main, and call back to the runtime to use it.
25778 Set the exit code when Main exits.
25780 * gc.c: Make sure domain finalisation happens in a subthread.
25781 Re-enable threaded GC, fixing bug 31333 (again).
25783 * environment.c: System.Environment internall calls (so far just
25784 ExitCode is here, the others are still in icall.c)
25786 * appdomain.c (mono_runtime_cleanup): All threads running managed
25787 code should have finished before mono_runtime_cleanup() is
25788 reached, so no need to clean up threads.
25790 2003-01-22 Martin Baulig <martin@ximian.com>
25792 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
25793 `gpointer func' arguments.
25794 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
25795 but added `MonoThread *thread' argument.
25796 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
25798 * threads.c (mono_new_thread_init): Added `gpointer func' argument
25799 and pass it to the mono_thread_start_cb callback.
25800 (mono_install_thread_callbacks): New public function to install a
25801 set of callbacks which are set by the debugger.
25802 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
25804 2003-01-22 Martin Baulig <martin@ximian.com>
25806 * Makefile.am: Install debug-mono-symfile.h.
25808 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
25810 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
25812 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
25814 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
25815 * class.c (mono_ptr_class_get): correctly set access levels of pointers
25816 (mono_array_class_get): correctly set access levels of arrays
25818 2003-01-20 Patrik Torstensson
25819 * image.h (MonoAssemblyName): changed major, minor, build, revision
25820 from signed to unsigned.
25822 2003-01-20 sean kasun <skasun@azstarnet.com>
25824 * reflection.c (load_cattr_value): Now this handles
25825 MONO_TYPE_SZARRAY. Fixes bug #35629
25827 2003-01-20 Miguel de Icaza <miguel@ximian.com>
25829 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
25832 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25834 * decimal.c: fixed bug #26056.
25836 2003-01-17 Martin Baulig <martin@ximian.com>
25838 * gc.c: Raise an ExecutionEngineException instead of using g_error().
25840 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25843 (mono_get_exception_type_initialization): new function.
25845 * object.c: throw a TypeInitializationException when an exception is
25846 thrown invoking the class constructor.
25848 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25850 * reflection.c: fixed attribute reading.
25852 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25855 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
25856 provided, look for the type in the calling assembly and then in
25857 mscorlib; if the assembly name is provided, only try that one.
25859 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
25861 * object.c: register the vtable before there is a chance it's
25862 queried again recursively.
25864 2003-01-13 Duncan Mak <duncan@ximian.com>
25866 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
25869 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
25871 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
25873 2003-01-11 Martin Baulig <martin@ximian.com>
25875 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
25876 this to 20 for the release.
25878 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
25880 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
25882 * loader.c (mono_method_get_marshal_info): bug fix
25884 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
25885 structures with explicit layout
25887 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
25889 * profiler.c: made the output more readable (and sorted).
25890 Added caller information for the allocation profiler.
25892 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
25894 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
25896 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25898 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
25899 to get value types.
25901 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
25903 * object.c, profiler.h, profiler.c, profiler-private.h:
25904 Added object allocation profiler.
25906 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
25908 * reflection.h, reflection.c: handle global methods.
25909 Compress blob entries.
25911 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
25913 * marshal.c: fix compilation.
25915 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
25917 * loader.c (mono_method_get_marshal_info): impl.
25919 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
25921 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25923 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
25924 for reference types.
25926 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
25928 * loader.c: fixed off by one error in loaded parameter names.
25930 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
25932 * marshal.c (mono_marshal_get_icall_wrapper): like
25933 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
25934 instead of a MonoMethod.
25936 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25938 * decimal.c: fixed bug #36537.
25940 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
25942 * marshal.c: throw a missing method exception if a
25943 P/Invoke method is not found.
25945 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
25947 * icall.c: allow a null this for constructors.
25949 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
25951 * icall.c: raise the proper exceptions if the arguments to the
25952 internal Invoke are incorrect.
25954 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
25956 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
25958 2003-01-03 Martin Baulig <martin@ximian.com>
25960 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
25962 2002-12-31 Martin Baulig <martin@ximian.com>
25964 * debug-mono-symfile.c: Completely rewrote the type section.
25965 Instead of using individual malloc()ed fields, we use one big
25966 continuous memory area and offsets into this area.
25967 See the comments in the source code for details.
25969 2002-12-30 Martin Baulig <martin@ximian.com>
25971 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
25973 2002-12-30 Martin Baulig <martin@ximian.com>
25975 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
25976 line number table in this data blob instead of using an external
25979 2002-12-28 Martin Baulig <martin@ximian.com>
25981 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
25983 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
25985 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
25986 as a boxed return type.
25988 2002-12-21 Miguel de Icaza <miguel@ximian.com>
25991 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
25992 g_build_filename to properly get separators on the filename created.
25994 * object.h: Small change, introduce MonoMarshalByRefObject to
25995 track the layout of that structure in the C# universe as we make
25998 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
26000 * object.c: removed assert to allow static fields on interfaces.
26001 * loader.c: a TypeSpec may be used for any type, not just arrays.
26003 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
26005 * class.c, class.h: added mono_class_array_element_size ().
26006 Ignore static methods in interfaces.
26008 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26010 * threads.c: fixed the build under cygwin.
26012 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
26014 * reflection.c: handle nullref constants. Allocate keys for
26015 reflection handles with the GC.
26017 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
26019 * threads.c, threads.h: added mono_thread_get_abort_signal()
26020 to get a suitable signal for thread abort.
26022 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
26024 * metadata.c: fix handling of ExportedType table.
26026 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26028 * icall.c: added WriteWindowsDebugString internal call.
26030 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26032 * reflection.h: added fields to match C# implementation.
26034 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26036 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
26038 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
26040 * gc.h, gc-internal.h: Rename header for GC internal calls to
26041 gc-internal.h from gc.h as to not clash with Boehm GC having its
26042 header installed as <gc.h> in outside include paths.
26043 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
26044 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
26046 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26048 * icall.c: assign minor, build and revision in FillName.
26050 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
26052 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
26053 Added support for running code generated by Reflection.Emit.
26055 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26057 * appdomain.c: check for NULL argument in LoadFrom.
26059 2002-12-10 Dick Porter <dick@ximian.com>
26061 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
26063 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26065 * appdomain.c: fix buglet when building exe file name. Handle full
26066 assembly name (needed after latest changes to AssemblyName).
26068 (mono_image_close): free some hashtables.
26070 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
26072 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
26073 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
26074 on some systems (redhat 7.3)
26076 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
26078 * threads.c: delete the critical section of a sync block,
26079 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
26081 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
26083 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
26085 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26087 * appdomain.[ch]: handle the assembly preload event to try loading the
26088 assemblies using the paths we have in the current domain.
26090 * assembly.[ch]: created an assembly preload hook that is called to try
26091 loading the assembly by other means that the ones provided here.
26093 * domain.c: initialize the domain search path.
26095 From now on, assemblies (TODO: except corlib and System) are loaded
26096 according to these rules when using mono_assembly_load ():
26098 1. It tries to load the assembly from the ApplicationBase
26099 of the current domain appending .dll and .exe (TODO: have to
26100 try loading from name/name.dll and name/name.exe).
26102 2. It tries the search path specified in PrivateBinPath for the
26103 current domain (if any).
26105 3. Previous behavior.
26107 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
26109 * icall.c: implemented GetInterfaceMap() related icall.
26110 * domain.c, loader.h: load MethodInfo in mono_defaults.
26112 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
26114 * gc.c: disable the finalizer thread for now, untill all the issues
26115 with it are resolved.
26117 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
26119 * string-icalls.c: handle embedded nulls in string ctor when the
26120 length is specified.
26122 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
26124 * class.c: look for explicit interface implementation in parent
26127 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
26129 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
26131 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
26133 * gc.c: protect handles with a critical section.
26135 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26138 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
26139 parameters. If no assembly specified, try getting the type from all
26140 the assemblies in the current domain, else, load the assembly and get
26143 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26145 * marshal.c: applied patch from Aleksey Demakov that fixes
26146 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
26148 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26150 * icall.c: fixed get_location.
26152 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
26154 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
26155 declarations to make it work with older gcc.
26157 * loader.c (mono_get_method): set signature->pinvoke for native calls
26159 2002-11-20 Dick Porter <dick@ximian.com>
26161 * threads.c (mono_thread_init): Set the main thread's handle
26163 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
26165 * gc.c: allow compilation without GC support. Changed to match the
26168 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
26170 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
26172 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
26174 * reflection.c: set a public key token on the core assemblies.
26176 2002-11-18 Dick Porter <dick@ximian.com>
26178 * threads.c: Split out some thread initialisation so that other
26179 files can set the start callback function.
26181 * gc.c: Run finalisers in a separate thread, to avoid stack
26182 overflow. Fixes bug 31333.
26184 * appdomain.c: Set up GC finalisation thread.
26188 * domain.c: Use gc.h macros for GC_malloc
26190 2002-11-15 Dick Porter <dick@ximian.com>
26194 * appdomain.c: Removed mono_runtime_init_with_attach(),
26195 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
26196 merging the extra parameter with the existing function. Removed
26197 unneeded code in mono_thread_attach().
26199 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
26201 * image.c (mono_image_loaded_by_guid): a method to get loaded
26203 (load_metadata_ptrs): we store the guid as string.
26205 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
26207 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
26209 * metadata.c (mono_guid_to_string): imported method form Zoltan
26210 Varga (slightly modified)
26212 * assembly.c (mono_assembly_open): load precompiled code
26214 * loader.h (MonoMethod): we store the method token for use in the
26217 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26219 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
26220 the hook function called when an assembly is loaded.
26222 * domain.c: Modified file.
26223 (mono_domain_assembly_load): removed hash table insertion of assemblies.
26227 2002-11-07 Miguel de Icaza <miguel@ximian.com>
26229 * reflection.c: Map PEFileKind to the value expected by the WinNT
26232 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26234 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
26235 Read until the buffer is filled completely.
26237 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26239 * icall.c: implemented MonoType.InternalGetEvent ().
26241 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26243 * appdomain.c: implemented InitAppDomainSetup. Delayed
26244 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
26245 the entry_assembly.
26247 * assembly.c: base_dir is now an absolute path ending with
26250 * icall.c: modified get_location according to the above changes.
26252 * object.c: init AppDomain.SetupInformation for the default domain after
26253 we have the entry assembly.
26255 * domain.c: when unloading a domain, setup = NULL.
26257 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
26259 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
26261 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
26263 * object.h, object.c: introduced mono_object_get_virtual_method ()
26264 to lookup the method invoked on an object when a callvirt is done on
26266 * icall.c: make MethodInfo::Invoke() always do a virtual call.
26268 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26270 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
26271 current domain when loaded an assembly and failed to load it.
26273 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
26275 2002-10-31 Dick Porter <dick@ximian.com>
26279 * file-io.c: Return the error status in a parameter, as the
26280 GetLastError() value has long since been blown away if we try and
26281 look it up in a subsequent internal call invocation. Delete the
26282 GetLastError() internal call, because it's useless.
26284 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
26286 * class.[ch]: added cast_class to fix bug 29517
26288 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
26290 * marshal.c: create valid IL code in the filter clause:
26291 the new JIT is less forgiving:-)
26293 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26295 * icall.c: removed get_property internal call.
26297 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
26299 * appdomain.h domain.c: Added an ID to appdomains.
26301 * threads.c threads.h icall.c: Implement icall
26302 Thread:GetDomainID(), and remove unused icall
26303 CurrentThreadDomain_internal.
26305 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26307 * icall.c: Don't recurse through the base types in GetConstructor.
26310 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
26312 * mempool.h, mempool.c: added mono_mempool_empty() and
26313 mono_mempool_stats().
26315 2002-10-23 Dick Porter <dick@ximian.com>
26319 * icall.c: Added MonoIO.GetFileType internal call
26321 2002-10-17 Dick Porter <dick@ximian.com>
26323 * appdomain.c (mono_runtime_cleanup): Don't signal the async
26324 delegate semaphore before waiting for all threads to finish,
26325 because new threads can also call async delegates. Fixes bug
26328 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
26329 of 3 seconds, in case another async job is queued. (This part is
26330 needed because the bug fix reintroduced the 3s exit lag.) This
26331 makes the mono_runtime_shutdown flag superfluous.
26333 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
26335 * reflection.c: include ehader size in method section headers.
26336 Really check for suplicated modules entries.
26338 2002-10-17 Martin Baulig <martin@gnome.org>
26340 * debug-mono-symfile.c: Added back support for locals.
26342 2002-10-14 Martin Baulig <martin@gnome.org>
26344 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
26347 2002-10-14 Martin Baulig <martin@gnome.org>
26349 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
26350 mono_class_get() instead of looking in the class cache.
26352 2002-10-13 Martin Baulig <martin@gnome.org>
26354 * debug-mono-symfile.c: Set version number to 28, include the
26355 signature in method names.
26357 2002-10-13 Martin Baulig <martin@gnome.org>
26359 * debug-mono-symfile.h: Set version number to 27.
26361 2002-10-11 Martin Baulig <martin@gnome.org>
26363 * gc.c: Don't register/unregister NULL pointers as disappearing links.
26365 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26367 * metadata.c, metadata.h: added helper function to allocate signatures.
26369 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26371 * icall.c: added internal call to get the location of machine.config.
26373 2002-10-08 Martin Baulig <martin@gnome.org>
26375 * debug-mono-symfile.c: Ignore classes with a pending init for the
26378 2002-10-03 Dick Porter <dick@ximian.com>
26380 * threads.c: Freebsd pthread_t is a pointer
26382 2002-10-03 Dick Porter <dick@ximian.com>
26384 * socket-io.c: Implemented GetHostName_internal
26386 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26389 (mono_config_parse_file): don't leak the text.
26391 2002-10-02 Martin Baulig <martin@gnome.org>
26393 * debug-mono-symfile.c: Added support for methods.
26395 2002-10-01 Martin Baulig <martin@gnome.org>
26397 * debug-mono-symfile.c: Don't emit methods and line numbers for
26398 the dynamic symbol file, just write the type table. We can easily
26399 have an external helper program which creates a symbol file for an
26402 2002-10-01 Dick Porter <dick@ximian.com>
26404 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
26405 Only add the handle to the cleanup array when we're about to
26406 launch the thread. Bug 31425 deadlocked when the test was run on
26409 2002-10-01 Martin Baulig <martin@gnome.org>
26411 * debug-mono-symfile.c: Added support for properties.
26413 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26415 * reflection.c: unaligned store fix from Mark Crichton
26416 <crichton@gimp.org>.
26418 2002-09-27 Martin Baulig <martin@gnome.org>
26420 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
26423 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
26425 * assembly.h, assembly.c: use a sane API to hook into the assembly
26426 loading process instead of a useless special-purpouse hack
26427 (ngen needs a hook, too, for example).
26429 2002-09-27 Dick Porter <dick@ximian.com>
26431 * threads.c (mono_thread_init): Call GetCurrentProcess() so
26432 io-layer can set up some process handle info. Not needed on w32,
26433 but doesn't hurt either.
26435 * process.c: Pass the program name in the second parameter to
26436 CreateProcess, so the path is searched. Include the working
26437 directory. Implemented process name, process enumeration, and some
26438 process detail internal calls.
26440 * icall.c: Added internal calls for process lookup, and some
26443 2002-09-26 Martin Baulig <martin@gnome.org>
26445 * assembly.c (mono_install_open_assembly_hook): New global
26446 function to install a function to be invoked each time a new
26447 assembly is loaded.
26448 (mono_assembly_open): Run this callback function if set.
26450 * debug-mono-symfile.c: Put back line numbers for the dynamic
26451 symbol file and also record the .il file as source file. This
26452 allows us to install the temporary symbol file as `file.dbg' just
26453 like a compiler-generated one.
26455 2002-09-26 Nick Zigarovich <nick@chemlab.org>
26457 * Corrected typo in gc.c (BOHEM vs BOEHM).
26459 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26461 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
26462 GetProperties. Also avoid calling g_slist_length in GetProperties and
26465 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26467 * reflection.c: avoid unaligned stores (bug spotted by
26468 Mark Crichton <crichton@gimp.org>).
26470 2002-09-25 Martin Baulig <martin@gnome.org>
26472 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
26473 instead of guint64 for addresses and added prologue/epilogue info.
26475 2002-09-25 Martin Baulig <martin@gnome.org>
26477 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
26478 store line number info. For the dynamic symbol file, we only need
26479 to provide the JIT generated dynamic line number info for the dynamic
26482 2002-09-25 Martin Baulig <martin@gnome.org>
26484 * debug-mono-symfile.h: Incremented version number.
26486 2002-09-24 Martin Baulig <martin@gnome.org>
26488 * class.c (mono_debugger_class_init_func): New global function
26490 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
26493 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
26494 function. This is called via the mono_debugger_class_init_func
26495 hook to add all types to the dynamic type table.
26496 (ves_icall_MonoDebugger_GetType): New interncall to get a class
26497 from its metadata token.
26499 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
26500 New interncall for the debugger.
26502 2002-09-24 Nick Drochak <ndrochak@gol.com>
26504 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
26505 before using it in case it is null.
26507 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26509 * metadata.c: allow custom modifiers in local var signatures
26510 (bug spotted by Zoltan Varga).
26512 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
26514 * class.c: deal with the <Module> class that may have a NULL vtable.
26515 Eliminate warnings.
26517 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26519 * image.c, image.h: more strong name helpers.
26520 * monosn.c: more work: convert pem keys to cryptoapi format.
26522 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
26524 * string-icalls.c: speedup IndexOf.
26526 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26528 * icall.c: updates from Zoltan.2.Varga@nokia.com.
26530 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
26532 * icall.c: cleanup: use mono_object_domain ().
26534 2002-09-23 Martin Baulig <martin@gnome.org>
26536 * debug-mono-symfile.c: Improved type support.
26538 2002-09-22 Martin Baulig <martin@gnome.org>
26540 * debug-mono-symfile.c: Added support for reference types and strings.
26542 2002-09-22 Martin Baulig <martin@gnome.org>
26544 * debug-mono-symfile.c: Started to work on the type table.
26546 2002-09-21 Martin Baulig <martin@gnome.org>
26548 * debug-mono-symfile.c: Largely reworked the symbol table format.
26549 The symbol table is now incrementally updated each time a new
26550 method is added. We're now also using our own magic and version
26551 so that you don't need to recompile all your classes if the
26552 dynamic table changes.
26553 (mono_debug_update_mono_symbol_file): Removed.
26554 (mono_debug_symfile_add_method): New function to add a method.
26556 2002-09-21 Martin Baulig <martin@gnome.org>
26559 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
26562 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
26563 New interncall to get a method from its metadata token.
26565 2002-09-21 Martin Baulig <martin@gnome.org>
26567 * debug-mono-symfile.c: Create type table.
26569 2002-09-20 Martin Baulig <martin@gnome.org>
26571 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
26573 2002-09-20 Martin Baulig <martin@gnome.org>
26575 * debug-mono-symfile.c: Provide information about params and locals.
26577 2002-09-20 Martin Baulig <martin@gnome.org>
26579 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
26582 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
26583 interncall to get a method from its metadata token.
26585 2002-09-20 Martin Baulig <martin@gnome.org>
26587 * debug-mono-symfile.c: Added a few checks for method->header
26588 being non-NULL. This should never happen, but for the moment
26589 let's use a g_warning() rather than a g_assert().
26591 2002-09-19 Mark Crichton <crichton@gimp.org>
26593 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
26594 even if support for it isn't present. Added an #ifdef to fix this.
26596 * socket-io.c: Added checks back for Solaris support.
26598 2002-09-19 Martin Baulig <martin@gnome.org>
26600 * debug-mono-symfile.c (read_string, write_string): Reflect latest
26601 changes in the symbol file format.
26603 2002-09-18 Martin Baulig <martin@gnome.org>
26605 * debug-mono-symfile.c: Set version number to 21.
26607 2002-09-18 Dick Porter <dick@ximian.com>
26609 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
26610 on netbsd. Fixes bug 30051.
26612 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26615 (set_version_from_string): little fix.
26617 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26619 * monosn.c, Makefile.am: added strong name utility.
26620 * reflection.h, reflection.c: implemented delayed signing,
26621 locale, version and hash id assembly attributes.
26623 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26625 * loader.c, metadata.c: load param attributes in signatures.
26627 2002-09-16 Martin Baulig <martin@gnome.org>
26629 * debug-mono-symfile.c: Added string table with all method names.
26631 2002-09-14 Martin Baulig <martin@gnome.org>
26633 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
26634 fast method lookup.
26636 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26638 * reflection.c: record the public key token of referenced assemblies.
26640 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26642 * image.c, image.h: added functions to get the strong name and the
26643 public key of an assembly.
26644 * pedump.c: use them.
26646 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
26648 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
26650 2002-09-12 Miguel de Icaza <miguel@ximian.com>
26652 * marshal.c (mono_marshal_get_managed_wrapper): Added
26655 2002-09-11 Martin Baulig <martin@gnome.org>
26657 * gc.c: Call GC_unregister_disappearing_link() on all links when
26658 finalizing them, this is necessary to aviod a crash in boehm's
26661 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26663 * gc.c: handle GetTarget for finalized objects spotted and fixed by
26666 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
26668 * icall.c: implemented MonoType::Module.
26669 * reflection.c, reflection.h: mono_module_get_object () from
26670 Tomi Pakarinen <tomi.pakarinen@welho.com>.
26672 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
26674 * icall.c: ignore overridden methods in GetMethods ().
26675 Fix for FieldInfo::SetValue().
26676 * object.c: handle float/double in runtime invoke.
26678 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26680 * object.c: allow a constructor to be called again on an object.
26682 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26684 * class.h, class.c: move field layout code to it's own function and
26685 export it. Get an interface id earlier. Move fields in MonoClass
26686 so they are more cache friendly and align the bitfields.
26687 * loader.c: temporary handle get_param_names() for a runtime method.
26688 * reflection.c, reflection.h: more code to handle runtime creation of
26691 2002-09-09 Martin Baulig <martin@gnome.org>
26693 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
26694 signature with the pinvoke field being set for the actual call.
26696 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26698 * icall.c: removed some unused icalls. Start of map of glib charsets
26699 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
26701 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
26703 * debug-helpers.c: break infinite loop (found and fixed by
26704 Holger Arnold <harnold@gmx.de>).
26706 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26708 * icall.c: target may be null in create_delegate.
26710 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26712 * marshal.c: handle a boolean return type.
26714 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26716 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
26718 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
26720 * gc.c: fix weakreferences.
26722 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
26724 * icall.c: added icall to get default codepage.
26726 2002-09-03 Dick Porter <dick@ximian.com>
26729 * threads.c: Use MonoThread instead of MonoObject where
26732 Store running thread objects in a hash table, so that we have all
26733 the info to hand when waiting for them to finish
26734 (means we don't need OpenThread() any more, so mingw builds should
26735 be fully functional again.)
26738 * object.h: Added thread ID to MonoThread
26740 2002-09-03 Martin Baulig <martin@gnome.org>
26742 * icall.c (System.Reflection.Assembly::get_location): New interncall.
26744 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26746 * icall.c: fixed leak in get_temp_path. Thanks lupus.
26748 2002-09-03 Martin Baulig <martin@gnome.org>
26750 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
26751 argument to store the end address of the disassembled instruction.
26753 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
26754 here from debug-symfile.h.
26755 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
26756 JIT into this struct.
26757 (MonoSymbolFile): Added `char *image_file' field.
26758 (MonoDebugGetMethodFunc): Removed.
26759 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
26760 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
26761 (mono_debug_find_method): New method.
26763 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
26764 create a full symbol file.
26765 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
26766 and static symbol files.
26767 (mono_debug_find_method): The symbol file keeps an internal method hash,
26768 call this to get a MonoDebugMethodInfo from a MonoMethod.
26770 * debug-symfile.[ch]: Removed.
26772 2002-08-29 Miguel de Icaza <miguel@ximian.com>
26774 * image.c (do_mono_image_open): Remove linker version check.
26776 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
26778 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
26779 wrappers for instance methods.
26781 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26783 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
26785 2002-08-28 Dick Porter <dick@ximian.com>
26787 * Makefile.am: Export HOST_CC for w32 builds
26789 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26791 * file-io.c process.c: MonoString are null terminated, no
26792 need for mono_string_to_utf16() anymore.
26794 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26796 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
26798 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26800 * icall.c, reflection.h: speedup System.MonoType.
26802 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26804 * reflection.c: allow null as the value of a string argument in
26805 custom attributes constructors.
26807 2002-08-27 Martin Baulig <martin@gnome.org>
26809 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
26810 `trampoline_address' field.
26812 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
26814 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
26815 check (fixes bug #29486)
26817 2002-08-27 Martin Baulig <martin@gnome.org>
26819 * debug-mono-symfile.c: Changed the file format in a way that allows us
26820 open it read-only and to use a specially malloced area for all the
26821 dynamic data. We can now also generate a symbol file on-the-fly if we're
26822 debugging IL code and there is no MCS generated symbol file for it.
26824 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26826 * object.c: added a define for a good string and array
26827 creation speedup (not enabled by default because we need to deal with
26830 2002-08-26 Martin Baulig <martin@gnome.org>
26832 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
26833 function to create a dynamic symbol file. This is used by the
26834 debugger to create a symbol file for IL code on-the-fly.
26836 2002-08-26 Martin Baulig <martin@gnome.org>
26838 * loader.c (mono_lookup_pinvoke_call): Include the error message
26839 from g_module_error() in the error message.
26841 2002-08-24 Martin Baulig <martin@gnome.org>
26843 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
26844 function to update the symbol file. The symbol file is mmap()ed
26845 writable, but private. This allows us to install the symbol file
26846 together with the assembly.
26848 2002-08-24 Martin Baulig <martin@gnome.org>
26850 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
26851 but they can read the new symbol file format which mcs is now creating.
26853 * debug-symfile.c (mono_debug_find_source_location): Moved to
26854 debug-mono-symfile.c; this is now operating on the new symbol file.
26856 2002-08-23 Martin Baulig <martin@gnome.org>
26858 * debug-helpers.c (mono_method_desc_from_method): New function to get
26859 a MonoMethodDesc from a MonoMethod.
26861 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
26863 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
26864 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
26866 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
26868 * string-icalls.[ch]: make helper methods static.
26870 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26872 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
26873 types to it and to SetValueInternal.
26875 * object.c: Moved handle_enum label to its proper place. This was the
26878 This time i compiled mcs and gtk-sharp and they both work.
26880 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26882 * icall.c: reverted partially my previous patch until
26883 object.c:set_value handles enums correcly.
26885 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26888 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
26889 (ves_icall_System_Environment_get_MachineName): removed warning when
26890 compiling under cygwin.
26892 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
26894 * object.c: fixed field_get_value() for reference types.
26896 2002-08-22 Dick Porter <dick@ximian.com>
26898 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
26899 Don't free a buffer while it's still needed. Patch from Jonathan
26900 Liger <Jonathan.liger@wanadoo.fr>
26902 2002-08-21 Miguel de Icaza <miguel@ximian.com>
26904 * icall.c (ves_icall_System_Environment_get_Platform): Add new
26907 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
26909 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
26910 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
26912 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
26913 we call unmanaged code which throws exceptions.
26915 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26917 * appdomain.h: added per-domain entry_assembly.
26918 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
26920 * icall.c: Assembly::GetEntryAssembly icall.
26921 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
26922 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
26924 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
26926 * appdomain.h, gc.c: added mono_domain_finalize ().
26928 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26931 (mono_print_unhandled_exception): changed g_warning by g_printerr
26932 because g_log has a 1024 characters limit (yeah, i got a big stack
26933 trace). Don't print exception name, that should be in ToString
26936 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26938 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
26939 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
26941 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26944 (mono_print_unhandled_exception): after previous commit, i realized
26945 that MS calls ToString on the exception. I changed this function to
26946 do that. This way we get stack_trace for free.
26948 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26951 (mono_print_unhandled_exception): invoke Message property instead of
26952 getting 'message' field from Exception. Don't allocate memory for
26953 'trace' and 'message' if not needed.
26955 2002-08-18 Dick Porter <dick@ximian.com>
26957 * unicode.c: Fix asserts to match Encoder.cs checks
26959 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26961 * marshal.c: fix unaligned store issue and a few wrong
26962 opcode argument types.
26964 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26966 * icall.c: added GetUninitializedObjectInternal internal call.
26968 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
26970 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
26971 to the right domain.
26973 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
26975 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
26977 * class.c (class_compute_field_layout): set blittable to false for Strings
26979 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
26981 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26983 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
26984 first chunk of code to create types at runtime. Code to
26985 handle ReflectedType/DeclaringType. Make reflection handles
26988 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
26990 * class.c: set correct name in arrays.
26992 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
26994 * appdomain.c (mono_domain_transfer_object): make it work with
26995 valuetypes. bug fixes.
26997 2002-08-12 Dick Porter <dick@ximian.com>
26999 * object.h: Rename some parameters to avoid c++ keywords (Patch
27000 from Joseph Wenninger <kde@jowenn.at>)
27002 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
27004 * icall.c: added icall to implement Assembly.GetFile*.
27006 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27008 * reflection.h, reflection.c: code to embed managed resources.
27010 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
27012 * class.c: move all the type size stuff into
27013 class_compute_field_layout().
27015 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27017 * class.c: ensure enums have always the correct instance size.
27018 * unicode.c: remove wrong assert.
27020 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27022 * assembly.c: fix mem corruption issue.
27023 * image.h, image.c: added mono_image_get_resource () to access
27025 * icall.c: implemented Assembly.EntryPoint property and some
27026 Managed Resources related internalcalls.
27029 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27031 * image.c, image.h: impemented mono_image_get_entry_point ().
27032 * appdomain.c: use mono_image_get_entry_point.
27034 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27036 * reflection.c: support the object type argument when loading
27039 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
27041 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
27042 String as return type.
27044 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
27046 * reflection.c: fix encoding of named args for custom attrs to match
27047 the ms implementation. Read them back when instantiating custom
27050 2002-08-02 Radek Doulik <rodo@ximian.com>
27052 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
27053 by Dietmar as quick fix
27054 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
27055 16 as stack size, used on more places as quick fix before Dietmar
27056 will fix it properly
27058 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27060 * object.h, object.c: added accessors for fields and properties.
27062 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27064 * class.c, class.h: made mono_class_get_field_from_name ()
27065 loop on parent types.
27066 Added mono_class_get_property_from_name ().
27068 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27070 * class.c, class.h: move the code to setup the type vtable in its own
27071 function so that it can be reused also for types created at runtime.
27072 Eliminate the "class" identifier from the header file.
27073 * reflection.c: setup the vtable for enums so that we can create
27074 objects for use in SetConstant ().
27076 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
27078 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
27079 instead of the delegate itself as this pointer (bug #28383)
27081 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
27083 * marshal.c (mono_marshal_get_managed_wrapper): added return type
27086 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27088 * loader.c: don't set the pinvoke bit on icalls.
27090 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
27092 * debug-helpers.c (mono_method_full_name): only print a number to
27093 indicate wrapper type (so that the output is more readable in traces).
27095 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
27097 * class.c (mono_class_init): include method override patch from Paolo
27099 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
27101 * icall.c: fixed GetTypeCode().
27103 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
27105 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
27106 use real delegate invoke function to make it work with multicast
27107 delegates (fix bug# 28291).
27109 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27111 * object.c: load constant strings.
27113 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27115 * reflection.c: no magic numbers.
27116 * tabledefs.h: security action enum.
27118 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27120 * assembly.c: fix possible memory corruption.
27122 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
27124 * reflection.h, reflection.c: added support for linking resources.
27125 * verify.c: check we have an updated corlib.
27127 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
27129 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
27131 (mono_marshal_string_array): null terminate unmanaged string arrays.
27132 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
27134 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27136 * icall.c: Type.GetType () can now return also types from the
27139 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
27141 * loader.h, loader.c: stack walking support.
27142 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
27143 GetCallingAssembly.
27145 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
27147 * marshal.c: added optimisations for blittable types
27149 * class.c (mono_array_class_get): do not set blittable attribute on arrays
27150 (mono_class_setup_mono_type): set blittable attribute for single
27153 * marshal.c (mono_string_utf8_to_builder): impl.
27154 (mono_string_builder_to_utf8): impl.
27155 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
27157 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
27159 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
27160 (mono_marshal_get_managed_wrapper): impl. byref types
27162 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27165 (search_method): don't display debug message.
27167 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
27169 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
27171 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
27173 * appdomain.c: set the missing filename when throwing exception.
27175 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
27177 * metadata.c (mono_type_size): code cleanup
27178 (mono_type_stack_size): removed some test code
27180 2002-07-21 Miguel de Icaza <miguel@ximian.com>
27182 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
27183 mono_get_exception_file_not_found now.
27185 * exception.c (mono_exception_from_name_two_strings): New version
27186 that will call a constructor with two string arguments.
27187 (mono_get_exception_file_not_found): New helper routine, used to
27188 report file-not-found errors.
27190 2002-07-20 Dick Porter <dick@ximian.com>
27193 * process.c: Pass file handles to CreateProcess
27197 * file-io.c: Implemented CreatePipe
27199 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
27201 * metadata.c (mono_get_param_info): set alignment for value types
27203 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27205 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
27206 Constify mono_domain_assembly_open().
27207 * loader.c: handle null namespace in icalls.
27209 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
27211 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
27212 (emit_str_to_ptr_conv): marshal object as structs
27214 * metadata.c (mono_type_to_unmanaged): marshal object as structs
27216 * marshal.c (mono_marshal_get_runtime_invoke): support value types
27218 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
27220 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
27221 (mono_marshal_get_native_wrapper): we an now return value types
27223 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27225 * verify.c: more checks implemented.
27227 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
27229 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
27231 (mono_marshal_get_native_wrapper): allow byref arguments
27232 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
27233 impl. PtrToStringXXX methods
27234 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
27235 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
27236 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
27237 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
27238 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
27240 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27242 * reflection.c: fix buglet in parsing an assembly name.
27244 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
27246 * marshal.c (emit_ptr_to_str_conv): first impl.
27248 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
27250 * object.c, class.h: cache the vtable in the class as suggested by
27251 vargaz@freemail.hu (Zoltan Varga).
27253 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27255 * class.h, loader.c: added mono_field_from_token().
27256 * verify.c: first cut of type checking code.
27258 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
27260 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
27262 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
27264 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
27266 (mono_marshal_get_remoting_invoke): impl.
27267 (mono_delegate_begin_invoke): impl.
27268 (mono_mb_emit_save_args): impl.
27269 (mono_delegate_end_invoke): impl.
27270 (mono_marshal_get_delegate_begin_invoke):
27271 (mono_marshal_get_delegate_end_invoke):
27272 (mono_marshal_get_delegate_invoke): generate a special name for
27273 those methods (including the signature) and associate them whith
27274 the delegate class.
27276 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
27279 (mono_reflection_type_from_name): now it has a MonoImage parameter
27280 which is used as the default image to search the type in. If the image
27281 is NULL or getting the type from it fails, it defaults to corlib.
27283 * icall.c: changed 1 call to mono_reflection_type_from_name to match
27286 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27288 * reflection.c: update the parameter table index.
27290 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27292 * domain.c: don't include the mark byte in the string hash.
27294 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27296 * icall.cs: icall for Type.GetTypeCode ().
27297 * verify: a couple of fixes and disabled local initialization checks.
27299 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
27301 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
27303 * debug-helpers.c (mono_method_full_name): print the type of the
27306 * metadata.c (mono_signature_hash): a hash function for signatures
27307 (mono_signature_hash): better hash algorithm
27309 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
27311 * debug-helpers.c (mono_method_full_name): this can now generate
27312 method names with signatures
27314 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
27315 method dont have this pointers.
27317 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
27319 * reflection.c: fixup typebuilder tokens.
27320 * image.c: fix buglet.
27321 * marshal.h: remove whitespace.
27322 * metadata.h, metadata.c: reinstate code that was removed.
27323 * verify.c: handle catch directives and fix another couple of bugs.
27325 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
27327 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
27328 (mono_marshal_get_native_wrapper): make it comp. with the old code
27329 (mono_marshal_get_native_wrapper): support boolean
27330 (mono_marshal_get_managed_wrapper): support more types
27332 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
27334 * class.c (class_compute_field_layout): compute class->blittable attribute.
27336 2002-07-09 Dick Porter <dick@ximian.com>
27338 * threads.c: Make the thread cleaning up cope with threads that
27341 2002-07-08 Radek Doulik <rodo@ximian.com>
27343 * reflection.c (method_encode_code): use non-translated values to
27344 compute finally_start, this fixes exception handling on ppc, yay!
27346 * decimal.h (struct signscale): fix endianess
27348 2002-07-07 Radek Doulik <rodo@ximian.com>
27350 * reflection.c: swap box_val and not val
27352 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
27354 * reflection.c, reflection.h: handle full assembly info in type name.
27355 Handle Type arguments when loading custom attributes.
27356 * icall.c: updated to use new mono_reflection_type_from_name () method.
27358 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27361 (method_from_memberref): also print assembly name when method not found.
27363 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27366 (ves_icall_TypeGetProperties): fixed bug #27473.
27368 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27370 * reflection.c: display image name and token when cannot find the
27371 .ctor for an attribute.
27373 2002-07-05 Martin Baulig <martin@gnome.org>
27375 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
27377 2002-07-04 Dick Porter <dick@ximian.com>
27379 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
27380 compile on mingw. This will cause mingw builds to not wait for
27381 subthreads to terminate after the main thread does. I've lodged a
27382 bug with the mingw developers for them to wrap OpenThread().
27384 2002-07-03 Dick Porter <dick@ximian.com>
27386 * threads.c: Store thread IDs instead of handles, because
27387 GetCurrentThread() returns a pseudohandle and therefore stores
27388 useless values. mono_thread_cleanup() continues checking the
27389 array of threads until it is empty, to cope with subthreads
27390 spawning new threads after the main thread has finished.
27394 * profiler-private.h: Pass the thread ID to thread profiler
27395 functions, instead of a handle
27397 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27399 * verify.c: fixes to make it more usable.
27400 * pedump.c: added --verify code to verify IL code in an assembly.
27402 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27404 * reflection.c: turn errors into warnings to allow compiling corlib.
27406 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
27408 * reflection.c: add special cases to compile corlib.
27410 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27412 * reflection.c: handle properties with only a set method.
27414 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27416 * opcodes.h: add enum with opcodes in opval order.
27418 2002-07-01 Dick Porter <dick@ximian.com>
27421 * object.c (mono_runtime_run_main): Removed unneeded argument
27423 2002-06-28 Martin Baulig <martin@gnome.org>
27425 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
27427 2002-06-27 Dick Porter <dick@ximian.com>
27429 * threads.c: Store the handle in both the parent thread and in the
27430 subthread, to minimise the time between starting a new thread and
27433 2002-06-26 Dick Porter <dick@ximian.com>
27435 * appdomain.c (mono_runtime_cleanup): Close the socket library
27436 after all the threads have finished, not before
27438 2002-06-26 Martin Baulig <martin@gnome.org>
27440 * debug-symfile.c (mono_debug_find_source_location): Added
27441 `guint32 *line_number' argument. If it's not NULL, store the line number
27442 there and return the file name without the line number.
27444 2002-06-25 Dick Porter <dick@ximian.com>
27448 * process.c: Process forking and other support functions
27450 2002-06-25 Dick Porter <dick@ximian.com>
27452 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
27453 things dont happen when the image is closed.
27454 (mono_image_lookup_resource): Walk the resource section looking
27455 for a particular entry
27457 * cil-coff.h: PE resource section decoding
27459 2002-06-25 Dick Porter <dick@ximian.com>
27463 (mono_assembly_foreach): Accessor functions to walk the list of
27465 (mono_assembly_set_main):
27466 (mono_assembly_get_main): Process methods need to know which
27467 assembly is the "main" one
27469 * object.c (mono_runtime_run_main): Record the main assembly
27471 * debug-helpers.c: Fix typo
27473 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
27475 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
27476 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
27478 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27480 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
27482 2002-06-21 Miguel de Icaza <miguel@ximian.com>
27484 * image.c (do_mono_image_open): Initialize reference count,
27485 otherwise we leak the MonoImage.
27487 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
27489 * reflection.c: small tweak to handle self-hosting.
27491 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
27493 * reflection.c: fix type name parse code.
27495 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27497 * reflection.c: break out of the loop.
27498 * image.c: special case corlib.
27500 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27502 * reflection.c: add all the custom attrs at the end to ensure the
27503 ctors have been properly initialized when the attributes are defined
27504 in the current assembly.
27506 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27508 * reflection.c: handle correctly multiple-nested types.
27510 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
27512 * row-indexes.h: fix typos.
27513 * reflection.c: adjust for typos and fix method_def_or_ref
27514 encoding in MethodImpl table.
27516 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27518 * reflection.c: fix entry point patching (thanks Serge!).
27520 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
27522 * verify.c: add check for System.Exception
27524 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27526 * image.c, class.c: minifix for code just c&p'ed.
27527 * reflection.c: warning fix.
27528 * object.h, loader.h, domain.c: load also StringBuilder.
27530 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27532 * marshal.h, marshal.c: some support code to handle complex marshaling.
27534 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27536 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
27537 Better signatures with vtable error dump.
27539 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
27541 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
27543 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
27545 * icall.c (ves_icall_Type_GetField): impl.
27547 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27549 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
27550 to retrieve a marshal description blob for a field or param.
27552 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27554 * reflection.h, reflection.c: change order of nested type emission
27555 to avoid table corruption. The NestedTypes table is sorted.
27556 * icall.c: change order of GetConstructor results to workaround mcs bug.
27558 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27560 * reflection.h, reflection.c: handle field and param marshal
27563 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27565 * icall.c, marshal.c marshal.h: more Marshal class implementation.
27567 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27569 * reflection.c: fix call convention.
27571 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27573 * reflection.h, reflection.c: mono_image_get_memberref_token()
27574 takes a type instead of a class, now. Added
27575 mono_image_get_array_token() to create tokens for the special
27576 multi-dim array methods.
27578 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27580 * assembly.c: handle modules (no assembly table). Split
27581 loading references in its own function.
27582 * class.c: handle moduleref resolution scope.
27583 * image.c, image.h: cache module name in image.
27585 2002-06-07 Martin Baulig <martin@gnome.org>
27587 * reflection.c (mono_image_get_type_info): Only add a class layout entry
27588 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
27590 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27592 * icall.c: more signature fixes that used uint instead of int.
27594 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27596 * reflection.c: fixed signature of field refs.
27598 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27600 * class.c, reflection.c: handle typerefs of nested types
27601 (both on read and when writing files).
27603 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27605 * icall.c: fix method signatures that tried to workaround the previous
27608 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
27610 * debug-helpers.c: fix typo.
27612 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27614 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
27615 rewrote the PE/COFF writing code (our programs are understood by the
27618 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
27620 * gc.c, gc.h, icall.c: weakreference support.
27622 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27624 * Makefile.am, mono-config.c: use $(sysconfdir).
27626 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27628 * icall.c: changed default precision of Double.ToString() to 15.
27629 Fixed memory leak. Unified with Single.ToString.
27631 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
27633 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
27635 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
27637 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
27638 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
27639 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
27642 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27644 * debug-symfile.c, sysmath.c: yet more compilation fixes.
27646 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27648 * reflection.c, socket-io.c: more compilation fixes.
27650 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27652 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
27653 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
27654 unicode.c: warning and compiler compatibility fixes.
27656 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27658 * class.h, metadata.c: fixed warnings/compilation errors.
27660 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27662 * Makefile.am, mono-config.c, mono-config.h: configuration file
27664 * loader.c, loader.h: make Dll mapping configurable at runtime in the
27665 config file. Export methods to insert and lookup mappings.
27667 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
27669 * reflection.c: handle types and boxed objects in custom attr
27672 2002-05-30 Martin Baulig <martin@gnome.org>
27675 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
27677 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
27679 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
27680 to lookup the implmap row for a P/Invoke method.
27681 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
27682 P/Invoke method from the runtime on an as needed basis.
27684 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
27686 * metadata.c (mono_metadata_parse_signature): impl.
27688 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27690 * class.c: handle .pack directive.
27692 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
27694 * object.c: initialize static fields with RVA data.
27696 2002-05-25 Martin Baulig <martin@gnome.org>
27699 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
27701 2002-05-24 Martin Baulig <martin@gnome.org>
27704 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
27705 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
27706 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
27708 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
27710 * object.c: special case string ctros in invoke.
27711 * gc.c: silly whitespace changes.
27713 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
27715 * threadpool.[ch]: impl. a threadpool that can
27716 be used by mint and mono.
27718 2002-05-22 Martin Baulig <martin@gnome.org>
27720 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
27721 The first argument is now a `MonoReflectionModuleBuilder *', the return
27722 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
27723 `methods' field to get the method builder. The `token' argument is the
27726 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
27727 invalid characters instead of g_assert_not_reached()ing. This seems
27728 to be the behaviour of mscorlib.
27730 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
27732 * object.c (mono_runtime_invoke_array): applied patch from Rachel
27733 Hestilow to fix bug #25104
27735 2002-05-21 Martin Baulig <martin@gnome.org>
27737 * debug-symfile.c (mono_debug_find_source_location): New function.
27738 Looks up an IL offset in the line number table and returns the source
27739 location as a string.
27741 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27744 (mono_double_ToStringImpl): changed %f by %g until we have something
27747 2002-05-21 Nick Drochak <ndrochak@gol.com>
27749 * icall.c : Use different name for Math.Pow's icall. Needed to check
27750 parameters first in C#.
27752 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27754 * icall.c, reflection.h: added icall to get info about an event.
27756 2002-05-20 Radek Doulik <rodo@ximian.com>
27758 * object.c (mono_value_box): don't use memcpy for boxing on BIG
27760 (mono_value_box): don't use memcpy for small sizes on
27761 architectures with unaligned access
27763 2002-05-20 Martin Baulig <martin@gnome.org>
27765 * reflection.c (mono_reflection_setup_internal_class): Don't crash
27766 if `tb->parent == NULL'.
27767 (mono_reflection_create_internal_class): New function. This is
27768 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
27771 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
27774 2002-05-19 Martin Baulig <martin@gnome.org>
27776 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
27777 argument to get the length, don't default to the array length.
27779 2002-05-18 Miguel de Icaza <miguel@ximian.com>
27781 * assembly.c (mono_assembly_setrootdir): New function used to
27782 override the MONO_ASSEMBLIES directory.
27784 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27786 * icall.c: ValueType_GetHashCode() initialize local var.
27788 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27790 * reflection.c: sort custom attributes table.
27792 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27794 * reflection.c: support named args in custom attributes (write support).
27796 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
27798 * reflection.c: fix finally position calculation.
27800 2002-05-15 Radek Doulik <rodo@ximian.com>
27802 * reflection.c: fixed endianess at many places
27804 * icall.c (ves_icall_InitializeArray): comment out debug msg
27806 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
27808 * object.c (mono_unhandled_exception): new function to handle
27809 unhandled exceptions.
27810 (mono_unhandled_exception): call the UnhandledException event.
27811 (mono_runtime_delegate_invoke): impl.
27813 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
27815 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
27816 returns the RVA, not the direct pointer to the data. Handle the case
27817 when the class size is fixed.
27819 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
27821 * reflection.c: fix some endianess issues.
27823 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
27825 * object.c (mono_runtime_invoke): is now able to catch exceptions.
27827 * threads.c (mono_thread_init): added a callback which is invoked
27830 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
27832 * icall.c: make GetHashCode return non-negative values.
27834 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
27836 * object.c, icall.c, gc.c: revert to address-based hashcode.
27838 2002-05-13 Miguel de Icaza <miguel@ximian.com>
27840 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
27842 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27844 * icall.c, class.c: special case <Module>.
27846 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
27848 * icall.c: fix bug in GetNow().
27850 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
27852 * object.c (mono_runtime_class_init): make sure that we call all
27853 static class constructors.
27855 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27857 * reflection.c: sort methodsemantics table.
27859 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27861 * reflection.h, reflection.c: honour init locals setting.
27863 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
27865 * icall.c: copied Double ToStringImpl for Single ToStringImpl
27867 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
27869 * reflection.c: support ContructorBuilders in attribute blob creation.
27871 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27873 * reflection.c: some changes to build a binary that can be run
27874 directly in windows.
27876 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
27878 * loader.c: print a big message when an icall can't be found.
27880 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27882 * string-icalls.c: fix bug 24248.
27884 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
27886 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
27887 icall.c, reflection.h: separate assembly loading by pathname and by
27888 assembly name. Use the MONO_PATH env var to search for assemblies.
27890 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27892 * assembly.c, image.h: add some support for assemblies
27893 with multiple modules.
27894 * class.c, class.h: export mono_class_from_typeref().
27895 * loader.c: remove duplicated code and use mono_class_from_typeref(),
27898 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27900 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
27901 documentation says (the ECMA one is correct).
27903 2002-05-02 Dick Porter <dick@ximian.com>
27905 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
27906 Don't name the synchronisation mutex.
27908 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
27911 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
27912 Make the prototypes match.
27913 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
27917 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
27918 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
27919 all systems have tm.tm_zone, so use strftime() with %Z to print
27920 the timezone abreviation into a temp string.
27922 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
27923 rather than mono_array_addr() on a MonoString on Big Endian
27926 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
27928 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
27931 2002-04-30 Dick Porter <dick@ximian.com>
27933 * socket-io.c: Cope with SOCKET being an integer rather than a
27936 * threads.c: Added Thread_free_internal, to deal with thread
27937 handle cleanup. Moved calls to handle_store() and handle_remove()
27938 to start_wrapper(), so each can only be called once. Allocate
27939 synchronisation blocks with GC_malloc(), and use GC finalisation
27940 to close the handles.
27942 * icall.c: added System.Threading.Thread::Thread_free_internal
27944 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27946 * icall.c: support Environment.Exit, CommandLineArgs().
27948 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27950 * object.c, object.h: added mono_runtime_run_main () and
27951 mono_runtime_get_main_args () for use in System.Environment.
27953 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27955 * gc.c: fix thinko, enable actual finalization since the jit is now
27958 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27960 * gc.c, object.c: take into account that an object may be offset wrt the address
27961 returned by GC_malloc().
27963 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
27965 * image.c: handle files without entries in the assembly table (modules).
27967 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
27969 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
27970 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
27971 allowed to be null when it's System.Object class setup.
27973 2002-04-27 Martin Baulig <martin@gnome.org>
27975 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
27976 if `tb->parent == NULL' rather than crashing.
27978 2002-04-28 Nick Drochak <ndrochak@gol.com>
27980 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
27981 calling acos() where asin() should have been called.
27983 2002-04-26 Martin Baulig <martin@gnome.org>
27985 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
27986 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
27987 there's a subdirectory called `System', but we don't want to read that
27988 subdirectory as an assembly.
27990 2002-04-25 Martin Baulig <martin@gnome.org>
27992 * debug-symfile.c: Reflect latest MonoString changes.
27994 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27996 * rand.c, rand.h: instance method icalls need to have an explicit
27997 this pointer as first argument in the C implementation.
27999 2002-04-25 Nick Drochak <ndrochak@gol.com>
28001 * icall.c: Fix typo in map for GetNonZeroBytes
28003 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
28005 * string-icalls.c : String does now passes unit tests without any
28006 errors, the following changes has been made:
28008 Implemented replace methods.
28009 Renaming of methods to (try) follow the standard.
28010 Fixed compare ordinal
28011 Made all memory allocated directly to function instead of via icall function.
28012 Small performance fix in is_in_array function
28014 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
28016 c (mono_string_Internal_ctor_charp_int_int):
28017 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
28018 sindex < 0, throw ArgumentOutOfRangeException instead of
28019 ArgumentNullException.
28021 Added new check for length == 0, however
28022 I need to make it return String.Empty from the C code.
28024 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
28025 that calculate the length for us here.
28027 (mono_string_Internal_ctor_sbytep_int_int): Replaced
28028 mono_string_new_utf16 with mono_string_new, since value is utf8.
28030 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28032 * object.c: register the object for finalization if needed.
28033 Allocate one more char in the string for the terminating 0 char.
28035 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28037 * class.c, class.h, image.c: check if a type implemenst a destructor.
28038 Use the proper key for array class lookups.
28039 * icall.c: register the icalls in the System.GC class.
28040 * gc.c, gc.h: GC-related functions and icalls.
28042 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28046 * unicode.c: free some strings gotten from mono_string_to_utf8 and
28047 changed a couple of free () by g_free ().
28049 * decimal.c: one-liner in the comments for decimal2string ().
28051 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
28053 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
28055 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
28057 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
28058 * object.c (mono_runtime_invoke_array) : handle null in params
28060 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
28062 * string-icalls.c: fixed bug in split (one off bug)
28064 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
28066 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
28067 * icalls.c: added String::Equals as internal method
28069 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
28071 * threads.c: fixed bug in the double interlocked functions
28073 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
28075 * threads.c: implemented all of the new interlocked icalls.
28076 * string-icalls.c: fix a bug in insert.
28077 * icalls.c: added the icalls for interlocked, removed old string functions.
28079 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
28081 * loader.c: fix off-by-one error when reading argument names.
28083 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28085 * profiler.c: win32 counter implementation (untested).
28086 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
28087 (the latter needs testing and more complete impl. from win32 folks).
28089 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
28091 * object.c: mono_array_new_full workaround mono_array_class_get
28094 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
28096 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
28097 * object.h (mono_string_chars): Changed casting type.
28099 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
28101 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
28102 method signatures to use gunichar2 instead of gint16.
28104 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
28106 * object.h, object.c: domain-specific versions of mono_object_new and
28109 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
28111 * object.c: changed String layout
28113 * string-icalls.c (mono_string_Internal_ctor_chara): added
28114 internal string constructors.
28116 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
28118 * threads.c: pass 'this' to the thread start routine.
28120 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28122 * string-icalls.c: fix IndexOf and LastIndexOf. Now
28123 InternalCompareStr don't call twice mono_string_cmp_char for the last
28124 character. Improved performance in mono_string_cmp_char.
28126 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
28128 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
28129 code into its own library: libmonoruntime.
28131 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
28133 * object.h, object.c: changed array format so that szarrays do not
28134 require a bounds structure.
28135 * icall.c, appdomain.c: support for new szarray format.
28137 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
28139 * metadata.c: compare also the retuns type when comparing signatures:
28140 we didn't do this as an optimization since really overloaded methods
28141 must differ also in the arguments, but this doesn't work with
28142 low-level IL code (or when using explicit conversion operators: see
28143 bug#23498 for an example).
28145 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
28147 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
28149 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
28151 * icall.c: make MonoType::GetElementType its own icall.
28153 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
28155 * icall.c: remove MonoMethod_get_Name().
28156 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
28159 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
28161 * string-icalls.c: optimized a few methods.
28163 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
28165 * icall.c: added all new string internal calls
28166 * string-icalls.c: added, new string internal call implementation.
28167 * object.c: added mono_string_new_size for allocating a string a size
28169 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
28171 * object.c (mono_object_isinst): use the same code as in the
28172 optimized x86 version.
28174 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
28176 * profiler.c: TSC-based timer code (faster and more accurate).
28177 Not hooked up in configure, yet (set USE_X86TSC to 1).
28179 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
28181 * profiler.c, profiler.h: track time spent compiling methods.
28182 * threads.c: track thread creation/destruction.
28184 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
28186 * profiler.c, profiler.h, profiler-private.h: profiling interface
28187 and sample implementation. Moved here so that it can be used also by
28190 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
28192 * reflection.c, reflection.h: keep types and other handles separate in
28193 the hash tables for referred tokens. Add guid for modules.
28195 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
28197 * assembly.c: fix bugs found with valgrind.
28198 * metadata.h, metadata.c: added mono_metadata_guid_heap().
28200 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
28202 * threads: added icall support for getting current domain for
28205 2002-04-13 Martin Baulig <martin@gnome.org>
28207 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
28208 (MonoDebugVarInfo): Added `index' field for register based addresses.
28209 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
28210 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
28211 `MonoDebugVarInfo *params' and `guint32 this_offset' with
28212 `MonoDebugVarInfo *this_var'.
28214 * debug-symfile.c (relocate_variable): New static function to write
28215 a location description for a local variable or method parameter.
28217 2002-04-12 Martin Baulig <martin@gnome.org>
28219 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
28220 stack offset and begin/end scope address of a local variable.
28221 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
28222 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
28223 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
28225 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
28226 Added new relocation types for start/end scope of a local variable.
28228 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28230 * object.h: add mono_object_domain() macro.
28231 * reflection.c: handle typespecs.
28232 * icall.c: MonoMethod::get_Name() implementation.
28234 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28236 * icall.c: String::GetHashCode() icall implementation.
28238 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28240 * icall.c: String::IndexOfAny icall.
28241 * object.c, object.h: make array->max_length more useful.
28242 Intrduced mono_object_class() and mono_string_length() macros.
28244 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28246 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
28247 instead of g_unichar_isdigit.
28249 2002-04-11 Nick Drochak <ndrochak@gol.com>
28251 * icall.c: Implement a simple Double.ToString().
28253 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
28255 * appdomain.h: only io-layer.h is supposed to be included.
28256 * icall.c: explicitly import environ. Fix warning.
28258 2002-04-10 Nick Drochak <ndrochak@gol.com>
28260 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
28261 return true even if it's not Daylight Savings time.
28262 Only return false for the case where the function isn't
28263 implemented for a plaform (read Windows).
28265 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28267 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
28270 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
28272 * mempool.c (mono_mempool_alloc): only use g_malloc when
28273 absolutely necessary.
28275 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
28277 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
28279 * class.c (mono_class_vtable): use domain mempool to allocate vtable
28280 (mono_class_proxy_vtable): use domain mempool
28282 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
28284 * appdomain.h, appdomain.c: split initialization that requires the
28285 execution engine support into mono_runtime_init().
28287 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
28289 * class.c (mono_class_init): don't include vtable inside MonoClass
28290 to save some memory, gather some statistics.
28291 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
28293 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28295 * icall.c: internalcall implementation for ValueType.Equals().
28297 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
28299 * object.c (mono_message_init): moved
28300 (mono_runtime_exec_main): new arch. independent impl.
28301 (mono_runtime_invoke_array): new method - like
28302 mono_runtime_invoke, but you can pass an array of objects.
28303 (mono_remoting_invoke): new arch. independent impl.
28304 (mono_message_invoke): new arch. independent impl.
28305 (mono_runtime_class_init): new arch. independent impl.
28306 (mono_runtime_object_init): new arch. independent impl.
28308 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28310 * metadata.c, object.c, reflection.c: documented the exported
28313 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
28315 * icall.c: simpler code to pass the assembly builder data to corlib.
28316 Implement GetNestedTypes() internalcall.
28318 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28320 * class.c: warn if a type can't be loaded.
28322 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
28324 * image.h: typedef MonoImageOpenStatus
28325 * types.h: removed unused file
28327 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
28329 * icall.c: Enum_ToObject accepts enum value arguments.
28331 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
28333 * class.c: move initialization of properties, events and nested
28334 classes, so that they happen for interfaces, too.
28336 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
28338 * icall.c: cleanup some ugly casts in Array_SetValue*.
28340 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
28342 * icall.c: the values array fro enums is of the correct type, now.
28343 Implement (correctly) getFullName instead of assQualifiedName for
28345 * reflection.h, reflection.c: added mono_type_get_name ().
28347 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
28349 * assembly.c, image.h: for each MonoImage, record from wich assembly
28351 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
28352 Make Type.Assembly work.
28354 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
28356 * debug-symfile.h: use char* instead of gpointer to avoid
28359 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
28361 * icall.c (ves_icall_InternalExecute): impl. FielSetter
28362 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
28364 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
28366 * icall.c (mono_message_init): impl. (code cleanup)
28367 (ves_icall_InternalExecute): impl. FieldGetter
28369 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
28370 defined we call all (non-static)methods through the vtable.
28372 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
28374 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
28375 finalizer even though the memory is still referenced (and the chunk of
28376 memory is not freed).
28378 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
28380 * assembly.c: fix brokeness.
28382 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
28384 * class.c: kill some warnings. Check explicit interface method
28385 implementation also without considering the namespace.
28386 Load also literal strings in static class data.
28388 2002-03-29 Miguel de Icaza <miguel@ximian.com>
28390 * assembly.c (default_assembly_name_resolver): Kill memory leak.
28391 (default_assembly_name_resolver): Make the resolver take the
28392 "base" directory where the assembly was originally defined, so we
28393 can load DLLs that are in the same directory as the assembly that
28394 is being referenced.
28396 2002-03-28 Dick Porter <dick@ximian.com>
28402 * unicode.c: Warning cleanups
28404 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
28406 * object.h, reflection.h: use the correct type instead of MonoObject.
28408 2002-03-28 Martin Baulig <martin@gnome.org>
28410 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
28411 (mono_debug_update_symbol_file): Initialize classes if necessary.
28413 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
28415 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
28416 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
28418 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
28420 * assembly.h: fix function prototype.
28421 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
28422 * mono-endian.h: use const cast.
28424 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
28426 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
28428 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
28430 * loader.c: don't assert when a typeref can't be loaded, give
28431 a chance to the runtime to trow an exception instead.
28432 * loader.h: fix warning.
28434 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
28436 * class.c (mono_class_proxy_vtable): added proxy support
28438 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
28440 * icall.c: removed last of PAL calls, added System.Environment
28441 * file-io.h, file-io.c: MonoIO implementation
28442 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
28444 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
28446 * appdomain.c: do not use the byte marker in ldstr table lookup.
28447 * debug-helpers.c: allow two ':' to separate class and method name.
28448 * object.c: allocate arrays bounds with the GC, too.
28449 * verify: add a few more checks.
28451 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
28453 * reflection.c: output also literal strings. Allocate parameter data
28454 with GC_malloc() (thanks, Martin, for catching this!).
28456 2002-03-26 Martin Baulig <martin@gnome.org>
28458 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
28459 include the `this' offset in the `param_offsets'.
28461 2002-03-25 Martin Baulig <martin@gnome.org>
28463 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
28464 mono_debug_get_class() function to get the classes. Added new
28465 relocation types for arrays and strings.
28466 (mono_debug_get_class): New static function to search in all
28467 referenced assemblies for a metadata token.
28469 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
28471 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
28473 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
28474 hold gc-allocated objects. Make the string heap a stream like the
28475 others. Removed duplicated code when writing stream info.
28476 Added asserts to catch possible buffer overflows. Set the sorted map
28477 for tables that need sorting. Added some documentation.
28479 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
28481 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
28482 for interned strings and vtables.
28484 2002-03-24 Martin Baulig <martin@gnome.org>
28486 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
28487 it in the array since it was created with g_slist_prepend().
28489 2002-03-24 Martin Baulig <martin@gnome.org>
28491 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
28492 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
28493 (mono_debug_method_from_token): Renamed to
28494 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
28495 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
28497 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
28500 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
28502 2002-03-24 Martin Baulig <martin@gnome.org>
28504 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
28505 (mono_debug_method_from_token): New func.
28507 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
28508 New interncall, calls mono_debug_local_type_from_signature().
28509 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
28510 calls mono_debug_method_from_token().
28512 2002-03-23 Martin Baulig <martin@gnome.org>
28514 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
28515 specifies the number of bytes to be converted, not the array size.
28516 Return the number of chars, not the number of bytes.
28517 (ves_icall_iconv_get_chars): The `byteCount' argument
28518 specifies the number of bytes to be converted, not the array size.
28520 2002-03-23 Martin Baulig <martin@gnome.org>
28522 * reflection.h (MonoReflectionSigHelper): New type.
28524 * reflection.c (mono_reflection_sighelper_get_signature_local),
28525 (mono_reflection_sighelper_get_signature_local): New functions.
28527 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
28528 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
28531 2002-03-23 Martin Baulig <martin@gnome.org>
28533 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
28534 is_writeable is set.
28535 (mono_raw_buffer_update): New function to write the modified map
28538 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
28540 * debug-symfile.c (mono_debug_update_symbol_file): Call
28541 mono_raw_buffer_update() when done writing.
28543 2002-03-23 Martin Baulig <martin@gnome.org>
28545 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
28547 * debug-symfile.c: Added support for arguments and local variables.
28549 2002-03-23 Dick Porter <dick@ximian.com>
28551 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
28552 protected by ifdefs, hence breaking the w32 build.
28554 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28556 * object.c: implement is_interned() the right way.
28558 2002-03-21 Martin Baulig <martin@gnome.org>
28560 * debug-symfile.[ch]: New files to handle debugging information
28561 files. There's also support to dynamically update these symbol
28562 files to include machine dependent information.
28564 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
28566 * threads.c (mono_thread_create): new function to create thread
28569 2002-03-20 Martin Baulig <martin@gnome.org>
28571 * icall.c (ves_icall_InternalInvoke): Create a new object if the
28572 method is a constructor.
28573 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
28574 points to ves_icall_InternalInvoke().
28576 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
28578 * file-io.c: Flush shouldn't throw exceptions.
28580 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
28582 * file-io.c: FileStream flush support; FileSetLength now
28583 restores file pointer.
28585 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
28587 * class.c: set image for pointer classes.
28589 2002/03/19 Nick Drochak <ndrochak@gol.com>
28591 * sysmath.c: Forgot one.
28593 2002-03-18 Miguel de Icaza <miguel@ximian.com>
28595 * sysmath.c: Avoid redefining existing names.
28597 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
28599 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
28600 handled by runtime as icall rather than dllimport from libm.so
28601 * file-io.c, file-io.h: fixed handle argument type.
28603 2002-03-18 Dick Porter <dick@ximian.com>
28605 * reflection.c (mono_image_get_type_info): rename interface to
28606 iface, because of "#define interface struct" on windows.
28608 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
28610 * class.c, class.h: rename and export mono_ptr_class_get().
28611 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
28612 * reflection.c, reflection.h, icall.c: better/saner type name
28613 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
28616 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
28618 * class.c (mono_class_init): removed hardcoded GHC_SLOT
28620 * icall.c (ves_icall_InternalInvoke): impl.
28622 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
28624 * reflection.c: output the interface map table, too.
28626 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
28628 * class.c (class_compute_field_layout): separate computation of
28629 static field layout
28631 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
28633 * icall.c: added System.Buffer support.
28634 * file-io.c: moved file icalls from PAL to FileStream.
28636 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
28638 * icall.c (ves_icall_System_Object_GetHashCode): impl.
28640 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
28642 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
28644 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
28646 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
28648 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28650 * debug-helpers.{c,h}: moved here from monograph some useful functions
28651 to locate a method by name/signature in a class or image. Included
28652 also a small and flexible IL disassembler.
28654 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28656 * reflection.c: fixup tokens in methods with small header size, too.
28658 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
28660 * object.c (mono_string_to_utf8): remove assert(!error), instead
28663 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
28665 * icall.c: update to the new mono_Array_class_get interface.
28667 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
28669 * appdomain.c, object.c: Boehm-GC enable.
28670 * icall.c: make get_data_chunk() support split data requests.
28671 Ensure a class is initialized in more cases. Return only the first
28672 property found in GetProperties() or the compiler gets confused.
28673 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
28674 * reflection.h, reflection.c: add fixup mechanism for field and method
28675 tokens. Initialize assembly->typeref in a single place. Output
28676 properties after events. Support custom attributes for events, too.
28677 Typo fix for paramter custom attrs.
28679 2002-03-07 Martin Baulig <martin@gnome.org>
28681 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
28683 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
28685 * class.c (mono_array_class_get): fix. for multi. dim. arrays
28687 2002-03-06 Martin Baulig <martin@gnome.org>
28689 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
28690 non-zero lower bounds. See testcases #F10-#F13.
28692 2002-03-05 Martin Baulig <martin@gnome.org>
28694 * exception.c (mono_get_exception_argument_out_of_range): New exception.
28696 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
28697 ves_icall_System_Array_GetValue(), only calculate the absolute array position
28699 (ves_icall_System_Array_SetValue): Likewise.
28700 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
28701 as argument and does the actual work. This function is used when copying a
28702 multi-dimensional array.
28703 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
28704 now do all the widening conversions of value types.
28705 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
28707 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28709 * class.c: remove some magic numbers and use the smbolic names,
28710 instead. Added init_events() to load event info at class init time.
28711 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
28712 and mono_metadata_methods_from_event().
28713 * reflection.h, reflection.c: added support for writing out the evnets
28714 related information.
28716 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
28718 * reflection.h, icall.c: use a different method (GetInterfaces)
28719 to gather interface info and add isbyref, isprimitive and
28720 ispointer to the ves_icall_get_type_info() return value.
28722 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
28724 * class.h: stared adding support for events.
28725 * icall.c: split find_members implementation. Added debug icall to get
28726 the address of an object.
28727 * reflection.c: handle TypeBuilders in mono_type_get_object().
28729 2002-03-01 Martin Baulig <martin@gnome.org>
28731 * icall.c (ves_icall_System_Array_GetLength): This must throw an
28732 ArgumentOutOfRangeException(), not an ArgumentException().
28733 (ves_icall_System_Array_GetLowerBound): Likewise.
28734 (ves_icall_System_Array_GetValue): Improved argument checking.
28735 (ves_icall_System_Array_SetValue): Improved argument checking.
28737 2002-03-01 Martin Baulig <martin@gnome.org>
28739 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
28740 called with invalid arguments rather than just dying with g_assert().
28741 (ves_icall_System_Array_SetValue): Likewise.
28742 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
28743 raise a NotImplementedException instead.
28744 (ves_icall_System_Array_GetLength): Added argument checking.
28745 (ves_icall_System_Array_GetLowerBound): Added argument checking.
28747 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
28749 * object.h (mono_assert): new macros mono_assert and
28750 mono_assert_not_reached
28752 2002-02-28 Martin Baulig <martin@gnome.org>
28754 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
28755 and "System::String::IsInterned" to "System::String::_IsInterned".
28757 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
28759 * icall.c: remove hacks for typebuilder. Added icall to create a
28760 modified type from a tybebuilder.
28761 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
28762 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
28763 to create a backing MonoClass for a TypeBuilder.
28765 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
28767 * class.c, class.h: more refactoring of class init.
28768 Export mono_class_setup_mono_type() and mono_class_setup_parent().
28770 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
28772 * marshal.c, marshal.h: start of marshaling interface.
28774 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
28776 * icall.c: fix order in assembly qualified name icall.
28778 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
28780 * class.c: do not free str, since we store it in the hash table.
28781 * reflection.h: add label field to MonoILExceptionInfo.
28782 * reflection.c: handle references to more than one assembly. Handle
28783 case when there isn't a module created in the assembly.
28785 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
28787 * class.c: Fix typo. Start refactoring of class init code.
28789 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
28791 * appdomain.c: exit with 1 on error.
28792 * class.c: we already have the name in MonoClassField.
28793 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
28794 MonoStreamHeader instead of an offset of image->raw_metadata.
28796 2002-02-26 Miguel de Icaza <miguel@ximian.com>
28798 * appdomain.c (mono_init): Be even more descriptive about the error.
28800 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
28802 * appdomain.c: give the user an informative message when corlib can't
28805 2002-02-26 Martin Baulig <martin@gnome.org>
28807 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
28808 New icall to get the time zone data.
28810 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
28812 * reflection.c: set virtual and raw size of section correctly.
28813 * threads.c: transfer domain information to newly created threads.
28815 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
28817 * class.c: when instancing a class in a domain, load the default
28818 vaules for static fields from the constant table. Fix System.Enum to
28820 * icall.c: implement Object::GetType() internalcall. Implemented
28821 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
28822 Fixed checking of binding flags in find_members().
28823 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
28824 * reflection.c: handle enumerations when writing to the constant
28825 table. Use a different object cache for types.
28828 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
28830 * object.c (mono_object_isinst): fix for arrays
28832 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
28834 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
28836 * object.c: don't use mprotect () and fix intern pool hash table
28837 lookup for big endian systems.
28839 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28841 * icall.c: change type_is_subtype_of () signature.
28843 2002-02-21 Mark Crichton <crichton@gimp.org>
28845 * rand.c, rand.h: Added random number generator for
28846 System.Security.Cryptography classes.
28848 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
28850 * icall.c: Added System.Security.Cryptography calls.
28852 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
28854 * class.c, icall.c, metadata.c: better support for pointer types.
28855 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
28856 * reflection.c: Add support for getting custom attrs for properties
28857 and simplify some code.
28859 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28861 * icall.c: change getToken () and add custom attribute GetBlob()helper
28863 * reflection.h: add custom attrs array to the reflection builder structures.
28864 * reflection.c: encode and emit custom attributes for all the relevant
28865 reflection objects. Cache fieldref and methodref tokens. Change
28866 mono_image_create_token() interface to take a MonoDynamicAssembly.
28867 More complete custom attributes decoder. Load custom attributes for
28868 Assembly, Field, Method and Constructor objects, too. Make the
28869 returned array an Attribute[] one, not object[]. Added
28870 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
28871 custom attribute constructor.
28873 2002-02-20 Dick Porter <dick@ximian.com>
28877 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
28878 problem code out for now).
28880 2002-02-19 Radek Doulik <rodo@ximian.com>
28882 * object.c (mono_ldstr): use hash table to avoid multiple swapping
28884 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
28886 * icall.c: register the GetCustomAttributes method.
28887 * object.c, object.h: add mono_string_new_len ().
28888 * reflection.h, reflection.c: added mono_runtime_invoke(),
28889 mono_install_runtime_invoke(). Added
28890 mono_reflection_get_custom_attrs () to load custom attributes and
28891 create the attribute objects.
28893 2002-02-19 Dick Porter <dick@ximian.com>
28894 * threads-dummy-types.c:
28895 * threads-dummy-types.h:
28898 * threads-pthread-types.c:
28899 * threads-pthread-types.h:
28900 * threads-pthread.c:
28901 * threads-pthread.h: Deleted obsolete files
28903 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
28905 * class.c (mono_class_vtable): runtime init the class when we
28906 allocate static class data.
28908 * icall.c (ves_icall_System_Array_SetValue): check for null values.
28910 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
28911 and String - but we will need generic marshalling support in the
28913 (mono_init): set the domain name in a ms compatible way
28915 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
28918 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
28920 * object.c (mono_array_clone): use alloca() instead of g_malloc
28923 * appdomain.c (mono_domain_unload): impl.
28925 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
28927 * appdomain.c, object.c: fix intern pool implementation.
28928 * class.c: fix alignment code.
28930 2002-02-16 Radek Doulik <rodo@ximian.com>
28932 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
28933 and s2 > s1, just copy lower bytes to be compatible with little
28934 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
28935 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
28937 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
28938 force big_endian to be 1 for big endian machines
28939 (ves_icall_iconv_new_decoder): ditto
28941 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
28943 * socket-io.c (convert_sockopt_level_and_name): If the system
28944 doesn't define SOL_IP or SOL_TCP, get them by hand using
28945 getprotobyname() and caching the values (because this could be a
28947 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
28948 Use the appropriate struct when the system does support it. Ie,
28949 not all systems have struct ip_mreqn so use struct ip_mreq when
28952 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
28954 * reflection.c: handle finally clauses.
28956 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
28958 * socket-io.c: use g_snprintf() instead of snprintf.
28960 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
28962 * reflection.c (mono_param_get_objects): Cast second argument to
28963 mono_method_get_param_names to a const char** to silence the
28966 * appdomain.c (mono_domain_assembly_open): Put parens around the
28967 truth statement in the for-loop.
28969 * unicode.c (iconv_convert): Got rid of a compiler warning about
28970 int i being unused when the system has a new iconv.
28971 (iconv_get_length): Same.
28973 * image.c (load_class_names): Cast the second argument to
28974 g_hash_table_insert() to char* to hush compiler warnings about the
28976 (mono_image_open): Same here.
28978 * socket-io.c: Don't conditionally include sys/filio.h or
28979 sys/sockio.h here anymore since we now get them from
28980 io-layer/io-layer.h
28981 (inet_pton): If the system doesn't support inet_aton, implement
28982 using inet_addr and also #define INADDR_NONE if it isn't defined
28985 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
28987 * metadata.c, metadata.h: added function to get packing and size info
28989 * reflection.h, reflection.c: handle field RVA data. Save info about
28990 the table layout if needed. Assign typedef indexes to all the types
28991 before dumping the info about them to avoid forward reference problems.
28993 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
28995 * socket-io.c (convert_sockopt_level_and_name): ifdef
28996 SO_ACCEPTCONN because it is not defined on my system (old debian)
28998 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
29000 * opcode.c: use stddef.h to get NULL.
29002 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
29004 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
29005 for FIONBIO, FIONREAD and SIOCATMARK.
29006 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
29007 define INADDR_NONE and besides, inet_addr() is deprecated and
29008 should not be used. Use inet_pton() instead - it also has the
29009 added bonus that it can easily handle IPv6 addresses as well.
29010 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
29012 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
29014 * decimal.c: remove _MSC_VER conditional.
29016 2002-02-13 Dick Porter <dick@ximian.com>
29019 * icall.c: Internal calls for Blocking, Select, Shutdown,
29020 GetSocketOption and SetSocketOption
29022 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29024 * assembly.cs: better resolver: use it instead of some kludgy
29027 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
29029 * reflection.c: the best way to speed-up the compiler is to avoid
29032 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
29034 * class.c (mono_class_vtable): changed the object layout
29035 (obj->vtable->class).
29036 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
29038 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29040 * assembly.c: look for assemblies in the assembly dir, too.
29042 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29044 * class.c: fix thinko in mono_class_from_type().
29046 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29048 * exception.h, exception.c: added TypeLoadException.
29049 * object.h, object.c: added mono_array_clone ().
29050 * icall.c: handle throwOnError in AssemblyGetType().
29051 Added Array.Clone().
29052 * opcode.h, opcode.c: use a single value for the opcode val.
29053 Compile fix for non-gcc compilers.
29055 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
29057 * opcodes.c, opcodes.h: export interesting info about opcodes.
29059 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
29061 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
29064 * class.c (class_compute_field_layout): set element_class for enums
29065 (mono_class_create_from_typedef): set element_class for normal classes
29067 * icall.c (ves_icall_System_Enum_get_value): impl.
29069 * class.c (mono_class_create_from_typedef): do not set valuetype
29070 flag for System.ValueType and System.Enum
29072 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
29074 * unicode.c (iconv_convert): fix big endian problem.
29076 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
29078 * class.c: add asserts if we are ever going to scribble over memory.
29079 * socket-io.c: not all systems have AF_IRDA defined.
29081 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
29083 * class.c (class_compute_field_layout): do not consider static
29084 fields to compute alignment
29086 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
29088 * appdomain.c (mono_appdomain_get): impl.
29089 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
29091 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
29093 * icall.c: ignore "file://" prefix when loading an assembly.
29095 2002-01-23 Dick Porter <dick@ximian.com>
29099 * Makefile.am: Added socket support
29101 2002-01-23 Miguel de Icaza <miguel@ximian.com>
29103 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
29104 code back. This should return the assemblies that are loaded by
29105 the runtime on behalf of an application domain.
29107 The current implementation is still broken, it just returns every
29108 assembly loaded, but until we get real applications domain this
29111 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
29113 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
29116 2002-01-23 Miguel de Icaza <miguel@ximian.com>
29118 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
29119 the mono_class_from_name lookup.
29120 (ves_icall_get_parameter_info): ditto.
29121 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
29123 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
29125 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
29127 * class.c: load also nested classes on class init.
29128 System.ValueType instance methods gets passed boxed
29129 values, unless methods in derived classed that get a pointer to the
29131 * icall.c: use better name parsing code in GetType().
29132 * image.c, image.h: add mono_image_loaded ().
29133 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
29134 * reflection.c, reflection.h: added mono_reflection_parse_type().
29136 2002-01-22 Veronica De Santis <veron78@interfree.it>
29138 * icall.c : Added mapping of internal calls for Manual and Auto reset events
29139 * threads.c : Added the implementation of internal calls for events
29140 * threads.h : Added prototypes of internal calls for events
29142 2002-01-21 Radek Doulik <rodo@ximian.com>
29144 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
29146 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
29148 * class.c (mono_class_init): set min_align to 1 (instead of 0)
29149 (mono_class_value_size): use min_align
29151 2002-01-20 Dick Porter <dick@ximian.com>
29154 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
29155 so it compiles on w32.
29157 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
29159 * metadata.c (mono_type_stack_size): impl.
29161 * class.c (mono_class_get_field): impl. memberref token
29163 2002-01-16 Veronica De Santis <veron78@@interfree.it>
29165 * icall.h : Added the internal calls mapping for CreateMutex_internal
29166 and ReleaseMutex_internal.
29167 * threads.h : Added the prototype of mutexes internal calls.
29168 * threads.c : Added the implementations of mutexes internal calls.
29170 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
29172 * metaparse.h: removed unused file.
29173 * reflection.c, reflection.h: added stream_data_align () function
29174 to align data in streams and keep stream aligned. Add support for
29175 exception support in method headers.
29177 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
29179 * unicode.c: make iconv_convert () return the number of bytess written
29180 in the output buffer.
29182 2002-01-15 Dick Porter <dick@ximian.com>
29183 * threads.c: Make the runtime's idea of infinite timeouts coincide
29184 with the class library's
29186 Fix a particularly egregious bug in mono_thread_cleanup(). That
29187 code was so utterly bogus it must have been written on a Monday.
29189 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
29191 * reflection.h: add subtypes field to TypeBuilder.
29192 * reflection.c: encode constants for literal fields.
29193 Handle subtypes. Fix user string token (and add a zero byte)
29196 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
29198 * class.c (mono_class_init): bug fix: assign slot numbers for
29201 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29203 * reflection.c: don't try to output a code RVA for abstract methods.
29204 Small fixes for method header format. Output parameter info to the
29205 ParamDef table. Save method overriding info to MethodImpl table.
29206 Fix property support. Allow typedef.extends to be a type in the
29208 * verify.c: fix off-by-one error.
29210 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
29212 * class.c: fix mono_class_from_mono_type () for szarray types.
29213 Remove unused cache check in mono_class_from_type_spec().
29214 * icall.c: *type_from_name () functions handle simple arrays and byref.
29215 * reflection.c: handle byref and szarray types. Handle methods without
29216 body (gets P/Invoke compilation working). Handle types and fields in
29218 * reflection.h: add rank to MonoTypeInfo.
29220 2002-01-10 Dick Porter <dick@ximian.com>
29222 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
29225 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
29227 * icall.c: initialize class in type_from_handle ().
29228 Loop also in parent classes for get_method ().
29229 * reflection.c: properly encode class and valuetype types.
29230 Start on encoding TypeBuilder types. Handle fieldrefs.
29231 Use correct length when registering a user string.
29232 Handle ConstructorBuilder and MonoMethod in get_token ().
29233 Make mono_type_get_object () aware of cached types.
29234 * object.c: back out change to mono_string_new ().
29236 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
29237 * object.c: mono_string_new should return a NULL when the string
29238 passed in is NULL -- not try to deference it.
29240 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
29242 * icall.c: hack to make IsSubType work for TypeBuilders.
29243 * reflection.c: emit constructors before methods.
29244 Retrieve param names in mono_param_get_objects().
29246 2002/01/05 Nick Drochak <ndrochak@gol.com>
29248 * Makefile.am: fix list of headers and sources so automake 1.5
29249 doesn't complain. Removed \# at end of list.
29251 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
29253 * reflection.c: get token for a method ref. Set return type of
29254 constructor to void.
29255 * loader.c: debug message.
29256 * class.c: typo fix.
29258 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
29260 * icall.c: fix array init with rank > 1. FindMembers
29261 loops in parent class as well.
29262 * image.c: do not insert nested types in name cache.
29263 * reflection.c: warning fix.
29264 * reflection.h: add override method (for interface impl).
29266 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
29268 * metadata.c: fix customattr decoding.
29270 2001-12-21 Miguel de Icaza <miguel@ximian.com>
29272 * rawbuffer.cs: Added native Win32 implementation, avoids using
29273 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
29275 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
29277 * class.c: make the low-level routines handle the cache.
29279 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
29281 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
29283 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
29285 * class.c: fix mono_array_element_size() for objects.
29286 * class.h, class.c: add properties to MonoClass and load them
29288 * icall.c: check with isinst() when assigning a value to an array
29289 instead of requiring the classes to match exactly.
29290 Implemented icall for System.Type::GetType().
29291 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
29292 enums. Handle bindingflags when looking for methods and fields.
29293 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
29294 and mono_metadata_methods_from_property().
29295 * reflection.h, reflection.c: added structures for propreties,
29296 parameters and enums. Implemented mono_property_get_object() and
29297 mono_param_get_objects().
29299 2001-12-18 Dick Porter <dick@ximian.com>
29301 * file-io.c: Use mono_string_to_utf16() instead of
29302 mono_string_chars()
29304 * object.c: Added mono_string_to_utf16(), which copies the non
29305 NULL-terminated MonoString into a new double-null-terminated
29308 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
29310 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
29312 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
29314 * file-io.c: raise exceptions if handle is invalid.
29316 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
29318 * assembly.c: yet another check for mscorlib.
29319 * class.c, class.h: load nesting info for classes.
29320 * icall.c: many new functions to support the Reflection classes.
29321 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
29322 * reflection.h, reflection.c: mono_image_create_token(),
29323 mono_assembly_get_object(), mono_type_get_object(),
29324 mono_method_get_object(), mono_field_get_object(): methods to return
29325 objects that parallel the C representation of assemblies, types,
29328 2001-12-11 Dick Porter <dick@ximian.com>
29331 * file-io.c: Internal calls for file IO.
29333 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
29335 * tabledefs.h: missing FileAttributes.
29336 * verify.h, verify.c: use is_valid_string () to simplify and check for
29337 valid strings more correctly. Fix warnings and speeling.
29338 Check more tables: Filed, File, ModuleRef, StandAloneSig.
29339 Check code: branches, maxstack, method calls.
29341 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
29343 * object.c (mono_object_allocate): removed static, so that the jit
29344 can allocate value types.
29346 * icall.c (ves_icall_System_DateTime_GetNow): impl.
29348 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29350 * class.c: init enum types right away and register the
29351 token->MonoClass map in mono_class_create_from_typedef ().
29352 * verify.h, verify.c: first cut of the verifier.
29353 * pedump.c: add --verify switch to verify metadata tables.
29354 * tabledefs.h: add some missing enums.
29356 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
29358 * class.c (mono_install_runtime_class_init): impl.
29359 (mono_class_init): renamed mono_class_metadata_init to
29360 mono_class_init, also removed the metadata_inited flag
29362 * object.c (mono_object_isinst): use faster algorithm
29364 2001-11-30 Radek Doulik <rodo@ximian.com>
29366 * mono-endian.h: reverted last change
29367 added function prototypes
29369 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
29370 add mono-endian.c back
29372 * mono-endian.c: returned back, as Paolo pointed out, it's needed
29373 for unaligned access, I've mistaked it with endianess. I am
29375 (mono_read16): fix reverted endianess
29376 (mono_read64): ditto
29377 (mono_read32): ditto
29379 2001-11-30 Dick Porter <dick@ximian.com>
29381 * exception.c: Implement mono_exception_from_name()
29383 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
29385 * metadata.h, metadata.c: remove params_size and locals_size and their
29386 calculation from the metadata code: they are only usefult to the
29389 2001-11-29 Radek Doulik <rodo@ximian.com>
29391 * object.c (mono_ldstr): swap bytes here, it's probably not the
29392 best place, but works for me now, I'll redo it once I know mono
29393 better, also note that I add PROT_WRITE and don't reset back, also
29394 note that it's only affects big endians, so x86 should be OK
29396 * mono-endian.h (read16): use just glib macros for both endians
29398 * mono-endian.c: removed as glib macros are used in in
29399 mono-endian.h so we don't need to care about endianess for read
29400 macros as glib does that for us already
29402 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
29404 * class.h, class.h: take minimum alignment into consideration so
29405 that the fields of a class remain aligned also when in an array.
29407 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29409 * loader.h, loader.c: add mono_method_get_param_names().
29410 * class.c: 0-init class fields.
29412 2001-11-26 Dick Porter <dick@ximian.com>
29416 * threads.c: New file that handles System.Threading on all platforms
29419 * object.h: Remove the synchronisation struct from MonoObject,
29420 replace it with a pointer that gets initialised on demand
29422 * Makefile.am: Replace all the system-specific threading code with
29423 a single file that uses the new wrapper library
29425 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
29427 * class.c, class.h: add mono_install_trampoline() so that the runtime
29428 can register a function to create a trampoline: removes the ugly
29429 requirement that a runtime needed to export arch_create_jit_trampoline.
29430 * object.h, object.c: added mono_install_handler() so that the runtime
29431 can install an handler for exceptions generated in C code (with
29432 mono_raise_exception()). Added C struct for System.Delegate.
29433 * pedump.c: removed arch_create_jit_trampoline.
29434 * reflection.c: some cleanups to allow registering user strings and
29435 later getting a token for methodrefs and fieldrefs before the assembly
29437 * row-indexes.h: updates and fixes from the new ECMA specs.
29439 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
29441 * class.h, class.c: add enum_basetype field to MonoClass.
29442 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
29443 to get index in the constant table reated to a field, param or
29445 * reflection.h, reflection.c: handle constructors. Set public-key and
29446 version number of the built assembly to 0.
29447 * row-indexes.h: update from new ECMA spec.
29449 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
29451 * class.h, class.c: add a max_interface_id to MonoClass.
29452 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
29453 since it's used to do that. Added mono_type_type_from_obj().
29454 Make GetType() return NULL instead of segfaulting if the type was not
29455 found. Handle simple arrays in assQualifiedName.
29456 * object.h: add a struct to represent an Exception.
29457 * reflection.c: output call convention in method signature.
29458 Add code to support P/Invoke methods and fixed offsets for fields.
29460 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
29462 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
29464 * icall.c: use mono_array_addr instead of array->vector: fixes the
29465 reflection image writing.
29466 * reflection.c: init call convention byte to 0 in method signature.
29467 Encode the property signature. Don't output property-related methods
29468 twice. Really process the properties for a type (don't cast a field to
29469 a property, my mom always told me that).
29470 Fix 64 bit issues in pointer alignment in a different and more
29473 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
29475 * loader.h: Removed type class from MonoDefaults, added monotype
29477 * loader.c: Loaded MonoType, removed loading of Type
29479 * icall.c (my_mono_new_object): Now returns a System.MonoType,
29480 and fills in System.Type._impl with a RuntimeTypeHandle rather
29481 than the actual MonoClass *
29483 (ves_icall_type_from_handle): change from type_class to
29486 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
29489 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
29492 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
29494 (ves_icall_System_Reflection_Assembly_GetType): implemented
29496 (ves_icall_System_MonoType_assQualifiedName): implemented
29498 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
29500 2001-11-09 Miguel de Icaza <miguel@ximian.com>
29502 * assembly.c (mono_assembly_open): Implement a cache for the
29505 (mono_assembly_close): only destroy the assembly when the last
29508 2001-11-09 Dick Porter <dick@ximian.com>
29510 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
29512 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
29514 * class.c (mono_class_metadata_init): bug fix: compute the right slot
29516 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
29518 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
29519 from Martin Weindel.
29520 * object.h: add mono_string_chars ().
29522 2001-11-07 Miguel de Icaza <miguel@ximian.com>
29524 * reflection.c (build_compressed_metadata): Eliminates warnings
29525 and uses 64-bit clean code.
29527 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
29528 (mono_type_equal): Change signature to eliminate warnings.
29530 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29532 * icall.c, loader.c: remove the internalcall array constructors.
29533 Changes to match the new MonoArray structure.
29534 * object.h, object.c: an array object doesn't allocate an extra
29535 vector. Add mono_array_new_full () to create jagged arrays easily.
29537 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
29539 * metadata.h, metadata.c: add mono_metadata_field_info () to
29540 retreive all the info about a field from vairous tables.
29541 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
29542 * class.h, class.c: augment MonoClassField with more info.
29543 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
29544 policy and load a field's RVA if needed.
29546 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
29548 * class.c (mono_class_metadata_init): create a trampoline for all
29549 virtual functions instead of actually compiling them.
29551 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
29553 * class.h, class.c: include name in MonoClassField.
29554 * class.c: fix fundamental type of System.Object and System.String.
29555 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
29557 * icall.c: remove internalcalls for the Reflection stuff that is now
29559 * loader.c: mono_field_from_memberref () implementation.
29560 * mono-endian.c: thinko (s/struct/union/g).
29561 * object.c, object.h: make the mono_string_* prototypes actually use
29562 MonoString instead of MonoObject.
29563 * reflection.c, reflection.h: updates for changes in the reflection
29564 code in corlib: we use C structures that map to the actual C# classes.
29565 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
29566 fat method header if needed and use the info from the ILGenerator for
29567 methods. Handle fields in types. Misc fixes.
29569 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
29571 * class.c (mono_class_metadata_init): bug fix: always allocate
29572 space for static class data
29574 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
29576 * class.c (mono_compute_relative_numbering): use relative
29577 numbering to support fast runtime type checks.
29579 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
29581 * class.c (mono_class_create_from_typeref): added debugging output
29582 to print class name when MonoDummy is returned instead of real class
29584 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
29586 * class.c (mono_class_metadata_init): interface offset table now
29587 contains pointers into the vtable - this is more efficient for the jit
29589 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
29591 * class.c (mono_class_metadata_init): use a temporary vtable (the
29592 old algorithm only worked for the interpreter, but not for the jit)
29594 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
29596 * loader.c (method_from_memberref): use mono_class_get to get the
29597 class of an array instead of using System.Array directly.
29598 (mono_get_method): also add MEMBERREF methods to the method cache
29599 which usefull for arrays.
29601 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
29603 * pedump.c (arch_compile_method): added to compute vtable entry
29605 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
29606 number of interfaces.
29608 * class.h: merged MonoArrayClass into MonoClass
29610 * class.c (mono_class_create_from_typedef): compute the vtable size and
29611 allocate space to include the vtable inside MonoClass
29612 (mono_class_metadata_init): initialize the vtable
29614 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
29616 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
29617 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
29618 * image.c: endian fixes by Laurent Rioux.
29619 * object.h, object.c: rename MonoStringObject to MonoString and
29620 MonoArrayObject to MonoArray. Change some function names to conform to
29621 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
29622 guint16* as first argument, so don't use char*.
29623 Provide macros to do the interesting things on arrays in a portable way.
29624 * threads-pthread.c: updates for the API changes and #include <sched.h>
29625 (required for sched_yield()).
29626 * icall.c: updates for the API changes above.
29627 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
29628 platforms that need them.
29630 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
29632 * class.c: set the correct type for all the fundamental
29633 type when loading the class.
29635 2001-10-05 Dick Porter <dick@ximian.com>
29637 * threads-pthread.c (pthread_mutex_timedlock): Simple
29638 compatibility version for C libraries that lack this call.
29640 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29642 * class.c: MonoTypes stored in MonoClass are stored as
29643 fundamental MonoTypes when the class represents a
29644 fundamental type (System.Int32, ...).
29645 The TypeHandle return by ldtoken is a MonoType*.
29646 * icall.c: ves_icall_get_data_chunk () write out all the
29647 PE/COFF stuff. Implement ves_icall_define_method (),
29648 ves_icall_set_method_body (), ves_icall_type_from_handle ().
29649 * image.c: properly skip unknown streams.
29650 * loader.h, loader.c: add type_class to mono_defaults.
29651 * metadata.c, metadata.h: export compute_size () as
29652 mono_metadata_compute_size () with a better interface.
29653 Typo and C&P fixes.
29654 * pedump.c: don't try to print the entry point RVA if there is no entry point.
29655 * reflection.c, reflection.h: many cleanups, fixes, output method
29656 signatures and headers, typedef and typeref info, compress the metadata
29657 tables, output all the heap streams, cli header etc.
29658 * row-indexes.h: typo fixes.
29660 2001-10-04 Dick Porter <dick@ximian.com>
29662 * object.h: Add a synchronisation mutex struct to MonoObject
29664 * object.c (mono_new_object): Initialise the object
29665 synchronisation mutexes
29667 * icall.c: System.Threading.Monitor internal calls
29669 * threads-pthread.h:
29670 * threads-pthread.c: System.Threading.Monitor internal calls
29672 * threads-types.h: New file, includes the system-specific thread
29675 * threads-pthread-types.h:
29676 * threads-pthread-types.c: New files, handle pthread-specific
29677 synchronisation types
29679 * threads-dummy-types.h:
29680 * threads-dummy-types.c: New files of dummy support for
29681 thread-specific types
29685 * pedump.c: include mono-endian.h not endian.h
29687 * Makefile.am: More threads files.
29688 Name mono-endian.h not endian.h
29690 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
29692 * Makefile.am, reflection.h, reflection.c: move here the reflection related
29693 stuff and implement a few more bits.
29694 * icall.c: a field needs to be dereferenced twice. Do not use the same
29695 name for two variables in the same scope.
29696 * image.c, image.h: cleanups.
29698 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
29700 * class.c (mono_class_metadata_init): bug fix: compute the right size
29702 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
29704 * icall.c: implemented some of the Reflection internalcalls.
29705 * image.c, image.h: start writing out the PE/COFF image.
29706 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
29707 that does the reverse than decode_blob_size ().
29708 * object.c: use mono_metadata_encode_value (). Move here
29709 temporary implementation of mono_string_to_utf8 ().
29710 * rawbuffer.c: make malloc_map static.
29712 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29714 * metadata.c: fix type comparison for arrays.
29715 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
29716 Added a couple of new classes to monodefaults.
29717 * icall.c: added a couple of Reflection-related internalcalls.
29718 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
29719 Added a byval_arg MonoType to MonoClass.
29721 2001-09-28 Dick Porter <dick@ximian.com>
29724 * threads-pthread.h:
29725 * threads-pthread.c: Implemented internal calls for
29726 LocalDataStoreSlot operations. Applied mutexes around all shared
29727 data. Reworked the thread creation and Start() operations to
29728 avoid a race condition.
29731 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
29733 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
29735 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
29737 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
29739 * class.c, loader.c: warn and return NULL instead of erroring out.
29740 * icall.c: added System.AppDomain::getCurDomain().
29741 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
29743 2001-09-25 Dick Porter <dick@ximian.com>
29745 * threads-pthread.h:
29746 * threads-pthread.c: Implemented timed thread joining and added
29747 System.Threading.Thread::Join_internal internal call
29749 * icall.c: Added System.Threading.Thread::Join_internal internal call
29752 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
29754 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
29756 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
29757 mono_string_intern () to implement the semantics of the ldstr opcode
29758 and the interning of System.Strings.
29759 * icall.c: provide hooks to make String::IsIntern and String::Intern
29762 2001-09-23 Dick Porter <dick@ximian.com>
29765 * threads-dummy.h: New files of dummy threading routines
29767 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
29768 support code based on system specifics
29770 Rename PTHREAD_LIBS to THREAD_LIBS
29772 2001-09-23 Dick Porter <dick@ximian.com>
29774 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
29775 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
29777 (mono_thread_init): Set up a Thread object instance to return when
29778 the main thread calls Thread.CurrentThread
29779 (mono_thread_cleanup): Wait for all subthreads to exit
29781 * icall.c: New internal calls for System.Threading.Thread::Sleep
29782 (including Schedule) and CurrentThread
29784 * threads.h: New file, to insulate thread-specific stuff from the
29787 2001-09-21 Dick Porter <dick@ximian.com>
29789 * threads-pthread.h:
29790 * threads-pthread.c: New file, for handling pthreads-style
29791 threading support. Start() now starts a new thread and executes
29792 the ThreadStart delegate instance.
29794 * icall.c: Added the internalcall for
29795 System.Threading.Thread::Start_internal
29797 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
29799 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
29801 * loader.c: work around the different signatures for delegates
29802 constructors csc generates in compiled code vs the ones compiled in mscorlib.
29804 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
29806 * class.h, class.c: add mono_class_get_field_from_name ().
29807 * *: Fix C comments and other ANSI C issues.
29809 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
29811 * endian.h, assembly.c: fix some endianness issues.
29813 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
29815 * loader.h, load.c: add delegate_class to mono_defaults.
29816 Handle runtime provided methods in mono_get_method ().
29818 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
29820 * loader.c (mono_get_method): use pinvoke for internal call
29822 * icall.c: use pinvoke for internal call
29824 * loader.c (method_from_memberref): set the method name
29826 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
29828 * metadata.c: help the compiler generate better code for
29829 mono_class_from_mono_type ().
29831 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
29833 * class.c (mono_class_metadata_init): delayed computing of the
29834 class size to mono_class_metadata_init ()
29836 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
29838 * class.c, class.h: add an interfaces member to MonoClass.
29839 * image.c, image.h: add assembly_name field to MonoImage
29840 from the assembly table.
29841 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
29843 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
29845 * class.c: Handle Array in mono_class_from_mono_type ().
29846 * metadata.c, pedump.c: some endian fixes.
29848 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
29850 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
29851 * metadata.c: fix small problem introduced with the latest commit.
29853 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
29855 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
29856 We don't need a MonoMetadata pointer anymore to compare signatures in
29857 mono_metadata_signature_equal (), update callers.
29858 Reduced memory usage an number of allocations for MonoMethodHeader and
29859 MonoMethodSignature.
29861 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
29863 * metadata.c: added compare for szarray.
29865 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
29867 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
29868 and add a couple more types to it and mono_defaults. Give an hint on
29869 classes that need implementing in our corlib and are referenced
29872 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
29874 * class.h, class.c: keep track if a class is also an Enum.
29875 * loader.c: Implement a couple more types for use in libffi
29876 marshalling. Gives better diagnostics when failing to dlopen
29877 a library. Set method->klass for P/Invoke methods, too.
29879 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
29881 * class.c, class.h: add a MonoType this_arg to MonoClass that
29882 represents a pointer to an object of the class' type that
29883 can be used by the interpreter and later the type cache.
29884 Add best guess alignment info for valuetype objects.
29886 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
29888 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
29889 into MonoType: one less level of indirection and allocation and
29890 simplifies quite a bit of code. Added cache for MonoTypes that are
29891 used frequently, so that we don't need to allocate them all the time.
29893 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
29895 * class.c (mono_class_create_from_typedef): System.Enum is also a
29896 value type, although it does not derive from System.ValueType
29897 (maybe a bug in the ms compiler?)
29899 * metadata.c (mono_type_size): return the right size for value types
29901 * loader.c (mono_get_method): only initialize method header if not abstract
29903 * class.c (mono_class_from_mono_type): use mono_default values.
29905 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
29907 * *: use MonoClass pointers instead of <type_tokens>
29909 * class.h: new flag: metadata_inited.
29911 * class.c (mono_class_metadata_init): impl.
29912 (mono_class_instance_size): impl.
29913 (mono_class_data_size): impl.
29915 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29917 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
29918 MonoClass now has the name and name_space fields.
29919 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
29920 mono_get_method () takes and optional MonoClass as argument.
29921 Removed mono_typedef_from_name() and added mono_class_token_from_name()
29922 instead that takes advantage of a map from class names to typedef
29923 tokens in MonoImage.
29925 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
29927 * metadata.c: zero is not a valid alignment boundary.
29928 Merge MONO_TYPE_VOID in default decoding code.
29930 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
29932 * image.h: merged MonoMetadata into MonoImage
29934 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
29935 identify the type of elements.
29937 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
29939 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
29940 * cil-coff.h: split MonoMSDOSHeader and add size info.
29941 * image.c: add some consistency checks.
29942 * metadata.c: fix row size computation: one programmer
29943 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
29944 add explanation for the locator routine.
29945 Fix decoding of size in method header.
29947 2001-08-20 Miguel de Icaza <miguel@ximian.com>
29949 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
29950 (g_concat_dir_and_file): Bring g_concat_dir_and_file
29951 function from gnome-libs. This uses the right path separator
29952 based on the OS, and also works around a bug in some systems where
29953 a double slash is not allowed.
29954 (default_assembly_name_resolver): Use g_concat_dir_and_file
29955 (mono_assembly_open): ditto.
29957 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
29959 * metadata.c (mono_metadata_signature_equal): impl.
29961 * *: void is now a realy MonoType (instead of using NULL)
29963 * metadata.c (do_mono_metadata_parse_type): use
29964 mono_metadata_parse_type to parse void value.
29966 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
29968 * metadata.c, metadata.h: in the signature and method header store
29969 only the space required for holding the loca vars and incoming arguments.
29971 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
29973 * metadata.c (do_mono_metadata_parse_type): treat void like any
29974 other type (instead of assigning NULL);
29976 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
29978 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
29980 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
29982 * image.c (do_mono_image_open): added a cache for arrays.
29984 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
29986 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
29987 decode a single column from a row in a metadata table and changes
29988 to take advantage of it in the typedef locator (gives a nice speed up).
29989 Store offset info for function params.
29991 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
29993 * image.h (MONO_IMAGE_IS_CORLIB): removed
29995 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
29997 * assembly.c: how could mono_assembly_close () had ever worked?
29998 * metadata.c, metadata.h: provide offset info for local vars.
29999 Implement mono_type_size () to take care of alignment as well
30000 as size (it was mono_field_type_size in cli/class.c before).
30002 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
30004 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
30006 * assembly.h (CORLIB_NAME): set to corlib.dll
30008 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
30010 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
30012 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
30013 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
30014 tokentype.h: massive namespace cleanup.
30016 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
30018 * metadata.h, metadata.c: decode exception clauses when parsing method header.
30020 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
30022 * metadata.c (mono_metadata_free_type): added check for type !=
30023 NULL (void) before calling mono_metadata_free_type()
30025 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
30027 * metadata.h, row_indexes.h: added header with enumerations to use
30028 to index in the columns from tables in metadata and to decode coded
30029 tokens: we should start using this instead of embedding magic numbers
30032 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
30034 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
30035 Move metadata_t info from cli_image_info_t to MonoImage, where
30036 it's easily accessible. Changed all the uses accordingly.
30037 Added the method and class caches to MonoImage.
30038 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
30039 and mono_metadata_decode_value () signature to be more consistent
30040 with the other parse functions (and simplify code). Taken advantage
30041 of zero-length array allocation with GCC. Removed reduntant (and
30042 wrong) MonoFieldType struct and use MonoParam instead. Changed
30043 mono_metadata_parse_field_type () to use common code for parsing.
30044 Added mono_metadata_typedef_from_field () and
30045 mono_metadata_typedef_from_method () to lookup a typedef index from a
30046 field or method token.
30047 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
30049 2001-07-23 Miguel de Icaza <miguel@ximian.com>
30051 * metadata.c (mono_metadata_parse_field_type): Implement.
30052 (do_mono_metadata_parse_type): Split engine from
30053 mono_metadata_parse_type, so that we can create smaller structures
30054 for things that just have one pointer to the MonoType (look at
30057 2001-07-20 Miguel de Icaza <miguel@ximian.com>
30059 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
30060 as Jan Gray found out, it is incorrect.
30062 2001-07-18 Miguel de Icaza <miguel@ximian.com>
30064 * assembly.c: Implement asssembly loading. This loads an image
30065 and loads all the referenced assemblies. Come to think of it, we
30066 could always do lazy loading of the assemblies.
30068 * image.c (mono_image_open): Keep loaded images in a hashtable.
30070 * image.h (MonoImage): Add reference count.
30072 2001-07-17 Miguel de Icaza <miguel@ximian.com>
30074 * assembly.c (mono_assembly_open): Keep track of the file name in
30075 case the assembly has no ASSEMBLY table.
30077 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
30080 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
30082 * metadata.c, metadata.h: decode local vars in method header
30083 parse function. Change callers accordingly.
30085 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
30087 * metadata.h, cil-coff.h: protect against multiple inclusion.
30088 Added some new structures to hold information decoded from metadata:
30089 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
30090 and relevant decoding/free functions.
30091 * metadata.c: implement decoding functions. Add warning for out of bounds
30092 index in mono_metadata_locate(). Implement mono_get_method () to retreive
30093 all the info about a method signature and invocation. Remove check on
30094 uninitialized local var in parse_mh() and fix memory leak.
30096 2001-07-12 Miguel de Icaza <miguel@ximian.com>
30098 * metadata.h: More macros.
30100 * tokentype.h: New file.
30102 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
30104 * assembly.c: added a consistency check and initialize
30105 some structures with g_new0().
30106 * metadata.c: fixed a couple more bugs in table size computation
30107 and add other checks for out-of bound access to metadata.
30109 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
30111 * metatada.c: fix bugs computing table sizes. Spew a
30112 warning when index in string heap is out of bounds.
30114 2001-07-04 Miguel de Icaza <miguel@ximian.com>
30116 * metadata.h: Add a couple of macros to manipulate tokens.
30118 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
30120 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
30121 cli_section_tables).
30123 2001-07-01 Miguel de Icaza <miguel@ximian.com>
30125 * metadata.c (mono_metadata_user_string): New function, provides
30126 access to the UserString heap.
30128 2001-06-27 Miguel de Icaza <miguel@ximian.com>
30130 * metadata.c: Add inline documentation.
30132 2001-06-26 Miguel de Icaza <miguel@ximian.com>
30134 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
30137 2001-06-22 Miguel de Icaza <miguel@ximian.com>
30139 * typeattr.h: New file, TypeAttribute flags.
30141 2001-06-21 Miguel de Icaza <miguel@ximian.com>
30143 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
30144 mono_assembly_ensure_section): Section loading code.
30145 (load_section_tables): Load the sections.
30147 * mono/metadata/metadata.c (mono_metadata_locate_token,
30148 mono_metadata_locate): Functions to locate the information
30149 definition given a token or a table and an index.
30150 (mono_metadata_compute_table_bases): New.
30151 (compute_size): New function to compute the sizes of the various
30154 * mono/metadata/metadata.h: Finish listing the different index
30157 * mono/metadata/pedump.c: Improve to dump new information.
30159 2001-06-19 Miguel de Icaza <miguel@ximian.com>
30161 * mono/metadata/metadata.c: Entered all the tables matching
30164 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2