1 2009-02-25 Zoltan Varga <vargaz@gmail.com>
3 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
4 slower search in metadata.
6 * pedump.c: Fix a warning.
8 2009-02-23 Zoltan Varga <vargaz@gmail.com>
10 * reflection.c (encode_locals): Add checks for user types.
11 (method_encode_clauses): Ditto.
12 (method_encode_code): Ditto.
13 (mono_image_create_token): Ditto.
15 * object-internals.h: Change the type of more fields from MonoReflectionType*
18 2009-02-22 Zoltan Varga <vargaz@gmail.com>
20 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
21 the a thread does not suspend within 100ms.
23 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
24 in addition to StopRequested as well.
26 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
28 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
29 search the method_hash before inserting a new entry, to avoid crashes when
30 the same method is inserted multiple times, causing the old
31 MonoDebugMethodInfo structure to be freed by the value dtor function.
33 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
35 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
36 SO_EXLUSIVEADDRUSE where available.
38 2009-02-21 Zoltan Varga <vargaz@gmail.com>
40 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
41 runtime invoke wrappers, this time it is string ctor wrappers, which
42 pass a dummy string as 'this' instead of their obj argument. Fixes
45 2009-02-21 Jb Evain <jbevain@novell.com>
47 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
48 only get create_culture once.
50 2009-02-20 Zoltan Varga <vargaz@gmail.com>
52 * reflection.c (mono_reflection_setup_internal_class): Move the user type
53 check before the locking.
55 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
56 (mono_reflection_create_runtime_class): Ditto.
57 (mono_reflection_sighelper_get_signature_local): Ditto.
58 (mono_reflection_sighelper_get_signature_field): Ditto.
60 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
61 is a System.MonoType object or similar.
62 (monotype_cast): New helper function to cast a MonoObject to a
63 MonoReflectionType object.
65 * object-internals.h: Change MonoReflectionType* members in structures to
66 MonoObject* members to force the usage of the monotype_cast () function.
68 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
69 structures/arrays. This causes us to assert instead of crashing when
70 instances of user defined subclasses of System.Type are encountered.
72 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
76 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
77 win32 resource loaded from a PE file.
79 * image.c: fix mono_image_lookup_resource.
81 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
85 * threads.c: added internal call for WaitHandle.SignalAndWait.
87 2009-02-19 Bill Holmes <billholmes54@gmail.com>
89 * cominterop.c : Adding cominterop_type_from_handle and
90 registering it as an icall. Replacing all references
93 Code is contributed under MIT/X11 license.
95 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
97 * Makefile.am: Add lock-tracer.h and lock-trace.c.
99 * appdomain.c: Call the tracer init function.
101 * domain-internals.h: Enable the tracer for the domain locks.
103 * image.c: Enable the tracer for image locks.
105 * loader.c: Enable the trace for the loader lock.
108 * lock-tracer.c: Initial implementation of the lock trace utility.
109 The tracer requires a compile time define to be enabled and a env var
110 to be enabled at runtime.
112 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
114 * domain.c (mono_domain_code_foreach): Improve documentation.
116 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
121 * reflection.c: Adjust locking order to the new semantics where the loader lock
124 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
126 * domain.c: Add mono_domain_code_* functions that perform locking
127 around the domain codeman.
129 * domain-internals.h: Export those functions.
131 * object.c: Use new functions instead of acquiring the domain lock.
133 2009-02-19 Zoltan Varga <vargaz@gmail.com>
135 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
136 delegate. Fixes #477396.
138 2009-02-18 Zoltan Varga <vargaz@gmail.com>
140 * reflection.c (create_custom_attr): Get rid of alloca.
142 2009-02-18 Bill Holmes <billholmes54@gmail.com>
144 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
145 Adding exception handling for all CCW calls.
147 Code is contributed under MIT/X11 license.
149 2009-02-18 Zoltan Varga <vargaz@gmail.com>
151 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
153 * marshal.c (emit_marshal_boolean): Add null checks to the new
154 native->managed marshalling code. Fixes #476247.
156 2009-02-17 Zoltan Varga <vargaz@gmail.com>
158 * class.c (mono_class_get_vtable_entry): Move the addition of
159 static rgctx invoke wrappers for vtable methods here, this simplifies
160 a lot of code and causes fewer rgctx wrappers to be created.
162 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
163 name of the statistics to begin with an uppercase.
165 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
167 * reflection.c: Revert previous change as it breaks the build.
169 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
171 * verify.c: Properly handle SZARRAY element type.
175 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
177 * reflection.c (mono_image_create_method_token): Correctly encode
178 MethodDef MemberRefParent token.
182 2009-02-17 Zoltan Varga <vargaz@gmail.com>
184 * image.c (mono_image_close): Delete the critical section before
185 freeing the memory holding it.
187 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
189 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
192 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
194 * pedump.c (main): Call mono_marshal_init so pedump
197 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
199 * loader.c (method_from_memberref): Properly fix #474271 and
200 don't break the runtime bad.
202 2009-02-16 Zoltan Varga <vargaz@gmail.com>
204 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
205 (mono_domain_alloc0): Ditto.
207 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
209 * loader.c (method_from_memberref): Don't abort if the array
210 method is not found. A regular loader failure is more informative
215 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
217 *loader.c: Guard MonoImage::method_cache/methodref_cache
218 using the image lock instead of the loader lock.
220 * metadata.h: Add comments about which fields are protected by
223 2009-02-16 Zoltan Varga <vargaz@gmail.com>
225 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
227 * generic-sharing.c (mono_method_construct_object_context): Remove the
228 wrapper_type == NONE assert, it is not needed.
230 2009-02-15 Zoltan Varga <vargaz@gmail.com>
232 * reflection.c (clear_cached_object): New helper function.
233 (mono_method_clear_object): New function to clear the cached reflection
234 objects for a dynamic method.
236 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
237 Partly fixes # 463323.
239 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
243 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
245 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
247 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
248 take the image lock instead of the loader lock.
250 * metadata-internals.h: Export new functions.
252 2009-02-12 Miguel de Icaza <miguel@novell.com>
254 * domain.c (app_config_parse): Remove another use of stat that is
255 not necessary as g_file_get_contents already does the presence
258 2009-02-13 Zoltan Varga <vargaz@gmail.com>
260 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
262 * marshal.c: Move the bstr handling code to cominterop.c.
264 * marshal.c: Remove some COM interop code missed previously.
266 2009-02-12 Miguel de Icaza <miguel@novell.com>
268 More Paolo patches from the Wii port:
270 * security.c: Remove ves_icall_System_Environment_get_UserName
273 * icall.c: And put ves_icall_System_Environment_get_UserName
276 * appdomain.c (mono_set_private_bin_path_from_config): Remove
277 redundant call to stat that was only used to test for the file
278 existence. Patch from Paolo.
280 * gc.c (run_finalize): If COM is disabled, do not link in
281 mono_marshal_free_ccw.
283 * generic-sharing.c: Use alloca.h here as well.
285 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
287 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
289 2009-02-13 Zoltan Varga <vargaz@gmail.com>
291 * cominterop.c cominterop.h: New files.
293 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
294 function/typedefs which are needed by cominterop.c global.
296 2009-02-12 Mark Probst <mark.probst@gmail.com>
298 * generic-sharing.c: Don't take the loader lock to guard image
301 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
303 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
304 called without the loader lock which is required to guard MonoImage:tokens.
306 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
312 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
314 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
316 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
317 Rework the code to use regular mono_image_alloc/0.
319 * loader.c: Rework the code to use regular mono_image_alloc/0.
321 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
323 2009-02-12 Bill Holmes <billholmes54@gmail.com>
325 * object-internals.h : Fixing a typo in the
326 MonoReflectionComVisibleAttribute struct.
328 * marshal.c (cominterop_com_visible): Check the implemented
329 interfaces for ComImport.
331 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
332 assume that bools should be treated as VARIANTBOOLs.
334 * marshal.c (emit_marshal_boolean): Adding cases for
335 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
337 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
338 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
340 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
341 should be treated as VARIANTBOOLs.
343 Code is contributed under MIT/X11 license.
345 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
347 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
348 allocation with the image lock.
350 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
352 This patch is the last of a series to remove explicit reference of MonoImage::mempool
353 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
355 * object.c: Add mono_string_to_utf8_image.
357 * object-internals.h: Export mono_string_to_utf8_image.
359 * reflection.c: Rework all explicit references to the the image mempool to go thought
360 the mono_image_alloc set of functions.
362 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
364 This patch is the third of a series to remove explicit reference of MonoImage::mempool
365 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
366 and generics-sharing.c.
368 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
369 as first argument. Note that this function remains broken as it doesn't perform locking around the
372 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
374 * image.c: Add g_slist_append_image.
376 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
377 the supplied image for allocation. Move code into mono_metadata_field_info_full.
379 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
380 Fix all related code to do the same.
382 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
384 * metadata-internals.h: Fix the signatures.
386 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
388 This patch is the second of a series to remove explicit reference of MonoImage::mempool
389 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
390 and similar to work using MonoImage.
392 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
395 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
397 * class.c (mono_metadata_signature_deep_dup): Same.
399 * class.c (inflate_generic_type): Same.
401 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
403 * metadata.c (mono_metadata_signature_dup_full): Same.
405 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
406 mono_metadata_signature_dup_full.
408 * metadata.c (mono_metadata_type_dup): Same.
410 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
412 * reflection.c: Same.
414 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
416 * metadata-internals.h: Fix the signatures.
418 * class-internals.h: Same.
420 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
422 This patch is the first of a series to remove explicit reference of MonoImage::mempool
423 and use mono_image_alloc set of functions instead.
425 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
426 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
429 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
431 * class.c (g_list_prepend_mempool): Removed.
433 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
435 * image.c: Add g_list_prepend_image.
437 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
439 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
442 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
444 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
447 * image.c (mono_image_init): Init the lock field.
449 * image.c (mono_image_init): Cleanup the lock field.
451 * image.c: Add mono_image_(un)lock functions.
453 2009-02-11 Mark Probst <mark.probst@gmail.com>
455 * class.c, class-internals.h: mono_method_get_context_general()
456 combines the functionality of mono_method_get_context() and
457 mini_method_get_context().
459 * generic-sharing.c, domain-internals.h:
460 mono_method_construct_object_context() and
461 mono_domain_lookup_shared_generic() moved from mini.
463 * icall.c (ves_icall_InternalInvoke): Handle the case where the
464 method doesn't have the correct instantiation because it's shared
465 generic code. Fixes #473999.
467 2009-02-11 Zoltan Varga <vargaz@gmail.com>
469 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
471 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
473 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
475 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
477 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
479 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
480 and recheck the cache for dups after it.
482 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
484 Fixes one of the deadlocks found in #473150.
486 2009-02-11 Bill Holmes <billholmes54@gmail.com>
488 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
489 For Win32, add additional break conditions for accept.
491 Code is contributed under MIT/X11 license.
493 2009-02-10 Zoltan Varga <vargaz@gmail.com>
495 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
496 lazily initialize the native wrapper cache.
497 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
498 cache, since they are different from the normal wrappers.
500 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
502 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
503 AOT compiled native wrappers.
505 2009-02-09 Geoff Norton <gnorton@novell.com>
508 * security-core-clr.c: Allow enabling core-clr from the embedding
511 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
513 * socket-io.c: when requesting all the local ips, if there are no
514 interfaces up and running, MS returns 127.0.0.1.
516 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
518 * mono-perfcounters-def.h: processor time is an inverse time.
521 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
523 * socket-io.c: an empty host name returns the list of local IPs.
524 Fixes bug #386637 part 1/2.
526 2009-02-07 Zoltan Varga <vargaz@gmail.com>
528 * verify.c (mono_class_interface_implements_interface): Call
529 mono_class_setup_interfaces ().
530 (merge_stacks): Ditto.
532 2009-02-06 Zoltan Varga <vargaz@gmail.com>
534 * class.c (mono_class_setup_interfaces): New function to lazily initalize
536 (mono_generic_class_get_class): Don't initalize klass->interfaces.
537 (mono_generic_class_get_class): Ditto.
539 2009-02-06 U-QUACK\miguel <miguel@quack>
541 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
542 they live in security.c
544 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
545 another bit from Paolo's code.
547 2009-02-06 Zoltan Varga <vargaz@gmail.com>
549 * object.c (build_imt_slots): Add a small optimization to avoid inflating
550 methods which will be discarded by add_imt_builder_entry ().
552 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
555 * loader.c: Add a statistics for the size of the memberref signature cache.
557 * loader.c (find_cached_memberref_sig): New helper function.
558 (cache_memberref_sig): Ditto.
560 * loader.c: Cache the result of parsing memberref signatures, since otherwise
561 they will be parsed again for every generic instantiation, leading to unbounded
564 2009-02-05 Zoltan Varga <vargaz@gmail.com>
566 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
567 parameters of generic methods.
569 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
570 after the original method is copied to the inflated method.
571 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
573 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
574 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
576 * class.c metadata.c: Update after the changes above.
578 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
580 * metadata-verify.c: Simplified error handling and added
581 section table validation.
583 2009-02-05 Zoltan Varga <vargaz@gmail.com>
585 * class-internals.h (MonoClassExt): New structure containing rarely used
587 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
588 through a new 'ext' field.
590 * class.c (mono_class_alloc_ext): New helper function to allocate
593 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
595 2009-02-05 Mark Probst <mark.probst@gmail.com>
597 * object.c (mono_object_get_virtual_method): Properly inflate
598 generic methods. Fixes #472692.
600 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
602 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
603 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
604 for the parent type, the created type must be ready to be used on a generic
606 We fill this_arg/byval_arg if the parent is a generic instance to make sure
607 we won't have duplicated entries in generic_inst_cache.
611 2009-02-05 Miguel De Icaza <miguel@novell.com>
613 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
614 replace with plain BSD per the comments on the bug MONO77637.
616 2009-02-05 Zoltan Varga <vargaz@gmail.com>
618 * class.c (mono_class_get_generic_class): New accessor function.
619 (mono_class_get_generic_container): Ditto.
621 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
622 fields, similar to the ones in MonoMethod.
624 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
625 (mono_class_create_from_typedef): Set klass->is_generic if needed.
627 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
629 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
630 the same information as element_class->byval_arg.
632 * class.c reflection.c: Remove references to class->byval_arg.
634 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
635 klass->enum_basetype directly.
637 * verify.c metadata.c object.c icall.c reflection.c: Use
638 mono_class_enum_basetype () instead of accessing klass->enum_basetype
641 2009-02-04 Miguel de Icaza <miguel@novell.com>
643 * icall-def.h: Remove internal calls for sockets when
644 DISABLE_SOCKET is defined, file system writing features when the
645 OS only support reading and not writing data and Policy support if
646 the Policy is disabled.
648 * image.c (do_mono_image_open): Apply Paolo's patches for using
649 mono_file_map_ APIs here.
651 * assembly.c: Add support for platforms to avoid prefix
654 2009-02-04 Zoltan Varga <vargaz@gmail.com>
656 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
659 * class.c (mono_class_inflate_generic_class): New helper function.
661 * class.c: Use mono_class_inflate_generic_class in a few places. Add
662 statistics for inflated methods/classes.
664 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
666 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
667 the call is made from Delegate.CreateDelegate () for the invoke method of
670 * loader.c: Add a statistics for the memory occupied by inflated signatures.
672 * metadata.c (mono_metadata_signature_size): New helper function.
674 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
677 * metadata.c (inflated_method_in_image): Avoid calling
678 mono_method_signature () if the method does not already have a signature.
680 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
682 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
683 valuetype is compatible with target type, check by inheritance as a
684 VT is not really compatible with System.ValueType, for example.
686 * verify.c (do_invoke_method): Improve error message.
688 * verify.c (do_box_value): If boxing a nullable, use the type argument
691 * verify.c (do_newobj): Improve error message.
695 2009-02-03 Miguel de Icaza <miguel@novell.com>
697 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
699 2009-02-03 Mark Probst <mark.probst@gmail.com>
701 * generic-sharing.c: Don't hold domain lock when calling
702 instantiate_other_info(). Fixes #471958.
704 * domain-internals.h, loader.c: Describe locking policy of domain
707 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
709 * verify.c (mono_delegate_signature_equal): Make it possible to check
710 first-arg-bound delegates to static method.
712 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
713 static methods with the first arg bound.
717 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
719 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
722 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
723 under strict mode. Any type, when boxed can be seen as a reference type.
727 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
729 * object.h: The lower bound of an array is a signed integer value.
730 Introduce mono_array_lower_bound_t typedef. It should be used instead of
731 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
733 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
734 calculate the upper bound.
738 2009-02-02 Miguel de Icaza <miguel@novell.com>
740 From Paolo's work, refactored, cleared up:
742 * threadpool.c, icall.c: ifdef code that requires a working socket
745 * metadata.c (mono_metadata_field_info): Do not attempt to return
746 a value from a function declared as void.
748 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
749 from the console stack.
751 * assembly.c: use strrchr instead of rindex.
753 * class.c, object.c, marshal.c, icall.c, reflection.c: include
754 alloca.h on systems that have it.
756 * environment.c: Avoid code that uses stuff from
759 * appdomain.c: Include sys/time.h.
761 * console-io.c: include sys/ioctl.h if it is available.
763 2009-02-03 Zoltan Varga <vargaz@gmail.com>
765 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
767 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
770 * marshal.c: Set mb->skip_visibility instead of setting it on the method
771 after it was created and cached, as the later is not thread safe.
773 2009-02-02 Zoltan Varga <vargaz@gmail.com>
775 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
776 called while the debugging module is not initialized. Fixes #471669.
778 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
780 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
784 2009-02-02 Mark Probst <mark.probst@gmail.com>
786 * generic-sharing.c (lookup_or_register_other_info): Make sure the
787 loader lock is not taken while the templates lock is held. Fixes
790 2009-02-02 Mark Probst <mark.probst@gmail.com>
792 * metadata.c (type_in_image): Added a check to fix a monodis
795 2009-02-02 Zoltan Varga <vargaz@gmail.com>
797 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
800 * object.c (mono_runtime_invoke_array): Ditto.
802 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
803 freeing wrappers of dynamic methods.
805 * loader.c (mono_free_method): Call it. Fixes #463323.
807 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
808 methods taking vtype/byref arguments, to fix yet another bug caused by
809 the sharing of runtime invoke wrappers. Partly fixes #471259.
811 2009-02-01 Zoltan Varga <vargaz@gmail.com>
813 * debug-mono-symfile.c (check_line): Return NULL instead of returning
814 <first file in file table>:1 when the IL offset does not have an associated
817 2009-01-31 Zoltan Varga <vargaz@gmail.com>
819 * mono-debug.c (mono_debug_lookup_locals): New function to return local
820 variable info for a method.
822 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
824 2009-01-30 Jb Evain <jbevain@novell.com>
826 * pedump.c: reuse code from monodis to make sure pedump honors
827 MONO_PATH, which is needed to verify net_2_1 assemblies.
829 2009-01-29 Zoltan Varga <vargaz@gmail.com>
831 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
832 there is no line number info.
834 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
836 Avoid some MonoType allocations
837 * reflection.c (mono_reflection_initialize_generic_parameter):
838 Reuse MonoType from param->pklass rather than allocating one.
839 (mono_dynamic_image_free): Update to changes.
841 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
843 Rearrange some code to improve consistency
844 * reflection.c (mono_reflection_setup_generic_class): Move body ...
845 (mono_reflection_initialize_generic_parameter): ... here.
847 2009-01-28 Zoltan Varga <vargaz@gmail.com>
849 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
850 with type constraints as an experiment.
852 * boehm-gc.c (on_gc_notification): Update mono_stats.
854 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
856 Avoid some allocations
857 * class-internals.h (_MonoGenericInst::type_argv): Convert from
858 pointer to tail array to avoid extra allocation.
859 * metadata.c (free_generic_inst): Update to changes.
860 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
863 2009-01-27 Zoltan Varga <vargaz@gmail.com>
865 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
866 return TRUE if the two type objects are the same.
868 2009-01-26 Zoltan Varga <vargaz@gmail.com>
870 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
871 (mono_class_native_size): Use klass->marshal_info->min_align instead of
872 klass->min_align, since klass->min_align contains the managed alignment,
873 while the native alignment can be different, like for longs on x86.
876 * class-internals.h (MonoMarshalType): Add a min_align field.
878 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
880 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
883 2009-01-26 Zoltan Varga <vargaz@gmail.com>
885 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
886 some comments about the usage of the used_regs field.
888 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
891 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
893 * appdomain.c: return NULL instead of throwing FileNotFoundException
894 when LoadAssembly() fails.
896 2009-01-23 Mark Probst <mark.probst@gmail.com>
898 * metadata.c (mono_metadata_generic_param_equal): Only compare the
899 image if the owner is NULL. Fixes the AOT failures.
901 2009-01-23 Zoltan Varga <vargaz@gmail.com>
903 * metadata.c (mono_metadata_load_generic_params): Initialize the
904 MonoGenericParam structure using memset so the image field is initialized
907 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
909 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
912 2009-01-21 Zoltan Varga <vargaz@gmail.com>
914 * class.c (mono_class_setup_vtable_general): In the generic instance
915 optimization, set method->slot for abstract virtual methods. Fixes part of
918 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
920 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
921 which signals that the unloading has started but all appdomain services must
924 * appdomain.c (mono_domain_unload): The initial state for unloading now
925 is unloading_start and we switch to unloading after the managed call to
926 AppDomain::DomainUnload has finished.
928 The new unloading state has to be created because managed code in the
929 DomainUnload event can depend on things like the threadpool still working.
930 The domain must remain fully functional while the event executes.
932 This shown as an issue due to Process::WaitForExit, which waits for
933 async reads of stdout and stderr to complete. Since those are processed
934 in the threadpool the code deadlocks because the DomainUnload callback
935 waits for the async read finished event, which should have been set by a
936 threadpool job but has been discarded due to the domain been in unload
939 2009-01-21 Mark Probst <mark.probst@gmail.com>
941 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
944 2009-01-21 Mark Probst <mark.probst@gmail.com>
946 * reflection.c (resolve_object): For fields, inflate the class and
947 then get the field in the inflated class.
949 2009-01-20 Mark Probst <mark.probst@gmail.com>
951 * object-internals.h (struct _MonoException): Added a comment
952 explaining the new use of trace_ips.
954 2009-01-20 Mark Probst <mark.probst@gmail.com>
956 * generic-sharing.c (inflate_other_data): Inflate array methods
959 * loader.c, class-internals.h: Rename search_in_array_class() to
960 mono_method_search_in_array_class() and make it non-static.
962 2009-01-19 Zoltan Varga <vargaz@gmail.com>
964 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
965 Hopefully fixes #458168.
967 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
969 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
970 as it is performed elsewhere.
972 Code is contributed under MIT/X11 license
974 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
976 * mono-perfcounters-def.h: Add counters for asp.net requests total and
978 * object.c (mono_raise_exception): Increment the exceptions total
979 counter when an exception is thrown.
980 * class-internals.h: Add a location for storing the total number of
981 asp.net requests served.
982 * mono-perfcounters.c: Implement update support for asp.net counters
983 from the class libraries. Implement read support for asp.net counters
984 and exceptions total counter.
986 2009-01-19 Zoltan Varga <vargaz@gmail.com>
988 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
989 accessing klass->methods. Fixes #467385.
991 2009-01-18 Zoltan Varga <vargaz@gmail.com>
993 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
994 for byval arguments without an [Out] attribute. Fixes #467212.
996 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
997 Fix compilation under android.
999 * sgen-gc.c: Instead of scanning gray objects after all roots have been
1000 processed, scan them directly after they are copied, to achieve better locality
1003 * socket-io.c: Applied patch from Koushik Dutta
1004 (koush@koushikdutta.com). Disable IPV6 when running under android.
1006 2009-01-18 Zoltan Varga <vargaz@gmail.com>
1008 * icall.c (ves_icall_InternalExecute): Add write barriers.
1010 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
1013 * sgen-gc.c: Implement write barriers in IL code.
1015 2009-01-17 Geoff Norton <gnorton@novell.com>
1017 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
1019 2009-01-17 Geoff Norton <gnorton@novell.com>
1021 * image.c: When unloading the image->references table, there can be gaps
1022 in it. Ensure that we iterate every entry to avoid leaking assembly references
1023 when unloading an appdomain.
1025 2009-01-16 Zoltan Varga <vargaz@gmail.com>
1027 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
1028 speed up ptr-in-nursery checks.
1030 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
1031 threads_lock () to prevent deadlocks.
1033 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
1034 does not need to be scanned during minor collections, since writes to it
1035 must use write barriers.
1037 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
1039 * metadata-verify.c: Add pe nt header verification.
1041 2009-01-15 Zoltan Varga <vargaz@gmail.com>
1043 * gc.c: Fix a few warnings when using SGEN.
1045 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
1047 * metadata-verify.c: Add pe optional header verification.
1049 2009-01-15 Zoltan Varga <vargaz@gmail.com>
1051 * sgen-gc.c: Add support for user defined marker functions, used by
1052 MonoGHashTable to avoid registering a GC root for every hash node.
1054 2009-01-14 Zoltan Varga <vargaz@gmail.com>
1056 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
1057 non-pinned roots into separate hashes to avoid having to traverse them
1058 in functions which are only interested in one kind.
1060 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
1062 * metadata-verify.c: Add pe header machine field verification.
1064 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
1066 * metadata-verify.c: Add pe header size verification.
1068 2009-01-14 Zoltan Varga <vargaz@gmail.com>
1070 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
1071 using the GC, they don't contain references.
1073 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
1075 2009-01-13 Geoff Norton <gnorton@novell.com>
1077 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
1078 AppDomains created on the native side can be cleaned up on the native side.
1080 2009-01-13 Geoff Norton <gnorton@novell.com>
1082 * appdomain.c: Ensure that we call mono_context_init for the embedding api
1083 as well as the managed api.
1085 2009-01-13 Geoff Norton <gnorton@novell.com>
1087 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
1088 with a MonoAppDomain initialized against it.
1090 2009-01-13 Zoltan Varga <vargaz@gmail.com>
1092 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
1094 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
1096 * marshal.c: Avoid setting the exception clauses after a method has been entered
1097 into the wrapper caches. Fixes #465700.
1099 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
1101 (mono_mb_create_method): Set the clauses from the method builder.
1103 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
1105 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
1106 Patch from Makoto Kishimoto.
1108 2009-01-13 Zoltan Varga <vargaz@gmail.com>
1110 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
1111 encoding them as ROOT_DESC_COMPLEX.
1112 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
1114 2009-01-12 Zoltan Varga <vargaz@gmail.com>
1116 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
1117 no longer point to the nursery.
1119 * sgen-gc.c: Add a few comments/FIXMEs.
1121 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
1123 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
1124 initialization of the various _method variables thread safe. Fixes
1127 2009-01-12 Mark Probst <mark.probst@gmail.com>
1129 * domain.c, domain-internals.h: Remove the shared_generics_hash
1130 and its lookup functions.
1132 2009-01-12 Bill Holmes <billholmes54@gmail.com>
1134 * socket-io.c: Fixing the MSVC build.
1136 Code is contributed under MIT/X11 license.
1138 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
1140 * metadata-verify.c: Add pe header watermark verification.
1142 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
1144 * metadata-verify.c: Add lfanew verification.
1146 2009-01-12 Jb Evain <jbevain@novell.com>
1148 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
1149 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
1151 2009-01-10 Zoltan Varga <vargaz@gmail.com>
1153 * socket-io.c: Fix the build.
1155 * environment.c: Fix an #ifdef.
1157 2009-01-09 Zoltan Varga <vargaz@gmail.com>
1159 * threadpool.c (async_invoke_thread): Handle the wait function returning
1160 WAIT_IO_COMPLETION as well.
1161 (async_invoke_io_thread): Ditto.
1163 2009-01-09 Bill Holmes <billholmes54@gmail.com>
1165 * threads.c: Fixing the Windows build.
1167 Code is contributed under MIT/X11 license.
1169 2009-01-09 Zoltan Varga <vargaz@gmail.com>
1171 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
1173 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
1174 the thread to wait again.
1176 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
1178 * metadata-verify.c: Initial skeleton of the metadata verifier.
1180 * pedump.c: Add support for the metadata verifier.
1182 * verify-internal.h: Export the whole assembly metadata verifier function.
1184 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
1186 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
1188 2009-01-09 Zoltan Varga <vargaz@gmail.com>
1190 * Makefile.am: Upgrade dtrace-prelink.sh location.
1192 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1194 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
1195 well. Otherwise the shutdown deadlock that happens on unix will can happen
1197 If the main thread code finishes too fast it's possible that the finalizer
1198 thread won't have executed yet, won't record itself as the finalizer thread
1199 and the shutdown sequence will wait on it forever.
1201 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1203 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
1206 2009-01-08 Miguel de Icaza <miguel@novell.com>
1208 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
1209 Robert Jordan for pointing this out.
1211 2009-01-08 Christian Prochnow <cproch@seculogix.de>
1214 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
1215 ves_icall_System_IO_DriveInfo_GetDriveType.
1217 2009-01-07 Miguel de Icaza <miguel@novell.com>
1219 * icall.c: Wrap calls to mono_strtod in CriticalSection
1220 invocations when using eglib, to work around #464316.
1222 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1224 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
1225 return value of GetCurrentDirectory to never access unitialized memory.
1227 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1229 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
1230 return value of GetCurrentDirectory and expand the buffer if needed.
1234 2009-10-07 Tom Hindle <tom_hindle@sil.org>
1236 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
1237 Adding a call to mono_init_com_types.
1239 Code is contributed under MIT/X11 license.
1241 2009-01-07 Geoff Norton <gnorton@novell.com>
1243 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
1244 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
1245 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
1246 be the value of the ip buffer.
1248 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
1250 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
1251 interfaces_packed here.
1253 Fixes part of #463294.
1255 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
1257 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
1259 Fixes part of #463294.
1261 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
1263 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
1264 is a boxed complex as well.
1266 Fixes part of #463294.
1268 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
1270 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
1271 control if a methodspec should be created for the generic method definition from external assemblies.
1272 Caching of methodspec is done using the handleref hash table.
1276 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
1278 * loader.c (find_method): When searching the interfaces of a class
1279 check the transitive closure of implemented interfaces.
1283 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
1285 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
1287 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
1289 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
1290 interfaces calculation to fill_valuetype_array_derived_types.
1292 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
1293 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
1296 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
1297 interfaces for valuetypes if needed.
1299 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
1300 for their basetype as well. Types are array expanded if rank is > 0.
1304 2008-12-30 Bill Holmes <billholmes54@gmail.com>
1306 * socket-io.h : Changing the signature of
1307 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
1310 * icall-def.h : Changing the signature of
1311 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
1313 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
1314 For Windows only. Avoid blocking when calling accept by
1315 querying for a connection via select. The loop also queries
1316 the thread state every 1000 micro seconds for the thread
1317 stop state. This will avoid the process hanging on shutdown
1318 when using a TcpChannel that is never connected to.
1320 Code is contributed under MIT/X11 license.
1322 2008-12-30 Marek Safar <marek.safar@gmail.com>
1324 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
1326 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1328 * class.c (get_implicit_generic_array_interfaces): Extract common
1329 code to a helper function making it a lot easier on the eyes.
1331 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1333 * class.c (get_implicit_generic_array_interfaces): If the internal
1334 enumerator is an interface inflate System.Object instead of itself.
1338 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
1340 * object.c (mono_runtime_invoke_array): Don't assert with
1341 byref nullable types.
1343 * marshal.c (mono_marshal_get_runtime_invoke): To handle
1344 byref nullables we unbox the object and store it on the
1346 We can't use the boxed object since it is the T of Nullable<T>
1347 and the boxed representation of a nullable it's underlying type
1349 We could cheat and create a boxed nullable and use the same
1350 machinery of other byref VTs but this feels like a hack and
1351 using the stack has the bonus of reducing heap pressure.
1355 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
1357 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
1362 2008-12-19 Bill Holmes <billholmes54@gmail.com>
1364 * icall-def.h : Adding an internal call definition for
1365 System.Environment.internalBroadcastSettingChange.
1367 * icall.c : Adding a Windows only implementation to broadcast a
1368 WM_SETTINGCHANGE when an environment variable has changed.
1370 Code is contributed under MIT/X11 license.
1372 2008-12-19 Mark Probst <mark.probst@gmail.com>
1374 * class.c, class-internals.h: Made
1375 mono_class_has_parent_and_ignore_generics() non-static.
1377 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
1379 * image.c: deal with the mmap failing when loading an image.
1381 2008-12-17 Geoff Norton <gnorton@novell.com>
1383 * threadpool.c: Ensure that the io_queue_lock is initialized
1384 in all circumstances, as we always attempt to cleanup against it.
1386 2008-12-17 Miguel de Icaza <miguel@novell.com>
1388 * icall.c (ves_icall_System_Environment_get_Platform): For
1389 compatibility reasons for existing client code we will keep
1390 returning 4 for a while.
1392 For how long will depend on the documentation being updated, and
1393 for us to give client code a chance to be updated.
1395 This reverts the original decison on #433108 since we did not
1396 catch roughly 33 instances of the broken code in our own source
1397 code base, we did not catch failures on the buildbots, and QA did
1398 not bring this as a problem.
1400 Only today I found some customer's code breaking due to our own
1401 class libraries not being fully updated and tracked it down to
1402 this change. I am reverting it because if we could not even get
1403 our story straight in our own code base, how can we hope that our
1404 end user code be fixed?
1406 As of this morning, our Wiki page that documents how to detect
1407 Unix had not been fixed.
1409 2008-12-16 Zoltan Varga <vargaz@gmail.com>
1411 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
1413 * class.c (mono_class_get_fields): Handle loading errors.
1415 2008-12-12 Mark Mason <mmason@upwardaccess.com>
1417 * 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.
1419 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
1421 * mono-perfcounters.c: avoid warning.
1423 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1425 * reflection.c (ensure_runtime_vtable): Work on generic instances and
1426 make sure all interfaces have MonoClass::interface_id set.
1428 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
1429 method table is property set.
1431 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1433 * class.c: New function mono_class_setup_interface_id that setup
1434 MonoClass::interface_id if needed.
1436 * class-internals.h: Export new function.
1438 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1440 * class.c: Add code to sanity check the vtable after setup_vtable_general
1443 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1445 * icall.c: make Assembly.GetExecutingAssembly work properly when
1446 reflection is used to invoke the method.
1449 2008-12-11 Mark Probst <mark.probst@gmail.com>
1451 * metadata/generic-sharing.c: Look for constraints in all type
1452 arguments, not just the first one.
1454 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1456 * appdomain.c: return the correct CodeBase for an Assembly instance
1457 that was loaded from the shadow-copy directories.
1460 2008-12-10 Zoltan Varga <vargaz@gmail.com>
1462 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
1464 * sgen-gc.c (check_object): New debugging helper function.
1466 * object.c: Fix calls to mono_value_copy_array ().
1468 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1470 * class.c (mono_class_setup_fields): If working on an inflated class
1471 first check if the generic definition did init with success.
1475 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1477 pedump.c (main): Fix a warning.
1479 2008-12-10 Bill Holmes <billholmes54@gmail.com>
1481 * object-internals.h : Adding a definition for
1482 MonoReflectionComVisibleAttribute.
1484 * marshal.c (cominterop_com_visible) : Method added to check the
1485 ComVisible attribute of a class.
1487 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
1488 cominterop_raise_hr_exception added to consolidate common code
1489 to raise hr exceptions.
1491 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
1492 if a managed class should support IDispatch.
1495 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
1496 Added additional checks for managed object when getting
1497 an IDispatch interface.
1499 Code is contributed under MIT/X11 license.
1501 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1503 pedump.c (main): Handle mono_get_method () returning NULL.
1505 2008-12-09 Zoltan Varga <vargaz@gmail.com>
1507 * marshal.h: Fix a warning.
1509 2008-12-09 Bill Holmes <billholmes54@gmail.com>
1511 * marshal.c : Adding cominterop_release_all_rcws to release all
1512 runtime callable wrappers held by the runtime.
1514 * marshal.h : Adding declaration for cominterop_release_all_rcws.
1516 Code is contributed under MIT/X11 license.
1518 2008-12-09 Zoltan Varga <vargaz@gmail.com>
1520 * metadata.c (mono_image_alloc_lock): New helper function.
1521 (mono_image_alloc0_lock): Ditto.
1523 * metadata.c: Use the alloc_lock () helper functions for allocating
1524 memory from the image mempool.
1526 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1528 * class.c (mono_class_from_generic_parameter): Document it's
1529 locking behavior. Fix double checked locking here, we stored in
1530 param->pklass a partially initialized MonoClass and no membar was used.
1532 2008-12-05 Marek Habersack <mhabersack@novell.com>
1534 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
1535 (3) functions are present in the C library use them to do the
1536 job. If they are absent, make sure that the sum of int_part and
1537 dec_part is rounded before returning. This is necessary due to the
1538 division of dec_part by the power of 10 before the final addition
1539 is performed - if the result is not rounded in some cases it will
1540 yield invalid results.
1542 2008-12-04 Zoltan Varga <vargaz@gmail.com>
1544 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
1545 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
1546 instruction instead of a pointer constant.
1548 2008-12-03 Zoltan Varga <vargaz@gmail.com>
1550 * loader.c (mono_method_get_header): Do most of the work outside the
1551 loader lock, to avoid assembly load hook deadlocks.
1553 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
1554 (mono_metadata_parse_type_full): Ditto.
1556 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1558 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
1559 Make the stack depth fixed. Ensure proper argument passing to the backtrace
1560 funtions. Finally, use a lock to produce well ordered output.
1562 The lock looks silly, as all calls to the corlib mempool should be guarded
1563 with the loader lock, but for some reason this fact doesn't help.
1565 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
1567 2008-12-02 Mark Probst <mark.probst@gmail.com>
1569 * socket-io.c: 64 bit big-endian fixes.
1571 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1573 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
1574 targets that require strict compatibility between the types.
1576 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
1577 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
1578 Kill the strict argument and create a new one valuetype_must_be_boxed.
1580 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
1581 state that all valuetypes must be boxed.
1585 2008-11-29 Kornél Pál <kornelpal@gmail.com>
1587 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
1588 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
1590 Contributed under MIT/X11 license.
1592 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
1594 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
1595 the inflate_generic_type machinery should handle it.
1597 This avoids a crash when the field's flags is zero and it's type is
1599 What happens is that mono_metadata_parse_type_full will see that opt_attrs
1600 is zero and will return one of the cached built-in primitive types. Since
1601 those types live in read-only memory, the code that copies it crashes.
1603 2008-11-28 Mark Probst <mark.probst@gmail.com>
1605 * object.c: Don't put function descriptors into generalized IMT
1608 2008-11-28 Mark Probst <mark.probst@gmail.com>
1610 * class.c: Enable generic code sharing on PPC64.
1612 2008-11-27 Mark Probst <mark.probst@gmail.com>
1614 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
1617 * generic-sharing.c: Allocate the method template slists from the
1618 image mempool so it doesn't leak.
1620 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1622 * class.c (generic_array_methods): Release the linked list.
1624 2008-11-27 Mark Probst <mark.probst@gmail.com>
1626 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
1627 invocation to g_utf16_to_utf8().
1629 2008-11-26 Mark Probst <mark.probst@gmail.com>
1631 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
1632 arguments on big endian archs.
1634 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1636 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
1637 the type name (test added in corlib).
1639 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1641 * pedump.c: initialize perf. counters. Fixes a segv.
1643 2008-11-25 Martin Baulig <martin@ximian.com>
1645 * mono-debug-debugger.c
1646 (mono_debugger_runtime_invoke): Return the exception object if an
1647 exception was thrown. Visual Studio displays the exception object
1648 in the locals window.
1650 2008-11-24 Mark Probst <mark.probst@gmail.com>
1652 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
1655 2008-11-24 Mark Probst <mark.probst@gmail.com>
1657 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
1658 MONO_TYPE_U are sizeof (gpointer), too.
1660 2008-11-24 Mark Probst <mark.probst@gmail.com>
1662 * marshal.c (mono_type_native_stack_size): Fixed size and
1663 alignment for reference types.
1665 2008-11-23 Mark Probst <mark.probst@gmail.com>
1667 * class.c (mono_class_generic_sharing_enabled): Disable generic
1668 code sharing for PPC64.
1670 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1672 * icall.c (mono_method_get_equivalent_method): Make sure
1673 method->klass->methods is inited before looping over it.
1675 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1677 * object.c: when calling ExecuteAssembly in a newly created domain,
1678 the configuration file and application base are already set up.
1679 Bug #446353 take 2 fixed.
1681 2008-11-20 Zoltan Varga <vargaz@gmail.com>
1683 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
1684 Fixes #444715. Fix a warning.
1686 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
1688 * appdomain.c: write the full path of the assembly to the .ini file
1689 created when "shadow-copying"
1692 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1694 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
1695 if signature==FALSE.
1697 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1699 * marshal.h : Fix the cygwin build.
1700 marshal.c:12442: undefined reference to `_IID_IMarshal'
1702 Code is contributed under MIT/X11 license.
1704 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1706 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
1707 free threaded marshaler when QueryInterface is called on a COM callable
1708 wrapper requesting the IMarshal interface.
1710 Code is contributed under MIT/X11 license.
1712 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1714 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
1716 * reflection.c (mono_type_get_object): Special case the very common
1719 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
1722 2008-11-13 Bill Holmes <billholmes54@gmail.com>
1724 * process.h : Adding method declaration for
1725 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1727 * process.c : Adding implementation for
1728 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1730 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
1731 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1733 Code is contributed under MIT/X11 license.
1735 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
1737 * appdomain.c (unload_thread_main): Clean up threadpool by
1738 calling mono_thread_pool_remove_domain_jobs.
1740 * domain-internals.h (struct _MonoDomain): Add new fields to
1741 help coordinate the cleanup of the threadpool.
1743 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
1744 that cleans up the threadpool of all jobs associated with an appdomain.
1745 It does that by cleaning up the queues and making sure all active
1746 threads are accounted.
1748 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
1749 unloaded or in the process of. Take this is such way that there is
1750 no race condition between another thread starting the unload and the
1751 current thread acknowledging it.
1753 * threadpool.c (async_invoke_thread): Same.
1755 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
1756 firing the new thread.
1758 * threadpool.c (start_tpthread): Same.
1760 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
1762 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
1764 2008-11-06 Jonathan Chambers <joncham@gmail.com>
1766 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
1767 Add support for DuplicateHandle.
1769 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
1770 Add support for DuplicateHandle.
1772 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
1773 Add support for DuplicateHandle.
1775 Code is contributed under MIT/X11 license.
1777 2008-11-06 Mark Probst <mark.probst@gmail.com>
1779 * class-internals.h: Make min_align into a whole byte.
1781 * class.c: Set min_align for SIMD types to 16.
1783 2008-11-05 Geoff Norton <gnorton@novell.com>
1785 * attach.c: Default the attacher to enabled for all cases including
1788 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1790 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
1793 2008-11-04 Mark Probst <mark.probst@gmail.com>
1795 * monitor.c, monitor.h: New function for querying offsets of
1796 members of MonoThreadsSync.
1798 2008-11-04 Zoltan Varga <vargaz@gmail.com>
1800 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
1801 to speed up this function and to avoid the boundless memory growth caused by
1802 the signature_dup () calls.
1804 2008-11-02 Zoltan Varga <vargaz@gmail.com>
1806 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
1809 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
1812 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
1814 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
1817 * domain-internals.h: made mono_set_private_bin_path_from_config()
1819 * object.c: call the above function after setting the configuration
1820 file path for the root domain.
1823 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
1825 * assembly.c: when the assembly is loaded from an absolute path, end
1826 basedir with a directory separator.
1829 2008-10-30 Mark Probst <mark.probst@gmail.com>
1831 * monitor.c (mono_monitor_get_fast_enter_method): If
1832 CompareExchange is not available, don't create the fastpath
1833 instead of asserting. (The method is missing in the 1.1 profile.)
1835 2008-10-30 Mark Probst <mark.probst@gmail.com>
1837 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
1839 * monitor.c, monitor.h: Code for generating Monitor.Enter and
1840 Monitor.Exit IL fastpaths.
1842 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1844 * class.c (mono_class_create_from_typedef): Added Vector2ul.
1846 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1848 * class.c (mono_class_create_from_typedef): Added Vector2l.
1850 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
1852 * class.c (mono_class_create_from_typedef): Added Vector2d.
1854 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1856 * appdomain.c: translate \ into / for cache_path.
1857 * domain-internals.h: new mono_is_shadow_copy_enabled().
1858 * icall.c: (fill_reflection_assembly_name) do the same path
1859 manipulations that get_code_base does.
1860 (get_code_base) use mono_is_shadow_copy_enabled.
1862 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1864 * appdomain.c: shadow-copied assemblies go to CachePath +
1865 ApplicationName when both are set. DynamicBase has nothing to do with
1869 2008-10-26 Zoltan Varga <vargaz@gmail.com>
1871 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
1872 STANDALONESIG table.
1874 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
1875 standalone signatures.
1877 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
1878 comparison code: instead of comparing the signatures using a custom
1879 equals function, transform them to a common signature and compare that. This
1880 works better with AOT.
1882 2008-10-25 Zoltan Varga <vargaz@gmail.com>
1884 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
1886 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
1887 call for generic instances.
1888 (mono_class_setup_properties): Call setup_properties () before accessing
1891 * class.c (mono_class_get_virtual_methods): New helper function to iterate
1892 over the virtual methods of a class using metadata if possible, avoiding the
1893 creation of MonoMethod's for non-virtual methods.
1895 * class.c (mono_class_setup_vtable_general): Rewrite this to use
1896 get_virtual_methods () to iterate over the virtual methods of classes.
1898 2008-10-25 Martin Baulig <martin@ximian.com>
1900 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
1902 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1904 * class.c (mono_class_create_from_typedef): Added Vector4i.
1906 2008-10-24 Mark Probst <mark.probst@gmail.com>
1908 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
1909 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
1910 special-casing applies to eliminate the call completely.
1912 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1914 * class.c (mono_class_create_from_typedef): Added Vector8s.
1916 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
1918 * class.c (mono_class_create_from_typedef): Added Vector16sb.
1920 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
1922 * icall.c: get rid of annoying warning.
1924 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
1926 * threadpool.c: in 1.x, if you change the background status of the
1927 threadpool thread, it's not reset.
1928 Remove unnecessary calls to SetState.
1930 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1932 * threadpool.c: asynchronously create a set of idle threads upon first
1933 use of the threadpool. SetMinThreads will now start the appropriate
1934 number of idle threads if they are not already running. The default is
1935 1 threadpool thread per CPU. Increased the maximum number of threads
1938 2008-10-22 Martin Baulig <martin@ximian.com>
1940 Revert r116521 from Zoltan, it breaks the debugger:
1942 * class.c (mono_class_get_virtual_methods): New helper function to iterate
1943 over the virtual methods of a class using metadata if possible, avoiding the
1944 creation of MonoMethod's for non-virtual methods.
1946 * class.c (mono_class_setup_vtable_general): Rewrite this to use
1947 get_virtual_methods () to iterate over the virtual methods of classes.
1949 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1951 * threads.c: when creating a threadpool thread, set its state to
1953 * threadpool.c: reset the background state of a threadpool thread
1954 after finishing each work item
1957 2008-10-22 Zoltan Varga <vargaz@gmail.com>
1959 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
1961 * class.c (mono_class_setup_vtable_general): Add an optimized version for
1962 generic instances which works by inflating the methods in the container
1965 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
1966 variant which doesn't make a copy if no inflation was done.
1967 (mono_class_setup_fields): Use it.
1969 * metadata.c (mono_metadata_get_shared_type): New helper function to
1970 return a shared instance of a given MonoType.
1972 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
1973 a copy of most non-generic types.
1975 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1977 * threadpool.c: remove one more GetSystemInfo () call.
1979 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
1981 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
1982 use the code in mono-proclib.h to get processor information.
1984 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1986 * appdomain.c: fixed the logic that determines whether assemblies in a
1987 directory are "shadow-copied" or not. Bug #433483 fixed.
1989 2008-10-22 Zoltan Varga <vargaz@gmail.com>
1991 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
1994 2008-10-21 Zoltan Varga <vargaz@gmail.com>
1996 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
1999 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
2000 reflection.c: Use mono_field_get_name () for accessing a field's name.
2002 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
2005 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
2008 * loader.c (find_method_in_class): Reenable the metadata optimization by
2009 not using it for generic instances.
2011 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
2012 data/def_type fields from MonoClassField into a separate structure.
2013 (struct MonoClassField): Remove data/def_type fields.
2014 (struct _MonoClass): Add a 'field_def_values' array to store the default
2015 values/RVA for fields.
2017 * class.c reflection.c: Update after the changes.
2019 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
2020 for accessing field->data.
2022 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
2024 * loader.c (find_method_in_class): Revert the last change for now as
2025 it breaks Mono.C5 unit tests.
2027 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
2028 'field_generic_types' and 'field_objects' which contain the information
2029 previously stored in MonoInflatedField.
2030 (MonoInflatedField): Delete.
2031 (struct _MonoClassField): Delete 'generic_info' field.
2033 * reflection.c: Store the information which was previously in
2034 field->generic_info in MonoDynamicGenericClass instead.
2036 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
2037 MonoClassField changes.
2039 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
2041 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
2042 store the value inside the data array of the MonoMethodWrapper.
2043 This saves memory, is faster and fixes the lifetime issues (methods
2044 were never removed from the hash previously). May also fix bug#436996.
2046 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2048 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
2049 generic instances, compute the type from the generic definition instead of
2050 looking in field->generic_info.
2052 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
2053 for inflated fields, the only user was get_fieldref_token () which no
2056 * class.c (mono_class_init): Revert the last change as it seems to cause
2059 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
2060 bytes on 64 bit platforms.
2062 * object.c (mono_class_create_runtime_vtable): Fix a warning.
2064 * object.c (mono_class_create_runtime_vtable): Don't initalize
2065 field->data/field->def_type here, it is done lazily by
2066 mono_class_get_field_default_value ().
2068 * icall.c (ves_icall_get_enum_info): Call
2069 mono_class_get_field_default_value () instead of directly accessing
2070 field->data and field->def_type.
2072 * object.c (get_default_field_value): Ditto.
2074 * class.c (mono_field_get_data): Ditto.
2076 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
2077 call for generic instances.
2079 * loader.c (find_method_in_class): If klass != from_class, then inflate
2080 the method with the context of from_class, since the caller assumes this.
2082 2008-10-20 Zoltan Varga <vargaz@gmail.com>
2084 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
2085 for accessing method->slot.
2087 2008-10-20 Cedric Vivier <cedricv@neonux.com>
2089 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
2091 2008-10-19 Zoltan Varga <vargaz@gmail.com>
2093 * class.c (mono_method_get_vtable_index): Use
2094 mono_method_get_vtable_slot () for accessing method->slot.
2096 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
2097 accessing klass->methods.
2099 * class.c (mono_method_get_vtable_slot): New helper function.
2100 (mono_class_get_vtable_entry): Ditto.
2101 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
2102 accessing method->slot.
2104 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
2105 method to get_inflated_method ().
2107 * class.c (mono_class_get_inflated_method): New helper method to obtain
2108 a method of an inflated class without calling setup_methods ().
2109 (mono_class_get_cctor): Use get_inflated_method.
2111 * generic-sharing.c (mono_class_get_method_generic): Ditto.
2113 * marshal.c image.c: Lazily create all the marshal caches.
2115 * image.c (mono_image_init): Move initialization of runtime_invoke
2116 caches to marshal.c.
2118 * marshal.c (get_cache): New helper function to lazily initialize a
2120 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
2122 * debug-helpers.c (mono_method_full_name): Include generic arguments.
2124 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
2126 * loader.c: fixed check for interface type.
2128 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
2130 * appdomain.c: check for NULL setup before it's referenced.
2133 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
2135 * class.c: remove the unused old vtable setup code.
2137 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
2139 * class.c: don't depend on interface order in
2140 setup_interface_offsets (bug #435777).
2141 * reflection.c: sort the InterfaceImpl table (patch from
2142 Jb Evain <jbevain@novell.com>).
2144 2008-10-13 Zoltan Varga <vargaz@gmail.com>
2146 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
2147 the low level assemblies lock.
2149 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
2151 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
2152 object.c, reflection.c, socket-io.c, threads.c: introduced
2153 mono_framework_version () to return the major framewrok version,
2154 changed the code that was using more complex patterns to use it.
2155 Return the correct value for PlatformID for OSX.
2157 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
2159 * icall-def.h, process.h, process.c: added an icall to get info about
2160 processes using mono-proclib.
2162 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
2164 * mono-perfcounters.c: use the mono-proclib functions to
2165 access process information.
2167 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
2169 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
2170 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
2171 reflection.c: remove rawbuffer usage: mmap support is more sanely
2172 provided by utils/mono-mmap.
2174 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
2176 * gc.c: use posix semaphores when possible so that
2177 mono_gc_finalize_notify() is signal safe.
2179 2008-10-11 Zoltan Varga <vargaz@gmail.com>
2181 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
2182 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
2183 be #ifdef-ed out, the linker will remove the rest.
2185 * marshal.c: Implement DISABLE_COM.
2187 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
2189 2008-10-11 Miguel de Icaza <miguel@novell.com>
2191 * locales.c (string_invariant_compare_char): Optimization: do not
2192 call g_unichar_type unless we actually need the information.
2194 2008-10-10 Mark Probst <mark.probst@gmail.com>
2196 * object.c, class-internals.h: Also create remoting trampolines
2197 for generic methods. Pass the domain to the remoting trampoline
2198 creation function, too.
2200 2008-10-10 Zoltan Varga <vargaz@gmail.com>
2202 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
2204 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2206 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
2209 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
2212 * locales.c: remove the use of g_strdown. Fixes bug #322313.
2214 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2216 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
2217 for the least possible amount of time (extending the fix in r113458).
2219 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2221 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
2223 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2225 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
2226 as possible simd intrinsic types.
2227 Optimized the test to check for the common prefix first.
2229 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
2231 * class.c: back out part of a broken optimization committed on
2232 May 23th (bug #433908).
2234 2008-10-09 Mark Probst <mark.probst@gmail.com>
2236 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
2237 Win32. Should fix #432388 for most cases until we have the new
2240 2008-10-08 Zoltan Varga <vargaz@gmail.com>
2242 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
2243 instead of using inst->id so the hash is stable for AOT.
2245 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
2248 * icall.c: create a .ini file for shadow-copied assemblies that
2249 contains the location of the original assembly. Use this to return the
2250 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
2251 Also fix the number of '/' for windows when returning the CodeBase.
2254 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2256 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
2258 Code is contributed under MIT/X11 license.
2260 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2262 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
2263 if if the class vtable needs initialized.
2265 Code is contributed under MIT/X11 license.
2267 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2269 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
2270 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
2271 STRING->BSTR, and CLASS->INTERFACE.
2273 Code is contributed under MIT/X11 license.
2275 2008-10-07 Marek Habersack <mhabersack@novell.com>
2277 * sysmath.h: changed the declaration of the
2278 ves_icall_System_Math_Round2 icall by adding an extra
2279 away_from_zero parameter.
2281 * sysmath.c (ves_icall_System_Math_Round2): added support for
2282 away from zero rounding. The icall now takes an extra boolean
2283 parameter to signal that away from zero operation is requested.
2285 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2287 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
2288 the delegate klass so it can work with full-aot.
2289 (mono_marshal_get_delegate_end_invoke): Ditto.
2290 (mono_marshal_get_delegate_invoke): Ditto.
2292 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
2294 * gc.c, attach.h, attach.c: remove a bad pattern:
2295 add_finalizer_callback () is not implemented correctly, it can't
2296 without adding more overhead to the finalizer loop and it's not
2297 even needed, since we know exactly what we need to call, so there is
2298 no need to do so through an expensive function pointer.
2300 2008-10-04 Zoltan Varga <vargaz@gmail.com>
2302 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
2304 * attach.c (mono_attach_init): Remove the #ifdef.
2306 2008-10-04 Andreas Färber <andreas.faerber@web.de>
2308 * attach.c (mono_attach_init): Don't use
2309 mono_gc_add_finalizer_thread_callback when compiling without GC.
2312 Code is contributed under MIT/X11 license.
2314 2008-10-03 Zoltan Varga <vargaz@gmail.com>
2316 * class.c (mono_class_create_from_typedef): Remove the
2317 #ifndef DISABLE_SIMD stuff.
2319 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2321 * class-internals.h (MonoClass): Added simd_type bit field.
2323 * class.c (mono_class_create_from_typedef): Check if type is a simd
2326 2008-10-03 Mark Probst <mark.probst@gmail.com>
2328 * object.c (mono_method_add_generic_virtual_invocation): Only add
2329 instantiations to the thunk whose count is at least as large as
2332 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2334 * icall.c: changed the Type of the exception thrown when trying to
2335 invoke a constructor on an abstract class. Part of the fix for bug
2338 2008-10-02 Mark Probst <mark.probst@gmail.com>
2340 * class.c, class-internals.h (mono_method_get_vtable_index): New
2341 function which returns the index into the vtable and properly
2342 handles inflated virtual generic methods.
2344 2008-10-01 Mark Probst <mark.probst@gmail.com>
2346 * object.c, domain.c, object-internals.h, domain-internals.h:
2347 Generalize IMT thunk machinery to also handle thunks for virtual
2348 generic method invokes. When a virtual generic method is invoked
2349 more than a number of times we insert it into the thunk so that it
2350 can be called without lookup in unmanaged code.
2352 * generic-sharing.c, class-internals.h: Fetching a
2353 MonoGenericInst* for a method from an (M)RGCTX.
2355 2008-10-01 Zoltan Varga <vargaz@gmail.com>
2357 * marshal.c (emit_marshal_string): Applied a variant of a patch by
2358 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
2359 marshalling. Fixes #431304.
2361 2008-10-01 Bill Holmes <billholmes54@gmail.com>
2363 * marshal.c (emit_marshal_variant) : Change the attribute checks to
2364 handle when ref is specified without In or Out.
2366 Code is contributed under MIT/X11 license.
2368 2008-09-30 Mark Probst <mark.probst@gmail.com>
2370 * loader.c (mono_get_method_constrained): Don't expand method with
2371 the class's context, because it's already a method of that class.
2373 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
2375 * attach.c : should be correct build fix.
2377 2008-09-29 Zoltan Varga <vargaz@gmail.com>
2379 * attach.c: Fix the previous change.
2381 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
2383 * attach.c : quick w32 build fix.
2385 2008-09-27 Miguel de Icaza <miguel@novell.com>
2387 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
2388 crashes MonoDevelop: #430455.
2390 2008-09-27 Zoltan Varga <vargaz@gmail.com>
2392 * domain-internals.h (struct _MonoDomain): Move most fields used only by
2393 the JIT do MonoJitDomainInfo in ../mini/mini.h.
2395 * domain.c: Remove initialization/cleanup of the removed fields.
2397 2008-09-27 Mark Probst <mark.probst@gmail.com>
2399 * class.c (mono_class_generic_sharing_enabled): Enable generic
2400 code sharing for PPC.
2402 2008-09-26 Bill Holmes <billholmes54@gmail.com>
2404 * attach.c : Fixing the Windows builds.
2406 Code is contributed under MIT/X11 license.
2408 2008-09-25 Zoltan Varga <vargaz@gmail.com>
2410 * class.c (mono_class_generic_sharing_enabled): Experimentally change
2411 the default generic sharing mode to 'all'.
2413 2008-09-25 Mark Probst <mark.probst@gmail.com>
2415 * generic-sharing.c, class-internals.h: New function for checking
2416 whether a method needs a static RGCTX invoke wrapper. A few
2417 funtions moved from mini/generic-sharing.c.
2419 * icall.c: New function used.
2421 2008-09-25 Mark Probst <mark.probst@gmail.com>
2423 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
2424 Static RGCTX invoke wrapping applies to value type methods, too.
2426 * class.c (mono_class_setup_vtable_general): In generic-shared
2427 value types, wrap methods with a static RGCTX invoke wrapper.
2429 2008-09-25 Zoltan Varga <vargaz@gmail.com>
2431 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
2434 2008-09-24 Zoltan Varga <vargaz@gmail.com>
2436 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
2437 register a callback which is called when the finalizer thread is woken
2439 (finalizer_thread): Call the callback if it exists.
2441 * attach.h attach.c: New files, implementing the attach mechanism.
2443 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
2445 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
2446 by the previous change.
2448 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2450 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
2451 loader.c, marshal.c, metadata-internals.h, metadata.c,
2452 method-builder.c, object.c, reflection.c: introduced specific functions
2453 to allocate from the domain and image mempools and cleaned up most of
2454 the code to use them (still missing a few in reflection.c).
2455 Keep the loader bytes counter updated.
2457 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
2459 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
2460 loader-related counters.
2462 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
2464 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
2465 added more MS-compatible counters.
2467 2008-09-22 Zoltan Varga <vargaz@gmail.com>
2469 * class.c (mono_class_setup_fields): Call setup_fields before accessing
2470 class->blittable. Fixes #428217.
2472 2008-09-21 Zoltan Varga <vargaz@gmail.com>
2474 * reflection.c (mono_image_get_field_on_inst_token): Call
2475 field_encode_signature () since that handles custom modifiers too.
2478 2008-09-20 Zoltan Varga <vargaz@gmail.com>
2480 * reflection.c (add_custom_modifiers): New helper function to merge custom
2481 modifiers stored in objects to a MonoType.
2482 (fieldref_encode_signature): Encode custom modifiers.
2483 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
2484 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
2486 2008-09-19 Kornél Pál <kornelpal@gmail.com>
2488 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
2489 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
2490 64-bit IL only images because imports are not resolved for IL only images.
2491 Special thanks to Bill Holmes for finding this bug and testing the patch.
2492 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
2494 Contributed under MIT/X11 license.
2496 2008-09-19 Miguel de Icaza <miguel@novell.com>
2498 * mono-config.c (dllmap_start): Add support for the bits keyword
2499 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
2501 2008-09-19 Mark Probst <mark.probst@gmail.com>
2503 * reflection.c (inflate_mono_method): When the class the method is
2504 to be inflated for is itself not inflated, just return the method.
2506 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
2508 * mono-perfcounters.c: use more user friendly process instance names.
2510 2008-09-18 Bill Holmes <billholmes54@gmail.com>
2512 * marshal.c (emit_marshal_variant) : Change the attribute checks to
2513 handle "[in] ref" and "[in][out] ref" cases.
2515 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
2516 to mono_mb_create_method. This was causing problems calling native to
2517 managed passing Variants by value.
2519 Code is contributed under MIT/X11 license.
2521 2008-09-18 Zoltan Varga <vargaz@gmail.com>
2523 * class.c (can_access_internals): Call mono_assembly_load_friends ()
2524 before accessing the friend_assembly_names field.
2526 * assembly.c (mono_assembly_load_friends): Make this callable multiple
2528 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
2529 called lazily when it is needed.
2531 * metadata-internals.h (struct _MonoAssembly): Add
2532 'friend_assembly_names_inited' flag.
2534 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
2536 * mono-perfcounters-def.h: fix the types of a few counters.
2537 * mono-perfcounters.c: implemented the instance names getter
2540 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
2542 * culture-info-table.h : regenerated.
2544 2008-09-17 Robert Jordan <robertj@gmx.net>
2546 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
2547 context bound objects. Fixes #415577.
2549 Code is contributed under MIT/X11 license.
2551 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
2553 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
2554 implementation (bug #423582).
2556 2008-09-16 Zoltan Varga <vargaz@gmail.com>
2558 * object.c (mono_object_get_virtual_method): Handle the case method->slot
2559 is not set. Fixes #426309.
2561 2008-09-16 Jb Evain <jbevain@novell.com>
2563 * class.c (mono_class_from_name): fix the exported type look up
2564 when the type is defined in a referenced assembly.
2566 2008-09-16 Jb Evain <jbevain@novell.com>
2568 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
2569 increment the next index counter on each iteration to make that work
2570 for more than one type forwarder. Unmanaged part to fix #422929.
2572 2008-09-15 Mark Probst <mark.probst@gmail.com>
2574 * object-internals.h: enum ComInterfaceType in
2575 MonoInterfaceTypeAttribute is guint32, not guint16.
2577 2008-09-12 Mark Probst <mark.probst@gmail.com>
2579 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
2582 2008-09-11 Mark Probst <mark.probst@gmail.com>
2584 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
2587 2008-09-11 Mark Probst <mark.probst@gmail.com>
2589 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
2590 Endianness fixes for MonoSymbolFileOffsetTable.
2592 2008-09-10 Bill Holmes <billholmes54@gmail.com>
2594 * process.c (complete_path) : Removing quotes from the
2595 input path. The glib file routines do not handle file paths
2596 that have quotes around them.
2598 Code is contributed under MIT/X11 license.
2600 2008-09-10 Bill Holmes <billholmes54@gmail.com>
2602 * socket-io.h : Adding a comment to provide locations where
2603 changes to MonoSocketAsyncResult need to be synced.
2605 Code is contributed under MIT/X11 license.
2607 2008-09-10 Zoltan Varga <vargaz@gmail.com>
2609 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
2610 parameters as well. Fixes #425001.
2612 2008-09-08 Miguel de Icaza <miguel@novell.com>
2614 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
2617 2008-09-07 Miguel de Icaza <miguel@novell.com>
2619 * console-io.c: Add support for tracking the window size if it
2622 The setup is very simple: the TtySetup function will now return a
2623 pointer to a location in memory that tracks the current console
2624 size. The managed code checks its current value every time its
2625 queried against the last value set, and updates accordingly.
2627 With this setup we can work with multiple consoles, and we do not
2628 require to poke into managed code from a signal handler.
2630 Additionally, the environment for COLUMNS and LINES is now handled
2633 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
2635 2008-09-07 Mark Probst <mark.probst@gmail.com>
2637 * marshal.c (mono_type_native_stack_size): Treat
2638 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
2640 2008-09-04 Jb Evain <jbevain@novell.com>
2642 * class.c (mono_class_is_assignable_from): fix assignability of nullables
2645 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
2647 * verify.c (verify_type_compatibility_full): Revert change
2648 to allow converting a native int to unmanaged pointer be verifiable
2649 under non-strict mode.
2650 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
2652 * verify.c: Added some TODOs.
2654 2008-09-02 Bill Holmes <billholmes54@gmail.com>
2656 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
2657 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
2658 Changed to use GlobalAlloc for the memory returned on Windows platforms.
2660 Code is contributed under MIT/X11 license.
2662 2008-09-02 Jb Evain <jbevain@novell.com>
2664 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
2666 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
2668 reflection.c (typebuilder_setup_fields): Handle classes with
2671 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
2673 class.c (mono_class_setup_events): Add memory barrier due to
2674 double checked locking.
2676 class.c (mono_class_setup_properties): Same.
2678 2008-08-31 Zoltan Varga <vargaz@gmail.com>
2680 * class.c (mono_class_is_assignable_from): Fix the build.
2682 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
2683 before accessing klass->interface_bitmap. Fixes #421744.
2685 2008-08-28 Zoltan Varga <vargaz@gmail.com>
2687 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
2688 the runtime into no-exec mode, useful when running the AOT compiler.
2690 * appdomain.c gc.c object.c: Avoid executing managed code when running
2693 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
2695 * reflection.c (_mono_reflection_get_type_from_info): Handle the
2696 special case when the mono_assembly_loaded () returns NULL because the
2697 search hook is not installed.
2699 2008-08-25 Zoltan Varga <vargaz@gmail.com>
2701 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
2702 crashes in bstr marshalling on linux.
2704 2008-08-24 Zoltan Varga <vargaz@gmail.com>
2706 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
2707 with more than one parameter.
2709 2008-08-24 Miguel de Icaza <miguel@novell.com>
2711 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
2712 start/stop flow control as well when turning off ICANON (allows
2713 C-s and C-q to be read by Console.ReadKey).
2715 2008-08-24 Zoltan Varga <vargaz@gmail.com>
2717 * class.c (mono_class_init): Move the initialization of nested classes
2718 into mono_class_get_nested_types (). Fixes #418433.
2720 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
2723 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
2724 iterating tough the nested classes of a class.
2726 2008-08-23 Zoltan Varga <vargaz@gmail.com>
2728 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
2731 2008-08-22 Miguel de Icaza <miguel@novell.com>
2733 * console-io.c (sigcont_handler): Support signal chaining for
2736 (console_set_signal_handlers): Use best practices with sigaction,
2737 clear the structure before using it.
2739 2008-08-22 Robert Jordan <robertj@gmx.net>
2741 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
2742 Fix the Windows build.
2744 2008-08-22 Zoltan Varga <vargaz@gmail.com>
2746 * class.c (mono_class_generic_sharing_enabled): Make the default
2747 sharing mode 'corlib'.
2749 2008-08-21 Zoltan Varga <vargaz@gmail.com>
2751 * console-io.c (console_set_signal_handlers): Fix a warning.
2753 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
2754 method normally, the JIT will take care of avoiding recursion.
2756 2008-08-20 Bill Holmes <billholmes54@gmail.com>
2758 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
2760 Code is contributed under MIT/X11 license.
2762 2008-08-20 Miguel de Icaza <miguel@novell.com>
2764 * console-io.c (sigcont_handler): We need to restore the entire
2765 termios state, not only the original settings, as things like echo
2766 can be controlled after this (Booish exposes this issue with its
2767 own ReadLine implementation).
2769 Additionally, we need to set the terminal back into keypad_xmit
2772 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
2773 string as a paramter as well. Otherwise we get different
2776 2008-08-20 Zoltan Varga <vargaz@gmail.com>
2778 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
2779 delegates with byref out parameter passing. Fixes #351520.
2781 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
2783 (mono_type_get_desc): Add the type arguments for GENERICINST.
2784 (mono_method_full_name): Stringify the class name using mono_type_full_name
2785 so it picks up generic arguments.
2787 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
2789 * console-io.c: Removed debug output.
2791 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
2793 reflection.c (mono_reflection_create_runtime_class): Alloc
2794 the nested classes linked list using the dynamic image mempool.
2795 Fixes leak in corlib compilation.
2797 2008-08-19 Miguel de Icaza <miguel@novell.com>
2799 * console-io.c: Fix incredibly annoying behavior on the console
2800 after resuming execution after control-z. This affected every
2801 console application.
2803 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
2805 * mempool-internals.h: Header for mono private mempool functions. The first
2806 two function are for allocating glib linked lists using pools.
2808 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
2810 * Makefile.am: Added mempool-internals.h.
2812 2008-08-16 Zoltan Varga <vargaz@gmail.com>
2814 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
2815 (mono_domain_free): Ditto.
2817 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
2818 be used by the JIT to store its domain-specific information, instead of putting
2819 it directly into MonoDomain.
2821 * domain.c (mono_install_create_domain_hook): New helper function to install
2822 a hook which initializes domain->runtime_info.
2824 * domain.c (mono_install_free_domain_hook): Ditto.
2826 2008-08-15 Zoltan Varga <vargaz@gmail.com>
2828 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
2829 asserting if the ares parameter is null.
2831 * mono-perfcounters.c: Fix warnings.
2833 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
2834 is not needed, don't check for interruptions either.
2835 (mono_marshal_get_delegate_end_invoke): Ditto.
2837 2008-08-15 Marek Habersack <mhabersack@novell.com>
2839 * mono-perfcounters.c (predef_readonly_counter): added support for
2840 reading the ASP.NET Requests Queued counter from another process.
2842 2008-08-12 Zoltan Varga <vargaz@gmail.com>
2844 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
2845 MonoImage to simplify the AOT code.
2847 2008-08-10 Zoltan Varga <vargaz@gmail.com>
2849 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
2850 marshalling. Fixes #416078.
2852 2008-08-08 Zoltan Varga <vargaz@gmail.com>
2854 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
2855 it is set, looking up the icall address is deferred to the JIT, since
2856 in embedded scenarios, the icall might not be registered in the runtime
2857 doing the AOT compilation. Backported from the 2.0 branch.
2859 2008-08-08 Zoltan Varga <vargaz@gmail.com>
2861 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
2864 2008-08-05 Marek Habersack <mhabersack@novell.com>
2866 * Makefile.am: added support for cross-compilation.
2868 2008-08-04 Zoltan Varga <vargaz@gmail.com>
2870 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
2872 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
2874 * mono-perfcounters.c: jitted methods and jitted bytes counters.
2876 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
2878 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
2879 mono-perfcounters.c: performance counters implementation.
2881 2008-07-31 Zoltan Varga <vargaz@gmail.com>
2883 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
2884 to gpointer, letting the AOT code decide what to store in it.
2886 2008-07-31 Bill Holmes <billholmes54@gmail.com>
2888 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
2889 mono_class_setup_methods if the methods are not initialized.
2891 Code is contributed under MIT/X11 license.
2893 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
2895 * verify.c: Remove some debug code I commited by accident.
2897 * verify.c (mono_method_is_valid_in_context): Change the return value
2898 to make possible to distinguish between invalid and unverifiable.
2900 * verify.c (verifier_load_method): Don't return NULL for unverifiable
2903 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
2905 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
2906 constraints. Fixes regression in gtest-253.
2908 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
2910 * verify.c (mono_verifier_verify_class): Don't allow generic types
2911 with explicit layout.
2913 * verify.c (mono_method_verify): Check locals and argument types.
2915 2008-07-29 Zoltan Varga <vargaz@gmail.com>
2917 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
2918 wait if the thread is in StopRequested state.
2920 * class.c (mono_class_from_name): Refactor the module searching code into
2921 a separate function so it can be reused in the AOT case too.
2923 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
2925 * verify.c (mono_type_is_valid_in_context): Improve the error message.
2926 Check both the type and it's generic type definition for loader errors.
2928 * verify.c (mono_method_is_valid_in_context): Don't generate another
2929 error when a type errors occur, this leads to the wrong exception been
2932 2008-07-28 Dick Porter <dick@ximian.com>
2936 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
2937 New internal calls to duplicate and close a process handle.
2939 2008-07-27 Andreas Färber <andreas.faerber@web.de>
2941 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
2943 2008-07-27 Zoltan Varga <vargaz@gmail.com>
2945 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
2947 2008-07-27 Robert Jordan <robertj@gmx.net>
2949 * class.c (mono_class_init): Don't compute class.has_finalize for
2950 valuetypes. Fixes #412477.
2952 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
2954 * verify.c: Implement constraint equivalence checking.
2955 This is required when a generic parameter is used as
2956 argument to a constrained one.
2960 2008-07-24 Zoltan Varga <vargaz@gmail.com>
2962 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2964 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
2966 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
2967 synch with managed object layout.
2969 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
2971 * verify.c (do_branch_op): Handle valuetypes and generic
2974 * verify.c (do_cmp_op): Same.
2978 2008-07-24 Mark Probst <mark.probst@gmail.com>
2980 * generic-sharing.c: Fix memory leaks.
2982 * class.c, class-internals.h: Make
2983 mono_class_inflate_generic_type_with_mempool() non-static.
2985 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
2987 * pedump.c (dump_verify_info): Dump full class name.
2989 2008-07-24 Mark Probst <mark.probst@gmail.com>
2991 * generic-sharing.c: Removed some old code that didn't do anything.
2993 2008-07-24 Massimiliano Mantione <massi@ximian.com>
2994 * profiler.c: Added runtime_initialized_event,
2995 mono_profiler_install_runtime_initialized and
2996 mono_profiler_runtime_initialized. This new hook tells the profiler
2997 when the runtime is sufficiently initialized to be able to call
2998 mono_thread_attach on the root appdomain.
2999 * profiler.h, profiler-private.h: Likewise.
3001 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
3003 * verify.c (do_cast): Do boxing for generic arguments as well.
3005 * class.c (is_nesting_type): Drop generic instantiations before
3006 checking for nesting.
3008 * class.c (can_access_instantiation): Allow access to generic
3011 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
3013 * verify.c (verify_class_for_overlapping_reference_fields):
3014 On some cases, the field size might be zero, guard against that.
3015 Fix the explicit layout check to work as expected.
3017 2008-07-23 Zoltan Varga <vargaz@gmail.com>
3019 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
3020 mono_thread_resume () during shutdown, since the thread we want to abort
3023 2008-07-22 Zoltan Varga <vargaz@gmail.com>
3025 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
3028 * debug-mono-symfile.c: Fix a warning.
3030 * mono-perfcounters.c (get_cpu_times): Fix a warning.
3032 * object.c (mono_class_vtable): Check if exception_type is set, and return
3033 NULL as defined by the function comments.
3035 2008-07-22 Mark Probst <mark.probst@gmail.com>
3037 * mempool.c: Use malloc for every single mempool allocation if the
3038 configure option is set. This makes it easier to track mempool
3039 allocations with tools like Valgrind.
3041 2008-07-22 Jb Evain <jbevain@novell.com>
3043 * reflection.c (create_dynamic_mono_image): emit the same
3044 metadata version that SL2 does when creating a SL2 image.
3046 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
3049 * icall.c: New icall System.Enum:get_hashcode. This function
3050 avoids the overhead of boxing the enum to the underlying type.
3052 2008-07-21 Mark Probst <mark.probst@gmail.com>
3054 * reflection.c (mono_method_get_object): Don't let static RGCTX
3055 invoke wrappers get into MonoReflectionMethods.
3057 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
3059 * object-internals.h:
3060 * object.c: New mono_runtime_class_init_full function
3061 that makes throwing the exception optinal.
3063 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
3064 for the case where the exception object is supplied.
3066 2008-07-16 Kornél Pál <kornelpal@gmail.com>
3068 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
3071 Contributed under MIT/X11 license.
3073 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
3075 * string-icalls.c (ves_icall_System_String_InternalSplit):
3076 Optimize array allocation by caching the MonoClass of the
3079 * icall.c (ves_icall_Type_GetMethodsByName): Same.
3081 * reflection.c (mono_param_get_objects): Same.
3083 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
3086 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
3087 It inflates the given type using the class context.
3089 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
3091 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
3092 the vtable if it already exists.
3094 * object-internals.h: Add mono_class_try_get_vtable as part of the
3097 * reflection.c (mono_type_get_object): Use the MonoObject from the
3098 vtable when possible. Reduces locking contention on reflection heavy
3101 2008-07-15 Zoltan Varga <vargaz@gmail.com>
3103 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
3104 g_bit_nth_msf () since that macro is not implemented in eglib.
3106 2008-07-13 Zoltan Varga <vargaz@gmail.com>
3108 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
3109 on platforms which do not support it.
3111 2008-07-12 Zoltan Varga <vargaz@gmail.com>
3113 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
3115 2008-07-11 Martin Baulig <martin@ximian.com>
3117 * mono-debug-debugger.h
3118 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
3120 * mono-debug-debugger.c
3121 (_mono_debugger_interruption_request): New global volatile variable.
3122 (mono_debugger_check_interruption): New public function.
3125 (mono_thread_current_check_pending_interrupt): Call
3126 mono_debugger_check_interruption().
3127 (mono_thread_interruption_checkpoint_request): Likewise.
3129 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
3131 * verify.c: Add more type checks for loaded types. Verify the result
3132 handle from ldtoken.
3134 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
3136 * loader.c (field_from_memberref): Don't crash if the field
3139 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
3141 * verify.c: Verify if type and method instantiations
3142 don't have invalid VAR or MVAR arguments.
3144 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
3146 * verify.c: Fix double free of function pointer list.
3148 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
3150 * object.c (mono_string_to_utf8): Comment the new code as it
3153 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
3155 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
3157 2008-07-07 Bill Holmes <billholmes54@gmail.com>
3159 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
3160 is not throw too many times.
3162 Code is contributed under MIT/X11 license.
3164 2008-07-07 Zoltan Varga <vargaz@gmail.com>
3166 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
3167 debugging is turned off.
3169 2008-07-06 Zoltan Varga <vargaz@gmail.com>
3171 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
3173 2008-07-04 Mark Probst <mark.probst@gmail.com>
3175 * class-internals.h, class.c: Added new generic sharing option:
3176 Share only stuff in System.Collections.Generic, which is now the
3179 2008-07-04 Mark Probst <mark.probst@gmail.com>
3181 * generic-sharing.c, class-internals.h: New function for getting a
3182 generic method in a generic class given the corresponding method
3183 for a different instantiation of the class. Partly refactored
3184 from mini-trampolines.c.
3186 * class.c: Make sure generic methods have a class_inst if they are
3187 part of a generic class.
3189 * metadata.c (mono_type_stack_size_internal): Handle type
3192 2008-07-04 Mark Probst <mark.probst@gmail.com>
3194 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
3195 Signifies whether information on the this/vtable/mrgctx variable
3198 2008-07-04 Mark Probst <mark.probst@gmail.com>
3200 * object.c, object-internals.h, icall.c: New function
3201 mono_delegate_ctor_with_method(), which does the same as
3202 mono_delegate_ctor(), but takes an explicit method argument
3203 instead of taking the method from the jit info.
3205 * marshal.c: When creating a delegate with an inflated method take
3206 the "this" argument as the target class for the castclass.
3208 2008-07-03 Mark Probst <mark.probst@gmail.com>
3210 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
3211 mono_jit_info_table_find() to perform very badly in some cases.
3213 2008-07-02 Zoltan Varga <vargaz@gmail.com>
3215 * icall.c (type_from_typename): Handle 'string'.
3217 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
3218 wrappers into the wrapper_hash, since the key is not a MonoMethod.
3220 2008-07-01 Zoltan Varga <vargaz@gmail.com>
3222 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
3224 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
3225 number of available managed allocator types.
3227 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
3228 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
3230 2008-06-30 Zoltan Varga <vargaz@gmail.com>
3232 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
3233 which is a low level lock protecting just the 'jit_code_hash' hash table.
3235 * domain.c: Initialize+cleanup jit_code_hash_lock.
3237 2008-06-30 Kornél Pál <kornelpal@gmail.com>
3239 * coree.c (mono_load_coree): Set coree_module_handle global variable only
3240 after initialization.
3242 * coree.h: Make MonoFixupExe internal.
3244 Contributed under MIT/X11 license.
3246 2008-06-30 Kornél Pál <kornelpal@gmail.com>
3248 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
3249 because that is platform independent. Check NumberOfRvaAndSizes in PE32
3251 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
3252 image being loaded is a CLI image and _CorValidateImage gets called.
3254 * coree.h: Add MonoLoadImage.
3256 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
3257 instead of LoadLibrary.
3259 Contributed under MIT/X11 license.
3261 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
3263 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
3264 for any primitive type.
3266 2008-06-29 Zoltan Varga <vargaz@gmail.com>
3268 * object.c (mono_array_new_specific): Optimize this and the other allocation
3271 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
3272 domains too if mono_dont_free_domains is set.
3274 * domain-internals.h (mono_dont_free_domains): New internal option controlling
3275 whenever to free appdomain data after it has been unloaded.
3277 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
3279 2008-06-28 Zoltan Varga <vargaz@gmail.com>
3281 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
3282 (mono_method_get_equivalent_method): Fix a warning.
3284 * object.c (mono_message_init): Avoid looking up array types for each call.
3286 2008-06-27 Zoltan Varga <vargaz@gmail.com>
3288 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
3291 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
3294 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
3297 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
3300 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
3302 * object.c (mono_value_box): Fix boxing of nullables.
3304 2008-06-26 Kornél Pál <kornelpal@gmail.com>
3306 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
3307 mono_module_handle that is defined by the linker; no initialization required.
3308 * coree.h: Remove mono_module_handle, add __ImageBase, update
3309 mono_image_open_from_module_handle.
3310 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
3311 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
3312 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
3313 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
3314 to 4 GB away from image base address. IA64 version is not tested but was very
3315 easy to implement and should work if we ever need it.
3316 * domain.c (mono_init_internal): Avoid system error message boxes.
3317 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
3318 with has_entry_point. Handle do_mono_image_load fauilre correctly.
3319 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
3320 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
3321 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
3323 Contributed under MIT/X11 license.
3325 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3327 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
3328 as part of the private mono API.
3330 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
3331 Do proper argument checking for methods that belong to generic classes.
3332 Do proper type resolution for GMFH/2.
3335 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3337 * verify.c (do_switch): Fix a memory corruption bug with
3338 the jump index is out of bound.
3340 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3342 * verify.c: Disable debug code.
3344 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3346 * reflection.c (mono_image_get_methodbuilder_token): Use
3347 mono_image_get_methodspec_token_for_generic_method_definition
3348 instead of mono_image_get_memberref_token. We cache more memberef
3351 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
3353 * verify.c: Inflate exception clause types.
3356 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
3358 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
3361 * reflection.c (mono_image_get_ctorbuilder_token): Same.
3363 * reflection.c (mono_image_create_method_token): Same.
3365 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
3367 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
3368 It does the same as mono_image_get_methodref_token but works on
3371 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
3372 and always generate a methodspec. This follows the old behavior and fixes
3373 the regressions in System.Core.
3375 2008-06-24 Zoltan Varga <vargaz@gmail.com>
3377 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
3378 don't event mono_class_get () succeeds. Fixes #402182.
3380 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
3382 * metadata-internals.h: Added MonoDynamicImage::methodspec
3383 hashtable to store methodspec tokens created for MethodBuilders.
3385 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
3386 MethodBuilders as open instantiations if a methodspec was requested.
3388 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
3390 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
3392 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
3396 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
3398 * loader.c (method_from_methodspec): Avoid crashing if the
3399 method lookup fails.
3401 2008-06-20 Dick Porter <dick@ximian.com>
3403 * socket-io.c (get_socket_assembly): Cope with Moonlight network
3404 classes being in a different assembly. Fixes bug 399184.
3406 2008-06-20 Zoltan Varga <vargaz@gmail.com>
3408 * loader.c (mono_loader_init): Make this callable multiple times.
3409 (mono_dllmap_insert): Call mono_loader_init () so this works even before
3410 the runtime is initialized. Fixes #401755.
3412 2008-06-19 Dick Porter <dick@ximian.com>
3414 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
3417 2008-06-19 Dick Porter <dick@ximian.com>
3420 * icall-def.h: Implement Socket generic Send() and Receive()
3421 methods. Fixes bug 395168.
3423 2008-06-19 Kornél Pál <kornelpal@gmail.com>
3425 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
3427 Contributed under MIT/X11 license.
3429 2008-06-18 Martin Baulig <martin@ximian.com>
3431 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
3432 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
3433 set to 80.0. The debugger <-> runtime interface is now frozen as
3437 (mono_debug_debugger_version): Bump to 4.
3439 2008-06-18 Martin Baulig <martin@ximian.com>
3441 * debug-mono-symfile.c
3442 (load_symfile): Don't check the minor version.
3444 * debug-mono-symfile.h: Bump the version number to 50.0.
3446 2008-06-18 Martin Baulig <martin@ximian.com>
3448 * debug-mono-symfile.c
3449 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
3450 minimum required version.
3452 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
3454 * reflection.c (mono_custom_attrs_from_property): Fix support for
3455 retriveving cattrs of dynamic inflated generic types.
3457 * reflection.c (mono_custom_attrs_from_event): Same.
3459 * reflection.c (mono_custom_attrs_from_field): Same;
3461 * reflection.c (typebuilder_setup_events): Same cattrs of events.
3463 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
3464 Moved to metadata.c.
3466 * metadata.c: New functions to retrive the equivalent field, event
3467 of property from the generic type definition.
3469 * metadata-internals.h: Added new functions from metadata.c.
3471 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
3473 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
3474 to cached in a mempool is used.
3476 * metadata.c (free_generic_class): In some situations field generic_info type
3477 is not properly dup'ed and leads to double free'ing.
3481 2008-06-17 Mark Probst <mark.probst@gmail.com>
3483 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
3484 this arguments (will be needed later for generic methods).
3487 2008-06-17 Mark Probst <mark.probst@gmail.com>
3489 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
3490 Create a static RGCTX invoke wrapper for methods which require it.
3492 2008-06-17 Mark Probst <mark.probst@gmail.com>
3494 * object.c, class-internals.h: New function for checking whether
3495 an individual field is special static.
3497 2008-06-15 Zoltan Varga <vargaz@gmail.com>
3499 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
3500 linear search since the table is sorted.
3502 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
3505 2008-06-14 Zoltan Varga <vargaz@gmail.com>
3507 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
3508 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
3510 * gc.c (mono_domain_finalize): Allow an infinite timeout.
3512 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
3514 * threads.c (mono_thread_request_interruption): Get rid of locking, use
3515 InterlockedCompareExchange to query and modify
3516 thread->interruption_requested.
3518 * object-internals.h (struct _MonoThread): Change interruption_requested
3519 to a gint32 so it can be modified by atomic operations. Add
3520 'critical_region_level' from the managed side, change small_id to a guint32,
3521 add new set of 'unused' fields.
3523 * appdomain.c: Bump corlib version.
3525 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3527 * class.c (mono_class_from_name): Search modules as well. Fixes
3530 2008-06-13 Mark Probst <mark.probst@gmail.com>
3532 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
3533 templates. Templates are generalized with an additional type_argc
3534 argument. RGCTX templates have type_argc==0, MRGCTX templates
3537 * domain-internals.h, domain.c: New hash table for looking up
3540 * metadata.c, metadata-internals.h: Rename hash and equal
3541 functions for MonoGenericInst's and make them public.
3543 * class-internals.h: New data structures for the MRGCTX. Macros
3544 for distinguishing slots in the RGCTX and the MRGCTX.
3546 2008-06-13 Mark Probst <mark.probst@gmail.com>
3548 * object.c (mono_method_get_imt_slot): Put the same methods of
3549 different instantiations of the same generic interface in the same
3550 IMT slots, to make generic sharing simpler.
3552 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
3554 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
3556 * metadata.c (mono_metadata_field_info_with_mempool): Added.
3557 This function works just like mono_metadata_field_info, but
3558 accept a mempool as argument to be used allocating memory.
3560 * marshal.c (mono_marshal_load_type_info): Use new function
3561 to load marshal data into image mempool.
3563 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
3565 * class.c (mono_class_inflate_generic_type_with_mempool):
3566 This function allows to inflate a generic type using
3569 * class.c (inflate_generic_type): Take a mempool as argument
3570 and use it to do type dup'ing.
3572 * class.c (mono_class_setup_fields): Field type for generic
3573 generic classes are allocated from the image mempool.
3575 * metadata.c (free_generic_class): Inflated field type is
3576 now allocated in the image mempool.
3578 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
3580 * threads.c (thread_cleanup): Free MonoThread::name.
3582 2008-06-12 Marek Habersack <mhabersack@novell.com>
3584 * appdomain.c (ensure_directory_exists): avoid unnecessary
3585 mkdir(2) calls when the shadow directory already exists.
3586 (mono_make_shadow_copy): copy also satellite assemblies from the
3587 private bin directories.
3589 2008-06-11 Zoltan Varga <vargaz@gmail.com>
3591 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
3593 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
3594 a page boundary. Fixes #396219.
3596 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3598 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
3599 due to double-checked locking.
3601 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3603 * assembly.c (build_assembly_name): Release memory on failure.
3605 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
3607 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3609 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
3612 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3614 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
3617 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3619 * loader.c (field_from_memberref): Check if field signature type is equal
3620 to the non-inflated type of the field. Fixes #398980.
3622 2008-06-11 Zoltan Varga <vargaz@gmail.com>
3624 * assembly.c (mono_assembly_load_from_full): Call
3625 mono_assembly_load_friends () outside the assemblies lock, since it can
3626 acquire the loader lock. Fixes #323696.
3628 * reflection.c (resolve_object): Inflate the inst with the context for
3629 FieldOnTypeBuilderInst. Fixes #399010.
3631 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3633 * reflection.c (mono_image_get_field_on_inst_token): Don't
3634 inflate the field to encode it's signature. If it's a
3635 VAR or MVAR it should stay that way in the signature.
3638 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3640 * reflection.c (resolve_object): Release memory of inflated types.
3642 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3644 * loader.c (mono_method_get_signature_full): Remove assert about
3645 loading a methodspec to a generic method. We have such methods, such as
3646 System.Threading.Interlocked::CompareExchange<T>.
3647 This assert was removed since it crashes the verifier when it checks
3648 methods calling CompareExchange<T>.
3650 2008-06-10 Marek Safar <marek.safar@gmail.com>
3652 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
3653 of Type array and not MonoType.
3655 2008-06-10 Marek Habersack <mhabersack@novell.com>
3657 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
3660 2008-06-10 Martin Baulig <martin@ximian.com>
3662 * debug-mono-symfile.h
3663 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
3664 changes to the file format, but we were generating incorrect
3665 source file indices in the line number table due to a bug, which
3666 made backtraces report an incorrect source file.
3668 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3670 * mono-debug.c: Moved mono_debug_free_method_jit_info from
3671 mini/debug-mini.c to here.
3673 * mono-debug.c (il_offset_from_address): Free memory from find_method.
3675 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
3676 use it to release structs returned by mono_debug_find_method.
3678 2008-06-10 Zoltan Varga <vargaz@gmail.com>
3680 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
3681 since it needs to set method->slot for all interface methods.
3683 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3685 * class-internals.h: Forgot to add.
3687 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3689 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
3691 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
3692 Lookup the custom attributes from property_hash.
3694 * reflection.c (mono_save_custom_attrs): Save the custom attributes
3695 in property_hash. Allocate all data using the image mempool.
3697 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
3698 for dynamic_custom_attrs to checks if the image is dynamic.
3700 2008-06-09 Zoltan Varga <vargaz@gmail.com>
3702 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
3705 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
3706 runtime functions while holding the domain assemblies lock.
3708 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3710 * verify.c: Reapplied the last bit of the reverted changes.
3712 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3714 * verify.c: Reapplied more of the reverted changes.
3716 2008-06-09 Martin Baulig <martin@ximian.com>
3718 * debug-mono-symfile.c (load_symfile): Check the major version
3719 first; if it's wrong, don't print the minor version in the error message.
3721 2008-06-09 Zoltan Varga <vargaz@gmail.com>
3723 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
3724 lock instead of the domain lock to avoid deadlocks, since the thread might
3725 already hold the loader lock.
3727 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
3728 (mono_thread_attach): Ditto.
3730 * monitor.c: Use a TLS variable for holding the current thread id instead
3731 of calling pthread_self ().
3732 (mono_monitor_init_tls): New internal function to initialize the TLS
3734 (mono_monitor_try_enter_internal): Put the owner == id check after the
3737 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
3738 missed optimizations when using gcc-4.3.
3740 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
3742 * reflection.c (mono_dynamic_image_free): Free the memory
3743 used by MonoGenericParam in MonoDynamicImage::gen_param.
3745 * reflection.c (mono_reflection_setup_generic_class): Allocate
3746 container from mempool.
3748 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
3749 container from mempool.
3751 2008-06-07 Zoltan Varga <vargaz@gmail.com>
3753 * threads.c (mono_set_pending_exception): New internal function to set the
3754 pending exception of the current thread.
3755 (mono_thread_get_and_clear_pending_exception): Check for
3756 thread->pending_exception as well.
3758 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
3760 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
3761 it can trigger a collection.
3763 2008-06-06 Martin Baulig <martin@ximian.com>
3765 Merged the `debugger-kahalo' branch.
3768 (MONO_DEBUGGER_VERSION): Bumped to 72.
3770 * debug-mono-symfile.h
3771 (MonoSymbolFileMethodIndexEntry): Removed.
3772 (MonoSymbolFileMethodEntry): New public typedef.
3773 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
3774 (MonoSymbolFileSourceEntry): Remove everything except `index' and
3776 (MonoSymbolFileMethodEntry): Removed.
3777 (MonoSymbolFileLexicalBlockEntry): Removed.
3778 (MonoSymbolFileLineNumberEntry): Removed.
3779 (MonoDebugLexicalBlockEntry): Removed.
3780 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
3781 removed `num_il_offsets' and `il_offsets'.
3782 (MonoSymbolFile): Replace `version' with `major_version' and
3784 (MONO_SYMBOL_FILE_VERSION): Replace with
3785 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
3786 `MONO_SYMBOL_FILE_MINOR_VERSION'.
3788 * debug-mono-symfile.c
3789 (mono_debug_symfile_lookup_location): Add support for the new line
3790 number table format.
3792 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3794 * metadata.c (free_generic_class): Release the inflated
3795 MonoClass of dynamic generic classes if it's not a generic
3798 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3800 * verify.c: Reapplied more of the reverted changes.
3802 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3804 * reflection.c (lookup_custom_attr): Clean the cached flag or
3805 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
3808 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3810 * verify.c: Reapplied a small part of the reverted changes.
3812 2008-06-07 Zoltan Varga <vargaz@gmail.com>
3814 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3816 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
3817 previously in managed code.
3818 (mono_monitor_exit): Ditto.
3819 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
3821 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
3822 the managed definition.
3824 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
3826 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
3828 2008-06-06 Zoltan Varga <vargaz@gmail.com>
3830 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
3832 * monitor.c: Add some micro optimizations.
3834 * icall.c (type_from_typename): Handle 'bool'.
3836 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
3838 * verify.c: Implement constructor verification per P III 1.8.1.4.
3841 2008-06-06 Zoltan Varga <vargaz@gmail.com>
3843 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
3844 holding the assemblies lock here too.
3846 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3848 * verify.c: Kill stack_top function.
3850 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3852 * verify.c: Kill stack_get function.
3854 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3856 * verify.c (mono_method_verify): Last change broke the build. Fixed.
3858 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3860 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
3863 * verify.c (mono_method_verify): Inflate params and locals to avoid
3864 mismatch when checking for compatibility.
3866 2008-06-05 Jonathan Chambers <joncham@gmail.com>
3868 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
3869 Length prefix should be size in bytes. Fix bug #339530.
3871 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
3872 Length prefix should be size in bytes. Fix bug #339530.
3874 Code is contributed under MIT/X11 license.
3876 2008-06-05 Bill Holmes <billholmes54@gmail.com>
3878 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
3880 Contributed under MIT/X11 license.
3882 2008-06-05 Martin Baulig <martin@ximian.com>
3884 * mono-debug-debugger.c
3885 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
3887 2008-06-05 Zoltan Varga <vargaz@gmail.com>
3889 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
3890 while holding the assemblies lock to prevent deadlocks. Handle the case
3891 where the search hook returns NULL but the assembly was still loaded.
3894 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
3895 modify domain state.
3897 2008-06-05 Andreas Färber <andreas.faerber@web.de>
3899 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
3900 * Makefile.am (pedump_LDADD): Post-process object files and
3901 add dtrace-generated object file, if necessary.
3903 Code is contributed under MIT/X11 license.
3905 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
3907 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
3909 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
3911 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
3913 2008-06-04 Mark Probst <mark.probst@gmail.com>
3915 * threads.c: Try to free everything from the delayed free table
3916 when shutting down threads, and set the variable to NULL after the
3917 table is freed so that calling
3918 mono_thread_hazardous_try_free_all() when shutting down the root
3919 domain doesn't crash.
3921 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
3923 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
3924 the caller if resulting type was inflated.
3926 * class.c (mono_class_create_from_typespec): Free the MonoType if it
3929 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
3932 2008-06-04 Zoltan Varga <vargaz@gmail.com>
3934 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
3935 class library tests.
3937 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
3938 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
3941 2008-06-04 Mark Probst <mark.probst@gmail.com>
3943 * domain.c, domain-internals.h: The JIT infos are now freed by the
3944 JIT info table code. They are freed immediately if there only a
3945 single JIT info table in circulation. If there is more, the free
3946 is delayed via a queue.
3948 * threads.c, threads-types.h: New hazard pointer function for
3949 freeing all freeable delayed items in one sitting.
3951 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3953 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
3955 * reflection.c (typebuilder_setup_properties): Same.
3957 * reflection.c (typebuilder_setup_events): Same.
3959 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3961 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
3962 and use it for allocating memory.
3964 * reflection.c (mono_marshal_spec_from_builder): Same.
3966 * reflection.c: Change code to use new signatures.
3968 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
3970 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3972 * decimal.c (rescale128): Put back one line which was accidently commented
3975 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
3978 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3980 * reflection.c (mono_reflection_generic_class_initialize): Name must
3981 be always malloc'ed so we can free it later on. Do this for field, property
3984 * metadata.c (free_generic_class): Free field, property and event names.
3986 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3988 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
3989 instead of g_memdup.
3991 * reflection.c (typebuilder_setup_fields): Same.
3993 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3995 * decimal.c (rescale128): Optimize this function a bit more.
3997 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3999 * metadata.c (free_generic_class): Release some memory from
4000 SRE generic classes.
4002 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
4004 * reflection.c (mono_image_get_generic_field_token): No reference
4005 to name is kept, free it.
4007 * reflection.c (mono_reflection_generic_class_initialize): Free
4008 more memory of the inflated field.
4010 2008-06-03 Zoltan Varga <vargaz@gmail.com>
4012 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
4015 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
4017 * reflection.c (mono_dynamic_image_free): Release memory used by
4018 MonoDynamicImage::array_methods elements.
4020 * reflection.c (assembly_add_win32_resources): Release memory after
4023 2008-06-02 Zoltan Varga <vargaz@gmail.com>
4025 * decimal.c (log2_32): Use an optimized version for this function too.
4027 * decimal.c (log2_64): Fix this on 32 bit machines.
4029 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
4031 * class.c (mono_dup_array_type): Implement allocation using a mempool.
4033 * class.c (mono_metadata_signature_deep_dup): Same.
4035 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
4038 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
4040 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
4042 * metadata-internals.h: Added mono_metadata_signature_dup_full.
4044 * class-internals.h: Update signatures to take a MonoMemPool.
4046 2008-06-02 Dick Porter <dick@ximian.com>
4048 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
4050 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
4051 FormatMessage API to get the error text. Fixes bug 321827.
4053 2008-06-02 Zoltan Varga <vargaz@gmail.com>
4055 * decimal.c: Add some micro optimizations to make decimal operations faster.
4057 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4059 * reflection.c (method_encode_clauses): Take a mempool
4060 as parameter and use it to allocate the clause array.
4062 * reflection.c (mono_image_get_field_on_inst_token): Free
4063 the inflated type after encoding it.
4065 * reflection.c (mono_dynamic_image_free): Free each element
4066 of MonoDynamicImage::gen_params.
4068 * reflection.c (reflection_methodbuilder_to_mono_method):
4069 Allocate the generic param array from the mempool.
4070 Allocate signature params from the mempool.
4072 * reflection.c (mono_reflection_generic_class_initialize):
4073 Free inflated fields after been used.
4075 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
4077 * icall.c: Reapply the memory leak fixes as they no
4078 longer make mono crash.
4080 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
4082 * reflection.c (mono_type_get_object): Don't store the suplied
4083 MonoType with type_hash. A caller which pass a type that
4084 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
4085 might end with a pointer to freed memory.
4086 The solution is to use byval_arg or this_arg from the associated
4087 MonoClass of the supplied type.
4089 2008-05-29 Zoltan Varga <vargaz@gmail.com>
4091 * icall.c: Revert the rest of the last change as it breaks the build too.
4093 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4095 * icall.c: Revert a leak fix as it's breaking the build.
4097 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4099 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
4101 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4103 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
4105 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4107 * icall.c: Fix some memory leaks.
4109 2008-05-29 Dick Porter <dick@ximian.com>
4111 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
4112 async socket operations from the pending list when a socket
4113 closes. Leaving it until the threadpool services the event
4114 exposes a race condition when a socket descriptor is reused.
4117 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4119 * object.c: Fix negative index check for array alocation.
4121 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4123 * icall.c, marshal.c: Delegate wrappers should skip visibility.
4124 This check is performed by the verifier for IL created delegates
4125 and by Delegate::CreateDelegate for programatically created ones.
4128 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4130 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
4131 Fix code to use mono_array_size_t instead of int.
4133 Based on patch by Luis F. Ortiz.
4134 Contributed under X11 license.
4135 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4137 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4139 * icall.c: Added ves_icall_System_Array_GetLongLength and
4140 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
4143 * icall.h: Export both new functions.
4145 Based on patch by Luis F. Ortiz.
4146 Contributed under X11 license.
4147 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4149 2008-05-28 Martin Baulig <martin@ximian.com>
4151 The debugger now requires exactly r103463.
4153 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
4154 This version is not supported by the debugger, wait for 72.
4156 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4158 * object.h: Changed array related functions to use
4159 mono_array_size_t instead of guint32. Forgot to commit this file.
4161 Patch by Luis F. Ortiz.
4162 Contributed under X11 license.
4163 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4166 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4168 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
4169 don't define it. Use the number literal instead.
4171 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4173 * icall.c: Changed array related functions to use
4174 mono_array_size_t instead of guint32.
4176 * icall.c (ves_icall_System_Array_GetLength): Check for length
4177 overflow under MONO_BIG_ARRAYS.
4179 Based on patch by Luis F. Ortiz.
4180 Contributed under X11 license.
4181 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4183 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4185 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
4187 Based on patch by Luis F. Ortiz.
4188 Contributed under X11 license.
4189 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4191 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4193 * object.c, object.h: Changed array related functions to use
4194 mono_array_size_t instead of guint32.
4196 Patch by Luis F. Ortiz.
4197 Contributed under X11 license.
4198 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4200 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4202 * object.h: Introduced mono_array_size_t typedef. This must be used
4203 in all places an array length is expected. This is 64bits wide if
4204 MONO_BIG_ARRAYS is enabled.
4206 Patch by Luis F. Ortiz.
4207 Contributed under X11 license.
4208 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4210 2008-05-27 Zoltan Varga <vargaz@gmail.com>
4212 * security-manager.c class.c: Set the class exception info by calling
4213 mono_class_set_failure ().
4215 * class.c (mono_class_get_exception_data): New accessor function.
4216 (mono_class_set_failure): Store exception_data in the property hash.
4218 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
4219 the struct as a property.
4221 * loader.c (mono_get_method_full): Store the lookup result for method
4222 tokens in method_cache, the others in methodref_cache to decrease the memory
4223 usage of hash tables.
4225 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
4226 (mono_image_init): method_cache is lazy inited now.
4228 * metadata-internals.h (struct _MonoImage): Change method_cache to
4229 a MonoValueHashTable, add a separate methodref_cache.
4231 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
4233 * number-formatter.h: Fix tables to avoid arithemtic overflow in
4234 Double.ToString as exposed by Bug #383531.
4236 2008-05-26 Zoltan Varga <vargaz@gmail.com>
4238 * number-formatter.h: Make some tables static.
4240 * class.c (mono_method_set_generic_container): New accessor function.
4241 (mono_method_get_generic_container): Ditto.
4243 * class-internals.h (struct _MonoMethod): Remove rarely used
4244 'generic_container' field, store it in the property hash instead. Add
4245 'is_generic' boolean field instead.
4247 * image.c (mono_image_init): Initialize property_hash.
4248 (mono_image_close): Destroy property_hash.
4250 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
4251 hold rarely used fields of runtime structures belonging to this image.
4253 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
4254 to get/set method->generic_container.
4256 * loader.c (mono_get_method_from_token): Avoid loading the method header for
4259 2008-05-25 Zoltan Varga <vargaz@gmail.com>
4261 * class.c (mono_class_inflate_generic_method_full): Don't increase
4262 mono_stats.inflated_method_count for methods found in the cache.
4264 * threads.c (mono_thread_request_interruption): Add a comment about
4267 2008-05-24 Zoltan Varga <vargaz@gmail.com>
4269 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
4270 interface_offsets_packed table.
4272 * class.c (mono_class_init): Remove some dead code.
4274 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
4275 mono_class_setup_vtable () when CAS is active to detect security problems.
4277 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
4279 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
4281 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
4282 parameters as it's irrelevant for delegate checking.
4284 2008-05-23 Zoltan Varga <vargaz@gmail.com>
4286 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
4288 * class.c (mono_class_init): Control the creation of a generic vtable using
4289 a global which is true by default, but set to false by the runtime startup code.
4291 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
4292 Disabled for now since it breaks the embedding API.
4293 Move the setup of class->methods for arrays to mono_class_setup_methods ().
4294 (mono_class_setup_methods): Add a memory barrier.
4296 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
4297 when mono_class_init () doesn't compute the generic vtable.
4299 2008-05-23 Massimiliano Mantione <massi@ximian.com>
4300 * profiler.c: Added mono_profiler_install_statistical_call_chain,
4301 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
4302 to support call chains (backtrace) in the stat profiler.
4303 * profiler.c, profiler-private.h: Likewise.
4305 2008-05-22 Mark Probst <mark.probst@gmail.com>
4307 * generic-sharing.c: Init generic class when a method of it is
4308 requested via a runtime generic context.
4310 2008-05-22 Zoltan Varga <vargaz@gmail.com>
4312 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
4314 * reflection.c (mono_type_get_object): Add a FIXME.
4316 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
4318 * class.c (mono_class_get_method_by_index): New helper function, returning an
4319 entry in the class->methods array.
4321 2008-05-21 Zoltan Varga <vargaz@gmail.com>
4323 * class.c (mono_class_init): Only do the array optimization for szarrays.
4324 Avoid creating a generic vtable for generic instances as well.
4325 (mono_class_get_method_from_name_flags): Don't search in the metadata for
4328 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
4330 * loader.c (mono_get_method_constrained): Inflate the signature
4331 with class context. Fix #325283.
4333 2008-05-21 Zoltan Varga <vargaz@gmail.com>
4335 * object.c (mono_class_create_runtime_vtable): Add a comment.
4337 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
4339 (setup_interface_offsets): Handle the case when this is called twice for arrays.
4340 (mono_class_setup_vtable_general): Add an assert.
4341 (mono_class_init): Avoid creating a generic vtable for arrays.
4343 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
4344 here, let mono_class_init () do that.
4346 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
4347 interfaces in mscorlib.
4349 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
4350 interfaces. Add some comments.
4351 (mono_class_init): Call mono_class_setup_methods () here since it is no
4352 longer called by mono_class_setup_vtable ().
4354 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
4355 not set in class->vtable.
4356 (mono_class_create_runtime_vtable): Reenable the disabled code.
4358 * object.c (mono_class_create_runtime_vtable): Disable the last change for
4359 now as it causes some test failures.
4361 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
4362 if using the vtable trampoline. Also remove some strange code which put the
4363 generic methods themselves into the vtable slots. Remove the AOT init_vtable
4364 stuff as it is no longer needed.
4366 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4368 * pedump.c: Give make --verify all option check code as well.
4369 Using --verify code won't check for metadata now.
4371 2008-05-19 Martin Baulig <martin@ximian.com>
4373 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
4376 (_mono_debug_using_mono_debugger): New global variable; it's set
4377 directly by the debugger, so mono_debug_using_mono_debugger() also
4378 works after attaching.
4380 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
4382 * object.c (mono_class_create_runtime_vtable): Use memory barriers
4383 as we do double checked locking on MonoClass::runtime_info and
4384 MonoClassRuntimeInfo::domain_vtables.
4386 2008-05-18 Zoltan Varga <vargaz@gmail.com>
4388 * debug-helpers.c (print_field_value): Fix a warning.
4390 2008-05-16 Zoltan Varga <vargaz@gmail.com>
4392 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
4393 set in the AOT case.
4395 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
4397 * class.c (mono_class_setup_vtable_general): Use memory barriers
4398 as we do double checked locking on MonoClass::vtable.
4400 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
4402 * reflection.c (resolve_object): Inflate only if the generic context
4403 is not null. Fixes #389886.
4405 2008-05-15 Jonathan Chambers <joncham@gmail.com>
4407 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
4410 Code is contributed under MIT/X11 license.
4412 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
4414 * class.c: Revert unrelated change.
4416 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
4418 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
4419 a generic instantiation, use mono_class_from_mono_type instead of playing
4420 with MonoType directly.
4422 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
4424 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
4425 checks must ignore generic instantiations, so mono_class_has_parent is not
4426 suitable. Fixes #390128.
4428 2008-05-14 Zoltan Varga <vargaz@gmail.com>
4430 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
4431 it to avoid registering tokens during metadata generation. Fixes #390023.
4433 2008-05-14 Kornél Pál <kornelpal@gmail.com>
4435 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
4438 Contributed under MIT/X11 license.
4440 2008-05-14 Kornél Pál <kornelpal@gmail.com>
4442 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
4443 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
4444 to fixup the EXE image.
4445 (mono_cleanup): Use mono_close_exe_image.
4446 (mono_close_exe_image): New function.
4447 * image.c: Include "marshal.h".
4448 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
4449 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
4450 counting when the image is loaded outside of mono_image_open_full. Set status
4451 based on GetLastError.
4452 * coree.c: Include required headers. Add init_from_coree.
4453 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
4454 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
4455 (_CorExeMain): Set init_from_coree.
4456 (CorExitProcess): Only call ExitProcess for now.
4457 (CorBindToRuntimeEx): New stub implementation.
4458 (CorBindToRuntime): New function.
4459 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
4460 (MonoFixupExe): ILONLY executables require no fixups.
4461 (mono_set_act_ctx): New function to set activation context.
4462 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
4463 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
4464 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
4465 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
4467 * domain-internals.h: Add mono_close_exe_image.
4469 Contributed under MIT/X11 license.
4471 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
4473 * metadata.c (mono_metadata_compute_size): Correctly calculate field
4474 size for generic param and event tables. Fixes #388977.
4476 2008-05-13 Zoltan Varga <vargaz@gmail.com>
4478 * loader.c (mono_method_signature): Use memory barriers because of the double
4479 checked locking pattern.
4481 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
4482 aborting or aborted as well. Fixes #376391.
4484 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
4485 existing runtime state in the Suspend handler during shutdown.
4487 2008-05-12 Zoltan Varga <vargaz@gmail.com>
4489 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
4491 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
4492 which are starting up or shutting down.
4494 * threads.c (mono_threads_set_shutting_down): Don't return a value since
4495 this function never returns if the runtime is already shutting down.
4497 * icall.c (ves_icall_System_Environment_Exit): Update after
4498 mono_threads_set_shutting_down () signature change.
4500 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
4502 * class.c: Added can_access_instantiation to verify if the instantiation
4503 is visible. Fix access check for nested types as they returned TRUE
4504 before doing type and generic instantiation visibility checks.
4506 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
4508 * reflection.c (mono_reflection_create_generic_class): The created type
4509 must have a different container from its TypeBuilder. Otherwise they
4510 will end sharing generic arguments, which is wrong.
4512 Due to the sharing, making a generic instance of the created type using
4513 the TypeBuider generic arguments resulted in the generic type definition
4514 been returned, which is wrong as well.
4516 As a bonus the code was leaking the type_params array. This memory should
4517 be allocated from the image mempool.
4519 This fixes bug #354047.
4521 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
4523 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
4524 to here as they are now used in assembly.c new code.
4525 Added a skipverification flag to MonoAssembly.
4526 New internal function mono_assembly_has_skip_verification.
4528 * assembly.c: New function mono_assembly_has_skip_verification. It checks
4529 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
4532 2008-05-07 Zoltan Varga <vargaz@gmail.com>
4534 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
4535 needed. Fixes #387034.
4537 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
4539 2008-05-06 Miguel de Icaza <miguel@novell.com>
4541 * assembly.c (mono_assembly_load_reference): Prevent crash while
4542 disassembling Silverlight 2.0 executables while we still do not
4543 have GACed libraries.
4545 2008-05-07 Zoltan Varga <vargaz@gmail.com>
4547 * reflection.c: Special case generic type definitions as well. Fixes #383444.
4549 2008-05-06 Zoltan Varga <vargaz@gmail.com>
4551 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
4552 of the dynamic case. Fixes #387404.
4554 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4556 *verify.c (mono_verifier_is_class_full_trust): If under
4557 verify_all and the verifier mode was not set, only
4558 gac and corlib types are fulltrust. This makes --verify-all
4559 usable to detect unverifiable code, which is the expected
4562 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4564 * verify.h: Ops, commited the header with debug
4567 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4569 * verify.c (merge_stack): Use the new value on unverifiable
4572 * verify.c (verify_type_compatibility_full): Comparison
4573 of nullable types can't use mono_class_is_assignable_from.
4575 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
4576 that makes all verification errors be reported.
4578 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
4581 2008-05-05 Robert Jordan <robertj@gmx.net>
4583 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
4584 support for value types. See #386415.
4586 * object.c: comments.
4588 Code is contributed under MIT/X11 license.
4590 2008-05-05 Martin Baulig <martin@ximian.com>
4592 * debug-mono-symfile.h
4593 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
4594 for old pre-terrania symbol files.
4596 2008-05-05 Andreas Färber <andreas.faerber@web.de>
4598 * mono-config.c: Add ppc64 architecture.
4600 Code is contributed under MIT/X11 license.
4602 2008-05-05 Andreas Färber <andreas.faerber@web.de>
4604 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
4605 PPC64 uses function descriptors as well.
4607 Code is contributed under MIT/X11 license.
4609 2008-05-04 Zoltan Varga <vargaz@gmail.com>
4611 * object.c (compute_class_bitmap): Ignore literal static fields.
4613 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
4614 var has an invalid format.
4615 (describe_ptr): Add some sanity checks for the vtable.
4616 (add_nursery_frag): Clear unused nursery fragments.
4617 (major_collection): Clear all remaining nursery fragments.
4619 2008-05-03 Robert Jordan <robertj@gmx.net>
4621 * image.c, metadata-internals.h: add thunk_invoke_cache.
4623 * marshal.c, marshal.h: implement
4624 mono_marshal_get_thunk_invoke_wrapper ().
4626 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
4628 Code is contributed under MIT/X11 license.
4630 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
4632 * verify.c (do_leave): Empty the stack.
4634 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
4636 * class.c (mono_class_is_assignable_from): Variance
4637 doesn't work between reference and value types. For example,
4638 given type C<T+>, C<int32> is not assignable to C<object>.
4639 Break the argument checking loop on first error.
4641 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
4643 * icall.c : base64_to_byte_array() needs some more strict
4644 check for sequence of '=' characters. Patch by Santa
4645 Marta (http://deee.g.hatena.ne.jp/santamarta).
4647 Contributed under MIT/X11 license.
4648 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
4650 2008-05-02 Jonathan Chambers <joncham@gmail.com>
4652 * domain.c: Disable LoadLibrary support to fix Win32 build.
4654 Code is contributed under MIT/X11 license.
4656 2008-05-02 Zoltan Varga <vargaz@gmail.com>
4658 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
4659 to help with cache behaviour.
4661 2008-05-01 Miguel de Icaza <miguel@novell.com>
4663 * appdomain.c (mono_domain_from_appdomain): Add new accessor
4666 2008-05-01 Zoltan Varga <vargaz@gmail.com>
4668 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
4670 2008-05-01 Dick Porter <dick@ximian.com>
4672 * process.c (process_get_fileversion): Only pass 16 bits of
4673 language ID to VerLanguageName. Fixes bug 381204.
4675 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4677 * verify.c (mono_method_verify): Fix the comparison
4678 operator for code bounds check.
4680 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4682 * verify.c (mono_method_verify): Check the bounds of
4683 all access of the code array.
4685 2008-04-29 Kornél Pál <kornelpal@gmail.com>
4687 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
4689 2008-04-28 Zoltan Varga <vargaz@gmail.com>
4691 * image.c (mono_image_strong_name_position): Fix return value when the rva is
4694 2008-04-28 Kornél Pál <kornelpal@gmail.com>
4696 * loader.c (mono_get_method_from_token, mono_method_signature): Add
4697 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
4698 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
4699 fixup main EXE images when using mono.exe for mixed-mode assembly support.
4700 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
4702 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
4703 runtime initialization from metadata.
4704 * assembly.c: Remove obsolete ceGetModuleFileNameA.
4705 (mono_set_rootdir): Use mono_get_module_file_name.
4706 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
4708 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
4709 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
4710 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
4711 MonoCLIImageInfo. Add support for module handles.
4712 (load_cli_header): Update mono_cli_rva_image_map signature.
4713 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
4714 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
4715 (mono_image_rva_map): Add support for module handles.
4716 (mono_image_ensure_section_idx): Add support for module handles.
4717 (mono_image_close): Add support for module handles.
4718 (do_load_header): Add support for module handles.
4719 (mono_image_open_from_module_handle): New function for internal use.
4720 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
4721 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
4722 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
4724 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
4725 * image.h: Add mono_image_fixup_vtable.
4726 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
4728 * coree.h: New file.
4729 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
4730 unsupported native code.
4731 (mono_marshal_set_callconv_from_modopt): New function splitted from
4732 mono_marshal_get_managed_wrapper.
4733 (mono_marshal_get_managed_wrapper): Use
4734 mono_marshal_set_callconv_from_modopt.
4735 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
4736 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
4737 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
4738 that results in a deadlock when the runtime is loaded in _CorDllMain.
4739 * Makefile.am: Add coree.c and coree.h.
4741 Contributed under MIT/X11 license.
4743 2008-04-28 Mark Probst <mark.probst@gmail.com>
4745 * generic-sharing.c: Search for type arguments in array element
4748 2008-04-28 Mark Probst <mark.probst@gmail.com>
4750 * class-internals.h, generic-sharing.c: New, small runtime generic context.
4752 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
4754 * object.c: Don't setup the RGCTX when the vtable is created,
4755 because we're setting it up lazily now.
4757 2008-04-26 Zoltan Varga <vargaz@gmail.com>
4759 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
4762 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
4764 * verify.c (verify_class_for_overlapping_reference_fields):
4765 If class is under fulltrust allow reference types to overllap
4766 if they have the same RVA.
4768 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
4770 * pedump.c: Added new flag valid-only, that makes the verifier
4771 behaves just like --security=validil. It won't fail type load
4772 due to unverifiable restrictions.
4774 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
4776 * class-internals.h (struct MonoMethod): Added a verification_success
4777 field to cache verifier executions. Reduced MonoMethod:slot size by
4780 2008-04-23 Zoltan Varga <vargaz@gmail.com>
4782 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
4783 instead of a 'vt' argument to save an indirection and to allow these to be used
4785 (scan_vtype): New helper function to scan an area using a gc descriptor.
4786 (mono_gc_wbarrier_value_copy): Implement this.
4787 (handle_remset): Add support for REMSET_VTYPE.
4788 (find_in_remset_loc): Ditto.
4789 (mono_gc_base_init): Allow some debugging options to be controlled through the
4790 use of the MONO_GC_DEBUG env variable.
4791 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
4792 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
4794 2008-04-23 Martin Baulig <martin@ximian.com>
4796 * domain.c (mono_domain_create): Move the call to
4797 mono_debug_domain_create() down, after allocating the domain id.
4799 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
4801 verify.c (verify_class_for_overlapping_reference_fields): Skip
4802 static fields while verifying for overlapping fields as they
4803 don't matter at all.
4805 2008-04-23 Marek Habersack <mhabersack@novell.com>
4807 * domain-internals.h: added a declaration of
4808 mono_make_shadow_copy.
4810 * assembly.c (mono_assembly_open_full): shadow copying of
4811 assemblies moved to here, so that all the assemblies within the
4812 application domain's private binary directories can be
4813 processed. Fixes bug #380546
4815 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
4816 mono_make_shadow_copy and made non-static. The decision whether
4817 to shadow-copy an assembly is made based on its location - it's
4818 copied if it's in one of the private application domain binary
4819 directories and its different to the target file in the shadow
4820 directory. Fixes bug #380546
4822 2008-04-22 Zoltan Varga <vargaz@gmail.com>
4824 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
4826 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
4829 * reflection.c (mono_image_create_token): Handle
4830 Method/ConstructorOnTypeBuilderInst.
4831 (resolve_object): Ditto.
4832 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
4833 so it can be called from resolve_object. Also handle the case when the inflated
4834 class already has its methods setup.
4836 2008-04-21 Martin Baulig <martin@ximian.com>
4838 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
4840 2008-04-20 Geoff Norton <gnorton@novell.com>
4842 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
4843 pointer dereference.
4845 2008-04-15 Marek Habersack <mhabersack@novell.com>
4847 * appdomain.c (try_load_from): if IOMAP is in effect, call the
4848 portability API to look up the assembly file. Fixes behavior in
4849 situations when the application has a bin/ directory, but the
4850 assembly search patch refers to Bin/ (and thus the requested file
4851 name is Bin/SomeLibrary.dll). Fixes bug #379888
4853 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
4855 verify.c (mono_type_is_generic_argument): Extracted this check
4856 from a dozen places to here.
4858 verify.c: Fixed all issues related to boxing generic arguments
4859 and their constraints.
4861 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
4863 verify.c (mono_class_interface_implements_interface): Fix win32 build.
4865 2008-04-14 Zoltan Varga <vargaz@gmail.com>
4867 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
4868 isn't finished yet. Fixes #363447.
4870 2008-04-13 Zoltan Varga <vargaz@gmail.com>
4872 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
4875 2008-04-13 Jb Evain <jbevain@novell.com>
4877 * domain.c: update the 2.1 profile versions.
4878 Merged from the Moonlight 2 branch.
4880 2008-04-12 Zoltan Varga <vargaz@gmail.com>
4882 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
4883 mscorlibs for the non-refonly case as well.
4885 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
4886 in mono_assembly_load_from_full (). Fixes #378924.
4888 2008-04-11 Geoff Norton <gnorton@novell.com>
4890 * icall.c: The global extern environ doesn't exist on Mac. We
4891 need to call NSGetEnviron instead.
4893 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4895 verify.c: Add generic method constraint verification.
4897 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4899 class.c (mono_class_inflate_generic_method_full): Add a long
4900 explanation to the is_mb_open hack. Remove the FIXME.
4902 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4904 * verify.c (mono_method_verify): Mark all unknown opcodes
4905 as invalid. Mark jmp as unverifiable.
4907 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4909 * verify.c: Add code to do type constraint verification on class instances.
4911 * verify.c (mono_verifier_verify_class): Use the type constraint
4914 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4916 * class.c (mono_class_get_field_default_value): Don't pass cindex
4917 as hint to mono_metadata_get_constant_index. The local is not initialized
4918 and should contain garbage most of the time. This could only work
4921 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
4923 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
4925 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
4927 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
4929 * class.c (mono_class_from_generic_parameter): Save the token of the
4930 generic param in MonoClass::sizes.generic_param_token.
4932 * reflection.c (mono_custom_attrs_from_class): If the class type is
4933 VAR or MVAR retrieve the attributes of the generic param.
4935 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
4937 * class.c (mono_class_init): Do class verification if the verifier
4940 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
4942 * verify-internal.h: Added mono_verifier_verify_class.
4944 * verify.c: Added mono_verifier_verify_class. It checks for
4945 classes with explicit layout that have overlapping reference fields.
4947 * pedump.c: Init the verifier state prior to verification. Fixed
4948 command line arguments.
4950 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
4952 * Makefile.am: Added verify-internals.h, hopefully fix the build.
4954 2008-04-08 Zoltan Varga <vargaz@gmail.com>
4956 * verify-internals.h: Fix a warning.
4958 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
4960 * verify-internals.h: New header with the verifier configuration
4961 extracted from mini.c.
4963 * verify.c: Implemented the new functions exported by verify-internals.h.
4965 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
4967 * verify.c: Add proper verification of ckfinite.
4969 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4971 * verify.c (do_conversion): Improved error message to something
4974 * verify.c (check_is_valid_type_for_field_ops): Fix to work
4975 with primitive types.
4977 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4979 * verify.c: Added tail prefix checking. Marked icall
4982 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4984 * verify.c: Fix the detection of branches to the middle
4987 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
4989 * verify.c: Implemented verification of volatile. and
4990 unaligned. prefix. Check if a type is valid after retrieving it.
4992 2008-04-01 Dick Porter <dick@ximian.com>
4994 * process.c (process_get_fileversion): If there's no string block,
4995 set the file language to en_US. Fixes the other new part of bug
4998 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
5000 * class.c: New functions mono_method_can_access_field_full and
5001 mono_method_can_access_method_full. They perform type visibility
5002 and type site check.
5004 * class-internal.h: Added exported functions.
5006 * verify.c: Use new functions to implement proper visibility checks.
5008 2008-03-29 Zoltan Varga <vargaz@gmail.com>
5010 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
5012 2008-03-28 Dick Porter <dick@ximian.com>
5014 * process.c (process_get_fileversion): Use the first language ID
5015 we see, rather than insisting on an invariant language. Fixes bug
5018 2008-03-28 Zoltan Varga <vargaz@gmail.com>
5020 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
5021 the streams to fix reading of invalid memory later.
5023 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
5026 2008-03-26 Zoltan Varga <vargaz@gmail.com>
5028 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
5029 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
5031 2008-03-26 Massimiliano Mantione <massi@ximian.com>
5032 * threads.h: Added MonoThreadManageCallback type and
5033 mono_thread_set_manage_callback prototype
5034 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
5035 (used to store the mono_thread_manage callback).
5036 * threads.c: Added mono_thread_set_manage_callback, and handle
5037 "MonoThread->manage_callback" in build_wait_tids.
5039 2008-03-26 Dick Porter <dick@ximian.com>
5041 * process.c (process_get_fileversion): Set FileVersionInfo strings
5042 to Empty when the resource doesn't have the particular info.
5045 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
5047 * verify.c (mono_method_verify): Proper prefix validation.
5049 2008-03-25 Zoltan Varga <vargaz@gmail.com>
5051 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
5052 itself in a separate argument instead of throwing them. Fixes #373448.
5054 * appdomain.c: Bump corlib version.
5056 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
5058 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
5060 2008-03-20 Kornél Pál <kornelpal@gmail.com>
5062 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
5065 2008-03-20 Mark Probst <mark.probst@gmail.com>
5067 * generic-sharing.c, class-internals.h: Code for putting
5068 reflection types into the runtime generic context.
5070 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
5072 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
5076 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
5078 * verify.c (VerifyContext): Added instruction prefix data to the struct.
5080 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
5082 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
5084 * verify.c (do_cast): Let the result value keep the boxed status.
5086 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
5088 2008-03-17 Jb Evain <jbevain@novell.com>
5090 * reflection.c: when running on a 2.0 runtime, emit
5091 unconditionally the #~ header version as 2.0, and the
5092 CLI header version as 2.5, for symmetry's sake with csc.
5094 2008-03-16 Zoltan Varga <vargaz@gmail.com>
5096 * class.c: Remove the unused cache_interface_offsets stuff.
5098 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
5099 profiler.c: Fix warnings.
5101 2008-03-16 Mark Probst <mark.probst@gmail.com>
5103 * generic-sharing.c, class-internals.h: Support for putting
5104 methods into the runtime generic context.
5106 2008-03-16 Zoltan Varga <vargaz@gmail.com>
5108 * class.c (mono_class_setup_fields): Ignore calls made to this function for
5109 classes which are generic instances of not-yet finished typebuilders. Fixes
5112 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
5114 2008-03-15 Zoltan Varga <vargaz@gmail.com>
5116 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
5118 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
5119 field, replace it with a hash table in MonoDynamicImage.
5121 * reflection.c (inflate_mono_method): Access the generic definition object from
5122 image->generic_def_objects instead of imethod->reflection_info.
5124 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
5126 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
5128 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
5129 function in reflection.c so it is easier to keep in sync with the dynamic image
5132 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
5133 mono_image_close ().
5135 2008-03-15 Mark Probst <mark.probst@gmail.com>
5137 * class.c (mono_class_generic_sharing_enabled): Disable generic
5138 sharing for all architectures except AMD64 and x86 to fix build.
5140 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
5142 * verify.c: Use the generic definition MonoGenericContext when available.
5143 Remove code for checking generics instance compatibility in favor of
5144 mono_class_is_assignable_from.
5146 2008-03-14 Mark Probst <mark.probst@gmail.com>
5148 * marshal.c, marshal.h, metadata-internals.h, image.c,
5149 wrapper-types.h: New wrapper for invoking a shared static method
5150 without having to pass the runtime generic context argument.
5152 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
5154 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
5156 2008-03-14 Zoltan Varga <vargaz@gmail.com>
5158 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
5160 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
5161 create a token from a FieldOnTypeBuilderInst.
5162 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
5163 (resolve_object): Ditto.
5165 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
5166 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
5168 2008-03-14 Martin Baulig <martin@ximian.com>
5170 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
5172 * debug-mono-symfile.h
5173 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
5174 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
5176 2008-03-10 Martin Baulig <martin@ximian.com>
5178 * debug-mono-symfile.h
5179 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
5180 `lexical_block_table_offset'.
5181 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
5183 (MonoSymbolFile): Added `version'.
5186 (MonoDebugLexicalBlockEntry): Removed.
5187 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
5190 * mono-debug.c (mono_debug_add_method): Don't compute lexical
5191 blocks here; the debugger now does this internally.
5193 2008-02-27 Martin Baulig <martin@ximian.com>
5195 * object.c (mono_runtime_exec_main): Call
5196 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
5197 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
5199 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
5201 * verify.c (verify_type_compatibility_full): Allow native int to be converted
5202 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
5204 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
5206 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
5207 ldftn with a virtual method.
5209 2008-03-13 Geoff Norton <gnorton@novell.com>
5211 * decimal.c: Only include memory.h if the platform has it.
5213 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
5215 * assembly.c, class.c, metadata-internals.h: make sure public key
5216 tokesns are compared in a case-insensitive way. Also, all
5217 the lookups in the GAC use a lowercase public key token
5218 (gaacutil already does the lowercasing on install). Fixes
5221 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
5223 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
5226 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
5228 * image.c: when someone loads a mscorlib from a file, return the
5229 currently loaded mscorlib (fixes bug #369253).
5231 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
5233 * class.c: handle types with no parents by forcing them to have
5234 System.Object as a parent and marking them as broken (this currently
5235 allows the first part of bug #369173 to work as well, likely because
5236 we don't check for typeload exceptions everywhere yet).
5238 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
5240 * class.c: more complete check that types belong to corlib
5241 (fixes second part of bug #369173).
5243 2007-03-10 Bill Holmes <billholmes54@gmail.com>
5245 * generic-sharing.c: Including glib.h for the MSVC builds to define
5246 "inline" to "__inline" before including mono-membar.h.
5248 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
5249 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
5252 Contributed under MIT/X11 license.
5254 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
5256 * verify.c (do_invoke_method): Remove return type validation.
5258 * verify.c (do_ret): Do return type validation at return site instead of
5261 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
5263 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
5265 * verify.c: Some todos cleaned and improved a few error messages.
5267 2008-03-08 Zoltan Varga <vargaz@gmail.com>
5269 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
5271 2008-03-07 Zoltan Varga <vargaz@gmail.com>
5273 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
5274 system types correctly.
5276 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
5279 2008-03-06 Zoltan Varga <vargaz@gmail.com>
5281 * assembly.c (build_assembly_name): Fix a warning.
5283 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5285 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
5286 the called function takes an object type argument. Fixes storing or
5287 valuetypes across remoting as well as reducing memory usage.
5288 * image.c, metadata-internals.h: remove now unused ldfld_remote and
5289 stfld_remote wrapper caches.
5291 2008-03-06 Zoltan Varga <vargaz@gmail.com>
5293 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
5296 * reflection.c (mono_image_register_token): New helper function to save
5297 a token->object mapping.
5299 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
5302 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
5303 one dimension arrays. Fixes #367670.
5304 (mono_reflection_get_type_internal): Ditto.
5306 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
5308 * marshal.c: mono_load_remote_field_new() always returns object.
5309 so use the proper signature (fixes bug #366445).
5311 2008-03-04 Zoltan Varga <vargaz@gmail.com>
5313 * class-internals.h (MonoMethod): Remove unused uses_this flag,
5314 add an 'inline_failure' flag instead.
5316 2008-03-04 Mark Probst <mark.probst@gmail.com>
5318 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
5319 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
5320 contains the location of "this", used for exception handling.
5322 2008-03-04 Zoltan Varga <vargaz@gmail.com>
5324 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
5325 their size on all platforms for perf reasons.
5327 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5329 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
5332 * object-internal.h: Same.
5334 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5336 * reflection.h: Fix the build I just broke.
5338 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5340 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
5341 Test if a token is valid, this remove explicit usage of
5342 MonoDynamicImage::tokens from the verifier code.
5344 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
5346 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
5347 instead of direct access to MonoDynamicImage::tokens.
5349 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5351 * verify.c (token_bounds_check): Fix the build I just broke.
5353 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
5355 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
5357 * verify.c (verifier_load_method): Fixed the errors message.
5359 * verify.c (mono_method_verify): Fixed a debug message.
5361 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
5363 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
5364 mono-perfcounters.h, class-internals.h: support for predefined
5365 writable counters, query of categories and counters, bugfixes.
5367 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
5369 * verify.c (do_refanytype): Verify the refanytype opcode.
5371 * verify.c (mono_method_verify): Use do_refanytype.
5373 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
5375 * verify.c (do_mkrefany): Verify the mkrefany opcode.
5377 * verify.c (mono_method_verify): Use do_mkrefany.
5379 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
5381 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
5382 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
5385 2008-02-27 Zoltan Varga <vargaz@gmail.com>
5387 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
5388 the type load exception.
5390 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
5392 * verify.c: Added a few FIXME for method signatures
5394 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
5395 of mono_method_get_signature and get vararg call working. Removed unused
5396 checks for return value.
5398 * verify.c (do_refanyval): Verify the refanyval opcode.
5400 * verify.c (mono_method_verify): Implemented verification of arglist and
5403 2008-02-27 Zoltan Varga <vargaz@gmail.com>
5405 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
5406 vtypes to marshal.c.
5408 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
5409 it works for AOT as well.
5411 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
5413 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
5414 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
5415 the system time is adjusted.
5417 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
5419 * icall.c, icall-def.h: use the new time functions (fixes the
5420 non-monotonic behaviour of TickCount).
5422 2008-02-26 Zoltan Varga <vargaz@gmail.com>
5424 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
5425 it breaks the build.
5427 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
5428 cattr is not finished yet.
5430 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
5432 * verify.c: Proper token validation for field, method and type.
5434 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
5436 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
5438 * loader.c (method_from_memberref): Generate type load error instead of method missing
5439 if the type is not found.
5441 2008-02-23 Zoltan Varga <vargaz@gmail.com>
5443 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
5444 some of the conversions caused the generation of a marshal directive exception.
5446 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
5448 verify.c: Report which exception should be thrown by the JIT.
5449 Added a lot of FIXME notes.
5451 2008-02-22 Mark Probst <mark.probst@gmail.com>
5453 * generic-sharing.c: Runtime generic context slots are not
5454 instantiated on init anymore. Instead, provide function to do the
5455 instantiating on demand.
5457 * class-internals.h: Added vtable to runtime generic context.
5458 Macros for encoding direct and indirect slot offsets in one
5461 2008-02-21 Mark Probst <mark.probst@gmail.com>
5463 * object.c, generic-sharing.c: Moved some generic sharing code
5464 from object.c to generic-sharing.c.
5466 * generic-sharing.c: Added support for extensible runtime generic
5469 * metadata-internals.h: Two new hash tables in MonoImage for
5470 extensible runtime generic context support.
5472 * domain.c: Unregister generic vtables upon domain unloading.
5474 * image.c: Destroy new hash tables upon image unloading.
5476 * metadata.c: Unregister generic subclasses upon image unloading.
5478 * class-internals.h: New data structure for runtime generic
5479 context template. New fields in the runtime generic context for
5482 * Makefile.am: Added generic-sharing.c.
5484 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
5486 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
5487 there is a pending loader exception, raise it.
5489 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
5492 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
5497 2008-02-20 Zoltan Varga <vargaz@gmail.com>
5499 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
5501 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
5503 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
5504 ref-only requests for compatibility with MS.
5506 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
5508 * reflection.c (mono_custom_attrs_from_method): Don't silently
5509 return an empty list for generic method instances.
5510 (mono_custom_attrs_from_param): Likewise.
5512 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
5513 Raja R Harinath <harinath@hurrynot.org>
5516 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
5517 * class.c (mono_class_inflate_generic_method_full): Initialize it
5518 when a fully-open method is instantiated.
5519 * metadata.c (inflated_method_equal, inflated_method_hash): Update
5521 * reflection.c (inflate_mono_method): Don't create a temporary context.
5523 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
5525 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
5526 Compute correct value, to prepare for imethod->reflection_info going away.
5528 2008-02-19 Zoltan Varga <vargaz@gmail.com>
5530 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
5532 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
5534 * verify.c: Implement skip visibility flag.
5536 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
5538 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
5539 which contains an extra field to tell the kind of exception that should be thrown.
5541 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
5543 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
5545 * loader.c (mono_method_get_param_names): Initialize 'klass' after
5546 'method' is updated.
5548 2008-02-11 Zoltan Varga <vargaz@gmail.com>
5550 * class.c (mono_class_layout_fields): Set class->min_align for classes using
5551 explicit layout as well. Fixes #360375.
5553 2008-02-11 Geoff Norton <gnorton@novell.com>
5555 * loader.c: Guard and dereference against inflated generic methods
5557 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
5559 * class.c: Include Retargetable spec in assembly name.
5560 * assembly.c: Always include PublicKeyToken spec in assembly name
5561 (with value "null" if assembly is not signed), and include
5563 * icall-def.h: Added icall for Assembly.get_fullname.
5564 * icall.c: Added icall returning the fullname of an assembly.
5566 2008-02-09 Zoltan Varga <vargaz@gmail.com>
5568 * class.c (mono_class_setup_vtable_general): Add a missing call to
5569 mono_class_setup_methods () which is needed in the AOT case.
5571 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
5573 * verify.c (mono_type_get_stack_name): Added. Return the name for the
5574 stack type of the given MonoType.
5576 * verify.c (verify_type_compatibility_full): Handle the void type.
5578 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
5579 way stack merging works.
5581 * verify.c (store_local): Improved verification message.
5583 * verify.c (do_branch_op): If the merging is invalid, the method
5584 is unverifiable and not invalid. Improved error message.
5586 * verify.c (merge_stacks): Properly merge a boxed valuetype and
5587 a reference type diferent than System.Object. Improved error
5590 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
5592 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
5594 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
5595 type of an enum even if the argument is byref.
5597 * verify.c: Replace all explicit uses of enumtype and enum_basetype
5598 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
5600 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
5602 *verify.c (verify_type_compatibility_full): Make enum types
5603 compatible with their base types.
5605 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
5606 types are compatible for the special case of a boxed valuetype and
5609 * verify.c (verify_stack_type_compatibility): The function
5610 is_compatible_boxed_valuetype was extracted from here.
5612 * verify.c (push_arg): Only set ctx->has_this_store if the method
5615 * verify.c (do_ldelem): Fixed a typo in an error message and added
5616 strict check for mixing int32 and native int as the array type
5619 * verify.c (merge_stacks): Consider boxed valuetypes in the
5620 compatibility checks.
5622 2008-02-07 Massimiliano Mantione <massi@ximian.com>
5623 * profiler.h: (MonoGCEvent): Added start-stop the world events.
5625 2008-02-06 Massimiliano Mantione <massi@ximian.com>
5626 *class.c: use_new_interface_vtable_code: renamed the env var to have
5627 a "MONO_" prefix, and fix the logic to enable it by default.
5629 2008-02-06 Massimiliano Mantione <massi@ximian.com>
5631 mono_class_setup_vtable_general: rewrote the way in which interface
5632 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
5633 makes the code more maintainable.
5634 For now the old code is still there, and can be activated setting
5635 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
5637 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
5639 * verify.c: guarded some debug functions around and #ifdef.
5641 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
5643 2008-02-06 Zoltan Varga <vargaz@gmail.com>
5645 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
5646 changes for now since they seem to break too many things.
5648 2008-02-05 Mark Probst <mark.probst@gmail.com>
5650 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
5651 mono_marshal_find_nonzero_bit_offset): Added macro and function
5652 for finding the byte- and bit-offset of a bitfield within a
5655 2008-02-05 Zoltan Varga <vargaz@gmail.com>
5657 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
5658 (mono_marshal_get_struct_to_ptr): Ditto.
5660 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
5663 2008-02-03 Zoltan Varga <vargaz@gmail.com>
5665 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
5666 between methods for non-corlib types.
5668 2008-02-02 Geoff Norton <gnorton@novell.com>
5670 * loader.c (mono_method_get_param_names): Populate the parameter name for
5671 generic parameters as well. (Fixes #342536)
5673 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
5675 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
5677 * verify.c (do_invoke_method): Fix for calling with byref structs.
5679 * verify.c (do_cast): push a boxed value type based on the type token and not
5682 2008-01-31 William Holmes <billholmes54@gmail.com>
5684 * process.c (process_module_string_read): Check the size returned form
5685 VerQueryValue to avoid out of memory exception.
5687 2008-01-30 Zoltan Varga <vargaz@gmail.com>
5689 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5690 Handle properly modules which are not in the moduleref table. Fixes
5693 2008-01-29 Zoltan Varga <vargaz@gmail.com>
5695 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
5696 the dynamic case which is now in managed code.
5697 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
5699 * marshal.c (mono_string_to_bstr): Fix a warning.
5700 (init_com_provider_ms): Ditto.
5702 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
5704 * exception.c (mono_get_exception_out_of_memory): New helper function.
5706 2008-01-28 Jonathan Chambers <joncham@gmail.com>
5708 * marshal.c: Add support for BSTR marshalling
5709 using other COM systems.
5711 Code is contributed under MIT/X11 license.
5713 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
5715 * object.c (mono_runtime_invoke_array): reverted previous
5716 commit as it breaks the build.
5718 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
5720 * object.c (mono_runtime_invoke_array): Verify arguments for
5721 invalid types. Fixes #348522.
5723 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
5725 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
5726 non-final virtual calls using call.
5728 * verify.c (do_invoke): fixed some TODOs.
5730 * verify.c (push_arg): set has_this_store for "ldarga 0".
5732 2008-01-27 Zoltan Varga <vargaz@gmail.com>
5734 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
5735 which belong to an inflated class. Fixes #356531.
5737 2008-01-26 Robert Jordan <robertj@gmx.net>
5739 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
5740 which resort to FindFirstFile when a certain error condition
5741 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
5742 Code is contributed under MIT/X11 license.
5744 2008-01-24 Jonathan Chambers <joncham@gmail.com>
5746 * marshal.c (emit_marshal_string): Fix out string marshalling
5747 to use specified encoding. Fixes #323900.
5749 Code is contributed under MIT/X11 license.
5751 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
5753 * class.c (mono_class_inflate_generic_method_full): Don't modify
5754 iresult->context after cache check.
5756 2008-01-23 Zoltan Varga <vargaz@gmail.com>
5758 * class.c (mono_class_inflate_generic_method_full): Change the
5759 struct assignments to memcpy for better visibility and add some comments.
5761 2008-01-23 Dick Porter <dick@ximian.com>
5763 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
5764 procedure, and make it work on windows.
5766 2008-01-22 Zoltan Varga <vargaz@gmail.com>
5768 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
5769 a MonoReflectionTypeBuilder since it is always of that type.
5771 * reflection.c (mono_type_get_object): Remove an unneccesary check.
5773 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
5775 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
5777 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
5779 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
5781 * reflection.c (mono_reflection_create_runtime_class): Remove already created
5782 instantiations from the type cache.
5784 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5786 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
5788 * verify.c (do_unbox_value): push a controled mutability managed pointer.
5790 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5792 * verify.c (do_ldstr): added, verifies if the #US token is valid.
5794 * verify.c (mono_method_verify): removed old TODO
5796 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5798 * verify.c (do_newobj): add visibility check.
5800 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5802 * verify.c (do_load_function_ptr): add visibility check.
5804 2008-01-21 Massimiliano Mantione <massi@ximian.com>
5806 mono_generic_class_get_class: hook profiler events.
5807 mono_field_get_offset: added to support heap-shot in the new profiler.
5808 *class.h: exported mono_field_get_offset.
5810 mono_reflection_setup_internal_class: hook profiler events.
5812 2008-01-20 Zoltan Varga <vargaz@gmail.com>
5814 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
5815 argument here too and use it to avoid checking for pending exceptions if
5818 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
5820 * assembly.c (build_assembly_name): add arg for passing the assembly
5821 flags. Do not consider a PublicKey with value "null" valid.
5822 (mono_assembly_name_parse_full): added boolean argument that will be
5823 set if the assembly name contains a PublicKeyToken spec. Added support
5824 for the Retargetable spec for which only Yes or No are allowed as valid
5825 value. Consider assembly name invalid if Retargetable spec is set, but
5826 either version, culture or public key (token) are not specified.
5827 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
5828 with implementation in assembly.c.
5829 * icall.c (fill_reflection_assembly_name): also copy assembly flags
5830 from MonoAssemblyName.
5831 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
5832 introduced argument for mono_assembly_name_parse_full to know if the
5833 assembly name has a PublicKeyToken spec, and if it has instruct
5834 fill_reflection_assembly_name to use default value for keyToken (if
5835 PublicKeyToken is null).
5837 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
5839 * verify.c (mono_method_verify): fixed ovf ops with
5840 float values. They are unverifiable now.
5842 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
5844 * class.c (set_failure_from_loader_error): add BadImageException to the
5845 list of exceptions that can cause a type to fail to load.
5847 * class.c (mono_class_get_exception_for_failure): same.
5849 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
5851 * verify.c (in_any_exception_block): added, check if offset
5852 is part of any exception handling clause.
5854 * verify.c (get_stack_type): added VAR and MVAR types.
5856 * verify.c (do_stobj): better error messages.
5858 * verify.c (do_cpobj): added, check cpobj.
5860 * verify.c (do_initobj): added, check initobj.
5862 * verify.c (do_sizeof): added, check sizeof.
5864 * verify.c (do_localloc): added, check localloc.
5866 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
5868 2008-01-17 Zoltan Varga <vargaz@gmail.com>
5870 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
5871 save_lmf/restore_lmf opcodes.
5873 * threads.c (mono_threads_install_notify_pending_exc): New function to
5874 install a callback notifying the JIT there is a pending exception on a thread.
5875 (mono_thread_request_interruption): Call the new callback.
5876 (mono_thread_get_and_clear_pending_exception): New function to return the
5877 exception pending on a thread.
5879 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
5880 to turn off checking for pending exceptions.
5881 (mono_marshal_get_native_wrapper): Ditto.
5883 2008-01-16 Zoltan Varga <vargaz@gmail.com>
5885 * threads-types.h: Get rid of the unnecessary extern declarations.
5887 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
5889 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
5890 return field from parent class if not private.
5891 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
5892 returns fields from parent class if they are not private.
5893 (method_nonpublic): added function to determine if a given method
5894 should be considered non-public. Returns false for private methods
5895 on parent class, and internal methods from parent on the 1.0 profile.
5896 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
5897 use method_nonpublic function to determine whether method should be
5899 (property_accessor_public): use newly introduced method_nonpublic
5900 function to determine whether accessor is non-public.
5901 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
5902 event from parent class if not private. Only return static event if
5903 Static flag is set, and only return static event from parent class if
5904 FlattenHierarchy flag is set.
5905 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
5906 include non-private events from parent class.
5908 2008-01-16 Zoltan Varga <vargaz@gmail.com>
5910 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
5913 2008-01-16 Wade Berrier <wberrier@novell.com>
5915 * security.c: Add assembly.h header to appease some warnings
5917 2008-01-16 Dick Porter <dick@ximian.com>
5919 * process.c (process_module_string_read): Remove trailing null
5922 2008-01-16 Mark Probst <mark.probst@gmail.com>
5924 * class-internals.h: A new data structure describing the layout of
5925 a runtime generic context (MonoRuntimeGenericContextTemplate).
5927 * metadata-internals.h: Added a hash table to MonoDomain that maps
5928 from open generic classes to their runtime generic context
5931 * object.c: Building of the runtime generic context, including
5932 proper handling of generic type arguments of superclasses.
5933 Building of the runtime generic context according to the template.
5935 2008-01-15 Zoltan Varga <vargaz@gmail.com>
5937 * class.c (mono_class_setup_fields): Set field.count for generic instances.
5940 * image.c (do_mono_image_open): Pass TRUE as last_exists to
5941 mono_portability_find_file (). Fixes #325466.
5942 (mono_image_get_public_key): Fix a warning.
5944 2008-01-14 Zoltan Varga <vargaz@gmail.com>
5946 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
5948 (mono_class_from_name_case): Ditto.
5950 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
5952 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
5953 common storage for the tables used in the System/NumberFormatter class.
5955 2008-01-13 Zoltan Varga <vargaz@gmail.com>
5957 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
5959 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
5961 * verify.c (get_boxable_mono_type): check if the token is valid.
5963 * verify.c (set_stack_value): changed to add an error if an
5964 invalid type is set on stack. Changed all callers due to signature change.
5966 * verify.c (do_stobj): implement stobj validation.
5968 2008-01-11 Zoltan Varga <vargaz@gmail.com>
5970 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
5971 set container->is_method, it was set earlier.
5973 * metadata.c (type_in_image): Handle MVARs which belong to not finished
5976 * reflection.c (mono_reflection_initialize_generic_parameter): Set
5977 is_method of the generic container to TRUE for methods.
5979 2008-01-10 Zoltan Varga <vargaz@gmail.com>
5981 * metadata.c (type_in_image): Handle type parameters properly.
5983 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
5984 memory ownership of this structure.
5986 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
5988 * verify.c (get_boxable_mono_type): make typedref types been just
5989 unverifiable. check for void type.
5991 * verify.c (do_unbox_any): added, verify opcode unbox.any.
5993 * verify.c (do_load_function_ptr): accept method spec tokens.
5995 2008-01-10 Zoltan Varga <vargaz@gmail.com>
5997 * marshal.c (mono_class_native_size): Always set *align even if this is called
6000 2008-01-09 Zoltan Varga <vargaz@gmail.com>
6002 * verify.c (mono_verify_corlib): Remove this as it was not used and was
6005 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
6007 * verify.c: removed some old unused tables. A huge bunch of small fixes
6008 to things found while testing the verifier with mono basic.
6010 * verify.c (dump_stack_value): dump null literal flag to.
6012 * verify.c (verify_type_compatibility_full): fix comparison
6013 for types that have a generic super type.
6015 * verify.c (verify_stack_type_compatibility): fix compatibility
6016 between null literals and reference types. fix compatibility between
6017 boxed valuetypes and object. fix corner case test for enums.
6019 * verify.c (do_cmp_op): proper verification of cgt.un in case
6022 * verify.c (do_invoke_method): fix error message.
6024 * verify.c (do_store_indirect
6026 * verify.c (check_is_valid_type_for_field_ops): proper verification
6027 of managed pointers to valuetypes and boxed valuetypes. proper verification
6030 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
6031 allow token to be a reference type.
6033 * verify.c (do_cast): proper handling of boxes valuetypes.
6035 * verify.c (do_stelem): proper handling of storing a boxed valuetype
6038 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
6039 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
6040 fixed the decoding of unbox_any
6042 2008-01-08 Zoltan Varga <vargaz@gmail.com>
6044 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
6046 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
6048 * verify.c (do_newobj): do delegate verification.
6050 * verify.c (verify_delegate_compatibility): perform delegate
6053 * verify.c (verify_ldftn_delegate): perform tests related to
6056 * verify.c (mono_delegate_signature_equal): perform the
6057 slightly diferent signature comparison required by delegates.
6059 * metadata.c (mono_metadata_type_equal_full): added and exported
6060 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
6061 allows signature only comparison.
6063 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
6066 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
6068 * verify.c: added a bunch of stack_slot_* functions to
6069 make access to stack slot type easier. This is required to
6070 allow optional flags, like null literal, boxed value and
6072 All access paths to IlStackDesc::stype have been changed
6073 to use these new funcions.
6074 Removed a bunch of unused functions and cleared all warnings.
6075 This patch introduces the usage of the this pointer and
6078 2008-01-07 Zoltan Varga <vargaz@gmail.com>
6080 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
6082 2008-01-06 Zoltan Varga <vargaz@gmail.com>
6084 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
6085 match managed version.
6087 * appdomain.c: Bump corlib version.
6089 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
6092 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
6094 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
6095 Set public key token to zero-length byte array if assembly is not
6098 2008-01-05 Zoltan Varga <vargaz@gmail.com>
6100 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
6101 writing a vtype array elem.
6103 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
6105 * assembly.c (build_assembly_name): return FALSE if length of token is
6106 not 16 (if not "null").
6107 (mono_assembly_name_parse_full): return FALSE if value of version,
6108 culture, token or key is 0.
6109 * icall.c (fill_reflection_assembly_name): add boolean arguments to
6110 specify whether public key and public key token must be set to default
6111 value (zero-length byte array) if not available. Set versioncompat to
6112 SameMachine. If public key is available or the default is set, then
6114 (ves_icall_System_Reflection_Assembly_FillName): if no public key
6115 is available, use empty byte array as default value. On the 2.0
6116 profile, use default value for public key token if not set.
6117 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
6118 profile, use default value for public key if not set. On the 2.0
6119 profile, use default value for public key token if not set.
6120 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
6121 default values for public key and public key token.
6123 2008-01-05 Zoltan Varga <vargaz@gmail.com>
6125 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
6126 field to keep it in synch with the managed object.
6128 * marshal.c (emit_marshal_object): Add support for byref marshalling of
6129 delegates. Fixes #351520.
6131 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
6132 contains defined memory.
6134 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
6136 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
6138 * sgen-gc.c (check_consistency): New helper function to do a consistency check
6139 of the GC data structures.
6141 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
6143 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
6145 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
6147 (mono_array_clone_in_domain): Ditto.
6148 (mono_array_clone_in_domain): Ditto.
6150 * threads.c (start_wrapper): Register the thread start argument as a GC root.
6151 (cache_culture): Use a write barrier.
6153 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
6154 (ves_icall_get_property_info): Ditto.
6156 * object.h (MONO_STRUCT_SETREF): New macro.
6158 * class-internals.h (MonoStats): Add some GC statistics.
6160 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
6162 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
6164 * exception.c (mono_exception_from_name_two_strings):
6165 Break from loop after method is found.
6167 2008-01-04 Dick Porter <dick@ximian.com>
6169 * process.c (process_module_string_read): Rename variable to
6170 reflect correct usage, after fixing bug 345972.
6172 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
6174 * verify.c (mono_type_create_fnptr_from_mono_method):
6175 created a MonoType function pointer instance to be used during
6176 verification. The verifier releases this memory at end.
6178 * verify.c (mono_method_is_constructor): extracted repeated
6179 checks for constructor into a single class.
6181 * verify.c (do_push_field): use new extracted method
6182 for constructor check.
6184 * verify.c (do_newobj): same.
6186 * verify.c (do_ldftn): renamed to do_load_function_ptr
6187 and make it verify ldvirtftn too.
6189 * verify.c (mono_method_verify: proper verification
6190 of ldvirtftn. release created MonoMethod instances.
6192 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
6194 * verify.c (token_bounds_check): added.
6196 * verify.c (do_ldftn): added.
6198 * verify.c (mono_method_verify): proper verificartion of ldftn.
6200 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
6202 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
6203 than the table row count. It's the resposibility of the caller to
6204 make the bounds check and raise the correct error.
6206 * metadata.c (mono_metadata_decode_row_col): Same.
6208 * loader.c (mono_get_method_from_token): perform bounds check
6209 on token for methoddef table.
6211 2007-12-29 Miguel de Icaza <miguel@novell.com>
6214 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
6215 assert into a negative result, the managed code already coped with
6218 Some folks on Windows reported this error.
6220 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
6222 * appdomain.c: Bump corlib version.
6224 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
6225 CultureInfo.CreateCulture to create CultureInfo for name.
6226 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
6227 create CultureInfo for name. Fixes bug #347174.
6229 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
6231 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
6234 * verify.c (is_valid_branch_instruction): allow branching to the
6235 first instruction of the protected block.
6237 * verify.c (is_valid_cmp_branch_instruction): same.
6239 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
6240 avoid double initialization.
6242 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
6243 detect which cases the eval stack should just be copied.
6245 * verify.c (mono_method_verify): check if the eval stack
6246 is empty when entering a protected block.
6248 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
6250 * verify.c: added is_clause_in_range, is_clause_inside_range,
6251 is_clause_nested and verify_clause_relationship. They perform
6252 the verifications stated in P1 12.4.2.7.
6254 * verify.c (mono_method_verify): remove some unused variables,
6255 add the new exception clause checks, add instruction border
6256 checks for protected block start/end, improved some error
6257 messages and fixed a bug in the way invalid instruction access
6260 2007-12-26 Zoltan Varga <vargaz@gmail.com>
6262 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
6263 from GC 7.0 if available.
6265 * object.c: Remove an unused define.
6267 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
6269 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
6271 * null-gc.c (mono_gc_make_descr_for_array): Implement.
6273 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
6275 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
6276 to take the same arguments as the other make_descr functions.
6278 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
6280 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
6283 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
6286 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
6289 * boehm-gc.c (mono_gc_register_root): Fix a warning.
6291 * null-gc.c (mono_gc_register_root): Fix a warning.
6293 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
6295 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
6296 (mono_gc_base_init): Call GC_init ().
6298 * null-gc.c: Define mono_gc_register_root () as a no-op.
6300 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
6302 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
6304 * verify.c: add prototype for merge_stacks at top
6306 * verify.c (do_switch): added.
6308 * verify.c (merge_stacks): on some cases the stack merging
6309 was not happening properly. Unequal stack sizes at merge
6310 points should be invalid.
6312 * verify.c (mono_method_verify): added more debug info on stack state.
6313 verify switch properly.
6315 2007-12-24 Zoltan Varga <vargaz@gmail.com>
6317 * method-builder.h: New file, moved the mono_mb_ declarations here from
6320 * boehm-gc.c marshal.c: Include method-builder.h.
6322 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
6324 * marshal.c: Remove some code which is now in method-builder.c.
6326 2007-12-23 Zoltan Varga <vargaz@gmail.com>
6328 * method-builder.c: New file, extraction of the method builder functionality
6331 * marshal.c: Move the mb functions into method-builder.c.
6333 * marshal.h marshal.c: Export some mono_mb_... functions.
6335 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
6337 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
6340 * class.c (mono_class_get_full): Check the token type in the dynamic case.
6342 * loader.c (mono_field_from_token): Ditto.
6344 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
6347 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
6350 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
6351 a helper function for setting it.
6353 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
6356 * assembly.c: Significally simplify code now that referenced assemblies are
6357 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
6359 * threads.h: Don't include the internal threads-types.h header file. Fixes
6362 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
6364 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
6365 instructions that were target of branches or are at protected block boundaries.
6367 * verify.c (in_same_block): handle filter clauses.
6369 * verify.c (is_valid_branch_instruction): added. checks the target of
6370 instructions br or brtrue/false.
6372 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
6373 binary branch instructions such as beq and bge.
6375 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
6376 and made it pin the instruction as been part of the exception block.
6378 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
6381 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
6384 * verify.c (do_ret): ret from a protected block is unverifiable and
6387 * verify.c (do_static_branch): verify br and br.s instructions.
6389 * verify.c (merge_stacks): add extra param to support detection
6390 of branches in the middle of instructions.
6392 * verify.c (mono_method_verify): verify branches and exception blocks
6393 that target the middle of instructions. Proper verification of br and br.s.
6395 2007-12-21 Zoltan Varga <vargaz@gmail.com>
6397 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
6398 skip_visibility field.
6399 (reflection_methodbuilder_from_dynamic_method): Ditto.
6401 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
6402 registrations. Fixes #348193.
6404 * threads.h: Move the internal mono_thread_get_pending_exception () to
6405 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
6407 2007-12-20 Zoltan Varga <vargaz@gmail.com>
6409 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
6410 icall registration. Fixes #348193.
6412 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
6413 for corlib classes into object. Fixes #349621.
6415 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
6417 * icall.c (property_accessor_nonpublic): new function to determine
6418 whether an accessor allows a property to be considered non-public.
6419 Returns false for private accessor(s) from parent class, and internal
6420 accessor(s) from parent on 2.0 profile (and higher).
6421 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
6422 to determine whether property should be included if NonPublic flag
6423 is set. Fixes bug #349078.
6425 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
6427 * verify.c (init_stack_with_value): added.
6429 * verify.c (mono_method_verify): extracted common
6430 code for exception initialization into init_stack_with_value.
6432 * verify.c (mono_method_verify): initialize the exception
6433 for handler clauses as well.
6435 * verify.c (mono_method_verify): fix the exception clause
6436 ordering rules, it should use handler end offset and not
6439 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
6441 * rawbuffer.c: remove useless warning.
6443 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
6445 * threads.h, threads-types.h: move functions to the correct header
6448 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
6450 * verify.c (mono_method_verify): proper verification
6451 of exception handling clauses ranges and fallthru in
6452 and out of protected blocks.
6454 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
6456 * verify.c (mono_method_verify): fixed compilation issue.
6458 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
6460 * verify.c (mono_method_verify): a printf slipped in, changed
6461 to use verifier debug macro.
6463 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
6465 * verify.c (is_correct_leave): check for filter clauses.
6467 * verify.c (do_filter): added.
6469 * verify.c (mono_method_verify): property verification of leave.
6472 2007-12-18 Mark Probst <mark.probst@gmail.com>
6474 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
6475 Win32 build, until we figure out how to do the proper thing on
6478 2007-12-17 Zoltan Varga <vargaz@gmail.com>
6480 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
6481 by the previous patch.
6483 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
6484 the assembly resolve handler for refonly assemblies.
6486 2007-12-17 Mark Probst <mark.probst@gmail.com>
6488 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
6489 Make sure only one thread is allowed to commence shutdown, and
6490 don't allow new threads to be started once shutdown is in
6493 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
6495 * verify.c (is_correct_endfilter): added.
6497 * verify.c (is_unverifiable_endfilter): added.
6499 * verify.c (do_endfilter): added.
6501 * verify.c (mono_method_verify): property verification of endfilter
6502 and fixed a corner case or endfinally.
6504 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
6506 * verify.h: new flags to support fail fast of unverifiable code and
6507 do non-strict verification. Non-strict verification is required to
6508 have MS runtime compatibility. There are a huge amount of unverifiable
6509 code that it accepts as verifiable. The strict mode verifies the code
6511 Non-strict mode will be required in cases where code needs to be
6512 accepted as verifiable but fails under strict mode.
6514 * pedump.c: added support to fail fast and non-strict verification.
6516 * verify.c: added support for both fail fast and non-strict verification.
6518 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
6520 * verify.c (is_correct_endfinally): added.
6522 * verify.c (mono_method_verify): property verification of endfinally.
6524 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
6526 * verify.c (in_any_block): check for filter clauses.
6528 * verify.c (is_correct_rethrow): added.
6530 * verify.c (mono_method_verify): property verification of rethrow.
6532 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
6534 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
6536 * verify.c (do_throw): added.
6538 * verify.c (mono_method_verify): property verification of throw
6540 2007-12-11 Zoltan Varga <vargaz@gmail.com>
6542 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
6543 assemblies. Fixes #346425.
6545 2007-12-10 Zoltan Varga <vargaz@gmail.com>
6547 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
6550 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
6552 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
6553 prevent asserts when this is called with a token which might not be valid.
6555 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
6556 lookup_dynamic_token_class with valid_token == FALSE.
6558 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
6560 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
6562 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
6564 2007-12-10 Mark Probst <mark.probst@gmail.com>
6566 * gc.c: Don't delay threadpool thread finalization unless Mono is
6569 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6571 * threads.c: turn an assert into a non-fatal warning.
6573 2007-12-09 Robert Jordan <robertj@gmx.net>
6575 * icall.c (GetVirtualMethod): Add missing argument validation.
6577 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6579 * verify.c (do_cast): added.
6581 * verify.c (mono_method_verify): property verification of castclass and isinst.
6584 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6586 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
6588 * verify.c (do_stelem): added.
6590 * verify.c (mono_method_verify): property verification of stelem.X.
6592 2007-12-07 Mark Probst <mark.probst@gmail.com>
6594 * class.c, class-internals.h: Introduce an environment variable
6595 (MONO_GENERIC_SHARING) through which the extent of generic code
6596 sharing can be controlled (share all classes, share only corlib
6597 classes, or share nothing).
6599 * object.c: Only create runtime generic context for classes for
6600 which sharing is enabled.
6602 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6604 * verify.c (do_ldelem): refactor it to work with ldelem.any.
6606 * verify.c (mono_method_verify): property verification of ldelem.any.
6608 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6610 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
6611 added ldelem.X opcodes.
6613 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
6615 * verify.c: proper verification of ldelem.X
6617 2007-12-06 Zoltan Varga <vargaz@gmail.com>
6619 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
6621 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
6623 * verify.c (mono_method_verify): null literal requires special handling,
6624 the value pushed on stack need to be flagged as so.
6626 * verify.c (do_ldelema): Verify ldelema properly.
6628 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
6630 * verify.c: Verify ldlen properly.
6632 2007-12-05 Zoltan Varga <vargaz@gmail.com>
6634 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
6635 to the target object's type. Fixes #346160.
6637 2007-12-05 Dick Porter <dick@ximian.com>
6639 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
6640 Solaris needs the same workaround as BSD-derived systems. Fixes
6641 bug 323524, patch by Burkhard Linke
6642 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
6644 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
6646 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
6647 handle to use when error dialog is shown; otherwise, update mask
6648 to show no error dialog when an error occurs.
6650 2007-12-03 Zoltan Varga <vargaz@gmail.com>
6652 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
6654 * class.c (mono_class_get_field_default_value): New helper function to initialize
6655 field->def_type and field->data.
6657 2007-11-30 Zoltan Varga <vargaz@gmail.com>
6659 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
6662 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
6664 * marshal.c: Avoid depending on delegate->method_info being set.
6666 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
6668 * object.c (mono_delegate_ctor): Set delegate->method.
6670 * object-internals.h (struct _MonoDelegate): Add 'method' field.
6672 * appdomain.c: Bump corlib version.
6674 2007-11-27 Raja R Harinath <harinath@gmail.com>
6676 * metadata.c (mono_generic_inst_equal_full): Short-circuit
6677 equality check if we're comparing canonicalized MonoGenericInsts.
6679 2007-11-23 Zoltan Varga <vargaz@gmail.com>
6681 * class.c (generic_array_methods): Call mono_class_setup_methods () before
6682 accessing class->methods.
6684 2007-11-22 Dick Porter <dick@ximian.com>
6686 * threads.c: Ensure that the synch_cs is set before trying to use
6689 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
6691 * profiler.c: r89126 broke the statistial profiler, unbreak.
6693 2007-11-22 Martin Baulig <martin@ximian.com>
6695 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
6698 (mono_debug_debugger_version): Bump to 3.
6699 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
6700 -> mono_debugger_class_initialized().
6702 * mono-debug-debugger.c
6703 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
6706 (mono_debugger_start_class_init_func): Removed.
6707 (mono_debugger_class_loaded_methods_func): Added.
6708 (mono_class_setup_methods): Call it here.
6710 2007-11-22 Martin Baulig <martin@ximian.com>
6713 (mono_debug_add_delegate_trampoline): New public method.
6714 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
6717 (MonoSymbolTable): Added `global_data_table'.
6718 (MonoDebuggerTypeKind): Removed.
6720 2007-11-21 Zoltan Varga <vargaz@gmail.com>
6722 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
6725 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6727 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
6729 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
6731 2007-11-20 Martin Baulig <martin@ximian.com>
6733 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
6735 * mono-debug-debugger.c
6736 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
6737 (mono_debugger_remove_breakpoint): Likewise.
6738 (mono_debugger_check_breakpoints): Likewise.
6739 (mono_debugger_register_class_init_callback): New public method.
6740 (mono_debugger_remove_class_init_callback): Likewise.
6741 (mono_debugger_add_type): Likewise.
6743 * mono-debug-debugger.h
6744 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
6746 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
6748 * class.c: more interface implementations needed for the
6749 array enumerator (fixes bug #341112).
6751 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
6753 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
6754 fix ParamName of ArgumentNullExceptions.
6756 2007-11-17 Miguel de Icaza <miguel@novell.com>
6758 * reflection.c (mono_reflection_encode_sighelper): Generate the
6759 modopts and modreqs. I have a useless test that crashes monodis,
6760 but that shows the code working.
6762 2007-11-17 Zoltan Varga <vargaz@gmail.com>
6764 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
6765 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
6767 2007-11-15 Dick Porter <dick@ximian.com>
6769 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
6770 When joining a thread, it's the thread that's calling Join that
6771 gets WaitSleepJoin state not the target. Fixes the standalone
6772 test case in bug 334740, and hopefully the whole bug too.
6774 2007-11-15 Dick Porter <dick@ximian.com>
6776 * process.c: Read file version info from the files pointed at by
6777 process modules, not the current process. Fixes bug 315969.
6779 Use windows typedef names in some places to fix warnings on the
6782 2007-11-15 Mark Probst <mark.probst@gmail.com>
6784 * image.c, metadata-internals.h: Added a generic_class_cache hash
6785 to MonoImage for looking up generic classes when sharing generics.
6787 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6789 * sgen-gc.c: warning cleanups.
6791 2007-11-15 Zoltan Varga <vargaz@gmail.com>
6793 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
6794 inherited properties.
6796 2007-11-14 Mark Probst <mark.probst@gmail.com>
6798 * object.c, class-internals.h: Added more information to the
6799 runtime generic context.
6801 2007-11-13 Zoltan Varga <vargaz@gmail.com>
6803 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
6804 instead of just the target method. Generalize the abstract method handling to
6805 handle any non-static method.
6807 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
6808 mono_marshal_get_delegate_invoke () signature change.
6810 2007-11-13 Mark Probst <mark.probst@gmail.com>
6812 * class.c, class-internals.h: Made
6813 mono_type_get_basic_type_from_generic () public. Fixed member
6814 access check for shared generics.
6816 * loader.c: Don't insert field into field cache if it's part of a
6817 non-inflated generic class.
6819 * domain.c, domain-internals.h: The generic sharing context is now
6820 part of the jit info data structure. Added two accessor
6823 2007-11-12 Zoltan Varga <vargaz@gmail.com>
6825 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
6826 the array Get/Set/Address methods, since the JIT inlines them.
6828 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
6830 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
6831 (mono_image_init): Initialize runtime_invoke_direct_cache.
6833 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
6834 mono_marshal_get_delegate_invoke signature change.
6836 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
6837 an additional argument. Add support for invoking abstract methods.
6839 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
6841 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
6843 2007-11-09 Mark Probst <mark.probst@gmail.com>
6845 * class.c: Do field layout for open generic classes as well.
6847 2007-11-09 Mark Probst <mark.probst@gmail.com>
6849 * gc.c, gc-internal.h: Don't finalize threadpool threads with
6850 other objects, because the threadpool is still around. Put them
6851 in a list instead and after finalizing all other objects in the
6852 root domain shut down the thread pool and then finalize the
6853 threads. Fixes bug #337383.
6855 * threads.c, thread-types.h: New mono_thread_create_internal()
6856 function for marking a thread with the threadpool flag before it
6857 started. Set synch_cs to NULL after freeing it.
6859 * threadpool.c: Mark threadpool threads before they start.
6861 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6863 * reflection.h, reflection.c: don't export random functions
6864 and lazy load dbnull and missing objects.
6866 2007-11-07 Jonathan Chambers <joncham@gmail.com>
6868 * class.c: Initialize COM types if COM interfaces
6869 are present (not just COM classes).
6871 Code is contributed under MIT/X11 license.
6873 2007-11-07 Massimiliano Mantione <massi@ximian.com>
6875 create_dynamic_mono_image: hook module profiler events (dynamic case).
6876 mono_image_basic_init: hook assembly profiler events (dynamic case).
6878 2007-11-07 Massimiliano Mantione <massi@ximian.com>
6880 simple_appdomain_unload: completely terminate the profiler
6881 instead of only processing the statistical samples.
6882 simple_shutdown: make sure this is really called exactly once,
6883 even in multithreaded applications, and always listen to
6885 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
6886 here, the "[un]load" functions will do it.
6887 Fixes bugs #333791 and #325261.
6889 2007-11-07 Geoff Norton <gnorton@novell.com>
6891 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
6892 rather than depend on __APPLE__.
6894 2007-11-07 Mark Probst <mark.probst@gmail.com>
6896 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
6898 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
6900 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
6901 UTF16 MonoString. Fix the crash from bug #335488
6903 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
6905 * marshal.c: Correct (for non-Win32 OS) length != size in
6906 mono_string_from_bstr. Fix #339530.
6908 2007-11-06 Geoff Norton <gnorton@novell.com>
6910 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
6913 2007-11-05 Kornél Pál <kornelpal@gmail.com>
6915 * process.c: Added run-time GetProcessId API detection for Windows.
6917 2007-11-04 Miguel de Icaza <miguel@novell.com>
6919 * reflection.c (mono_param_get_objects): If a parameter has the
6920 attribute [System.Runtime.InteropServices.Optional] we should
6921 set the DefaultValue of the ParameterInfo to be
6922 System.Reflection.Missing instead of DBNull.
6926 (mono_get_reflection_missing_object): New method,
6927 returns the System.Reflection.Missing.Value singleton instance.
6929 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
6931 * culture-info-table.h : regenerated.
6933 2007-11-02 Jonathan Chambers <joncham@gmail.com>
6935 * icall.c: Use GetEnvironmentStrings on windows
6936 so we are using the same environment block as
6937 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
6940 Code is contributed under MIT/X11 license.
6942 2007-10-31 Martin Baulig <martin@ximian.com>
6944 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
6946 * mono-debug-debugger.h
6947 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
6949 2007-10-30 Zoltan Varga <vargaz@gmail.com>
6951 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
6954 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
6956 * culture-info-table.h : regenerated.
6958 2007-10-30 Robert Jordan <robertj@gmx.net>
6960 * icall-def.h, icall.c:
6961 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
6963 Code is contributed under MIT/X11 license.
6965 2007-10-29 Zoltan Varga <vargaz@gmail.com>
6967 * class.c (mono_class_setup_vtable): Find the inflated methods in the
6968 inflated class instead of inflating them again.
6970 * class.c (mono_class_setup_vtable): Inflate the override methods in the
6973 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
6974 Call setup_supertypes () after klass->parent is set.
6975 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
6977 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
6978 for inflated instances of not yet created dynamic generic classes.
6979 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
6980 times from inflated_method.
6981 (methodbuilder_to_mono_method): Ditto.
6983 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
6985 * gc.c: code cleanup and removed old untested option of not creating the
6988 2007-10-29 Zoltan Varga <vargaz@gmail.com>
6990 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
6991 creating a jump trampoline for dynamic methods.
6993 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
6995 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
6996 generic TypeBuilders when called from another method of the same type (bug #335131).
6999 2007-10-27 Zoltan Varga <vargaz@gmail.com>
7001 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
7002 doesn't seem to work perfectly.
7004 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
7005 called multiple times.
7006 (methodbuilder_to_mono_method): Ditto.
7007 (resolve_object): Inflate FieldBuilder's.
7009 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7011 * string-icalls.c, string-icalls.h, appdomain.c: patch from
7012 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
7013 RemoveEmptyEntries in the string.Split implementation (bug #322375).
7015 2007-10-26 Dick Porter <dick@ximian.com>
7017 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
7018 Thread initialisation changes
7020 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
7022 * verify.c: fix compatibility check between arrays and System.Array
7024 2007-10-26 Zoltan Varga <vargaz@gmail.com>
7026 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
7029 2007-10-25 Zoltan Varga <vargaz@gmail.com>
7031 * object.c (mono_value_box): Use typed allocation here.
7033 2007-10-23 Zoltan Varga <vargaz@gmail.com>
7035 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
7036 trampoline instead of compiling the method right away.
7038 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
7040 2007-10-21 Zoltan Varga <vargaz@gmail.com>
7042 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
7043 related fields for dynamic classes. Fixes #334493.
7045 2007-10-20 Zoltan Varga <vargaz@gmail.com>
7047 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
7049 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
7051 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
7052 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
7054 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
7056 * reflection.c (create_generic_typespec): Initialize klass->generic_container
7058 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
7060 2007-10-18 Jonathan Chambers <joncham@gmail.com>
7062 * marshal.c: Use correct key when removing item
7065 Code is contributed under MIT/X11 license.
7067 2007-10-17 William Holmes <billholmes54@gmail.com>
7069 *marshal.c: Adding a case to marshal booleans to U1
7071 Code is contributed under MIT/X11 license.
7073 2007-10-18 Zoltan Varga <vargaz@gmail.com>
7075 * class.c (mono_class_from_name): Search the modules compromising dynamic
7076 assemblies. Fixes #331601.
7078 2007-10-16 Zoltan Varga <vargaz@gmail.com>
7080 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
7081 exception if the type name contains an assembly component. Fixes #334203.
7083 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
7084 modules inside dynamic assemblies. Fixes #334200.
7086 * reflection.c: Set image->public_key and image->public_key_length;
7088 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
7091 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
7093 2007-10-16 Mark Probst <mark.probst@gmail.com>
7095 * metadata.c: Implemented correct comparing of generic classes.
7096 An inflated generic class can be equal to a non-inflated one if it
7097 is inflated with generic type variables as type arguments. Fixes
7100 2007-10-15 Dick Porter <dick@ximian.com>
7102 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
7103 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
7106 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
7107 instead of a monitor lock. This means that monitor_try_enter and
7108 co can set the thread state safely.
7109 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
7110 thread_interrupt_requested, so interrupt actually works.
7112 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
7113 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
7114 state accessor function
7116 2007-10-15 Martin Baulig <martin@ximian.com>
7119 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
7120 the debugger with the current runtime.
7122 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
7124 * object.c, object-internals.h: added the ability to set a single
7125 trampoline for all the slots in a vtable.
7127 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7129 * marshal.c: deal with a possible race condition during multicast
7130 delegate invocation.
7132 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7134 * class.c: ensure value type methods don't have the synchronized
7137 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7139 * string-icalls.c, string-icalls.h: reverted unapproved patch that
7142 2007-10-11 Joel Reed <joelwreed@comcast.com>
7144 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
7145 to take an options parameter so that empty entries can be removed during
7146 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
7148 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7150 * marshal.c: make sure we don't store the signature from a dynamic
7151 method into the runtime invoke cache (bug #327189).
7153 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7155 * marshal.c: make sure the wrapper methods are properly initialized.
7157 2007-10-11 Mark Probst <mark.probst@gmail.com>
7159 * metadata.c, metadata-internals.h: Generalized
7160 mono_type_stack_size() to mono_type_stack_size_internal() which
7161 takes an additional argument specifying whether it allows open
7164 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
7166 * verify.c (do_invoke_method): handle typedbyref params
7167 correctly and check for unverifiable return values.
7169 * verify.c (do_newobj): fix a warning.
7171 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
7173 * verify.c: don't tread typedbyref as allways unverifable,
7174 so uses, like (ld/st)loc.0 are valid. verify for the cases
7175 that it matters, like boxing related operations.
7177 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
7179 * verify.c: add verification of the newobj opcode. verification
7180 of delegate instantation still missing due ldftn and virldftn not
7181 pushing the function type on stack
7183 2007-10-08 Mark Probst <mark.probst@gmail.com>
7185 * class-internals.h: Runtime generic context data structure
7188 * object.c: Initialization of runtime generic context at runtime
7189 vtable creation time.
7191 2007-10-08 Massimiliano Mantione <massi@ximian.com>
7192 * class.c (mono_class_create_from_typedef,
7193 mono_class_from_generic_parameter, mono_ptr_class_get,
7194 mono_fnptr_class_get, mono_bounded_array_class_get)
7195 * domain.c (mono_domain_create, mono_domain_free)
7196 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
7197 * image.c (do_mono_image_load, mono_image_close):
7198 Hooked up load-unload profiler events.
7200 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7202 * domain.c: track statistics about the actual amount of native code
7205 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7207 * class.c: the valuetype enumerators don't have the additional
7208 supertypes interfaces.
7210 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7212 * class.c: need more interfaces setup for the IEnumerator<T>
7213 object created for arrays (tests/ienumerator-interfaces.2.cs).
7215 2007-10-05 Zoltan Varga <vargaz@gmail.com>
7217 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
7219 2007-10-05 Alp Toker <alp@atoker.com>
7221 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
7222 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
7225 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
7227 * verify.c (verify_type_compatibility_full): verification of
7228 compatibility improved, validates correctly non-strict checks between
7229 native int and I4 types different than (unsigned)int32.
7231 * verify.c (do_store_indirect): added, do all verification of
7234 * verify.c (get_load_indirect_mono_type): renamed to
7235 get_indirect_op_mono_type, as it now returns the MonoType for
7236 ldind.X and stind.X opcodes.
7238 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
7240 * reflection.c: Fix the encoding of generic type definition for
7243 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
7244 mono_image_typedef_or_ref but allows to specify if typespec lookups should
7245 be made. Typespec check is done prior to typeref cache lookup.
7247 * reflection.c (mono_image_typedef_or_ref): now just delegate to
7248 mono_image_typedef_or_ref_full.
7250 * reflection.c (encode_generic_class): encode the generic class
7251 directly instead of calling encode_type.
7253 * reflection.c (encode_type): encode the generic type definition
7254 MonoClass as a generic instantiation.
7256 * reflection.c (create_typespec): cache typespec tokens in
7257 the assembly->typespec cache. Don't create typespec for a generic
7258 instance MonoClass. Create typespec for the generic type defintion.
7260 * reflection.c (create_generic_typespec): encode the generic
7261 class directly instead of calling encode_type.
7263 * reflection.c (mono_image_create_token): encode the generic
7264 type definition not using a typespec for MonoType instances.
7267 2007-10-04 Raja R Harinath <rharinath@novell.com>
7270 * class.c (mono_image_init_name_cache): Don't return nested
7271 'protected internal' classes.
7272 (mono_class_from_name_case): Likewise.
7274 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
7276 * icall-def.h, icall.c : get_bundled_machine_config() is now the
7277 common function used by both DefaultConfig in System.dll and
7278 InternalConfigurationHost in System.Configuration.dll.
7280 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7282 * class.c: automatically add to vectors only a few essential explicit
7283 generic interfaces. The rest of the interfaces that arrays should
7284 provide are currently implicitly added (but still not lazily, see the
7285 design in the discussion of bug#325495 for the details of what is
7286 needed for that). Additionally, implicit interfaces are assigned the
7287 same vtable slot as the explicit interfaces (as they are compatible):
7288 this enables huge memory savings since we don't need to instantiate
7289 as many memthods and as large vtables anymore. Also, Since
7290 GetEnumerator<T> returns an instance of a type that is required to
7291 support a similarly large set of interfaces as arrays, we add
7292 implicit interfaces and interface offset sharing support to those
7293 types, too. This change adds all the required interfaces so that
7294 the anonarray.cs test case in the bug report works (we don't add
7295 all the interfaces to arrays of arrays 3-level deep and more because
7296 of the memory requirements explained in the bug and since they are much
7297 less common: the lazy-loading support will enabled them to work, too).
7299 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
7301 * verify.c (merge_stacks): major clean up, all type compatibility
7302 checks are done by verify_type_compatibility. This fix my earlier lack
7303 of understanding of the CLR type system and merge_stacks no longer looks
7306 * verify.c: fixed some bad spelling.
7308 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
7310 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
7311 a given stack slock.
7313 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
7314 verify_type_compatibility_full. This removed a near indentical function and fixed
7315 handling of Int32 and IntPtr across all opcodes.
7317 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7319 * class.c: only vectors have the additional generic interfaces.
7321 2007-10-01 Jonathan Chambers <joncham@gmail.com>
7323 * mono-config.c: Use g_strcasecmp instead of
7324 strcasecmp like everywhere else to fix
7325 compilation with MSVC.
7327 Code is contributed under MIT/X11 license.
7329 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7331 * object.c, object-internals.h: refactored the IMT code to enable
7332 building a single slot at a time and lazily creating the IMT trampolines
7335 2007-09-29 Zoltan Varga <vargaz@gmail.com>
7337 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
7339 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
7342 2007-09-29 Raja R Harinath <harinath@gmail.com>
7344 * loader.c (method_from_methodspec): Rearrange to avoid
7345 un-necessary exposition. Don't assert out if the method's
7346 declaring type is a generic type definition.
7348 2007-09-28 Martin Baulig <martin@ximian.com>
7350 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
7352 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
7354 * class-internals.h: optimize field layout of MonoClass to
7355 requires less cachelines at runtime and save a few bytes on 64 bit
7358 2007-09-28 Jb Evain <jbevain@novell.com>
7360 * reflection.c: when encoding type names in custom attributes,
7361 if the type is a closed generic type, its generic arguments
7362 have to be serialized as AssemblyQualifiedName, so that when
7363 they are deserialized, it's possible to re-create them properly.
7367 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7369 * object.c, class-internals.h: added delegate-creation counter.
7371 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7373 * class.c: cleanup of the code that synthetizes interfaces for
7374 arrays in 2.0: saves quit a bit of corlib mempool memory.
7375 Code to fix bug #325495 ifdeffed out for now until the issues
7376 with memory usage and O(n^2) behaviour are fixed.
7378 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7380 * marshal.c: when possible, do not duplicate the name of the methods
7381 in the method builder and in the generated MonoMethod.
7383 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
7384 * verify.c: added support for type checking ldind_* opcodes.
7386 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
7388 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
7389 which is used to distinguish the fully open instantiation of a TypeBuilder
7390 with the rest. This temporary hack is required to restore the property that
7391 the fully open instantiation is the same type of the generic type definition.
7393 * class-internals.h (mono_generic_class_is_generic_type_definition):
7394 new function as part of the internal API.
7396 * class.c (inflate_generic_type): return NULL when the generic inst is
7397 fully open. The fully open generic type is now the same as the generic type
7398 definition for non TypeBuilder types.
7400 * class.c (mono_generic_class_get_class): removed assert since it is
7401 no longer valid, gklass->cached_class can point to the generic type definition.
7403 * class.c (mono_generic_class_is_generic_type_definition): new.
7405 * metadata.c (mono_generic_class_hash): added is_tb_open field
7406 to the hash calculation.
7408 * metadata.c (free_generic_class): if the generic class is associated
7409 with the generic type definition, its field will come from the mempool and
7412 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
7413 new, this function identifies the corner case of a TypeBuilder fully open
7416 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
7417 for lookup. Set gclass->cached_class to be the container class in case of
7418 the fully open instantiation of non TypeBuilder types.
7420 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
7421 to compare generic classes.
7423 * reflection.c (method_encode_methodspec): remove assert that
7426 * reflection.c (mono_reflection_generic_class_initialize): add
7427 an aditional assert to ensure the proper type is used.
7429 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
7431 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
7434 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
7436 * verify.c (push_arg): Fixed support for ldarga
7437 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
7438 MonoType used as first arg in case of instance calls.
7440 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
7442 * verify.c: Support for verifying VAR and MVAR types,
7444 2007-09-25 Zoltan Varga <vargaz@gmail.com>
7446 * icall.c (ves_icall_get_property_info): Set the reflected type of the
7447 accessors correctly.
7449 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7451 * threads.c: support OSX and other systems in
7452 mono_thread_get_stack_bounds (bug #328026).
7454 2007-09-25 Martin Baulig <martin@ximian.com>
7457 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
7459 2007-09-24 Martin Baulig <martin@ximian.com>
7462 (MonoDebugClassEntry): Moved the definition of this struct into
7463 mono-debug.c to make it private.
7466 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
7467 type table per symbol file, we don't need to store the symfile id
7470 2007-09-24 Martin Baulig <martin@ximian.com>
7472 Create one type table per symbol file, since a `MonoClass *' gets
7473 invalid when its image is unloaded.
7475 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
7476 (MonoDebugHandle): Added `type_table'.
7478 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
7480 * mempool.c, mempool.h: added mono_mempool_new_size () API
7481 to be able to specify a smaller initial size for the pool.
7482 Adjusted the code to slowly increase pool size before using
7483 the previous default size.
7484 * image.c: use a small initial size for image mempools.
7486 2007-09-23 Zoltan Varga <vargaz@gmail.com>
7488 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
7491 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
7492 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
7494 2007-09-22 Zoltan Varga <vargaz@gmail.com>
7496 * metadata.c (mono_type_create_from_typespec): Remove an invalid
7497 free. Fixes #327438.
7499 2007-09-21 Raja R Harinath <harinath@gmail.com>
7501 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
7502 generic instantiations, etc.
7503 <MONO_TYPE_ARRAY>: Likewise.
7505 2007-09-21 Martin Baulig <martin@ximian.com>
7507 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
7508 these structs were never defined.
7509 (MonoDebugHandle): Removed the `_priv' field, it was never used.
7511 2007-09-21 Martin Baulig <martin@ximian.com>
7513 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
7515 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
7517 * image.c: removed the guid hash tables: we can get the same info
7518 without the additional memory usage hit (partially fixes also bug #327052).
7520 2007-09-10 Massimiliano Mantione <massi@ximian.com>
7522 * profiler.h, profiler-private.h, profiler.c: add a new profiler
7523 event to handle unloading methods. After the event is called, the
7524 corresponding MonoMethod* must be considered invalid.
7525 * loader.c (mono_free_method): call the new mono_profiler_method_free
7528 2007-09-20 Mark Probst <mark.probst@gmail.com>
7530 * domain-internals.h: New flag in MonoJitInfo which marks shared
7531 generic methods. New hash table (shared_generics_hash) in
7532 MonoDomain to keep track of shared generic methods. Prototypes
7533 for functions to register and lookup shared generic methods.
7535 * domain.c: Support for registering and looking up shared generic
7536 methods via a hash table (shared_generics_hash) in MonoDomain.
7538 * class-internals.h: New exception to signal failure of shared
7539 compilation of a generic method. New counters for generics
7540 sharing in MonoStats.
7542 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
7544 * image.c, metadata-internals.h: don't keep a file descriptor open
7545 for loaded assemblies (bug#325988).
7547 2007-09-19 Raja R Harinath <rharinath@novell.com>
7549 * metadata.c (signature_in_image): New. Carve out of type_in_image.
7550 (ginst_in_image, gclass_in_image): Simplify. Change signature to
7551 use the corresponding datatypes.
7552 (type_in_image): Update to changes.
7553 (CleanForImageUserData): Simplify.
7554 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
7555 Avoid quadratic behaviour in handling the "stolen" list by
7556 separating the filter predicate out, and by prepending the stolen
7557 items rather than appending them.
7558 (steal_ginst_in_image): Likewise.
7559 (mono_metadata_clean_for_image): Update to changes.
7561 2007-09-19 Martin Baulig <martin@ximian.com>
7563 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
7565 2007-09-19 Martin Baulig <martin@ximian.com>
7567 * mono-debug.c (mono_debug_cleanup): Don't call
7568 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
7570 2007-09-19 Raja R Harinath <harinath@gmail.com>
7572 Fix crash on 'make run-test' in mcs/errors
7573 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
7574 Avoid more potential allocations in mono_class_from_mono_type.
7575 (ginst_in_image): Update to changes.
7576 (gclass_in_image): Rearrange slightly.
7578 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7580 * class.c (mono_class_init): Move the code that sets up class->methods to
7581 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
7583 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
7584 canonical instance of an inflated generic signature.
7585 (mono_type_create_from_typespec): Remove an invalid free.
7587 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
7589 2007-09-18 Marek Habersack <mhabersack@novell.com>
7591 * domain-internals.h: added a declaration of the
7592 mono_assembly_load_full_nosearch internal function.
7594 * assembly.c (mono_assembly_load_with_partial_name): use
7595 mono_try_assembly_resolve return value properly.
7596 (mono_assembly_load_full_nosearch): copied the function body from
7597 mono_assembly_load_full, without the code to invoke assembly
7599 (mono_assembly_load_full): calls the above new function and if the
7600 assembly is not resolved, invokes the search hooks.
7602 * appdomain.c (mono_runtime_init): restore the global postload
7603 assembly search handlers.
7605 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7607 * class.c (mono_class_init): Make sure class->methods and class->properties
7608 are never NULL in the generics case.
7610 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
7612 2007-09-17 Zoltan Varga <vargaz@gmail.com>
7614 * metadata.c (free_generic_class): Disable some code to fix the build.
7616 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
7618 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
7619 from the image mempool.
7621 * metadata.c (free_generic_class): Free more data from the inflated class.
7623 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
7625 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
7627 (mono_type_create_from_typespec): Ditto.
7629 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
7630 MonoImage to the caller.
7631 (mono_init_internal): Save the opened image in a global variable.
7632 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
7634 * reflection.c (resolve_object): Fix a leak.
7636 * metadata.c: Fix the freeing of data in the generics caches.
7638 * metadata.c (free_generic_inst): Comment this out to fix the build.
7639 (free_generic_class): Ditto.
7641 * metadata.c: Free cached generic methods, instantinations and classes when
7642 they are removed from the caches.
7643 (mono_metadata_free_type): Free the type itself.
7645 * class.c: Free the result of mono_class_inflate_generic_type () in a few
7648 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
7650 * boehm-gc.c: restrict managed allocs to __thread supporting
7653 2007-09-16 Zoltan Varga <vargaz@gmail.com>
7655 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
7656 (mono_generic_class_get_class): Fix a leak.
7658 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
7659 mono_metadata_free_type ().
7660 (mono_metadata_inflate_generic_inst): Fix a leak.
7662 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7664 * mono-debug.c (free_header_data): Fix a leak missed earlier.
7666 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
7669 * mono-debug.c (mono_debug_close_image): Fix call to
7670 g_hash_table_remove ().
7672 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
7674 * icall-def.h: redirect all the string ctor to the managed
7675 CreateString () methods.
7676 * string-icalls.c, string-icalls.h: removed dead code for string
7679 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7681 * mono-debug.c: Fix memory leaks.
7683 2007-09-14 Jonathan Chambers <joncham@gmail.com>
7685 * threads-types.h: Implement mono_hazard_pointer_set and
7686 mono_hazard_pointer_clear macros using do/while(0) to fix
7687 compilation with MSVC.
7689 Code is contributed under MIT/X11 license.
7691 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7693 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
7694 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
7696 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7698 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
7701 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7703 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
7704 managed-code allocated as well.
7706 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7708 * class.c (mono_class_is_assignable_from): Add support for generic variance.
7710 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
7712 * boehm-gc.c: fixed the build after the AOT changes.
7714 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7716 * wrapper-types.h: Add an ALLOC wrapper type.
7718 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
7719 reference managed allocator methods.
7721 2007-09-12 Marek Safar <marek.safar@gmail.com>
7723 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
7724 of Type array and not MonoType, a fix suggested by Hari.
7726 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7728 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
7729 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
7731 Code is contributed under MIT/X11 license.
7733 2007-09-10 Massimiliano Mantione <massi@ximian.com>
7735 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
7737 2007-09-12 Marek Habersack <mhabersack@novell.com>
7739 * image.c (do_mono_image_open): if assembly file fails to open and
7740 MONO_IOMAP is in effect, try to find the path in a
7741 case-insensitive way.
7743 * appdomain.c (mono_runtime_init): do not install postload hooks -
7744 tests show that MS.NET doesn't use anything of that sort to
7745 trigger the AppDomain.AssemblyResolve event.
7746 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
7748 (mono_runtime_init): init portability helpers here.
7750 * assembly.c (mono_assembly_load_with_partial_name): if other
7751 attempts fail, trigger the AppDomain.AssemblyResolve event handler
7752 to resolve the assembly.
7754 * domain-internals.h: added mono_try_assembly_resolve and marked
7757 2007-09-11 Jb Evain <jbevain@novell.com>
7759 * object-internals.h (MonoReflectionDynamicMethod): add
7760 a `MonoReflectionType *owner` field. The owner is used
7762 (mono_reflection_create_dynamic_method): use the owner of the dynamic
7763 method as the class declaring the dynamic method.
7764 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
7765 dynamic method to the declaring type of the methodbuilder.
7767 2007-09-11 Mark Probst <mark.probst@gmail.com>
7769 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
7770 rules for calling methods via reflection.
7772 2007-09-11 Zoltan Varga <vargaz@gmail.com>
7774 * reflection.c (resolve_object): Add support for MonoGenericClass.
7777 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
7779 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
7780 provide a managed method that does fast allocations without needing
7781 a managed->unmanaged transition. Boehm GC implementation currently
7782 enabled for ptrfree objects on sane architectures.
7784 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
7786 * marshal.c, marshal.h: exported a couple of useful functions and
7787 added mono_mb_get_label () to easily handle backward branches.
7789 2007-09-10 Zoltan Varga <vargaz@gmail.com>
7791 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
7793 2007-09-10 Massimiliano Mantione <massi@ximian.com>
7795 * loader.c (find_method): Fixed the regression introduced while
7798 2007-09-09 Zoltan Varga <vargaz@gmail.com>
7800 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
7803 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
7804 icall.c reflection.c: Pass a MonoGenericContext argument to
7805 mono_lookup_dynamic_token ().
7807 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
7810 2007-09-09 Robert Jordan <robertj@gmx.net>
7812 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
7813 for generic methods.
7815 * object.c (mono_object_get_virtual_method): Handle generic methods.
7818 Code is contributed under MIT/X11 license.
7820 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
7822 * image.c: fix locking in mono_image_load_file_for_image ().
7824 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
7826 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
7827 used only as a cache: added an icall to fill it.
7829 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
7831 * reflection.h: exposed mono_reflection_free_type_info
7832 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
7833 since mono_reflection_bind_generic_parameters makes a copy of it.
7834 * reflection.c (free_type_info): subinfos should be freed.
7835 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
7837 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
7838 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
7839 this fixes #82695 and #81726.
7842 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
7844 * process.h, process.c: added support for user profile/info in
7845 ProcessStartInfo. For now only Windows works.
7847 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7849 * metadata.c: consider the generic arguments when comparing
7850 signatures (bug #82614).
7852 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7854 * cil-coff.h, image.c: updated assembly loader to cope with the
7855 PE32+ 64 bit file format.
7857 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7859 * assembly.c, class.c, domain.c, loader.c: remove useless
7860 inclusion of cil-coff.h.
7862 2007-08-29 Jonathan Chambers <joncham@gmail.com>
7864 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
7865 if interface is marked with CoClassAttribute.
7867 Code is contributed under MIT/X11 license.
7869 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
7871 * sgen-gc.c: ensure no object from the to space is copied again or finalized
7872 if it's seen twice in major collections.
7874 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7876 * sgen-gc.c: big objects are not copied to the gray area, but they
7877 need to be considered for scanning, too, if they are brought alive
7878 by an object ready for finalizations or a survived one.
7880 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7882 * sgen-gc.c: properly account the number of disappearing links when
7885 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
7887 * sgen-gc.c: share the code to scan the registered roots between the
7888 different types of collections.
7890 2007-08-28 Zoltan Varga <vargaz@gmail.com>
7892 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
7894 2007-08-28 Zoltan Varga <vargaz@gmail.com>
7896 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
7897 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
7899 2007-08-28 Mark Probst <mark.probst@gmail.com>
7901 * security-manager.c (mono_security_manager_get_methods):
7902 LinkDemandSecurityException now has 2 arguments instead of 3.
7904 2007-08-27 Zoltan Varga <vargaz@gmail.com>
7906 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
7907 platforms which need it.
7909 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7911 * sgen-gc.c: unregister thread data structures with a pthread_key_t
7914 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
7916 * threads.c: free the thread static data on thread exit.
7918 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
7920 * class.c: walk the hierarchy to find the generic definition for
7921 a class (fixes runtime part of bug #82498).
7923 2007-08-24 Zoltan Varga <vargaz@gmail.com>
7925 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
7928 * image.c (mono_image_close): Here. Hopefully fixes #82510.
7930 2007-08-24 Mark Probst <mark.probst@gmail.com>
7932 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
7934 2007-08-24 Robert Jordan <robertj@gmx.net>
7936 * appdomain.c: don't perform the ':'->';' substitution on Win32.
7938 2007-08-24 Jb Evain <jbevain@novell.com>
7940 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
7943 2007-08-24 Mark Probst <mark.probst@gmail.com>
7945 * threads.c: Make sure a thread gets cleaned up only once. Fixes
7948 2007-08-24 Zoltan Varga <vargaz@gmail.com>
7950 * assembly.c: Fix a warning.
7952 2007-08-23 Marek Habersack <mhabersack@novell.com>
7954 * appdomain.c: parse the <runtime> section looking for the probing
7955 element with the 'privatePath' attribute, which sets additional
7956 directories in which the runtime should look for assemblies.
7958 2007-08-23 Robert Jordan <robertj@gmx.net>
7960 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
7963 2007-08-23 Martin Baulig <martin@ximian.com>
7965 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
7966 _mono_debug_init_corlib() and remove it from the header file.
7968 2007-08-23 Martin Baulig <martin@ximian.com>
7970 * mono-debug-debugger.c
7971 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
7972 don't notify the debugger about it.
7974 * mono-debug-debugger.h
7975 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
7977 2007-08-23 Robert Jordan <robertj@gmx.net>
7979 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
7980 Code is contributed under MIT/X11 license.
7982 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7984 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
7986 2007-08-22 Martin Baulig <martin@ximian.com>
7988 * mono-debug.c: Store debugging info on a per-domain basis and
7989 free it on domain unload. Add support for unloading symbol files.
7992 (MonoDebugList): New typedef.
7994 - add `data_tables and `type_table'.
7995 - replace 'symbol_files' and `num_symbol_files' with a
7997 (mono_debug_data_table): Removed.
7998 (mono_debug_list_add): New public function.
7999 (mono_debug_list_remove): New public function.
8000 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
8001 (mono_debug_init_2_memory): Renamed into
8002 mono_debug_open_image_from_memory().
8003 (mono_debug_close_image): New public function.
8004 (mono_debug_domain_create): Likewise.
8005 (mono_debug_domain_unload): Likewise.
8006 (MONO_DEBUGGER_VERSION): Bump to 60.
8008 * mono-debug-debugger.h
8009 (MonoDebuggerEvent):
8010 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
8011 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
8012 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
8013 - rename `THREAD_CREATED' and `THREAD_EXITED' into
8014 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
8015 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
8017 (mono_debugger_add_symbol_file): Removed.
8018 (mono_debugger_add_type): Removed.
8019 (mono_debugger_lookup_type): Removed.
8020 (mono_debugger_lookup_assembly): Removed.
8023 (mono_domain_create): Call mono_debug_domain_create().
8024 (mono_init_internal): Call mono_debug_init_corlib().
8027 (mono_assembly_close): Call mono_debug_close_image().
8029 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8031 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
8034 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
8036 * sgen-gc.c: ensure section->pin_queue_end is initialized
8037 correctly when non pinning objects in the section have been found.
8039 2007-08-22 Marek Habersack <mhabersack@novell.com>
8041 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
8042 containing a list of directories separated by ':'. MSDN docs say
8043 the directories should be separated with ';'. Part of a bugfix for
8046 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
8048 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
8049 it should MonoType and not MonoClass.
8051 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
8053 * culture-info-table.h : regenerated.
8055 2007-08-20 William Holmes <billholmes54@gmail.com>
8057 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
8058 to call ReplaceFile Kernel32 on windows or in io-layer.
8059 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
8060 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
8061 as an internal call.
8063 Code is contributed under MIT/X11 license.
8065 2007-08-20 Jb Evain <jbevain@novell.com>
8067 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
8068 and MONO_EXCEPTION_FIELD_ACCESS.
8070 * debug-helpers.[c|h]: new mono_field_full_name function.
8072 2007-08-20 Mark Probst <mark.probst@gmail.com>
8074 * class.c: Removed class_security_level() and moved it to
8075 security-core-clr.c.
8077 * security-core-clr.c, security-core-clr.h: class_security_level()
8078 is now public and renamed to mono_security_core_clr_class_level().
8079 It also looks for security attributes in the classes a class is
8082 2007-08-20 Mark Probst <mark.probst@gmail.com>
8084 * security-core-clr.c, security-core-clr.h: CoreCLR security
8087 * Makefile.am: Added security-core-clr.[ch].
8089 * security-manager.c, security-manager.h: Functions and enum for
8090 setting and getting the security mode.
8092 * class.c: CoreCLR security checks.
8094 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8096 * icall-def.h, process.c, process.h: implemented icall to get
8097 user/system processor times.
8099 2007-08-17 Mark Probst <mark.probst@gmail.com>
8101 * domain.c, threads.c, class-internals.h, domain-internals.h: New
8102 reader-lock-free jit_info_table.
8104 2007-08-17 Zoltan Varga <vargaz@gmail.com>
8106 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
8108 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
8110 * object-internals.h (MonoException): Add missing _data member.
8112 2007-08-08 Massimiliano Mantione <massi@ximian.com>
8114 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
8115 checking that only methods with matching qname or fqname are picked
8116 from implemented interfaces.
8118 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
8120 * verify.c (do_newarr):added, do type verification of
8121 newarr ops, push the right value on the eval stack.
8122 * verify.c (mono_method_verify): use do_newarr
8125 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
8127 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
8128 factored the common code into get_boxable_mono_type, which
8129 is now using mono_type_get_full, this fixed byref related tests.
8131 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
8133 * class.c: added mono_type_get_full, this function has the same
8134 behavior of mono_class_get_full but the returned MonoType has
8135 all metadata of the associated token in case of a typespec token.
8136 * class.c: added mono_type_retrieve_from_typespec, used by
8137 mono_type_get_full to retrieve the token type.
8138 * class.c (mono_class_create_from_typespec): changed to use
8139 mono_type_retrieve_from_typespec.
8140 * class.c (mono_ldtoken): changed to use mono_type_get_full
8141 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
8142 * class-internals.h: exported mono_type_get_full for internal use.
8144 2007-08-16 Jb Evain <jbevain@novell.com>
8146 * domain.c (supported_runtimes): add entry for
8147 the 'moonlight' runtime version.
8149 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
8151 * verify.c (mono_method_verify): small typo sliped in.
8153 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
8155 * verify.c (do_unbox_value): added, do type verification of
8157 * verify.c (mono_method_verify): use do_unbox_value
8160 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
8162 * verify.c (dump_stack_value): fixed typo, was printing string
8163 instead of object on stack.
8164 * verify.c (do_box_value): moved the byref check up as it leads
8165 to invalid code and should be done earlier.
8166 * verify.c: improved error messages for and ldobj
8168 2007-08-15 William Holmes <billholmes54@gmail.com>
8170 * marshal.c (emit_marshal_custom): Omit the call to
8171 marshal_native_to_managed when calling native to managed
8172 and the argument is specified as an out argument.
8174 Code is contributed under MIT/X11 license.
8176 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
8178 * verify.c: fixed the type checks for generics, function pointers and vectors.
8179 Added type verification for ldobj and ldtoken. The verifier
8180 would segfault if header or signature of a method contained references
8181 to non-existant types.
8183 2007-08-15 Jonathan Chambers <joncham@gmail.com>
8185 * marshal.c (cominterop_get_ccw): Patch from
8186 Bill Holmes to no walk up interface hierarchy.
8187 All parent methods should be present in the interface for COM.
8189 Code is contributed under MIT/X11 license.
8191 2007-08-15 Jonathan Chambers <joncham@gmail.com>
8193 * marshal.c (emit_marshal_com_interface): Patch from
8194 Bill Holmes to handle COM Interfaces as return values
8195 for native->managed calls.
8197 Code is contributed under MIT/X11 license.
8199 2007-08-14 Jonathan Chambers <joncham@gmail.com>
8201 * marshal.c (cominterop_get_idispatch_for_object): Implement
8202 for runtime callable wrappers.
8204 Code is contributed under MIT/X11 license.
8206 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
8208 * pedump.c (main): changed from mono_init to mono_init_from_assembly
8209 so 2.0 types are accessible
8212 2007-08-13 Miguel de Icaza <miguel@novell.com>
8214 * domain.c (mono_init_internal): Call mono_assembly_load_friends
8215 once we load mscorlib. Due to the order in which we initialize,
8216 the mono_assembly_load_full routine that loads mscorlib did not
8217 load friends. We now load it once we load the
8218 mono_defaults.internals_visible_class class.
8220 * assembly.c: Expose the mono_load_friend_assemblies method.
8222 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
8224 * verify.c: improved the handling of boxing, better
8225 type checking for unary ops and conversion. Fix bug
8226 regarding managed pointer compatibility checking
8228 2007-08-11 Zoltan Varga <vargaz@gmail.com>
8230 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
8232 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
8234 2007-08-09 Raja R Harinath <rharinath@novell.com>
8236 * reflection.c (dup_type): Remove.
8237 * class.c (dup_type): Remove.
8238 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
8239 instead of the dodgy 'dup_type'.
8240 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
8241 handle the case where 'dup_type' needed the second argument.
8243 2007-08-08 Zoltan Varga <vargaz@gmail.com>
8245 * domain.c: Fix a warning.
8247 2007-08-08 Massimiliano Mantione <massi@ximian.com>
8249 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
8250 checking that methods with the same fqname are not overridden
8251 with a method from an ancestor.
8253 2007-08-07 Zoltan Varga <vargaz@gmail.com>
8255 * threads.c (free_thread_static_data_helper): Avoid a crash if
8256 thread->static_data is not yet set.
8258 2007-08-07 Jonathan Chambers <joncham@gmail.com>
8260 * marshal.c: Use correct image when emitting
8261 native wrapper for COM calls.
8263 Code is contributed under MIT/X11 license.
8265 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
8267 * icall-def.h, security.c, security.h :
8268 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
8270 2007-08-07 Martin Baulig <martin@ximian.com>
8272 * mono-debug-debugger.h
8273 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
8275 * domain.c (mono_domain_free): Call
8276 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
8278 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
8280 * verify.c (check_underflow, check_overflow): error message now returns IL offset
8281 * verify.c (in_same_block): code should test if either offset is inside the clauses
8282 * verify.c (mono_method_verify): push the exception into the eval stack of exception
8285 2007-08-03 Zoltan Varga <vargaz@gmail.com>
8287 * image.c (mono_image_close): Fix a leak.
8289 * object.c (mono_runtime_invoke_array): Avoid using alloca.
8291 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
8293 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8295 * domain.c, threads.c, threads-types.h: fix memory retention issue
8296 with thread static variables not being cleared on domain unload.
8297 Reuse thread static slots after domain unload.
8299 2007-08-03 Zoltan Varga <vargaz@gmail.com>
8301 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
8304 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
8305 now done in mono_runtime_invoke_array.
8307 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
8308 receiver is a nullable type.
8310 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
8313 2007-08-03 Jonathan Chambers <joncham@gmail.com>
8315 * marshal.c: Implement COM Objects as return type for
8316 managed->unmanaged calls. Added Release calls for COM Object
8317 out/return values in managed->unmanaged calls.
8319 Code is contributed under MIT/X11 license.
8321 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
8323 * threads.h, threads-type.h: move the hazard pointer declarations
8324 to the private header.
8326 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8328 * file-io.c, appdomain.c: memory leak fixes.
8330 2007-08-02 Dick Porter <dick@ximian.com>
8333 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
8334 SO_REUSEADDR setting into io-layer/sockets.c.
8336 2007-08-01 Zoltan Varga <vargaz@gmail.com>
8338 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
8339 from Object when called on a generic parameter. Fixes #82211.
8341 2007-08-01 Dick Porter <dick@ximian.com>
8343 * file-io.c (convert_share): Test FileShare values bit-by-bit.
8344 Fixes bug 79250 yet again.
8346 2007-07-30 Martin Baulig <martin@ximian.com>
8348 Merged the `debugger-dublin' branch.
8351 (MonoDebugDataTable): New typedef.
8352 (MonoDebugMethodAddressList): New typedef.
8353 (MonoDebugWrapperData): Removed.
8354 (MonoDebugSymbolTable): Removed `current_data_table',
8355 `current_data_table_size', `current_data_table_offset'.
8356 (MonoDebugDataItemType): Moved into mono-debug.c.
8357 (MonoDebugMethodJitInfo): Remove `address'.
8358 (mono_debug_data_table): New global variable.
8359 (mono_debug_lookup_method_addresses): New public function.
8360 (mono_debug_find_method): Take a `MonoMethod *', not a
8361 `MonoDebugMethodInfo *'.
8363 * mono-debug.c: Drop support for the old symbol tables.
8365 2007-06-28 Martin Baulig <martin@ximian.com>
8367 * mono-debug.c (mono_debug_debugger_version): New public variable.
8369 2007-07-31 William Holmes <billholmes54@gmail.com>
8371 * metadata.c Changed mono_type_create_from_typespec to not insert
8372 the type into the hash map until after
8373 do_mono_metadata_parse_type has completed.
8375 Code is contributed under MIT/X11 license.
8377 2007-07-31 Zoltan Varga <vargaz@gmail.com>
8379 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
8380 generic parameter. Fixes #82211.
8382 2007-07-27 Jb Evain <jbevain@novell.com>
8384 * pedump.c (dump_metadata, dump_metadata_header): dump
8385 versions contained in the metadata header.
8387 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
8389 * threads.c: register small_id_table with the GC.
8391 2007-07-27 Mark Probst <mark.probst@gmail.com>
8393 * threads.c, threads.h, class-internals.h, object-internals.h:
8394 Hazard pointers, to be used by lock-free parallel algorithms.
8396 2007-07-26 Dick Porter <dick@ximian.com>
8398 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
8399 routine on non-windows platforms, as I've not managed to think of
8400 a non-kludgy way of doing this. Finishes off bug 78739.
8402 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
8404 * object.c: properly setup interface_bitmap in proxy vtables.
8406 2007-07-25 Marek Habersack <mhabersack@novell.com>
8408 * appdomain.c (get_shadow_assembly_location): do not use TickCount
8409 to create unique shadow copy target directories, use the domain's
8410 serial number instead. Each domain gets a unique target directory
8413 * domain.c (mono_domain_create): added code to increment domain
8414 shadow copy serial number and cache the value in the current
8417 * domain-internals.h (struct _MonoDomain): added a new field -
8418 shadow_serial to hold the serial number used in generation of
8419 shadow-copy directories. This is to make sure that the directory
8420 name is unique for each and every domain created. We avoid a race
8421 condition with overriding assemblies already in use by other app
8424 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
8426 * class.c (mono_bounded_array_class_get): fixed memory leak when
8427 binding generic parameters.
8429 2007-07-24 Raja R Harinath <rharinath@novell.com>
8431 * metadata.c (do_mono_metadata_parse_generic_class): Use
8432 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
8435 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8437 * loader.c, class-internals.h, reflection.c: removed the per-method
8438 generics hashtable: we use the global one through the call of
8439 mono_class_inflate_generic_method ().
8441 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8443 * class.c, metadata.c, class-internals.h: introduce yet another
8444 generics global cache for inflated methods (fixes 98% of the perf
8445 issue in bug #81806).
8447 2007-07-23 Raja R Harinath <rharinath@novell.com>
8449 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
8450 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
8451 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
8452 return a MonoGenericInst containing (a copy) of those types.
8453 (mono_metadata_inflate_generic_inst): Update to changes.
8454 (mono_metadata_parse_generic_inst): Likewise.
8455 (mono_get_shared_generic_inst): Likewise.
8456 * reflection.c (mono_class_bind_generic_parameters): Likewise.
8457 (mono_reflection_bind_generic_method_parameters): Likewise.
8458 * metadata-internals.h: Likewise.
8459 * icall.c (free_generic_context): Kill.
8460 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
8462 * reflection.c (reflection_methodbuilder_to_mono_method): Use
8463 mono_metadata_type_dup.
8464 * marshal.c (mono_mb_create_method): Likewise.
8466 * metadata.c (mono_metadata_type_dup): Rename from
8467 mono_metadata_type_dup_mp. Take an optional mempool instead of a
8468 MonoImage. Handle a few more cases, esp. when no mempool is given.
8469 * marshal.c, metadata-internals.h: Update to changes.
8471 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
8473 * class.c: fixed a small leak for array classes and removed warning.
8475 2007-07-22 Zoltan Varga <vargaz@gmail.com>
8477 * loader.c (mono_method_get_param_token): Make this work on generic methods.
8478 Return 0x8000000 for return parameters. Fixes #82161.
8480 2007-07-21 Marek Habersack <grendello@gmail.com>
8482 * appdomain.c (get_shadow_assembly_location): append the current
8483 ticks value to the path. Avoids overwriting the same assemblies by
8484 several threads at the same time.
8486 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
8487 and Raja R Harinath <rharinath@novell.com>
8489 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
8491 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
8492 property for testing if a method is a generic method definition.
8494 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
8496 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
8498 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8500 * verify.c: used function from private branch, reverted to the one in class.h
8502 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8504 * verify.c: a typo slipped in and the code wont compile
8506 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8508 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
8509 disabled box instruction as it is doing the wrong thing
8510 improved stack dump messages, now it is easier to debug type related issues
8513 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
8515 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
8517 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8519 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
8520 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
8521 grouped with class and valuetype. This change will simply
8522 the code as it should be handled just like unmanaged pointers.
8524 2007-07-19 Mark Probst <mark.probst@gmail.com>
8526 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
8528 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8530 * verify.c: several stack merge issues fixed, reference comparisons now
8531 check the type size. strict type check now works correctly.
8532 added more uses of IS_MANAGED_POINTER macro.
8533 fixed issues pointed by running the test suite against .net.
8536 2007-07-19 Mark Probst <mark.probst@gmail.com>
8538 * class.c, loader.c, class-internals.h: Removed the
8539 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
8542 * icall.c: Better error checking in some internal reflection
8545 2007-07-18 William Holmes <billholmes54@gmail.com>
8547 * filewatcher.c : removed unused variable 'filename' in
8548 ves_icall_System_IO_FSW_SupportsFSW
8550 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8552 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
8555 2007-07-15 Zoltan Varga <vargaz@gmail.com>
8557 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
8559 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
8561 2007-07-14 Zoltan Varga <vargaz@gmail.com>
8563 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
8564 Implement generics support.
8565 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
8567 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
8568 type_args and method_args arguments.
8569 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
8570 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
8571 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
8573 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
8575 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
8576 It adds a rootimage parameter to mono_reflection_get_type_internal,
8577 adds new function mono_reflection_get_type_with_rootimage and use
8578 the rootimage to resolve the types instead of the current image
8580 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
8582 * culture-info-table.h: Forgot to update after r78304.
8584 2007-07-13 Raja R Harinath <rharinath@novell.com>
8586 * class.c (mono_class_is_open_constructed_type)
8587 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
8589 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
8591 * class.c (mono_bounded_array_class_get): method fails if used with
8592 an incomplete TypeBuilder enum (no basetype field), fixed it by
8593 avoiding calculating the size for such array as it cannot be instantiated.
8596 2007-07-12 Raja R Harinath <rharinath@novell.com>
8598 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
8600 * metadata.c, reflection.c: Update to changes.
8602 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
8604 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
8605 mono_class_is_valid_enum, they are used to valide a enum when loading.
8606 * reflection.c: used new functions to throw TypeLoadException when and
8607 invalid enum is build with TypeBuilder. Fixes #82018
8609 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
8611 * object.c: forgot commit of mono_class_setup_methods () to access
8613 * object-internals.h: added a few more handy fields to
8616 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8618 * object.c (build_imt): Call mono_class_setup_methods () before accessing
8621 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
8623 * class-internals.h, object-internals.h, object.c: IMT-based
8624 interface invocation core from Massimiliano Mantione
8625 (massi@ximian.com) with a reworked arch-specific interface,
8626 bsearch implementation and a few bugfixes and memory savings by me.
8628 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
8630 * class.c (mono_class_create_from_typedef): mono would segfault if
8631 an enum did not have a __value field. It now throws a TypeLoadException
8632 for such cases. Fix bug #82022
8634 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8636 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
8638 2007-07-09 Mark Probst <mark.probst@gmail.com>
8640 * class.c (mono_class_init): If a class is already inited but has
8641 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
8643 2007-07-09 Mark Probst <mark.probst@gmail.com>
8645 * class.c: Properly handle the case of an unimplemented interface
8646 method. Fixes: 81673.
8648 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8650 * class-internals.h, object.c: cleanup patch from massi: use
8651 MonoVTable->interface_bitmap since the vtable interfaces offset array
8654 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8656 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
8657 GetMDStreamVersion icall instead.
8659 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8661 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
8662 not use mono_dl_build_path() with a full library name: makes
8663 fallbacks to libgaim and libfam work.
8665 2007-07-06 William Holmes <billholmes54@gmail.com>
8667 * assembly.c: Added a continue statement in probe_for_partial_name when
8668 parse_assembly_directory_name fails. Fixes : 82002
8670 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
8672 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
8673 and added a verification for TYPEDBYREF.
8674 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
8675 make native int interchangeable with int32 and some small cleanup and formating.
8676 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
8677 handle byref of byref.
8678 * verify.c (push_local): handle byref of byref.
8679 * verify.c (do_binop): invalid mix of values is unverifiable
8680 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
8681 added visibility checks
8682 * verify.c (field related method): added visibility checks
8683 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
8685 2007-07-06 Zoltan Varga <vargaz@gmail.com>
8687 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
8690 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8692 * profiler.c (mono_profiler_load): Fix an off-by-one error.
8694 * marshal.c (emit_marshal_string): When returning a string from managed code,
8695 allways make a copy even for unicode strings. Fixes #81990.
8697 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
8699 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
8700 of byref generic inst types (bug #81997).
8702 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
8704 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
8705 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
8707 2007-07-02 Zoltan Varga <vargaz@gmail.com>
8709 * marshal.c (emit_marshal_string): Add support for unicode strings in
8710 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
8712 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
8714 * verify.c: field load/store are now verified, missing only access checks now
8716 2007-06-28 Martin Baulig <martin@ximian.com>
8718 * mono-debug.c (mono_debug_debugger_version): New public variable.
8720 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
8722 * locales.c: When constructing DateTimeFormat or NumberFormat for
8723 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
8724 MonoCultureInfo contructed from the current locale is always
8725 read-only and has UseUserOverride set to true. All MonoCultureInfo
8726 instances returned for GetCultures have both IsReadOnly and
8727 UseUserOverride set to true. Fixes part of bug #81930.
8729 2007-06-22 Jonathan Chambers <joncham@gmail.com>
8731 * icall-def.h: Update System.__ComObject icalls
8732 * marshal.c: Avoid managed transition (and object creation)
8733 when looking up COM interface in RCW.
8736 Code is contributed under MIT/X11 license.
8738 2007-06-22 Zoltan Varga <vargaz@gmail.com>
8740 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
8741 to avoid crashes during assembly unloading.
8743 2007-06-22 Raja R Harinath <rharinath@novell.com>
8745 Fix MethodInfo.IsGenericMethodDefinition
8746 * reflection.c (mono_reflection_bind_generic_method_parameters):
8747 Rearrange code to ensure we always uses a generic method definition.
8748 * class.c (mono_class_inflate_generic_method_full): Set
8749 'generic_container' field only for generic method definitions.
8750 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
8751 Use presense of 'generic_container' field as indication of being a
8752 generic method definition.
8754 2007-06-21 Zoltan Varga <vargaz@gmail.com>
8756 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8758 * object-internals.h: Reflect changes in the layout of the managed Delegate
8761 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
8762 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
8763 runtime memory used by the dynamic method. Fixes #77146.
8765 2007-06-21 Dick Porter <dick@ximian.com>
8768 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
8769 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
8772 2007-06-21 Raja R Harinath <rharinath@novell.com>
8774 * reflection.c (method_encode_methodspec): Add a tripwire.
8775 * class.c (inflate_generic_type): The fully open generic type is
8776 not the same as the generic type definition.
8778 2007-06-21 Martin Baulig <martin@ximian.com>
8780 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
8782 * mono-debug-debugger.h
8783 (MonoDebuggerBreakpointInfo): Removed.
8784 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
8785 (mono_debugger_remove_breakpoint): Likewise.
8786 (mono_debugger_breakpoint_callback): Likewise.
8787 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
8789 2007-06-21 Raja R Harinath <rharinath@novell.com>
8791 * metadata.c (mono_metadata_lookup_generic_class): The fully open
8792 generic type is not the same as the generic type definition.
8793 * class.c (mono_generic_class_get_class): Likewise.
8795 2007-06-20 Geoff Norton <gnorton@customerdna.com>
8797 * icall.c: The second argument to
8798 System.Reflection.MethodBase.GetMethodFromHandleInternalType
8799 is a MonoType not a MonoClass.
8801 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
8803 * verify.c: support for function pointers in the verifier
8805 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
8807 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
8809 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
8811 * assembly.c: removed Mono.Data.SqliteClient from the list of
8812 forward-compatible assemblies as it breaks the ABI (bug #81899).
8814 2007-06-19 Raja R Harinath <rharinath@novell.com>
8816 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
8817 lookup/update with the loader lock.
8818 * reflection.c (mono_class_bind_generic_parameters): No need to
8819 protect mono_metadata_lookup_* with the loader lock.
8820 * class.c (inflate_generic_type): Likewise.
8822 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
8823 on a generic instantiated type.
8825 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
8827 *verify.c: produce meanfull error messages on verification error
8828 *verify.c: fixed some cases of verification errors reported as validation errors
8829 *pedump.c: fixed the error name array, now it shows validation errors properly
8830 *verify.h: fixed the contant that should be used for verification errors
8832 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8834 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
8835 for bug #77596, 81858 and 80743 (generics data structures on domain
8838 2007-06-15 Raja R Harinath <rharinath@novell.com>
8840 Avoid allocating 'MonoGenericContext' on the heap.
8841 * class-internals (_MonoMethodInflated::context): Make field
8842 inline, not a pointer.
8843 * loader.c (method_from_methodspec): Allocate 'new_context' on the
8844 stack. Use the context embedded within the inflated method as the
8845 hash key, rather than 'new_context'.
8846 * class.c (inflate_generic_context): Simplify. Return a struct
8847 rather than allocating on the heap.
8848 (mono_class_inflate_generic_method_full): Update to changes. Now,
8849 doesn't salt away a copy of the context -- simplifying the
8850 lifetime rules of a 'MonoGenericContext *'.
8851 (mono_method_get_context): Return pointer to embedded context.
8852 (setup_generic_array_ifaces): Allocate temporary context on stack.
8853 * reflection.c (inflate_mono_method): Likewise.
8854 (mono_reflection_bind_generic_method_parameters): Likewise.
8855 Use the context embedded within the inflated method as the hash key.
8857 Avoid a source of allocation of 'MonoGenericContext'.
8858 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
8859 and 'cached_context' fields into embedded 'MonoGenericContext' field.
8860 * class.c: Update to changes.
8861 (mono_generic_class_get_context): Simplify drastically. Now just
8862 returns a pointer to the field.
8863 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
8864 argument as a const pointer.
8865 (mono_metadata_generic_context_equal): Likewise.
8866 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
8869 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
8871 * verify.c improved the handling of brtrue/brfalse, factored out common code
8873 2007-06-14 Raja R Harinath <rharinath@novell.com>
8875 Kill MonoGenericMethod.
8876 * class-internals.h (MonoGenericContext::method_inst): Rename from
8877 'gmethod' and convert to a MonoGenericInst.
8878 (MonoGenericMethod): Remove.
8879 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
8880 * loader.c (method_from_methodspec): Update to changes. Use a
8881 MonoGenericContext as the key to the hashtable.
8882 * metadata.c (mono_metadata_generic_context_equal): Rename from
8883 'mono_metadata_generic_method_equal' and take MonoGenericContext.
8884 (mono_metadata_generic_context_hash): Likewise from
8885 'mono_metadata_generic_method_hash'. Change hash function.
8886 (mono_metadata_load_generic_params): Update to changes.
8887 (mono_get_shared_generic_method): Remove.
8888 * metadata-internals.h (mono_get_shared_generic_method): Remove.
8889 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
8890 (inflate_generic_context): Likewise.
8891 (mono_class_inflate_generic_method_full): Likewise.
8892 (setup_generic_array_ifaces): Likewise.
8893 (mono_class_create_from_typespec): Likewise.
8894 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
8895 (method_encode_methodspec): Update callsite.
8896 (reflection_methodbuilder_to_mono_method): Update to changes.
8897 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
8898 MonoGenericContext as the key to the hashtable.
8899 (inflate_mono_method): Update to changes.
8901 * class-internals.h (MonoGenericMethod::container): Remove.
8902 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
8904 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
8906 * profiler-private.h, profiler.c, profiler.h: added API to profile
8909 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
8911 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
8913 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
8915 * verify.c: method invocation is now validated, now we verify parameter types on stack.
8916 Fixed overflow and underflow not aborting the verification process.
8918 2007-06-13 Mark Probst <mark.probst@gmail.com>
8920 * class-internals.h (MonoStats): Added stats entries for dynamic
8923 2007-06-12 Zoltan Varga <vargaz@gmail.com>
8925 * loader.c (mono_free_method): Free header->locals and header->clauses.
8927 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
8930 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
8932 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
8934 2007-06-12 Raja R Harinath <rharinath@novell.com>
8936 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
8939 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
8941 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
8943 2007-06-11 Raja R Harinath <harinath@gmail.com>
8945 MonoGenericMethod on a diet
8946 * class-internals.h (_MonoMethodInflated::reflection_info): Move
8948 (_MonoGenericMethod::reflection_info): ... from here.
8949 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
8951 * reflection.c (inflate_mono_method): Likewise.
8952 (mono_reflection_bind_generic_method_parameters): Likewise.
8954 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
8956 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
8957 *verify.c: factored long ldarg forms to share code with short forms
8959 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
8961 *verify.c: fixed code formating factored some duplicate code
8964 *verify.h: fixed binary incompatibility introduced earlier
8966 *pedump.c: fixed formating
8968 2007-06-11 Raja R Harinath <harinath@gmail.com>
8970 Fix assertion when disassembling Mono.C5.dll
8971 * loader.c (method_from_methodspec): Avoid inflating a method
8972 twice with the same context. If the methodref is inflated, use
8973 the declaring method instead.
8975 * class.c (mono_class_from_generic_parameter): Fix case similar to
8976 bug #81830 handled below, but for method containers.
8978 2007-06-10 Raja R Harinath <harinath@gmail.com>
8980 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
8981 get_shared_generic_class. Directly inflate the instance.
8982 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
8983 (inflate_generic_class): Delete.
8984 (get_shared_generic_class): Delete. Move setting of
8985 'cached_class' and 'cached_context' ...
8986 * metadata.c (mono_metadata_lookup_generic_class): ... here.
8988 * metadata.c (mono_metadata_lookup_generic_class): Change
8989 signature to take the components of a MonoGenericClass rather than
8990 an allocated MonoGenericClass. Change semantics to be intern-like.
8991 * reflection.c (mono_class_bind_generic_parameters): Update to
8992 changes. Make locking region tighter.
8993 * class.c (inflate_generic_class): Update to changes.
8994 (get_shared_generic_class): Likewise.
8995 * metadata-internals.h: Likewise.
8997 * reflection.c (mono_class_bind_generic_parameters): Take and
8998 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
8999 (mono_reflection_bind_generic_parameters): Use
9000 'mono_class_bind_generic_parameters' rather than duplicate the code.
9001 * class.c (mono_bounded_array_class_get): Update to changes.
9002 * object-internals.h: Likewise.
9004 * reflection.c (mono_class_bind_generic_parameters): Only support
9005 parameterizing generic type definitions. Remove support for other
9008 2007-06-08 Zoltan Varga <vargaz@gmail.com>
9010 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
9012 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
9013 in the dynamic case.
9015 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
9017 * threads.c: When cleaning up thread, reset the Background bit.
9020 2007-06-08 Jonathan Chambers <joncham@gmail.com>
9022 * metadata.c: Move variable declarations to top of scope.
9023 * verify.c: Move variable declarations to top of scope.
9025 Code is contributed under MIT/X11 license.
9027 2007-06-08 Raja R Harinath <rharinath@novell.com>
9029 * reflection.c (mono_class_bind_generic_parameters): Replace
9030 open-coded loop with mono_metadata_inflate_generic_inst.
9032 * class.c (get_shared_generic_class): Don't call
9033 mono_get_shared_generic_inst. Use the container's own
9036 * metadata.c (mono_metadata_load_generic_params): Move
9037 initialization of 'context' field here from ...
9038 * class.c (mono_class_create_from_typedef): ... here, and ...
9039 * loader.c (mono_get_method_from_token): ... here.
9041 * class.c (get_shared_generic_class): Rename from
9042 mono_get_shared_generic_class and make static.
9043 (mono_get_shared_generic_inst): Move to metadata.c.
9044 * loader.c (mono_get_shared_generic_method): Likewise.
9045 * class-internals.h, metadata-internals.h: Update to changes.
9048 * class.c (mono_class_from_generic_parameter): Don't assume a
9049 generic container owner exists. Generic containers from monodis
9052 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
9054 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
9055 * verify.h: new typedefs to returns the non-verifiable status
9056 * verify.c: initial implementation of generics, stack merging and object compatibility check
9058 2007-06-06 Mark Probst <mark.probst@gmail.com>
9060 * class.c, image.c, class-internals.h (MonoImage): class_cache is
9061 a MonoInternalHashTable again (fixed bug in internal hash table
9064 2007-06-06 Mark Probst <mark.probst@gmail.com>
9066 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
9067 MonoInternalHashTable again (fixed bug in internal hash table
9070 2007-06-06 Mark Probst <mark.probst@gmail.com>
9072 * class.c, image.c, class-internals.h, domain.c,
9073 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
9074 changes. Have to figure out what makes them break the SWF
9077 2007-06-04 Mark Probst <mark.probst@gmail.com>
9079 * class.c, image.c, class-internals.h (MonoImage): class_cache is
9080 a MonoInternalHashTable now.
9082 2007-06-04 Mark Probst <mark.probst@gmail.com>
9084 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
9085 MonoInternalHashTable now.
9087 2007-05-31 Zoltan Varga <vargaz@gmail.com>
9089 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
9092 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
9094 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
9095 dependent trampoline.
9097 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9099 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
9101 2007-05-29 Robert Jordan <robertj@gmx.net>
9103 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
9105 2007-05-28 Zoltan Varga <vargaz@gmail.com>
9107 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
9109 2007-05-25 Jonathan Chambers <joncham@gmail.com>
9111 * marshal.c: Fix interface lookup loops for
9112 cominterop_get_com_slot_for_method and
9113 cominterop_get_method_interface. Only need to lookup
9114 if type is a class, else use interface type method is on.
9116 Code is contributed under MIT/X11 license.
9118 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
9120 * reflection.c: HasSecurity can be present even if no specially
9121 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
9122 SecurityAttribute). Fix CAS regression tests on buildbot.
9124 2007-05-24 Jonathan Chambers <joncham@gmail.com>
9126 * appdomain.c: Add configure checks for header files.
9127 * image.c: Add configure checks for header files.
9128 * file-io.c: Add configure checks for header files.
9129 * debug-mono-symfile.c: Add configure checks for header files.
9130 * threadpool.c: Add configure checks for header files.
9131 * console-io.c: Add configure checks for header files.
9132 * profiler.c: Add configure checks for header files.
9133 * rawbuffer.c: Add configure checks for header files.
9134 * icall.c: Add configure checks for header files.
9135 * rand.c: Add configure checks for header files.
9136 * socket-io.c: Add configure checks for header files.
9138 Code is contributed under MIT/X11 license.
9140 2007-05-24 Zoltan Varga <vargaz@gmail.com>
9142 * reflection.c (mono_custom_attrs_from_builders): Remove the
9143 assertion as it breaks the build.
9145 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
9147 * reflection.c (lookup_custom_attr): Make a copy here too.
9149 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
9152 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
9155 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
9158 2007-05-22 Zoltan Varga <vargaz@gmail.com>
9160 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
9161 (load_cattr_value): Ditto.
9163 2007-05-20 Zoltan Varga <vargaz@gmail.com>
9165 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
9167 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
9169 * threads.c: In "start_wrapper", set apartment_state to MTA if
9170 apartment_state is Unknown and we're running on 2.0 profile or
9172 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
9173 to main method, then set apartment_state to Unknown on 1.0 profile,
9174 and MTA on 2.0 profile.
9176 2007-05-16 Jb Evain <jb@nurv.fr>
9178 * class-internals.h (MonoDefaults): Add an attribute_class and
9179 customattribute_data_class.
9180 * domain.c (mono_init_internal): Populate them.
9181 * reflection.c: Use them to remove duplicates. Make a vew
9182 MonoClass variables `static'.
9184 2007-05-15 Massimiliano Mantione <massi@ximian.com>
9186 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
9187 step in implementing IMT, so that all isinst checks now can go
9189 This was needed because vtables for TransparentProxy need to look
9190 like the vtable of the "target" class, so they need to point to
9191 its interface bitmap directly.
9193 * object.c: inside "mono_class_create_runtime_vtable" and
9194 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
9196 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
9198 * object-internals.h
9199 culture-info.h : added territory field in MonoCulture and
9200 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
9201 * locales.c : fill territory field above too.
9202 * culture-info-table.h : regenerated.
9204 2007-05-12 Zoltan Varga <vargaz@gmail.com>
9206 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
9209 2007-05-11 Jonathan Chambers <joncham@gmail.com>
9211 * object.c: Always initialize apartment, even if
9212 there is no custom attributes on entry point.
9214 Code is contributed under MIT/X11 license.
9216 2007-05-10 Jonathan Chambers <joncham@gmail.com>
9218 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
9219 * metadata.c: If no encoding is set, check for unicode
9222 Code is contributed under MIT/X11 license.
9224 2007-05-09 Jonathan Chambers <joncham@gmail.com>
9226 * threads.c: Handle if mono_thread_current returns NULL
9228 Code is contributed under MIT/X11 license.
9230 2007-05-09 Jonathan Chambers <joncham@gmail.com>
9232 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
9233 in start_wrapper. Added mono_thread_init_apartment_state and
9234 mono_thread_cleanup_apartment_state.
9235 * object.c: Initialize thread apartment state on main thread
9236 by checking for STAThreadAttribute on entry point.
9237 * object-internals.h: Add apartment_state field to MonoThread.
9238 * threads-types.h: Add unmanaged definition of
9239 System.Threading.ApartmentState, MonoThreadApartmentState.
9241 Code is contributed under MIT/X11 license.
9243 2007-05-08 Jonathan Chambers <joncham@gmail.com>
9245 * class.c: Fix windows build.
9246 * class-internals.h: Fix windows build.
9248 Code is contributed under MIT/X11 license.
9250 2007-05-08 Robert Jordan <robertj@gmx.net>
9252 * process.c (CreateProcess_internal):
9253 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
9254 .CreateNoWindow was specified. Fixes #81496.
9256 2007-05-08 Massimiliano Mantione <massi@ximian.com>
9258 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
9259 step in implementing IMT, replaced it with two compact arrays
9260 (interfaces_packed and interface_offsets_packed) and a bitmap that
9261 is used for isinst checks (interface_bitmap).
9263 * class.c: (compare_interface_ids): compare function to pass to
9264 bsearch when looking for an interface with a given id.
9265 (mono_class_interface_offset): reimplemented using bsearch on
9266 interfaces_packed, getting the offset from interface_offsets_packed.
9267 (print_implemented_interfaces): utility debugging function.
9268 (setup_interface_offsets): reworked to initialize interfaces_packed,
9269 interface_offsets_packed and interface_bitmap.
9271 * object.c: replaced all accesses to "MonoClass.interface_offsets"
9272 with uses of interfaces_packed and interface_offsets_packed.
9274 2007-05-08 Massimiliano Mantione <massi@ximian.com>
9276 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
9277 mono_class_interface_offset prototype to wrap all accesses to
9278 "MonoClass.interface_offsets".
9280 * class.c: Implemented mono_class_interface_offset, and wrapped all
9281 accesses to "MonoClass.interface_offsets".
9283 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
9284 "MonoClass.interface_offsets".
9286 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
9288 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
9289 GetMethodFromHandle overloads (bug #78637).
9291 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
9293 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
9294 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
9296 2007-05-01 Zoltan Varga <vargaz@gmail.com>
9298 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
9301 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
9303 (mono_custom_attrs_from_index): Ditto.
9305 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
9308 2007-04-30 Zoltan Varga <vargaz@gmail.com>
9310 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
9311 is now allocated from a mempool.
9313 2007-04-28 Zoltan Varga <vargaz@gmail.com>
9315 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
9316 caller holds threads_lock, leading to deadlocks. Fixes #81476.
9318 2007-04-26 Zoltan Varga <vargaz@gmail.com>
9320 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
9321 mono_loader_clear_error () too late. Fixes #81463.
9323 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
9325 * culture-info-table.h : regenerated.
9327 2007-04-25 Zoltan Varga <vargaz@gmail.com>
9329 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
9332 2007-04-25 Dick Porter <dick@ximian.com>
9334 * Makefile.am: Put the mingw enforced-optimisation back into the
9335 PLATFORM_WIN32 section.
9337 2007-04-24 Zoltan Varga <vargaz@gmail.com>
9339 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
9342 * image.c (mono_image_load_module): New API function to load a module reference.
9344 * image.c (load_modules): Load modules lazily. Fixes #80812.
9346 * class.c (mono_class_from_typeref): Use mono_image_load_module.
9348 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
9350 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
9351 to mono_image_load_module_dynamic.
9353 2007-04-23 Jonathan Chambers <joncham@gmail.com>
9355 * marshal.c: Fix calling convention for CCW on non-windows
9356 platforms. STDCALL on windows, CDECL everywhere else to work
9357 with XPCOM and MainWin COM.
9359 Code is contributed under MIT/X11 license.
9361 2007-04-23 Martin Baulig <martin@ximian.com>
9366 (method_from_memberref): Added `gboolean *used_context' argument.
9367 (mono_get_method_from_token): Likewise.
9368 (mono_get_method_full): Don't insert the method in the cache when
9369 `used_context' is true.
9371 2007-04-23 Raja R Harinath <rharinath@novell.com>
9373 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
9375 * reflection.c (mono_reflection_bind_generic_parameters): Don't
9376 create new MonoTypes for returned types.
9377 * class.c (mono_generic_class_get_class): Export mono-internal.
9378 * class-internals.h: Update to changes.
9380 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
9382 * threadpool.c, threadpool.h, icall-def.h: patch from
9383 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
9385 2007-04-18 Zoltan Varga <vargaz@gmail.com>
9387 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
9389 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
9391 * threads.c (mono_thread_get_stack_bounds): New helper function.
9393 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
9394 Correctly compute stack bounds when attaching. Fixes #81394.
9396 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
9398 * reflection.c: fix handling of doubles in custom attributes
9399 for the arm-fpa format (bug #81368).
9401 2007-04-18 Raja R Harinath <rharinath@novell.com>
9403 * reflection.c (assembly_add_win32_resources): Mildly relax an
9404 bounds check to let the end pointer point just past the end of the
9405 allocated buffer. (may fix #81384)
9407 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
9409 * culture-info-table.h : regenerated.
9411 2007-04-07 Zoltan Varga <vargaz@gmail.com>
9413 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
9414 the thread is aborted early.
9416 2007-04-05 Dick Porter <dick@ximian.com>
9418 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
9419 FindFirstFile()/FindNextFile() to find entries. This lets the
9420 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
9423 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
9425 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
9427 2007-04-04 Martin Baulig <martin@ximian.com>
9430 (mono_method_desc_full_match): Add support for nested classes.
9432 2007-04-02 Zoltan Varga <vargaz@gmail.com>
9434 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
9436 2007-04-01 Zoltan Varga <vargaz@gmail.com>
9438 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
9439 waiting for too many threads.
9441 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
9443 * environment.c: Fix return value check on uname so we can get the
9444 executing version on Solaris operating systems.
9446 2007-03-28 Jb Evain <jbevain@gmail.com>
9448 * class.c (mono_type_get_name_recurse): Complete the
9449 fix for the creation of assembly qualified names for
9450 pointer types. Fixes #81208.
9452 2007-03-27 Dick Porter <dick@ximian.com>
9454 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
9455 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
9459 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
9460 the value of ReleaseMutex().
9462 2007-03-27 Dick Porter <dick@ximian.com>
9464 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
9465 in little-endian order, not network endian, so must be converted
9466 to host endian here. Fixes bug 80593.
9468 2007-03-22 Jb Evain <jbevain@gmail.com>
9470 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
9471 qualified names for pointer types. Fixes #81208.
9473 2007-03-21 Jonathan Chambers <joncham@gmail.com>
9475 * marshal.c: Add support for PreserveSigAttribute.
9477 Code is contributed under MIT/X11 license.
9479 2007-03-14 Zoltan Varga <vargaz@gmail.com>
9481 * process.c: Fix endianness issues. Fixes #81126.
9483 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
9484 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
9486 * image.c (mono_image_lookup_resource): Make this work on big-endian
9487 machines.Change API contract so the caller needs to free the return value.
9489 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
9492 2007-03-14 Martin Baulig <martin@ximian.com>
9494 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
9495 mono_type_get_desc() as well.
9497 2007-03-13 Jonathan Chambers <joncham@gmail.com>
9499 * icall.c: Fix environ access in VS.
9501 2007-03-13 Alp Toker <alp@atoker.com>
9503 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
9504 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
9507 2007-03-12 Zoltan Varga <vargaz@gmail.com>
9509 * reflection.c (mono_reflection_create_dynamic_method): Add support for
9510 circular references among dynamic methods. Fixes #81091.
9512 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
9514 2007-03-09 Martin Baulig <martin@ximian.com>
9516 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
9518 2007-03-09 Jonathan Chambers <joncham@gmail.com>
9520 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
9521 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
9523 Code is contributed under MIT/X11 license.
9525 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
9527 * loader.c: Reapply patch for bug #79424.
9529 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9531 * metadata.c (mono_type_to_unmanaged): Only convert object to
9532 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
9534 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
9536 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
9537 (and incorrectly set) is_reference field from MonoGenericInst.
9539 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9541 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
9544 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
9546 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
9548 2007-03-05 Miguel de Icaza <miguel@novell.com>
9550 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
9551 FileOptions.1 value to mean "temporary", map that to
9552 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
9556 2007-03-03 Marek Habersack <mhabersack@novell.com>
9558 * appdomain.c: implement MS .Net style shadow copying. Copies of
9559 the assemblies are made in a subdirectory of the dynamic base
9560 directory, the assembly names are preserved.
9561 Copy .mdb and .config files along with the assemblies being shadowed.
9563 2007-02-28 Zoltan Varga <vargaz@gmail.com>
9565 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
9566 (emit_marshal_handleref): Ditto.
9568 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
9569 on Visual C++. Fixes #80671.
9571 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9573 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
9574 for clone operations.
9576 2007-02-28 Zoltan Varga <vargaz@gmail.com>
9578 * marshal.c: Fix warnings.
9580 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
9582 * loader.c: allow case-insensitive matching of the dll name
9583 in dllmap handling when prefixed with "i:".
9585 2007-02-20 Jonathan Chambers <joncham@gmail.com>
9587 * threads.c: Fix #ifdef for dummy_apc function for VS.
9589 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9591 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
9593 2007-02-19 Massimiliano Mantione <massi@ximian.com>
9594 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
9595 giving precedence to the methods with a fully qualified name
9596 (InterfaceName.MethodName) when building the interface sections
9599 2007-02-16 Dick Porter <dick@ximian.com>
9601 * threadpool.c (append_job): Fix fast-path array handling, so it's
9602 less likely the array will grow exponentially when the load is
9605 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9607 * metadata-internals.h, loader.c: fix dllmap lookup order
9608 for non-function maps, too, and prepare for fallback code.
9610 2007-02-12 Robert Jordan <robertj@gmx.net>
9612 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
9613 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
9614 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
9615 GlobalFree. Fixes a part of bug #77075.
9617 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
9619 * loader.c: implemented typedef parent in field memberref.
9621 2007-02-11 Jonathan Chambers <joncham@gmail.com>
9623 * marshal.c: Fix warnings and remember to call Release on
9626 Code is contributed under MIT/X11 license.
9628 2007-02-10 Miguel de Icaza <miguel@novell.com>
9630 * class-internals.h: Add MonoHandleRef definition, and
9631 handleref_class to mono_defaults.
9633 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
9634 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
9636 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
9637 (do nothing on this stage)
9638 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
9639 (emit_marshal_handleref): New method, used for argument handling
9642 2007-02-08 Jonathan Chambers <joncham@gmail.com>
9644 * class.c (mono_class_setup_parent): Lazily init com types.
9645 * domain.c (mono_init_internal, mono_init_com_types): Lazily
9647 * object.c (mono_remote_class_vtable): Lazily init com types.
9648 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
9649 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
9650 * domain-internals.h: Expose mono_init_com_types.
9651 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
9652 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
9653 Add support for COM Callable Wrapper marshalling.
9654 * marshal.h: Add icall definitions.
9655 * gc.c: Handle freeing of CCWs in finalizer code.
9657 Code is contributed under MIT/X11 license.
9659 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
9661 * reflection.c: changed all the signature encoding code to use
9662 a variable-sized buffer.
9664 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9666 * marshal.c: locking fixes: never take the loader lock
9667 or other runtime locks when holding the marshal lock
9670 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
9672 * marshal.c: make the delegate function pointer mapping
9673 work for the moving GC.
9675 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
9677 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
9680 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9682 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
9685 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9687 * threadpool.c: made the code moving-GC safe.
9689 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
9691 * assembly.c, boehm-gc.c, class-internals.h, class.c,
9692 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
9693 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
9695 * reflection.c: warning cleanup, some threading and moving GC fixes.
9697 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
9699 * class.c, loader.c: create the needed Set/Get/Address array methods
9700 as well as the .ctors in mono_class_init (), fixes bug #80567.
9702 2007-01-24 Zoltan Varga <vargaz@gmail.com>
9704 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
9705 we doesn't decrease its alignment. Should fix the sparc build.
9707 2007-01-24 Dick Porter <dick@ximian.com>
9710 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9711 Create the returned object if we need to ignore an unsupported
9712 socket option. Fixes a segfault reported by Atsushi.
9714 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
9716 * class.c, object.c: restrict GC-tracked fields to
9717 UIntPtr fields used inside corlib, so we provide better
9718 type info to the GC and also allow broken packing as in
9721 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
9723 * sgen-gc.c: removed duplicated function.
9725 2007-01-19 Miguel de Icaza <miguel@novell.com>
9727 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
9728 value that means that the value is not supported, but that we
9729 should not return a failure, but instead report this as a
9730 successful operation.
9732 2007-01-19 Raja R Harinath <rharinath@novell.com>
9734 Fix tests/bug79956.2.il
9735 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
9736 (mono_generic_class_get_class): If the generic definition in an
9737 enum, copy over other fields related to it.
9739 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9741 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
9742 genericinst enums (bug #79215).
9744 2007-01-17 Massimiliano Mantione <massi@ximian.com>
9745 * class.c: Fix bug 80307.
9747 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
9749 * image.c: if the file table is not present, try to load
9750 all the modules, since we don't have info about them
9751 having or not metadata (bug #80517).
9752 * assembly.c: allow mono_assembly_load_references () to
9753 work for netmodules.
9755 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9757 * image.c, metadata-internals.h, object.c: execute module
9758 cctors when running on the 2 runtime if present (bug #80487).
9760 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
9762 * icall.c: optimized InitializeArray() on bigendian.
9764 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
9766 * icall.c: fix for the broken ARM FPA double format.
9768 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9770 * icall.c: handle endian issues for r4 and r8 types, too, in
9771 the InitializeArray() icall.
9773 2007-01-15 Miguel de Icaza <miguel@novell.com>
9775 * loader.c (mono_loader_error_prepare_exception): Clear the error
9776 once we have extracted the information from it, do this before we
9777 call into the JIT's class loading mechanisms.
9779 * object.c (mono_class_create_runtime_vtable): Do not clear the
9780 loader error before calling mono_class_get_exception_for_failure
9781 as the loader error is needed inside
9782 mono_class_get_exception_for_failure to throw the error (thinko).
9786 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9788 * reflection.c: align fields rva data so it's faster to load at
9791 2007-01-12 Raja R Harinath <rharinath@novell.com>
9793 Prepare to simplify GenericMethod handling.
9794 * class-internals.h (mono_method_get_context): New accessor function.
9795 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
9796 rather than directly accessing '->context' field.
9798 * class-internals.h (_MonoGenericParam.method): Move ...
9799 (_MonoGenericContainer): ... here. Add into union with klass field.
9800 * class.c, icall.c, loader.c, metadata.c, reflection.c:
9803 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
9805 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
9806 the wrapper type enum and reduce relocations.
9808 2007-01-12 Raja R Harinath <rharinath@novell.com>
9810 * reflection.c (inflate_mono_method): Reuse method instantiation
9811 from the generic method, if available.
9813 2007-01-11 Jonathan Chambers <joncham@gmail.com>
9815 * marshal.c (emit_marshal_variant): Fix conv_arg
9816 type in last commit, based on whether parameter is byref.
9818 2007-01-11 Jonathan Chambers <joncham@gmail.com>
9820 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
9822 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
9823 MONO_TYPE_OBJECT back for VARIANT support.
9825 2007-01-11 Jonathan Chambers <joncham@gmail.com>
9827 * marshal.c, marshal.h, icall-def.h: Implement
9828 Marshal.ReAllocCoTaskMem.
9830 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
9832 * marshal.c: memory retention fixes: use the proper
9833 image cache for runtime_invoke method lookups.
9835 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9837 * mempool.c: added code to help debug mempool allocations.
9839 2007-01-11 Dick Porter <dick@ximian.com>
9841 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
9842 support (experimenting with faking it with IP_MTU_DISCOVER for
9843 systems that don't have IP_DONTFRAGMENT.)
9844 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
9847 * icall-def.h: new System.Net.Sockets.Disconnect icall.
9849 * socket-io.h: Add new fields to MonoSocketAsyncResult
9850 corresponding to the new ones in Socket.cs.
9852 2007-01-11 Raja R Harinath <rharinath@novell.com>
9854 Fix IronPython regression mentioned in #80249
9855 * metadata.c (do_mono_metadata_parse_generic_class): Clear
9856 'cached_context' field, since it may have been initialized as a
9857 side-effect of metadata parsing.
9859 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
9860 (_MonoGenericClass.cached_class): Move here and rename from lone
9861 remaining field of ...
9862 (_MonoInflatedGenericClass): ... this. Remove.
9863 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
9866 Fix mcs/tests/test-128.cs regression.
9867 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
9868 2007-01-10 change below.
9869 [MONO_TYPE_OBJECT]: Recurse into array case.
9871 2007-01-11 Raja R Harinath <harinath@gmail.com>
9873 * class-internals.h (mono_get_inflated_generic_class): Remove.
9874 * class.c (mono_get_inflated_generic_class): Remove.
9875 (mono_generic_class_get_class): Rename from
9876 mono_class_create_generic.
9877 (mono_class_from_mono_type) [GENERICINST]: Use it.
9878 * reflection.c, metadata.c: Update to changes. Use
9879 'mono_class_from_mono_type'.
9881 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
9883 * reflection.c: use passed type when encoding an array element
9884 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
9886 2007-01-09 Robert Jordan <robertj@gmx.net>
9888 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
9889 result arguments (someDelegate.EndInvoke (unrelatedAres)).
9892 2007-01-09 Raja R Harinath <rharinath@novell.com>
9894 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
9896 * object.c (set_value): Avoid aliasing between type->data.klass
9897 and type->data.generic_class.
9899 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
9901 2007-01-08 Raja R Harinath <rharinath@novell.com>
9903 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
9904 between type->data.klass and type->data.generic_class.
9906 2007-01-08 Lluis Sanchez <lluis@ximian.com>
9908 * marshal.c: In MS.NET, StringBuilder objects are not copied by
9909 value in out parameters.
9911 2007-01-08 Raja R Harinath <rharinath@novell.com>
9913 Simplify invariant for MonoGenericClass::klass field.
9914 * class.c (mono_class_create_generic): Verify 'klass' is null.
9915 * metadata.c (do_mono_metadata_parse_generic_class): Don't
9916 initialize 'klass' field.
9918 2007-01-05 Raja R Harinath <rharinath@novell.com>
9920 Ongoing work to avoid redundant data and simplify invariants.
9921 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
9922 'generic_class', and change type to a GenericInst.
9923 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
9924 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
9926 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
9928 * class.c : skip io-layer under PLATFORM_WIN32.
9930 2007-01-03 Tor Lillqvist <tml@novell.com>
9932 Fix #80305: In a bundled executable, look in the bundled exe
9933 assembly to determine the runtime version. Add the possibility to
9934 bundle also the machine.config file.
9936 * assembly.c (mono_assembly_open_from_bundle): Make
9937 non-static. Allow being called even if we have no bundled
9938 assemblies, and return NULL right away in that case.
9940 * domain-internals.h: Declare mono_assembly_open_from_bundle()
9943 * domain.c (app_config_parse): Take an assembly exe file name as
9944 parameter instead of a config file name. Check for a bundled
9945 config file for that assembly by calling
9946 mono_config_string_for_assembly_file() (see below) before looking
9947 for one in the file system.
9948 (get_runtimes_from_exe): Corrsponding change to call of
9950 (get_runtimes_from_exe): Check for bundled assembly exe file first
9951 by calling mono_assembly_open_from_bundle(). If no bundled
9952 assembly exe file is found, call mono_image_open() as before to
9953 look it up in the file system.
9955 * mono-config.c: Add variable bundled_machinec_onfig.
9956 (mono_config_string_for_assembly_file): New function.
9957 (mono_config_for_assembly): Move code snippet that looks for a
9958 bundled assembly .config file into the above new function. Call
9960 (mono_register_machine_config, mono_get_machine_config): New
9961 functions to set and retrieve
9963 * assembly.h: Declare mono_register_machine_config().
9965 * mono-config.h: Declare mono_get_machine_config() and
9966 mono_config_string_for_assembly_file().
9968 * icall.c: No declaration of environ necessary on Win32. It is
9969 declared (as a macro expanding to a function call) in stdlib.h.
9970 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
9971 New internal mono function. Returns the value of
9972 mono_get_machine_config() as a Mono string.
9974 * icall-def.h: Add get_bundled_machine_config().
9976 2007-01-04 Raja R Harinath <rharinath@novell.com>
9978 Remove redundant field
9979 * class-internals.h (_MonoGenericContext.container): Remove field.
9980 * loader.c (mono_method_get_signature_full): Don't parse a
9981 "container" for a signature parse when the signature is inflated
9983 (method_from_methodspec): Likewise, for a generic_inst.
9984 * class.c, metadata.c, reflection.c: Update to changes.
9986 2006-01-04 Raja R Harinath <rharinath@novell.com>
9988 * class-internals.h (_MonoGenericClass): Rename 'context' field to
9989 'cached_context', and change semantics -- it starts off NULL, and
9990 is initialized on demand.
9991 * class.c (mono_generic_class_get_context): New accessor to
9992 replace 'context' field accesses.
9993 (mono_class_get_context): New helper.
9994 (*): Update to changes.
9995 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
9997 2007-01-03 Miguel de Icaza <miguel@novell.com>
9999 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
10000 before the memcpy. Fixes Marshal2 regression.
10002 2007-01-02 Jb Evain <jbevain@gmail.com>
10004 * blob.h: add a MONO_TYPE_ENUM definition
10005 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
10006 fix the encoding of arrays of enums in custom attributes.
10010 2007-01-01 Miguel de Icaza <miguel@novell.com>
10012 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
10013 string is null terminated, but only cut the string short if it
10014 overflows the buffer.
10016 (mono_string_to_byvalstr): Also fix this routine. The code here
10017 was not properly terminating a string (it was only terminated
10018 because of the previous catch-all memset).
10020 I left the memset, because I do not know if applications expect
10021 the runtime to clear this region.
10025 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10026 Clear the error before returning to unmanaged code to prevent the
10027 runtime from being confused later on (fixes 80420).
10028 (ves_icall_type_from_name): Always call mono_loader_clear_error
10029 after parsing a type that could have failed.
10030 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
10032 * loader.c (mono_loader_clear_error): Fix indentation.
10034 2006-12-28 Martin Baulig <martin@ximian.com>
10036 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
10038 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10040 * reflection.c: patch from Rolf Bjarne Kvinge to fix
10041 getting a token for an EnumBuilder.
10043 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
10045 * reflection.c: be more careful in case resource generation
10046 fails to create the data array.
10048 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
10050 * sgen-gc.c: write barrier for clone and fix unregister handles.
10052 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
10054 * reflection.c: some fixes needed in the generics code for the moving GC.
10056 2006-12-22 Robert Jordan <robertj@gmx.net>
10058 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
10059 account. Fixes bug #80299.
10061 2006-12-21 Raja R Harinath <rharinath@novell.com>
10063 Fix WaitHandle usage in delegates.
10064 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
10065 * object.c (mono_wait_handle_new): Use the property set method to
10066 initialize the handle.
10067 (mono_wait_handle_get_handle): New.
10068 * threadpool.c (mono_async_invoke): Use it.
10069 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
10071 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
10073 2006-12-21 Jonathan Chambers <joncham@gmail.com>
10075 * marshal.c (emit_marshal): Call emit_marshal_variant and
10076 emit_marshal_com_interface when applicable.
10077 (emit_marshal_variant, emit_marshal_com_interface): Add
10078 methods for this case and remove if's from emit_marshal_object.
10080 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
10082 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
10084 2006-12-19 Jonathan Chambers <joncham@gmail.com>
10086 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
10087 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
10088 and GlobalFree on Windows. Remove FIXME.
10090 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
10092 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
10093 implementation for managed objects.
10095 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
10097 * object.c: implemented code to be used for checking
10098 that no reference field overlaps with non-references.
10100 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10102 * threadpool.c: fix queue code to be compatible with the
10105 2006-12-18 Miguel de Icaza <miguel@novell.com>
10107 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
10108 in structures by throwing ArgumentNullException.
10110 (emit_marshal_safehandle): Also when they are null parameters.
10112 (emit_marshal_safehandle): Add support for ref
10113 SafeHandles parameters
10115 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
10117 * profiler.c: updated to use the mono-dl API instead of
10120 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10122 * profiler.c: updated to use the mono-dl dynamic loading
10123 API instead of gmodule.
10125 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10127 * profiler.c: use readlink, older versions of glib don't have
10128 g_file_read_link ().
10130 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
10132 * profiler.c: try to detect the path to mono if libc fails to provide
10133 a useful name (bug #80286).
10135 2006-12-16 Raja R Harinath <rharinath@novell.com>
10138 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
10139 instance, use the generic type definition instead.
10140 (ves_icall_Type_GetNestedTypes): Likewise.
10141 * class.c (mono_class_create_generic): Always set the
10142 nested_classes of a generic instance to NULL, even if the generic
10143 type definition has nested types.
10145 2006-12-15 Jonathan Chambers <joncham@gmail.com>
10147 * marshal.c (mono_string_from_bstr): Revert previous Windows change
10150 2006-12-15 Miguel de Icaza <miguel@novell.com>
10152 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
10153 my arguments were in the wrong order. I also fixed the Windows
10154 version which seems to have had the same issue.
10156 (mono_free_bstr): On Unix, this is g_free.
10157 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
10158 conversions (for the tests in corlib to pass).
10160 2006-12-14 Miguel de Icaza <miguel@novell.com>
10162 * marshal.c (emit_ptr_to_object_conv): For now, ignore
10163 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
10164 exception if a ref SafeHandle in a struct has changed).
10166 (emit_struct_conv): Do not perform layout checks for classes
10167 derived from SafeHandle, as those are specially handled.
10169 (emit_object_to_ptr_conv): Add support for
10170 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
10172 (emit_marshal_safehandle): Implement conversion of return values
10173 of safehandles (MARSHAL_ACTION_CONV_RESULT).
10175 * threads.c: WaitHandle now is compiled with two different handles
10176 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
10179 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
10180 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
10181 these routines to cope with both kinds of fields.
10183 2006-12-12 Miguel de Icaza <miguel@novell.com>
10185 * metadata.c (mono_type_to_unmanaged): Handle the case where
10186 type->data.klass is a SafeHandle, and in that case, return the
10187 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
10188 MONO_MARSHAL_CONV_SAFEHANDLE.
10190 2006-12-11 Miguel de Icaza <miguel@novell.com>
10192 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
10193 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
10194 calling emit_marshal_object.
10196 (emit_marshal_safehandle): Implement marshalling of
10197 SafeHandle parameters (no ref support yet).
10199 (MarshalAction): Document the defines as I implement
10200 them for SafeHandle.
10202 (emit_marshal_object): indentation police.
10204 * class-internals.h: Define MonoSafeHandle.
10205 Add safehandle_class to MonoDefaults type.
10207 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
10208 list of classes to check for fields.
10210 * domain.c (mono_init_internal): Add SafeHandle to the list of
10211 mono_defaults loaded.
10213 2006-12-15 Raja R Harinath <rharinath@novell.com>
10216 * reflection.c (mono_reflection_bind_generic_parameters): If the
10217 generic type definition is a type builder, ensure that it is fully
10218 initialized before instantiating it. Kill some dead code.
10220 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10222 * object.c: clear the loader_error () before loading
10223 more metadata stuff (bug #80258).
10225 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
10227 * icall.c, icall-defs.h: type modifiers icalls for
10228 parameters and properties.
10230 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
10232 * object.c, icall.c: fixed warnings.
10234 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10236 * marshal.c: fixed a couple of leaks and coding style in a few places.
10238 2006-12-08 Dick Porter <dick@ximian.com>
10240 * process.c: Cope with NULL ProcessStartInfo arguments on windows
10241 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
10244 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
10246 * process.c: ProcessStartInfo may have only filename set and
10247 arguments can be NULL.
10249 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
10251 * icall.c: fix leak found by Robert Jordan.
10253 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10255 * marshal.c, marshal.h: generate managed method to access an element
10256 of a multi-dimensional array.
10258 2006-11-30 Paolo Molaro (lupus@ximian.com)
10260 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
10262 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10264 * icall.c: back out GetFields () fix until the serialization code is
10265 fixed to not depend on the incorrect behaviour.
10267 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
10269 * profiler.c: provide defaults if none are set.
10271 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
10273 * Makefile.am, attrdefs.h: new public header file with
10274 constants for attributes for use by embedders.
10276 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
10278 * icall.c: GetFields () fix for bug #80064.
10280 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
10282 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
10283 removed long unused icalls.
10285 2006-11-27 Jonathan Chambers <joncham@gmail.com>
10288 (mono_marshal_emit_managed_wrapper): Level of indirection for
10289 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
10290 can be generated without a delegate class.
10291 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
10293 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
10295 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10297 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
10300 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10302 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
10303 icall-def.h: added icalls needed by System.GC.
10305 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
10307 * loader.c: ensure the class in catch clauses is handled
10308 correctly for generics methods (fixes bug#79980).
10310 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
10312 * monitor.h, monitor.c: added mono_locks_dump () function
10313 to help debug deadlocks involving managed locks.
10315 2006-11-13 Dick Porter <dick@ximian.com>
10317 * file-io.c (get_file_attributes): If the file is a symlink try
10318 and get the stat data for the target, but also add the
10319 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
10320 the specs for the windows symlink support, but will probably have
10321 to be reworked when I have test data from a vista machine. Fixes
10324 2006-11-13 Dick Porter <dick@ximian.com>
10326 * gc.c (mono_domain_finalize):
10327 * marshal.c (mono_delegate_begin_invoke):
10328 * threadpool.c (socket_io_init, mono_thread_pool_init)
10329 (mono_thread_pool_finish):
10330 * monitor.c (mono_monitor_try_enter_internal):
10331 * threads.c (mono_thread_resume, mono_thread_init)
10332 (mono_thread_suspend_all_other_threads)
10333 (mono_thread_execute_interruption):
10334 * appdomain.c (mono_domain_unload): Check for NULL error returns
10335 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
10338 2006-11-11 Miguel de Icaza <miguel@novell.com>
10341 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
10342 Only close the handle if the value of the handle is not
10343 INVALID_HANDLE_VALUE. This just makes the process a bit more
10346 Improvement for #75733, so that we do not run into this problem.
10349 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
10350 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
10351 internal variables. Fixes #79462
10354 2006-11-09 Dick Porter <dick@ximian.com>
10356 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
10357 Use poll() not select(). Fixes bug 79397.
10359 2006-11-09 Raja R Harinath <rharinath@novell.com>
10362 * assembly.c (mono_assembly_load_from_full): Check that the given
10363 image has an assembly manifest.
10365 2006-11-09 Ankit Jain <jankit@novell.com>
10367 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
10368 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
10369 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
10371 2006-11-07 Dick Porter <dick@ximian.com>
10373 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
10374 Put the old resolver behaviour back for pre-2.0 profiles.
10376 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
10378 * threadpool.c: precise GC and locking fixes.
10380 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
10382 * class.c: don't load types that have an explicit unaligned
10383 managed reference. Provide better info in the TypeLoad exception.
10384 Part of the fix for bug #79744.
10385 * object.c: use the correct check for class type load issues.
10387 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
10389 * class.c: enforce alignment of fields with managed references
10390 even when Pack=1 is forced by the user (bug #77788).
10392 2006-11-03 Dick Porter <dick@ximian.com>
10394 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
10395 If the address reverse lookup fails, return it as the hostname
10396 anyway. Fixes bug 79721.
10398 2006-11-03 Dick Porter <dick@ximian.com>
10400 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
10401 Fix build on Windows.
10403 2006-11-02 Dick Porter <dick@ximian.com>
10406 * object-internals.h:
10407 * exception.c (mono_get_exception_thread_interrupted):
10408 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
10411 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
10412 Check for pending Thread.Interrupt.
10414 2006-10-27 Massimiliano Mantione <massi@ximian.com>
10415 * loader.c: Fixed bug 79684.
10417 2006-10-27 Dick Porter <dick@ximian.com>
10419 * file-io.c (get_file_attributes): Force symlinks to directories
10420 to be returned as a regular file. Fixes bug 79733.
10421 2006-10-26 Dick Porter <dick@ximian.com>
10423 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
10424 CreateFile to open a directory then we need to set the
10425 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
10427 2006-10-23 Zoltan Varga <vargaz@gmail.com>
10429 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
10432 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10434 * sgengc.c: small cleanup of timer code.
10436 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
10438 * sgen-gc.c: fix some warnings and start adding support for
10439 complete object removal on domain unload.
10441 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
10443 * assembly.c: build_assembly_name should not consider a version
10444 number without build or revision number invalid. Fixes bug #79715.
10446 2006-10-18 Jonathan Chambers <joncham@gmail.com>
10448 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
10449 call kernel32 function OutputDebugString directly.
10451 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
10453 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
10455 * reflection.c: small cleanup, using a function to insert a MonoString
10456 in the string heap.
10458 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
10460 * reflection.c: moving GC fixes.
10462 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
10464 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
10465 all the objects with finalizers belonging to an unloading appdomain.
10467 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
10469 * sgen-gc.c: added ability to allocate even when the nursery is fully
10470 pinned and fixed a couple of bugs.
10472 2006-10-15 Zoltan Varga <vargaz@gmail.com>
10474 * threads.h: Revert the last change for now.
10476 * threads.h (mono_thread_get_pending_exception): Rename this to
10477 mono_thread_get_undeniable_exception ().
10479 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
10481 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
10482 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
10483 when fname does not refer to valid assembly. This result in a more
10484 meaningful error message.
10485 * exception.c: added mono_get_exception_bad_image_format2 which
10486 constructs a BadImageFormatException using the ctor taking a custom
10487 message and the file name. Passing in a NULL msg results in a default
10489 * exception.h: define mono_get_exception_bad_image_format2 function.
10490 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
10491 when file name pointed to an invalid IL image. Use
10492 mono_get_exception_file_not_found2 to construct FileNotFoundException,
10493 as this results in a more meaningful error message.
10495 2006-10-15 Zoltan Varga <vargaz@gmail.com>
10497 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
10500 2006-10-12 Zoltan Varga <vargaz@gmail.com>
10502 * metadata.c (mono_type_size): Change the align parameter to guint32 for
10503 consistency with the other _size functions.
10504 (mono_type_stack_size): Ditto.
10506 * class.c object.c icall.c: Fix warnings caused by the above change.
10508 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
10510 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
10512 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
10514 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
10516 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
10517 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
10518 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
10519 threadpool.h, threads-types.h: mark more internal functions.
10521 2006-10-11 Dick Porter <dick@ximian.com>
10523 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
10524 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
10525 reproduce the bug even before applying the fix.)
10527 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
10529 * reflection.c: allow retrieving attributes for arguments in generic
10530 methods (bug #79241).
10532 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
10534 * debug-mono-symfile.c: properly check fopen () result (found by
10537 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
10539 * reflection.c: make error message clearer and fixed two
10540 issuelets found by Coverity.
10542 2006-10-10 Zoltan Varga <vargaz@gmail.com>
10544 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
10546 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
10548 * object-internals.h, gc-internal.h, profiler-private.h:
10549 mark internal functions.
10551 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
10553 * reflection.c: put data in the text section.
10554 * icall.c: recognize more types in type_from_typename ().
10555 * process.c, marshal.c: added some GC FIXMEs.
10557 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
10559 * loader.c: check for NULL before initializing.
10561 2006-10-09 Zoltan Varga <vargaz@gmail.com>
10563 * gc.c (finalizer_thread): Use a non-alertable wait here.
10565 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
10566 until the correct solution is found.
10568 2006-10-06 Zoltan Varga <vargaz@gmail.com>
10570 * reflection.c (mono_module_get_object): Avoid an assert when operating on
10571 modules with no metadata. Fixes #79596.
10573 * image.c (load_metadata_ptrs): Put back the error message when
10574 the #- heap is encountered since the support is not complete yet.
10576 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
10578 * gc.c: do not allow the user to SuppressFinalize () a
10579 delegate because it would leak the trampoline if present.
10581 2006-10-06 Zoltan Varga <vargaz@gmail.com>
10583 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
10586 2006-10-05 Zoltan Varga <vargaz@gmail.com>
10588 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
10590 * metadata.c (mono_metadata_get_param_attrs): Ditto.
10592 * row-indexes.h: Add definitions for *Ptr tables.
10594 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
10596 * metadata.c (mono_metadata_translate_token_index): New helper function to
10597 translate table indexes used in uncompressed metadata.
10598 (mono_metadata_decode_table_row): Ditto.
10599 (mono_metadata_decode_table_row_col): Ditto.
10601 * metadata.c: Add table schema for *Ptr tables.
10603 * class.c loader.c: Use the new helper function to access the affected metadata
10606 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
10609 2006-10-04 Zoltan Varga <vargaz@gmail.com>
10611 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
10612 sequences which can be unbounded in size. Fixes #79583.
10614 2006-10-02 Zoltan Varga <vargaz@gmail.com>
10616 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
10617 static initialization.
10619 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
10621 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
10623 * domain.c (mono_domain_free): Free up type_init_exception_hash.
10625 * object.c (mono_runtime_class_init): Implement correct semantics when a static
10626 ctor fails, i.e. throw the same exception on subsequent accesses.
10628 2006-09-0 Jonathan Chambers <joncham@gmail.com>
10630 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
10631 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
10632 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
10633 Handle marshalling of interfaces and VARIANTs contained in structs.
10635 Code is contributed under MIT/X11 license.
10637 2006-09-30 Zoltan Varga <vargaz@gmail.com>
10639 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
10641 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
10644 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10646 * console-io.c: ignore previous SIGINT handler.
10648 2006-09-27 Zoltan Varga <vargaz@gmail.com>
10650 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
10651 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
10652 #79460, #79461, #79485.
10654 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
10656 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
10659 2006-09-26 Zoltan Varga <vargaz@gmail.com>
10661 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
10662 could be generated from it.
10664 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
10666 * rand.c: fix read loop to correctly handle EINTR.
10668 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10670 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
10671 internal calls are defined to keep methods closer to the declaring
10672 type and allow a significant reduction in runtime relocations and
10675 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
10677 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
10678 exception message to have FileNotFoundException use the default
10679 assembly load error message. Fixes bug #79426.
10680 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
10682 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10684 * threadpool.c: (start_thread_or_queue) use the root domain when
10685 creating the thread instead of the async object one.
10687 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
10689 * class.c, object.c, class-internals.h, reflection.c:
10690 for arrays, store element_size inside MonoClass (speedup
10691 for array object creation).
10693 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
10695 * icall.c: fixed CodeBase to use the file name and not the module
10698 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
10700 * mono-debug.c, mono-debug.h: export find_method as
10701 mono_debug_find_method ().
10703 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10705 * debug-helpers.c, class-internals.h: added a few functions useful
10706 when debugging under gdb.
10708 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10710 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
10711 characters that need special handling.
10713 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
10715 * mono-config.c: make the os/cpu specification more flexible,
10716 allowing lists and negation.
10718 2006-09-18 Jonathan Chambers <joncham@gmail.com>
10720 * marshal.c: COM Interop fixes. Handle case where method->klass.
10721 is interface. Handle BSTR/MonoString when null. Use CDECL as
10722 calling convention on non-windows platforms. This is for
10723 compatibility with XPCOM and MainWin COM.
10725 Code is contributed under MIT/X11 license.
10728 2006-09-18 Zoltan Varga <vargaz@gmail.com>
10730 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
10731 correctly. Fixes #79217.
10733 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
10735 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
10737 * mono-config.c: allow both an os and cpu attribute for dllmap
10738 and dllentry elemnets to enable a single config file to be used
10739 for multiple architectures.
10741 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
10743 * loader.c: MonoLoaderError was cleared too soon on load failure.
10746 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
10748 * icall.c: use the defining class vtable when accessing a
10749 static field, not a pobblibly derived class.
10751 2006-09-17 Zoltan Varga <vargaz@gmail.com>
10753 * icall.c string-icalls.c: Remove references to unicode.h.
10755 * unicode.h unicode.c Makefile.am: Remove these unused source files.
10757 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
10759 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
10760 indicating the image where custom marshaller types should be looked up.
10761 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
10762 custom marshallers, instead of corlib. Fixes #79425.
10764 2006-09-14 Zoltan Varga <vargaz@gmail.com>
10766 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
10768 2006-09-14 Jonathan Chambers <joncham@gmail.com>
10770 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
10771 Implement Environment.ProcessorCount.
10773 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
10774 Implement Environment.ProcessorCount.
10777 Add Environment.ProcessorCount icall.
10779 Patch by Jason McFall.
10781 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10783 * assembly.c: don't append .exe/.dll when the filename already contains
10784 one of those extensions.
10786 2006-09-12 Martin Baulig <martin@ximian.com>
10788 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
10789 to array interfaces.
10791 2006-09-11 Martin Baulig <martin@ximian.com>
10793 * reflection.c (mono_image_build_metadata): Create the
10794 MethodImpl's after emitting all types and methods, so we don't
10795 need another fixup pass for them.
10797 2006-09-11 Zoltan Varga <vargaz@gmail.com>
10799 * class.c (mono_class_from_name_case): Fix regression introduced by the last
10802 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
10804 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
10807 2006-09-10 Zoltan Varga <vargaz@gmail.com>
10809 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
10810 args is not set. Fixes #78926.
10812 2006-09-08 Zoltan Varga <vargaz@gmail.com>
10814 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
10816 * image.c (load_class_names): Move this to class.c, and rename it to
10817 'mono_image_init_name_cache'.
10818 (load_modules): Fix a warning.
10820 * class.c icall.c image.c: Initialize image->name_cache lazily.
10822 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
10823 on its name using information in the AOT file.
10825 * class.c (mono_class_from_name): Use the new hook function.
10827 2006-09-06 Zoltan Varga <vargaz@gmail.com>
10829 * reflection.c (mono_param_get_objects): Handle enum default parameter values
10832 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
10835 2006-09-06 Martin Baulig <martin@ximian.com>
10837 * icall.c (mono_lookup_internal_call): Small fix.
10839 2006-09-05 Raja R Harinath <rharinath@novell.com>
10841 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
10844 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
10846 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
10847 when --debug is specified.
10849 2006-09-04 Zoltan Varga <vargaz@gmail.com>
10851 * class.c (setup_generic_array_ifaces): Fix a warning.
10853 2006-09-04 Miguel de Icaza <miguel@novell.com>
10855 * Temporarily remove the patch to assemly.c that checks the
10856 assembly versions as it breaks our gacutil.
10858 2006-09-03 Zoltan Varga <vargaz@gmail.com>
10860 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
10862 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
10865 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
10866 created using the default ctor. Fixes #79152.
10867 (mono_string_builder_to_utf16): Ditto.
10869 2006-09-01 Martin Baulig <martin@ximian.com>
10871 Fix handling of the generic array interfaces.
10873 * class-internals.h
10874 (MonoDefaults): Removed `generic_array_class' and added
10875 `generic_ilist' class.
10878 (mono_bounded_array_class_get): Add the new generic array interfaces.
10879 (setup_generic_array_ifaces): New static method; create vtable
10880 entries for each method in the generic array interfaces.
10883 (select_container): Allow "parent-less" generic methods.
10886 (mono_marshal_get_generic_array_helper): New public method.
10889 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
10890 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
10891 moved the interncall into System.Array.
10893 2006-09-01 Raja R Harinath <rharinath@novell.com>
10895 A few more cases of avoiding work on types with ->byref set.
10896 Has the real fix for #79238
10897 * icall.c (is_generic_parameter): New helper.
10898 (ves_icall_Type_GetGenericParameterPosition): Use it.
10899 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
10900 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
10901 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
10902 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
10904 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
10906 (ves_icall_Type_get_IsGenericInstance): Likewise.
10907 (ves_icall_Type_get_IsGenericType): Likewise.
10909 2006-09-01 Zoltan Varga <vargaz@gmail.com>
10911 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
10914 * mempool.h (mono_mempool_get_allocated): New helper function.
10916 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
10919 * mempool.c: Fix warnings and the calculation of stats.
10921 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
10923 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
10925 * loader.c (mono_get_method_from_token): Update method_count stat.
10927 * class-internals.h (MonoStats): Add some stats.
10929 2006-08-31 Robert Jordan <robertj@gmx.net>
10931 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
10932 with managed variants.
10933 All code is contributed under the MIT/X11 license.
10935 2006-08-31 Zoltan Varga <vargaz@gmail.com>
10937 * reflection.c (reflection_methodbuilder_to_mono_method): Set
10938 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
10940 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
10942 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
10943 with cycles in classes.
10945 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
10947 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
10948 missing a [MarshalAs] directive. Fixes #79203.
10950 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
10951 klass->marshal_info. Fixes #79217.
10953 2006-08-30 Martin Baulig <martin@ximian.com>
10955 Committing a patch from Joachim Ante <joe@otee.dk>:
10956 Add support for binary data symbol stores.
10958 * debug-mono-symfile.c
10959 (mono_debug_open_mono_symbol_file): Renamed into
10960 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
10964 (mono_debug_open_image): Added `raw_contents' and `size' args.
10965 (mono_debug_init_2_memory): New public function.
10967 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
10969 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
10971 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10973 * appdomain.c: implement support for ShadowCopyFiles.
10975 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
10977 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
10978 when value is NULL (and should remove CID #51).
10980 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10982 * image.c: moved 2 functions to ../utils.
10984 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10986 * gc.c: cope with the target object of a GC handle being NULL
10989 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10991 * class.c: recursively check parent's explicit implementations
10992 of interface methods (fixes bug #79125).
10994 2006-08-19 Miguel de Icaza <miguel@novell.com>
10996 * filewatcher.c: Avoid warnings when building, do not redefine
10997 constants that are defined.
11001 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11003 * image.c: don't fail when the link points to an absolute path.
11005 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
11007 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
11010 2006-08-17 Miguel de Icaza <miguel@novell.com>
11012 * image.c (full_path): A new method used to obtain the actual path
11013 of an assembly even in the presence of symbolic links.
11015 This is necessary for the case where we are running a binary that
11016 has been GACed, but we are using the "published" path name
11017 ($prefix/mono/1.0/blah.exe) which happens to point to the real
11020 This was the source of the failure for the `xsp' command with the
11021 recent AppDomain changes, as far as the runtime was concerned,
11022 there were two different assemblies: $prefix/mono/1.0/blah.exe and
11023 $prefix/mono/gac/blah/version/blah.exe.
11025 (do_mono_image_open): use full path
11027 2006-08-17 Zoltan Varga <vargaz@gmail.com>
11029 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
11031 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
11033 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
11034 domain_id is supplied. Fix CID #241 and corlib's unit tests.
11036 2006-08-17 Zoltan Varga <vargaz@gmail.com>
11038 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
11039 small structures. Fixes #78990.
11041 2006-08-17 Zoltan Varga <vargaz@gmail.com>
11043 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
11045 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
11047 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11050 * marshal.c: don't load all the assemblies from a domain into newly
11051 created ones. The new domains might have different rules and load
11052 assemblies from different locations. Fixes bug #76757.
11054 Patch by Lluis. Conflicts resolved by Brian Crowell.
11056 2006-08-16 Alp Toker <alp@atoker.com>
11058 * socket-io.c: First half of the fix for #79084.
11059 Set sa_size to the length of the content, not that of the struct.
11060 Don't add NULL suffix to the content, this should be done in
11061 managed code if needed.
11063 2006-08-14 Raja R Harinath <rharinath@novell.com>
11066 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
11067 mono_metadata_parse_type returns NULL.
11069 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
11071 * normalization-tables.h : new file for string normalization data.
11072 * locales.c, locales.h, icall.c :
11073 added load_normalization_resource() for string normalization,
11075 * Makefile.am : added normalization-tables.h to the sources.
11077 2006-08-13 Zoltan Varga <vargaz@gmail.com>
11079 * marshal.c: Add more helper functions to reduce code duplication and use them
11082 2006-08-12 Zoltan Varga <vargaz@gmail.com>
11084 * marshal.c: Fix non-x86 stdcall warnings.
11086 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
11089 2006-08-11 Jonathan Chambers <joncham@gmail.com>
11091 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
11092 type check on multi-dimensional arrays. Fixes #79000.
11094 2006-08-10 Jonathan Chambers <joncham@gmail.com>
11096 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
11097 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
11098 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
11099 * class-internals.h: add is_com_object to class structure.
11100 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
11101 null checks to COM object marshalling. Fix .ctor call on RCW.
11102 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
11104 All code is contributed under the MIT/X11 license.
11106 2006-08-09 Dick Porter <dick@ximian.com>
11108 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
11109 racing mono_monitor_allocator_lock() somewhere, so don't delete
11110 the critical section for now. Found by running and exiting
11113 2006-08-10 Zoltan Varga <vargaz@gmail.com>
11115 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
11116 (ves_icall_System_ComObject_FindInterface): Ditto.
11117 (ves_icall_System_ComObject_CacheInterface): Ditto.
11119 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
11120 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
11122 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11124 * threadpool.c: treat pipes from process asynchronous reads as sockets
11125 when reading from them, so we get select/poll or epoll to wait for
11128 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
11130 * loader.c: Fix a typo (CID #233) in the null check.
11132 2006-08-07 Zoltan Varga <vargaz@gmail.com>
11134 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
11135 Hopefully fixes #78949.
11137 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
11138 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
11139 bytes. Fixes #78972.
11141 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11143 * filewatcher.c: we need to set errno here.
11145 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11147 * filewatcher.c: let Win32Exception get the error value.
11149 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11151 * filewatcher.c: translate errno into win32 errors for Win32Exception
11152 to know what happened.
11154 2006-08-01 Zoltan Varga <vargaz@gmail.com>
11156 * threadpool.c: Fix more warnings.
11158 * assembly.c (search_loaded): Fix warnings.
11160 * threadpool.c (mono_thread_pool_finish): Fix warnings.
11161 (mono_async_invoke): Ditto.
11163 2006-07-28 Jonathan Chambers <joncham@gmail.com>
11165 * object.c (mono_remote_class_vtable): Need to create proxy vtable
11166 entries for __ComObject type in addition to ComImport types.
11167 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
11170 All code is contributed under the MIT/X11 license.
11172 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
11174 * image.c: avoid tentative loading of modulerefs that contain
11175 no metadata (P/Invoke library names).
11177 2006-07-28 Dick Porter <dick@ximian.com>
11179 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
11180 mono_loader_lock() somewhere, so don't delete the critical section
11181 for now. Found by running and exiting monodevelop.
11183 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11185 * filewatcher.c: define the inotify syscalls when we're building on
11186 linux and have sys/syscall.h. The build system might not have support
11187 for inotify but the target system might have it.
11189 2006-07-26 Miguel de Icaza <miguel@novell.com>
11191 * domain.c: Documentation updates.
11193 * loader.c (mono_free_method): Do not release the method
11194 information if we are being profiled, as profilers will use this
11195 information at shut down to present some data to the user.
11197 This is needed so that the profiler does not crash, as the
11198 profiler tends to keep MonoMethods around, and they might become
11199 invalid if we free these.
11201 (mono_get_method_constrained): Return the original CIL stream
11202 method as well, so verification can be performed against it.
11204 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11206 * filewatcher.[ch]: support for inotify file system watcher.
11207 * icall.c: add new internal calls for the inotify file system watcher.
11209 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11211 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
11214 2006-07-20 Dick Porter <dick@ximian.com>
11216 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
11219 2006-07-20 Dick Porter <dick@ximian.com>
11221 * threads.c (start_wrapper): Do the thread cleanup while we still
11222 hold a reference to its object. Fixes bug 78123.
11224 2006-07-18 Kornél Pál <kornelpal@gmail.com>
11226 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
11227 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
11228 "managed-to-managed".
11229 * icall.c: Redirect string constructors that take sbyte* to
11230 ves_icall_System_String_ctor_RedirectToCreateString.
11231 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
11232 to CreateString () methods with matching signature.
11233 * reflection.c: Use original security informations for
11234 MONO_WRAPPER_MANAGED_TO_MANAGED.
11235 * security-manager.c: Use original security informations for
11236 MONO_WRAPPER_MANAGED_TO_MANAGED.
11237 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
11238 that is a placeholder and only its address should be used.
11239 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
11240 that is a placeholder and only its address should be used.
11242 2006-07-15 Jonathan Chambers <joncham@gmail.com>
11244 Begin implementing COM Interop.
11245 * appdomain.c: Increment corlib version.
11246 * class.c: Set ComImport classes' parent to __ComObject.
11247 * loader.c: Mark cominterop methods as such.
11248 * domain.c: Add __ComObject class to MonoDefaults structure.
11249 * image.c: Add 2 hashtables to the image for COM Interop related methods
11250 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
11251 using the mempool allocator
11253 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
11254 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
11255 declaration for mono_metadata_type_dup_mp.
11257 * debug-helpers.c: Added strings for two additional wrapper types
11258 * object.c: Create proxy objects for ComImport classes
11259 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
11260 and added __ComObject class to MonoDefaults structure.
11262 * object-internals.h: Finish MonoRealProxy definition, and add definition of
11263 MonoComInteropProxy and MonoComObject.
11265 * marshal.c: Added support for COM Interop
11266 (signature_cominterop): Converts managed signature to corresponding
11267 unmanaged COM signature.
11268 (cominterop_get_function_pointer): gets unmanaged function pointer via
11270 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
11271 (cominterop_get_method_interface): returns interface type that method is defined on
11272 (mono_mb_emit_cominterop_call): emits native call to function pointer
11274 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
11275 that matches signature of unmanaged function.
11276 (cominterop_get_native_wrapper): wrapper around adjusted method call.
11277 (cominterop_get_invoke): forwards call from proxy to __ComObject
11278 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
11279 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
11280 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
11282 * marshal.h: Added Marshal icall declarations.
11283 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
11284 so we can access them in finalizer
11286 2006-07-14 Dick Porter <dick@ximian.com>
11288 * object.c (mono_type_initialization_cleanup): Fix a race
11289 condition by temporarily commenting out the critical section
11292 2006-07-14 Zoltan Varga <vargaz@gmail.com>
11294 * reflection.c (create_custom_attr): Fix some warnings.
11295 (create_custom_attr_data): Ditto.
11296 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
11297 types. Fixes #78855.
11299 2006-07-11 Zoltan Varga <vargaz@gmail.com>
11301 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
11303 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
11305 2006-07-08 Zoltan Varga <vargaz@gmail.com>
11307 * reflection.c (resolve_object): Add support for DynamicMethod.
11309 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
11310 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
11312 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
11314 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
11315 don't leak GPtrArray's pdata has we have no use (nor free) for it.
11317 2006-07-01 Zoltan Varga <vargaz@gmail.com>
11319 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
11322 2006-06-30 Raja R Harinath <rharinath@novell.com>
11324 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
11325 slightly: remove a shadow local variable.
11327 2006-06-29 Raja R Harinath <rharinath@novell.com>
11329 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
11330 definition that introduces the virtual function slot.
11331 Also fix Coverity #105.
11333 2006-06-29 Zoltan Varga <vargaz@gmail.com>
11335 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
11336 for dynamic assemblies. Fixes #78724.
11338 2006-06-28 Zoltan Varga <vargaz@gmail.com>
11340 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
11343 2006-06-21 Martin Baulig <martin@ximian.com>
11346 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
11349 2006-06-21 Zoltan Varga <vargaz@gmail.com>
11351 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
11353 2006-06-20 Raja R Harinath <rharinath@novell.com>
11355 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
11357 * class.c (mono_class_create_from_typespec): Add 'context' argument.
11358 Inflate result if necessary.
11359 (mono_class_get_full): Remove old version. Rename from
11360 'mono_class_get' and add 'context' argument. Pass it to
11361 ..._create_from_typespec.
11362 (mono_class_get): New. Simple wrapper to mono_class_get_full.
11363 (mono_ldtoken): Revert change below.
11365 2006-06-20 Martin Baulig <martin@ximian.com>
11367 * class.c (mono_ldtoken): Don't pass the generic context to
11368 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
11370 2006-06-15 Zoltan Varga <vargaz@gmail.com>
11372 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
11373 and later freeing it. Fixes #78638.
11375 2006-06-15 Miguel de Icaza <miguel@novell.com>
11377 * icall.c (mono_class_get_throw): Revert over-zealous error
11378 throwing, the caller for mono_class_get_throw will cope with
11379 errors when classes are not properly initialized already.
11381 The code still copes with loader exceptions though.
11383 Fixes the regression in reftype1 and reftype3 from the CAS tests.
11385 2006-06-14 Miguel de Icaza <miguel@novell.com>
11387 Fixes the `make run1' version of RuntimeAbort (to be commited,
11388 source is in Bugzilla).
11390 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
11391 FALSE on class loading failure instead of returning true.
11393 * class.c (mono_class_create_from_typedef): It is possible for
11394 mono_metadata_interfaces_from_typedef_full to fail if a class is
11395 not found, cope with this.
11398 2006-06-14 Dick Porter <dick@ximian.com>
11401 * process.c: Fix a bunch of signed/unsigned warnings from gcc
11404 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
11406 * culture-info-table.h : oops, forgot to make it nsync with r61548.
11408 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
11410 * icall.c: Another fix for building mono in Visual Studio.
11412 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
11414 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
11416 2006-06-09 Martin Baulig <martin@ximian.com>
11418 * debug-mono-symfile.c: Put this back and really fix it this
11419 time. Sorry for all the trouble.
11421 2006-06-08 Zoltan Varga <vargaz@gmail.com>
11423 * icall.c (mono_class_get_throw): Fix a warning.
11424 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
11425 ReflectionTypeLoadException if needed. Fixes #78606.
11427 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
11428 (mono_class_init): Ditto.
11430 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
11431 ref_only exceptions.
11432 (mono_loader_clear_error): Make this work even if there is no error.
11434 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
11436 * object-internals.h marshal.c marshal.h icall.c: Implement method
11437 Marshal.GetComSlotForMethodInfo using internal call.
11439 2006-06-07 Zoltan Varga <vargaz@gmail.com>
11441 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
11442 a function for signalling it.
11444 * class.c (mono_class_from_typeref): Use the new kind of loader error when
11445 a referenced assembly is not found.
11447 * loader.c (mono_loader_error_prepare_exception): Add support for
11448 LOADER_ERROR_ASSEMBLY. Fix formatting.
11450 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
11452 * domain.c appdomain.c class-internals.h marshal.c: Add support
11453 for VARIANT marshalling on windows and increment corlib version
11454 since Variant struct was added.
11456 2006-06-03 Miguel de Icaza <miguel@novell.com>
11458 * debug-mono-symfile.c: Revert Martin's previous patch which broke
11459 stack trace line information:
11461 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
11462 (Martin) when looking up B which is between A and C, return A not C.
11466 Thanks to Alexander Olk for tracking this down.
11468 2006-06-02 Zoltan Varga <vargaz@gmail.com>
11470 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
11472 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
11473 avoid clobbering its value.
11474 (mono_string_to_lpstr): Fix a warning on windows.
11476 2006-05-31 Zoltan Varga <vargaz@gmail.com>
11478 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
11480 * reflection.c loader.c: Removed references to 'dummy' flag.
11482 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
11484 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
11485 it gets GC tracking.
11487 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
11490 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
11492 * marshal.c threadpool.c: Update callers of mono_async_result_new.
11494 * appdomain.c: Bump corlib version.
11496 2006-05-30 Zoltan Varga <vargaz@gmail.com>
11498 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
11499 CEE_STIND_REF when working with object references.
11501 2006-05-31 Zoltan Varga <vargaz@gmail.com>
11503 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
11506 2006-05-30 Miguel de Icaza <miguel@novell.com>
11508 * loader.c (method_from_memberref): Fix argument value for
11509 mono_loader_set_error_method_load (I was passing the MonoClass
11510 instead of the class name char *).
11512 2006-05-30 Zoltan Varga <vargaz@gmail.com>
11514 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
11515 CEE_STIND_REF when working with object references.
11517 2006-05-30 Martin Baulig <martin@ximian.com>
11519 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
11520 mono_method_full_name() change and replace the ':' with a '.'
11523 2006-05-30 Martin Baulig <martin@ximian.com>
11525 * debug-mono-symfile.c
11526 (mono_debug_symfile_lookup_location): Fix the algorithm:
11527 when looking up B which is between A and C, return A not C.
11529 2006-05-29 Martin Baulig <martin@ximian.com>
11532 (MonoDebugMethodInfo): Make the typedef public.
11533 (MonoDebugSourceLocation): New public struct.
11536 (mono_debug_source_location_from_address): Removed.
11537 (mono_debug_source_location_from_il_offset): Removed.
11538 (mono_debug_il_offset_from_address): Removed.
11539 (mono_debug_address_from_il_offset): Removed.
11540 (mono_debug_lookup_method): New public function.
11541 (mono_debug_lookup_source_location): New public function; replaces
11542 the old mono_debug_source_location_from_*() functions; see the
11543 inline documentation.
11544 (mono_debug_free_source_location): New public function.
11545 (mono_debug_print_stack_frame): New public function; see the
11546 inline documentation.
11548 * debug-mono-symfile.c
11549 (mono_debug_find_source_location): Renamed into
11550 mono_debug_symfile_lookup_location(); only take a
11551 `MonoDebugMethodInfo *' and an `offset' argument; added inline
11553 (mono_debug_find_method): Renamed into
11554 mono_debug_symfile_lookup_method().
11556 2006-05-27 Zoltan Varga <vargaz@gmail.com>
11558 * assembly.c (mono_assembly_open_full): Dont overwrite the status
11559 returned by mono_image_open_full ().
11561 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
11562 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
11565 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
11568 2006-05-27 Miguel de Icaza <miguel@novell.com>
11570 * class.c (mono_class_from_typeref): handle missing images
11571 earlier, deals with bug #78418. Refactor code;
11573 Fix a warning introduced in my previous commit (some stale code
11574 from before I revisited my patch).
11576 * class.c (mono_class_create_from_typedef): On failure, remove the
11577 class from the MonoImage->class_cache as the class is not
11578 initialized; Fixes the leak pointed out by Paolo.
11580 2006-05-25 Dick Porter <dick@ximian.com>
11582 * threads.c (mono_thread_cleanup): Build fix. Comment out the
11583 DeleteCriticalSections until I figure out which one may still be
11584 sometimes locked when mono_thread_cleanup is called.
11586 2006-05-24 Dick Porter <dick@ximian.com>
11588 * threads.c (mono_thread_cleanup): Move the threading cleanup out
11589 of mono_thread_manage and back into its own function, so it can be
11590 called after the finalizer thread has finished.
11592 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
11594 2006-05-24 Zoltan Varga <vargaz@gmail.com>
11596 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
11599 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
11600 with non-blittable elements.
11601 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
11603 2006-05-24 Martin Baulig <martin@ximian.com>
11605 * mono-debug-debugger.h (MonoDebuggerEvent): Added
11606 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
11608 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
11609 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
11610 `mono_debugger_event_handler' to NULL.
11612 2006-05-24 Martin Baulig <martin@ximian.com>
11614 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
11616 2006-05-24 Martin Baulig <martin@ximian.com>
11618 * mono-debug-debugger.h
11619 (mono_debugger_create_notification_function): Added
11620 `MonoCodeManager *' argument.
11622 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
11624 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
11626 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
11628 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
11629 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
11632 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
11634 * icall.c: precise GC support: objects can't be stored in unmanaged
11635 memory anymore, even if they are kept alive by other references: since
11636 they can move the GC needs to be able to always find them.
11638 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11640 * object.c: precise GC support for static fields. Support
11641 for moving GCs: write barriers and pinned allocation for interned
11644 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
11646 * domain.c, domain-internals.h: precise GC support for the MonoDomain
11649 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11651 * class.c, gc.c: sgen and precise GC updates.
11653 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
11655 * marshal.h, marshal.c: added write barrier wrapper and precise type
11658 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
11660 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
11663 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
11665 * reflection.c: precise and sgen GC updates.
11667 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
11669 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
11671 2006-05-22 Zoltan Varga <vargaz@gmail.com>
11673 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
11675 2006-05-20 Zoltan Varga <vargaz@gmail.com>
11677 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
11678 MONO_TYPE_OBJECT. Fixes #78462.
11680 2006-05-18 Zoltan Varga <vargaz@gmail.com>
11682 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
11683 and blittable types.
11685 2006-05-17 Miguel de Icaza <miguel@novell.com>
11687 * class.c (mono_class_get_exception_for_failure): Implement parts
11688 of a TODO: if the loader error is set (instead of the class
11689 error), we return a Loader exception that can be properly thrown
11692 This was exposed by some Winforms 2.0 code that I tried to run
11693 (Atsushi pointed me to it).
11695 2006-05-17 Zoltan Varga <vargaz@gmail.com>
11697 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
11698 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
11700 * marshal.c (emit_marshal_vtype): Add limited support for
11701 UnmanagedType.LPStruct. Fixes #78427.
11703 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
11704 Applied a patch from kangaroo to fix #77523.
11706 2006-05-17 Martin Baulig <martin@ximian.com>
11709 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
11710 (debugger_thread_created): Removed.
11711 (debugger_thread_exited): Removed.
11713 2006-05-15 Zoltan Varga <vargaz@gmail.com>
11715 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11717 * object-internals.h (MonoReflectionResource): Sync with managed version.
11719 2006-05-12 Wade Berrier <wberrier@novell.com>
11721 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
11723 2006-05-12 Zoltan Varga <vargaz@gmail.com>
11725 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
11726 functions try to allocate from the image mempool.
11728 2006-05-12 Dick Porter <dick@ximian.com>
11730 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
11732 2006-05-12 Lluis Sanchez <lluis@ximian.com>
11734 * object.c: The FieldGetter and FieldSetter methods require the full
11735 name of the class, not only the name. Fixes bug #78277.
11737 2006-05-11 Miguel de Icaza <miguel@novell.com>
11739 * loader.c (method_from_memberref): Do not pass the NULL klass to
11740 mono_loader_set_error_() methods. Pass the non-NULL value
11743 2006-05-11 Zoltan Varga <vargaz@gmail.com>
11745 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
11746 (mono_assembly_close): Null out assembly->image->references after freeing it.
11748 * image.c (mono_image_close): Free image->references.
11750 * reflection.c (mono_image_basic_init): Fix a small memory leak.
11752 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
11754 * marshal.c: In function mono_mb_add_local don't use the mb pointer
11755 before checking if it's NULL (g_assert).
11757 2006-05-10 Martin Baulig <martin@ximian.com>
11759 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
11760 I thought I already killed that two months ago, but now it somehow reappeared.
11762 2006-05-10 Martin Baulig <martin@ximian.com>
11764 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
11766 2006-05-10 Zoltan Varga <vargaz@gmail.com>
11768 * reflection.c: Allocate memory for dynamically created methods in the image
11771 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
11773 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
11774 don't use the ad pointer before checking if it's NULL (g_assert).
11776 2006-05-09 Zoltan Varga <vargaz@gmail.com>
11778 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
11779 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
11781 * marshal.c: Allocate all signatures from mempools.
11783 * marshal.c: Allocate some more signatures from mempools.
11785 2006-05-09 Miguel de Icaza <miguel@novell.com>
11787 * object.c (mono_load_remote_field): The code used to provide a
11788 temporary variable for returning results if the user did not
11789 provide a result pointer. But our temporary variable was allocted
11792 Fix calling code to always pass a result area. Coverity ID 103.
11794 2006-05-06 Zoltan Varga <vargaz@gmail.com>
11796 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
11797 value, not the old. Fixes #78312.
11798 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
11800 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
11801 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
11804 * assembly.c (mono_assembly_close): Free image->references.
11806 * assembly.c (mono_assembly_names_equal): Fix a warning.
11807 (mono_assemblies_cleanup): Cleanup more global data.
11809 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
11811 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
11812 ptr_cache and image->modules.
11814 * image.c (mono_image_init): Allocate array_cache lazily.
11816 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11818 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
11819 behavior was changed recently and has bad side effects.
11821 2006-05-05 Zoltan Varga <vargaz@gmail.com>
11823 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
11825 * assembly.c (mono_assembly_close): Remove a debug printf.
11827 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
11829 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
11830 to also allow for temporary references between mono_image_open ()/close ().
11832 * domain.c (get_runtimes_from_exe): Add a FIXME.
11834 2006-05-04 Zoltan Varga <vargaz@gmail.com>
11836 * marshal.c: Fix support for dynamic methods.
11838 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
11840 * marshal.c (mono_marshal_cleanup): New cleanup function.
11842 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
11845 * class.c (mono_class_init): Fix leaking class->nested_classes.
11847 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
11849 * image.c (mono_image_init): Initialize the new cashes.
11851 * image.c (mono_image_close): Destroy the new cashes.
11853 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
11855 * mempool.c (mono_mempool_strdup): New helper function.
11857 * class-internals.h: Add prototype for mono_loader_unlock ().
11859 * domain.c (mono_jit_info_table_find): Fix a warning.
11860 (mono_debugger_check_runtime_version): Ditto.
11862 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
11863 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
11864 functions to these modules.
11866 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
11869 * marshal.c (mono_free_bstr): Fix a warning.
11871 * assembly.c (mono_assembly_open_full): Fix another small leak.
11873 * object.c: Fix some unload leaks in the remoting code.
11875 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
11878 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
11880 * reflection.c: Fix some unload leaks in dynamic assemblies.
11882 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
11884 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
11885 * marshal.h: Add BSTR support on Win32
11886 * icall.c: Add BSTR icalls
11887 * metadata.h: Add BSTR enums
11889 2006-04-28 Miguel de Icaza <miguel@novell.com>
11891 Work to catch the crash from #76795 and turn it into an
11892 exception. As I stubbed out pieces of the VisualBasic support,
11893 I found a number of places where the code was failing and I added
11894 checks to those places.
11896 * metadata.c (do_mono_metadata_parse_generic_class): Make this
11897 function return a status code. If we fail to parse the signature
11898 from mono_metadata_parse_generic_inst, return FALSE.
11900 * loader.c (mono_get_method_from_token): If we fail to load the
11901 method (mono_class_get) return NULL.
11903 * (method_from_memberref): Return NULL if we are unable to parse
11904 the method signature
11906 (mono_loader_error_prepare_exception): Since we now use the
11907 loader_error flag internally to stop processing, and obtaining
11908 exceptions that might be thrown will walk this code path the
11909 proper way of going from a MonoLoaderError into a
11910 MonoException was convoluted. This new routine encapsulates the
11911 process of turning the error into an exception and *clearing* the
11914 2006-04-27 Miguel de Icaza <miguel@novell.com>
11916 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
11917 with missing assemblies), and to cope with:
11919 * Missing fieldref from a non-existing assembly.
11920 * Missing methodref from a non-existing assembly.
11922 The first batch of work to address *some* of the issues from 76661.
11924 * object.c (mono_class_create_runtime_vtable): If we fail to
11925 initialize the class raise the exception here.
11927 * metadata.c (mono_class_get_overrides_full): If any methods fail
11928 to load return the failure to the caller.
11930 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
11931 flagging assemblies that failed to load.
11933 Do not crash if we are unable to load the assembly.
11935 (mono_assembly_close): Do nothing with REFERENCE_MISSING
11938 * loader.c (mono_loader_set_error_type_load): Change the
11939 convention to always pass unallocated strings, so we make our own
11940 copies (I know our own code had duplicated strings before, but
11941 this keeps the normal conventions).
11942 (method_from_memberref): Call mono_loader_set_error_method_load
11943 for all possible failures of loading the class.
11944 Remove assert, turn into a loader error.
11946 (mono_loader_error_to_exception): Move this routine from mini
11947 (mini_loader_error_to_exception) there was no need to have that in
11950 * class.c (mono_class_from_typeref): If we were not able to load
11951 the assembly with mono_assembly_load_reference, call the
11952 mono_loader_set_error_type_load to register the problem.
11954 (mono_class_setup_fields): If we fail to load the type from
11955 mono_metadata_parse_type_full, call mono_class_set_failure and
11956 break from the loop.
11958 If class->exception_type is set, we do not layout the fields as
11959 that might crash the runtime, and instead return (from breaking
11960 from the previous loop).
11962 (mono_class_setup_vtable): This now returns a boolean indicating
11963 whether the table was properly setup. The decision is driven by
11964 mono_class_get_overrides_full which might run into non-existing
11967 (mono_class_init): Returns TRUE on success or FALSE if there was a
11968 problem in loading the type (incorrect assemblies, missing
11969 assemblies, methods, etc).
11971 When we call mono_class_setup_fields we also check for a potential
11972 error inside this call (either a class exception or a general
11975 (mono_class_create_from_typedef): If the parent fails to load
11976 (calling mono_class_get_full) return NULL.
11980 calls to mono_metadata_parse_type_full should be checked
11981 everywhere and set the mono_class_set_failure
11982 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
11984 The current patch checks the places where my manually constructed
11985 tests show the errors are showing up, but we should do it
11990 mono_class_init return values should be tested everywhere, like
11991 the previous case this is something that we should audit
11992 everywhere and not only on the cases exposed by the tests I
11995 2006-04-26 Miguel de Icaza <miguel@novell.com>
11997 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
11998 boolean parameter and instead pass the information on `options'
11999 parameter (FileOptions).
12001 * icall.c: Register the new signature for MonoIO.Open.
12003 * debug-helpers.c (dis_one): Trying to understand how coverity
12004 works. Fix Run 5, item 78.
12006 2006-04-26 Dick Porter <dick@ximian.com>
12008 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
12011 2006-04-25 Martin Baulig <martin@ximian.com>
12013 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
12015 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
12016 debugger_thread_created().
12017 (debugger_gc_push_all_stacks): Don't handle the main thread in any
12019 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
12020 (mono_debugger_finalize_threads): New function; undo the effects
12021 of mono_debugger_init_threads().
12022 (mono_debugger_create_all_threads): Removed.
12024 2006-04-24 Zoltan Varga <vargaz@gmail.com>
12026 * image.c (mono_image_close): Tidy up trace messages.
12028 * assembly.c (mono_assembly_close): Ditto.
12030 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
12031 no longer references an already freed assembly. Fixes #78168.
12033 2006-04-21 Dick Porter <dick@ximian.com>
12035 * threads.c (mono_thread_detach): Fix reference counting when
12038 2006-04-21 Zoltan Varga <vargaz@gmail.com>
12040 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
12043 2006-04-19 Zoltan Varga <vargaz@gmail.com>
12045 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
12046 (mono_type_to_stind): Ditto.
12048 * marshal.c: Use the new helper functions to simplify code.
12050 * image.c (mono_image_close): Add some code for help debug assembly unloading
12053 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
12056 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
12057 assembly was already loaded in another appdomain. Fixes #78083.
12059 2006-04-13 Zoltan Varga <vargaz@gmail.com>
12061 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
12062 referenced assemblies.
12063 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
12065 * domain.c (mono_domain_free): Add a trace message.
12067 * appdomain.c (add_assemblies_to_domain): Ditto.
12069 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
12072 2006-04-12 Zoltan Varga <vargaz@gmail.com>
12074 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
12076 2006-04-12 Martin Baulig <martin@ximian.com>
12078 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
12079 `USE_INCLUDED_LIBGC'.
12081 2006-04-12 Zoltan Varga <vargaz@gmail.com>
12083 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
12084 the patch contains ../ and a small directory name later. Hopefully fixes
12087 2006-04-10 Martin Baulig <martin@ximian.com>
12089 Clean up the debugger's thread-handling code.
12091 The debugger's thread-handling code has been moved from
12092 ../mini/debug-debugger.c to threads.c. We now iterate directly
12093 over the `threads' hash, keep track of exiting threads and also
12094 use proper locking.
12096 We can now debug XSP and XSP based applications with the debugger.
12098 * object-internals.h (MonoThread): Added `gpointer end_stack'.
12101 (MonoThreadCallbacks): Removed; this was only used by the debugger.
12102 (mono_install_thread_callbacks): Likewise.
12104 * threads.c (mono_thread_callbacks): Removed.
12105 (debugger_thread_created, debugger_thread_exited): New static functions.
12106 (start_wrapper): Call debugger_thread_created().
12107 (thread_cleanup): Call debugger_thread_exited().
12108 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
12109 (mono_debugger_init_threads): New public function.
12110 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
12111 iterate directly over the `threads' hash and also use proper locking.
12113 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
12115 * mono-debug-debugger.h
12116 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
12118 2006-04-10 Zoltan Varga <vargaz@gmail.com>
12120 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
12121 argument type=array. Fixes #78057.
12123 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
12125 * culture-info-table.h : regenerated. Fixed bug #69652.
12127 2006-04-07 Zoltan Varga <vargaz@gmail.com>
12129 * loader.c metadata.c: Reapply a variant r59116.
12131 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
12133 * class.c (mono_class_setup_interface_offsets): New internal function.
12135 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
12136 interfaces too. Fixes #77398.
12138 * reflection.c (encode_cattr_value): Add support for
12139 parameter type=object, argument type=array.
12140 (load_cattr_value): Ditto. Fixes #77916.
12142 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
12143 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
12145 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
12146 a byval char array and CharSet is Ansi.
12148 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
12150 2006-04-06 Zoltan Varga <vargaz@gmail.com>
12152 * metadata.c: Add some locking comments.
12154 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
12156 (mono_metadata_free_method_signature): Don't free the signature itself.
12158 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
12160 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
12161 reference the same MonoImage.
12162 (mono_assembly_load_from_full): Add an assert.
12164 2006-04-05 Zoltan Varga <vargaz@gmail.com>
12166 * image.c (mono_image_close): Don't put the image we are about to free into the
12167 loaded_images_guid_hash.
12169 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
12170 to reduce code duplication.
12172 * marshal.c: Register the native functions called by this module as icalls, to
12173 somewhat centralize the creation of MonoMethodSignature's.
12175 * loader.c (mono_method_signature): Add a cache for method signatures.
12177 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
12178 the parameter attributes of a method.
12179 (mono_metadata_parse_method_signature_full): Refactored the computation of
12180 parameter attributes into a separate function. Also avoid one allocation in
12183 * assembly.c (mono_assembly_close): Ditto.
12185 * image.c (mono_image_close): Log trace messages with INFO level.
12187 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
12189 * image.c reflection.c: Correct reference counting of image modules.
12191 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
12192 of this function from the image mempool.
12194 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
12195 to allow more cached types to be used.
12197 * mono-debug.c (mono_debug_add_method): Appled patch from
12198 David S. Miller <davem@sunset.davemloft.net>: Access
12199 minfo->lexical_blocks[] entry elements using read32().
12201 2006-04-04 Zoltan Varga <vargaz@gmail.com>
12203 * loader.c (mono_free_method): No longer free the method header for non-dynamic
12204 methods as it is allocated from the mempool.
12206 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
12209 * metadata-internals.h: Add comments describing the reference counting scheme
12210 used for MonoImage and MonoAssembly.
12212 * image.c assembly.c reflection.c: Rework reference counting of images and
12213 assemblies so they are freed when the runtime is shut down. Free some
12214 additional memory structures when an image is unloaded.
12216 2006-04-03 Zoltan Varga <vargaz@gmail.com>
12218 * class.c loader.c reflection.c: Allocate more data structures in
12221 2006-03-31 Miguel de Icaza <miguel@novell.com>
12224 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
12225 build on pre glib 2.4 systems.
12227 2006-03-31 Zoltan Varga <vargaz@gmail.com>
12229 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
12231 * icall.c: Fix some warnings.
12233 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
12235 * culture-info-table.h : regenerated.
12237 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
12239 * threads.c, object-internals.h, verify.c: changed the culture caching
12240 code to use a normal MonoArray for storage so the GC can keep track of
12241 them easily. Fixed bits of the cache logic, too and simplified the
12244 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
12246 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
12247 thread for non-Boehm GCs.
12249 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
12251 * domain.c, object.c, domain-internals.h: reduce the amount of memory
12252 needed to keep track of the data for static fields.
12254 2006-03-29 Raja R Harinath <rharinath@novell.com>
12257 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
12258 for interface classes. Use 'num_methods' instead.
12259 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
12260 before using '->vtable_size' field.
12262 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
12264 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
12265 doesn't contain managed pointers, so use a normal hashtable.
12267 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
12269 * reflection.c, class-internals.h, domain.c: fixed handling of types
12270 used as values for objects in custom attributes (bug #77915):
12272 2006-03-24 Martin Baulig <martin@ximian.com>
12274 * class.c (mono_class_setup_fields): Added support for generic
12275 instances; fixes #77580.
12277 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12279 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
12281 2006-03-24 Dick Porter <dick@ximian.com>
12283 * file-io.c (get_file_attributes): More stat macro breakage.
12286 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
12288 * profiler.c: added the file=filename option in the default profiler
12289 to output the profile data to filename.
12291 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12293 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
12296 2006-03-22 Martin Baulig <martin@ximian.com>
12298 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
12299 allocated `MonoClassField *' in `fb->handle'.
12301 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12303 * class.c, image.c, metadata-internals.h: implemented new mechanism to
12304 allocate interface ID to save memory and allow better ID reuse on
12305 appdomain unload. setup_generic_vtable () removal from Martin.
12307 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
12309 * object.h, appdomain.c, domain.c, exception.c, icall.c,
12310 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
12311 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
12312 write barriers for reference stores with managed objects accessed with
12313 C structures in the runtime and in embedding programs.
12315 2006-03-20 Raja R Harinath <rharinath@novell.com>
12317 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
12318 'interface_id' and 'max_interface_id' fields of MonoClasses
12319 representing open generic types.
12321 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
12323 * object.h, object.c, icall.c: added functions to deal with
12324 storing valuetypes that contain references in managed objects.
12325 * reflection.c, string-icalls.c, threads.c, marshal.c: small
12326 fixes and comments around uses of mono_array_addr ().
12328 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
12330 * object.h, icall.c, monitor.c: object.GetHashCode ()
12331 implementation that supports the moving garbage collector.
12333 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12335 * icall.c, threads-types.h, threads.c: implemented finalizer for
12336 LocalDataStoreSlot.
12338 2006-03-15 Zoltan Varga <vargaz@gmail.com>
12340 * metadata.c (mono_type_size): Add a fixme.
12341 (mono_type_stack_size): Ditto.
12343 * object-internals.h (MonoReflectionAssemblyBuilder): Added
12344 'type_forwarders' field.
12346 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
12347 attribute from net 2.0.
12349 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
12352 * class.c (mono_class_setup_fields): Fix a warning.
12354 * class.c (mono_class_from_name): Add support for assemblyref entries
12355 in the EXPORTEDTYPE table.
12357 * reflection.c: Add support for handling type forwarders under net 2.0.
12359 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12361 2006-03-14 Zoltan Varga <vargaz@gmail.com>
12363 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
12364 overwriting entries in ModuleBuild->types, also clean up the code
12365 a little. Fixes #77774.
12367 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12369 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
12370 load friend assembly info when present.
12372 2006-03-14 Raja R Harinath <rharinath@novell.com>
12374 Fix crasher on gtest-158.cs.
12375 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
12376 the return value if the MonoClass we want is yet in an
12377 inconsistent state.
12378 * class.c (mono_class_create_from_typedef): Add an comment
12379 explaining an order dependency between mono_class_setup_parent and
12380 mono_class_setup_mono_type.
12382 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
12384 * class.c: documentation updates and events bug fix.
12386 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
12388 * class.c: some cleanup, locking fixes.
12390 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12392 * class.c: fix the generics code to setup nested
12393 type info to the instantiated type (bug #77770).
12395 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
12397 * marshal.c: fixed a few type correctness issues.
12399 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12401 * loader.c: the Set/Get/Addrtess array methods should be public.
12403 2006-03-11 Zoltan Varga <vargaz@gmail.com>
12405 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
12407 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
12410 2006-03-10 Zoltan Varga <vargaz@gmail.com>
12412 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
12414 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
12416 * mempool.c (mono_mempool_alloc): Speed this up a bit.
12417 (mono_mempool_alloc0): Ditto.
12419 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12422 (create_object_from_sockaddr): it was allocating 4 extra bytes
12423 for the AF_UNIX data. Fixes bug #77747.
12425 2006-03-09 Zoltan Varga <vargaz@gmail.com>
12427 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
12429 2006-03-09 Dick Porter <dick@ximian.com>
12431 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
12432 Fixes bug 76966 again.
12434 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
12436 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
12438 * appdomain.c: Bumped corlib version to 48 (due to r57532)
12440 2006-03-07 Martin Baulig <martin@ximian.com>
12443 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
12445 2006-03-07 Martin Baulig <martin@ximian.com>
12448 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
12449 regression introduced in r56970; see gtest-252.cs.
12451 * loader.c (mono_get_method_constrained): Correctly handle generic
12452 methods; see gtest-253.cs.
12454 2006-03-04 Zoltan Varga <vargaz@gmail.com>
12456 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
12458 2006-03-04 Martin Baulig <martin@ximian.com>
12460 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
12461 compute the parent type at runtime, just like we're already doing
12465 (mono_reflection_bind_generic_parameters): Don't compute the
12466 parent type anymore.
12468 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
12470 2006-03-04 Martin Baulig <martin@ximian.com>
12472 * mono-debug-debugger.h
12473 (mono_debugger_create_notification_function): Allocate memory at
12474 runtime and return a pointer to it.
12476 2006-03-03 Zoltan Varga <vargaz@gmail.com>
12478 * assembly.c: Fix windows build.
12480 * assembly.c: Fix build.
12482 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
12484 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
12486 2006-03-03 Dick Porter <dick@ximian.com>
12489 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
12490 Check parameters before dereferencing them. Fixes Aaron's part of
12493 2006-03-03 Raja R Harinath <rharinath@novell.com>
12495 Fix performance regression.
12496 * loader.c (find_method_in_class): Add 'from_class' argument.
12497 Rename 'klass' argument to 'in_class'. The signature is compared
12498 against the method in 'in_class', and the corresponding method is
12499 returned from 'from_class'.
12500 (find_method): Walk both 'in_class' and 'from_class' in parallel.
12501 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
12502 type definition and generic instantiation in parallel.
12503 (mono_get_method_constrained): Update to changes.
12505 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12507 * threads.c: make sure the domain is correct, too when doing
12508 mono_thread_attach ().
12510 2006-03-01 Zoltan Varga <vargaz@gmail.com>
12512 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
12513 windows. Fixes #77683.
12515 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12517 * object.h, *: introduced specific way to set elements of an array
12518 of references to be used as write barrier. Still need to audit the
12519 uses of mono_array_addr.
12521 2006-03-01 Miguel de Icaza <miguel@novell.com>
12523 * object-internals.h: New field to cache the assmebly name, patch
12524 from Tambet Ingo (tambet@ximian.com)
12526 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
12528 * decimal.h, class-internals.h, metadata-internals.h,
12529 file-io.h: mark a few function declarations as internal, to
12530 reduce the number of PLT entries.
12532 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12534 * file-io.c: fix typo in warning message.
12536 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
12538 * loader.c: on unix, lookup the "*A" version of a function
12539 if charset is auto as a second option before failing.
12541 2006-02-28 Raja R Harinath <rharinath@novell.com>
12543 * class.h (mono_class_inflate_generic_method): Revert to two
12545 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
12546 (mono_class_inflate_generic_method_full): Add.
12547 * class.c (mono_class_inflate_generic_method_full): Rename from
12548 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
12549 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
12550 * loader.c, reflection.c: Update to changes.
12552 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
12554 * icall.c: const fixes and small improvements.
12556 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12558 * threadpool.c: for asynchronous connect(), enable the same workaround
12559 for BSD 6 as for the Mac. Fixes bug #77637.
12561 2006-02-24 Zoltan Varga <vargaz@gmail.com>
12563 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
12564 formatted classes. Fixes #77524.
12566 2006-02-24 Raja R Harinath <rharinath@novell.com>
12568 * class.c (inflate_generic_type): Add a couple more
12569 micro-optimizations.
12570 (inflate_generic_context): Don't use the 'gmethod' from
12572 (mono_class_inflate_generic_method): If the method has generic
12573 parameters, but the passed-in context doesn't have a 'gmethod',
12574 create one. Use the possibly simplified generic instantiation
12575 from the declaring class instead of the one passed in.
12577 2006-02-24 Raja R Harinath <harinath@gmail.com>
12579 Make generic method signature and method header handling lazy.
12580 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
12581 (inflate_generic_header): Likewise.
12582 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
12583 parameter to avoid inflating types.
12584 (mono_get_inflated_method): Empty out.
12585 * class.h (mono_class_inflate_generic_method): Update to changes.
12586 * loader.c (mono_get_method_from_token): Don't parse signature for
12587 generic methods, nor methods of generic classes.
12588 (mono_method_signature): Rename from 'mono_method_signature'.
12589 Inflate signature on demand.
12590 (mono_method_get_header): Inflate method header on demand.
12591 * reflection.c: Update to changes.
12593 2006-02-23 Raja R Harinath <rharinath@novell.com>
12595 * metadata.c (mono_metadata_inflate_generic_inst): If the
12596 instantiation is closed, don't bother expanding it in the new
12598 * class.c (inflate_generic_class): If the generic instantiation
12599 doesn't change after inflation, return the argument itself.
12600 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
12602 (inflate_generic_context): If neither the generic class nor the
12603 generic method instantiations change, return the original context.
12604 * reflection.c (mono_method_get_object): Do
12605 'mono_get_inflated_method' before accessing the ->klass field.
12606 (inflate_mono_method): Don't create a MonoGenericMethod unless
12608 (inflate_method): Don't pass a constructed type as the declaring
12609 type of a methodbuilder.
12611 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
12613 * object.c: fix memory overwrite.
12615 2006-02-22 Dick Porter <dick@ximian.com>
12617 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
12618 it doesn't work any more.
12619 (mono_threads_request_thread_dump): Fix unused variable warnings.
12621 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12623 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
12624 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
12625 the public header file.
12627 2006-02-21 Zoltan Varga <vargaz@gmail.com>
12629 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
12631 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12633 * class-internals.h, object.c: reduce the size of MonoVTable
12634 and store the interface_offsets array at negative offsets.
12636 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
12638 * metadata.c: tweak table descriptors data structures to reduce
12639 size and runtime relocations.
12641 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12643 * marshal.c: fix some types and opcodes to be type-safe
12644 in marshaling wrappers.
12646 2006-02-21 Ankit Jain <jankit@novell.com>
12648 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
12650 2006-02-21 Raja R Harinath <rharinath@novell.com>
12652 * metadata.c (get_constraints): Relax debugging checks for monodis.
12654 2006-02-21 Ankit Jain <jankit@novell.com>
12656 * metadata.c (mono_metadata_load_generic_params): Move the code
12657 checking for ambiguous generic params from here to mono/dis/get.c
12658 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
12660 2006-02-21 Raja R Harinath <harinath@gmail.com>
12662 Fix assertion triggered when compiling nemerle.
12663 * class.c (mono_get_shared_generic_inst): Rename from
12664 get_shared_inst and make non-static.
12665 * loader.c (mono_get_shared_generic_method): New. Used to create
12666 the MonoGenericContext-equivalent of a MonoGenericContainer.
12667 (mono_get_method_from_token): Initialize the 'context' field of
12668 the created MonoGenericContainer.
12669 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
12670 * metadata.c (get_constraints): Add sanity check.
12671 * class-internals.h: Add new internal methods.
12673 * reflection.c (verify_safe_for_managed_space): New sanity check.
12674 Currently checks that owner-less generic parameters aren't allowed
12676 (mono_type_get_object): Use it.
12677 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
12678 that are now in mono_type_get_object.
12679 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
12681 2006-02-19 Raja R Harinath <harinath@gmail.com>
12683 * metadata.c (mono_type_create_from_typespec): Rename from
12684 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
12685 argument and caching of types in the generic container.
12686 (unwrap_arrays, find_generic_param): Remove.
12687 * metadata-internals.h: Update.
12688 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
12690 2006-02-18 Zoltan Varga <vargaz@gmail.com>
12692 * class.c (mono_class_get_exception_for_failure): Fix a warning.
12694 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
12695 return values. Fixes #77581.
12697 * class.c (mono_fnptr_class_get): Switch name and name_space.
12699 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
12700 classes and add support for [In, Out] attributes.
12701 (mono_marshal_free_asany): Ditto. Fixes #77524.
12703 2006-02-18 Raja R Harinath <harinath@gmail.com>
12705 * class.c (mono_class_from_generic_parameter): Make more robust to
12706 incomplete MonoGenericContainers from monodis.
12708 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
12710 * class-internals.h: added some more exception types.
12711 * class.c, metadata.c: added a few checks to handle missing
12714 2006-02-17 Raja R Harinath <rharinath@novell.com>
12716 Use owner-less generic-params some more.
12717 * class.c (my_mono_class_from_generic_parameter): Remove.
12718 (mono_class_from_generic_parameter): Handle null image,
12719 param->name and param->owner.
12720 (mono_class_from_mono_type): Update.
12721 (mono_class_create_from_typespec): Remove 'container' parameter.
12722 If that parameter is non-null, the result is always inflated by
12723 'mono_class_get_full' anyway.
12724 (mono_class_get): Rename from _mono_class_get. Remove 'container'
12726 (mono_class_get_full): Update.
12728 * class.c (inflate_generic_type) [GENERICINST]: If the generic
12729 instance is not open, don't bother inflating.
12730 (mono_class_setup_fields): Hoist some loop-invariants. Don't
12731 parse metadata for inflated classes.
12732 (_mono_class_get): Change GenericContext* parameter to
12734 (mono_class_create_from_typespec): Likewise. Simplify, and
12735 implement trivially. All the cases are handled in
12736 mono_class_from_mono_type. Don't inflate returned class.
12737 (mono_class_get_full): Delegate GENERICINST optimization to
12738 inflate_generic_type.
12739 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
12741 2006-02-16 Dick Porter <dick@ximian.com>
12743 * socket-io.c (create_object_from_sockaddr): Fix typo.
12744 (create_sockaddr_from_object): Check array lengths before
12745 potentially accessing items off the end.
12746 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
12747 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
12748 (ves_icall_System_Net_Sockets_Socket_Send_internal)
12749 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
12750 length checks to avoid wraparound overflows.
12751 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
12752 contents of the array of sockets
12753 (hostent_to_IPHostEntry2)
12754 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
12755 Check return value of inet_ntop ().
12756 (addrinfo_to_IPHostEntry): Fix typo
12758 2006-02-16 Raja R Harinath <rharinath@novell.com>
12760 Type metadata parsing doesn't use generic-instantiation information.
12761 * metadata.c (mono_metadata_parse_array_full): Change
12762 MonoGenericContext* parameter to MonoGenericContainer*.
12763 (mono_metadata_parse_type_full): Likewise.
12764 (mono_type_create_from_typespec_full): Likewise.
12765 (mono_metadata_parse_mh_full): Likewise.
12766 (mono_metadata_parse_generic_inst): Likewise.
12767 (do_mono_metadata_parse_generic_class): Likewise.
12768 (do_mono_metadata_parse_type): Likewise.
12769 * metadata-internals.h: Update to changes.
12770 * class.c (mono_class_find_enum_basetype): Likewise.
12771 (mono_class_setup_fields): Likewise.
12772 (mono_class_create_from_typespec): Likewise.
12773 * loader.c (method_from_methodspec): Likewise.
12774 (mono_get_method_from_token): Likewise.
12775 (mono_method_get_header): Likewise.
12777 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12779 * marshal.c: handle additional GENERICINST case (patch from
12780 Thong Nguyen <tum@veridicus.com>).
12781 Fix a few cases where LDIND_I/STIND_I was used for references.
12783 2006-02-16 Raja R Harinath <rharinath@novell.com>
12785 * reflection.c (mono_reflection_get_token): Remove unused variable.
12787 2006-02-16 Martin Baulig <martin@ximian.com>
12789 * reflection.c (mono_reflection_get_token): Add support for fields
12790 in instantiated generic types.
12793 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
12795 2006-02-15 Martin Baulig <martin@ximian.com>
12798 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
12799 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
12800 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
12801 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
12803 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
12805 * class.c, metadata.c, metadata.h, object.c, icall.c,
12806 marshal.c: changed mono_type_get_underlying_type () to do
12807 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
12808 Fixed handling of instantiated generic valuetypes (bug #75479).
12810 2006-02-15 Raja R Harinath <rharinath@novell.com>
12812 * metadata.c (mono_metadata_decode_signed_value): Simplify.
12813 Delegate to mono_metadata_decode_value, and work on the returned value.
12815 * icall.c (ves_icall_MonoType_GetGenericArguments):
12816 Add consistency check here too.
12818 2006-02-15 Ankit Jain <jankit@novell.com>
12820 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
12823 2006-02-15 Ankit Jain <jankit@novell.com>
12825 * metadata.c (mono_metadata_decode_signed_value): New function to decode
12826 signed values, used only for representing lower bounds of arrays.
12827 (mono_metadata_parse_array_full): Use new
12828 mono_metadata_decode_signed_value to decode lower bounds.
12830 2006-02-14 Martin Baulig <martin@ximian.com>
12833 (mono_reflection_get_token): Support "MonoGenericMethod" and
12834 "MonoGenericCMethod" and allow generic instances / methods.
12836 2006-02-11 Zoltan Varga <vargaz@gmail.com>
12838 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
12839 to obtain the terminal size using an ioctl.
12841 * object.c (mono_nullable_init): Revert this as nullable reference
12842 types are not valid.
12843 (mono_nullable_box): Ditto.
12845 2006-02-09 Dick Porter <dick@ximian.com>
12847 * threads.c (mono_thread_detach): Drop a reference to the thread
12850 2006-02-09 Zoltan Varga <vargaz@gmail.com>
12852 * object.c (mono_nullable_init): Handle nullable reference types.
12853 (mono_nullable_box): Ditto. Fixes #77446.
12855 2006-02-07 Martin Baulig <martin@ximian.com>
12857 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
12859 2006-02-07 Ankit Jain <jankit@novell.com>
12861 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
12862 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
12863 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
12864 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
12865 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
12866 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
12868 2006-02-02 Zoltan Varga <vargaz@gmail.com>
12870 * class.c (mono_class_create_generic): Set type_token as well.
12872 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
12873 compatible with MS.
12875 2006-02-02 Martin Baulig <martin@ximian.com>
12877 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
12878 has never been used so far.
12880 2006-02-02 Martin Baulig <martin@ximian.com>
12882 * mono-debug-debugger.h: Changed comment at the top of this file;
12883 the header is not installed, but it's safe to #include it from
12886 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
12887 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
12889 2006-02-02 Martin Baulig <martin@ximian.com>
12892 (MonoSymbolTable): Removed the `metadata_info' field.
12895 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
12897 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
12898 (mono_debugger_add_builtin_types): Removed.
12899 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
12900 (mono_debugger_create_notification_function): We now operate on a
12901 pre-allocated area; take a `gpointer' and return `void'.
12903 * mono-debug-debugger.c
12904 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
12905 (mono_debugger_add_builtin_types): Removed.
12907 2006-02-02 Martin Baulig <martin@ximian.com>
12909 * threads.c (mono_debugger_create_all_threads): New public method.
12911 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
12913 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
12914 breaks on several platforms.
12916 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
12918 * assembly.c: the VS.NET build doesn't supply default values for
12919 MONO_ASSEMBLIES and MONO_CFG_DIR.
12921 2006-02-01 Zoltan Varga <vargaz@gmail.com>
12923 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
12926 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
12928 * loader.c (method_from_memberref): Fix a warning.
12930 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
12932 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
12933 with explicit layout. Fixes #77433.
12935 2006-01-31 Zoltan Varga <vargaz@gmail.com>
12937 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
12938 max_interface_id is initialized before using it. Fixes #77398.
12939 (ves_icall_Type_GetInterfaces): Ditto.
12941 2006-01-30 Raja R Harinath <rharinath@novell.com>
12943 * metadata.c (mono_metadata_parse_method_signature_full): Don't
12944 allocate memory for parameter attributes when parsing memberref
12946 * loader.c (mono_loader_set_error_method_load): Don't warn.
12947 (method_from_memberref): Ensure MissingMethodException gets thrown
12948 if method is not found. Make warning more informative.
12950 2006-01-29 Raja R Harinath <harinath@gmail.com>
12953 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
12954 return true if is byref.
12955 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
12956 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
12957 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
12959 2006-01-27 Raja R Harinath <rharinath@novell.com>
12961 Fix tests/find-method.2.il
12962 * loader.c (find_method, find_method_in_class): Remove is_inflated
12963 argument. Revert 2006-01-18 change.
12964 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
12965 is generic, search for method in its generic definition.
12966 * class.c (mono_class_setup_vtable_general): Print generic
12967 arguments of generic types in debugging printf.
12969 2006-01-26 Zoltan Varga <vargaz@gmail.com>
12971 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
12973 * threads.c (mono_threads_request_thread_dump): New helper function.
12975 2006-01-25 Raja R Harinath <rharinath@novell.com>
12977 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
12979 2006-01-25 Ankit Jain <jankit@novell.com>
12981 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
12982 move definition to ..
12983 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
12985 2006-01-25 Ankit Jain <jankit@novell.com>
12986 Raja R Harinath <rharinath@novell.com>
12988 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
12989 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
12992 2006-01-25 Martin Baulig <martin@ximian.com>
12994 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
12995 `MonoDebuggerThread' into debug-debugger.c.
12997 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12999 * profiler.c: fix printing of data.
13001 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
13003 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
13004 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
13006 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
13008 * object.c: fix deadlock related to string interning.
13010 2006-01-23 Martin Baulig <martin@ximian.com>
13012 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
13014 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
13016 2006-01-23 Martin Baulig <martin@ximian.com>
13018 * mono-debug.h: Moved the prototypes of some functions which are
13019 used by the JIT here from mono-debug-debugger.h.
13021 2006-01-21 Martin Baulig <martin@ximian.com>
13023 * Makefile.am: Don't install mono-debug-debugger.h.
13025 2006-01-21 Martin Baulig <martin@ximian.com>
13027 * mono-debug-debugger.h: Enforce the private status of this header
13028 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
13029 Moved some stuff from mono-debugger-jit-wrapper.h here.
13031 2006-01-20 Raja R Harinath <rharinath@novell.com>
13033 * class.c (mono_class_from_typeref): Add a sanity test to help
13034 catch lack of assembly load/search hooks.
13036 2006-01-19 Zoltan Varga <vargaz@gmail.com>
13038 * marshal.c (emit_struct_conv): Relax the fields with same offset
13039 check even more. Fixes #77230.
13041 2006-01-18 Martin Baulig <martin@ximian.com>
13043 * loader.c (find_method_in_class): Added `gboolean is_inflated'
13044 argument; if false, we compare the uninstantiated signatures.
13045 (method_from_memberref): Compare the uninstantiated signatures;
13048 2006-01-18 Robert Jordan <robertj@gmx.net>
13050 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
13051 Clear the weak link. Fixes bug #77170.
13053 * gc.c (mono_gchandle_free):
13054 Reflect *-gc.c changes (tiny optimization).
13056 2006-01-18 Zoltan Varga <vargaz@gmail.com>
13058 * metadata.c (mono_metadata_signature_dup): Applied patch from
13059 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
13062 2006-01-17 Zoltan Varga <vargaz@gmail.com>
13064 * marshal.c (emit_struct_conv): Allow fields with the same offset when
13065 marshalling from native to managed code. Fixes #77230.
13067 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13069 * threadpool.c: fix problem (Mac only) when more than one asynchronous
13070 connect. Fixes bug #77020.
13072 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
13074 * class.c: fixed id assignement for nested interfaces (bug #77275).
13075 Added also better info for --print-vtable debugging.
13077 2006-01-12 Martin Baulig <martin@ximian.com>
13079 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
13080 interfaces on-the-fly; fixes #76625.
13082 * class-internals.h
13083 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
13084 don't need that anymore.
13086 2006-01-12 Miguel de Icaza <miguel@novell.com>
13089 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13090 To avoid initing the nested_classes when not needed I turned the
13091 PeerCredData as a toplevel internal class, as it has to be shared
13094 Fixes the CASA issue.
13096 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
13098 * domain.c: Accessors for MonoJitInfo
13100 * profiler-private.h: Add jitinfo to the end jit hook
13102 * profiler.[ch]: Define new hooks, called after jitting which give
13103 the MonoJitInfo that was compiled
13105 2006-01-10 Martin Baulig <martin@ximian.com>
13107 * class.c (mono_class_setup_events): Add support for generic
13108 classes; fixes #76440.
13110 2006-01-06 Raja R Harinath <rharinath@novell.com>
13113 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
13114 on passed-in method.
13116 2006-01-03 Zoltan Varga <vargaz@gmail.com>
13118 * object.c (mono_runtime_invoke_array): Add Nullable support.
13120 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
13122 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
13124 * file-io.c: Don't consider sockets as directory and avoid an endless
13125 loop. Fix bug #76966.
13127 2006-01-03 Zoltan Varga <vargaz@gmail.com>
13129 * object.c (mono_nullable_init): New helper function.
13130 (mono_nullable_box): Ditto.
13132 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
13134 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
13136 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
13138 2006-01-02 Zoltan Varga <vargaz@gmail.com>
13140 * class.c (mono_class_is_assignable_from): Make T assignable to
13143 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
13145 * appdomain.c: Bump corlib version to 46.
13146 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
13147 serialization purpose) and changed ves_icall_System_Reflection_
13148 Assembly_get_code_base signature to accept a boolean (to escape, or
13149 not, the assembly code base).
13151 2005-12-23 Dick Porter <dick@ximian.com>
13155 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
13156 CreateEvent icall now returns "created" boolean parameter.
13158 2005-12-22 Zoltan Varga <vargaz@gmail.com>
13160 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
13163 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
13164 when attr_klass is an interface. Fixes #77045.
13166 2005-12-20 Zoltan Varga <vargaz@gmail.com>
13168 * marshal.c (emit_struct_conv): Fix previous patch.
13170 * marshal.c (emit_struct_conv): Add a check for fields with the same
13173 2005-12-20 Raja R Harinath <rharinath@novell.com>
13175 Fix regression in Mono.C5.
13176 * class.c (mono_class_create_generic): If 'klass' is an interface
13177 set up the interface offsets.
13178 (mono_class_is_assignable_from): Don't throw away generic arguments.
13180 2005-12-19 Raja R Harinath <rharinath@novell.com>
13182 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
13185 2005-12-15 Raja R Harinath <rharinath@novell.com>
13187 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
13189 (do_mono_metadata_parse_generic_class): Don't pass the current
13190 generic context when parsing the type being instantiated: it
13191 cannot use it, anyway.
13193 * loader.c (method_from_memberref): Don't inflate a signature if
13194 it doesn't contain any type parameters.
13196 2005-12-15 Zoltan Varga <vargaz@gmail.com>
13198 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
13200 2005-12-14 Martin Baulig <martin@ximian.com>
13203 (mono_type_get_name_recurse): Don't return null for type
13204 parameters and open generic classes.
13205 (mono_class_setup_methods): Don't exclude generic instances.
13206 (mono_get_unique_iid): Use different IDs for different
13207 instantiations of the same generic type.
13208 (mono_class_setup_vtable): Only use setup_generic_vtable() for
13209 open generic instances; create a normal vtable for closed generic
13211 (mono_class_setup_vtable_general): We're now also called for
13212 closed generic instances.
13215 (mono_reflection_bind_generic_parameters): Correctly use
13216 mono_metadata_lookup_generic_inst() everywhere.
13218 2005-12-14 Zoltan Varga <vargaz@gmail.com>
13220 * object.c (mono_class_create_runtime_vtable): Call
13221 mono_class_setup_vtable ().
13223 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
13225 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
13228 * loader.c (mono_loader_set_error_type_load): Print the type load
13229 warnings to the console so they are more visible to the user.
13230 (mono_loader_set_error_method_load): Ditto.
13232 * reflection.c (ensure_runtime_vtable): Revert the last change as it
13235 * reflection.c (ensure_runtime_vtable): Fix build.
13237 * reflection.c (ensure_runtime_vtable): Disable an optimization which
13238 doesn't work in all cases.
13240 2005-12-13 Zoltan Varga <vargaz@gmail.com>
13242 * object.c (mono_array_new_full): Treat a single dimensional array
13243 with 0 lower bounds as an szarray. Fixes #76973.
13245 * reflection.c (custom_attr_visible): Really fix this.
13247 2005-12-12 Zoltan Varga <vargaz@gmail.com>
13249 * reflection.c (custom_attr_visible): Allow nested public attributes
13252 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
13255 2005-12-12 Raja R Harinath <harinath@gmail.com>
13257 * class.c (set_generic_param_owner): Delete.
13258 (mono_class_create_from_typedef): Don't set ->owner field of
13259 generic parameters to "param containers" of enclosing classes.
13260 * reflection.c (mono_reflection_initialize_generic_parameter):
13263 2005-12-11 Zoltan Varga <vargaz@gmail.com>
13265 * reflection.c (custom_attr_visible): Fix build.
13267 2005-12-10 Zoltan Varga <vargaz@gmail.com>
13269 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
13270 private attributes.
13272 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
13273 handling of null parameter defaults.
13275 2005-12-09 Raja R Harinath <rharinath@novell.com>
13277 * class.c (mono_class_from_generic_parameter): Don't set
13278 klass->generic_container.
13279 (my_mono_class_from_generic_parameter): Likewise.
13281 2005-12-07 Zoltan Varga <vargaz@gmail.com>
13283 * reflection.c (load_public_key): Fix a warning.
13284 (method_encode_code): Fix unaligned accesses.
13286 2005-12-07 Martin Baulig <martin@ximian.com>
13288 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
13291 (write_generic_param_entry): Encode our custom attrs.
13293 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
13295 2005-12-07 Martin Baulig <martin@ximian.com>
13297 * reflection.c (encode_new_constraint): Removed; we don't use the
13298 `NewConstraintAttribute' anymore.
13300 2005-12-06 Zoltan Varga <vargaz@gmail.com>
13302 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
13303 not fire a TypeResolve event when Assembly.GetType () is called.
13305 2005-12-05 Ben Maurer <bmaurer@ximian.com>
13307 Beginning of support for nullable types in the runtime. Parts of
13308 this patch are from Martin.
13310 * appdomain.c (MONO_CORLIB_VERSION): Bump
13312 * domain.c (mono_init_internal): get the nullable type
13314 * class.c (mono_class_is_nullable): New method
13315 (mono_class_get_nullable_param): New mehod
13316 (mono_class_create_generic): In types T? set cast_class to T
13318 * class-internals.h (MonoDefaults): new nullable default class
13319 (mono_class_get_nullable_param, mono_class_get_nullable_param):
13322 2005-12-05 Raja R Harinath <rharinath@novell.com>
13324 * metadata.c (select_container): New. Refactor code to select the
13325 appropriate GenericContainer given the type of generic parameter
13326 we are looking for.
13327 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
13328 not a MonoGenericContext. Use select_container. Update parameters.
13329 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
13330 and MONO_TYPE_MVAR.
13331 (unwrap_arrays): Remove duplicate tests.
13332 (find_generic_param): Rename from 'has_same_context'. Now walks a
13333 generic instantiated class to find any arguments that are generic
13335 (mono_type_create_from_typespec_full): Use find_generic_param to
13336 avoid evicting some generic instantiations from the typespec
13339 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
13341 * reflection.c: fixed writing of doubles on ARM FPA.
13343 2005-12-02 Robert Jordan <robertj@gmx.net>
13345 * icall.c: Fixed EventInfo.ReflectedType (#76829).
13347 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13349 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
13350 least on SUSE 10 they are not the same (on debian, they are just the
13353 2005-12-01 Raja R Harinath <rharinath@novell.com>
13355 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
13356 DeclaringType for VARs and MVARs.
13357 * class.c (set_generic_param_owner): Fix initialization of owner
13360 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
13362 * icall.c: fixed Enum.ToObject() to correctly convert the values.
13364 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13366 * threadpool.c: workaround for a bug that shows up on the Mac:
13367 select()+connect() on a blocking socket is not like it should
13368 be, so we proceed to connect() in that case, wasting the I/O
13369 threadpool thread until connect succeedes. Fixes bug #75436.
13371 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13373 * threadpool.c: fix typo when setting file descriptor states.
13375 2005-11-28 Raja R Harinath <rharinath@novell.com>
13377 * class-internals.h (MonoGenericContainer.is_signature): Remove.
13378 * metadata.c (mono_metadata_parse_method_signature_full): Don't
13379 create a temporary signature container.
13380 (mono_metadata_parse_generic_param): Update to changes.
13381 (mono_type_create_from_typespec_full): Update to changes.
13382 * loader.c (method_from_memberref): Don't use a
13383 MonoGenericContainer while parsing a memberref signature.
13384 (method_from_methodspec): Remove dead-store of the 'container'
13385 variable. It's overwritten before use.
13387 * metadata.c (mono_type_create_from_typespec_full): Make debugging
13389 (mono_metadata_parse_generic_param): Likewise.
13390 * loader.c (find_method_in_class): Does not need a
13391 MonoGenericContainer. Use 'mono_method_signature' rather than
13392 'mono_method_signature_full'.
13393 (find_method, mono_get_method_constrained, method_from_memberref):
13396 * metadata.c (mono_type_create_from_typespec_full): Ensure that
13397 owner-less generic-parameters are never evicted from the typespec
13400 * loader.c (method_from_memberref): Don't use the current context
13401 when parsing signatures.
13402 (method_from_methodspec, mono_get_method_from_token): Update to changes.
13404 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
13405 side-effects in g_assert.
13406 * loader.c (mono_get_method_from_token): Resolve klass earlier so
13407 that we don't potentially lose information.
13409 2005-11-26 Dick Porter <dick@ximian.com>
13412 * threads.c: icalls to implement basic (ie, not named)
13413 System.Threading.Semaphore.
13415 2005-11-24 Dick Porter <dick@ximian.com>
13418 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
13419 Use GetProcessId() if it's available.
13421 2005-11-23 Zoltan Varga <vargaz@gmail.com>
13423 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
13425 2005-11-23 Raja R Harinath <rharinath@novell.com>
13426 Ankit Jain <jankit@novell.com>
13428 * loader.c (mono_get_method_from_token): Initialize 'method' field
13429 of all generic parameters before parsing the signature. Remove
13430 code that "fixed"-up MVAR references.
13432 2005-11-23 Ankit Jain <jankit@novell.com>
13434 * metadata.c (mono_metadata_has_generic_params):
13435 (mono_metadata_load_generic_param_constraints):
13436 (mono_metadata_load_generic_params): Move duplicate code ...
13437 (mono_metadata_get_generic_param_row): ... here. Returns the
13438 first row-id in GenericParam table for a given owner (token).
13439 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
13442 2005-11-23 Raja R Harinath <rharinath@novell.com>
13443 Ankit Jain <jankit@novell.com>
13445 * metadata.c (mono_metadata_class_equal): Pass signature_only when
13446 comparing VARs too.
13447 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
13448 type->data.generic_param only if the type is an MVAR.
13449 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
13450 leak owner-less VARs and MVARs into managed space.
13452 2005-11-21 Martin Baulig <martin@ximian.com>
13454 * class-internals.h
13455 (MonoMethod): Moved the `generic_container' here from
13456 `MonoMethodNormal' since we now also need it for
13457 `MonoMethodPInvoke';
13458 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
13459 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
13460 an union containing both `MonoMethodNormal' and
13461 `MonoMethodPInvoke'.
13464 (mono_get_method_from_token): Allow implementing generic methods
13468 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
13471 2005-11-17 Dick Porter <dick@ximian.com>
13475 * process.c: Split the Process Start_internal icall into
13476 ShellExecuteEx_internal and CreateProcess_internal, which are
13477 called depending on whether UseShellExecute is true. Fixes bug
13480 * appdomain.c (MONO_CORLIB_VERSION): Incremented
13482 2005-11-17 Zoltan Varga <vargaz@gmail.com>
13484 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
13485 'msize' parameters, use the information in 'mspec' instead.
13486 (emit_object_to_ptr_conv): Ditto.
13488 * marshal.c (emit_struct_conv): Handle explicit layout structs with
13489 fields out of order. Fixes #76733.
13491 2005-11-17 Ankit Jain <jankit@novell.com>
13493 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
13495 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
13497 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
13500 2005-11-16 Zoltan Varga <vargaz@gmail.com>
13502 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
13503 for types with non-auto layout. Fixes #76717.
13505 2005-11-16 Ankit Jain <jankit@novell.com>
13507 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
13508 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
13509 if generic_context is null.
13510 (mono_metadata_generic_param_equal): param->owner can be null.
13511 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
13514 2005-11-16 Zoltan Varga <vargaz@gmail.com>
13516 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
13519 2005-11-15 Martin Baulig <martin@ximian.com>
13521 * object.c (set_value): Use mono_class_from_mono_type() instead of
13522 the hack for generic instances; fixes #76136.
13524 2005-11-15 Zoltan Varga <vargaz@gmail.com>
13526 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
13529 * image.c (load_metadata_ptrs): Initialize the new fields.
13531 * reflection.c (create_dynamic_mono_image): Ditto.
13533 * reflection.c (build_compressed_metadata): Use the new fields.
13535 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
13538 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
13541 2005-11-15 Ankit Jain <jankit@novell.com>
13542 Raja R Harinath <harinath@gmail.com>
13544 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
13545 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
13546 new per-generic_container cache if the cached MonoType's context matches
13547 the current context.
13548 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
13549 to the expected context.
13550 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
13552 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13554 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
13555 we changed the signature of an icall.
13556 * icall.c: Modify to mono_double_ParseImpl return true/false
13557 depending on the success, instead of throwing the exception. This will
13558 help us in Double.TryParse methods.
13560 2005-11-14 Zoltan Varga <vargaz@gmail.com>
13562 * marshal.c (emit_marshal_object): Throw an exception when
13563 marshalling 'object' instead of crashing. Fixes #76696.
13565 2005-11-11 Zoltan Varga <vargaz@gmail.com>
13567 * class-internals.h: Add prototype for mono_type_get_full_name ().
13569 2005-11-11 Dick Porter <dick@ximian.com>
13571 * threads.c (mono_thread_manage): Make sure the main thread has
13572 abandoned all its mutexes when cleaning up. Fixes bug 74680.
13574 2005-11-11 Zoltan Varga <vargaz@gmail.com>
13576 * loader.c (mono_loader_set_error_type_load): Log a warning to the
13577 console about the missing type.
13578 (mono_loader_set_error_method_load): Ditto.
13580 2005-11-09 Miguel de Icaza <miguel@novell.com>
13582 * mono-config.c (mono_get_config_dir): Set the system defaults if
13585 * assembly.c (mono_set_dirs): New API entry point to set the
13586 assembly and the config directory in one call
13588 2005-11-09 Zoltan Varga <vargaz@gmail.com>
13590 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
13591 the ftnptr was created from a delegate in a domain other than the
13592 current domain. Fixes #75377.
13594 * exception.h exception.c: Add mono_get_exception_not_supported ().
13596 2005-11-08 Martin Baulig <martin@ximian.com>
13598 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
13600 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
13602 * security-manager.h: Added definitions to deal with strongname key
13603 pairs bigger (and smaller) than 1024 bits.
13604 * reflection.c: Remove hardcoded strongname size (128 bytes) and
13605 adjust wrt the public key length being used.
13607 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
13609 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
13610 Windows build (r51396-51397).
13612 2005-11-03 Martin Baulig <martin@ximian.com>
13614 * class.c (mono_class_setup_vtable_general): Also add generic
13615 methods to the vtable; fixes #76581.
13617 2005-11-01 Miguel de Icaza <miguel@novell.com>
13619 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
13620 sure that we lookup GetString method from the System.Text.Encoding
13621 class, not the derived class or we get an empty method.
13623 Fixed class #76612.
13625 2005-10-25 Miguel de Icaza <miguel@novell.com>
13627 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
13628 if it has been previously set (embedders).
13630 Make mono_set_rootdir available also on Unix.
13632 005-10-24 Robert Jordan <robertj@gmx.net>
13634 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
13636 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
13638 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
13639 only calls which are made to native code use this flag.
13641 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
13643 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
13645 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
13646 Add support for FieldBuilders.
13648 2005-10-29 Martin Baulig <martin@ximian.com>
13651 (mono_debug_using_mono_debugger): New public method; returns
13652 whether we're running inside the debugger.
13654 2005-10-27 Zoltan Varga <vargaz@gmail.com>
13656 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
13657 for Method/Constructor/FieldBuilders.
13659 2005-10-26 Zoltan Varga <vargaz@gmail.com>
13661 * reflection.c (module_add_cattrs): Save custom attributes for global methods
13662 and fields as well.
13664 2005-10-26 Martin Baulig <martin@ximian.com>
13666 * mono-debug-debugger.c
13667 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
13669 2005-10-24 Raja R Harinath <harinath@gmail.com>
13671 * icall.c (base64_to_byte_array): Don't pass an out-of-range
13672 integer to isspace.
13674 2005-10-21 Zoltan Varga <vargaz@gmail.com>
13676 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
13677 when passing valuetypes byref. Fixes #76502.
13679 2005-10-19 Jackson Harper <jackson@ximian.com>
13681 * profiler.c: Don't put a . in front of types that are not in a
13684 2005-10-18 Zoltan Varga <vargaz@gmail.com>
13686 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
13688 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
13690 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
13692 (mono_marshal_get_ldflda_wrapper): Fix a warning.
13694 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13696 * assembly.c metadata-internals.h icall.c: Define an additional
13697 parameter for mono_assembly_name_parse_full, so we can avoid creating
13698 S.R.AssemblyName.Version when no version info wasn't passed.
13700 2005-10-09 Miguel de Icaza <miguel@novell.com>
13702 * class.c (mono_type_get_full_name): Reimplement method that was
13705 * image.c: Some docs
13707 2005-10-10 Zoltan Varga <vargaz@gmail.com>
13709 * profiler.c (output_newobj_profile): Fix printing of Total memory
13712 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
13714 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
13716 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
13718 * threads.c: remove debug output.
13720 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
13722 * threads.c (mono_thread_manage): Fix crashes if more than 64
13723 threads need to be aborted. Hopefully fixes #75899.
13725 * assembly.c (mono_stringify_assembly_name): New helper function.
13727 * class.c: Use mono_stringify_assembly_name instead of the similar
13730 * assembly.h assembly.c: Add support for calling a postload search
13731 hook if an assembly cannot be loaded.
13733 * appdomain.c: Register new search hooks which call the AssemblyResolve
13734 events in AppDomain. Fixes #75231
13736 2005-10-07 Martin Baulig <martin@ximian.com>
13738 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
13739 methods without debug info.
13741 2005-10-07 Zoltan Varga <vargaz@gmail.com>
13743 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
13746 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13748 * file-io.c: now that we return symlinks, use lstat and, when the file
13749 is a symbolic link, stat, to get the file attributes. Also avoid the
13750 conversion to/from utf16/external.
13752 2005-10-06 Zoltan Varga <vargaz@gmail.com>
13754 * class.c (mono_class_layout_fields): Compute klass->has_references
13755 correctly if an embedded valuetype is not yet initialized. Fixes
13758 2005-10-04 Martin Baulig <martin@ximian.com>
13761 (mono_metadata_load_generic_param_constraints): New public
13762 function; splitted the constraints loading out from
13763 mono_metadata_load_generic_params().
13765 * class.c (mono_class_create_from_typedef): Call
13766 mono_metadata_load_generic_param_constraints() after setting up
13767 the type and creating our parent; fixes #75329.
13769 2005-10-04 Martin Baulig <martin@ximian.com>
13771 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
13772 non-dynamic parent classes.
13774 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
13776 * file-io.c : win32 build fix (ETXTBSY seems not found).
13778 2005-10-04 Martin Baulig <martin@ximian.com>
13781 (mono_image_get_methodspec_token): Make the cache actually work;
13784 2005-10-04 Martin Baulig <martin@ximian.com>
13786 * class.c (mono_class_name_from_token): Removed the unneccessary
13787 `MonoGenericContext *' argument.
13789 2005-10-04 Martin Baulig <martin@ximian.com>
13792 (method_from_methodspec): Make the caching work again; fixes the
13793 performance regression from #76262.
13795 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13799 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
13800 GetFileSystemEntries that performs the same work but without going
13801 into io-layer, locking, etc.
13803 2005-09-30 Zoltan Varga <vargaz@gmail.com>
13805 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
13806 ThreadState_Stopped as well. Fixes #76047.
13808 2005-09-29 Martin Baulig <martin@ximian.com>
13811 (inflate_generic_context): If the new context has a `gmethod', set
13812 its `container' that that gmethod's `container'.
13815 (mono_metadata_parse_generic_param): Simplify things;
13816 `generic_container = generic_context->container;' is just fine.
13818 * loader.c (method_from_methodspec): Code cleanups.
13820 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13822 * decimal.c: fix warning (and let gcc generate correct
13823 code on ARM with optimizations).
13825 2005-09-28 Martin Baulig <martin@ximian.com>
13828 (method_from_memberref): Added `MonoGenericContext *class_context'
13829 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
13830 (method_from_methodspec): If we're a memberref, use the enclosing
13831 context when parsing its parent. Fixes #76262; see gtest-206.cs.
13833 2005-09-28 Martin Baulig <martin@ximian.com>
13835 * object.c (mono_runtime_invoke_array): Added support for
13836 MONO_TYPE_GENERICINST; fixes #75917.
13838 2005-09-27 Martin Baulig <martin@ximian.com>
13840 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
13841 `k->byval_arg.type' to determine the actual type.
13843 * loader.c (method_from_methodspec): Removed some hacks.
13845 2005-09-27 Ben Maurer <bmaurer@ximian.com>
13847 * class-internals.h (mono_field_is_deleted): Do the test for
13848 rtspecialname before we check the actual name of the field. This
13849 prevents us from dereferencing a pointer into the string table,
13850 saving us from accessing a few pages
13852 * *.c: Replace the use of {Enter,Leave}CriticalSection with
13853 macros. This will allow a deadlock debugger to easily be plugged
13856 2005-09-27 Martin Baulig <martin@ximian.com>
13858 * loader.c (method_from_methodspec): Create a "signature"
13859 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
13861 2005-09-27 Martin Baulig <martin@ximian.com>
13864 (inflate_generic_class): Correctly set the new context's
13868 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
13869 instead of a `MonoGenericContext *'.
13870 (mono_method_signature_full): Take a `MonoGenericContainer *'
13871 instead of a `MonoGenericContext *'.
13874 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
13875 instead of a `MonoGenericContext *'.
13876 (mono_metadata_parse_method_signature_full): Likewise.
13878 2005-09-26 Martin Baulig <martin@ximian.com>
13881 (mono_class_from_generic_parameter): Set `klass->generic_container'
13882 (mono_class_from_generic_parameter): Likewise.
13883 (mono_bounded_array_class_get): We inherit the generic container
13884 from the element class.
13887 (find_method, find_method_in_class): Take a `MonoGenericContext *'
13888 argument rather than computing it here.
13889 (method_from_memberref): Correctly set the generic context before
13890 parsing the signature. Fixes #75681.
13892 2005-09-26 Zoltan Varga <vargaz@gmail.com>
13894 * object.c (mono_class_has_special_static_fields): Fix warnings.
13896 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13898 * assembly.c: Add parse_public_key function, to
13899 par the public keys. Also added mono_assembly_name_parse_full,
13900 to define it the parsed key should be freed or not.
13901 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
13902 to parse a long format assembly name.
13903 * metadata-internals.h: Keep mono_assembly_name_parse_full as
13904 private, since calling it to preserve the key requires
13905 freeing it manually.
13907 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
13909 * locales.c : removed HAVE_ICU part.
13911 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
13913 * object.c (mono_class_create_runtime_vtable): Avoid calling
13914 field_is_special_static if the klass has no special static fields.
13916 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
13917 (MonoCachedClassInfo): Likewise.
13919 * object.c (mono_class_has_special_static_fields): New helper function.
13921 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13923 * class.c (mono_class_create_from_typedef): Don't call
13924 interfaces_from_typedef_full for enums.
13925 (mono_class_create_from_typedef): Compute the base types of enums directly
13926 without calling mono_class_setup_fields ().
13927 (mono_class_find_enum_basetype): New helper function.
13929 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
13930 one place inside the string heap.
13932 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
13934 * class.c: locking fixes, code cleanups, some docs added.
13935 Allocate some data structures in the image mempool.
13937 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13939 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
13942 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
13944 * class-internals.h, class.c, reflection.c: reduce memory taken by
13947 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
13949 * metadata.c, metadata.h, loader.h: documentation updates, code and
13952 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13954 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
13957 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
13958 page faults caused by the runtime while reading metadata.
13960 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13962 * socket-io.c: the field names were changed 3 months ago and no one
13963 realized until bug #76077 got filed!
13965 2005-09-20 Martin Baulig <martin@ximian.com>
13967 * icall.c (assembly_icalls): Removed some unused debugger icalls.
13969 2005-09-20 Martin Baulig <martin@ximian.com>
13971 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
13972 write the rank into the class entry.
13974 2005-09-20 Martin Baulig <martin@ximian.com>
13976 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
13978 2005-09-19 Zoltan Varga <vargaz@gmail.com>
13980 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13982 * icall.c (custom_attrs_defined_internal): New icall.
13984 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
13986 (mono_custom_attrs_construct_by_type): New helper function.
13988 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
13990 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
13991 terminate the resulting string. Fixes #76123.
13993 2005-09-16 Martin Baulig <martin@ximian.com>
13996 (mono_debug_add_method): Ignore inflated methods for the moment.
13998 2005-09-14 Martin Baulig <martin@ximian.com>
14000 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
14002 2005-09-13 Zoltan Varga <vargaz@gmail.com>
14004 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
14005 return a success/failure indication.
14006 (mono_metadata_interfaces_from_typedef_full): Ditto.
14007 (get_constraints): Ditto.
14009 2005-09-12 Zoltan Varga <vargaz@gmail.com>
14011 * marshal.c (emit_marshal_array): Fix handling of null arrays.
14013 * marshal.c (emit_marshal_array): Add support for returning string
14014 arrays from delegates. Fixes #76063.
14016 * marshal.c: Use the emit_ldloc/stloc macros where possible.
14018 2005-09-11 Zoltan Varga <vargaz@gmail.com>
14020 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
14023 2005-09-09 Zoltan Varga <vargaz@gmail.com>
14025 * reflection.c icall.c: Fix after mono_get_exception_type_load
14028 * assembly.c (mono_assembly_get_assemblyref): New helper function.
14029 (mono_assembly_load_reference): Use the new helper.
14031 * class-internals.h (MonoLoaderError): New structure containing
14032 information about type loading errors.
14034 * class-internals.h loader.c: Add APIs to store per-thread loader
14037 * loader.c class.c: Set the loader error if needed.
14039 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
14041 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
14043 * decimal.c: fixed to handle the broken ARM fp format.
14045 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
14047 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
14050 2005-09-06 Martin Baulig <martin@ximian.com>
14052 * domain.c (supported_runtimes): Added v2.0.50727.
14054 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
14056 * culture-info.h: reduce the size of some structures.
14058 2005-09-05 Martin Baulig <martin@ximian.com>
14060 Reflect latest API changes in the August CTP.
14063 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
14064 ("MonoType.HasGenericArguments"): Removed.
14065 ("MonoMethod.BindGenericParameters"): Renamed to
14066 "MakeGenericMethod".
14067 ("MethodBuilder.BindGenericParameters"): Renamed to
14068 "MakeGenericMethod".
14070 2005-09-05 Martin Baulig <martin@ximian.com>
14072 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
14074 2005-09-05 Martin Baulig <martin@ximian.com>
14076 Applying a patch from Michal Moskal <malekith@nemerle.org>.
14078 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
14079 generic_container is non-NULL.
14081 2005-09-05 Martin Baulig <martin@ximian.com>
14083 Applying a patch from Michal Moskal <malekith@nemerle.org>.
14085 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
14087 2005-08-29 Michal Moskal <malekith@nemerle.org>
14089 * reflection.c (encode_locals,
14090 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
14091 for large generic types.
14093 2005-09-05 Martin Baulig <martin@ximian.com>
14095 Applying a patch from Michal Moskal <malekith@nemerle.org>.
14097 * class.c (mono_dup_array_type): New public method.
14098 (mono_metadata_signature_deep_dup): New public method.
14099 (dup_type): Correctly duplicate array and function types.
14101 2005-09-05 Martin Baulig <martin@ximian.com>
14103 Applying a patch from Michal Moskal <malekith@nemerle.org>.
14105 * reflection.c (get_default_param_value_blobs): Handle generic types
14106 and generic methods.
14108 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
14110 * class.c: Fixed error reporting (method/class were inversed) for
14111 inheritance demands.
14112 * security-manager.c|h: Added the AppDomain when calling the managed
14113 System.Security.SecurityManager.InheritanceDemand method.
14115 2005-09-01 Raja R Harinath <rharinath@novell.com>
14117 * reflection.c (encode_marshal_blob): 'marshaltype' and
14118 'marshaltyperef' are alternate sources for the custom marshaler
14121 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
14123 * class.c: fix creation of array classes with rank == 1
14124 (patch by Ankit Jain <jankit@novell.com>).
14126 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
14128 * object.c: fix check for creating the bound data for arrays vs
14131 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14133 * object.c: configuration file name is now based on the executable name,
14134 not the image name. Fixes bug #75931.
14136 2005-08-29 Zoltan Varga <vargaz@gmail.com>
14138 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
14139 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
14141 2005-08-25 Zoltan Varga <vargaz@gmail.com>
14143 * rand.c: Use wincrypt.h instead of WinCrypt.h.
14145 2005-08-24 Ankit Jain <jankit@novell.com>
14146 Raja R Harinath <rharinath@novell.com>
14148 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
14149 called by it recursively.
14150 (mono_class_init): Remove special case in pending_init handling, since it's
14151 superseded by the fix to mono_class_from_typeref.
14153 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
14155 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
14156 BROKEN_THREAD_START stuff.
14158 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
14160 * class-internals.h object.c: Add a new kind of trampoline called a delegate
14163 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
14165 * object.c (mono_delegate_ctor): Replace the original function address with
14166 a delegate trampoline.
14168 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
14170 * icall.c: add boolean argument to base64_to_byte_array and
14171 InternalFromBase64String to control whether a whitespace-only string
14172 is allowed (or should casue a FormatException to be thrown). We need
14173 this as the behavior has changed between MS.NET 1.x and 2.0, and we
14174 to match the MS behaviour in both profiles.
14175 * appdomain.c: Bump corlib version.
14177 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14179 This patch implements a big portion of publisher policy
14180 support, used to bind assembly versions and redirect
14181 one assembly from version A to version B.
14184 New GSList loaded_assembly_bindings, for storing the cached
14186 (assembly_binding_maps_name): New static function for checking if a
14187 assembly binding information maps an assembly name.
14188 (mono_assembly_binding_info_free): New function for freeing
14189 assembly binding information resources.
14190 (get_publisher_policy_info): New static function for retrieving
14191 assembly binding information from a MonoImage.
14192 (compare_versions): New static function for comparing an assembly
14193 binding information data and the version of an assembly name.
14194 (check_policy_versions): New static function for checking if an
14195 assembly binding info mapping an assembly name is valid for it.
14196 (mono_assembly_load_publisher_policy): New static function for
14197 loading the 'policy.major.minor.MyAssembly' image for an assembly
14198 with an assembly name 'aname'.
14199 (mono_assembly_bind_version): New static function for updating
14200 assembly redirection.
14201 (mono_assembly_apply_binding): New static function for applying
14203 (search_binding_loaded): New static function for searching
14204 loaded assembly binding infos in the cache domain.
14205 (mono_assembly_load_full): Don't apply assembly binding for
14206 reflection only assemblies.
14208 * metadata-internals.h: Add MonoAssemblyBindingInfo,
14209 which contains information about assembly binding. Also
14210 declare signature for mono_config_parse_publisher_policy ()
14211 function, used to retrieve pub policy info.
14214 (publisher_policy_start): New static function used to parse publisher
14215 policy config files.
14216 (publisher_policy_parser): New static MonoParseHandler containing
14217 the functions used when parsing config files.
14218 (mono_config_parse_publisher_policy): New function for parsing
14219 publisher policy files.
14221 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
14223 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
14225 * marshal.c (mono_delegate_free_ftnptr): Ditto.
14227 * object.c (mono_get_addr_from_ftnptr): New helper function.
14229 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
14231 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14233 2005-08-19 Dick Porter <dick@ximian.com>
14235 * threads.c, threads.h, appdomain.c, appdomain.h,
14236 profiler-private.h, monitor.c, object.c, object-internals.h,
14237 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
14238 store the thread ID, so it can hold a 64 bit value if needed.
14240 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
14242 * reflection.c (mono_reflection_create_dynamic_method): Store the
14243 handle class into the method references as well so ldtoken works in
14246 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
14249 2005-08-19 Ankit Jain <jankit@novell.com>
14252 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
14253 here rather than using the method signature of a arbitrary function
14254 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
14256 Hack done with Harinath.
14258 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14260 * threadpool.c: disable printing stack traces when we get a exception
14261 in a threadpool thread. I need to do more testing to figure out which
14262 cases actually print this. Fixes bug #75828.
14264 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14266 * icall.c: there might be ignored whitespace after the last '='. This
14267 fixes length computation and bug #75840.
14269 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
14271 * assembly.c (mono_assembly_load_full): Consider .exe extension as
14272 well. Fixes #75809.
14274 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
14277 * reflection.c (create_custom_attr_data): Ditto.
14279 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
14281 * locales.c, culture-info.h : removed RegionLCIDMap.
14282 * culture-info-tables.h : regenerated.
14284 2005-08-16 Martin Baulig <martin@ximian.com>
14286 * class.c (mono_type_get_name_recurse): Small fix.
14288 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
14290 * locales.c : indentation fixie.
14292 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
14294 * object-internals.h,
14298 icall.c : added RegionInfo table support.
14299 * culture-info-table.h : regenerated for region support.
14301 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
14303 * reflection.c (resolve_object): handle all kinds of MonoMethod
14304 including generic ones
14306 2005-08-12 Ankit Jain <jankit@novell.com>
14308 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
14309 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
14311 2005-09-12 Lluis Sanchez <lluis@ximian.com>
14313 * process.c: Don't close a thread handle when it's NULL. This is a
14314 workaround for bug #75733.
14316 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
14318 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
14320 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
14322 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
14324 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14326 * threadpool.c: if a work item in the thread pool has a callback that
14327 catches a exception, don't propagate it after invoking the callback.
14330 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
14332 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
14334 * class-internals.h (MonoCachedClassInfo): Add some new fields.
14336 * class.c (mono_class_init): Load field info lazily in the AOT case.
14338 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
14340 2005-08-03 Ankit Jain <jankit@novell.com>
14343 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
14344 PInvoke calling convention is 0.
14346 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
14348 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
14349 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
14351 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
14353 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
14354 to handle threads not started by the GC (patch by Michael Meeks
14355 <michael.meeks@novell.com>).
14357 2005-07-31 Kamil Skalski <nazgul@omega.pl>
14359 * reflection.c: Make buffer used in emitting types larger for some
14360 big generic types (patch by Michal Moskal).
14362 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
14364 * mono-debug.c: Fix some (not all) alignment problems.
14366 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14368 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
14369 Invoke mono_image_load_from_data_full passing the refonly
14373 (mono_assembly_open_from_bundle): Add the refonly argument,
14374 in order to pass it to other methods it calls to.
14375 (do_mono_assembly_open): Add the refonly argument, in order
14376 to pass it to other methods it calls to.
14377 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
14378 the refonly parameter to it.
14380 * image.c: Add loaded_images_refonly_hash and
14381 loaded_images_refonly_guid_hash to cache the reflection
14382 only loaded images.
14383 (mono_images_init): Initialize the hash tables used for
14384 caching the reflection only images.
14385 (load_modules): Invoke mono_image_open_full passing the refonly
14386 parameter to load the modules the correct way.
14387 (build_guid_table): Add the refonly argument, to re-build the
14388 correct hash table.
14389 (do_mono_image_open): Added the refonly argument, in order to
14390 define it for the loaded image.
14391 (mono_image_loaded_full): New function, which receives an
14392 additional parameter to look for the image in the refonly or
14393 non-refonly section.
14394 (mono_image_loaded): Updated, using mono_image_loaded_full.
14395 (mono_image_loaded_by_guid_full): The same case that happens
14396 with mono_image_loaded_full.
14397 (mono_image_loaded_by_guid): Likewise.
14398 (register_image): Use the ref_only variable inside MonoImage
14399 to decide in which hash table store the current image.
14400 (mono_image_open_from_data_full): Rename
14401 mono_image_open_from_data to mono_image_open_from_data_full,
14402 adding the refonly argument, to define the ref_only variable
14404 (mono_image_open_from_data): Return
14405 mono_image_open_from_data_full.
14406 (mono_image_open_full): Rename mono_image_open to
14407 mono_image_open_full, receiving the new refonly argument,
14408 to pass it to inner methods.
14409 (mono_pe_file_open): Update this function, to open
14410 a MonoImage as a non-refonly image.
14411 (mono_image_close): Use the refonly variable inside
14412 MonoImage to remove the image from the correct caches.
14414 * image.h: Add the signatures of mono_image_open_full,
14415 mono_image_open_from_data_full, mono_image_loaded_full,
14416 mono_image_loaded_by_guid_full.
14418 * metadata-internals.h: Add the ref_only field to
14421 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14423 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
14424 Fix the last behavior, which used to load the assemblies and
14425 extract MonoReflectionAssemblyName information, instead of
14426 extract it from the metadata tables. Needed for Reflection
14429 2005-07-29 Martin Baulig <martin@ximian.com>
14431 * mono-debug-debugger.c
14432 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
14436 (mono_debug_address_from_il_offset): Check whether we have
14437 debugging support before attempting to take the lock.
14438 (mono_debug_source_location_from_address): Likewise.
14439 (mono_debug_source_location_from_il_offset): Likewise.
14440 (mono_debug_il_offset_from_address): Likewise.
14441 (mono_debug_address_from_il_offset): Likewise.
14443 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
14445 * class.c (mono_class_from_name_case): Add support for dynamic images.
14448 * object.c (mono_class_compute_gc_descriptor): Add a workaround
14451 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
14453 * reflection.c (mono_method_get_object): Fix warning.
14455 2005-07-28 Martin Baulig <martin@ximian.com>
14458 (mono_debug_add_wrapper): Also write the wrapper type.
14460 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
14462 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
14464 * class.c (mono_class_init): Avoid reading nested classes if the AOT
14465 data indicates the class has none.
14467 2005-07-26 Ben Maurer <bmaurer@ximian.com>
14469 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
14470 loader lock with the debugger lock. Prevents deadlocks for beagle.
14472 Beagle can now run on an smp box for a weekend without any
14475 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
14477 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
14478 in a module. Fixes #75629.
14480 2005-07-26 Martin Baulig <martin@ximian.com>
14482 * mono-debug.c (mono_debug_add_wrapper): New static method.
14483 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
14484 interncall or a wrapper.
14486 * mono-debug.h (MonoDebugWrapperData): New public typedef.
14487 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
14488 (MONO_DEBUGGER_VERSION): Bump to 51.
14490 * mono-debug-debugger.c
14491 (mono_debugger_add_type): Removed this empty function.
14492 (mono_debugger_add_method): Likewise.
14494 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
14496 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
14497 before accessing method->slot.
14499 2005-07-21 Jb Evain <jbevain@gmail.com>
14501 * reflection.c (method_encode_clauses/class): Handle filters clauses.
14504 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
14506 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
14509 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
14511 * image.h image.c: Add mono_image_get_guid () API function.
14513 2005-07-19 Ben Maurer <bmaurer@ximian.com>
14515 There were issues when multiple threads tried to load
14516 assemblies. A deadlock was created between assemblies_mutex and
14517 mono_domain_assemblies_lock. This fixes the issue by making the
14518 assembly ref counting be lock free. See bug 75586.
14520 * image.c (mono_image_close): The add ref function here was using
14521 Interlocked operations while the unref was using a mutex and a
14522 --. I don't think this was ever a bug that would be exposed in a
14523 non-pendantic way (ie, by an embedder doing a ref on one thread
14524 and an unref on another), but for the sake of correctness, this is
14527 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
14528 (mono_assembly_load_reference): Call mono_assembly_addref rather
14529 than touching the refcount ourselves.
14530 (mono_assembly_close): Use InterlockedDecrement to unref the
14531 assembly. Don't acquire the lock unless it is actually needed.
14533 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
14535 * class.c (mono_class_layout_fields): Fix calculation of has_references
14538 2005-07-12 Martin Baulig <martin@ximian.com>
14540 Applying a patch from Michal Moskal <malekith@nemerle.org>.
14543 (mono_type_hash): Provide better hashing for generic instances.
14544 (mono_generic_inst_hash): Improve hashing.
14545 (mono_generic_class_hash): Likewise.
14547 * reflection.c (mymono_metadata_type_hash): Improve hashing for
14550 2005-07-12 Martin Baulig <martin@ximian.com>
14552 * reflection.c (mono_reflection_create_runtime_class): Remove the
14553 hack for generic type definitions and non-`Run' assemblies.
14554 (mono_reflection_bind_generic_parameters): Also use
14555 `klass->wastypebuilder' to check for TypeBuilders.
14557 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
14559 * class.c (mono_class_layout_fields): Fix calculation of has_references
14562 * class.c (inflate_generic_class): Fix a leak.
14563 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
14566 2005-07-11 Martin Baulig <martin@ximian.com>
14568 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
14571 2005-07-11 Martin Baulig <martin@ximian.com>
14573 * loader.c (find_method): Also lookup in
14574 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
14576 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14578 * appdomain.c (mono_domain_unload): Don't free the error message
14579 before passing it to mono_get_exception_...
14581 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
14583 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
14585 * threads.c: try to better guess an available RT signal (bug #75387).
14587 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14589 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
14592 2005-07-07 Martin Baulig <martin@ximian.com>
14594 * class.c (mono_type_get_name_full): Return NULL for
14595 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
14598 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14600 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
14601 exit the appdomain as well being aborted.
14603 * threadpool.c: Create all threadpool threads inside the root appdomain, and
14604 change back to the root domain after calling managed code. This enables
14605 appdomains using threadpools to be unloaded.
14607 2005-07-07 Martin Baulig <martin@ximian.com>
14609 * class-internals.h
14610 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
14611 into `MonoDynamicGenericClass' since we only need it for dynamic
14614 * reflection.c (mono_class_bind_generic_parameters): We don't need
14615 to compute the `parent' here.
14617 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
14619 * culture-info-table.h : regenerated.
14621 2005-07-06 Martin Baulig <martin@ximian.com>
14624 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
14626 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
14628 2005-07-06 Martin Baulig <martin@ximian.com>
14630 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
14631 we're doing a signature-only comparision; fixes #74945.
14633 2005-07-06 Martin Baulig <martin@ximian.com>
14635 * class-internals.h (MonoGenericClass): Moved some things out into
14636 a new `MonoInflatedGenericClass' type.
14637 (MonoInflatedGenericClass): New type; the `klass' of a
14638 `MonoGenericClass' is now computed lazyly in
14639 mono_get_inflated_generic_class().
14641 * class.c (mono_get_inflated_generic_class): New public function.
14642 (mono_class_inflate_generic_method): Removed the unused
14643 `MonoClass *' argument.
14644 (setup_generic_vtable): Don't call mono_get_inflated_method() on
14646 (mono_class_create_generic): Make this static and merge it with
14647 mono_class_create_generic_2(); we're now called automatically from
14648 mono_get_inflated_generic_class().
14650 * loader.c (mono_method_signature): Call
14651 mono_get_inflated_method() here.
14653 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
14655 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
14656 type of fields with RVA.
14658 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
14659 for this pseudo class.
14660 (my_mono_class_from_generic_parameter): Likewise.
14661 (mono_class_init): Allow interfaces to have cctors.
14663 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
14665 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
14666 lazily for AOT methods.
14668 2005-07-05 Martin Baulig <martin@ximian.com>
14670 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
14671 returns FALSE for a successful match, not TRUE.
14673 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
14675 * loader.c (mono_method_get_index): Optimize this a bit.
14677 2005-07-04 Martin Baulig <martin@ximian.com>
14680 (class_compute_field_layout): Move the check for generic type
14681 definitions into mono_class_layout_fields(). Fixes #74684.
14682 (mono_class_from_generic_parameter): Correctly compute
14683 `klass->parent'; fixes #75457.
14685 * reflection.c (register_assembly, register_module): Make sure
14686 `domain->rejobject_hash' is already created.
14688 2005-07-02 Martin Baulig <martin@ximian.com>
14690 * class-internals.h
14691 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
14692 `MonoDynamicGenericClass'.
14694 2005-07-01 Lluis Sanchez <lluis@ximian.com>
14696 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
14697 returned by a field getter is null, since null is a valid value.
14699 2005-07-01 Martin Baulig <martin@ximian.com>
14701 * reflection.c (mono_reflection_generic_class_initialize): Update
14702 the `dgclass->fields [i].parent' to the correct class.
14703 (mono_image_get_fieldref_token): Use the declaring type, not the
14706 2005-07-01 Martin Baulig <martin@ximian.com>
14708 * loader.c (find_method): Also look in the interfaces; fixes #75429.
14710 2005-06-30 Ben Maurer <bmaurer@ximian.com>
14712 * threads.c (thread_cleanup): assert that thread != NULL
14713 (wait_for_tids_or_state_change): We were using the wrong variable
14714 when accessing wait->threads. `i' was always out of the bounds of
14717 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14719 * loader.c: map user32 and kernel32 to libMonoSupportW
14721 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
14723 * appdomain.c (unload_thread_main): Mark this as WINAPI.
14725 2005-06-28 Martin Baulig <martin@ximian.com>
14727 * loader.c (method_from_methodspec): Fix #75334.
14729 2005-06-28 Martin Baulig <martin@ximian.com>
14731 Fix #74953 - Arrays now implement the generic IList<T> interface
14732 on the 2.0 platform.
14734 * class-internals.h (MonoDefaults): Added `generic_array_class'.
14736 * reflection.c (mono_class_bind_generic_parameters): New public
14737 function; similar to mono_reflection_bind_generic_parameters(),
14738 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
14740 * domain.c (mono_init_internal): Try to initialize.
14741 `mono_defaults.generic_array_class' here; this'll only succeed if
14742 we're using the 2.0 corlib.
14745 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
14746 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
14747 (mono_lookup_internal_call): Added support for nested classes.
14750 (mono_get_method_from_token): Set `result->signature->pinvoke' if
14751 we're an interncall and have generic arguments.
14754 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
14755 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
14756 instance of System.Array.InternalArray<T> for arrays, so they
14757 implement the generic IList<T> interface.
14759 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
14761 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
14762 (chastamar@yahoo.com). Fixes #75374.
14764 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
14766 * culture-info-table.h: regenerated.
14768 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14770 * icall.c: handle spaces correctly for base64 strings.
14772 2005-06-26 Ben Maurer <bmaurer@ximian.com>
14774 * *.c: Kill some warnings.
14776 2005-06-23 Duncan Mak <duncan@novell.com>
14778 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
14779 that this builds on Solaris 10 (x86).
14781 2005-06-23 Martin Baulig <martin@ximian.com>
14784 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
14785 generic type definitions.
14787 2005-06-23 Martin Baulig <martin@ximian.com>
14791 * metadata.c (mono_class_get_overrides): Renamed to
14792 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
14793 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
14794 pass it to mono_get_method_full().
14796 2005-06-22 Ben Maurer <bmaurer@ximian.com>
14798 * reflection.c (mono_reflection_create_runtime_class): take the
14799 mono_domain_lock in this method. Prevents deadlocks
14801 2005-06-22 Martin Baulig <martin@ximian.com>
14803 * loader.c (method_from_methodspec): Fix #75330.
14805 2005-06-22 Martin Baulig <martin@ximian.com>
14807 * reflection.c (type_get_qualified_name): Use
14808 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
14809 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
14810 argument; use it if we don't have an assembly name.
14812 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
14814 * object.c: In mono_message_init, set "copy out" flag for in
14815 parameters with the [Out] flag.
14817 2005-06-21 Martin Baulig <martin@ximian.com>
14820 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
14823 2005-06-21 Martin Baulig <martin@ximian.com>
14825 * class.c (mono_class_init): Don't initialize `class->fields' for
14826 generic instances since they're initialized again in
14827 compute_field_layout().
14828 (compute_field_layout): Set the field's `generic_info' here; fix
14831 2005-06-21 Martin Baulig <martin@ximian.com>
14833 * class-internals.h
14834 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
14836 * metadata.c (mono_metadata_generic_method_equal): Also
14837 distinguish the `generic_class'; fixes #75334.
14839 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14843 * domain-internals.h:
14844 * reflection.c: 'domain_assemblies' field is now protected by its own
14845 lock. Don't call into managed code to run the AssemblyLoad event if we
14846 now there are no registered delegates for it.
14848 2005-06-20 Martin Baulig <martin@ximian.com>
14850 * class.c (mono_class_is_assignable_from): Use a custom version of
14851 mono_class_has_parent() to make things work for generic instances;
14854 2005-06-20 Martin Baulig <martin@ximian.com>
14856 * loader.c (method_from_methodspec): Apply a patch from
14857 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
14859 2005-06-20 Martin Baulig <martin@ximian.com>
14861 * class.c (mono_class_init): Reverted Zoltan's last change; it
14864 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
14866 * threads.c (wait_for_tids_or_state_change): Add missing locking.
14868 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14870 * socket-io.c: fix the index in the socket array for writable/error
14871 sockets. Fixes bug #75306.
14873 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
14875 * class.c (mono_class_init): Allow interfaces to have static ctors.
14877 2005-06-17 Martin Baulig <martin@ximian.com>
14879 * loader.c (method_from_methodspec): Use `context->container' when
14880 parsing the `gmethod->inst'.
14882 2005-06-17 Martin Baulig <martin@ximian.com>
14884 * class.c (mono_type_get_name_recurse): Don't add the assembly
14885 name for type arguments.
14887 2005-06-15 Martin Baulig <martin@ximian.com>
14889 * reflection.c (mono_image_get_inflated_method_token): Encode
14890 correct klass; fixes #75260.
14892 2005-06-13 Michal Moskal <malekith@nemerle.org>
14894 * icall.c: Make GetCorrespondingMethod/Constructor take
14895 MonoReflectionMethod method not MonoMethod. Removed
14896 MonoType.GetCorrespondingField, and make
14897 MonoGenericType.GetCorrespondingField take name not
14900 2005-06-13 Michal Moskal <malekith@nemerle.org>
14902 * reflection.c (field_encode_signature, encode_locals):
14903 Make sizes of buffers for types larger (for big generic types).
14904 (create_generic_typespec,
14905 mono_reflection_sighelper_get_signature_local,
14906 mono_reflection_sighelper_get_signature_field):
14907 Add asserts for too small buffers.
14909 2005-06-15 Martin Baulig <martin@ximian.com>
14911 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
14912 if our parent is not a dynamic type.
14914 2005-06-15 Martin Baulig <martin@ximian.com>
14916 * class-internals.h (MonoTypeNameFormat): New enum.
14919 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
14920 (mono_type_get_full_name): Removed.
14921 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
14922 argument instead of the boolean's.
14924 * icall.c (ves_icall_System_MonoType_getFullName):
14925 Added `gboolean assembly_qualified'.
14928 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
14930 * reflection.c (mono_reflection_parse_type): Parse the new type
14933 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14935 * icall.c: no need to convert from utf16 to utf8 and then back again
14936 after the call to GetLogicalDrives.
14938 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14940 * icall.c: frombase64. Fix problems exposed by new tests.
14942 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14944 * icall.c: added internal calls for converting char [] and strings in
14945 base64 into byte [].
14947 2005-06-10 Martin Baulig <martin@ximian.com>
14949 * class.c (mono_class_create_generic_2): Read the nested classes
14950 from the metadata rather than from `gklass->nested_classes' since
14951 `gklass' might not be initialized yet.
14953 2005-06-09 Duncan Mak <duncan@novell.com>
14955 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
14956 all public headers. Fixes #74919.
14958 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
14960 * domain.c: The key for proxy_vtable_hash is now a pointer
14961 array. Added new GHashFunc and GCompareFunc functions for this.
14963 * class.h: The list of interfaces in MonoRemoteClass is known in
14964 advance and can't grow (we create a new MonoRemoteClass if needed),
14965 so now the interface array can be allocated together with
14968 * object.c: Added a new method create_remote_class_key.
14969 Fixed mono_remote_class so it does not depend on
14970 mono_upgrade_remote_class.
14971 Removed extend_interface_array.
14972 Added new method clone_remote_class(), which makes a copy of a remote
14973 class and adds a new interface or class to it.
14974 mono_upgrade_remote_class() now creates a new remote class (or gets
14975 it from the cache) if an vtable upgrade is needed. In this way
14976 we make sure that other objects sharing the same remote class
14977 don't get the new vtable with unwanted interfaces.
14979 * object-internals.h:
14980 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
14982 * marshal.c: Track changes in mono_upgrade_remote_class().
14984 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
14985 * icall.c: Add runtime methods for obtaining members of inflated
14986 class, which were created from supplied non-inflated members. It
14987 is used in internal Get{Method,Constructor,Field} methods in
14990 2005-06-09 Martin Baulig <martin@ximian.com>
14993 (mono_reflection_bind_generic_method_parameters): Fix #75169.
14995 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14996 * reflection.c (mono_image_basic_init): Define
14997 Version in MonoDynamicAssembly.
14999 2005-06-08 Martin Baulig <martin@ximian.com>
15004 (mono_method_signature_full): New public method; takes a
15005 `MonoGenericContext *'.
15006 (find_method): Use mono_method_signature_full() and pass the
15007 klass'es context to it.
15009 * class.c (mono_class_is_inflated_method): Use
15010 mono_method_signature_full() and pass the context to it.
15012 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
15014 * object.c: add proper locking in mono_remote_class_vtable(),
15015 fixes possible memory corruption.
15017 2005-06-08 Michael Meeks <michael.meeks@novell.com>
15019 * marshal.c (mono_remoting_marshal_init): set
15020 initialized after initialization.
15022 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
15024 * locales.c : hush.
15026 2005-06-06 Michael Meeks <michael.meeks@novell.com>
15028 * object.c (extend_interface_array): fix really silly
15029 memory corrupting / comparison bug.
15031 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
15033 * reflection.c: Functions added to support the creation
15034 of CustomAttributeData, which includes Attribute data
15035 used by ReflectionOnly methods.
15037 * reflection.h: mono_reflection_get_custom_attrs_data and
15038 mono_custom_attrs_data_construct added (functions exposed).
15040 * icall.c: Added mono_reflection_get_custom_attrs_data
15043 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
15045 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
15048 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
15050 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
15052 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
15053 dynamic DllImportAttribute.
15055 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
15056 dynamic DllImportAttribute.
15058 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
15061 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15063 * threads.c: avoid segfault when an unstarted thread is aborted.
15065 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
15067 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
15068 Returns the name and version of the runtime for reporting.
15070 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15072 * appdomain.c: bump corlib version.
15073 * object-internals.h: new field in MonoReflectionAssembly.
15075 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15077 * object-internals.h: Carlos forgot to add this field.
15079 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
15081 * icall.c: Added create_version to create instances
15082 of Version of MonoReflectionAssemblyName. This change helps
15083 the AssemblyName tests to keep running fine.
15085 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
15087 * object.c (mono_method_return_message_restore): A somehow less
15088 intrusive fix for #75138.
15090 2005-06-03 Raja R Harinath <rharinath@novell.com>
15092 * object.c (mono_method_return_message_restore): Fix computation
15093 of expected number of out args.
15095 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
15097 * reflection.c (mono_image_get_method_info): Fix the case when the
15100 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
15102 * object.c: Added missing null check in
15103 mono_method_return_message_restore.
15105 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
15107 * reflection.c (mono_image_get_method_info): Handle the case when
15110 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
15112 * object.c: When creating the vtable for a proxy, take into account
15113 all inherited interfaces, not only the ones registered in
15114 iclass->interfaces. This fixs bug #74996.
15115 Also, in mono_method_return_message_restore, verify that the array
15116 of out args has the expected lengh.
15118 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15120 * socket-io.c: update the timeout in Poll when the call is interrupte.
15122 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15124 * socket-io.c: support abort/suspend in Select_internal after last
15127 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15129 * threadpool.c: remove warning.
15131 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15134 * socket-io.[ch]: Select_internal uses poll() now when available, thus
15135 removing the 1024 limit from select(). Runtime part of the fix for
15138 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15140 * socket-io.c: when resolving the addresses for the same
15141 host returned by gethostname(), get the local IPs from the interface
15142 list. Loopback addresses are discarded if the are interfaces up with
15143 non-loopback ones. Fixes bug #63265.
15145 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
15147 * appdomain.c, verify.c, object-internals.h, reflection.c:
15148 bumped corlib number to 36, and added new extra_flags field
15149 to ReflectionMethodBuilder and friends. Fixes #75060.
15151 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
15153 * gc.c: register a new weak link only if the object is non-null
15156 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
15158 * culture-info.h : short time pattern too.
15160 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
15162 * culture-info.h : expand long time pattern string length.
15164 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
15166 * culture-info-table.h : update (more French date format; #72788).
15168 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
15170 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
15171 the method is static. Fixes #75029.
15173 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
15175 * reflection.c: Update the table_idx field of method builders after
15176 saving the module, since it can change. This is a workaround for
15179 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
15181 * culture-info-table.h : update (additional French date format).
15183 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
15185 * icall.c (ves_icall_type_Equals): Revert last change.
15187 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
15189 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
15191 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
15193 * class-internals.h: Added executioncontext_class field to
15194 MonoDefaults structure.
15195 * domain.c: Cache System.Threading.ExecutionContext class in
15197 * object.c: Capture the ExecutionContext for asynchroneous calls in
15198 mono_async_result_new.
15199 * object-internals.h: Added execution_context and original_context
15200 fields to MonoAsyncResult. Added execution_context to MonoThread.
15201 * security-manager.c|.h: Added mono_get_context_capture_method to
15202 return the capture method (if required by the security manager or by
15203 the framework version used).
15204 * threadpool.c: Apply capture (if present) ExecutionContext in
15205 mono_async_invoke and revert to original context after it completes.
15207 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
15209 * culture-info-table.h : updated (real hacky solution for zh-CHT).
15211 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
15213 * culture-info-table.h : zh-CHT related workaround.
15215 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
15217 * marshal.c (emit_marshal_custom): Add some error checking and call the
15218 methods in the ICustomMarshaler interface. Fixes #74875.
15220 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
15221 native->managed wrappers.
15223 2005-05-12 Martin Baulig <martin@ximian.com>
15225 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
15226 here and use the loader lock.
15228 * mono-debug.c: Properly lock when the debugger is not attached.
15229 (mono_debug_init): Release the initial lock if we're not running
15232 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
15234 * marshal.c (emit_marshal_custom): Pass through NULL values without
15235 calling the custom marshalling routines.
15237 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
15238 conversion in structures. Fixes #74882.
15240 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
15242 * culture-info-table.h : zh-* cultures were missing.
15244 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
15246 * threads.c: Added a new event background_change_event which is signaled
15247 when a thread changes its background mode.
15248 Moved here several checks previously done in managed code. The checks
15249 require the thread lock, and using the thread lock in managed code
15250 can result in deadlocks.
15251 Merged Start_internal and Thread_internal into a single method. Now
15252 Thread_internal does all work of creating and starting a thread.
15253 Added icalls for setting and getting the state of the object. Moved from
15254 managed code to avoid locking there.
15255 Added wait_for_tids_or_state_change() which is called instad of
15256 wait_for_tids when waiting for non-backround threads to end. This method
15257 will return if one of the threads ends or the background_change_event
15259 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
15260 the background mode. This method signals the background_change_event
15263 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
15264 removed Start_internal.
15266 2005-05-11 Martin Baulig <martin@ximian.com>
15268 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
15269 to order of some fields to get proper alignment on 64-bit machines.
15271 2005-05-11 Martin Baulig <martin@ximian.com>
15273 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
15274 changes as they're broken and completely fuck up the debugger.
15276 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
15278 2005-05-10 Martin Baulig <martin@ximian.com>
15280 * reflection.c (mono_reflection_generic_class_initialize): Don't
15281 call mono_class_setup_parent() here.
15283 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15285 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
15286 send/receive timeout use an integer in milliseconds. We were using a
15289 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15292 (internal_get_cultures): reserve the first slot of the array for the
15293 InvariantCulture, which will be filled in managed code.
15295 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
15297 * reflection.c (mono_image_fill_module_table): Initialize the
15298 GENERATION field as well.
15300 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15302 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
15303 Monitor.Enter on the object.
15305 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
15307 * threads.c: Enable the wait for running threads when exiting.
15308 * icall.c: Suspend all threads before exiting.
15310 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
15312 * assembly.c (mono_assembly_load_reference): Fix warning.
15314 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15316 * threadpool.c: changed the default number of threads per cpu. From now
15317 on, the default will be 20 + (5 * number of cpus) instead of 50.
15319 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
15321 * loader.c (mono_method_get_signature_full): Add locking here.
15323 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
15325 * appdomain.c: Moved methods for parsing and freeing assembly
15326 names to assembly.c.
15327 * assembly.c, domain-internals.h: Created public methods for parsing
15328 assembly names. Fixed mono_assembly_load_with_partial_name:
15329 it now finds the best match, taking into account the version,
15330 token and culture specified in the partial name. Also return
15331 the latest version if no version information is specified.
15333 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
15335 * threadpool.c: replace check for SocketAsyncCall class.
15337 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15339 * threadpool-internals.h:
15340 * Makefile.am: added threadpool-internals.h
15342 * threadpool.c: call mono_unhandled_exception on exceptions not handled
15343 that happen in threadpool threads (tested on MS).
15344 (mono_thread_pool_remove_socket): new function that dispatch any pending
15345 AIO call on a socket that is closing. By now only epoll really needs it,
15346 as select/poll wake up when the socket closes.
15349 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
15351 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
15353 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
15355 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
15357 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
15359 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
15361 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
15362 has an abort request, convert it into a suspend request.
15364 2005-04-30 Ben Maurer <bmaurer@ximian.com>
15366 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
15367 warning for the usage of `UnmanagedFunctionPointerAttribute' which
15368 is not supported yet.
15370 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15372 * image.c: register assemblies loaded from data (bundles) in the loaded
15373 assemblies hash. Fixes bug #74772.
15375 2005-04-29 Martin Baulig <martin@ximian.com>
15377 * class.c (mono_type_get_name_recurse): Update to the new naming
15378 schema from the latest .NET 2.x beta2.
15379 (mono_class_setup_vtable_general): If we're a generic instance,
15380 copy the vtable from our generic type definition and inflate all
15383 * loader.c (find_method): Update to the new naming schema from the
15384 latest .NET 2.x beta2.
15386 2005-04-29 Raja R Harinath <harinath@gmail.com>
15388 * class.c (mono_class_init): Add a mono_loader_unlock to the
15391 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
15393 * icall.c (ves_icall_System_Environment_Exit): Remove the
15394 suspend_all_other_threads () call for the time being, since it can hang.
15396 * threads.c (mono_thread_manage): Similarly, disable the waiting for
15397 the background threads to exit, since it can also hang.
15399 * class.c (mono_class_init): Applied patch from Ankit Jain
15400 (radical@gmail.com). Avoid pending init errors when a field refers
15401 to a nested class using a typeref. Fixes #74734.
15403 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
15404 this for dynamic modules.
15406 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15408 * threads.c: don't wait for threads that are in the process of aborting
15409 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
15410 and waiting for background threads to finish. This makes xsp and
15411 mod-mono-server exit without random length delays and/or hangs.
15413 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15415 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
15417 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
15419 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
15420 dynamic types to prevent infinite loops. Fixes #74727.
15422 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
15423 ..._is_assignable_to.
15425 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
15427 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
15429 2005-04-25 Martin Baulig <martin@ximian.com>
15431 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
15434 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
15436 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
15438 * reflection.c (build_compressed_metadata): Set metadata header
15441 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
15443 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
15444 number into an integral and a decimal part. Fixes #70473.
15446 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
15448 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
15450 * culture-info-table.h : reflected the latest locale-builder output.
15452 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15454 * threadpool.c: check for SuspendRequested too when deciding if
15455 mono_thread_interruption_checkpoint should be called.
15457 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15459 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
15460 * threads.c: remove interruption_mutex and use Interlocked instead. When
15461 suspending all the threads, wait for all the suspended events at once.
15462 If we're shutting down and get an APC that is going to be queued,
15463 call mono_thread_execute_interruption immediately, as the thread might
15464 be sleeping on a pthread condition or mutex.
15466 * icall.c: call mono_runtime_set_shutting_down before suspending the
15469 Fixes bug #74693. And now xsp is happier when exiting.
15471 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
15473 * loader.c (mono_stack_walk): Fix #74690.
15475 2005-04-22 Martin Baulig <martin@ximian.com>
15477 * mono-debug.h (MonoDebugMethodJitInfo): Added
15478 `MonoDebugMethodJitInfo *jit'.
15480 * mono-debug.c (mono_debug_read_method): Cache the
15481 MonoDebugMethodJitInfo in `address->jit'.
15482 (mono_debug_free_method_jit_info): New public method.
15484 2005-04-22 Martin Baulig <martin@ximian.com>
15486 * class.c (mono_class_is_assignable_from): Disallow
15487 type parameter -> interface.
15489 2005-04-21 Dick Porter <dick@ximian.com>
15491 * threads.c (mono_thread_create): Turn an assertion into an error.
15493 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
15495 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
15497 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
15498 Fix some gcc 4.0 warnings.
15500 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
15502 * file-io.c: fix alt dir separator char on unix systems
15503 and cleanup (fixes bug #71214).
15505 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
15507 * marshal.c: Use CALLVIRT instead of CALL when dispatching
15508 a call to a remote domain, since the method may be an
15509 interface method in the client domain. This fixes bug #74192.
15511 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15513 * threadpool.c: recv/send are now performed before going back to managed
15514 code to save one transition.
15516 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15518 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
15520 * metadata/threadpool.c: removed hack to workaround the bug above.
15524 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
15526 * reflection.c reflection.h: Fix handling of parameter defaults in
15527 dynamic methods. Also fixes handling of parameter attributes.
15530 * mono-debug.c (mono_debug_close_image): Fix warning.
15532 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15534 * socket-io.h: replaced old unused field with new 'blocking'.
15535 * threadpool.c: restore socket blocking state on windows(tm).
15537 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
15539 * icall.c: don't return the codebase in the AssemblyName[] returned by
15540 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
15541 * object-internals.h: Removed FIXME (fields were presents) and fixed
15542 versioncompat declaration.
15544 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15546 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
15547 not closed, so don't cleanup when it happens.
15549 2005-04-13 Chris Toshok <toshok@ximian.com>
15551 * mono-debug-debugger.h: change prototype for
15552 mono_debugger_lookup_type.
15554 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
15555 this function, although it should probably be named
15556 mono_debugger_init_type.
15558 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15560 * threadpool.c: fix non-AIO case.
15562 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
15564 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
15565 the built-in profiler to measure just JIT compilation times.
15567 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15569 * threadpool.c: the epollfd might be closed by another thread at
15570 any time, so ignore EBADF at treat it as a "we're closing" sign.
15572 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15574 * threadpool.c: release the semaphores with a count equals to the number
15575 of working threads in both IO and regular pools. Fixed typo that messed
15576 up the count of IO pool threads. Don't initialize the pipe handles if
15579 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15581 * threadpool.c: some systems don't like a NULL when deleting the socket
15584 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15586 * threadpool.c: fix semaphore allocation.
15588 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15590 * threadpool.c: added epoll() based implementation for asynchronous IO
15591 that is used instead of the default poll() when available.
15592 It can be disabled by setting MONO_DISABLE_AIO.
15594 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15596 * threadpool.c: windows needs 'closesocket' and instead of returning
15597 0 when the stream is closed while in select, it returns -1. Fixes bug
15600 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
15602 * class.c (class_compute_field_layout): Fix the regression caused by
15605 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15607 * threadpool.c: separate pool for socket async. IO.
15608 * threadpool.h: mono_max_worker_threads is not a global any more.
15610 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
15612 * class.c (class_compute_field_layout): Fix #74549.
15614 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15616 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
15617 use 2 connected sockets instead.
15619 2005-04-08 Miguel de Icaza <miguel@novell.com>
15621 * mono-config.c: Add new entry point for mkbundle
15622 mono_config_parse_memory.
15624 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15626 * threadpool.c: removed another unused function.
15628 2005-04-08 Ankit Jain <radical@corewars.org>
15630 * reflection.c (get_default_param_value_blobs): Add 'types'
15631 parameter to get the types encoded in the constant table.
15632 (mono_param_get_objects): Use the type from the constant table,
15633 not the type of the parameter, when creating default values.
15634 Handle null default values correctly.
15636 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15643 * socket-io.c: removed dead code for async IO.
15645 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15647 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
15649 * threadpool.c: intercept socket async. calls and pass them to a thread
15650 that is polling and dispatching the job items to the threadpool as
15651 socket become ready. Fixes bugs #71217, #71933.
15653 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
15654 between char and short/ushort arrays.
15656 * socket-io.c: remove dead code.
15658 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
15661 icall.c : removed InternalToUpper_Comp() and
15662 InternalToLower_Comp().
15664 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
15666 * char-conversions.h : The tables were incorrectly generated. Should
15667 be generated against invariant culture.
15669 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
15671 * object.c (mono_runtime_invoke_array): Fix return value when
15672 passing pre-created valuetype objects to ctors.
15674 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
15675 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
15678 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
15680 * domain.c: removed g_assert for runtimesecurityframe_class. This is
15681 only used with --security and hides the wrong corlib version error.
15683 2005-03-30 Joshua Tauberer <tauberer@for.net>
15685 * class.c: Changed mono_class_name_from_token so that types
15686 outside of a namespace don't have an initial period. Improved
15687 the g_warning message used in _mono_class_get when loading
15689 * assembly.c: In mono_assembly_load_reference, when an assembly
15690 can't be found, "No such file or directory" is misleading and
15691 unhelpful because a few paths were checked for the presence of
15692 the assembly. When that happens (ENOENT), display a nicer
15693 message indicating the directories that were searched. In all
15694 cases, the warning is made easier to read for non-hackers.
15696 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
15698 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
15700 * appdomain.h|domain.c: Removed inline from functions.
15701 * appdomain.c: Reduced warnings when compiling on windows.
15702 * icall.c: Fixed output_debug declaration to gunichar2*.
15703 * mono-config.c: Reduced warnings when compiling on windows.
15704 * rand.c: Added missing "windows.h". Added missing return value.
15705 * rawbuffer.c: Added missing winsock2.h for windows.
15706 * sysmath.h: Added mono-compiler.h header to allow/ease
15707 compilation with non-GCC compilers.
15708 * threads.c: Fixed declarations to compile with VS.NET C compiler.
15709 Removed cast warnings.
15711 Adapted from the work of J Lothian (for VC6).
15713 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
15715 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
15718 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
15720 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
15723 2005-03-27 Raja R Harinath <harinath@gmail.com>
15725 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
15726 has to be in $(exec_prefix). $(prefix) is for arch-independent
15727 stuff, and it would probably use $(prefix)/share rather than
15730 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15732 * console-io.c: added 2 includes that might be missing.
15734 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
15736 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
15739 * reflection.c (create_custom_attr): Allocate the params array using
15740 alloca so it gets GC tracking.
15742 2005-03-23 Chris Toshok <toshok@ximian.com>
15744 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
15747 2005-03-24 Raja R Harinath <rharinath@novell.com>
15749 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
15750 changes to pick up any changes in prefix, etc.
15752 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
15754 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
15756 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
15757 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
15759 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
15761 * class-internals.h object-internals.h class.c reflection.c: Extend the
15762 mono_lookup_dynamic_token () function to return the class of the
15765 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
15766 well. Fixes #73848.
15768 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
15770 * security-manager.c: Skip inheritance checks for intra-corlib
15771 class inheritance and method overrides. This skips a lot of checks
15772 and (anyway) permissions cannot work until corlib is loaded.
15774 2005-03-23 Martin Baulig <martin@ximian.com>
15776 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
15777 MONO_TYPE_GENERICINST.
15779 2005-03-23 Martin Baulig <martin@ximian.com>
15781 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
15783 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15785 * class.c: added locking comments to some functions.
15786 Cache the interface offsets arrays (saves about 20 KB
15787 of runtime memory in a typical app).
15788 Reduce the time overhead in mono_class_setup_supertypes ().
15790 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
15792 * icall.c: speedup and fix leaks in GetMethodsByName and
15793 GetPropertiesByName.
15795 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
15797 * reflection.c: some locking fixes.
15799 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
15801 * metadata.c: added missing break in case statement.
15803 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
15805 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
15806 typedbyref return values. Fixes #73941.
15808 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
15810 * security-manager.c|h: Added demandunmanaged method and
15811 suppressunmanagedcodesecurity class to MonoSecurityManager.
15812 Renamed aptc class to allowpartiallytrustedcallers.
15814 2005-03-17 Martin Baulig <martin@ximian.com>
15816 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
15818 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15820 * file-io.c: disabled file async. IO using aio_*. It uses the
15821 threadpool now. Workaround for bug #73718.
15823 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
15825 * assembly.h, mono-config.c: added code to deal with bundled configs
15826 for bundled assemblies.
15828 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
15830 * *.c, private.h: cleanup, removing old private.h header file.
15832 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
15834 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
15835 and throw_on_unmappable_char attributes.
15837 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
15839 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
15840 _ProcessName_internal.
15842 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
15844 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
15847 * icall.c threads.c threads-types.h: Remove slothash icalls as they
15848 are no longer used.
15850 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
15852 * object.c (compute_class_bitmap): Add support for generics. Fixes
15855 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
15857 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
15859 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15861 * filewatcher.c: commented out the code for windows watcher, as we don't
15862 use it (we use the managed implementation instead).
15864 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
15866 * object-internals.h (MonoThread): Remove 'unused1' field.
15868 * appdomain.c: Bump corlib version.
15870 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
15872 * reflection.c (mono_reflection_create_runtime_class): Remove the
15873 AssemblyBuilder.Save optimization since it causes too many problems.
15875 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
15877 * exception.c|h: Added mono_get_exception_reflection_type_load to
15878 create a ReflectionTypeLoadException object.
15879 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
15880 to return NULL is a InheritanceDemand fails during reflection. Updated
15881 ves_icall_System_Reflection_Assembly_GetTypes to throw a
15882 ReflectionTypeLoadException if an InheritanceDemand fails during
15883 reflection. Added icall mapping for GetLinkDemandSecurity.
15884 * security-manager.c|h: Added ves_icall_System_Security_
15885 SecurityManager_GetLinkDemandSecurity internal call to return the
15886 class and methods permissions set for a LinkDemand. Removed unused
15887 fields in MonoSecurityManager.
15889 2005-03-10 Martin Baulig <martin@ximian.com>
15891 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
15892 it's a generic instance.
15894 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
15896 * reflection.c (mono_get_object_from_blob): Applied patch from
15897 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
15899 * class.c (mono_class_is_assignable_from): Another try at fixing
15900 #73469 without breaking anything.
15902 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
15904 * class.c: (mono_class_is_assignable_from): Revert the last changes
15905 since they don't work with generics.
15907 * class.c (mono_class_is_assignable_from): Fix build bustage.
15909 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
15910 the managed IsAssignableFrom method. Fixes #73469.
15912 * reflection.c (mono_reflection_call_is_assignable_from): New helper
15915 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
15917 * object.c (mono_load_remote_field_new): Fix returning uninitialized
15918 memory when the remoting callback does not sets the out arguments.
15921 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
15924 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
15926 * object-internals.h (MonoStackFrame): Sync with managed object layout.
15928 * appdomain.c: Bump corlib version.
15930 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
15932 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
15935 * threads.c (mono_thread_attach): Detect threads which are not started
15936 by the GC pthread wrappers.
15938 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
15940 * icall.c: Added new icall for RNG.
15941 * rand.c|h: Added new icall to open the RNG. This allows to share a
15942 single handle on Linux to access /dev/urandom and fix #73183.
15944 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
15946 * object.c: setting the new vtable in a transparent proxy object must
15947 not change the GC descriptor.
15949 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15951 * object.c: fixed compilation without GCJ support.
15952 * reflection.c: for runtime-created types ensure klass->has_references
15953 is correct (bug #73215).
15955 2005-03-02 Martin Baulig <martin@ximian.com>
15957 * class.c (mono_class_is_assignable_from): Make this work if
15958 `oklass' is a generic instance; fixes #72831.
15960 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
15962 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
15965 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
15967 * marshal.c: Reorganize native->managed marshalling code to also use
15968 the emit_marshal_... functions.
15970 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
15972 * object.c: typed allocs have issues with bitmap sizes > 30,
15973 so check for max_set >= 30.
15975 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
15977 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
15978 managed code. Fixes #73012.
15980 * metadata.h (MonoMarshalSpec): Add elem_mult field.
15982 * metadata.c reflection.c: Load/Emit elem_mult as well.
15984 * metadata.h (MonoMarshalSpec): Add comment.
15986 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
15988 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
15989 num_elem to -1 if not given.
15991 * object-internals.h (MonoReflectionMarshal): Add has_size field.
15993 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
15996 2005-03-01 Marek Safar <marek.safar@seznam.cz>
15998 * null-gc.c (mono_gc_free_fixed): Was not compilable.
16000 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
16002 * reflection.c (encode_marshal_blob): Encode param_num field as well.
16004 * object-internals.h (MonoReflectionMarshal): Add param_num field.
16006 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
16008 * object.c: generalized the reference bitmap creation
16009 and added hooks for the new GC.
16010 * class-internals.c: removed the gc_bitmap field from MonoClass.
16012 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16014 * domain.c: help the compiler to produce better code
16015 in mono_jit_info_table_find ().
16017 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
16019 * object.c: make all allocations look typed.
16021 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16023 * socket-io.c: load Mono.Posix if it's not loaded already
16026 2005-02-24 Martin Baulig <martin@ximian.com>
16028 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
16029 * reflection.c (dup_type): Likewise.
16031 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
16033 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
16034 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
16036 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
16038 * domain.c, threads.c, object-internals.h: make the critical thread
16039 local vars use the fast access mode (even when we're compiled in
16040 a lib). Provide accessors to be used by the jit during codegen.
16042 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
16044 * appdomain.c: Changed hook functios behavior to include
16045 support for the reflection only assemblies. Some icalls were changed
16046 to support the mentioned assemblies too. Signatures of static methods
16047 try_assembly_resolve and real_load now have an additional parameter:
16050 * assembly.c: General changes to mono_assembly_ methods to support
16051 reflection only api. Functions mono_assembly_open, mono_assembly_load,
16052 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
16053 suffix, to support an additional gbool parameter to specify whether
16054 the assembli is reflection only or not. Created some new hook functions
16055 to add support for reflection only assemblies. Signatures of static
16056 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
16057 have now an additional parameter: refonly.
16059 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
16060 indicating whether the assembly is reflection only or not.
16062 * exception.c: Add mono_get_exception_invalid_operation.
16064 * icall.c: Throw an InvalidOperationException when trying to invoke
16065 a property/method/event, or trying to set/get the value of a field.
16066 Also add an icall to retrieve the ref_only flag to the
16067 MonoReflectionAssembly.
16069 2005-02-23 Chris Toshok <toshok@ximian.com>
16071 Part of fix for #72827.
16072 * mono-debug.c (mono_debug_add_method): add lexical block data to
16073 the info we write. Kind of a hack at the moment - we copy the
16074 lexical block info from the MonoDebugMethodInfo to the
16075 MonoDebugMethodJitInfo here, before writing it.
16076 (mono_debug_read_method): read the lexical block info.
16078 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
16080 * debug-mono-symfile.h: add lexical block support.
16082 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
16085 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
16087 * loader.c (mono_lookup_pinvoke_call): Fix warning.
16089 * object.c (mono_runtime_free_method): Call mono_free_method () and
16090 put the TODOs there.
16092 * loader.c (mono_free_method): Free up most memory allocated for
16095 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16097 * reflection.c: properly flag a Type argument to a
16098 named custom attr value (bug #72248).
16100 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
16102 * reflection.c: reduce code duplication in named custom
16103 attribute encoding.
16105 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
16107 * reflection.c: properly encode custom attrs of type object
16110 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
16112 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
16114 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
16116 * socket-io.c: load System.dll if it's not loaded already
16117 (bug #72850 and #70477).
16119 2005-02-21 Martin Baulig <martin@ximian.com>
16121 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
16124 2005-02-21 Martin Baulig <martin@ximian.com>
16126 * reflection.c (mono_image_build_metadata): We also need to
16127 "fixup" the MethodImpl table after we computed the final method
16128 indices. Call fixup_methodimpl() to do that.
16129 (fixup_methodimpl): New private method.
16131 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
16133 * assembly.c: special case mscorlib.dll (bug#72536),
16134 patch from Carlos Alberto Cortez.
16136 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
16138 * threads-types.h threads.c: Fix build bustage.
16140 * threads.c: Use a union for long<->double conversions.
16142 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
16143 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
16145 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
16146 containing the checkpoint call with NOT_TAKEN.
16148 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
16149 checkpoint before pushing the arguments, so they won't have to be
16152 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16154 * domain.c, assembly.c, domain-internals.h: make some data
16155 const and relocation-free.
16157 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
16159 * object.c, appdomain.c, class-internals.h: introduce the
16160 MonoClassRuntimeInfo structure to hold the info needed to
16161 use a class at runtime. Made mono_class_vtable() lock-free
16162 for all the appdomains.
16164 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
16166 * metadata-internals.h, image.c: introduce a per-image mempool to
16167 be used for memory that has the same lifetime as the image.
16169 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
16171 * domain.c: In mono_init_internal(), instead of selecting the first
16172 runtime version supported by an executable, get a list of all
16173 supported versions and select the one for which an mscorlib exists
16174 (since even if the runtime supports a given version, it doesn't mean
16175 that the framework for that version is installed).
16176 Modified get_runtimes_from_exe to support this behavior.
16177 In supported_runtimes, added information about additional system
16180 * assembly.c: Added support for more than one system assembly version
16181 per runtime version. Updated the assembly list.
16182 In mono_assembly_remap_version, removed the initial version check,
16183 since we don't know to which version we need to compare until we
16184 get the version set on which the assembly is based.
16185 Moved the code for loading corlib into the new method
16186 mono_assembly_load_corlib(), so it can be used by the initialization
16189 * domain-internals.h: Updated data structures and added declaration
16190 for mono_assembly_load_corlib.
16192 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
16194 * reflection.c (resolve_object): Fix the creation of the signature in
16195 the SignatureHelper case.
16197 * assembly.c (mono_assembly_remap_version): Fix binary search.
16199 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
16201 * class.c: Added inheritance check when a method is overloaded (from a
16202 virtual method or when implementing an interface) and when a class is
16203 inherited. Added functions to set a failure for a class and to
16204 retreive the exception from a failure.
16205 * class-internals.h: Added fields to MonoClass to keep the exception
16206 information status for inheritance (or other exceptions) to be thrown
16207 later (i.e. not at load time).
16208 * object.c: Throw the inheritance SecurityException when a type is to
16209 be created with either class or method inheritance violations.
16210 * reflection.c|h: Fix when getting declsec from a class. Removed
16211 unrequired code for class. Improved sanity in parameter naming.
16212 * security-manager.c|h: Added functions to check for class and method
16215 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
16217 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
16218 and has_finalize in dynamic types as well.
16220 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
16222 * culture-info-table.h : fixed currency format for en-GB (and so on).
16224 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
16226 * gc.c: ensure the GC handles never have 0 as a value.
16228 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
16230 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
16231 a pointer to a struct to unmanaged code. Fixes #72625.
16233 2005-02-16 Martin Baulig <martin@ximian.com>
16235 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
16237 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
16239 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
16241 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
16243 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
16245 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
16246 UnmanagedFunctionPointerAttribute, use it for determining calling convention
16249 * reflection.c (mono_custom_attrs_get_attr): New helper function.
16251 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
16253 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
16255 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
16256 changes to make the current context a field in MonoThread.
16258 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
16260 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
16263 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
16264 extracted from mono_marshal_get_native_wrapper.
16266 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
16267 to create wrappers around native functions.
16269 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
16270 delegates for arbitrary function pointers. Fixes #71472.
16272 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
16274 * threads.c: cleaned up the code a little.
16276 2005-02-15 Martin Baulig <martin@ximian.com>
16278 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
16281 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
16282 allocate larger chunks if needed.
16284 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
16286 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
16289 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
16291 * domain.c: keep the domains in an array and ensure the domain ids
16292 are kept small, so they can be used as indexes to domain-specific data
16293 with a small memory overhead.
16295 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
16297 * icall.c: Handle byref types in Type icalls. Fixes #72544.
16299 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
16301 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
16303 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
16305 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
16307 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
16310 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
16312 2005-02-12 Ben Maurer <bmaurer@ximian.com>
16314 * domain-internals.h: add the hashtable here.
16316 * class-internals.h: Remove `info' from MonoMethod
16318 * domain.c: Add a new hashtable, jit_trampoline_hash
16320 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16322 * object.c: don't set the value of static fields
16325 2005-02-11 Martin Baulig <martin@ximian.com>
16327 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
16328 (mono_debug_add_method): Silently ignore the method if it's too big.
16329 (mono_debug_add_type): Likewise.
16331 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
16333 * threads.c, appdomain.c: remove #ifdefs from the code.
16335 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
16337 * metadata-internals.h: Added flags to MonoAssembly to cache the most
16338 common security informations. This allows us to stay in unmanaged code
16339 when doing LinkDemand and it's special cases (except for the first
16340 time for initialization). The flags a very much used with --security.
16341 * reflection.c|h: Added code to get declarative security attributes
16342 for LinkDemand and InheritanceDemand. This required to refactor the
16343 existing code for Demand.
16344 * security-manager.c|h: Added new method fields for the special cases
16347 2005-02-10 Martin Baulig <martin@ximian.com>
16349 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
16350 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
16352 2005-02-10 Martin Baulig <martin@ximian.com>
16354 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
16355 debugging code; this is almost a complete rewrite.
16357 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
16359 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16361 * domain.c, object.h: expose mono_string_equal () and
16362 mono_string_hash ().
16363 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
16364 it's implemented in managed code.
16366 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16368 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
16369 lo leak objects between appdomains.
16371 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16373 * assembly.c: old compilers compilation fix from
16374 robertj@gmx.net (Robert Jordan).
16376 2005-02-09 Ben Maurer <bmaurer@ximian.com>
16378 * class-internals.h: Little reminder for the future.
16380 * debug-helpers.c: Fix up wrapper_type_names
16382 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16384 * image.c, metadata-internals.h: when loading an image from a file,
16385 mmap all of it and use the same codepaths as when using a
16386 in-memory image: the code is simpler and we use less memory
16387 (both writable and readonly).
16389 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
16391 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
16392 API to alloc runtime data structures that need to be tracked by the
16393 GC and contain pointers.
16394 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
16395 make the code more readable and eventually use a different GC.
16397 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
16399 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
16402 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
16404 * object.c: In release_type_locks(), don't release the cctor lock
16405 if it has already been released. This fixes a crash in the
16408 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16410 * gc.c, marshal.c, icall.c: register a delegate for finalization
16411 only when the native function pointer has been allocated for it.
16413 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16415 * object.c: cleaned up some code, allocate objects that are
16416 pointer free with the atomic malloc variant. Allocate memory
16417 for static data from the mempool if it's pointer-free.
16418 Allocate the bounds array at the end of the array data, when needed.
16419 * object-internals.h, object.h: move a private function in a private
16421 * class.c: handle missing case in tracking references in fields.
16423 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
16425 * class.c, class-internals.h: keep track if a type has
16426 reference fields in either the instance or static fields.
16428 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
16430 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
16431 and renamed to MonoRuntimeInfo. Added fields to store the expected
16432 framework assembly version. Changed mono_get_framework_version and
16433 mono_get_runtime_version for a single mono_get_runtime_info method.
16435 * assembly.c: Added method to remap system assembly versions to the
16436 current executing runtime version. Removed old mapping code.
16437 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
16439 * icall.c, reflection.c: Track api changes.
16441 2005-02-06 Miguel de Icaza <miguel@novell.com>
16443 * loader.c (method_from_memberref): Improve error reporting,
16444 produce the class name instead of the typeref/typedef index.
16446 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
16448 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
16450 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
16452 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
16453 stdcall and charset name mangling. Reorganize the code and add
16454 some tracing stuff.
16456 2005-02-05 Ben Maurer <bmaurer@ximian.com>
16458 * monodiet.c: More iters!
16460 * marshal.c: Iter usage.
16462 * icall.c: Iter usage.
16464 * object.c: Use iters.
16466 * debug-helpers.c: More iters
16468 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
16470 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
16473 2005-02-05 Ben Maurer <bmaurer@ximian.com>
16475 * mono-debug-debugger.c: use iters
16477 * class.c, class-internals.h: mono_class_setup_events is static
16480 * All callers: use iters
16482 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
16484 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
16485 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
16487 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
16489 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
16491 * marshal.h: Add prototypes for ldfld/stfld_remote.
16493 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
16494 this is called during startup.
16496 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
16498 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
16499 MonoThreadsSync struct private in monitor.c. Changed the way
16500 MonoThreadsSync is allocated so it's faster and there is no
16501 need to keep track of it with a finalizer and it uses less memory.
16502 This also finally allows us to allocate mono objects as ptrfree when
16503 there are no reference fields.
16505 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
16507 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
16508 disappearing link to the GC interface and use them to simplify
16509 the gchandles code.
16511 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
16513 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
16514 stfld_remote which call mono_load/store_field_new. This allows methods
16515 calling ldfld/stfld wrappers to be AOTed.
16517 * console-io.c: Include sys/filio.h under solaris.
16519 * console-io.c: Include curses.h if needed correctly.
16521 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
16523 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
16524 method->klass as well.
16526 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
16528 * class.c (mono_class_init): Switch on lazy initialization of
16531 * class.c (mono_class_get_finalizer): Handle the case when the
16532 finalizer is inherited.
16534 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16536 * console-io.c: <curses.h> is needed by term.h on solaris.
16538 2005-02-03 Ben Maurer <bmaurer@ximian.com>
16540 * icall.c, class-internals.h, monodiet.c, class.c: Remove
16541 mono_class_setup_properties where possible. Remove this ftn from
16542 the header file, and make it static.
16544 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
16546 * loader.c: Add missing setup_... call.
16548 * class.c: Add missing setup_... calls.
16550 * class.c (mono_class_init): Switch on lazy initialization of
16551 the generic vtable.
16553 * class.c (mono_class_init): Fix generics broken by the recent changes.
16555 * monodiet.c (handle_type): Add missing setup_... calls.
16557 * class.c: Back out garbage in previous patch.
16559 * class.c: Add missing setup_... calls.
16561 * class.c (mono_class_get_method_from_name_flags): Avoid calling
16562 mono_class_setup_methods () if possible.
16564 * class-internals.h (MonoClass): Add 'has_cctor' flag.
16566 * class-internals.h (MonoCachedClassInfo): New structure.
16568 * class.c: Initialize properties and events fields of MonoClass lazily.
16570 * class.c: Add infrastructure for lazily initializing the methods and
16571 vtable fields of MonoClass. Not yet used.
16573 * class.c (mono_class_get_finalizer): New helper function.
16575 * class.c: Add infrastructure for loading some class related data from
16578 * object.c: Add infrastructure for initializing the vtable from data
16581 * gc.c (run_finalize): Use mono_class_get_finalizer ().
16583 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
16584 appropriate initialization function before accessing parts of the
16585 MonoClass structure.
16587 * marshal.c: Fix warnings.
16589 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
16591 * mono-debug-debugger.c (get_exception_message): Use
16592 mono_class_get_method_from_name_flags ().
16594 2005-02-02 Ben Maurer <bmaurer@ximian.com>
16596 * reflection.c, appdomain.c: Replace a few manual searches that
16597 Zoltan missed. (Paolo approved this part of my initial patch).
16599 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
16601 * profiler.c: disable recording statistical events at report time.
16603 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16605 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
16606 to byteswap arrays of enum values, too (bug #72080).
16608 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
16610 * appdomain.c (set_domain_search_path): Allow this to be called if
16611 domain->setup is not yet set.
16613 * loader.c (mono_method_get_index): New helper function.
16615 * loader.c reflection.c: Use mono_method_get_index ().
16617 * class.c (mono_class_get_method_from_name_flags): New helper method.
16619 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
16622 * class.c (mono_class_get_cctor): New helper method.
16624 * string-icalls.c object.c class.c marshal.c reflection.c: Use
16625 mono_class_get_method () to look up methods.
16627 2005-02-01 Miguel de Icaza <miguel@novell.com>
16629 * console-io.c: Fix the build, this should work on Windows.
16631 2005-01-31 Ben Maurer <bmaurer@ximian.com>
16633 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
16634 be set to null to keep things valid
16636 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16638 * icall.c: added Console 2.0 icalls.
16639 * Makefile.am: added console-io.[ch]
16640 * console-io.[ch]: internal calls for Console 2.0 API.
16642 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16644 * class.c: make sure we consider all the interfaces
16645 when calculating max_interface_id (bug found by
16646 Jeroen Frijters running ikvm).
16648 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
16650 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
16651 valuetype fields to null.
16653 * object.c (set_value): Ditto. Fixes #71669.
16655 2005-01-31 Martin Baulig <martin@ximian.com>
16657 * metadata.c (mono_metadata_has_generic_params): New public
16658 function; checks whether something is a generic method.
16660 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16662 * appdomain.c: fix infinite recursion when adding assemblies.
16664 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
16666 * object.c: Fix small typo to return all items for Environment.
16667 GetCommandLineArgs.
16669 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16671 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
16672 reflection.c: more domain and assembly-unload related fixes
16673 and memory leaks plugs.
16675 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
16677 * 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.
16679 2005-01-29 Ben Maurer <bmaurer@ximian.com>
16681 * loader.c (mono_method_signature): Make this method lazy
16682 (mono_get_method_from_token): Don't computate the signature here.
16684 Doing this saves quite a bit of memory. I got 90 kb on starting up
16685 monodoc. It should also save some disk reads on startup.
16687 * *: MonoMethod->signature might be NULL now. You *MUST* use
16688 mono_method_signature.
16690 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
16692 * object.c (mono_runtime_get_main_args): Return an array from the
16693 current domain here. Fixes #71938.
16695 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
16697 * monitor.c: formatting changes to comply with the
16698 mono coding style and remove #ifdefs from the code.
16700 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
16702 * metadata.c, private.h: remove some unneeded data
16703 and use a more compact representation for table schemas.
16705 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16707 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
16708 to get a better distribution in hash tables.
16709 * *.c: use mono_aligned_addr_hash() where appropriate.
16710 * assembly.c: make var static.
16712 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
16714 * domain-internals.h: Put MonoJitInfo on a diet.
16716 * domain.c: Fix a warning.
16718 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16720 * gc.c: rework the gc handles code to reuse handles
16723 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
16725 * domain.c: fixed long standing bug in mono_string_equal() which
16726 was brought to light with the ldstr changes.
16728 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
16730 * reflection.c: Remove warning by adding missing include for marshal.h
16732 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16734 * domain.c, object.c: change the ldstr_table to hold
16735 MonoString* as keys: makes the runtime isinterned lookup
16736 faster and simplifies memory management.
16738 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
16740 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
16741 possible to add imperative security checks before calling the icall.
16742 * reflection.c: Return security attributes on the original MonoMethod
16743 (and not the wrapped one). This fix permissions on icalls.
16745 2005-01-25 Dick Porter <dick@ximian.com>
16747 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
16748 the check for mktime() support actually test the mktime() return
16749 value. "Fixes" bug 71682, though the output is still different to
16752 2005-01-25 Martin Baulig <martin@ximian.com>
16754 * class.c (mono_class_is_assignable_from): Make this work for
16757 2005-01-24 Ben Maurer <bmaurer@ximian.com>
16759 * marshal.c (mono_string_utf8_to_builder)
16760 (mono_string_builder_to_utf16): We might not have ownership of the
16761 string. In thise case, we need to create a new buffer.
16763 * object-internals.h (mono_stringbuilder_capacity): sb->str might
16764 be null, in which case, use the default capacity.
16766 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16768 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
16769 GC events to the profiler.
16771 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
16773 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
16774 if you don't want the GC to run.
16776 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
16778 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
16779 start providing a GC API and keeping different implementations in
16781 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
16783 2005-01-22 Ben Maurer <bmaurer@ximian.com>
16785 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
16786 mmap rather than allocating a huge buffer.
16787 (mono_debug_close_mono_symbol_file): Free the buffer allocated
16790 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
16792 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
16793 and CheckExecutionRights.
16794 * reflection.c|h: Keep the index of the declarative security to be
16795 used, instead of the pointer, when AOT compiler is used. Also add
16796 class initialization when requesting demands.
16797 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
16798 CheckExecutionRights. Both properties are now FALSE by default, and
16799 unmodifiable, unless the --security option is used.
16801 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16803 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
16804 reflection.c: properly refcount images and assemblies, many leaks fixed.
16806 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16808 * threadpool.c: increase the timeout for threads in the thread pool to
16809 10s. Fixes bug #67159.
16811 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
16813 * class-internals.h: Sun's compiler insists on explicit
16814 signed on bit fields to handle then correctly.
16816 2005-01-19 Miguel de Icaza <miguel@ximian.com>
16818 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
16819 Make the size of the array fit only the number of invalid path
16820 chars that we have.
16822 * class.c (_mono_class_get): Improve the error reporting when a
16823 class referenced is not found, to assist debugging.
16825 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
16827 * threads.c: fix off-by-one error.
16828 * domain.c: free data allocated in the domain.
16830 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
16832 * reflection.c (mono_method_body_get_object): Fill out exception info
16835 * object-internals.h: Add MonoReflectionExceptionHandlingClause
16838 2005-01-19 Martin Baulig <martin@ximian.com>
16840 * loader.c (mono_get_method_constrained): Make this work again.
16842 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
16844 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
16845 guint16 to match the managed side.
16847 * reflection.c (mono_reflection_body_get_object): Fill out local
16850 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
16853 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
16854 'local_var_sig_token'.
16856 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
16858 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
16861 * reflection.c (mono_method_body_get_object): Handle abstract and
16864 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
16866 * marshal.c, loader.c, class-internals.h, reflection.c:
16867 store the emthod data for a wrapper in an array instead of a list.
16869 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
16871 * marshal.c: change the code to allocate memory more
16872 conservatively for method wrappers.
16874 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16876 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
16877 fields from MonoClass to the marshal info structure where they belong.
16879 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16881 * class.c, object.c, class-internals.h, marshal.c: rearrange
16882 some fields and tweak some types to lower memory usage.
16884 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
16886 * threads.c (signal_thread_state_change): Handle the case when the
16887 target thread is the current thread.
16889 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
16891 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
16892 emit_ptr_to_object_conv.
16894 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
16895 marshalling. Fixes #71352.
16897 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16899 * metadata.h, blob.h: move table enum to blob.h so it can be included
16901 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
16902 cut the size of MonoImage/MonoDynamicImage.
16904 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
16906 * profiler.c (mono_profiler_install_simple): Fix default arguments.
16908 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
16910 * reflection.c, reflection.h, icall.c: add a function to check
16911 if an attribute type is defined for a metadata object.
16913 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
16915 * object-internals.h: Added some needed fields from StringBuilder class.
16916 * marshal.c: Set the maxCapacity when creating a StringBuilder.
16918 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
16920 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
16921 threads before shutting down the runtime.
16923 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
16925 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
16927 * object-internal.h, threads.c: implement stacksize and
16928 parameterized thread start functionality (requires
16929 matching corlib). Marked broken code for later removal.
16931 2005-01-12 Martin Baulig <martin@ximian.com>
16933 * class-internals.h (MonoGenericClass): Moved the `initialized'
16934 flag to MonoDynamicGenericClass, removed `init_pending'.
16935 (MonoGenericInst): Added `is_reference' flag.
16937 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
16939 * reflection.c (mono_image_create_pefile): Only set the pe_offset
16940 inside the MSDOS header. Fixes #71201.
16942 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
16944 (mono_domain_finalize): Ditto.
16946 2005-01-12 Martin Baulig <martin@ximian.com>
16948 * class.c (mono_get_shared_generic_class): Use the cache for
16949 non-dynamic generic classes.
16951 * class-internals.h (mono_class_create_generic_2): Removed
16952 function prototype, this function is now static inside class.c.
16954 * class.c (mono_class_create_generic_2): Made this static, only
16955 call it from mono_class_init() and mono_class_setup_parent().
16956 (collect_implemented_interfaces_aux): Call mono_class_init() on
16957 the interfaces we collect.
16958 (mono_class_setup_vtable): Call mono_class_init (class->parent).
16960 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
16962 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
16963 it a real thread handle.
16965 * domain-internals.h: Move exvar_offset from MonoJitInfo to
16966 MonoJitExceptionInfo, since each catch clause needs its own variable.
16968 2005-01-11 Dick Porter <dick@ximian.com>
16970 * image.c (mono_pe_file_open): New variant on mono_image_open()
16971 that does not set up the CLI metadata; used for FileVersionInfo so
16972 it can get the data for windows binaries too.
16974 * process.c (process_read_string_block): Don't read off the end of
16975 the StringTable block.
16977 These both fix bug 70766.
16979 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
16981 * gc.c: set some fields to NULL at GC cleanup time.
16982 * threads.c: if we quit the main thread, call exit ().
16984 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
16986 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
16988 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
16990 * threads.h, threads.c, object.c: added accessor and settor for
16991 main_thread. Handle it specially when exiting from it: wait
16992 for other foreground threads to exit.
16994 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
16996 * process.c, verify.c: remove some bloat.
16998 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
17000 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
17001 the calling convention to cdecl under win32.
17003 2005-01-08 Ben Maurer <bmaurer@ximian.com>
17005 * object.c (mono_object_get_size): New function to get the size of
17006 an object instance.
17008 * profiler.c (simple_allocation): Use above.
17010 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
17012 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
17013 ves_icall_System_AppDomain_getRootDomain (as it's not required to
17014 get an appdomain by it's id and we can't assume the root's id is 0).
17015 * domain-internals.h: Change the function prototype to match.
17016 * icall.c: Change the icall table for AppDomain.
17018 2005-01-08 Miguel de Icaza <miguel@ximian.com>
17020 * locales.c (string_invariant_compare_char): Only compute
17021 GUnicodeTypes in the case where we need them. Test for ordinality
17022 first and return if so.
17027 * FIXME: here we must use the information from c1type and c2type
17028 * to find out the proper collation, even on the InvariantCulture, the
17029 * sorting is not done by computing the unicode values, but their
17030 * actual sort order.
17033 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17035 * loader.c: for P/Invoke methods, allow the "Internal" shared
17036 library name to refer to the calling process symbol namespace.
17038 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
17040 * Makefile.am: Add the security manager to the build.
17041 * security-manager.c|h: New. Initialization of the security manager.
17043 2005-01-07 Dick Porter <dick@ximian.com>
17046 * monitor.c: Update thread state during Monitor and WaitHandle
17047 waits. Fixes bug 71031.
17049 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
17051 * reflection.c (property_encode_signature): Correctly handle when the
17052 property has no methods.
17054 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
17056 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
17058 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
17059 fields from mb, not rmb. Fixes #71017.
17061 * marshal.c (emit_ptr_to_str_conv): Add support for
17062 ByValTStr -> string conversion. Fixes #71015.
17064 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
17066 * mempool.c (mono_mempool_contains_addr): New helper function.
17068 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
17070 * metadata.c (mono_metadata_compute_size): Fix size calculation of
17071 HasSematics encoded fields.
17073 * metadata.c (mono_type_to_unmanaged): Improve error message for
17074 invalid string marshalling.
17076 * metadata.c: Fix warnings.
17078 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
17080 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
17083 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
17085 * domain.c object.c domain-internals.h: Revert part of r38077 since the
17086 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
17089 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
17091 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
17092 so methods containing these can be AOTed.
17094 2005-01-03 Martin Baulig <martin@ximian.com>
17096 * loader.c (find_method): Removed the hack for generic instances.
17097 (method_from_memberref): If our parent is a generic instance, pass
17098 its generic type definition to find_method() and then inflate the
17100 (mono_get_method_constrained): Pass the generic type definition to
17101 find_method() and inflate the method later.
17103 * class-internals.h (MonoStats): Added `generic_class_count'.
17105 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
17106 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
17108 * reflection.c (mono_custom_attrs_from_params): Don't ignore
17109 generic type definitions.
17111 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
17113 * loader.c icall.c: Fix warnings.
17115 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
17117 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
17118 blittable types. Fixes #70864.
17120 2004-12-29 Martin Baulig <martin@ximian.com>
17123 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
17125 * reflection.c (mono_method_get_object): Create a
17126 "System.Reflection.MonoGenericMethod" for inflated methods; don't
17127 call mono_get_inflated_method().
17129 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
17131 2004-12-27 Martin Baulig <martin@ximian.com>
17133 * class-internals.h (MonoMethod): Added `is_inflated' flag.
17134 (MonoMethodInflated): Added `inflated' field.
17136 * class.c (mono_class_inflate_generic_method): Don't really
17137 inflate the method here; just set the `is_inflated' flag in the
17139 (mono_class_get_inflated_method): Actually inflate the method here
17140 if it's not already inflated; we use the MonoMethodInflated's new
17141 `inflated' field as a cache.
17143 2004-12-26 Martin Baulig <martin@ximian.com>
17146 (inflate_generic_class): Moved some code out of inflate_generic_type().
17147 (mono_class_inflate_generic_method): If we're already inflated,
17148 inflate the context and use the declaring method; ie. make sure
17149 the declaring method of an inflated method is always the generic
17151 (mono_class_create_from_typedef): Create
17152 `class->generic_container->context->gclass'.
17154 2004-12-24 Ben Maurer <bmaurer@ximian.com>
17156 * metadata-internals.h, marshal.c, reflection.c: More
17157 MonoGHashTable->GHashTable.
17159 * domain-internals.h, class.c: Change MonoGHashTable's into
17160 GHashTables for some cases where no gc stuff is used
17162 All users: update apis
17164 2004-12-23 Ben Maurer <bmaurer@ximian.com>
17166 * metadata.c (builtin_types): Make this `const'. Makes this get
17167 put into the shareable section.
17168 (mono_metadata_init): Casts to make gcc happy.
17170 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
17172 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
17174 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
17176 * icall.c: Added an internal call to retrieve the position and length
17177 of assembly-level declarative security attributes (RequestMinimum,
17178 RequestOptional and RequestRefuse). This is used by the Assembly class
17179 to re-create the corresponding permission sets.
17181 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
17183 * marshal.c: fix the stelemref wrapper to be type correct
17186 2004-12-20 Ben Maurer <bmaurer@ximian.com>
17188 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
17189 to do key & 0x7fffffff. Hashtable already does this. It just
17190 results in longer code.
17192 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
17194 * appdomain.c: Bump corlib version.
17195 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
17196 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
17197 * reflection.c|h: Add functions to get declarative security infos
17198 (blob position and length) for assemblies, classes and methods.
17200 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
17202 * reflection.c: sort the constant table (bug #70693).
17204 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
17206 * object-internals.h, threads.c, domain.c: add accessors for
17207 the MonoThread and MonoDomain tls keys.
17209 2004-12-18 Martin Baulig <martin@ximian.com>
17211 * class.c (inflate_generic_type): If we're inflating a generic
17212 instance, set `ngclass->context->container = context->container';
17213 ie. the container we inflated into.
17215 * metadata.c (mono_metadata_parse_generic_param): Reflect above
17216 inflate_generic_type() changes.
17218 2004-12-17 Martin Baulig <martin@ximian.com>
17220 * class-internals.h
17221 (MonoGenericClass): Replaced `MonoType *generic_type' with
17222 `MonoClass *generic_class'. Removed `dynamic_info'; if
17223 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
17224 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
17226 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
17228 * exception.c (mono_exception_from_token): New helper function.
17230 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
17232 * assembly.c (mono_assembly_load_with_partial_name): Call
17233 mono_assembly_loaded before invoking the preload hooks. Fixes
17236 * object-internals.h (MonoThread): Change culture_info and
17237 ui_culture_info into an array.
17239 * threads.c: Cache culture info objects from more than one appdomain.
17241 * threads.c threads-types.h icall.c: Add icalls for manipulating the
17242 current UI culture.
17244 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
17246 * threads.h threads.c appdomain.c: Clear the culture_info field of
17247 all threads during unloading if they point to an object in the dying
17250 2004-12-13 Ben Maurer <bmaurer@ximian.com>
17252 * culture-info.h (TextInfoEntry): New struct
17253 * object-internals.h: sync with managed
17254 * locales.c: fill the `text_info_data' field
17255 * culture-info-tables.h: update
17257 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17259 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
17262 2004-12-12 Ben Maurer <bmaurer@ximian.com>
17264 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
17265 (ves_icall_ModuleBuilder_getMethodToken): Ditto
17267 2004-12-12 Martin Baulig <martin@ximian.com>
17269 * mono-debug-debugger.c (write_type): If we're an enum and the
17270 builtin types have already been initialized, call mono_class_init().
17272 2004-12-11 Martin Baulig <martin@ximian.com>
17274 * metadata.c (mono_metadata_load_generic_params): Added
17275 `MonoGenericContainer *parent_container' argument; automatically
17276 compute `container->is_method'; pass the correct owner to
17279 * reflection.c (compare_genericparam): Sort the GenericParam table
17280 according to increasing owners.
17282 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
17284 * profiler.c: allow disabling the default profiler.
17286 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
17288 * decimal.c, icall.c: allow disabling System.Decimal support.
17290 2004-12-09 Marek Safar <marek.safar@seznam.cz>
17292 * reflection.c: Add support for null attribute arguments.
17294 2004-12-09 Martin Baulig <martin@ximian.com>
17296 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
17297 names to get rid of compiler warnings.
17299 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
17301 * marshal.c (mono_marshal_get_struct_to_ptr): Call
17302 mono_marshal_load_type_info (). Fixes #69625.
17303 (mono_marshal_get_ptr_to_struct): Likewise.
17305 2004-12-08 Martin Baulig <martin@ximian.com>
17307 * mono-debug.h: Bumped version number to 47.
17309 * mono-debug-debugger.c
17310 (mono_debugger_event_handler, mono_debugger_event): Take two
17311 guint64 arguments insteed of a gpointer and a guint32.
17313 2004-12-08 Martin Baulig <martin@ximian.com>
17315 * debug-mono-symfile.h
17316 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
17317 `address' to `native_offset'.
17319 2004-12-08 Martin Baulig <martin@ximian.com>
17321 * class.c (mono_class_create_from_typespec): Only inflate if we
17322 either have `context->gclass' or `context->gmethod'.
17324 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
17326 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
17328 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
17330 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
17332 * reflection.c (mono_assembly_get_object): Remove the workaround put
17333 in for the release.
17335 * appdomain.c: Use the corlib_internal field from MonoAssembly.
17337 * appdomain.c: Bump corlib version.
17339 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
17340 be visible in other appdomains.
17342 2004-12-07 Ben Maurer <bmaurer@ximian.com>
17344 * threads.c: Interlocked inc and dec for longs were messed up,
17345 use a KISS based impl for this. Fixes 70234
17347 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
17349 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
17351 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
17353 * icall.c: fix to follow policy not to allow struct
17354 arguments in icalls.
17356 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17358 * process.c: make the patch that handles spaces in file paths work
17359 on mono/windows too.
17361 2004-12-06 Martin Baulig <martin@ximian.com>
17363 * class.c (mono_class_create_generic): Call
17364 mono_class_setup_supertypes() if we're dynamic.
17365 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
17367 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
17369 * object-internals.h: Add new fields to MonoThread.
17371 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17373 * icall.c threads-types.h threads.c: Add new icalls.
17375 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
17377 * object-internals.h (MonoReflectionAssembly): Sync object layout with
17380 * appdomain.c: Bump corlib version.
17382 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
17383 internal assemblies. Fixes #69181.
17385 2004-12-05 Martin Baulig <martin@ximian.com>
17387 * class.c (mono_class_inflate_generic_signature): Make this a
17388 no-op if `context' is NULL or we don't have any type parameters;
17389 also copy `sentinelpos'.
17391 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
17393 * image.c: Add unbox_wrapper_cache.
17395 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
17397 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
17398 function generator.
17400 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
17403 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
17405 2004-12-04 Martin Baulig <martin@ximian.com>
17407 * loader.c (mono_method_get_signature_full): New public function;
17408 like mono_method_get_signature(), but with an additional
17409 `MonoGenericContext *' argument.
17411 * class.c (mono_class_inflate_generic_signature): Formerly known
17412 as inflate_generic_signature(); make this public.
17414 2004-12-04 Martin Baulig <martin@ximian.com>
17417 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
17418 instead of a `MonoGenericContainer *'.
17419 (mono_metadata_parse_array_full): Likewise.
17420 (mono_metadata_parse_signature_full): Likewise.
17421 (mono_metadata_parse_method_signature_full): Likewise.
17422 (mono_metadata_parse_generic_inst): Likewise.
17423 (mono_metadata_parse_generic_param): Likewise.
17424 (mono_metadata_parse_mh_full): Likewise.
17425 (mono_type_create_from_typespec_full): Likewise.
17427 2004-12-03 Martin Baulig <martin@ximian.com>
17429 * class-internals.h (MonoGenericContainer): Replaced the
17430 `MonoGenericContext * pointer with a `MonoGenericContext'
17431 structure and made it the first element.
17433 2004-12-03 Martin Baulig <martin@ximian.com>
17436 (inflate_generic_type): Set the `context->container' when creating
17437 a new MonoGenericContext.
17438 (mono_class_inflate_generic_method): Likewise.
17439 (mono_class_create_from_typespec): Just use `context->container'
17440 to get the container.
17442 * loader.c (method_from_methodspec): Set `context->parent' from
17443 `context->container' - and if that's a method container, use its
17444 parent. Also set the `context->container' when creating a new
17445 MonoGenericContext.
17446 (mono_get_method_from_token): Use just `context->container' to get
17449 * metadata.c (do_mono_metadata_parse_generic_class): Also set
17450 `gclass->context->container'.
17452 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
17453 the `context->container' when creating a new MonoGenericContext.
17455 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
17457 * reflection.c (compare_genericparam): Sort params with identical
17458 owner by their number. Fixes gen-111 on sparc.
17460 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
17462 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
17463 around the domain changes.
17465 * appdomain.c (mono_domain_unload): Handle the case when the thread
17466 calling Unload is itself being aborted during unloading. Fixes #70022.
17468 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
17470 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
17471 checkpoint_func as an icall so it gets a wrapper.
17472 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
17473 in the cross-appdomain wrappers too.
17475 * threads.c (mono_thread_has_appdomain_ref): Make this public.
17477 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
17479 * reflection.c: Fix some memory leaks.
17481 2004-12-02 Martin Baulig <martin@ximian.com>
17483 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
17485 * metadata.c (generic_class_cache): New static hashtable.
17486 (mono_metadata_lookup_generic_class): New public method.
17488 2004-12-02 Martin Baulig <martin@ximian.com>
17490 * class.c (mono_class_create_from_typedef): Call
17491 mono_class_setup_parent() and mono_class_create_mono_type() before
17492 parsing the interfaces.
17494 2004-12-02 Martin Baulig <martin@ximian.com>
17496 * metadata.c (generic_inst_cache): New static hashtable.
17497 (mono_metadata_lookup_generic_inst): New public function.
17498 (mono_metadata_inflate_generic_inst): New public function.
17499 (mono_metadata_parse_generic_inst): New public function.
17500 (do_mono_metadata_parse_generic_class): Use the new
17501 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
17502 since this'll also use the cache.
17504 * reflection.c (mono_reflection_bind_generic_method_parameters):
17505 Use mono_metadata_lookup_generic_inst() to use the new cache.
17507 * class.c (inflate_mono_type): Use
17508 mono_metadata_inflate_generic_inst() to inflate a generic
17509 instance; this'll also use the new cache.
17511 * loader.c (method_from_methodspec): Use
17512 mono_metadata_parse_generic_inst() and
17513 mono_metadata_inflate_generic_inst() rather than parsing it
17514 manually, so we can use the new cache.
17516 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
17518 * threads.c (wait_for_tids): Do not incorrectly free threads when
17519 the wait times out.
17521 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17523 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
17524 iter->args based on whether parameters are passed in registers (i.e.
17525 MONO_ARCH_REGPARMS is defined)
17527 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
17529 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
17530 the exception message. Fixes #70070.
17531 (method_from_methodspec): Fix warnings.
17533 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17535 * process.c: (complete_path) return the path quoted
17537 2004-12-01 Martin Baulig <martin@ximian.com>
17539 * class-internals.h (MonoGenericInst): New structure.
17540 (MonoGenericClass): Replaced `type_argc', `type_argv' and
17541 `is_open' with `MonoGenericInst *inst'.
17542 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
17543 `is_open' with `MonoGenericInst *inst'.
17545 2004-11-30 Martin Baulig <martin@ximian.com>
17547 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
17549 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
17550 to `generic_class_cache'.
17553 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
17554 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
17555 (mono_generic_inst_is_valuetype): Renamed to
17556 mono_generic_class_is_valuetype().
17558 * class-internals.h
17559 (MonoGenericInst): Renamed to MonoGenericClass.
17560 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
17561 (MonoClass): Renamed `generic_inst' to `generic_class'.
17562 (MonoGenericContext): Renamed `ginst' to `gclass'.
17564 * object-internals.h
17565 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
17567 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
17568 mono_reflection_generic_class_initialize().
17570 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
17571 now known as "System.Reflection.MonoGenericClass".
17572 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
17574 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
17576 * class-internals.h: Added a flag field to MonoClass to cache the
17577 declarative security attributes actions associated with the class.
17578 * domain-internals.h: Added booleans to MonoJitInfo to cache the
17579 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
17580 applicable to the JITted method.
17581 * reflection.c|h: Added functions to extract (as flags) which security
17582 actions are available (declaratively) for a method, class or assembly.
17583 * metadata.c|h: Added functions to search the declarative security
17584 table in the metadata.
17586 2004-11-29 Ben Maurer <bmaurer@ximian.com>
17588 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
17589 EXPORTEDTYPES are already in the class name cache, so there is no
17590 need to add extra code here to look at them. Just removes a bit of
17593 (ves_icall_System_Environment_get_TickCount): No need for #if
17594 WINDOWS. We already have the code in io-layer.
17596 2004-11-28 Martin Baulig <martin@ximian.com>
17599 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
17602 2004-11-27 Miguel de Icaza <miguel@ximian.com>
17604 * assembly.c (do_mono_assembly_open): Instead of having a
17605 conditional WITH_BUNDLE, incorporate support for bundles here, by
17606 having a global `bundles' variable holding a pointer to the actual
17609 (mono_register_bundled_assemblies): New API call used by the
17612 See mkbundle.1 for details.
17614 2004-11-27 Martin Baulig <martin@ximian.com>
17616 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
17617 the vtable for generic methods.
17619 2004-11-26 Martin Baulig <martin@ximian.com>
17622 (mono_metadata_generic_method_hash): New public function.
17623 (mono_metadata_generic_method_equal): Likewise.
17625 * class-internals.h
17626 (MonoGenericContainer): Added `GHashTable *method_hash'.
17628 * reflection.c (ReflectionMethodBuilder): Added
17629 `MonoGenericContainer *generic_container'.
17630 (reflection_methodbuilder_to_mono_method): Don't create a new
17631 MonoGenericContainer each time we're called.
17632 (mono_reflection_bind_generic_method_parameters): Use
17633 `container->method_hash' to cache the results so we don't create a
17634 different method if we're called several times with the same
17637 * loader.c (method_from_methodspec): Use the new
17638 `container->method_hash' here, too.
17640 2004-11-26 Martin Baulig <martin@ximian.com>
17642 * class.c (inflate_generic_signature): Correctly compute
17643 `res->has_type_parameters'.
17644 (mono_class_vtable): Use the `has_type_parameters' flag to
17645 determine whether we're a generic method.
17647 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
17649 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
17651 * object.c (mono_runtime_run_main): Fix a small memory leak.
17653 2004-11-25 Martin Baulig <martin@ximian.com>
17655 * class.c (set_generic_param_owner): Fixed the loop.
17657 2004-11-25 Martin Baulig <martin@ximian.com>
17659 * object.c (mono_class_vtable): Don't create any JIT wrappers for
17662 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
17664 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
17665 names. Fixes #69787.
17667 2004-11-24 Martin Baulig <martin@ximian.com>
17669 * class.c (mono_class_create_generic_2): If we don't have a
17670 `ginst->parent', inflate `gklass->parent' to get our parent.
17672 2004-11-24 Martin Baulig <martin@ximian.com>
17674 * reflection.c (compare_genericparam): Correctly sort the
17675 GenericParam table; fixes #69779.
17677 2004-11-23 Ben Maurer <bmaurer@ximian.com>
17679 * reflection.c: When writing a PE file, don't create a huge
17680 buffer in memory. Just write the arrays we have to the file.
17681 This reduces memory usage.
17683 * metadata-internals.h: MonoDynamicStream pefile is no longer used
17686 2004-11-17 Martin Baulig <martin@ximian.com>
17688 * class.c (mono_class_init): Don't setup `class->parent' for
17689 dynamic instances; moved this to mono_class_generic_2().
17690 (mono_class_create_generic): Also set `klass->inited' for dynamic
17692 (mono_class_create_generic_2): Don't do anything for dynamic
17693 generic instances. Set `klass->parent' here and also call
17694 mono_class_setup_parent() here.
17696 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
17697 `MonoType *parent' argument; set `ginst->parent' before calling
17698 mono_class_create_generic_2(), so we set the correct parent.
17700 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
17702 * reflection.c: allow getting attributes from ModuleBuilder
17705 2004-11-17 Martin Baulig <martin@ximian.com>
17707 * class.c (mono_class_create_from_typedef): If a type parameter is
17708 inherited from an outer class, set its owner to that class.
17710 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
17712 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
17713 for (int*) written size. This fixes bug #69592.
17715 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
17717 * icall.c: Added IsAuthenticodePresnet internal call.
17718 * image.c|h: New function that check a MonoImage for an Authenticode
17719 signature in the certificate PE data directory.
17720 * security.c|h: New internal call to ask the runtime if an
17721 Authenticode signature seems referenced in the PE header.
17723 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
17725 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
17727 * reflection.c (mono_image_create_pefile): Free the assembly streams
17728 after writing out the assembly file.
17730 * object.c (mono_runtime_run_main): Fix small memory leak.
17732 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
17733 property access modifiers. Fixes #69389.
17735 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17737 * domain.c, object.c, object-internals.h, domain-internals.h,
17738 object.h, marshal.c: keep dynamic code info per domain.
17740 2004-11-15 Martin Baulig <martin@ximian.com>
17742 * class.c (mono_type_get_name_recurse): Put type arguments in
17743 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
17746 2004-11-15 Martin Baulig <martin@ximian.com>
17748 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
17749 (mono_class_setup_vtable): When computing `the_cname' for a
17750 generic instance, don't include the namespace since we'd otherwise
17753 2004-11-15 Martin Baulig <martin@ximian.com>
17755 * class.c (mono_class_create_generic): Changed return type to void.
17756 (mono_class_create_generic_2): New public function; setup
17757 `class->method', `class->field' and `class->interfaces' here
17758 instead of in mono_class_init().
17760 * class.h (mono_class_create_generic): Moved to class-internals.h.
17762 2004-11-14 Ben Maurer <bmaurer@ximian.com>
17764 * reflection.c (mono_image_create_pefile): take a file HANDLE.
17765 rather than writing to memory, write to this file. Right now,
17766 we are just writting into a buffer, and copying that. However
17767 we can avoid the buffer later.
17769 (mono_dynamic_stream_reset): new function
17771 * icall.c, object-internals.h: update for the above.
17773 2004-11-13 Ben Maurer <bmaurer@ximian.com>
17775 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
17776 have been using gc'd memory. First it is slower, unlikely
17777 the comment in the source code said, secondly, it increases
17778 our footprint to do it in the gc.
17780 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
17781 the method so that it does not have to copy to managed code.
17783 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
17785 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
17787 2004-11-12 Martin Baulig <martin@localhost>
17789 * reflection.c (mono_image_create_token): Allow generic method
17790 definitions here, since they may appear in an `.override'; see
17791 gen-98/gen-99 for an example.
17793 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
17795 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
17798 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
17801 2004-11-11 Martin Baulig <martin@ximian.com>
17803 * class.c (mono_class_setup_vtable): In an explicit interface
17804 implementation, the method name now includes the arity.
17806 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
17808 * object.c (mono_array_full_copy): Fix warning.
17810 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
17812 * appdomain.c: Removed look_for_method_by_name(). Use the new method
17813 mono_class_get_method_from_name() instead.
17815 * class-internals.h: Added two new types of wrappers.
17816 Added MonoRemotingTarget enum. Added new trampoline function type, which
17817 takes an additional MonoRemotingTarget value as parameter, so it is
17818 possible to request a trampoline for a specific target.
17820 * class.c: Added new mono_class_get_method_from_name() method.
17822 * class.h: In MonoRemoteClass, we can have now to vtables, one for
17823 general remoting sinks and one specific for cross domain calls.
17825 * debug-helpers.c: Added new wrapper names.
17827 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
17830 * image.c: Porperly delete value objects form the remoting invoke hashtable.
17832 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
17833 with several other methods (mono_marshal_get_xappdomain_dispatch,
17834 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
17835 and others) can generate a fast remoting wrapper for cross domain calls.
17836 More information can be found in docs/remoting.
17837 Other changes: Removed mono_find_method_by_name, and used
17838 mono_class_get_method_from_name instead.
17839 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
17840 is stored in the remoting invoke hashtable.
17842 * marshal.h: published the new method for getting the xdomain wrapper,
17843 and also added a method for getting the adequate wrapper for a given
17846 * object-internals.h, object.c: Added a couple of methods for capying and
17848 Modified mono_install_remoting_trampoline, which takes the new remoting
17849 trampoline that has a remoting target as parameter.
17850 mono_class_proxy_vtable now also takes a remoting target as parameter, and
17851 will return the most suitable vtable for the target.
17852 Added mono_remote_class_vtable, which returns the vtable of a remote class
17853 (which can be the normal remoting vtable or the xdomain vtable).
17855 * threads.c: the xdomain invoke and dispatch wrappers must also be
17856 protected against interruptions.
17858 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17860 * icall.c: use memmove in BlockCopyInternal when the source and
17861 destination arrays are the same.
17863 2004-11-09 Martin Baulig <martin@ximian.com>
17865 * class-internals.h (MonoGenericContainer): Removed `method' and
17866 `signature', replaced them with `is_method' and `is_signature'
17867 flags. Added `context'.
17869 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
17870 instead of a `MonoGenericContainer *'.
17872 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
17873 for dynamic type parameters.
17874 (mono_metadata_load_generic_params): Setup `container->context'.
17876 * reflection.c (mono_reflection_setup_generic_class): Setup
17877 `tb->generic_container->context'.
17878 (do_mono_reflection_bind_generic_parameters): Use
17879 mono_class_inflate_generic_type() to correctly inflate types,
17880 rather than using our own hack just for MONO_TYPE_VAR.
17882 2004-11-09 Martin Baulig <martin@ximian.com>
17884 * class.c (mono_class_inflate_generic_method): Small fix; don't
17888 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
17889 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
17890 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
17891 (ves_icall_Type_BindGenericParameters): Likewise.
17892 (ves_icall_Type_get_IsGenericInstance): Likewise.
17893 (ves_icall_Type_GetGenericParameterPosition): Likewise.
17894 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
17895 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
17896 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
17898 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
17900 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
17901 assembly versions and public key tokens. Fixes #69113.
17903 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
17905 * metadata.c: fix bug introduced with the type cache changes
17908 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
17910 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
17911 the MonoClass pointer instead of the token in exception clauses.
17912 * reflection.c: updates for the above and make the code not depend
17913 on the structure of MonoExceptionClause.
17915 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
17917 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
17918 Add support for dynamic assemblies. Fixes #69114.
17920 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
17922 2004-11-07 Ben Maurer <bmaurer@ximian.com>
17924 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
17925 since most only those methods use it. the code member of
17926 MonoMethodPInvoke was dead, so that can be removed too. Also,
17927 remove inline_count (again, not used), and move slot so that it
17928 can share bits with some other flags. This saves 8 bytes in the
17929 structure and gives us about 50 kb back for mcs helloworld.cs
17931 * *.[ch]: Do naming changes for the above.
17933 * loader.c (mono_method_get_header): Lazily init the header
17935 (mono_get_method_from_token): don't init the header here
17936 (mono_free_method): the header may never be allocated
17938 Overall, this saves 150 kb of unmanaged allocations
17939 for mcs helloworld.cs. That accounts for 10% of the unmanaged
17942 * loader.c, loader.h (mono_method_get_header): new accessor.
17944 * *.[ch]: use the above method. Prepares us to lazily load
17947 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
17948 three warnings, which are actual bugs (see 69206).
17950 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
17951 unused. Saves a cool 4 bytes / method.
17953 2004-11-06 Ben Maurer <bmaurer@ximian.com>
17955 * metadata.c (builtin_types): Add types for System.Object here.
17956 (mono_metadata_parse_type_full): Cache MonoType*'s that are
17957 for a class or valuetype from klass->this_arg or klass->byval_arg.
17959 On mcs for a hello world, this gets us down from 21836 MonoType's
17962 (mono_metadata_free_type): Account for the above change.
17964 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
17966 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
17967 exception instead of asserting if name is null.
17968 (ves_icall_System_AppDomain_GetData): Ditto.
17970 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
17972 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
17975 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
17976 Return NULL when the domain does not have entry_assembly set.
17978 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
17979 Add a 'resource_modules' argument.
17980 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
17982 * reflection.c (mono_reflection_create_runtime_class): Move setting
17983 of wastypebuilder here, so mono_get_type_object () returns a MonoType
17986 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
17987 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
17988 Throw an ArgumentNullException if 'ptr' is null.
17990 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
17991 assemblies here. Fixes #69020.
17993 2004-11-05 Geoff Norton <gnorton@customerdna.com>
17995 * reflection.c (build_compressed_metadata): Fix the previous patch for
17996 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
17999 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
18001 * assembly.c (mono_assembly_names_equal): Allow a match if one of
18002 the cultures is false. Fixes #69090.
18004 * reflection.c (build_compressed_metadata): Fix invalid memory read
18005 detected by valgrind.
18007 * reflection.c (mono_reflection_get_type): Avoid triggering a
18008 TypeResolve multiple times for the same type. Fixes #65577.
18010 2004-11-04 Ben Maurer <bmaurer@ximian.com>
18012 * marshal.c: Avoid using ldftn to call managed functions. It is
18013 much slower than just a call.
18015 * reflection.c (mono_module_get_object): free the basename we
18016 allocate here from glib.
18018 * reflection.c (ensure_runtime_vtable): make sure to free
18019 overrides. Also, we were allocating an array of MonoMethod not an
18020 array of MonoMethod*.
18022 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
18024 * image.c (mono_image_close): free image->guid here.
18026 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
18028 * reflection.c: Fix some spec conformance issues with the PE file
18029 structures so mcs compiled apps run on the Net 2.0 beta.
18031 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
18033 * string-icalls.c (ves_icall_System_String_ctor_encoding):
18034 Implement this. Fixes #67264.
18036 * debug-helpers.h debug-helpers.c marshal.c: Move
18037 mono_find_method_by_name to debug-helpers.c.
18039 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
18041 * object.c (mono_release_type_locks): type_initialization_hash is
18044 * reflection.c object.c object-internals.h: Fix warnings.
18046 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
18047 without accessors. Fixes #61561.
18049 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
18050 application base from the root domain if not set. Fixes #65641.
18051 (mono_runtime_init): Fix warning.
18053 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18055 * appdomain.c: call mono_thread_pool_init.
18056 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
18057 of worker threads based on the number of CPUs and the environment
18058 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
18059 for non-windows (windows) systems.
18061 2004-10-27 Chris Toshok <toshok@ximian.com>
18063 * mono-debug-debugger.c (write_class): don't call mono_class_init
18064 here, as even with the check for (!klass->init_pending), we get
18065 into a situation where we're hitting cycles in class
18066 initialization. Fixes #68816.
18068 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
18070 * image.c: Avoid overwriting values in the loaded_images_hash when an
18071 assembly is loaded multiple times. Fixes #61152.
18073 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
18074 so multiple satellite assemblies for the same name can be loaded.
18077 * mono_domain_assembly_preload: Actually return the loaded assembly,
18080 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
18081 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
18083 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
18084 pending finalizers are not invoked after the appdomain has been
18085 unloaded. Fixes #67862.
18087 2004-10-22 Martin Baulig <martin@ximian.com>
18089 * mono-debug-debugger.c
18090 (mono_debugger_runtime_invoke): Don't box valuetypes.
18092 2004-10-22 Chris Toshok <toshok@ximian.com>
18094 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
18095 don't hide private methods.
18097 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
18099 * icall.c: Allows the runtime to "share" (when known) the public key
18100 token of an assembly. This avoid the need to recalculate the token
18101 (from the public key) in managed code.
18103 2004-10-21 Chris Toshok <toshok@ximian.com>
18105 * debug-helpers.c (append_class_name): argh, revert last patch.
18107 2004-10-21 Chris Toshok <toshok@ximian.com>
18109 * debug-helpers.c (append_class_name): use '+' as the delimiter,
18110 not '/', so that it matches what the debugger uses to look up
18113 2004-10-21 Martin Baulig <martin@ximian.com>
18115 * mono-debug-debugger.c (mono_debugger_throw_exception): New
18116 public method; this is called each time an exception is thrown and
18117 allows the debugger to use exception catch points.
18119 2004-10-21 Martin Baulig <martin@ximian.com>
18121 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
18122 the stack pointer and the exception object in some struct and pass
18123 that to the debugger.
18125 2004-10-21 Chris Toshok <toshok@ximian.com>
18127 * mono-debug-debugger.c (do_write_class): add instance/static
18128 event support. We don't expose "raise" or "other" yet.
18129 (event_is_static): new method.
18131 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
18133 * mono-debug-debugger.c
18134 (mono_debugger_handle_exception): Remove
18135 bogus return value for fussy compilers.
18137 2004-10-20 Martin Baulig <martin@ximian.com>
18139 * mono-debug-debugger.c
18140 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
18141 (mono_debugger_handled_exception): Likewise.
18143 2004-10-20 Martin Baulig <martin@ximian.com>
18145 * mono-debug-debugger.h (MonoDebuggerEvent): Added
18146 MONO_DEBUGGER_EVENT_EXCEPTION.
18148 * mono-debug-debugger.c (mono_debugger_handle_exception): New
18149 public function to send the debugger a notification for an
18150 exception and inform it about a catch/finally clause.
18152 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
18154 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
18155 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
18158 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
18160 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
18162 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
18163 marshalled as [In,Out]. Fixes #58325.
18165 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
18167 * reflection.c (mono_method_body_get_object): Implement some fields.
18169 2004-10-12 Martin Baulig <martin@ximian.com>
18171 * reflection.c (mono_reflection_bind_generic_parameters): Small
18172 fix, correctly retrieve our parent from a generic instance.
18174 2004-10-12 Martin Baulig <martin@ximian.com>
18176 * metadata.c (mono_metadata_generic_param_equal): We always have
18180 (mono_class_from_generic_parameter): We need to have an owner.
18181 (my_mono_class_from_generic_parameter): Likewise.
18183 * reflection.c (mono_reflection_setup_generic_class): Renamed to
18184 mono_reflection_create_generic_class() and added a new
18185 mono_reflection_setup_generic_class().
18186 (mono_reflection_initialize_generic_param): If we're a nested
18187 generic type and inherited from the containing class, set our
18188 owner to the outer class.
18190 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
18192 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
18194 * reflection.c (mono_method_body_get_object): New function to create
18195 a MethodBody object.
18197 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
18199 2004-10-11 Martin Baulig <martin@ximian.com>
18201 * metadata.c (_mono_metadata_type_equal): Renamed to
18202 do_mono_metadata_type_equal() and made static.
18204 2004-10-11 Martin Baulig <martin@ximian.com>
18206 * appdomain.c: Bump corlib version number to 28.
18208 2004-10-10 Martin Baulig <martin@ximian.com>
18210 * class-internals.h
18211 (MonoGenericInst): Added `MonoGenericContainer *container'.
18212 (MonoGenericMethod): Likewise.
18213 (MonoGenericContext): Likewise.
18214 (MonoGenericParam): Added `MonoGenericContainer *owner'.
18217 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
18218 (do_mono_metadata_parse_generic_inst): Likewise.
18219 (mono_metadata_parse_type_full): New public method. This is the actual
18220 mono_metadata_parse_type() implementation - with an additional
18221 `MonoGenericContainer *' argument.
18222 (mono_metadata_parse_array_full): Likewise.
18223 (mono_metadata_parse_signature_full): Likewise.
18224 (mono_metadata_parse_method_signature_full): Likewise.
18225 (mono_metadata_parse_mh_full): Likewise.
18226 (mono_type_create_from_typespec): Likewise.
18227 (mono_metadata_interfaces_from_typedef_full): New public method;
18228 this is similar to the other _full() methods, but we take a
18229 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
18230 (mono_metadata_parse_generic_param): Take an additional
18231 `MonoGenericContainer *' argument and lookup the MonoGenericParam
18232 from that container.
18233 (mono_metadata_generic_param_equal): New static method to compare
18234 two type parameters.
18235 (_mono_metadata_type_equal): New static method; takes an
18236 additional `gboolean signature_only' argument - if true, we don't
18237 compare the owners of generic parameters.
18238 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
18239 with a TRUE argument - do a signature-only comparision.
18241 * loader.c: Use the new _full() methods and pass the
18242 MonoGenericContainer to them.
18244 * object-internals.h (MonoReflectionTypeBuilder): Added
18245 `MonoGenericContainer *generic_container' field.
18246 (MonoReflectionMethodBuilder): Likewise.
18248 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
18250 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
18251 case initial images of dynamic assemblies.
18253 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
18255 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
18257 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
18258 length of event->other array.
18259 (typebuilder_setup_events): Ditto.
18261 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
18262 'assembly_by_name' and add an 'assemblies' list.
18264 * assembly.h assembly.c: Add a new search hook for determining whenever
18265 an assembly is already loaded. Use this instead of searching in the
18266 loaded_assemblies list.
18268 * domain.c appdomain.c: Implement the new search hook so loaded
18269 assemblies are now scoped by appdomain. Fixes #67727.
18271 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
18273 * threads.c (mono_thread_attach): Initialize synch_lock field so
18274 mono_thread_detach works again.
18276 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
18277 'lib' too. Fixes #63130.
18279 2004-10-06 Jackson Harper <jackson@ximian.com>
18281 * culture-info-tables.h: regenerated.
18283 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
18285 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
18286 implemented by other interfaces in the result. Fixes #65764.
18288 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
18289 Handle unloadable modules without crashing.
18291 * image.c (load_modules): Revert the previous patch since modules must
18292 have a fixed index inside the array.
18294 * image.c (load_modules): Don't include native modules in the modules
18297 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
18299 * reflection.h: Add param_defaults field.
18301 * reflection.c: Add support for parameter defaults in dynamic methods.
18304 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
18305 an empty string when a type has no namespace. Fixes #64230.
18307 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
18309 * tabledefs.h: Added "internal" security actions to support non-CAS
18310 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
18311 Note: they do not seems to be used anymore in 2.0 (new metadata format)
18313 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
18315 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
18316 constructor of abstract class. Fixes #61689.
18318 2004-10-04 Martin Baulig <martin@ximian.com>
18320 * class-internals.h (MonoGenericContainer): New type.
18321 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
18322 `MonoGenericContainer *generic_container'.
18323 (MonoClass): Replaced `gen_params' and `num_gen_params' with
18324 `MonoGenericContainer *generic_container'.
18326 * metadata.c (mono_metadata_load_generic_params): Return a
18327 `MonoGenericContainer *' instead of a `MonoGenericParam *';
18328 removed the `num' argument.
18330 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
18332 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
18333 for dynamic images.
18335 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
18338 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
18340 * reflection.c: Save pe_kind and machine values into the generated
18343 * appdomain.c: Bump corlib version number.
18345 * object-internals.h: Reorganize layout of LocalBuilder.
18347 * class-internals.h class.c (mono_class_get_implemented_interfaces):
18348 New helper function.
18350 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
18351 created MonoType for dynamic types. Fixes #66180.
18353 2004-10-02 Ben Maurer <bmaurer@ximian.com>
18355 * threadpool.c: the ares hashtable needs a critical section around it.
18356 this prevents some nasty segfaults
18358 2004-10-02 Massimiliano Mantione <massi@ximian.com>
18360 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
18361 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
18364 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
18366 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
18368 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
18370 * image.c: Always canonicalize image file names, to avoid loading
18371 the same assembly twice when referenced using a relative path.
18373 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
18375 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
18377 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
18379 * marshal.c: Fix warnings.
18381 2004-09-29 Geoff Norton <gnorton@customerdna.com>
18383 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
18384 attempting to marshal the delegate_trampoline as the method_addr.
18385 This patch has a static hashtable of marshalled delegates so that
18386 we can map delegate_trampoline addresses back to delegates. This
18387 allows a delegate passed to managed code to be passed back into native
18390 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
18392 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
18394 * reflection.c (method_encode_code): Align method headers properly.
18397 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
18399 * marshal.c: In the runtime invoke wrapper, reset the abort
18400 exception if it is cached. This avoids the automatic rethrowal of
18401 the exception after the catch of the wrapper. Also check for pending
18402 interruptions before calling the managed method. This is done using
18403 the new method emit_thread_force_interrupt_checkpoint, since the
18404 normal checkpoint method is ignored when running the invoke wrapper.
18405 * object.c: If the abort exception is rethrown, set the abort_exc
18406 field of the thread, so it will be rethrown aftere every catch.
18407 * threadpool.c: Only run an interruption checkpoint if what has been
18408 requested is a stop of the thread (aborts will be ignored).
18409 * threads.c: By default, a thread will now never be interrumped while
18410 running the runtime invoke wrapper (this ensures that runtime_invoke
18411 will always return to the caller if an exception pointer is provided).
18412 There is a new special method mono_thread_force_interruption_checkpoint()
18413 to force an interruption checkpoint even if running a protected
18414 wrapper, which is used by the same runtime invoke wrapper to do a check
18417 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
18419 * object.c, object-internals.h: Implemented mono_release_type_locks,
18420 which releases the cctor locks held by a thread.
18421 * threads.c, threads.h: In thread_cleanup, release cctor locks held
18422 by a thread. Added mono_thread_exit() method to be used to safely stop
18425 2004-09-28 Raja R Harinath <rharinath@novell.com>
18427 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
18428 Move null check before dereference. Avoid indexing beyond the end
18429 of the 'modules' array.
18431 2004-09-28 Raja R Harinath <rharinath@novell.com>
18433 * metadata-internals.h (MonoImage): Add module_count field.
18434 * image.c (load_modules): Set image->module_count.
18435 (mono_image_load_file_for_image): Use image->module_count.
18436 * reflection.c (mono_image_load_module): Append to image->modules array
18437 of dynamic assembly.
18438 (mono_module_get_object): Fix loop to actually increment index.
18439 Use image->module_count.
18440 * assembly.c (mono_assembly_load_references): Use image->module_count.
18441 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
18444 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
18446 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
18447 Avoid assert on generic types.
18449 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
18451 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
18453 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
18455 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
18456 function to convert a MarshalSpec structure to its managed counterpart.
18458 * reflection.c: Fix warnings.
18460 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
18463 * icall.c (mono_create_icall_signature): Fix build.
18465 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
18467 * icall.c: Add MakePointType icall.
18469 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
18472 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18474 * threadpool.c: reuse allocated slots in the queue.
18476 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
18478 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
18480 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
18482 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
18485 * tabledefs.h: Add constants for pinvoke attributes BestFit and
18486 ThrowOnUnmappableChar.
18488 * icall.c (ves_icall_Type_GetPacking): New icall.
18490 2004-09-24 Martin Baulig <martin@ximian.com>
18492 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
18494 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18497 (mono_domain_set): allow setting a domain that is being unloaded.
18498 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
18501 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
18503 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
18504 the GetCustomAttributes icall.
18506 2004-09-23 Martin Baulig <martin@ximian.com>
18508 * object-internals.h (MonoReflectionGenericParam): Replaced
18509 'has_ctor_constraint', `has_reference_type' and `has_value_type'
18510 with `guint32 attrs'.
18512 2004-09-23 Martin Baulig <martin@ximian.com>
18514 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
18516 2004-09-23 Martin Baulig <martin@ximian.com>
18518 * object-internals.h (GenericParameterAttributes): New enum.
18520 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
18522 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
18524 * class.c (init_events): Fill out event->other field.
18526 * class.c: Fix warnings.
18528 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
18530 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
18532 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
18533 walk which doesn't supply the IL offset.
18535 2004-09-22 Martin Baulig <martin@ximian.com>
18537 * reflection.c (mono_reflection_setup_internal_class): If we're
18538 System.ValueType, System.Object or System.Enum, set
18539 `klass->instance_size' and create the vtable.
18540 (mono_reflection_create_internal_class): If we're an enum type,
18541 get the base class from our current corlib.
18543 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
18545 * reflection.h (MonoResolveTokenError): New type.
18547 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
18550 * icall.c: Add an 'error' argument to the ResolveToken icalls.
18552 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
18554 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
18555 Support also calling constructors, but only for already allocated objects.
18557 2004-09-17 Geoff Norton <gnorton@customerdna.com>
18559 * reflection.c (type_get_qualified_name): If the klass is null
18560 return the typename to avoid a NullRefEx.
18561 (encode_cattr_value): Get the qualified name of the boxed type,
18562 not the underlying enumtype. Fixes #62984.
18564 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
18566 * marshal.c: Fix problems with previous checkin.
18568 2004-09-21 <vargaz@freemail.hu>
18570 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
18571 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
18573 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
18575 2004-09-21 Geoff Norton <gnorton@customerdna.com>
18577 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
18578 should only return a type for pointers, arrays, and passbyref types.
18581 2004-09-21 Martin Baulig <martin@ximian.com>
18583 * domain.c (mono_debugger_check_runtime_version): New public
18586 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
18588 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
18590 * reflection.c: Added missing sort to the declarative security
18591 attributes table. MS implementation stops seeing the attributes if the
18592 token number regress in the table (as shown by ildasm and permview).
18594 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
18596 * object-internals.h (MonoReflectionModule): Add 'token' field.
18598 * reflection.c (mono_reflection_get_token): Add support for Module
18600 (mono_module_get_object): Set 'token' field.
18601 (mono_module_file_get_object): Set 'token' field.
18603 * icall.c: Add new Assembly and Module icalls.
18605 * appdomain.c: Bump corlib version.
18607 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
18609 * loader.h loader.c class.h class.c: Add helper functions for obtaining
18610 tokens of metadata objects.
18612 * reflection.h reflection.c (mono_reflection_get_token): New function
18613 to obtain the token of a metadata object.
18615 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
18617 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
18619 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
18621 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
18623 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
18625 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
18626 * object-internals.h: Added 3 MonoArray* members to MonoReflection
18627 AssemblyBuilder to access the permissions set in the class lib.
18628 * reflection.c: Added security attributes encoding step in
18629 mono_image_build_metadata.
18630 * tabledefs.h: Added new security actions defined in 2.0:
18631 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
18633 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
18635 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
18638 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
18640 * locales.c: nullify the ICU_collator member of CompareInfo when it is
18641 finalized. There where random SIGSEVs at program termination, when
18642 an object being finalized was trying to do a string comparison and
18643 the current culture was already finalized.
18645 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18647 * threads.c: call thread_cleanup before finishing the thread if we get
18650 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
18652 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
18653 assemblies from the parent. Fixes #65665.
18655 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
18657 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
18660 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
18662 * reflection.h: add prototype for mono_get_dbnull_object
18663 * reflection.c: add prototypes for get_default_param_value_blobs
18664 and mono_get_object_from_blob for fussier compilers
18666 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
18668 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
18669 false deadlock checks in class initialization.
18671 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
18673 * image.c (mono_image_addref): Fix comment.
18675 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
18678 2004-09-12 Jambunathan K <kjambunathan@novell.com>
18680 * reflection.c (mono_param_get_objects): Modified to return
18681 ParameterInfo.DefaultValue object.
18683 (get_default_param_value_blobs):
18684 (mono_get_object_from_blob):
18685 (mono_get_dbnull_object): New helper routines.
18687 * object.c (mono_get_constant_value_from_blob): New helper routine
18688 carved out from get_default_field_value ()
18690 * object-internals.h (mono_get_constant_value_from_blob): Added
18691 function declaration.
18693 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
18695 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
18696 referenced assemblies. Fixes #62135.
18698 * exception.h exception.c (mono_get_exception_file_not_found2): New
18701 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
18703 * class.h class.c: Add mono_type_get_underlying_type ().
18705 2004-09-09 Geoff Norton <gnorton@customerndna.com>
18707 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
18708 Fix GetTypes() to support dynamically created assemblies.
18710 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
18712 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
18714 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
18717 * reflection.h reflection.c loader.c: Allow dynamic construction of
18718 pinvoke methods. Fixes #65571.
18720 * reflection.c (mono_reflection_get_type): Revert previous change since
18721 it causes regressions.
18723 2004-09-08 Martin Baulig <martin@ximian.com>
18725 * class.c (class_compute_field_layout): Don't call
18726 mono_class_layout_fields() for open generic instances.
18728 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
18729 * threads.c appdomain.c: fix typo in GC macro
18731 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18733 * threads.c: don't call mono_thread_detach() in start_wrapper(),
18734 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
18736 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
18738 * image.c (mono_image_close): Applied patch from
18739 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
18740 assembly is loaded multiple times from data.
18742 * image.c (mono_image_open): Fix warning.
18744 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18746 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
18747 once. Fixes #58334.
18749 * reflection.c (mono_reflection_create_runtime_class): Initialize
18750 klass->nested_classes. Fixes #61224.
18752 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
18754 * threads.c: sched_yield() on exit, to allow threads to quit.
18756 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18758 * object.c (mono_unhandled_exception): Remove leftover debug code.
18760 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
18762 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
18764 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18766 * marshal.c (emit_marshal_array): Really null terminate string arrays.
18768 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
18770 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18772 * marshal.c (emit_marshal_array): Null terminate string arrays.
18774 * marshal.c (raise_auto_layout_exception): Fix warning.
18776 * reflection.c (mono_param_get_objects): Initialize the default value
18777 with DBNull.Value, not null. Fixes #62123.
18779 2004-09-01 Miguel de Icaza <miguel@ximian.com>
18781 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
18782 throw an exception with a cute explanation.
18784 2004-09-06 Dick Porter <dick@ximian.com>
18786 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
18787 Close the new process's thread handle, as we don't use it. The
18788 handle stays around forever otherwise.
18790 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18792 * object.c (arith_overflow): Fix warning.
18794 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
18795 calling conventions in method refs. Fixes #65352.
18797 * reflection.c: Fix warnings.
18799 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
18801 * icall.c: Add a new icall for Array.Clear
18803 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
18805 * object.c: When allocating an array, we have to throw
18806 an overflow exception if any of the lengths are < 0.
18808 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18810 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
18811 properly. Also move implementation of string array marshalling to
18812 managed code. Fixes #42316.
18814 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18816 * assembly.c: provide more information when loading an assembly fails.
18818 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18820 * filewatcher.c: don't expect the development fam package to be
18823 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
18825 * marshal.c: Make a copy of the signature cookie since it will be
18826 freed by the caller.
18828 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
18830 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
18832 * metadata.c (mono_metadata_free_marshal_spec): New function to free
18835 * marshal.c: More refactoring.
18837 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
18840 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
18842 * object.c: In mono_message_invoke, fill the output parameter array after
18843 calling the managed method (it was done before the call). This fixes
18846 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18848 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
18851 2004-09-02 Martin Baulig <martin@ximian.com>
18853 * class.c (mono_class_instance_size): Don't allow generic type
18854 definitions or open generic instances.
18855 (mono_class_array_element_size): If we're a value type, call
18856 mono_class_instance_size() on the original class.
18858 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
18859 handle generic instances.
18861 * mono-debug-debugger.c (write_type): Handle generic instances
18864 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18866 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
18867 the allocation request fails. Fixes #65089.
18869 * object.c (mono_runtime_free_method): Do not call mono_free_method.
18871 * object.c (mono_runtime_free_method): New function to free a dynamic
18874 * marshal.c (mono_delegate_free_ftnptr): New function to free the
18875 delegate trampoline.
18877 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
18878 with hasthis as dynamic,
18880 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
18882 * domain.c (mono_jit_info_table_remove): New function to remove an
18883 entry from the jit info table.
18885 * class-internals.h (MonoMethod): Add 'dynamic' field.
18887 * loader.c: Fix warnings.
18889 2004-09-01 Martin Baulig <martin@ximian.com>
18891 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
18892 instead of mono_debugger_lock() because the latter one is a no-op
18893 unless running in the debugger.
18895 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
18897 * class.c (class_compute_field_layout): Classes with auto-layout or
18898 reference fields are not blittable.
18900 2004-09-01 Dick Porter <dick@ximian.com>
18902 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
18903 mono_image_get_filename() to get the assembly location.
18906 * metadata.h: Fix compile warnings
18908 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
18910 * class.c (class_compute_field_layout): System.Object is blittable.
18912 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
18913 as in/out. Fixes #59909.
18915 2004-09-01 Martin Baulig <martin@ximian.com>
18917 * metadata.h (MONO_TYPE_ISREFERENCE): Call
18918 mono_metadata_generic_inst_is_valuetype() if we're a generic
18919 instance to check whether our underlying type is a reference type.
18921 2004-09-01 Martin Baulig <martin@ximian.com>
18923 * metadata.c (mono_type_size): If we're a generic instance, call
18924 mono_class_value_size() for value types.
18926 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
18928 * marshal.c: Implement more custom marshalling functionality. Fixes
18931 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
18933 * mono-debug.c, debug-mono-symfile.c: add some locking love.
18935 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
18937 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
18939 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
18941 * icall.c: Fix some warnings.
18943 * threads.c (abort_appdomain_thread): Fix unref errors.
18944 (mono_thread_current): Fix THREAD_DEBUG define.
18946 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
18948 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
18950 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
18952 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
18954 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
18957 2004-08-28 Martin Baulig <martin@ximian.com>
18960 (mono_metadata_generic_inst_is_valuetype): New public function.
18962 * metadata.h (MONO_TYPE_ISSTRUCT): Call
18963 mono_metadata_generic_inst_is_valuetype() if we're a generic
18964 instance to check whether our underlying type is a valuetype.
18966 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
18968 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
18971 2004-08-25 Martin Baulig <martin@ximian.com>
18973 * loader.c (mono_get_method_from_token): Abstract methods can also
18974 be generic and thus have type parameters.
18976 * metadata-internals.h
18977 (MonoDynamicImage): Added `GPtrArray *gen_params'.
18979 * reflection.c (mono_image_get_generic_param_info): Don't create a
18980 metadata row, just add an entry to the `gen_params' array.
18981 (build_compressed_metadata): Sort the `gen_params' array and then
18982 actually create the metadata.
18984 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18986 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
18988 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
18990 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
18992 2004-08-24 Martin Baulig <martin@ximian.com>
18994 * class.cs (mono_class_is_subclass_of): Like an interface, a
18995 generic instance also derives from System.Object.
18997 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
18999 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
19000 custom modifiers to be in any order. Fixes #61990.
19002 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
19004 * object.c: Register mono_object_new_fast icall.
19006 * object.c (mono_class_get_allocation_ftn): Return to calling
19007 mono_object_new_fast, since it seems faster to compute the object
19008 size in unmanaged code than passing it as a parameter.
19010 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
19012 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
19013 this function with Boehm as the oom handler, so we don't have to check
19014 the result of GC_malloc.
19016 * object.c: Remove checks for oom.
19018 * object.h object.c (mono_class_get_allocation_ftn): New function to
19019 return the icall which can be used to allocate an instance of a given
19022 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
19024 * class-internals.h: Add 'enabled' field.
19026 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
19028 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
19030 2004-08-18 Jambunathan K <kjambunathan@novell.com>
19031 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
19034 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
19036 * appdomain.c: use the Tls function for appdomain too,
19037 at Zoltan's request. Actually return in mono_context_get
19039 * appdomain.c, profiler.c, threads.c: use __thread
19041 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
19043 * appdomain.c threads.c: Call GC_CreateThread on windows.
19045 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
19046 multiple libraries since this don't work on windows.
19048 2004-08-18 Martin Baulig <martin@ximian.com>
19050 * class-internals.h
19051 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
19054 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
19055 MonoMethodNormal since we also need it for abstract and interface
19059 (build_compressed_metadata): Sort the GenericParam table.
19060 (mono_image_create_token): Added `gboolean create_methodspec'
19061 argument; this is false when generating a MethodImpl token.
19062 (reflection_methodbuilder_to_mono_method): Abstract and interface
19063 methods may also have generic parameters.
19065 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
19067 * appdomain.c: thread local alloc
19069 2004-08-17 Martin Baulig <martin@ximian.com>
19071 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
19074 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
19077 * class.c (mono_type_get_full_name): New public function.
19078 (mono_type_get_name): Don't include the type arguments.
19080 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
19082 * Makefile.am: Build static versions of libmetadata and libmonoruntime
19083 for inclusion into the mono executable.
19085 2004-08-16 Martin Baulig <martin@ximian.com>
19087 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
19088 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
19090 2004-08-14 Martin Baulig <martin@ximian.com>
19092 * class.c (dup_type): Also copy the `byref' field.
19094 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
19096 * reflection.c (create_dynamic_mono_image): Revert the last change
19097 since it breaks bootstrap.
19099 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
19101 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
19103 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
19104 not free them with g_free.
19106 2004-08-11 Martin Baulig <martin@ximian.com>
19108 * reflection.c (mono_reflection_setup_internal_class): Also call
19109 mono_class_setup_mono_type() if we already have a `tb->type.type'.
19111 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
19113 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
19114 called during default (first) AppDomain creation. Keep track of
19115 Evidence when loading assemblies.
19117 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19119 * opcodes.c, opcodes.h: reduce runtime relocations.
19121 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
19123 * culture-info.h, locales.c: fixes and chages to sue the new
19124 optimized format of the locale data.
19125 * culture-info-tables.h: regenerated.
19127 2004-08-06 Geoff Norton <gnorton@customerdna.com>
19129 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
19131 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
19133 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
19134 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
19135 * domain-internals.h: icall declaration.
19136 * icall.c: icall registration.
19137 * object-internals.h: New fields in MonoAssembly for CAS.
19139 2004-08-05 Duncan Mak <duncan@ximian.com>
19141 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
19144 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
19146 * reflection.c: fix to deal with object[] arrays in custom ctors
19149 2004-08-05 Martin Baulig <martin@ximian.com>
19151 * class.c (mono_class_array_element_size): Added support for
19152 generic instances and correctly handle "recursive" types.
19154 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
19156 * assembly.c: Fix warnings.
19158 2004-08-04 Martin Baulig <martin@ximian.com>
19161 (mono_type_get_name_recurse): Added `gboolean include_arity'
19162 argument specifying whether or not we should include the generic
19163 arity in the type name.
19164 (_mono_type_get_name): New static function.
19165 (mono_class_setup_vtable): If we're a generic instance, don't
19166 include the generic arity in the names of explicit method
19169 2004-08-03 Martin Baulig <martin@ximian.com>
19171 * class.c (mono_type_get_name_recurse): Enclose the generic type
19172 arguments in `<', '>'.
19174 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
19176 * gc.c: make GC warning messages use the trace API, they are just
19177 noise to most of the users.
19179 2004-08-03 Martin Baulig <martin@ximian.com>
19181 * debug-mono-symfile.c (read_string): Correctly read the string.
19183 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
19185 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
19187 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
19189 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
19191 2004-07-30 Martin Baulig <martin@ximian.com>
19193 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
19194 Reflect latest symbol writer changes.
19196 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
19198 * object.c: always create an object if null is passed
19199 to Invoke() where a valuetype is expected.
19201 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
19203 * marshal.c (mono_marshal_init): make managed
19204 signatures match native ones better for 64bits.
19206 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19208 * appdomain.c: hack to build correctly the private bin path on windows.
19211 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
19213 * assembly.c: Load mscorlib from the correct framework directory
19214 (mono/<version>/mscorlib.dll).
19215 * appdomain.h: Added prototypes for new functions.
19216 * internals.h: Added some prototypes.
19217 * domain.c: When initializing the runtime, get from the executable and
19218 the configuration files the runtime version that the app supports.
19219 Added support methods for reading app.exe.config. Added list of versions
19220 supported by the JIT. Added two new methods: mono_init_from_assembly,
19221 which initializes the runtime and determines the required version from
19222 the provided exe file, and mono_init_version, which initializes
19223 the runtime using the provided version.
19224 * icall.c: Get machine.config from version-specific directory.
19225 * reflection.c: When generating an image, embed the version number
19226 of the current runtime.
19228 2004-07-28 Dick Porter <dick@ximian.com>
19231 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
19232 returned sockaddr size before creating the remote address object.
19233 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
19236 2004-07-28 Dick Porter <dick@ximian.com>
19238 * locales.c (string_invariant_compare_char): Fix invariant char
19239 compares between upper and lower cases. Fixes bug 61458.
19241 2004-07-27 Ben Maurer <bmaurer@ximain.com>
19243 * marshal.c: actually cache stelem.ref wrappers.
19245 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19247 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
19248 sections and remove the mono_cli_rva_map () function.
19250 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19252 * debug-mono-symfile.c: fix one more endianess issue, from a patch
19253 by Geoff Norton (<gnorton@customerdna.com>).
19255 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
19257 * class.c: fix class loads for pointer types (typeof(int) !=
19260 2004-07-27 Martin Baulig <martin@ximian.com>
19262 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
19263 reading the debugging information from an external ".mdb" file.
19265 2004-07-24 Martin Baulig <martin@ximian.com>
19267 * reflection.c (mono_image_get_type_info): Only write a class
19268 layout entry if we actually have a size or a packing size.
19270 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
19272 * reflection.c (type_get_fully_qualified_name):
19273 insert cast to get type checking of ?: with non-gcc compilers
19275 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
19277 * rand.c: use g_getenv for both lookups of
19280 2004-07-17 Martin Baulig <martin@ximian.com>
19282 * reflection.c (mono_reflection_bind_generic_method_parameters):
19283 Set `gmethod->reflection_info'.
19285 2004-07-17 Martin Baulig <martin@ximian.com>
19287 * class.c (mono_class_create_from_typedef): Insert the newly
19288 created class into the hash table before computing the interfaces
19289 since we could be called recursively.
19291 2004-07-16 Ben Maurer <bmaurer@ximain.com>
19293 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
19294 function to implement stelem.ref in managed code
19295 * class-internals.h, debug-helpers.c: a new wrapper type
19298 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
19300 * gc.c: allow GC handles to work even when no GC is compiled in.
19301 Fix part of bug #61134 (GetAddrOfPinnedObject).
19303 2004-07-13 Peter Williams <peter@newton.cx>
19305 * process.c (complete_path): Make sure we don't attempt to execute
19308 2004-07-12 Geoff Norton <gnorton@customerdna.com>
19310 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
19311 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
19312 and will add/subtract the hour if needed
19314 2004-07-12 Martin Baulig <martin@ximian.com>
19316 * reflection.c (mono_field_get_object): If we have
19317 `field->generic_info', take the attributes from
19318 `field->generic_info->generic_type'.
19320 2004-07-12 Martin Baulig <martin@ximian.com>
19322 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
19323 This function must be called before initializing the runtime.
19324 (mono_debug_init_1): New function; call this after initializing
19325 the runtime, but before loading the assembly. It tells the
19326 debugger to load corlib and the builtin types.
19328 * mono-debug-debugger.c: Did some larger changes in the debugging
19329 code; support recursive class declarations, make sure we actually
19332 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19334 * debug-helpers.c: undo my previous patch and fixed the real issue in
19335 ../mini/exceptions-x86.c
19337 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19339 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
19340 when no HOME env. variable was set and a NullRef was thrown in a .cctor
19341 called from other .cctors.
19343 2004-07-09 Miguel de Icaza <miguel@ximian.com>
19345 * loader.c: Removed the mono_loader_wine_init hack now that we are
19346 doing a managed version of Windows.Forms.
19348 2004-07-09 Ben Maurer <bmaurer@ximian.com>
19350 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
19351 threadpool.c, threads.c: remove static data from rootset.
19353 2004-07-09 Dick Porter <dick@ximian.com>
19355 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
19356 Don't do any more processing if the matched length was 0. It was
19357 increasing the size of the string before. Fixes bug 61167.
19359 2004-07-09 Dick Porter <dick@ximian.com>
19363 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
19364 Add support for SO_PEERCRED if its available.
19366 2004-07-09 Peter Bartok <pbartok@novell.com>
19367 * loader.c: winelib.exe.so error message is now only displayed if
19368 MONO_DEBUG is set. To help us avoid questions when people are trying
19369 out the new Managed.Windows.Forms.
19371 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
19373 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
19374 for isinst and castclass wrappers.
19376 * class-internals.h icall.c: Move registration and lookup of JIT icalls
19377 to libmetadata from the JIT, so they could be used by the marshalling
19378 code and the interpreter.
19380 * marshal.c: Register marshalling related JIT icalls here instead of
19381 in mini.c. Use CEE_MONO_ICALL instead of the family of
19382 CEE_MONO_PROC<x> opcodes to call marshalling functions.
19384 * metadata.h: Remove unneeded marshalling conversions.
19386 * opcodes.c: Update for new opcodes.
19388 2004-07-08 Martin Baulig <martin@ximian.com>
19390 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
19391 (mono_debug_get_domain_data): Make this function static.
19393 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
19395 * gc.c, object.h: add nice GC handle API for embedders.
19397 2004-07-06 Ben Maurer <bmaurer@ximian.com>
19399 * reflection.c: more changes for the new api
19401 * object.c: When we reflect on a field w/ a constant value, it
19402 will not have a memory location, so we must access metadata. Also,
19403 allow easier reading of strings so that we can read them from
19406 * class.c (mono_class_layout_fields): no need for literal fields here.
19408 * class-internals.h: api changes for const fields
19410 * icall.c (ves_icall_get_enum_info): use new apis for const fields
19412 2004-07-06 Martin Baulig <martin@ximian.com>
19414 * mono-debug.h: Increment version number to 44.
19416 * mono-debug.c (mono_debug_add_wrapper): The second argument is
19417 now a gpointer, rewrote this whole method.
19419 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
19420 function. Add information about the wrapper in a new "misc table".
19422 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
19423 for the new misc table.
19425 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
19427 * metadata-internals.h image.c: Add a cache for helper signatures.
19429 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
19431 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
19433 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
19434 delegates from a delegate. Fixes #61033.
19436 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
19437 marshalling of stringbuilder arrays. Fixes #59900.
19439 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
19441 * icall.c: Add EnumBuilder:setup_enum_type icall.
19443 2004-06-30 Ben Maurer <bmaurer@ximian.com>
19445 * icall.c: Added a new icall for the property version of
19446 OffsetOfStringData.
19448 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
19450 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
19451 it has a constant size across platforms.
19453 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
19456 2004-06-29 Martin Baulig <martin@ximian.com>
19458 * mono-debug.c (mono_debug_add_method): Protect the whole function
19459 in mono_debugger_lock(), not just parts of it.
19461 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19463 * reflection.c: make sure padding bytes in heaps are zeroed.
19465 2004-06-24 David Waite <mass@akuma.org>
19467 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
19468 image.c, loader.c, locales.c, marshal.c, metadata.c,
19469 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
19470 string-icalls.c, threads.c: change to C90-style comments from C99 /
19473 2004-06-24 Dick Porter <dick@ximian.com>
19476 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
19477 return createdNew. Fixes bug 60412.
19480 * icall.c: Add createdNew parameter to CreateMutex icall
19482 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19484 * reflection.c, object-internals.h: save default value in params.
19486 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19488 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
19489 no need to build a new path combining that with the application base.
19492 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19494 * reflection.c: fixed minor standard compliance issues.
19496 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
19498 * reflection.c: fixed issue with encoding some custom attributes
19499 (arrays in properties and fields, bug #60411).
19501 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19503 * reflection.c: fix start address when copying the public key token.
19505 2004-06-23 Martin Baulig <martin@ximian.com>
19507 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
19508 the `exc' object in a static object to put it into the GC's root set.
19510 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19512 * reflection.c: make mono_reflection_setup_internal_class ()
19513 callable a second time to setup a new parent class.
19515 2004-06-23 Dick Porter <dick@ximian.com>
19517 * threads.c: Check for WAIT_IO_COMPLETION return values.
19519 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
19521 * appdomain.c: Removed the g_free on the public key token. Now copy
19522 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
19523 * assembly.c: Added public key token string value when loading
19524 assemblies. Fix bug #60439.
19525 * icall.c: Added missing informations (like public key) in
19526 GetReferencedAssemblies. Fix #60519.
19527 * image.h: Changed definition for public key token from const char*
19528 public_tok_value to guchar public_key_token [17];
19529 * reflection.c: Updated for changes to public key token.
19531 2004-06-22 Lluis Sanchez Gual
19533 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
19534 for the field in base classes.
19536 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
19538 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
19539 mark headers as not supported, they are installed only for use by the
19542 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
19544 * *.c, *.h: avoid namespace pollution in public headers.
19546 2004-06-21 Martin Baulig <martin@ximian.com>
19548 * exception.c (mono_get_exception_security): It's in
19549 "System.Security", not in "System".
19551 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
19552 the exception classes.
19554 2004-06-21 Martin Baulig <martin@ximian.com>
19556 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
19557 Protect the exception object from being finalized.
19559 2004-06-21 Martin Baulig <martin@ximian.com>
19561 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
19564 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
19566 * reflection.c: Load the assembly in mono_reflection_type_from_name,
19567 if it was not loaded before. Fix parts of #60439.
19569 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
19571 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
19572 code that was broken since Ben's change: wrappers are now
19573 dependent on the method signature only again.
19575 2004-06-21 Martin Baulig <martin@ximian.com>
19577 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
19578 added interface support.
19580 2004-06-21 Martin Baulig <martin@ximian.com>
19582 * class.c (mono_vtable_get_static_field_data): New public method.
19584 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
19586 * filewatcher.c : Windows build fix to be compliant with API changes.
19588 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19590 * class.h, class.c: more accessors.
19591 * metadata.h, metadata.c: prepare for hiding MonoType and
19592 MonoMethodSignature: people should use the accessors from now on
19593 outside of the tree.
19595 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19597 * *.c, *.h: more API cleanups.
19599 2004-06-18 Jackson Harper <jackson@ximian.com>
19601 * assembly.c: Trace loading assemblies.
19602 * loader.c: Trace loading native libraries.
19603 * mono-config.c: Trace loading config files.
19605 2004-06-18 Dick Porter <dick@ximian.com>
19607 * locales.c: Tell ICU the lengths of strings, it can cope with
19608 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
19610 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19612 * image.c: swapped name/filename;
19614 2004-06-18 Martin Baulig <martin@ximian.com>
19616 * mono-debug-debugger.c (write_class): Write the parent class at
19617 the end of the header.
19619 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
19621 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
19623 2004-06-17 Raja R Harinath <rharinath@novell.com>
19625 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
19626 (bundle_obj): New conditional define.
19627 (BUILT_SOURCES): Remove.
19628 ($(bundle_srcs)): Make parallel-make safe.
19629 (libmonoruntime_la_LIBADD): Make unconditional.
19630 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
19631 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
19633 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
19635 * culture-info-tables.h: It was inconsistent with the latest
19638 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
19640 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
19643 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
19646 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19648 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
19649 cleaned up public header threads.h.
19651 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19653 * Makefile.am, *.c, *.h: more API cleanups.
19655 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19657 * Makefile.am: removed monosn from compilation.
19658 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
19659 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
19660 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
19661 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
19662 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
19663 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
19665 2004-06-15 Jackson Harper <jackson@ximian.com>
19667 * assembly.c: Make locales lower case when searching the GAC for
19668 assemblies. gacutil will always make locales lowercase when
19669 installing so this effectively makes them case insensitive.
19671 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
19673 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
19674 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
19675 parameter which allows to choose whether the wait can be interrupted or
19676 not. Also added the method mono_monitor_enter(), which locks the monitor
19677 using an infinite wait and without allowing interruption.
19678 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
19680 * object.h: Added new fields in MonoThread. suspend_event holds the event
19681 used to susped/resume the thread. synch_lock is the lock object to use for
19682 modifying the thread state.
19683 * threads.c: Use the new synch_lock object for locking, instead of "this",
19684 which can generate deadlocks.
19685 Moved thread state change in Thread.Sleep and Thread.Join from managed
19686 to unmanaged code. This avoids a deadlock when the thread was suspended
19687 just after acquiring the thread lock.
19688 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
19689 Implemented Thread.Suspend using an event instead of ThreadSuspend,
19690 which is not fully implemented in the io-layer.
19691 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
19693 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
19695 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
19696 threads-types.h: more API cleanups.
19698 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19700 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
19701 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
19702 threadpool.c, threads.c: first pass at the exported API cleanup.
19704 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19706 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
19708 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19710 * icall.c: added internalGetHome.
19712 2004-06-14 Dick Porter <dick@ximian.com>
19714 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
19715 possible to return successfully when '.' or '..' were the only
19716 entries in a directory, but were skipped. The MonoIOStat was not
19717 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
19720 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19722 * reflection.c: make binaries run on .Net 1.1 by default.
19724 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19726 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
19728 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
19730 * marshal.c: keep track of struct size with explicit layout
19733 2004-06-12 Martin Baulig <martin@ximian.com>
19735 * mono-debug-debugger.c: Comment out a debugging g_message().
19737 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
19739 * reflection.c, reflection.h: do not free custom attrs that are cached.
19740 * icall.c: use braces to make code clearer.
19742 2004-06-11 Martin Baulig <martin@ximian.com>
19744 * class.h (MonoInflatedField): New type.
19745 (MonoClassField): Replaced `MonoType *generic_type' with
19746 `MonoInflatedField *generic_info'.
19749 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
19751 2004-06-11 Martin Baulig <martin@ximian.com>
19753 * reflection.c (mono_image_create_method_token): Correctly encode
19756 2004-06-11 Martin Baulig <martin@ximian.com>
19758 * metadata.c (mono_metadata_parse_method_signature): When parsing
19759 a MethodDef which has VarArgs, also set sentinelpos if we don't
19760 have any parameters.
19762 2004-06-11 Martin Baulig <martin@ximian.com>
19764 * verify.c (mono_method_verify): In CEE_CALL, use
19765 mono_method_get_signature() to get the method's signature, unless
19766 we're a PInvoke method.
19768 2004-06-10 Jackson Harper <jackson@ximian.com>
19770 * assembly.c: Use <path>/lib/mono/gac for the extra paths
19771 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
19772 logical name as the supplied path is just a prefix to the gac not
19773 the direct path to it.
19775 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
19777 * reflection.c: make the token for a created method match
19778 the token of the MethodBuilder it was created from
19779 (IKVM requires this behaviour now).
19781 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
19783 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
19784 reflection.c, socket-io.c: leak fixes.
19786 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19788 * icall.c: handle sentinel pos in vararg methods in position different
19791 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19793 * culture-info-tables.h: freshly generated.
19795 2004-06-09 Martin Baulig <martin@ximian.com>
19797 * loader.c (mono_get_method_constrained): Call `mono_class_init
19798 (constrained_class)'.
19800 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
19802 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
19803 any methods. Fixes #59629.
19805 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
19807 * culture-info-tables.h: reflecting locale-builder updates.
19809 2004-06-08 Dick Porter <dick@ximian.com>
19812 * locales.c: Fixed compile warnings, including a real bug in
19813 CompareInfo_internal_compare.
19815 2004-06-08 Dick Porter <dick@ximian.com>
19818 (ves_icall_System_Globalization_CompareInfo_internal_index):
19819 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
19820 Double-check the resuls of usearches, because ICU currently
19821 ignores most of the collator settings here. Fixes bug 59720.
19823 2004-06-08 Dick Porter <dick@ximian.com>
19826 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
19827 Fix memory leak and segfault-causing typo. No idea how this one
19828 lasted so long without being noticed.
19830 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
19832 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
19833 any methods. Fixes #59629.
19835 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19838 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
19839 own the critical section before). Removed dead code (that's done
19840 in the preload hook).
19842 (mono_assembly_load_with_partial_name): call the preload hook.
19844 2004-06-08 Martin Baulig <martin@ximian.com>
19846 * metadata.c (mono_metadata_signature_alloc): Default
19847 `sentinelpos' to -1.
19849 * reflection.c (mono_image_get_array_token): Likewise.
19851 2004-06-08 Martin Baulig <martin@ximian.com>
19853 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
19855 * metadata.c (mono_metadata_parse_method_signature): When parsing
19856 a MethodDef which has VarArgs, set sentinelpos.
19858 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
19859 `gint16' since we're using -1 for non-varargs methods.
19862 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
19863 (method_encode_signature): Added varargs support.
19864 (method_builder_encode_signature): Likewise.
19865 (mono_image_get_varargs_method_token): New static method.
19866 (mono_image_create_method_token): New public method; this is
19867 called via an icall instead of mono_image_create_token() when
19868 calling a varargs method.
19870 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
19872 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
19874 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
19876 * culture-info-tables.h : Reflecting the latest locale-builder that
19877 fixed empty array representation ({} to {0}).
19879 2004-06-07 Jackson Harper <jackson@ximian.com>
19881 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
19882 looking up extra gac paths. This allows MONO_GAC_PATH to act
19883 exactly like a prefix.
19885 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
19887 * reflection.c (mono_reflection_type_from_name): Make a copy of the
19888 type name before modifying it. Fixes #59405.
19890 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
19892 * culture-info.h: added fields for "all datetime patterns".
19893 * locales.c: ( ves_icall_System_Globalization_CultureInfo
19894 _construct_datetime_format ()): fill xxx_patterns fields.
19895 * object.h: added fields for "all datetime patterns" to
19896 MonoDateTimeFormatInfo.
19897 * culture-info-tables.h: reflecting locale-builder updates.
19899 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
19901 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
19902 the event has no add and remove methods. Fixes #59629.
19904 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
19906 * object.c: Fixed possible integer overflow when allocating large
19909 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
19911 * culture-info-tables.h: reflecting locale-builder updates.
19913 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
19915 * culture-info-tables.h: reflecting locale-builder updates.
19917 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
19919 * culture-info-tables.h: reflecting locale-builder updates.
19921 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
19923 * threads.c: Made Thread.Sleep abortable.
19925 2004-06-02 Martin Baulig <martin@ximian.com>
19927 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
19929 * debug-mono-symfile.h: Bumped symbol file version number to 37.
19931 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
19933 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
19935 2004-05-30 Jackson Harper <jackson@ximian.com>
19937 * reflection.c: Do not hardcode assembly versions or public key
19938 tokens anymore. All of this except the corlib section was dead
19941 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
19943 * object.c (mono_runtime_invoke_array): Automatically create boxed
19944 objects for byref valuetypes if needed. Fixes #59300.
19946 * object.c (mono_method_return_message_restore): Handle
19947 MONO_TYPE_OBJECT as well.
19949 2004-05-28 Jackson Harper <jackson@ximian.com>
19951 * reflection.c: The modified type encoding was causing build
19952 problems. Reverted for now.
19954 2004-05-28 Jackson Harper <jackson@ximian.com>
19956 * reflection.c/h: Take an assembly ref so that we dont create
19957 fully qualified names when encoding types in the same assembly as
19958 the custom attribute being emitted.
19959 * appdomain.c: Increment version number.
19961 2004-05-26 Duncan Mak <duncan@ximian.com>
19964 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19965 Set the full version number (major, minor, build, revision).
19967 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
19969 * marshal.c (emit_struct_conv): increment src/dst after blit
19970 (mono_marshal_get_managed_wrapper,
19971 mono_marshal_get_native_wrapper): make sure we have marshalling
19972 info before marshalling params (info computation affects
19975 * class.c (class_compute_field_layout): correctly deal with
19977 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
19978 value types (as per what windows dows by default)
19979 (mono_class_setup_mono_type): System.ValueType is blittable
19980 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
19983 * marshal.c (mono_marshal_load_type_info): flag types as
19984 non-blittable if the native layout doesn't match the managed
19987 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19989 * appdomain.c: don't add stuff in the private search path that is
19990 above the application base. If application base is not set, there's
19991 no private search path.
19993 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
19995 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
19996 byref struct arguments in native->managed marshalling.
19998 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
20000 * marshal.c (mono_marshal_get_runtime_invoke): correctly
20001 cache methods using signature (special case for methods
20002 that are value type or string class)
20004 * image.c (mono_image_close): clean up allocated GSList's
20005 in runtime_invoke_cache.
20007 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20009 * mono-config.c: set the correct path for mono_cfg_dir on windows when
20010 there's no MONO_CFG_DIR environment variable defined.
20012 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20014 * threads.c: windows version must be >= 0x0500 to include OpenThread.
20016 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
20018 * threadpool.c: Really wait for 500ms after the async call, even if the wait
20020 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
20021 before waiting for it, and call CloseHandle after the wait to unref it.
20022 This will make sure that handles are not disposed too early.
20024 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20029 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
20032 * object.c: se the application_base only for the domain that runs
20033 Main. Fixes bug #59216,
20035 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20038 * object.c: only the domain in which Main is run have
20039 SetupInformation.ConfigurationFile set, so moved a few lines from
20040 appdomain.c to object.c.
20042 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20044 * appdomain.c: we tried to load [name].(dll|exe), but according
20045 to bug #57710, we must also try [culture]/[name].(dll|exe) and
20046 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
20047 There's a test case attached to bug #58922.
20049 2004-05-27 Dick Porter <dick@ximian.com>
20052 * file-io.c: Implemented icalls for locking and unlocking regions
20054 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
20055 FALSE on error (fixes both compiler warning and real bug.)
20057 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
20059 * culture-info-tables.h: reflecting locale-builder updates.
20061 (Added missing ChangeLog entry for 05/26)
20063 2004-05-27 Jackson Harper <jackson@ximian.com>
20065 * locales.c: Fix some cut and paste errors.
20067 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20069 * mono-config.c: set the correct path for config. directory on windows.
20071 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
20073 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
20076 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
20078 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
20079 from pinvoke functions.
20081 * marshal.c (mono_ftnptr_to_delegate): Implement this.
20083 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
20085 * culture-info-tables.h: reflecting locale-builder updates.
20087 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
20089 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
20092 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
20094 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
20095 * icall.c: Modified icalls for RNG.
20096 * rand.c|h: Changed RNG interface to allow thread-safe usage under
20097 Windows (CryptoAPI).
20099 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
20101 * locales.c: Fix build.
20103 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
20105 * culture-info-tables.h: reflecting locale-builder updates.
20107 2004-05-25 Jackson Harper <jackson@ximian.com>
20109 * locales.c: When creating the current culture use the $LANGs
20110 specific culture. So DateTimeFormat and NumberFormat entries are created.
20112 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
20114 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
20115 a char array as parameter.
20117 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
20119 * image.c: In mono_image_open(), always use an absolute path name to
20120 look for already loaded images.
20122 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
20124 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
20125 missing in the windows build (like older cygwin include files).
20127 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
20129 * icall.c: Fixed check for possible integer overflow in Buffer_
20130 BlockCopy icall. Replaced comments style // by /* */.
20132 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
20134 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
20136 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
20137 check after MONO_VTADDR. Fixes pinvoke2.exe.
20139 * marshal.h marshal.c metadata.h: Add beginnings of support for
20140 ftnptr -> delegate marshalling.
20142 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
20144 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
20145 * threads.c: Fix warnings.
20147 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
20149 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
20150 * icall.c: Registered icalls for Suspend and Resume.
20151 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
20153 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
20154 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
20155 * process.c: Use WaitForSingleObjectEx.
20156 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
20158 * threads.c, threads.h: Make use of new Ex wait methods. Improved
20159 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
20160 for Suspend and Resume. Added new mono_thread_stop, used for stoping
20161 background threads. Added basic support for Abort in Windows.
20162 Start new threads using a managed delegate invoke wrapper. This wrapper
20163 has an interruption checkpoint that is needed since an interruption
20164 can be requested before the thread leaves the unmanaged code that starts
20166 * marshal.c: Added interruption checkpoint after every native call, and
20167 also before managed calls for wrappers called from unmanaged code to
20168 go into managed code.
20169 * object.h: Added new field in MonoThread to keep track of interruption
20172 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
20174 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
20177 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20184 * rand.c: getenv -> g_getenv (windows!)
20186 * process.c: complete_path is also used on non-windows platforms.
20188 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20190 * icall.c: new signature for Process_Start.
20192 * process.[ch]: new signature for Process_Start. If we're on windows
20193 and UseShellExecute is false, we have to search for the program by
20194 ourselves if we don't get a full path.
20196 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
20198 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
20199 marshalling and call CleanUpNativeData if needed. Fixes #58646.
20201 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20203 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
20206 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20208 * process.c: use double quotes to quote program name and arguments on
20209 windows. Fixes bug #58575.
20211 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20213 * file-io.c: don't return "." and ".." when using windows Find*File.
20215 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
20217 * marshal.c: Don't pass wrappers to message init because method
20218 addressed used to lookup metadata. part of remoting[2|3] fix.
20220 2004-05-15 Jackson Harper <jackson@ximian.com>
20222 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
20223 path is essentially the same as MONO_PATH except that it points to
20224 GACs instead of lib directories.
20225 * loader.h: The user gac is gone so we dont need function to
20227 * mono-config.c: user gac option is now gone.
20229 2004-05-15 Jackson Harper <jackson@ximian.com>
20231 * culture-info.h: Make defines more consistent, add calendar data
20232 to the culture info table.
20233 * culture-info-tables.h: Add basic calendar data. Basically
20234 everyone gets default gregorian until all the data is
20236 * locales.c: Use the new consistent defines. Set calendar data for
20237 culture info objects.
20238 * object.h: add a field for calendar data to CultureInfo
20240 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
20242 * image.c: image->runtime_invoke_cache is keyed on signatures now.
20243 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
20245 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
20246 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
20247 an extra param that is the pointer of the method to invoke. The IL for
20248 the invoke method is no longer specific to the method, but to the
20249 signature of the method. Thus, we can share the same code for multiple
20250 methods. This reduces the number of methods that have to be compiled.
20252 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
20254 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
20256 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20258 * icall.c: Optimize Buffer.BlockCopy.
20260 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20262 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
20263 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
20264 quote). Changed them to "MMMM yyyy".
20266 2004-05-12 Miguel de Icaza <miguel@ximian.com>
20269 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
20271 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
20273 * reflection.h: Updated after changes to managed structures.
20275 * appdomain.c: Bump corlib version.
20277 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20279 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
20282 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20284 * Makefile.am: link to ../os/libmonoos.la on windows.
20287 -If MONO_DEBUG, warn about non-existing directories in
20289 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
20290 compile time variable.
20291 -Removed init_default_path and call mono_set_rootdir from
20292 libmonoos.a instead (windows only).
20294 * assembly.h: declare mono_assembly_getrootdir().
20297 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
20299 * loader.c: s/getenv/g_getenv/
20301 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
20303 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
20305 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
20307 * metadata.h: Add new marshalling conversions.
20309 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
20312 * reflection.c (mono_reflection_get_type): Lookup the type in all
20313 modules of a multi-module assembly. Fixes #58291.
20315 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
20317 * threads.c: Before aborting a background, set the StopRequested
20318 state. This avoids throwing the Abort exception.
20319 In mono_thread_manage, don't continue with the shutdown until all
20320 aborted threads have actually stopped.
20322 2004-05-10 Jackson Harper <jackson@ximian.com>
20324 * locales.c: Remove the modifier from culture names.
20326 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20328 * Makefile.am: monosn is not installed any more. It has been deprecated
20331 2004-05-07 Jackson Harper <jackson@ximian.com>
20334 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
20335 Fix array construction, add bailout if the length is 0.
20337 2004-05-07 Dick Porter <dick@ximian.com>
20339 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
20340 machine doesn't have a DNS entry. Patch by Urs Muff
20341 (umuff@quark.com), fixes bug 57928.
20343 2004-05-06 Jackson Harper <jackson@ximian.com>
20345 * reflection.c: Handle null PublicTokens properly. alloc mem for
20346 assembly names culture so we dont crash when freeing it.
20348 2004-05-06 Jackson Harper <jackson@ximian.com>
20350 * assembly.c: Check the usergac when loading with partial names.
20352 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
20354 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
20355 does nothing for now (not required for Linux/Windows) but the class
20356 library can call it (and a newer or modified runtime could need it).
20357 * icall.c: Registred icall.
20359 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20361 * loader.c: prints a message on module loading error we set MONO_DEBUG
20362 environment variable.
20364 2004-05-05 Jackson Harper <jackson@ximian.com>
20366 * appdomain.c: Handle PublicKeyToken=null properly.
20368 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
20370 * environment.c|h: Added icall ves_icall_System_Environment_
20371 GetOSVersionString to get the current OS version as a string.
20372 * icall.c: Registred icall.
20374 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
20376 * object.c: in mono_object_get_virtual_method(), take into account that
20377 non-virtual methods don't have a slot in the vtable. Check needed when
20378 the object is a proxy.
20380 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
20382 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
20383 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
20385 * object.c (mono_class_compute_gc_descriptor): Fix warning.
20387 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
20388 passed when a valuetype is expected.
20390 * object.c (mono_unhandled_exception): Only set the exit code if the
20391 exception happens in the main thread. Fixes thread5.exe.
20393 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
20394 invalid names. Fixes #58047.
20396 2004-05-03 Jackson Harper <jackson@ximian.com>
20398 * assembly.c: This line was committed accidently and is unneeded.
20400 2004-05-03 Jackson Harper <jackson@ximian.com>
20402 * icall.c: Add new icall for Assembly::LoadWithPartialName
20403 * assembly.c/.h: new function that probes the GAC to load partial
20404 assembly names by Paolo Molaro.
20406 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20408 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
20409 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
20410 (type_get_fully_qualified_name): Added PublicKeyToken when building a
20413 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20415 * appdomain.c: fixed check for 'neutral' culture and removed warning.
20416 * reflection.c: fix bug when parsing a full type name and Version is not
20417 the last thing in the string.
20419 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
20421 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
20422 crashes when it is freed.
20424 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20426 * assembly.c: print the compat warning to stderr.
20428 2004-05-01 Miguel de Icaza <miguel@ximian.com>
20430 * assembly.c (mono_assembly_load_references): Add a compatibility
20431 hack to run old applications that might be still referencing the
20432 3300-based assemblies, only do this for System.xxx.
20434 2004-05-01 Jackson Harper <jackson@ximian.com>
20436 * appdomain.c: If the culture is neutral we set it to "".
20438 2004-04-29 Jackson Harper <jackson@ximian.com>
20440 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
20442 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
20444 * string-icalls.c: added low overhead function for copying chars
20445 * icall.c: added needed icall for the above function
20447 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20449 * icall.c: fix return value of get_global_assembly_cache. Implemented
20450 Environment.GetLogicalDrives.
20452 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
20454 * rand.c: try and talk to egd or prngd
20455 for random bytes if opening devices fail.
20457 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
20459 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
20460 alignment for the type using the native alignment of its members
20461 instead of using klass->min_align.
20463 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
20465 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20468 * socket-io.c: added check for sys/aio.h.
20470 2004-04-28 Dick Porter <dick@ximian.com>
20472 * threads.c: Don't abort a thread thats already aborting, when
20473 terminating everything.
20475 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20477 * icall.c: added 2 new async calls for Socket.
20479 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
20480 IO on *nix systems.
20482 * threadpool.c: removed unused variable.
20484 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
20486 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
20488 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
20490 * locales.c: put back string_invariant_tolower () and
20491 string_invariant_toupper ().
20493 2004-04-26 David Waite <mass@akuma.org>
20498 * unicode.h: remove comma from end of enumeration declarations
20500 2004-04-26 David Waite <mass@akuma.org>
20502 * debug-mono-symfile.h:
20505 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
20508 2004-04-26 Jackson Harper <jackson@ximian.com>
20510 * appdomain.c: Increment version number.
20512 2004-04-26 Jackson Harper <jackson@ximian.com>
20514 * appdomain.c: Set assembly references public token value when
20515 PublicKeyToken is specified, not the hash_value. Free public token
20516 values when free assembly name data. Previously the public key
20517 token was hex decoded, however we are using hex encoded public key
20518 tokens, so this is not neccasary.
20519 * assembly.c: Lookup assemblies in the gac if their public token
20520 value is set. Add function to allow enabling user gac
20521 lookups. Specify whether or not the assembly was loaded from the
20522 GAC. Compare full assembly names when checking the cache for
20523 assemblies (Temporarily disabled see comment in code). Remove
20524 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
20525 specifies trace-loader they get extra info to stdout on the
20526 loading of assemblies.
20527 * image.h: Add a field for an assembly references public token
20528 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
20529 whether an assembly has been loaded from the GAC.
20530 * image.c: Remove a corlib -> mscorlib name mapping.
20531 * loader.h: Add function to enable/disable the user gac.
20532 * mono-config.c: Check if the usergac is enabled in the config
20534 * icall.c: New icall to determine whether or not an assembly has
20535 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
20536 * tabldefs.h: Add constant for assemblyref flag that specifies a
20537 full public key is used instead of a public token.
20538 * reflection.c: Remove mscorlib -> corlib mappings. Set
20539 PublicTokenValue instead of hash value. This value is a hex
20540 string so it does not need to be expanded.
20542 2004-04-26 Martin Baulig <martin@ximian.com>
20544 * mono-debug-debugger.c (mono_debugger_initialize): Set
20545 `mono_debugger_initialized' before calling mono_debug_lock().
20547 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
20549 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
20550 InternalToUpper/InternalToLower.
20551 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
20552 removed invariant culture shortcut. This is now done in managed code.
20553 * locales.c: (string_invariant_toupper/tolower) removed.
20555 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20557 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
20558 Added Poll internal call.
20560 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
20561 call for Poll. Select was too heavy for polling a single socket.
20563 * threadpool.[ch]: added mono_threadpool_cleanup.
20564 * threads.c: use it. Don't use Thread_Abort on windows.
20566 2004-04-23 Martin Baulig <martin@ximian.com>
20568 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
20570 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
20572 * icall.c: Registred new icalls for key pair protection and added an
20573 icall for Environment.GetFolderPath on Windows.
20574 * security.c|h: Added new icalls for key pair protection.
20576 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20578 * socket-io.c: don't display the non-supported family warning for known
20579 families. Now this is not displayed on windows when checking support
20582 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20584 * class.c: don't display the layout warning for static fields.
20586 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
20588 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
20589 * locales.c, locales.h: Added new icalls for culture-specific
20590 Char.ToLower and Char.ToUpper.
20592 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20594 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
20597 2004-04-20 Martin Baulig <martin@ximian.com>
20599 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
20600 of the type name before passing it to mono_reflection_type_from_name().
20602 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
20604 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
20605 encodings here. Fixes #56965.
20607 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
20609 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
20610 fix test on strstr result not that I can see anything that
20611 relies on the result.
20613 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
20615 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
20618 * marshal.c (mono_marshal_get_string_encoding): New helper function.
20620 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
20621 function to determine which marshalling to use for strings. Fixes
20624 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
20626 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
20628 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
20630 * icall.c: #include mono-config.h
20632 2004-04-15 Jackson Harper <jackson@ximian.com>
20634 * culture-info-tables.h: Fix date formats for en-US culture.
20636 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
20638 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
20639 ThreadPool.SetMinThreads.
20640 * threadpool.c: Implemented ThreadPool.GetMinThreads and
20641 ThreadPool.SetMinThreads.
20643 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
20645 * mono-config.c: also load the .config file in the directory
20646 where the assembly was found.
20648 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
20650 * assembly.c: load per-assembly config files.
20651 * icall.c: decrapified code to get the config dir and moved to
20653 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
20654 per-assembly config files. When doing a dll map lookup give precedence
20655 to the per-assembly data.
20657 2004-04-14 Martin Baulig <martin@ximian.com>
20659 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
20660 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
20661 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
20663 * mono-debugger-debugger.c: While the debugger is locked, remember
20664 whether the symbol tables have changes and send one single
20665 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
20667 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
20669 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
20671 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
20674 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
20675 account when marshalling string arrays. Fixes #56965.
20677 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
20679 * icall.c: Add new icalls mapping for security.
20680 * security.c|h: Add internal calls for WindowsIdentity,
20681 WindowsImpersonationContext and WindowsPrincipal.
20683 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
20685 * class.c: Added comment to ensure the System.MonoDummy class
20686 is removed when no longer necessary
20688 2004-04-13 Miguel de Icaza <miguel@ximian.com>
20690 * appdomain.c: Pass arguments to the bootstraping exceptions to
20691 minimize JITed methods at boot
20693 * metadata.c (mono_exception_from_name_two_strings): Allow for the
20694 second string to be null.
20696 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
20697 Change the protocol to minimize the JIT methods at startup. Now
20698 it Returns the internal codepage, if the value of "int_code_page"
20699 is 1 at entry, and we can not compute a suitable code page
20700 number, returns the code page as a string.
20702 2004-04-13 Jackson Harper <jackson@ximian.com>
20704 * culture-info-tables.h: Fix number of decimal digits for all
20707 2004-04-13 Jackson Harper <jackson@ximian.com>
20709 * icall.c: Clairfy out of sync error message. It is not always
20710 your corlib that is out of sync.
20712 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
20714 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
20715 properties when only the set accessor is overriden. Fixes #55874.
20717 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
20719 * assembly.c (mono_assembly_load_references): Make this thread safe.
20722 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
20724 * monosn.c: Add missing initialization calls.
20726 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
20729 ves_icall_System_Globalization_CultureInfo_construct_number_format
20730 Fix g_assert so it compiles on fussier compilers re int/ptr
20733 2004-04-08 Dick Porter <dick@ximian.com>
20736 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
20737 53992. Also rearrange the code so that the internal calls return
20738 an error value and exceptions are thrown from managed code.
20740 * icall.c: Add type info to the socket icalls.
20742 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20744 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
20747 2004-04-07 Martin Baulig <martin@ximian.com>
20749 * class.c (mono_class_from_generic_parameter): Don't default
20750 `klass->parent' to `mono_defaults.object_type'.
20752 2004-04-07 Martin Baulig <martin@ximian.com>
20754 * reflection.c (mono_reflection_initialize_generic_parameter): Set
20755 `param->pklass->reflection_info'.
20757 2004-04-07 Jackson Harper <jackson@ximian.com>
20759 * culture-info-tables.h: Fix date separator symbol.
20761 2004-04-07 Martin Baulig <martin@ximian.com>
20763 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
20764 from System.Type to System.MonoType.
20766 2004-04-07 Martin Baulig <martin@ximian.com>
20769 (MonoReflectionGenericParam): Added `has_reference_type' and
20770 `has_value_type' fields.
20772 * reflection.c (mono_image_get_generic_param_info): Encode the
20773 correct flags if we have the `class' or `struct' constraint.
20775 2004-04-07 Martin Baulig <martin@ximian.com>
20778 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
20780 2004-04-07 Jackson Harper <jackson@ximian.com>
20782 * appdomain.c: Revert extra patches, just wanted to bump the
20785 2004-04-07 Jackson Harper <jackson@ximian.com>
20787 * Makefile.am: Add culture-info private headers.
20788 * icall.c: Add new icalls for contructing locales.
20789 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
20790 * locales.h: Declare new culture info construction methods.
20791 * object.h: Add new fields used to avoid the CultureMap to
20793 * culture-info.h: Definition of structs used in the culture info
20795 * culture-info-tables.h: Autogenerated tables that contain culture
20796 info data. This file was generated with the locale-builder tool.
20797 * appdomain.c: Incement corlib version number.
20799 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
20801 * appdomain.c: (mono_runtime_init) move mono_thread_init
20802 to before mono_object_new calls so critical sections
20803 are initialized before use.
20805 2004-04-07 Martin Baulig <martin@ximian.com>
20808 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
20809 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
20810 (ves_icall_MonoGenericParam_initialize): Removed.
20811 (monogenericparam_icalls): Removed.
20812 (generictypeparambuilder_icalls): Added new table for
20813 System.Reflection.Emit.GenericTypeParameterBuilder.
20816 (mono_reflection_define_generic_parameter): Removed.
20817 (mono_reflection_initialize_generic_parameter): This is now called
20818 from GenericTypeParameterBuilder's .ctor.
20820 2004-04-06 Martin Baulig <martin@ximian.com>
20822 * class.c (mono_class_init): Don't inflate nested classes in a
20824 (mono_type_get_name_recurse): Include the generic arguments for
20825 generic instances and generic type declarations.
20826 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
20827 (_mono_class_get_instantiation_name): Removed.
20828 (mono_class_create_generic): Always use `gklass->name' as our name.
20830 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
20832 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
20833 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
20834 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
20835 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
20836 closed generic methods here.
20839 (mono_reflection_generic_inst_get_nested_types): Removed.
20840 (inflate_mono_method): Copy the generic parameters from the
20841 MonoMethodHeader into out MonoGenericMethod.
20843 2004-04-06 Martin Baulig <martin@ximian.com>
20846 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
20848 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
20850 * reflection.c (build_compressed_metadata): If we have any entries
20851 in the GenericParam, MethodSpec or GenericParamConstraint tables,
20852 set the header version to 1.1.
20854 2004-04-06 Martin Baulig <martin@ximian.com>
20856 * class.c (mono_class_init): If we're a generic instance,
20857 initialize our nested classes, too.
20858 (_mono_class_get_instantiation_name): Deal with the new `!%d'
20861 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20863 * process.c: quote the argument passed to the shell on windows.
20865 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
20867 * threads.c (mono_alloc_special_static_data): Allow this to be
20868 called during startup.
20870 2004-04-02 Martin Baulig <martin@ximian.com>
20873 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
20875 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
20877 * icall.c: Fix build.
20879 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
20881 * Makefile.am: Added security.c|h.
20882 * icall.c: Added icall for get_UserName;
20883 * security.c: New file for security related icalls. Added function
20884 get_UserName for System.Environment (fix #56144).
20885 * security.h: New. Header file for security.c
20887 2004-04-02 Dick Porter <dick@ximian.com>
20889 * icall.c: Deleted the icalls that were obsoleted some time ago
20890 by the ICU string code, and which were mixed into the icall
20891 rearranging. Fixes bug 55969.
20894 * string-icalls.c: Deleted the code that those icalls reference.
20896 2004-04-01 Martin Baulig <martin@ximian.com>
20898 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
20900 * class.c (mono_class_from_generic_parameter): Don't set
20901 TYPE_ATTRIBUTE_INTERFACE.
20902 (my_mono_class_from_generic_parameter): Likewise.
20904 2004-04-01 Martin Baulig <martin@ximian.com>
20906 * loader.c (find_method): Added an optional `MonoClass *ic'
20907 argument to search in a specific interface.
20908 (mono_get_method_constrained): New public function.
20910 2004-04-01 Martin Baulig <martin@ximian.com>
20912 * reflection.c (mono_image_get_generic_field_token): Use the
20913 `handleref' cache here.
20915 2004-04-01 Martin Baulig <martin@ximian.com>
20917 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
20919 * reflection.c (create_generic_typespec): Use the `typespec' hash
20920 here, not the `typeref' one.
20922 2004-04-01 Martin Baulig <martin@ximian.com>
20924 * class.c (mono_class_inflate_generic_type): Moved the
20925 functionality into a new static inflate_generic_type() which
20926 returns NULL if it didn't do anything. Only increment the
20927 `mono_stats.inflated_type_count' if we actually inflated
20929 (mono_class_get_full): Check the classes type to see whether we
20930 need to inflate it; also inflate MONO_TYPE_(M)VAR.
20932 2004-04-01 Jackson Harper <jackson@ximian.com>
20934 * reflection.c: Set culture for assembly references.
20936 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
20938 * reflection.[ch], icall.[ch], Fix support for pinning variables.
20940 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20943 (do_mono_assembly_open): the critical section also covers
20944 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
20946 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20949 (mono_manage_threads): abort the background threads when finishing.
20952 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20954 * gc.c: only close the done_event handle if there was no timeout.
20957 2004-03-30 Martin Baulig <martin@ximian.com>
20959 * icall.c (icall_entries): It's called "System.Activator", not
20960 "System.Activation".
20962 2004-03-30 Martin Baulig <martin@ximian.com>
20964 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
20965 (mono_class_create_from_typespec): Likewise.
20967 2004-03-30 Martin Baulig <martin@ximian.com>
20969 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
20970 `has_ctor_constraint' and `initialized'.
20972 2004-03-30 Martin Baulig <martin@ximian.com>
20974 * reflection.c (encode_new_constraint): New static function to add
20975 the constructor constraint attribute to a type parameter.
20976 (encode_constraints): Call encode_new_constraint() if necessary.
20979 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
20981 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
20983 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
20985 * reflection.c, icall.c: add support for pinning variables.
20987 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
20989 * marshal.c (mono_marshal_get_managed_wrapper):
20990 init bool local with zero rather than null.
20992 2004-03-29 Martin Baulig <martin@ximian.com>
20994 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
20995 the "official" behavior here.
20996 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
20998 2004-03-29 Martin Baulig <martin@ximian.com>
21000 * icall.c: Reflect latest API changes.
21002 2004-03-29 Martin Baulig <martin@ximian.com>
21004 * loader.c (mono_get_method_from_token): Also call
21005 mono_metadata_load_generic_params () for abstract and interface
21006 methods; replace the type arguments in the method signature with
21007 the ones which are loaded from the metadata.
21009 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
21011 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
21012 of the lock is not the current thread. MS.NET don't do it, in spite of
21013 what the documentation says. See bug #56157.
21015 2004-03-28 Martin Baulig <martin@ximian.com>
21017 * class.c (mono_class_init): Don't call init_properties() and
21018 init_events() for generic instances; set `prop->parent' when
21019 inflating properties.
21021 * reflection.c (mono_generic_inst_get_object): Call
21022 `mono_class_init (ginst->klass)'.
21023 (mono_type_get_object): Only create a MonoGenericInst if your
21024 generic type is a TypeBuilder.
21025 (do_mono_reflection_bind_generic_parameters): Only set
21026 `ginst->is_dynamic' if our generic type is a TypeBuilder.
21028 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
21030 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
21033 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21035 * icall.c: added Kill_internal icall.
21036 * process.[ch]: added Kill_internal icall.
21038 2004-03-25 Martin Baulig <martin@ximian.com>
21040 * class.h (MonoStats): Added `generic_instance_count',
21041 `inflated_method_count', `inflated_type_count' and
21042 `generics_metadata_size'.
21044 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21046 * reflection.c: no warnings now.
21048 2004-03-25 Martin Baulig <martin@ximian.com>
21050 * class.c (mono_class_get_full): New public function; does a
21051 mono_class_get(), but also takes a `MonoGenericContext *'.
21053 * loader.c (mono_field_from_memberref): Renamed to
21054 `field_from_memberref', made static and added `MonoGenericContext *'
21056 (mono_field_from_token): Added `MonoGenericInst *' argument.
21057 (method_from_memberef): Likewise.
21058 (mono_get_method_from_token): Likewise.
21059 (mono_get_method_full): New public function; does a
21060 mono_get_method(), but also takes a `MonoGenericContext *'.
21062 * verify.c (mono_method_verify): Get the method's generic context
21063 and pass it to mono_field_from_token(), mono_get_method_full() and
21064 mono_class_get_full().
21066 2004-03-25 Martin Baulig <martin@ximian.com>
21068 * class.c (mono_class_inflate_generic_type): Take a
21069 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
21070 `MonoGenericMethod *'.
21072 2004-03-25 Martin Baulig <martin@ximian.com>
21074 * loader.h (MonoMethodInflated): Store the MonoGenericContext
21075 instead of the MonoGenericMethod here.
21077 2004-03-25 Martin Baulig <martin@ximian.com>
21079 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
21080 each time we create a new MonoGenericInst, we also create a new
21081 context which points back to us.
21083 * class.c (inflate_method): Use `ginst->context' instead of
21084 creating a new context.
21086 * loader.c (method_from_memberref): Use
21087 `klass->generic_inst->context' instead of creating a new context.
21089 2004-03-25 Martin Baulig <martin@ximian.com>
21091 * class.h (MonoGenericContext): New struct.
21092 (MonoGenericMethod): Removed `generic_inst'.
21094 * class.c (mono_class_inflate_generic_method): Take a
21095 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
21097 2004-03-25 Martin Baulig <martin@ximian.com>
21099 * loader.h (MonoMethodInflated): New typedef.
21101 * metadata.h (MonoMethodSignature): Removed `gen_method', make
21102 `generic_param_count' consume just 30 bits, added `is_inflated'
21103 and `has_type_parameters' flags (one bit each).
21105 * class.c (mono_class_inflate_generic_method): Create a
21106 MonoMethodInflated instead of a MonoMethodNormal and set
21107 `is_inflated' in the method signature.
21109 * class.h (MonoGenericMethod): Removed `generic_method'.
21111 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
21113 * image.c: Make sure the name of a MonoImage is always an absolute path.
21114 This fixes bug #54415.
21116 2004-03-24 Martin Baulig <martin@ximian.com>
21118 * class.c (mono_class_setup_vtable): If we're a generic instance,
21119 use our generic type's vtable size.
21121 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
21123 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
21124 MONO_NO_UNLOAD env var as a temporary workaround for unloading
21127 2004-03-23 Martin Baulig <martin@ximian.com>
21129 * class.h (MonoDynamicGenericInst): Added `int count_events' and
21130 `MonoEvent *events'.
21132 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
21133 (typebuilder_icalls): Added "get_event_info"; calls
21134 mono_reflection_event_builder_get_event_info().
21136 * reflection.c (mono_reflection_generic_inst_initialize): Added
21137 `MonoArray *events'.
21138 (mono_reflection_event_builder_get_event_info): New function.
21140 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
21142 * object.h: add mono_type_initialization_init
21144 * object.c (mono_runtime_class_init):
21145 implement class constructor synchronization rules
21146 to cope with threading issues.
21147 add mono_type_initialization_init
21149 * appdomain.c (mono_runtime_init): call
21150 mono_type_initialization_init
21152 * class.h: removing initializing field from MonoVTable
21154 2004-03-23 Martin Baulig <martin@ximian.com>
21156 * class.c (my_mono_class_from_generic_parameter): Use
21157 `param->name' if it's not NULL.
21159 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
21161 * class.c: do not insert non-virtual methods in the vtable.
21162 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
21163 that means the method is non-virtual. This never would have
21166 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
21168 * profiler.c: Added lock for accessing coverage_hash.
21170 2004-03-22 Martin Baulig <martin@ximian.com>
21172 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
21173 `method->method->signature->generic_param_count != 0' to make it
21174 work for interface methods.
21176 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21178 * process.c: quote the string passed to the shell using g_shell_quote.
21180 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21183 (mono_threads_manage): don't remove the finalizer thread and self
21184 from the threads hash table so that mono_thread_manage can be called
21187 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21189 * process.c: quote the arguments when UseShellExecute is true. Fixes
21192 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21194 * threads.c: set mono_thread_detach as a cleanup routine for every
21195 thread. This way it's always executed upon thread termination, either
21196 aborted or finished normally. No more xsp hangs!
21198 2004-03-17 Martin Baulig <martin@ximian.com>
21200 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
21201 `int count_nested' and a `MonoType **nested'.
21203 * reflection.c (mono_reflection_bind_generic_parameters): Moved
21204 most of the functionality into a new static
21205 do_mono_reflection_bind_generic_parameters() and don't take a
21206 `MonoType *nested_in' argument any more. Don't compute nested
21208 (mono_reflection_generic_inst_get_nested_types): New public method
21209 to get nested types.
21211 * class.c (mono_class_create_generic): Set `klass->nested_in' if
21212 we're a nested class.
21214 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
21215 mono_reflection_generic_inst_get_nested_types() to compute the
21218 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
21220 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
21221 descriptive error message under windows.
21223 2004-03-17 Martin Baulig <martin@ximian.com>
21225 * class.c (dup_type): Added `const MonoType *original' argument;
21226 copy the attrs from the original type.
21228 2004-03-17 Martin Baulig <martin@ximian.com>
21230 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
21231 `m->generic_inst_cache' here.
21233 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
21235 * exception.h exception.c: Add stack_overflow_exception.
21237 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21240 (overlapped_callback): call SetEvent *after* invoking the callback.
21241 No need to call CloseHandle.
21243 2004-03-16 Martin Baulig <martin@ximian.com>
21245 * reflection.c (mono_image_get_fieldref_token): Take a
21246 `MonoReflectionField *' instead of a `MonoClassField *' and a
21247 `MonoClass *'; store the `MonoReflectionField *' in the hash.
21249 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21251 * appdomain.c: don't add the culture to the filename we're looking for
21252 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
21254 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21256 * locales.c: don't ignore symbols when doing case insensitive compares.
21257 Thanks Dick! Fixes bug #54046.
21259 * threads.c: surround 'threads' usage with enter/leave in
21260 mono_thread_manage.
21262 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
21264 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
21265 implicitly marshalled as [Out]. Fixes #55450.
21267 (mono_marshal_get_runtime_invoke): Zero out the result if there is
21270 2004-03-16 Martin Baulig <martin@ximian.com>
21272 * class.c (mono_class_from_generic_parameter): Use the actual
21275 2004-03-16 Martin Baulig <martin@ximian.com>
21277 * reflection.c (type_get_signature_size): New static function.
21278 Compues the size of the type in a method signature.
21279 (method_get_signature_size): New static function; calls
21280 type_get_signature_size() to compute the actual size of the
21281 method's signature.
21282 (method_encode_signature): Use method_get_signature_size() to get
21283 the signature's size rather than using `nparams * 10'.
21285 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21287 * file-io.h: define here WapiOverlapped on windows. I don't want the
21288 regular OVERLAPPED one.
21291 * threadpool.c: somehow, BindIoCompletionCallback is not found.
21292 Disabling AIO on windows.
21294 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21296 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
21299 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21301 * appdomain.c: upgraded corlib version.
21303 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
21304 and BeginWrite. Allow opening files for asynchrnous operations.
21306 * file-io.h: new struct that maps FileStreamAsyncResult.
21307 * icall.c: added new icalls.
21308 * process.[ch]: support setting child process environment variables
21309 and use the SHELL or COMSPEC when UseShellExecute is true.
21311 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
21312 callback for async. IO is here and also BindHandle.
21314 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
21317 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
21319 * reflection.c (create_custom_attr): Allow len == 0.
21321 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
21322 computation on big-endian machines.
21324 2004-03-13 Martin Baulig <martin@ximian.com>
21326 * class.h (MonoGenericInst): Added `int count_ifaces'.
21328 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
21329 `ginst->count_ifaces' instead `klass->interface_count' since we
21330 may get called before the vtable is created.
21332 * loader.c (mono_method_get_param_names): If we're a generic
21333 instance, return and don't initialize the class.
21335 * reflection.c (mono_reflection_setup_generic_class): Don't call
21336 ensure_runtime_vtable().
21337 (mono_reflection_bind_generic_parameters): Set
21338 `ginst->count_ifaces'.
21340 2004-03-11 Jackson Harper <jackson@ximian.com>
21344 * unicode.h: Remove unused System.Char icalls.
21346 2004-03-11 Miguel de Icaza <miguel@ximian.com>
21348 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
21349 code when we P/Invoke the first library in Windows.Forms, instead
21350 of when we first open the assembly.
21352 * assembly.c: Drop the lookup from here.
21354 2004-03-10 Martin Baulig <martin@ximian.com>
21356 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
21357 class for properties, fields and events. Finally fixes #54945.
21359 2004-03-10 Martin Baulig <martin@ximian.com>
21361 * metadata.c (mono_metadata_class_equal): New static function;
21362 checks whether two generic instances or two generic parameters are
21364 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
21367 2004-03-10 Martin Baulig <martin@ximian.com>
21369 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
21371 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
21372 argument and write it into the `reflection_info' field.
21375 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
21376 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
21378 2004-03-09 Jackson Harper <jackson@ximian.com>
21380 * char-conversions.h: use 8 bits for numeric data its all we need
21381 * icall.c: numeric data is only 8 bits now.
21383 2004-03-09 Martin Baulig <martin@ximian.com>
21385 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
21387 * class.c (init_properties, init_events): Initialize the new
21390 * reflection.c (typebuilder_setup_properties): Likewise.
21391 (typebuilder_setup_events): Likewise.
21393 * reflection.h (MonoEventInfo): Replaced `parent with
21394 `declaring_type' and `reflected_type'.
21396 * icall.c (ves_icall_get_property_info): Distinguish between
21397 declaring and reflected type.
21398 (ves_icall_get_event_info): Likewise.
21400 2004-03-09 Martin Baulig <martin@ximian.com>
21402 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
21403 (ves_icall_Type_GetField): Correctly set field->klass.
21405 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
21407 * loader.h: Fix warning.
21409 2004-03-08 Miguel de Icaza <miguel@ximian.com>
21411 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
21412 library routine if present. Notice that it will still continue
21413 executing even if its missing, for those working on the Gtk#
21414 edition of Windows.Forms.
21416 * assembly.c (do_mono_assembly_open): If loading the
21417 System.Windows.Forms call mono_loader_wini_init.
21419 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
21421 * class.h: Added MonoRemoteClass struct.
21422 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
21423 function for MonoStrings.
21424 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
21425 Added internal call for getting the proxy type.
21426 * marshal.c: Get the type of transparent proxies from its remote_class.
21427 Added methods that generate the IL for type checks and casts:
21428 mono_marshal_get_isinst, mono_marshal_get_castclass,
21429 mono_marshal_get_proxy_cancast.
21430 * marshal.h: Declaration of the previous new methods.
21431 * object.c: Added new moethods for creating and updating MonoRemoteClass
21432 instances: mono_remote_class, mono_upgrade_remote_class,
21433 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
21434 * verify.c: FIx transparent_proxy_fields layout.
21435 * appdomain.c: Bump corlib version.
21437 2004-03-04 Jackson Harper <jackson@ximian.com>
21439 * icall.c: Add icall to access char conversion tables.
21440 * char-conversions.h: Character conversion tables.
21441 * Makefile.am: Add char-conversions.h private header file.
21443 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
21445 * appdomain.c (unload_thread_main): Increase unloading timeout to
21446 10 sec as a temporary workaround for Nant problems.
21448 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
21450 * gc.c: Add checks for GC_enable and GC_disable.
21452 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
21453 (jaak@zd.com.pl). Fix memory corruption in String.Replace
21456 2004-02-27 Martin Baulig <martin@ximian.com>
21458 * reflection.c (mono_reflection_bind_generic_parameters): Take a
21459 `MonoReflectionType *' instead of a `MonoType *'.
21461 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
21463 * gc.c (run_finalize): Avoid finalizing the object representing the
21465 (finalizer_thread): Fix warning.
21467 2004-02-25 Martin Baulig <martin@ximian.com>
21469 * class.c (_mono_class_get_instantiation_name): Added `int offset'
21470 argument for nested types.
21471 (mono_class_create_generic): Added support for nested generictypes.
21473 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
21476 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
21478 * reflection.c (method_encode_signature): Increase the minimum
21479 value of `size' from 10 to 11.
21480 (mono_reflection_bind_generic_parameters): Take `int type_argc'
21481 and `MonoType **types' arguments instead of the `MonoArray
21482 *types'; added `MonoType *nested_in'. Recursively instantiate
21485 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
21487 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
21488 stack_overflow_ex members which are used by exception handling.
21490 * appdomain.c (mono_runtime_init): Initialize the new members.
21492 * gc.c (mono_gc_enable): New helper function.
21493 * gc.c (mono_gc_disable): New helper function.
21495 2004-02-23 Martin Baulig <martin@ximian.com>
21497 * icall.c: I must have been really stupid - make it actually work
21500 2004-02-23 Martin Baulig <martin@ximian.com>
21502 * loader.c (method_from_memberref): Only inflate the method if
21503 it's in another klass.
21505 2004-02-23 Martin Baulig <martin@ximian.com>
21507 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
21508 (mono_class_init): If we're a generic instance and an interface,
21509 compute `class->interface_id'; also create `class->interfaces'
21510 here and inflate them.
21512 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
21514 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
21516 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
21518 2004-02-15 Miguel de Icaza <miguel@ximian.com>
21520 * reflection.c (method_encode_code): Improved the error message
21521 generated by the exception.
21523 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21525 * icall.c: Martin did not do what he said in the ChangeLog for
21526 2004-02-18, but put back the changes for properties and events.
21527 Commenting those changes out again and adding comment to bug #54518.
21529 * process.c: removed warning.
21531 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
21533 * marshal.c (emit_struct_conv): Print an error message instead of
21534 asserting when a type does not have the StructLayout attribute.
21536 2004-02-20 Martin Baulig <martin@ximian.com>
21538 * reflection.c (mono_type_get_object): Also use the cache for
21540 (mono_reflection_bind_generic_parameters): Always compute
21543 2004-02-20 Martin Baulig <martin@ximian.com>
21545 * class.h (MonoGenericMethod): Removed `klass'.
21547 * class.c (mono_class_inflate_generic_method): Added `MonoClass
21550 2004-02-20 Martin Baulig <martin@ximian.com>
21552 * reflection.c (method_encode_methodspec): Actually use the
21553 uninflated signature for the memberref.
21555 2004-02-20 Martin Baulig <martin@ximian.com>
21557 * class.h (MonoGenericMethod): Removed `declaring'.
21559 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
21560 is NULL, compute it here.
21562 2004-02-20 Martin Baulig <martin@ximian.com>
21564 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
21566 * metadata.c (mono_metadata_generic_inst_hash): New method.
21567 (mono_metadata_generic_inst_equal): New method.
21569 * reflection.c (mono_reflection_bind_generic_parameters): Use the
21570 `klass->image->generic_inst_cache' cache to avoid creating
21571 duplicate MonoGenericInst's.
21573 * class.c (mono_class_inflate_generic_type): Use the cache.
21575 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
21577 * object.c: fixed gc descriptor calculation for embedded valuetypes.
21579 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21581 * icall.c: added Socket.WSAIoctl icall.
21583 * socket-io.[ch]: implemented
21584 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
21586 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
21588 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
21590 2004-02-18 Urs C Muff <umuff@quark.com>
21592 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
21593 this work on PPC and other big-endian architectures.
21595 * debug-mono-symfile.h: Prepended the names of all the `guint32'
21596 fields with an underscore to make sure they're only accessed by
21597 the read32() macro.
21599 2004-02-18 Martin Baulig <martin@ximian.com>
21601 * icall.c: Put the klass->refclass changes back for methods and
21602 fields, but not for properties and events. We're currently not
21603 distinguishing between DeclaringType and ReflectedType for
21604 properties and events, that's what caused the regressions.
21606 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21609 (mono_async_result_new): the handle can be NULL.
21611 * threadpool.c: Use an event instead of a semaphore, don't initialize
21612 it until needed. This saves quite a few semaphores from being created
21613 when using the threadpool.
21615 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
21617 * object.c (mono_string_is_interned_lookup): Fix interning of long
21618 strings. Fixes #54473.
21620 * domain.c (ldstr_equal): Optimize if the two strings are equal.
21622 * icall.c: Revert the klass->refclass changes since they introduce
21623 regressions (bug #54518).
21625 2004-02-18 Martin Baulig <martin@ximian.com>
21627 * class.c (mono_class_init): If we're a generic instance and don't
21628 come from a TypeBuilder, inflate our members here.
21629 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
21630 (mono_class_create_generic): New public method.
21631 (mono_class_initialize_generic): Removed.
21632 (get_instantiation_name): Renamed to
21633 _mono_class_get_instantiation_name() and made it public.
21635 2004-02-18 Martin Baulig <martin@ximian.com>
21637 * class.c (mono_class_inflate_generic_type): Clear the new
21638 instance's `nginst->klass' when inflating a generic instance.
21639 (mono_class_is_subclass_of): Added (basic) support for generic
21642 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
21644 * appdomain.h, domain.c: use a MonoCodeManager instead of a
21645 MonoMempool to hold compiled native code.
21647 2004-02-17 Martin Baulig <martin@ximian.com>
21649 * class.h (MonoDynamicGenericInst): Added `count_properties' and
21652 * reflection.c (mono_reflection_generic_inst_initialize): Added
21653 `MonoArray *properties' argument.
21655 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
21657 2004-02-17 Martin Baulig <martin@ximian.com>
21659 * icall.c (ves_icall_Type_GetFields): Renamed to
21660 ves_icall_Type_GetFields_internal() and added a
21661 `MonoReflectionType *rtype' argument; pass it to
21662 mono_field_get_object() to set the field's "reflected" type.
21663 (ves_icall_Type_GetConstructors): Likewise.
21664 (ves_icall_Type_GetEvents): Likewise.
21665 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
21666 argument; pass it to mono_method_get_object() to set the method's
21669 2004-02-17 Martin Baulig <martin@ximian.com>
21671 * class.h (MonoDynamicGenericInst): New type.
21672 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
21674 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
21675 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
21676 (ves_icall_MonoGenericInst_GetFields): New interncall.
21678 * class.c (mono_class_from_generic): Don't call
21679 mono_class_initialize_generic() if this is a dynamic instance;
21680 ie. it's being created from a TypeBuilder.
21681 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
21682 `class->byval_arg.type'.
21684 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
21685 to `inflate_method' and made static.
21686 (mono_reflection_inflate_field): Removed.
21687 (mono_reflection_generic_inst_initialize): New public method.
21689 * reflection.h (MonoReflectionGenericInst): Removed `methods',
21690 `ctors' and `fields'; added `initialized'.
21692 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
21694 * debug-helpers.c (mono_method_full_name): Fix output for empty
21697 2004-02-12 Martin Baulig <martin@ximian.com>
21699 * class.h (MonoClassField): Added `MonoType *generic_type'.
21701 * reflection.c (mono_image_get_fieldref_token): Added support for
21702 instantiated generic types.
21703 (field_encode_inflated_field): Removed.
21704 (mono_image_get_inflated_field_token): Removed.
21705 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
21707 * reflection.h (MonoReflectionInflatedField): Removed.
21709 2004-02-12 Martin Baulig <martin@ximian.com>
21711 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
21712 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
21714 * reflection.c (mono_image_get_methodspec_token): Take a
21715 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
21716 (mono_image_create_token): Check whether we have a
21717 `method->signature->gen_method' and call
21718 mono_image_get_methodspec_token() if appropriate.
21719 (inflated_method_get_object): Removed.
21720 (mono_reflection_bind_generic_method_parameters): Return a
21721 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
21722 (mono_reflection_inflate_method_or_ctor): Likewise.
21724 * reflection.h (MonoReflectionInflatedMethod): Removed.
21726 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
21728 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
21729 for custom valuetype marshalling.
21731 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
21733 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21735 * icall.c: fixed WSAGetLastError_internal name.
21737 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
21739 * threads.c (mono_thread_attach): Allow this to be called multiple
21740 times for a thread.
21742 * threads.c (build_wait_tids): Do not wait for ourselves.
21744 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
21745 appdomain list is empty.
21747 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
21748 memory returned by mono_string_builder_to_utf16, since it points into
21749 managed memory. Thanks to Bernie Solomon for noticing this.
21751 * icall.c: Add AppDomainSetup icalls.
21753 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
21755 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
21758 * reflection.c (reflection_methodbuilder_to_mono_method): Save
21759 custom attributes to the method_aux struct. Also fix array indexes etc.
21761 * loader.c (mono_method_get_param_names): Make dynamic case work again.
21763 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
21765 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
21766 (both static and runtime) and reduce startup time.
21768 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
21770 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
21771 AsAny marshalling conversion instead of crashing.
21773 * marshal.c: Fix warnings.
21775 2004-02-09 Martin Baulig <martin@ximian.com>
21777 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
21779 * reflection.h (MonoReflectionInflatedMethod): Removed the
21780 `declaring' field, it's now in the unmanaged MonoGenericMethod.
21782 * reflection.c (method_encode_methodspec): Removed the `method'
21783 argument; we get it from `gmethod->declaring'.
21784 (inflated_method_get_object): Removed the `declaring' argument.
21786 2004-02-09 Martin Baulig <martin@ximian.com>
21788 * class.h (MonoGenericMethod): New type.
21789 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
21792 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
21793 a `MonoGenericMethod *gen_method' one.
21795 * class.c (mono_class_inflate_generic_type): Take an additional
21796 `MonoGenericMethod * argument. This is only non-NULL if we're
21797 inflating types for a generic method.
21798 (mono_class_inflate_generic_signature): Renamed to
21799 inflate_generic_signature() and made static; take a
21800 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
21801 (inflate_generic_header): Take a `MonoGenericMethod *' argument
21802 instead of a `MonoGenericInst *' one.
21803 (mono_class_inflate_generic_method): Likewise.
21805 * reflection.c (encode_generic_method_sig): Take a
21806 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
21807 (method_encode_methodspec): Likewise.
21808 (inflated_method_get_object): Likewise.
21810 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
21811 field with a `MonoGenericMethod *gmethod' one.
21813 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
21815 * class.h (mono_class_has_parent): add parens to expansion
21818 2004-02-08 Martin Baulig <martin@ximian.com>
21820 * image.h (MonoImage): Removed `generics_cache'.
21822 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
21823 instead of a `MonoType *' argument; removed the `inflate_methods'
21824 argument. Don't inflate methods here.
21826 * loader.c (find_method): If it's a generic instance, call
21827 mono_class_init() on the `sclass->generic_inst->generic_type'.
21829 * metadata.c (mono_type_size): Make this work on uninitialized
21830 generic instances; call it on the `ginst->generic_type's class.
21832 * reflection.c (mono_reflection_bind_generic_parameters): Call
21833 mono_class_from_generic() to create the `ginst->klass'.
21835 2004-02-08 Martin Baulig <martin@ximian.com>
21837 * class.h (MonoClass): Changed type of `generic_inst' from
21838 `MonoType *' to `MonoGenericInst *'.
21840 2004-02-08 Martin Baulig <martin@ximian.com>
21842 * icall.c (ves_icall_Type_BindGenericParameters): Just call
21843 mono_type_get_object(), this is now creating a `MonoGenericInst'
21844 for MONO_TYPE_GENERICINST.
21845 (ves_icall_MonoGenericInst_GetParentType): Likewise.
21846 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
21848 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
21849 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
21850 (inflated_method_get_object): Added `MonoClass *refclass' argument.
21851 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
21852 and reflected type.
21854 * reflection.h (MonoReflectionInflatedMethod): Removed
21855 `declaring_type' and `reflected_type'.
21857 2004-02-08 Martin Baulig <martin@ximian.com>
21859 * class.h (MonoGenericInst): Added `MonoType *parent' and
21860 `MonoType **ifaces'.
21862 * reflection.h (MonoReflectionGenericInst): Removed `klass',
21863 `parent' and `interfaces'.
21865 * reflection.c (mono_reflection_bind_generic_parameters): Take a
21866 `MonoType *' argument and return a `MonoType *'.
21869 (ves_icall_MonoGenericInst_GetParentType): New interncall.
21870 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
21872 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
21874 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
21875 valuetype marshalling.
21877 2004-02-06 Martin Baulig <martin@ximian.com>
21880 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
21881 (my_mono_class_from_generic_parameter): Likewise.
21883 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
21885 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
21886 contents of the symbol files lazily.
21888 * object.h (MonoThread): Add 'name' and 'name_len' fields.
21890 * threads.h threads.c icall.c: New icalls for getting and setting the
21893 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
21895 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
21896 Raise an exception when the domain is not found.
21898 2004-02-03 Martin Baulig <martin@ximian.com>
21900 * reflection.c (mono_image_get_methodspec_token): Use the
21901 uninflated signature; fixes gen-33.
21903 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
21905 * gc.c threads.c: Make the finalizer thread a normal managed thread so
21906 the finalizer code can use thread functionality.
21908 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
21909 the finalizer thread.
21911 * threads.c: Make some functions more robust.
21913 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
21915 * metadata.h: Add new marshalling conventions.
21917 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
21918 stringbuilder marshalling. Fixes #53700.
21920 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
21922 * reflection.c (mono_image_get_type_info): Save declarative security
21925 * reflection.c (mono_image_get_field_info): Handle uninitialized
21926 unmanaged fields as well.
21928 * appdomain.c: Bump corlib version.
21930 2004-02-01 Martin Baulig <martin@ximian.com>
21932 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
21933 method type arguments.
21935 2004-01-30 Duncan Mak <duncan@ximian.com>
21937 * marshal.h: Add prototype for
21938 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
21940 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
21943 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
21945 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
21946 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
21948 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
21950 * marshal.c (mono_marshal_get_native_wrapper): Add support for
21951 custom marshalling of valuetypes.
21953 * marshal.c: Fix some warnings.
21955 2004-01-29 Martin Baulig <martin@ximian.com>
21957 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
21958 for generic method parameters.
21960 * reflection.c (method_encode_methodspec): Write the uninflated
21961 signature into the methodspec table.
21962 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
21963 is always the uninflated method.
21964 (reflection_methodbuilder_to_mono_method): Copy the generic
21965 parameters from the MethodBuilder into `header->gen_params'.
21967 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
21969 * class.c (mono_class_from_generic_parameter): Fix warning.
21971 2004-01-27 Martin Baulig <martin@ximian.com>
21973 * class.c (mono_class_from_generic_parameter): Don't create
21974 `klass->methods' here.
21976 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
21978 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
21979 extension since it does not work with libraries named lib<FOO>.dll.so.
21981 2004-01-25 Martin Baulig <martin@ximian.com>
21983 * class.c (mono_class_inflate_generic_type): Added support for
21984 MONO_TYPE_GENERICINST.
21986 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
21987 inflate methods on open constructed types.
21989 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21991 * object.c: fire ProcessExit event in the root AppDomain after running
21992 Main. Fixes bug #53299.
21994 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
21996 * socket-io.c: include the new socket-wrappers.h header.
21997 Use the wrappers instead of the unix socket functions to make the code
22000 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
22002 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
22004 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
22007 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
22009 * reflection.c (mono_image_create_pefile): Handle the case when the
22010 entry point is not a MethodBuilder.
22012 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
22013 field to ReflectionMethod since it is not allways a builder.
22015 * reflection.c (type_get_fully_qualified_name): New helper function to
22016 return the fully qualified name of a type.
22018 * reflection.c (encode_marshal_blob): Always emit the fully qualified
22019 type name for custom marshallers.
22021 * reflection.c (mono_marshal_spec_from_builder): Ditto.
22023 * class.c (mono_class_setup_vtable): If a parent class already
22024 implements an interface, use the implementing methods from that class.
22027 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22029 * threadpool.c: just return instead of ExitThread to allow for thread
22032 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
22034 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
22035 when closing resource modules.
22037 * reflection.c (mono_image_create_pefile): Handle the case when the
22038 entry point is not a MethodBuilder.
22040 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
22041 field to ReflectionMethod since it is not allways a builder.
22043 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
22045 * marshal.c (mono_marshal_get_managed_wrapper):
22046 mono_marshal_alloc takes native int so CONV_I
22047 the arg for 64bits.
22049 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
22051 * reflection.c (fixup_cattrs): New function to fixup the methoddef
22052 tokens in the cattr table. Fixes #53108.
22054 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22056 * loader.c: don't trim ".dll" before looking up in the config file.
22057 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
22059 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
22061 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
22062 Return the module which contains the resource as well.
22063 (ves_icall_System_Reflection_Module_Close): New icall.
22065 * appdomain.c: Bump corlib version number.
22067 * image.c (mono_image_addref): New public function.
22069 * assembly.c: Call mono_image_addref.
22071 * reflection.c (mono_module_get_object): Increase reference count of
22074 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
22077 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
22078 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
22079 proper exceptions on DllImport problems.
22081 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
22083 * class.c, metadata.c: eliminate CSIZE macro.
22085 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
22087 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
22088 * object.h: Added async_callback field in MonoAsyncResult.
22089 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
22090 * verify.c: Added async_callback in MonoAsyncResult layout.
22092 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
22094 * reflection.c (mono_reflection_get_custom_attrs): Add support
22097 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
22099 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
22101 (mono_marshal_method_from_wrapper): Add null pointer check.
22103 2004-01-16 Martin Baulig <martin@ximian.com>
22105 * debug-mono-symfile.h: Set version number to 36 and reflect
22106 latest symbol writer changes.
22108 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
22110 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
22111 multi-dimensional arrays.
22112 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
22113 (mono_class_from_mono_type): Use bounded_array_class_get.
22115 * class.c (mono_bounded_array_class_get): New function which takes
22116 a 'bounded' bool argument to distinguish vectors from one dimensional
22119 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
22120 bounded_array_class_get if the array has bounds.
22122 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
22123 Search modules loaded using AssemblyBuilder:AddModule as well.
22125 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22127 * appdomain.c: increased corlib version.
22128 * filewatcher.c: removed g_print.
22130 (get_property_info): only allocate what is actually requested.
22131 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
22133 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22135 * Makefile.am: added filewatcher.[ch]
22136 * filewatcher.[ch]: FileSystemWatcher runtime support.
22137 * icall.c: added new FSW icalls.
22139 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
22141 * string-icalls.c: fix stringbuilder regression as suggested by
22142 Iain McCoy <iain@mccoy.id.au>.
22144 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
22146 * process.c (process_read_stringtable_block): Recognize '007f' as
22147 a language neutral stringtable block.
22149 2004-01-12 Patrik Torstensson
22151 * object.h (MonoStringBuilder) : Changed layout to support our
22152 new stringbuilder class.
22153 * marshal.c: Change marshalling to support the new layout of
22155 * appdomain.c: increased version number because new layout of
22158 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
22160 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
22161 assembly name as an string instead of an AssemblyName, since it is
22162 easier to extract info from it.
22164 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
22165 the culture subdirectories too. Fixes #52231.
22167 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22169 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
22170 It takes 2 new parameters with an optional name for the method to look
22171 for and case ignoring info.
22173 * threadpool.c: removed unused variable.
22175 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22177 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
22178 It takes 2 new parameters with an optional name for the property to look
22179 for and case ignoring info.
22182 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
22184 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
22187 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22190 * assembly.c: escape the uri before passing it to g_filename_from_uri.
22193 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
22195 * reflection.c: Add support for more than one unmanaged resource.
22197 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
22198 in field->def_value, as done in all other cases.
22200 * reflection.c (mono_reflection_get_custom_attrs): Add support for
22203 * reflection.c (mono_reflection_create_runtime_class): Remove
22204 errorneous assignment to klass->element_class, since it is already
22205 done in mono_reflection_setup_internal_class.
22207 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22209 * gc.c: added missing LeaveCriticalSection.
22210 * icall.c: indented a couple of lines.
22211 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
22212 if we call EndInvoke inside a callback. Fixes bug #52601.
22214 2004-01-07 Martin Baulig <martin@ximian.com>
22216 * mono-debug-debugger.h
22217 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
22219 2004-01-06 Miguel de Icaza <miguel@ximian.com>
22221 * appdomain.c: Use messages in NotImplementedException.
22223 * exception.c (mono_get_exception_not_implemented): Now this takes
22224 a message argument.
22226 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
22227 exception instead of g_asserting an aborting when something is not
22230 Add some inline docs.
22232 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
22234 * reflection.h: Update after changes to object layout.
22236 * reflection.c: Implement saving of unmanaged aka win32 resources.
22238 * appdomain.c: Bump version number.
22240 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
22241 Handle missing domains gracefully.
22243 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
22245 * file-io.c : On Windows, there are much more invalid_path_chars.
22247 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
22249 * class.h, object.c: prepare for GetType () speedup.
22251 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
22253 * profiler.c: workaround for --profile null reference exception on
22254 cygwin. Patch by Patrik Torstensson.
22256 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
22258 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
22259 make work for unaligned access.
22261 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
22263 * class.c: small cleanup (class->fields [i] -> field).
22264 * image.c: check address of metadata is valid.
22266 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
22268 * assembly.h assembly.c (mono_assembly_loaded): New public function to
22269 search the list of loaded assemblies.
22271 * reflection.c (mono_reflection_type_from_name): Use
22272 mono_assembly_loaded instead of mono_image_loaded.
22274 * reflection.c: Fix warnings.
22276 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
22278 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
22279 is dynamic. This is needed since an assembly can contain both dynamic and
22280 non-dynamic images.
22282 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
22285 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
22287 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
22288 to store modules loaded using AddModule.
22290 * reflection.c (mono_image_fill_file_table): Generalize this so it works
22293 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
22295 * reflection.c (mono_image_fill_export_table_from_module): New function to
22296 fill out the EXPORTEDTYPES table from a module.
22298 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
22299 into a separate function. Also handle loaded non-dynamic modules.
22301 * reflection.c (mono_image_basic_init): Fix memory allocation.
22303 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
22305 * assembly.c (mono_assembly_load_references): Make this public.
22307 2003-12-19 Martin Baulig <martin@ximian.com>
22309 * class.c (mono_class_initialize_generic): Made this static, take
22310 a `MonoGenericInst *' instead of a `MonoClass *'.
22311 (mono_class_from_generic): Call mono_class_initialize_generic()
22312 unless we're already initialized or being called from
22313 do_mono_metadata_parse_generic_inst().
22315 * class.h (MonoGenericInst): Added `initialized' and
22316 `init_pending' flags.
22318 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
22319 `mono_class_init (gklass)' or mono_class_initialize_generic()
22320 here; set `generic_inst->init_pending' while parsing the
22323 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
22325 * locales.c: include string.h for memxxx prototypes
22327 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
22329 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
22330 constructor when accessing literal fields.
22332 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
22334 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
22336 * reflection.c (assembly_add_resource_manifest): New function to fill
22337 the MANIFESTRESOURCE table.
22339 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
22341 * reflection.h: Update to changes in class layout.
22343 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
22344 Reenable call to mono_runtime_is_shutting_down ().
22346 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
22347 determine if the runtime is shutting down.
22349 2003-12-16 Jackson Harper <jackson@ximian.com>
22351 * icall.c: comment out call to mono_runtime_is_shutting_down to
22354 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
22356 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
22357 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
22359 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
22361 * reflection.c: move definition of swap_with_size
22362 to before its first call
22364 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
22366 * appdomain.c (mono_runtime_is_shutting_down): New public function.
22368 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
22371 * object.c: Fix warnings.
22373 * icall.c (ves_icall_Type_Get...): Only consider inherited static
22374 members if FlattenHierarchy is set.
22376 * reflection.c (mono_image_add_decl_security): New function to emit
22377 declarative security.
22379 * reflection.h reflection.c: Add support for declarative security.
22381 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
22383 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
22385 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
22387 * appdomain.c verify.c: Moved corlib version checking into its own
22388 function in appdomain.c since it needs to create vtables etc.
22390 2003-12-13 Patrik Torstensson <p@rxc.se>
22392 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
22393 instead of unwrapped server.
22395 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
22397 * verify.c (check_corlib): Fix field index.
22399 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
22401 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
22404 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
22406 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
22407 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
22408 cope with sizeof(size_t) != sizeof(guint32).
22410 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22412 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
22413 in case of failure.
22415 2003-12-10 Mark Crichton <crichton@gimp.org>
22417 * icall.c: removed the GetNonZeroBytes. We now handle this case
22420 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
22422 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
22424 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
22427 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
22429 * verify.c (check_corlib): Handle the case when the version field is
22430 initialized by a static constructor.
22432 2003-12-08 Patrik Torstensson <p@rxc.se>
22434 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
22436 2003-12-08 Martin Baulig <martin@ximian.com>
22438 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
22439 a MonoReflectionGenericParameter, also take the parameter index
22440 and name as arguments.
22441 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
22442 (ves_icall_MonoGenericParam_initialize): New interncall.
22443 (ves_icall_Type_make_byref_type): New interncall.
22445 * reflection.h (MonoReflectionGenericParam): Derive from
22446 MonoReflectionType, not just from MonoObject. Added `refobj' and
22449 * reflection.c (mono_reflection_define_generic_parameter): Create
22450 and return a new MonoReflectionGenericParam; don't initialize the
22452 (mono_reflection_initialize_generic_parameter): New public method;
22453 initializes the constraints and creates the `param->pklass'.
22455 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
22457 * reflection.h reflection.c: Use the new fields 'num_types',
22458 'num_fields' and 'num_methods' to track the number of types etc.
22460 * verify.c (check_corlib): Check corlib version number.
22462 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
22464 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
22465 function works on all methods.
22467 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
22469 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
22470 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
22471 the custom_type_info flag of the transparent proxy.
22472 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
22473 objects that supports IRemotingTypeInfo.
22474 * object.h: Added custom_type_info field in transparent proxy.
22476 2003-12-06 Martin Baulig <martin@ximian.com>
22478 * class.c (mono_class_create_from_generic): Removed.
22479 (mono_class_from_generic): Check `ginst->klass' before doing
22480 anything else. This is important to fully support "recursive"
22483 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
22484 empty `generic_inst->klass' before doing anything else.
22486 2003-12-06 Dick Porter <dick@ximian.com>
22491 * locales.c: Use C structs to access class fields. Don't do a
22492 conversion between MonoString and UChar because both are
22493 platform-endian UTF-16. Compare now takes startindex and count
22494 parameters. Add a char overload for IndexOf. Speed up the
22495 invariant string IndexOf.
22497 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
22499 * Makefile.am (monosn_LDADD): Fix parallel build.
22501 2003-12-04 Martin Baulig <martin@ximian.com>
22504 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
22505 (ves_icall_Type_make_array_type): New interncall.
22507 2003-12-04 Martin Baulig <martin@ximian.com>
22509 * locales.c: also change it in the !HAVE_ICU case.
22511 2003-12-04 Dick Porter <dick@ximian.com>
22514 * locales.c: construct_compareinfo is now in CompareInfo, not
22517 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
22519 * image.c (mono_image_load_file_for_image): Cache loaded images in the
22520 image->files array.
22522 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
22525 * assembly.c (mono_assembly_load_references): Only load references
22528 * class.c (mono_class_from_name): Avoid linear search of the
22529 EXPORTEDTYPE table.
22531 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
22533 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
22535 * image.h (MonoImage): Add 'field_cache' field.
22537 * loader.c (mono_field_from_token): Cache field lookups.
22539 * reflection.c (mono_module_get_object): Fix name property.
22541 * icall.c (ves_icall_get_enum_info): Update after changes to
22542 mono_metadata_get_constant_index ().
22544 * icall.c: Get rid of get_type_info icall, use a separate icall for
22545 each type property to avoid needless memory allocations. Fixes #51514.
22547 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
22548 to avoid needless binary searches.
22550 * class.c (class_compute_field_layout): Move the initialization of
22551 field->def_value to mono_class_vtable ().
22553 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
22556 * object.c (mono_object_allocate): Make it inline.
22558 * object.c (mono_object_allocate_spec): Make it inline.
22560 2003-12-02 Dick Porter <dick@ximian.com>
22562 * locales.c (create_NumberFormat): NumberFormatInfo construction.
22563 Patch by Mohammad DAMT (mdamt@cdl2000.com).
22565 2003-12-01 Dick Porter <dick@ximian.com>
22567 * threads.c: Fix signature and call in CreateMutex and
22570 2003-12-01 Dick Porter <dick@ximian.com>
22573 * locales.c: Implement string compares and searching
22575 * object.h: Add extra Thread field
22577 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
22579 * reflection.c (fixup_method): Add support for MonoCMethod.
22581 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
22583 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
22585 * reflection.c (assembly_name_to_aname): Allow extra characters in
22586 assembly names. Fixes #51468.
22588 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
22590 * exception.c (mono_exception_from_name_domain): New helper function.
22592 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
22593 exception object in the correct domain.
22595 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
22596 formatting + make a copy a the input data.
22598 * loader.c (mono_get_method_from_token): Methods which contain
22599 native code do not have entries in the ImplMap.
22601 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
22602 Thanks to Gonzalo for spotting this.
22604 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
22605 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
22607 * assembly.h (mono_assembly_load_from): Split the second part of
22608 assembly loading into a new public function.
22610 * exception.h (mono_get_exception_bad_image_format): New function.
22612 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
22614 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
22615 Enumerate all modules inside a dynamic assembly. Fixes #51293.
22617 * icall.c: Add new icall for creating dynamic methods.
22619 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
22621 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
22623 * reflection.c (mono_reflection_create_dynamic_method): New icall to
22624 create a dynamic method.
22626 * reflection.c (resolve_object): New helper function.
22628 * reflection.c: Generalize ReflectionMethodBuilder and the functions
22629 which manipulate it so they can also work on dynamic methods.
22631 * reflection.c (reflection_method_builder_to_mono_method): Avoid
22632 creating the MonoReflectionMethodAux structure if it is not needed.
22634 * reflection.h verify.c: Update after changes to object layout.
22636 * reflection.c (method_builder_encode_signature): Fix compilation on
22639 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
22641 * appdomain.h: Added support for context static fields. Added static_data
22642 field to MonoAppContext and renamed thread_static_fields to a more
22643 generic special_static_fields in MonoAppDomain, since it can now contain
22644 context static fields.
22645 * domain.c: Updated hashtable name.
22646 * object.c: Replaced field_is_thread_static() for a more generic
22647 field_is_special_static() which also checks for context static attribute.
22648 In mono_class_vtable(), added support for static context fields.
22649 * threads.c: Changed methods that manage thread static fields to more
22650 generic methods so they can be reused both for thread and context static
22652 * threads.h: Declared some new methods.
22654 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
22656 * reflection.h: Update after changes to the managed types.
22658 * reflection.c (encode_custom_modifiers): New helper function.
22660 * reflection.c (method_encode_signature): Emit custom modifiers.
22662 * reflection.c (field_encode_signature): Emit custom modifiers.
22664 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
22666 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
22668 * icall.c (ves_icall_System_ValueType_Equals): New optimized
22671 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
22674 * object.c (mono_field_get_value_object): New function.
22676 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
22679 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
22681 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
22682 return a preallocated out-of-memory exception instance.
22684 * object.c (out_of_memory): Use the new function.
22686 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
22687 flag is before the custom modifiers. Fixes #49802.
22689 2003-11-16 Martin Baulig <martin@ximian.com>
22691 * class.c (mono_class_is_open_constructed_type): Implemented the
22692 MONO_TYPE_GENERICINST case.
22694 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
22696 * assembly.c (mono_assembly_fill_assembly_name): New function to
22697 fill out the MonoAssemblyName structure.
22698 (mono_assembly_open): Use the new function.
22700 * icall.c (fill_reflection_assembly_name): New helper function.
22702 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
22705 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
22707 2003-11-15 Martin Baulig <martin@ximian.com>
22709 * class.c (mono_class_is_open_constructed_type): New public
22710 function; checks whether a type is an open constructed type,
22711 ie. whether it still contains type parameters.
22712 (mono_class_inflate_generic_type): If we're a type parameter and
22713 the inflated type is also a MONO_TYPE_(M)VAR, return the original
22716 * class.h (MonoGenericInst): Added `guint32 is_open'.
22718 * loader.c (method_from_methodspec): Check whether we're an open
22719 or closed constructed type and set `ginst->is_open'.
22721 * reflection.c (mono_reflection_bind_generic_parameters): Check
22722 whether we're an open or closed constructed type and set
22724 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
22725 from open constructed types.
22727 2003-11-15 Martin Baulig <martin@ximian.com>
22729 * reflection.c (mono_reflection_bind_generic_parameters): If we're
22730 a generic instance (instead of a generic type declaration) with
22731 unbound generic parameters, bind them to our actual types.
22733 2003-11-14 Martin Baulig <martin@ximian.com>
22735 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
22737 * reflection.c (mono_reflection_bind_generic_parameters): If we're
22738 an interface type, populate `res->interfaces' with instantiated
22739 versions of all the interfaces we inherit.
22741 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
22743 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
22744 when MONO_PATH is set but doesn't contain the install dir.
22746 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22749 (ves_icall_Type_GetInterfaces): don't return an interface twice when
22750 it's also implemented in base classes. Fixes bug #50927.
22752 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
22754 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
22755 if this method is called from a finalizer. Fixes #50913.
22757 2003-11-12 Miguel de Icaza <miguel@ximian.com>
22759 * threads.c: Implement VolatileRead/VolatileWrite
22761 * icall.c: Add new icalls for VolatileRead/VolatileWrite
22763 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
22765 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
22766 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
22769 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
22770 from Peter Ross (pro@missioncriticalit.com).
22772 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
22774 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
22776 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
22778 * assembly.c (mono_assembly_load_references): Disable check because it
22779 triggers on older corlibs which lots of people have.
22781 2003-11-12 Jackson Harper <jackson@ximian.com>
22783 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
22784 load corlib.dll if mscorlib.dll is not found.
22785 * assembly.h: Remove corlib name define.
22788 * image.c: Change corlib name to mscorlib.
22790 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
22792 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
22794 2003-11-11 Miguel de Icaza <miguel@ximian.com>
22796 * appdomain.h: Added loader_optimization here to sync with the C#
22797 code, and add disallow_binding_redirects field.
22799 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
22801 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
22803 * reflection.c (mono_image_build_metadata): Fix crash on modules
22806 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
22808 * icall.c (ves_icall_get_method_info): Return callingConvention as
22811 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
22812 namespaces from the EXPORTEDTYPE table as well.
22814 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
22815 from all modules inside the assembly.
22817 2003-11-11 Martin Baulig <martin@ximian.com>
22819 * reflection.c (mono_reflection_bind_generic_parameters): Make
22820 this work for interfaces.
22822 2003-11-11 Martin Baulig <martin@ximian.com>
22824 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
22826 2003-11-11 Martin Baulig <martin@ximian.com>
22828 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
22829 "MonoInflatedMethod" and "MonoInflatedCtor".
22831 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
22833 * reflection.c (resolution_scope_from_image): Use the assembly table
22834 from the manifest module, since other modules don't have it.
22836 * debug-helpers.c (mono_type_full_name): New helper function.
22838 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
22840 * image.c (mono_image_load_file_for_image): New public function which
22841 is a replacement for the load_file_for_image in class.c.
22843 * assembly.c (mono_assembly_load_module): A wrapper for the function
22844 above which does assembly association and reference loading too.
22846 * class.c (mono_class_from_name): Call mono_assembly_load_module.
22848 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22850 * appdomain.c: not all of the attributes for the full assembly name
22851 are required and the order doesn't matter. Fixes bug #50787.
22853 2003-11-10 Dick Porter <dick@ximian.com>
22855 * locales.c: Use platform-endian UTF16
22857 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
22859 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
22861 2003-11-10 Martin Baulig <martin@ximian.com>
22864 (mono_metadata_load_generic_params): Make this actually work.
22866 * reflection.c (mono_reflection_bind_generic_parameters): If our
22867 parent is a generic instance, pass all the `types' to it, no
22868 matter whether it has the same number of type parameters or not.
22870 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
22872 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
22874 * assembly.c (mono_assembly_load_references): Move the image<->assembly
22875 assignment code to this function so it gets called recursively for all
22878 * image.c (load_modules): Remove the assembly assignment since it is
22879 now done by mono_assembly_load_references.
22881 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
22882 Add 'module' argument.
22883 (mono_module_get_types): New helper function.
22884 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
22886 2003-11-08 Martin Baulig <martin@ximian.com>
22888 * class.c (mono_class_inflate_generic_method): Interface method
22889 don't have a header.
22891 * reflection.c (mono_image_get_methodspec_token): Take an
22892 additional `MonoGenericInst *' argument instead of reading it from
22893 the header; this is necessary to support interfaces.
22894 (mono_image_create_token): Pass the `MonoGenericInst *' from the
22895 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
22896 (inflated_method_get_object): Take an additional `MonoGenericInst *'
22899 * reflection.h (MonoReflectionInflatedMethod): Added
22900 `MonoGenericInst *ginst'.
22902 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
22904 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
22906 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
22908 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
22910 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
22913 (reflection_methodbuilder_from_method_builder):
22914 (reflection_methodbuilder_from_ctor_builder): New helper functions to
22915 initialize a ReflectionMethodBuilder structure.
22916 (mono_image_get_methodbuilder_token):
22917 (mono_image_get_ctorbuilder_token): New functions to emit memberref
22918 tokens which point to types in another module inside the same assembly.
22920 * reflection.c: Use the new helper functions.
22922 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
22924 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
22925 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
22927 * reflection.c (resolution_scope_from_image): Emit a moduleref if
22930 * reflection.c (mono_image_build_metadata): Emit metadata only for the
22931 current module. Emit the manifest only for the main module.
22933 * reflection.c (mono_image_create_token): Add assertion when a
22934 memberref needs to be created.
22936 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
22938 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
22939 larger buffer for the custom attribute blob. Fixes #50637.
22941 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22943 * threadpool.c: notify listener on async processing handles after
22944 invoking the async callback. Thanks to Zoltan.
22946 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
22948 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
22949 avoid code duplication.
22951 * reflection.h (MonoDynamicImage): New type which is currently unused,
22952 but will be used through the ref.emit code in place of
22953 MonoDynamicAssembly.
22955 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
22958 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
22959 a MonoDynamicImage instead of just a MonoImage.
22961 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
22962 icalls to ModuleBuilder but keep their semantics, so they will work
22963 with moduleb->assemblyb. This will change later.
22965 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
22967 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
22970 * reflection.c (mono_image_build_metadata): Avoid creation of a default
22971 main module, since it is now done by the managed code.
22973 2003-11-03 Martin Baulig <martin@ximian.com>
22975 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
22976 `ginst->klass' here.
22977 (method_encode_methodspec): Don't use the `ginst->generic_method's
22978 klass if it's a generic instance, use `ginst->klass' in this case.
22980 2003-11-03 Martin Baulig <martin@ximian.com>
22982 * reflection.c (mono_image_get_generic_method_param_info):
22983 Removed, use mono_image_get_generic_param_info() instead.
22984 (mono_image_get_type_info): Write the GenericParam table before
22985 the Method table. This is neccessary because in the GenericParam
22986 table, type parameters of the class (ie. '!0' etc.) must come
22987 before the ones from its generic methods (ie. '!!0' etc).
22989 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
22991 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
22993 2003-11-02 Martin Baulig <martin@ximian.com>
22995 * reflection.c (create_generic_typespec): Take a
22996 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
22997 the generic parameters from it.
22999 2003-11-02 Martin Baulig <martin@ximian.com>
23001 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
23002 instead of a `MonoClassField *' since we just need the type.
23003 (create_generic_typespec): New static function. Creates a
23004 TypeSpec token for a generic type declaration.
23005 (mono_image_get_generic_field_token): New static function.
23006 (mono_image_create_token): If we're a FieldBuilder in a generic
23007 type declaration, call mono_image_get_generic_field_token() to get
23010 2003-11-02 Martin Baulig <martin@ximian.com>
23013 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
23014 `MonoReflectionGenericInst *declaring_type' and
23015 `MonoReflectionGenericInst *reflected_type' fields.
23017 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
23018 `MonoReflectionGenericInst *declaring_type' and a
23019 `MonoReflectionGenericInst *reflected_type' argument instead of a
23020 single `MonoReflectionGenericInst *type' one. Set
23021 `res->declaring_type' and `res->reflected_type' from them.
23022 (mono_reflection_inflate_field): Likewise.
23024 2003-11-02 Martin Baulig <martin@ximian.com>
23026 * class.c (mono_class_setup_vtable): Don't store generic methods
23029 2003-11-02 Martin Baulig <martin@ximian.com>
23031 * reflection.h (MonoReflectionGenericInst): Added
23032 `MonoReflectionType *declaring_type'.
23034 * reflection.c (mono_reflection_bind_generic_parameters): Use
23035 `if (tb->parent)' instead of `klass->parent'.
23037 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
23039 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
23040 with an empty ASSEMBLY table.
23042 * reflection.c (mono_image_build_metadata): Avoid using the same loop
23043 variable in the inner and outer loops.
23045 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
23047 * metadata.h (mono_metadata_make_token): Put parentheses around macro
23050 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
23052 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
23053 icalls. Instead, do everything in managed code. This is needed since
23054 it is hard to restore the original domain etc. in unmanaged code in the
23055 presence of undeniable exceptions.
23057 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
23058 New icalls to push and pop appdomain refs.
23060 2003-10-31 Martin Baulig <martin@ximian.com>
23062 * class.c (inflate_generic_type): Renamed to
23063 mono_class_inflate_generic_type() and made it public.
23065 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
23068 * loader.c (mono_field_from_memberref): Also set the retklass for
23071 * fielder.c (mono_image_get_inflated_field_token): New static
23072 method; creates a metadata token for an inflated field.
23073 (mono_image_create_token, fixup_method): Added support for
23074 "MonoInflatedField".
23075 (fieldbuilder_to_mono_class_field): New static function.
23076 (mono_reflection_inflate_field): New public function.
23079 (MonoReflectionGenericInst): Added `MonoArray *fields'.
23080 (MonoReflectionInflatedField): New typedef.
23082 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
23084 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
23085 for Solaris and other platforms without s6_addr16
23087 2003-10-30 Martin Baulig <martin@ximian.com>
23089 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
23090 argument instead of two.
23091 (mono_class_inflate_generic_signature): Likewise.
23092 (inflate_generic_header): Likewise.
23093 (mono_class_inflate_generic_method): Likewise. In addition, if
23094 `ginst->klass' is set, it becomes the new `method->klass'.
23096 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
23099 * reflection.c (encode_generic_method_sig): Write a 0xa as the
23100 first byte. [FIXME]
23101 (method_encode_methodspec): If we have generic parameters, create
23102 a MethodSpec instead of a MethodRef.
23103 (fixup_method): Added support for "MonoInflatedMethod" and
23104 "MonoInflatedCtor".
23105 (mono_image_create_token): Added support for "MonoInflatedMethod"
23106 and "MonoInflatedCtor".
23107 (inflated_method_get_object): New static function; returns a
23108 managed "System.Reflection.MonoInflatedMethod" object.
23109 (mono_reflection_bind_generic_method_parameters): Return a
23110 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
23111 (mono_reflection_inflate_method_or_ctor): Likewise.
23112 (mono_image_get_generic_method_param_info): Initialize unused
23114 (mono_image_get_generic_param_info): Likewise.
23116 * reflection.h (MonoReflectionInflatedMethod): New public
23117 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
23118 "S.R.MonoInflatedCtor" classes.
23120 * loader.c (method_from_memberref): If we're a TypeSpec and it
23121 resolves to a generic instance, inflate the method.
23123 2003-10-28 Dick Porter <dick@ximian.com>
23125 * object.c (mono_runtime_run_main): Convert command-line arguments
23126 into utf8, falling back to the user's locale encoding to do so.
23128 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
23130 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
23133 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
23135 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
23136 up icalls at method definition time. Partially fixes #33569.
23138 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
23140 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
23141 marshalling of arrays. Fixes #50116.
23143 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
23145 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
23146 points to a vtable in the dying appdomain.
23148 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
23149 listeners into unmanaged code inside the lock.
23151 * object.c (mono_class_vtable): Turn off typed allocation in non-root
23152 domains and add some comments.
23154 2003-10-25 Martin Baulig <martin@ximian.com>
23156 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
23158 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
23160 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
23161 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
23162 currently parsing. Create the generic class and store it in
23163 `generic_inst->klass' before parsing the type arguments. This is
23164 required to support "recursive" definitions; see mcs/tests/gen-23.cs
23166 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
23167 to support recursive typespec entries.
23169 * class.c (mono_class_setup_parent): If our parent is a generic
23170 instance, we may get called before it has its name set.
23171 (mono_class_from_generic): Splitted into
23172 mono_class_create_from_generic() and mono_class_initialize_generic().
23174 2003-10-25 Martin Baulig <martin@ximian.com>
23176 * icall.c (ves_icall_Type_BindGenericParameters): Return a
23177 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
23178 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
23179 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
23181 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
23182 (create_typespec): Likewise.
23183 (mono_reflection_bind_generic_parameters): Return a
23184 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
23185 (mono_reflection_inflate_method_or_ctor): New public function.
23187 * reflection.h (MonoReflectionGenericInst): New typedef.
23189 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
23191 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
23192 inside the domain lock. Fixes #49993.
23194 * object.c (mono_class_vtable): When typed allocation is used,
23195 allocate vtables in the GC heap instead of in the mempool, since the
23196 vtables contain GC descriptors which are used by the collector even
23197 after the domain owning the mempool is unloaded.
23199 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
23201 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
23202 reflect what it does. Also invalidate mempools instead of freeing
23203 them if a define is set.
23205 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
23208 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
23209 hold the finalizable objects in this domain.
23211 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
23214 * appdomain.c (mono_domain_set): New function to set the current
23215 appdomain, but only if it is not being unloaded.
23217 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
23218 appdomain which is being unloaded.
23220 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
23221 unloading of the root appdomain.
23223 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
23224 icall to execute a method in another appdomain. Intended as a
23225 replacement for InternalSetDomain, which can confuse the code
23226 generation in the JIT.
23228 * appdomain.c (mono_domain_is_unloading): New function to determine
23229 whenever an appdomain is unloading.
23231 * appdomain.c (mono_domain_unload): New function to correctly unload
23234 * assembly.c (mono_assembly_load_references): Check that an assembly
23235 does not references itself.
23237 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
23238 domain manually, it asks the finalizer thread to do it, then waits for
23239 the result. Also added a timeout.
23241 * icall.c: Register the new icalls.
23243 * threads.h threads.c: Export the mono_gc_stop_world and
23244 mono_gc_start_world functions.
23246 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
23247 function to fill out the mempool with 0x2a.
23249 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
23251 * reflection.h (MonoReflectionMethodAux): New structure to store
23252 information which is rarely used, thus is not in the MonoMethod
23255 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
23256 store the aux info.
23258 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
23259 and marshalling info into the aux structure.
23261 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
23262 from the aux structure.
23264 * loader.c (mono_method_get_param_names): Retrieve the param names from
23267 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
23269 * exception.h exception.c: Add AppDomainUnloadedException && fix
23272 2003-10-21 Dick Porter <dick@ximian.com>
23275 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
23276 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
23278 2003-10-21 Martin Baulig <martin@ximian.com>
23280 * reflection.c (mono_reflection_bind_generic_parameters):
23281 `klass->parent' is NULL for interfaces.
23283 2003-10-21 Martin Baulig <martin@ximian.com>
23285 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
23287 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
23289 * exception.c (mono_exception_from_name_msg): New helper function for
23290 creating exceptions and initializing their message field.
23292 * exception.c: Simplify functions using the new helper.
23294 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
23297 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
23298 mono_raise_exception, since otherwise gcc doesn't generate the function
23299 epilog for raise_exception, confusing the stack unwinding in the JIT.
23302 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
23303 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
23306 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23308 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
23311 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
23313 * icall.c: Removed GetUninitializedObject method because
23314 AllocateUninitializedClassInstance does the same.
23316 2003-10-18 Martin Baulig <martin@ximian.com>
23318 * class.c (inflate_generic_signature): Renamed to
23319 mono_class_inflate_generic_signature() and made it public.
23320 (my_mono_class_from_generic_parameter): New static function; if we
23321 don't already have the generic parameter's MonoClass, create a
23322 very simple one which is just used internally in the runtime and
23323 not passed back to managed code.
23325 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
23327 * metadata.h (MonoMethodSignature): Moved the
23328 `MonoGenericParam *gen_params' to the MonoMethodHeader.
23329 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
23331 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
23332 ves_icall_MonoMethod_GetGenericArguments(); this is now an
23333 interncall on the MonoMethod class, not on MethodInfo.
23334 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
23335 calling mono_reflection_bind_generic_method_parameters() directly.
23337 * loader.c (mono_method_get_signature): If this is a MethodSpec;
23338 return the already computed `method->signature'.
23339 (method_from_methodspec): New static function to load a method
23340 from a MethodSpec entry.
23341 (mono_get_method_from_token): Call the new method_from_methodspec()
23342 for MethodSpec tokens.
23343 (mono_get_method_from_token): If we're a generic method, load the
23346 * reflection.c (mono_image_get_memberref_token): Allow
23347 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
23349 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
23350 (mono_image_create_token): First check whether it's a generic
23351 method (so we'd need to create a MethodSpec), then do the other
23353 (mono_reflection_bind_generic_method_parameters): Return a
23354 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
23355 called directly from the interncall.
23357 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
23359 * reflection.c (load_public_key): Move loading of the public key
23362 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
23364 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
23367 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
23368 culture, hash_alg and public_key. Fixes #49555.
23370 2003-10-17 Martin Baulig <martin@ximian.com>
23372 * class.h (MonoGenericInst): Moved this declaration here and added
23373 `MonoMethod *generic_method'.
23376 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
23377 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
23379 * metadata.c (mono_metadata_type_equal): Two types of
23380 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
23381 index; ie. don't compare the address of the `MonoGenericParam'
23383 (mono_metadata_load_generic_params): Removed the `MonoMethod
23386 * metadata.h (MonoGenericInst): Moved declaration to class.h.
23387 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
23389 * reflection.c (method_encode_signature): Encode the number of
23390 generic parameters.
23391 (encode_generic_method_sig): New static function.
23392 (method_encode_methodspec): New static function; creates an entry
23393 in the MethodSpec table for a generic method.
23394 (mono_image_get_methodspec_token): New static function.
23395 (mono_image_create_token): Call mono_image_get_methodspec_token()
23396 for generic methods.
23397 (mono_reflection_bind_generic_method_parameters): New public
23398 function. Instantiates a generic method.
23400 2003-10-16 Martin Baulig <martin@ximian.com>
23402 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
23403 *gen_params' here from MonoMethodHeader.
23405 * metadata.c (mono_metadata_parse_method_signature): If we have
23406 generic parameters, initialize `method->gen_params' and then set
23407 the correct `type->data.generic_param' in all the parameters.
23409 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
23411 * threads.c (mono_threads_get_default_stacksize): New function to
23412 return the default stacksize.
23414 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
23415 termination of the finalizer thread, since the previous method had
23416 race conditions. Fixes #49628.
23418 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
23419 as for the other managed threads.
23421 2003-10-16 Martin Baulig <martin@ximian.com>
23423 * class.c (inflate_generic_signature): Copy `generic_param_count'
23426 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
23429 * metadata.c (mono_metadata_parse_method_signature): Actually set
23430 the `method->generic_param_count' here.
23431 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
23433 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
23435 * object.h: Add a new field to TypedRef to simplify the implementation
23436 of the REFANY opcodes in the JIT.
23438 * icall.c: Make use of the new field.
23440 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
23443 2003-10-15 Martin Baulig <martin@ximian.com>
23445 * class.c (mono_class_from_gen_param): Renamed to
23446 mono_class_from_generic_parameter() and moved most of the
23447 functionality from mono_reflection_define_generic_parameter()
23448 here; ie. we create a "real" class here.
23449 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
23450 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
23451 previously been called.
23453 * class.h (MonoGenericParam): Moved the declaration of this struct
23454 here from metadata.h and added `MonoMethod *method'.
23456 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
23459 * loader.c (mono_get_method_from_token): If we have any generic
23460 parameters, call mono_metadata_load_generic_params() to read them
23461 from the MONO_TABLE_GENERICPAR.
23463 * metadata.c (mono_metadata_load_generic_params): Added
23464 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
23466 * metadata.h (MonoMethodSignature): Replaced
23467 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
23468 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
23470 * reflection.c (mono_reflection_define_generic_parameter): Moved
23471 most of the functionality into the new
23472 mono_class_from_generic_parameter(); set the `method' field if
23473 we're a method parameter.
23475 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
23477 * marshal.c (emit_struct_conv): if native size is 0
23480 2003-10-14 Martin Baulig <martin@ximian.com>
23482 * icall.c: The generics API has changed in the spec since it was
23483 added to System.Type; these modifications make it match the spec
23485 (ves_icall_Type_GetGenericParameters): Renamed to
23486 `ves_icall_Type_GetGenericArguments'.
23487 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
23488 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
23489 `ves_icall_MonoType_get_HasGenericArguments'.
23490 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
23491 `ves_icall_MonoType_get_IsGenericParameter'.
23492 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
23493 this is no interncall anymore.
23494 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
23495 `ves_icall_TypeBuilder_get_IsGenericParameter'.
23497 2003-10-14 Martin Baulig <martin@ximian.com>
23499 * reflection.c (mono_reflection_bind_generic_parameters): Also
23500 inflate generic methods if we're reading the class from IL.
23502 2003-10-13 Martin Baulig <martin@ximian.com>
23504 * reflection.c (mono_reflection_define_generic_parameter): This
23505 method isn't called directly from the icall anymore; take a
23506 `MonoReflectionAssemblyBuilder *' so we can use this for type and
23507 method generic parameters.
23508 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
23509 (method_builder_encode_signature): Encode generic parameters.
23510 (mono_image_get_method_info): Write generic params to the
23511 MONO_TABLE_GENERICPARAM table.
23513 * reflection.h (MonoReflectionMethodBuilder): Added
23514 `MonoArray *generic_params'.
23516 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
23518 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
23519 wrapper for mono_reflection_define_generic_parameter().
23520 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
23522 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
23524 * marshal.h: Add missing function to fix build.
23526 * marshal.c (mono_marshal_get_native_wrapper): Add support for
23527 the SetLastError pinvoke attribute.
23529 * marshal.c (mono_marshal_set_last_error): New helper function called
23530 by the generated code.
23532 * marshal.c (mono_mb_emit_branch): New helper function.
23534 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
23536 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
23537 classes as parameters and return values of delegates. Fixes #29256.
23539 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
23541 * locales.c: use gint32 in non HAVE_ICU case
23543 2003-10-11 Martin Baulig <martin@ximian.com>
23545 * mono-debug.c (mono_debug_add_method): Added a workaround for
23548 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
23550 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
23551 delegates passed to native code must use the STDCALL calling
23552 convention. Fixes #35987.
23554 2003-10-10 Martin Baulig <martin@ximian.com>
23556 * class.c (inflate_generic_type): If we're inflating for a generic
23557 type instance (and not for a generic method), return
23558 MONO_TYPE_MVAR unchanged.
23560 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23562 * string-icalls.c: Join ignores null strings in the source array.
23563 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
23564 * threads.c: GetAvailableTheads is slightly more accurate.
23566 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
23568 * threads.h threads.c : add mono_threads_set_default_stacksize
23569 and pass default to CreateThread calls.
23571 2003-10-09 Dick Porter <dick@ximian.com>
23575 * locales.c: Internal calls for constructing CultureInfo and
23576 related objects from libicu (if its available.)
23578 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
23580 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
23582 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23584 * threadpool.c: added an argument to async_invoke_thread that is the
23585 item to process, pass the MonoAsyncResult to the thread start function
23586 when creating a new thread. This way we don't need to acquire any lock
23587 when we're creating a new thread. Readded a semaphore for faster
23588 response times (instead of that Sleep i added).
23590 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
23592 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
23593 get daylight change dates better on Windows, fix handling
23594 of platforms without tm_gmtoff.
23596 2003-10-06 Martin Baulig <martin@ximian.com>
23598 * class.c (inflate_generic_method): Renamed to
23599 mono_class_inflate_generic_method() and made public.
23600 (mono_class_init): Don't inflate the generic methods here.
23601 (mono_class_from_generic): Added `gboolean inflate_methods'
23602 argument. Inflate the methods here.
23604 * loader.c (mono_method_get_param_names): Ignore instances of
23605 generic types for the moment.
23607 * reflection.c (fixup_method): Added support for inflated methods.
23608 (mono_image_create_token): Use mono_image_get_methodref_token()
23609 for inflated methods.
23610 (mono_custom_attrs_from_param): Ignore instances of generic types
23612 (mono_reflection_bind_generic_parameters): New public function.
23613 Moved all the functionality from
23614 ves_icall_Type_BindGenericParameters() here and added support for
23616 (mono_reflection_define_generic_parameter): Initialize
23617 `klass->methods' here.
23619 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
23620 functionality into mono_reflection_define_generic_parameter().
23621 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
23622 TypeBuilder, return that TypeBuilder.
23624 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23626 * appdomain.c: removed mono_delegate_semaphore.
23629 (mono_thread_pool_add): moved hash table creation inside and the thread
23630 creation outside of the critical region.
23631 (mono_thread_pool_finish): removed obsolete code.
23632 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
23633 continue or exit the thread depending on the queue.
23635 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
23637 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
23638 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
23639 handle more bool marshalling options
23641 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
23643 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
23644 arrays of structs. Also add a more descriptive error message when
23645 a structure member is marshalled as LPArray.
23647 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
23649 * marshal.c (mono_marshal_get_native_wrapper): Add support for
23650 marshalling arrays of complex types. Fixes #29098. Also remove an
23651 usused and incomplete function.
23653 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
23655 * gc.c: report heap_size - free_bytes as total memory allocated
23658 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
23660 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
23661 fix timezone handling problems on Windows.
23663 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
23664 asserts when the year is outside the range handled by ms the functions.
23666 * class.c (setup_interface_offsets): If the class is an interface,
23667 fill out its interface_offsets slot.
23669 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23671 * threadpool.c: mark threadpool threads as background.
23673 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
23675 * decimal.c - define DECINLINE to nothing if not using GCC
23677 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
23679 * assembly.c: More refcount fixes.
23681 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23683 * string-icalls.c: if we're not trimming, return the same string.
23684 When not splitting, don't create a new string.
23686 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23689 (mono_image_open): increment the ref_count inside the critical section.
23691 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
23693 * image.c (mono_image_open): Fix reference counting bug.
23695 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
23697 * marshal.c (mono_marshal_type_size) struct alignment changed for
23698 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
23699 64bits. Avoid leak in mono_marshal_get_native_wrapper when
23700 mono_lookup_pinvoke_call throws.
23702 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
23704 * reflection.c (mono_reflection_parse_type): Fix #49114.
23706 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
23707 temporary workaround for cygwin header problem.
23709 * object.c (mono_object_isinst): Synchronize this with the code
23710 generated by the JIT for casts.
23712 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
23714 * reflection.c (encode_type): Fix #38332.
23716 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
23718 * marshal.c (mono_marshal_method_from_wrapper): New function to return
23719 the original method from the wrapper method.
23721 2003-09-25 Martin Baulig <martin@ximian.com>
23723 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
23724 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
23725 (ves_icall_Type_get_IsGenericInstance): New interncall.
23727 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
23729 * object.c: fix cast warning in big endian code.
23731 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
23733 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
23735 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23737 * assembly.c: don't call check_env from mono_assembly_load. It's
23738 already done once in mono_assemblies_init and may cause headaches when
23739 multiple threads are loading assemblies.
23741 2003-09-19 Martin Baulig <martin@ximian.com>
23743 * reflection.c (mono_reflection_define_generic_parameter): Don't
23744 allocate `klass->methods', set `klass->flags' to
23745 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
23747 2003-09-18 Martin Baulig <martin@ximian.com>
23749 * class.c (mono_class_init): Don't create `class->methods' if it's
23750 already initialized.
23752 * metadata.c (mono_metadata_load_generic_params): Make this
23755 * reflection.c (mono_reflection_define_generic_parameter): Set
23756 parent class and interfaces from the constraints.
23758 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
23759 to keep this struct in sync with the declaration in TypeBuilder.cs.
23761 2003-09-17 Martin Baulig <martin@ximian.com>
23763 * metadata.h (MonoType): Replaced the data's `int type_param'
23764 field with `MonoGenericParam *generic_param'.
23765 (MonoGenericParam): Added `MonoClass *klass'.
23767 * class.c (mono_class_from_gen_param): Removed the
23768 `MonoImage *image' and `int type_num' arguments.
23770 * metadata.c (mono_metadata_parse_generic_param): New static
23771 method; creates a MonoGenericParam which just contains the index.
23772 (do_mono_metadata_parse_type): Call
23773 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
23776 * reflection.c (mono_image_typedef_or_ref): Generic type
23777 parameters may be in the same assembly, but never use a typedef
23779 (mono_reflection_define_generic_parameter): We're now creating a
23780 "real" class for the type parameter; it's now safe to call
23781 mono_class_from_mono_type() on the class'es type, it'll do the
23784 2003-09-16 Martin Baulig <martin@ximian.com>
23786 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
23787 `symfile->range_entry_size' and `symfile->class_entry_size' here;
23788 the `symfile' data structure must be fully initialized before it
23789 gets added to the table.
23791 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
23793 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
23795 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
23796 class init trampolines.
23798 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
23800 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
23801 to the built-in profiler to turn off time and allocation profiling
23804 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
23806 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
23809 * debug-helpers.c (mono_method_full_name): Print the wrapper type
23810 in human readable form.
23812 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
23814 * reflection.c icall.c: Fixed warnings.
23816 * image.c (load_class_names): Use a temporary hash table to hold the
23817 namespaces in order to avoid doing many string comparisons.
23819 * image.h: Fix typo.
23821 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
23822 Pass NULL instead of g_direct_equal to the GHashTable constructor
23823 since the NULL case is short-circuited inside g_hash_table_lookup,
23824 leading to better performance.
23826 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
23827 obtain the first custom attribute for a given index. Depends on the
23828 CustomAttribute table being sorted by the parent field.
23830 * reflection.c (mono_custom_attrs_from_index): Use the new function
23831 for better performance.
23833 2003-09-07 Martin Baulig <martin@ximian.com>
23835 * class.c (mono_class_init): If we're a generic instance, inflate
23836 all our methods instead of loading them from the image.
23837 (mono_class_from_generic): Set `class->methods = gklass->methods'.
23839 2003-09-07 Martin Baulig <martin@ximian.com>
23841 * mono-debug-debugger.c: Added support for constructors.
23843 2003-09-06 Martin Baulig <martin@ximian.com>
23845 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
23848 * reflection.c (mono_reflection_setup_generic_class): Call
23849 ensure_runtime_vtable() to create the vtable.
23851 2003-09-05 Martin Baulig <martin@ximian.com>
23853 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
23856 2003-09-04 Martin Baulig <martin@ximian.com>
23858 * reflection.c (mono_reflection_define_generic_parameter): Generic
23859 parameters start with zero.
23861 2003-09-04 Martin Baulig <martin@ximian.com>
23863 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
23865 * reflection.h (MonoReflectionGenericParam): New typedef.
23866 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
23867 the generic parameters from the managed TypeBuilder.
23869 * reflection.c (mono_reflection_define_generic_parameter): New function.
23870 (mono_reflection_create_runtime_class): Encode generic parameters.
23871 (mono_reflection_setup_generic_class): New function; this is
23872 called after adding adding all generic params to the TypeBuilder.
23873 (encode_type): Added MONO_TYPE_VAR.
23875 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
23877 * class.h class.c (mono_class_needs_cctor_run): Moved this method
23880 * assembly.h assembly.c: Moved the AOT loading code into an assembly
23883 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
23885 * reflection.h reflection.c class.h class.c: Delete duplicate
23886 definition of mono_type_get_name () from reflection.c and export the
23889 * class.c: Class loading fixes from Bernie Solomon
23890 (bernard@ugsolutions.com).
23892 * reflection.c: Endianness fixes from Bernie Solomon
23893 (bernard@ugsolutions.com).
23895 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
23897 * assembly.h assembly.c: Define a file format version for AOT
23900 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
23902 * appdomain.h (MonoJitInfo): New field to determine whenever the
23903 code is domain neutral.
23905 2003-08-31 Miguel de Icaza <miguel@ximian.com>
23907 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
23909 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
23911 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
23912 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
23913 Avoid caching the result since strings must be domain specific. Fixes
23916 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
23918 * marshal.c (mono_marshal_init): Make this callable multiple times
23919 since it is hard to find a correct place to call it.
23921 * object.c (mono_runtime_class_init): Execute static constructors in
23922 the correct appdomain.
23924 * image.c (build_guid_table): Handle the case when multiple images have
23927 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23929 * icall.c: added a couple of icalls for System.Web.
23931 2003-08-28 Martin Baulig <martin@ximian.com>
23933 * icall.c (ves_icall_Type_BindGenericParameters): Use
23934 `klass->generic_inst' instead of `&klass->byval_arg' in the
23935 mono_type_get_object() call. The returned type must be
23936 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
23938 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
23942 * object.c (mono_class_proxy_vtable): Make it thread safe.
23944 * pedump.c: Fix warning.
23946 * object.c appdomain.h: Get rid of metadata_section.
23947 It is no longer needed and it was causing deadlocks with domain->lock.
23949 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
23951 2003-08-26 Martin Baulig <martin@ximian.com>
23953 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
23955 2003-08-26 Martin Baulig <martin@ximian.com>
23957 * pedump.c (main): Call mono_metadata_init(),
23958 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
23959 and mono_loader_init().
23961 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
23963 * loader.h: Add missing include to fix build.
23965 * image.h: mono_image_load_references is no more.
23967 * assembly.c: Reworked assembly loading to make it really thread safe.
23968 After these changes, the assembly returned by mono_assembly_open is
23969 fully initialized, i.e. all its references assemblies are loaded.
23971 * assembly.c (mono_image_load_references): Renamed to
23972 mono_assembly_load_references, and made private, since clients no
23973 longer need to call it.
23975 * class.c: Removed calls to mono_assembly_load_references, since it was
23976 a source of deadlocks.
23978 * loader.h loader.c class.h class.c: Protect data structures using a
23979 new lock, the loader lock.
23981 * class.c (mono_class_setup_vtable): Create temporary hash tables and
23982 GPtrArrays only when needed.
23984 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
23985 into empty structures by mcs. Fixes pinvoke7.cs.
23987 * domain.c (mono_init): Call a new initialization function.
23989 * appdomain.c (mono_runtime_init): Call the new initializer function
23990 of the marshal module.
23992 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
23993 inserted into empty structures by mcs. Fixes pinvoke7.cs.
23995 * marshal.h marshal.c: Added locks around the wrapper caches to make
23996 this module thread safe.
23998 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
23999 this argument. Fixes pinvoke1.exe.
24001 2003-08-25 Lluis Sanchez <lluis@ximian.com>
24003 * object.h: Added call_type field to MonoMethodMessage and the corresponding
24004 enumeration of values. Removed fields to store remote call output values in
24005 MonoAsyncResult. Not needed any more.
24006 * object.c: Initialize call_type and async_result fields in mono_message_init.
24007 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
24008 dispatching the message.
24009 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
24010 async call to finish. To do it use a message with EndInvoke call type.
24012 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
24014 * loader.h loader.c (mono_method_hash_marhal_info): New function which
24015 determines whenever a method has marshalling info.
24017 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24019 * assembly.c: fix the build on windows.
24021 2003-08-22 Lluis Sanchez <lluis@ximian.com>
24023 * object.cs: Fixed bug #47785.
24025 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
24027 * string-icalls.c (StringReplace): If their are no occurances of
24028 the old string found return a reference to the supplied
24029 string. This saves some memory and matches MS behavoir.
24031 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24033 * socket-io.c: fixed compilation for systems that define AF_INET6
24034 and don't define SOL_IP/SOL_IPV6.
24036 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
24038 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
24039 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
24041 * rawbuffer.c rawbuffer.h: Make this module thread safe.
24043 * domain.c: Make this module thread safe.
24045 * domain.c (mono_init): Call new initialization function.
24047 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
24048 reference types too. Fixes #38812.
24050 * image.c (mono_image_init): Fixed warnings.
24052 * class.c (mono_class_from_typeref): Handle assembly load failure
24055 * appdomain.c (add_assemblies_to_domain): Handle the case when
24056 the references of an assembly are not yet loaded.
24058 * metadata.c image.c assembly.c: Moved initialization of global
24059 variables to a separate function called at startup since lazy
24060 initialization of these variables is not thread safe.
24062 * image.c assembly.c: Made this module thread safe by adding locks in
24063 the appropriate places.
24065 * domain.c (mono_init): Call the new initialization functions of the
24068 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
24070 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
24071 make a direct call. It is proxy's work to make the call asynchronous.
24072 mono_delegate_end_invoke(): If the targe is a proxy, just collect
24074 * object.cs: mono_method_call_message_new(): read AsyncResult and
24075 state object from parameters list, if this info is requested.
24076 * object.h: Added fields to store remote call output values in
24077 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
24079 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24081 * object.h: add needed fields to MonoThread.
24082 * threads.c, threads.h: allow registering a function to cleanup data
24083 allocated per thread by the JIT.
24085 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24087 * loader.h: portability fix by Bernie Solomon
24088 * <bernard@ugsolutions.com>.
24090 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
24092 * reflection.h reflection.c (mono_param_get_objects): Changed this to
24093 return a MonoArray. This simplifies the code and also ensures that
24094 the cache allways contains an object reference as a value.
24096 * icall.c (ves_icall_get_parameter_info): Simplified using the new
24099 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24101 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
24102 fixes a problem with byte ordering when getting the address family for
24105 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
24107 * .cvsignore: Added monosn.
24109 * reflection.h reflection.c loader.c: Added support for parameter
24110 marshalling to dynamically created types. Fixes #47295.
24112 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
24114 * rand.c: remove useless warnings.
24116 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
24118 * class.c: implemented ldtoken for methods and fieldrefs.
24120 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24122 * threadpool.c: when mono_async_invoke was called, no one took care of
24123 monitoring the queue. So if the method invoked took some time and we
24124 got new async invoke requests after 500 ms (the thread created waited
24125 that long in WaitForSingleObject), the new async invoke was not called
24126 until the previous one finished.
24128 This is fixed now. Thanks to Totte for helping with it.
24130 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24132 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
24134 2003-08-11 Martin Baulig <martin@ximian.com>
24136 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
24138 2003-08-06 Martin Baulig <martin@ximian.com>
24140 * mono-debug-debugger.c: Added support for static fields,
24141 properties and methods.
24143 2003-08-06 Martin Baulig <martin@ximian.com>
24145 * mono-debug-debugger.c: Don't store the MonoString's vtable to
24146 make this work for applications with multiple application domains.
24148 2003-08-04 Martin Baulig <martin@ximian.com>
24150 * mono-debug-debugger.c: Completely reworked the type support; the
24151 most important thing is that we're now just using one single
24152 `MonoType' instance per type.
24154 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
24156 * mono-endian.h, mono-endian.c, icall.c: Added icall
24157 ves_icall_System_Double_AssertEndianity to assert double word endianity
24158 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
24160 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24162 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
24163 support, icalls and fixes.
24165 2003-07-31 Miguel de Icaza <miguel@ximian.com>
24167 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
24168 classes that are a punctuation character in .NET is not the same a
24171 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24173 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
24175 2003-07-29 Miguel de Icaza <miguel@ximian.com>
24177 * icall.c: Add new MemCopy internalcall.
24178 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
24179 Simplified code; It is not necessary to handle all the cases here,
24180 as the C# code takes care of it. Only handle the case of the name
24181 resource embedded into the assembly.
24183 Changed signature to return the data pointer and the size of the
24186 2003-07-26 Miguel de Icaza <miguel@ximian.com>
24188 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
24189 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
24191 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
24193 * socket-io.c: ignore EINTR error in select.
24195 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
24197 * class.h, class.c: removed unused subclasses field in MonoClass.
24199 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
24201 * icall.c: improve fix of get_base_definition(). If the parent class
24202 doesn't have the mehod, look at the parent of the parent.
24203 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
24204 to check if a parameter is an in or out parameter
24205 (PARAM_ATTRIBUTE_IN is not set by default).
24206 mono_method_return_message_restore(): Use mono_class_value_size to
24207 get the size of a value type. mono_type_stack_size (parameterType)
24208 does not return the correct value if parameterType is byRef.
24209 mono_load_remote_field(), mono_load_remote_field_new(),
24210 mono_store_remote_field(), mono_store_remote_field_new():
24211 raise exception if the remote call returns an exception.
24213 2003-07-28 Martin Baulig <martin@ximian.com>
24215 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
24216 method. This is a wrapper around mono_runtime_invoke() which
24217 boxes the instance object if neccessary.
24219 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24221 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
24222 metadata.h, row-indexes.h, verify.c: first cut of generics support.
24224 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24226 * icall.c: disable mcs bug workaround.
24228 2003-07-21 Miguel de Icaza <miguel@ximian.com>
24230 * object.c (mono_runtime_class_init): Take the metadata_section
24231 mutex before obtaining the domain mutex.
24233 * appdomain.h: Added definition of metadata_section mutex here.
24235 * object.c: define metadata_mutex here.
24237 2003-07-24 Ravi Pratap <ravi@ximian.com>
24239 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
24242 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
24244 * reflection.c: Fix bug #46669
24246 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24251 * object.h: fill in the type name for TypeLoadException.
24253 2003-07-23 Ravi Pratap <ravi@ximian.com>
24255 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
24256 relationship between TypeBuilders while compiling corlib) and bug
24257 45993 (Array types returned from the runtime while compiling
24258 corlib were from the loaded corlib).
24260 2003-07-22 Martin Baulig <martin@ximian.com>
24262 * mono-debug-debugger.c: Reworked the type support a bit more;
24263 distinguish between types and classes.
24265 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
24267 * icall.c: add IsArrayImpl icall.
24269 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
24271 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
24272 initializing real_size only once. Also fix bug #46602.
24274 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
24276 * object.c: Renamed mono_metadata_section to metadata_section.
24278 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
24280 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
24281 empty array if the type is an array. Fixed.
24282 ves_icall_MonoMethod_get_base_definition: if the base method
24283 is abstract, get the MethodInfo from the list of methods of
24285 * reflection.c: ParameterInfo.PositionImpl should be zero-based
24286 and it was 1-based. Fixed in mono_param_get_objects.
24288 2003-07-20 Martin Baulig <martin@ximian.com>
24290 * mono-debug.h: Set version number to 31.
24291 (mono_debug_init): Added `MonoDomain *' argument.
24293 * mono-debug-debugger.c: Reworked the type support; explicitly
24294 tell the debugger about builtin types; pass the `klass' address to
24297 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
24299 * image.c: Allow new metadata tables to be loaded without a
24300 warning. Also update the warning message to give the new constant value.
24302 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
24304 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
24305 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
24306 array type representation changes.
24308 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
24310 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
24311 on Environment.Exit () call.
24313 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
24315 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
24316 requires a matching corlib.
24318 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
24320 * Changelog: My editor decided to add a CR to each line. Sorry about that.
24321 Committed again without the CRs.
24323 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
24325 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
24326 getting it from the "this" socket instance. Did not work
24327 if the socket is a subclass of Socket.
24328 Also fixed bug #35371.
24330 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24332 * metadata.c: fixed size for TypedByRef.
24333 * loader.c: when searching for a method, consider the vararg amrker.
24334 * unicode.c, decimal.c: constify some arrays.
24336 2003-07-15 Dick Porter <dick@ximian.com>
24338 * socket-io.c: Fixed compilation for gcc < 3.2.
24340 Fixed compilation for machines that don't have AF_INET6 (thanks to
24341 Bernie Solomon <bernard@ugsolutions.com> for that part.)
24343 Fixed compile warnings.
24345 Fixed formatting and line endings.
24347 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
24350 * socket-io.c: Added IPv6 support.
24352 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
24354 * class.c (mono_class_is_assignable_from): New function to implement
24355 the is_assignable_from logic. Used by mono_object_isinst,
24356 Type::IsAssignableFrom () and the interpreter.
24358 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
24359 Object, even interfaces.
24361 * object.c (mono_object_isinst): Implement in terms of
24362 is_assignable_from.
24364 * icall.c (ves_icall_type_is_assignable_from): New icall.
24366 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
24368 * domain.c (foreach_domain): fix compiler warning.
24370 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
24372 * image.c (load_metadata_ptrs): use g_strndup because strndup is
24373 not available on all plattforms
24375 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
24377 * image.h image.c: Store the metadata version string in MonoImage.
24378 * icall.c: New icall to retrieve the image version.
24379 * reflection.c (create_dynamic_image): Fill in the image version field
24380 * reflection.c (build_compressed_metadata): Use the image version
24381 from the image structure.
24383 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24385 * appdomain.c: modified comment.
24386 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
24387 That will be its last iteration when mono_gc_cleanup is called from
24388 mono_runtime_cleanup and before the domain is unloaded.
24392 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
24394 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
24397 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24399 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
24400 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
24401 Bernie Solomon <bernard@ugsolutions.com>.
24403 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24405 * object.c, object.h: provide mono_object_new_fast() for faster
24406 allocation in some special cases.
24408 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24410 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
24411 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
24413 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
24415 * threadpool.c: fix leaks.
24417 2003-07-01 Dick Porter <dick@ximian.com>
24419 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
24420 using MonoGHashTables. Fixes threadpool bug posted to list.
24422 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
24424 * image.h, image.c: added support to load an assembly from a byte array.
24425 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
24426 assembly bundle support.
24428 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
24430 * threadpool.c (mono_thread_pool_add): keep a reference to the
24431 AsyncResult to prevent GC
24433 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24435 * class.c: leak fix.
24437 2003-06-25 Dick Porter <dick@ximian.com>
24439 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
24440 for the async object, the WaitHandle object will close the handle.
24443 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24445 * class.c: in mono_array_class_get (), lookup from the hash with the
24446 same type we insert: this works around a bug in
24447 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
24448 lluis. The real fix will have to wait for after the release.
24450 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24452 * icall.c: fix memory leak when getting type members.
24454 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
24456 * reflection.c: added more pubtoken special cases.
24458 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
24460 * class.c: handle field offset correctly when class size
24461 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
24463 2003-06-20 Martin Baulig <martin@ximian.com>
24465 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
24468 2003-06-20 Martin Baulig <martin@ximian.com>
24470 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
24472 2003-06-20 Martin Baulig <martin@ximian.com>
24474 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
24475 just distinguish between variables in registers and variables at
24476 an offset relative to a register.
24478 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24480 * icall.c: #ifdef out latest changes until mcs is fixed.
24482 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24484 * icall.c: return members in metadata order.
24486 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
24488 * icall.c: avoid infinite loop in GetTimeZoneData.
24490 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
24492 * icall.c: added Marshal.Prelink/All icalls.
24494 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
24496 * object.c, object.h: fix warnings and do some overflow checking
24497 when creating arrays.
24499 2003-06-17 Dick Porter <dick@ximian.com>
24502 * file-io.c: File attributes need to be tweaked slightly when
24503 passed from the managed to the w32 world.
24505 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
24506 * profiler.h profiler-private.h profiler.c: Rework last patch
24507 based on suggestion by Paolo.
24509 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
24511 * profiler.h profiler-private.h profiler.c: Added infrastructure for
24512 instruction level coverage data collection.
24513 * profiler.h profiler.c (: Added new callback function which can be
24514 used by the profiler to limit which functions should have coverage
24516 * profiler.c (mono_profiler_load): Call g_module_build_path to
24517 generate the file name of the profiler library.
24519 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24521 * profiler.c, profiler.h, profiler-private.h: added basic block
24522 coverage profiling API.
24524 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
24526 * reflection.c (mono_reflection_create_runtime_class): Add support
24527 for events in dynamically generated code.
24529 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
24532 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24534 * icall.c: when getting timezone info, return reasonable values if we
24535 can't get the actual data.
24537 2003-06-14 Dick Porter <dick@ximian.com>
24539 * threads.c (start_wrapper): Remove the reference to the thread
24540 object in the TLS data, so the thread object can be finalized.
24541 This won't be reached if the thread threw an uncaught exception,
24542 so those thread handles will stay referenced :-( (This is due to
24543 missing support for scanning thread-specific data in the Boehm GC
24544 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
24546 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
24548 * reflection.c: ensure streams and tables are first allocated with
24549 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
24551 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24553 * icall.c: fixed GetElementType for byrefs (bug# 44792).
24555 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
24557 * reflection.c (mono_reflection_create_runtime_class): Add support for
24558 properties to dynamically created classes.
24559 * reflection.c: Fix a few places where non-MonoObjects were inserted
24560 into the tokens hashtable.
24562 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24564 * object.c: some support to handle out of memory exceptions.
24566 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
24568 * marshal.c (mono_marshal_get_native_wrapper): support reference
24571 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24573 * object.h, object.c: more portability stuff from Bernie Solomon.
24574 Unexport mono_object_allocate(). Added mono_object_unbox ().
24575 Set exitcode when an unhandled exception is thrown.
24577 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
24579 * marshal.c (mono_marshal_get_native_wrapper): use custom
24580 marshaler for return types.
24582 2003-06-10 Dick Porter <dick@ximian.com>
24584 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
24585 ip_mreq is available
24587 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
24589 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
24590 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
24591 by Bernie Solomon <bernard@ugsolutions.com>.
24593 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
24595 * gc.c (mono_gc_init): Avoid error message on shutdown when
24596 GC_DONT_GC=1 is used.
24598 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
24599 New icall to return the GUID of a module.
24601 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24603 * class.c: ensure instance size always includes the parent's size
24604 even whem class size is set explicitly (fixes bug#44294).
24606 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24608 * profiler.h, profiler.c: made the simple profiler thread-safe,
24609 get more accurate timing info. Allow the loading of an
24610 externally-developed profiler module.
24612 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
24614 * marshal.c (mono_marshal_get_native_wrapper): improved
24615 class/byref arguments.
24616 (mono_marshal_get_native_wrapper): better string marshaling support.
24618 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24620 * class.c: ensure .pack and .size are handled correctly and
24621 simplified layout of static fields.
24623 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
24626 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
24628 * loader.c (mono_lookup_pinvoke_call): look for modules in the
24629 current directory (fix bug 44008)
24631 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
24633 * marshal.c (mono_marshal_get_native_wrapper): started support for
24635 (mono_delegate_to_ftnptr): consider marshalling specifications
24637 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24639 * reflection.c, reflection.h: emit custom marshal info.
24641 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24643 * object.c: free the GError.
24644 * icall.c: added CloseEvent_internal.
24646 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
24649 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
24651 * loader.c (mono_method_get_signature): Add support for dynamic
24654 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24656 * reflection.c: fixed bug #43905.
24658 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24660 * class.c, domain.c, icall.c, metadata.h, object.h: support for
24661 handling TypedReference and ArgIterator.
24662 * loader.c, loader.h: added function to get signature at call site.
24664 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24666 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
24667 data readonly. Buglets and warning fixes. Some MethodSpec support.
24669 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24671 * class.h, class.c, object.c: remove relative numbering support.
24673 2003-05-26 Miguel de Icaza <miguel@ximian.com>
24675 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
24676 free the string, until we get a chance to fix Gtk#
24678 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24680 * marshal.c: revert last patch.
24682 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
24684 * icall.c: updates for new mono_class_vtable() not calling
24685 the type constructor anymore.
24687 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24689 * object.h, object.c: separate vtable creation from type
24690 initialization. Make running the .cctor thread safe.
24692 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
24694 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
24696 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
24698 * loader.c (mono_get_method): consider calling convention
24700 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
24702 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
24703 to return the invisible global type for a module.
24705 * reflection.c (mono_image_build_metadata): Emit global fields too.
24707 2003-05-20 Peter Williams <peterw@ximian.com>
24709 * loader.c (mono_lookup_internal_call): Add a few newlines.
24711 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
24713 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
24716 * appdomain.c (set_domain_search_path): Recalculate search path when
24717 AppDomainSetup.PrivateBinPath changes.
24719 * object.c (mono_class_compute_gc_descriptor): It turns out some
24720 parts of the class libs (like System.Thread) holds pointers to
24721 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
24722 to treat native int a pointer type here.
24724 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
24726 * appdomain.h, domain.c: add hashtable for jump target resolution.
24728 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
24730 * reflection.h reflection.c icall.c: Added new icalls
24731 GetManifestResourceInfoInternal, GetModulesInternal and support
24734 2003-05-16 Dick Porter <dick@ximian.com>
24738 * file-io.c: Implement System.IO.MonoIO::GetTempPath
24740 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
24742 * object.c: mono_store_remote_field: little fix to previous patch.
24744 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24746 * class.c: add constructors to array classes.
24747 * icall.c: special case array construction for InternalInvoke (),
24749 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
24751 * class.h class.c reflection.c object.c: Added support for field
24752 defaults in dynamically generated classes.
24754 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24756 * reflection.c: properly encode charset for ddlimport.
24758 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
24760 * threads.c: allow compiling without GC.
24762 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24764 * appdomain.h, object.c, object.h, threads.c, threads.h: added
24765 handling of thread static data.
24767 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24769 * reflection.h, reflection.c: added mono_custom_attrs_free ().
24771 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
24773 * class.c (mono_array_class_get): always set the serializable flags
24774 (mono_array_class_get): always set the SEALED attribute for array types
24776 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
24778 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
24779 attributes (fix for bug 42021).
24781 2003-05-12 Dick Porter <dick@ximian.com>
24783 * gc.c: Don't run finalizers when the finalizer thread is
24784 finishing up, because the default domain has already been
24787 2003-05-11 Miguel de Icaza <miguel@ximian.com>
24789 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
24790 value is null, we should throw an exception. This is slightly
24791 different than the other conventions used for the constructor.
24793 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24795 * socket-io.c: fixed windows build.
24797 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24799 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
24801 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
24803 * object.c (mono_string_new_wrapper): Compatibility fix for MS
24806 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
24808 * class.c (mono_class_layout_fields): Add experimental GC aware
24809 auto layout facility. Requires class library changes to work correctly.
24811 (mono_class_setup_vtable): Avoid overriding explicit interface
24812 method implementations. Fixes iface3.exe test.
24814 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
24816 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
24817 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
24819 * metadata.h: Add new type classification macro which determines
24820 whenever the type holds an object reference.
24822 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
24824 * marshal.c (mono_marshal_get_native_wrapper): cleanups
24826 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
24828 * gc.c (finalizer_thread): Work around a GC bug.
24830 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
24832 * marshal.c (emit_struct_conv): allow unions
24834 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
24836 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
24838 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
24840 2003-05-06 Martin Baulig <martin@ximian.com>
24842 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
24844 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24847 (Select_internal): allow NULLs, don't create arrays if not needed.
24848 Coupled with Socket.cs changes.
24851 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
24852 register a finalizer for it that will close the semaphore handle. This
24853 fixes the leak and make Lupus' test run with > 4080 loops.
24855 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
24857 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
24858 Jerome Laban (bug #42287)
24860 2003-05-02 Martin Baulig <martin@ximian.com>
24862 * debug-mono-symfile.h
24863 (MonoSymbolFile): Moved declaration into mono-debug.h.
24864 (MonoDebugMethodJitInfo): Likewise.
24865 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
24867 (_mono_debug_address_from_il_offset): Take a
24868 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
24871 (MonoDebugDomainData): New struct.
24872 (mono_debug_get_domain_data): New function.
24873 (mono_debug_add_method): Take an additional `MonoDomain *'
24875 (mono_debug_source_location_from_address): Likewise.
24876 (mono_debug_il_offset_from_address): Likewise.
24877 (mono_debug_address_from_il_offset): Likewise.
24879 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
24881 * reflection.c: one more check for null type in custom attrs.
24883 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24885 * reflection.c: avoid warning (comparison is always false due to limited
24886 range of data type).
24888 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24890 * icall.c: throw an exception in Type.GetField if the argument 'name'
24893 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
24895 * reflection.c: fixed handling of enums in named arguments to custom
24896 attributes (bug #42123).
24898 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24900 * reflection.c: use the right array element type and handle
24901 a null for a Type argument, too.
24903 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
24905 * reflection.c: handle arrays as arguments to custom attributes.
24907 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
24909 * reflection.c: handle a string value in a custom attr
24910 ctor that takes an object.
24912 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
24914 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
24917 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
24919 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
24921 2003-04-27 Martin Baulig <martin@ximian.com>
24923 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
24924 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
24925 MONO_DEBUGGER_EVENT_BREAKPOINT.
24926 (mono_breakpoint_trampoline_code): Removed.
24927 (mono_debugger_event_handler): The last argument is now a
24929 (mono_debugger_insert_breakpoint_full): Removed the
24930 `use_trampoline' argument.
24931 (mono_debugger_method_has_breakpoint): Likewise.
24932 (mono_debugger_trampoline_breakpoint_callback): Renamed to
24933 mono_debugger_breakpoint_callback(); take the method and
24934 breakpoint number as arguments.
24936 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24938 * metadata.c: fix off by one when loading parameters attributes.
24940 2003-04-24 Martin Baulig <martin@ximian.com>
24942 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
24944 2003-04-24 Martin Baulig <martin@ximian.com>
24946 * mono-debug-debugger.c: Moved all code which interacts with the
24947 Mono Debugger here.
24949 * debug-mono-symfile.c: This code now just deals with the symbol
24950 file itself, the debugger code is now in mono-debug-debugger.c.
24952 2003-04-23 Martin Baulig <martin@ximian.com>
24954 * mono-debug.c (mono_debug_source_location_from_il_offset):
24955 New method; like mono_debug_source_location_from_address(), but
24956 takes an IL offset instead of a machine address.
24958 2003-04-23 Martin Baulig <martin@ximian.com>
24960 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
24961 `line' field; this is now computed by the debugger.
24963 2003-04-23 Martin Baulig <martin@ximian.com>
24965 * mono-debug.[ch]: New files. This is the new debugging interface.
24967 * mono-debug-debugger.[ch]: New files. Moved all code which
24968 interacts with the Mono Debugger here.
24970 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
24972 * domain.c (mono_init): initialize mono_defaults.monitor_class
24974 2003-04-21 Miguel de Icaza <miguel@ximian.com>
24976 * reflection.c (method_encode_code): Add a spicy exception to help
24977 future compiler authors.
24979 2003-04-21 Martin Baulig <martin@ximian.com>
24982 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
24983 Make this work with relative pathnames; g_filename_to_uri() needs
24984 an absolute filename.
24986 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
24988 * icall.c: Track name changes in Object and ValueType.
24990 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
24992 * metadata.c (mono_type_stack_size): size should be a multiple of
24995 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24998 (internal_domain_finalize): moved into mono_domain_finalize. No need
24999 to create another thread because the finalizers will be run in the
25002 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
25003 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
25004 to be run (MS does this too).
25006 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
25008 * object.c (mono_class_compute_gc_descriptor): Update comment.
25010 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
25012 * image.h: Add synchronized wrapper cache.
25014 * image.c (do_mono_image_open): Initialize cache.
25016 * reflection.c (create_dynamic_mono_image): Initialize cache.
25018 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25020 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
25021 ves_icall_System_Buffer_ByteLengthInternal.
25023 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
25025 * reflection.c: setup klass->nested_in earlier. Allow
25026 a dash in the assembly name.
25028 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
25030 * metadata.c (mono_type_to_unmanaged): dont access
25031 type->data.klass for MONO_TYPE_OBJECT
25032 (mono_type_to_unmanaged): consider System.Delegate class
25034 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
25036 * class.c: just setup supertypes in the proper place instead of
25037 initializing the full element class for arrays.
25039 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
25041 * class.c: ensure the element class of arrays is initialized.
25042 Setup the supertype info for array classes, too.
25044 2003-04-14 Miguel de Icaza <miguel@ximian.com>
25046 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
25048 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25050 * Makefile.am: re-added -m option when running cygpath. This way,
25051 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
25053 * mono-config.c: same codepath for locating mono config file for WIN32
25055 * assembly.c: if mono_assembly_setrootdir is called, don't override
25058 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25060 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
25061 MONO_ASSEMBLIES variable.
25063 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
25065 * icall.c: added Assembly::GetNamespaces() icall.
25067 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25069 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
25071 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
25073 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
25074 * object.c: fixed bug in the construction of vtable for proxies
25076 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
25078 * object.c (mono_array_new): Mark mono_array_new as an icall.
25080 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25082 * class.c: fixed test for public method when overriding interfaces.
25085 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25087 * appdomain.h, domain.c: added mono_domain_foreach() to
25088 be able to access the currently loaded appdomains.
25089 * object.c: make string interning work across sppdomains.
25090 Mark some functions for use as icalls.
25092 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
25094 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
25096 * reflection.h reflection.c: Allocate long living data using
25097 GC_MALLOC_ATOMIC so the collector does not need to scan it.
25099 * reflection.c: Double the allocation size in streams instead of
25100 increasing it, to prevent unneccesary copying on large assemblies.
25102 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
25103 creation if the assembly does not have the Run flag set.
25105 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25107 * class.h: avoid the C++ keywords in header files (Jerome Laban
25108 spotted and fixed this).
25110 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25113 (mono_unhandled_exception): fill in the arguments for the
25114 UnhandledException event. Only trigger that event for the default
25115 domain (as MS does).
25117 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
25119 * object.c: Improve typed allocation stuff based on suggestions from
25120 Paolo. Also turn it on if the GC library supports it.
25122 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
25124 * object.c object.h class.h: Added experimental typed allocation
25125 facility using the interfaces in gc_gcj.h.
25127 * os/gc_wrapper.h: Added new include files.
25129 2003-04-03 Martin Baulig <martin@ximian.com>
25131 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
25132 which is not yet enabled by default.
25134 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
25136 (mono_gc_lock, mono_gc_unlock): New static functions.
25138 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
25139 functions; stop/start the world for the garbage collector. This
25140 is using the windows API; we need to complete the SuspendThread()/
25141 ResumeThread() implementation in the io-layer to make this work on Unix.
25142 (mono_gc_push_all_stacks): New public function; tells the garbage
25143 collector about the stack pointers from all managed threads.
25145 2003-04-03 Martin Baulig <martin@ximian.com>
25147 * object.h (MonoThread): Added `gpointer stack_ptr'.
25149 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
25151 2003-04-03 Martin Baulig <martin@ximian.com>
25153 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
25155 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
25157 * reflection.c (typebuilder_setup_fields): Initialize field.first and
25160 2003-04-02 Miguel de Icaza <miguel@ximian.com>
25162 * loader.c (mono_lookup_internal_call): Report the corlib that is
25165 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
25167 * icall.c (ves_icall_type_GetTypeCode): fixed check for
25168 System.DBNull (it's class not valuetype).
25170 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
25172 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
25173 if the array method was already assigned a token (fixes bug#40646).
25175 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
25177 * reflection.c (mono_reflection_get_type): Attempt type resolve even
25178 if no assembly is given.
25180 2003-04-01 Miguel de Icaza <miguel@ximian.com>
25182 * metadata.h: Added the new tables.
25184 * row-indexes.h: Added definitions for new tables.
25186 * metadata.c: Add schemas for new tables, and add support for
25187 computing the sizes of them.
25189 * class.c: Update for handling the new type cases.
25191 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
25193 * metadata.h (MONO_TYPE_IS_VOID): new macro
25195 2003-03-31 Martin Baulig <martin@ximian.com>
25197 * threads.h (MonoThreadCallbacks): Added `thread_created'.
25199 * threads.c (mono_thread_new_init): Call `thread_created' in the
25200 mono_thread_callbacks.
25202 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
25204 * loader.h: added marshalbyrefobject_class to mono_defaults
25205 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
25206 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
25207 generation of output parameters.
25208 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
25209 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
25210 contextbound and the target object belongs to the context of the caller.
25211 * object.h: added context and unwrapped_server variables in MonoRealProxy.
25212 * object.c: Implemented support for interfaces and abstract classes
25213 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
25214 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
25216 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
25218 * class.h class.c (mono_class_is_subclass_of): New function.
25220 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
25221 routines for most common case (calls from ArrayList::ToArray).
25223 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
25224 routine so programs which call Environment::Exit() can be profiled.
25226 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
25227 Added MONO_ARCH_SAVE_REGS.
25229 * icall.c (ves_icall_type_is_subtype_of): Use new function.
25231 2003-03-29 Miguel de Icaza <miguel@ximian.com>
25233 * blob.h: Add a couple of new MonoType types definitions.
25235 * tabledefs.h: Add a couple of new call convs.
25237 2003-03-27 Zoltan Varga <vargaz@freemail.h>
25239 * reflection.h (MonoReflectionDynamicAssembly): track changes in
25240 the layout of the class.
25242 * reflection.c (alloc_table): double the size on overflow to avoid
25243 unnecessary copying.
25245 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
25246 avoid filling out metadata tables and blobs. Also set mb->ilgen to
25247 null so it can be garbage collected.
25249 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
25251 * reflection.c (mono_reflection_get_type): Return the resolved type
25252 only if it is in the assembly we searched.
25254 * reflection.c (ensure_runtime_vtable): Initialize method slots.
25256 * class.c (mono_class_setup_vtable): Set the slot of the overriding
25259 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25262 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
25263 the right one is 'file:///blah', but MS allows it.
25265 (mono_assembly_open): allow 'file://blah'
25267 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
25269 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
25271 * socket-io.c: fixes bug #40310.
25273 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
25275 * reflection.c (mono_reflection_parse_type): handle deeply nested
25278 * reflection.c (mono_image_create_token): Use unique token values
25279 since they will be put into a hash table.
25281 * class.c (mono_class_setup_vtable): If a method occurs in more than
25282 one place in the vtable, and it gets overriden, then change the
25283 other occurances too.
25285 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
25286 object as return type.
25288 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
25290 * icall.c: Deleted "ToString" implementation for double and float
25291 because they are full implemented in managed code.
25293 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25295 * reflection.c, reflection.h: implemented and exported functions
25296 to retrieve info about custom attributes.
25298 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25300 * appdomain.c: moved Uri handling to assembly.c
25301 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
25302 work when using a file Uri in *nix and windows.
25304 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
25305 GetReferencedAssemblies.
25307 2003-03-18 Dick Porter <dick@ximian.com>
25309 * icall.c: Rename a couple of internal calls
25311 * threads.c: Set the thread state to Stopped when a thread exits.
25314 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
25316 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
25319 * object.c (mono_class_vtable): fix warning.
25321 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
25323 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
25325 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
25327 (method_encode_clauses): Create exception info structures in the right
25329 (mono_reflection_setup_internal_class): Initialize supertypes field.
25331 * class.c object.c: Handle interfaces which implement other interfaces
25334 * class.h class.c: Move the supertypes array initialization code into
25335 a separate function so it can be used for dynamic types too. Also call
25336 it earlier, in mono_class_init(), since it can be used before the
25337 type is initialized.
25339 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25343 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
25348 * object.c: remove warnings.
25350 2003-03-13 Martin Baulig <martin@ximian.com>
25352 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
25353 (MonoDebugLexicalBlockEntry): New types.
25355 * debug-mono-symfile.c
25356 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
25358 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25360 * process.c: ret can be any non-zero value accroding to MS doc.
25362 2003-03-07 Miguel de Icaza <miguel@ximian.com>
25364 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
25365 fixing a warning for a miss-used prototype, would have cause
25366 random memory corruption.
25368 2003-03-07 Martin Baulig <martin@ximian.com>
25370 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
25371 getting really annoying ....
25373 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
25375 * reflection.c (fixup_method): added support for array methods.
25377 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
25379 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
25380 (pointed out by Michael Adams).
25382 2003-03-04 Dick Porter <dick@ximian.com>
25384 * icall.c: Temporarily reverted the Double and Single ToString()
25385 change, because it broke nunit.
25387 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
25389 * object.h, threads.h: make include files compatible with C++
25390 (patch by Jerome Laban <jlaban@wanadoo.fr>).
25392 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
25394 * icall.c: Erased ToString helper functions for Double and Single.
25395 Now, that implementations ar all in managed code (Double and Single
25398 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
25400 * appdomain.c: Added method for initializing the default context of
25401 a domain. Added internal call for getting the default context.
25402 * appdomain.h: Added context variable in MonoDomain struct.
25403 * domain.c: mono_domain_set also sets the default context of the domain
25404 * icall.c: Mapped internal method InternalGetDefaultContext.
25405 * object.c: mono_object_get_virtual_method returns always a remoting
25406 wrapper if the object is a transparent proxy.
25407 mono_runtime_invoke_array: when creating an object by calling the
25408 constructor, if the created object is a proxy, then the constructor should
25409 be called using the a remoting wrapper.
25411 2003-03-03 Dick Porter <dick@ximian.com>
25413 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
25414 variable so it compiles on solaris. Problem spotted by
25415 Christopher Taylor <ct@cs.clemson.edu>
25417 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25420 (get_info_from_assembly_name): don't leak value.
25423 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
25426 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
25428 * assembly.c: export mono_image_load_references ().
25429 * class.c: handle function pointers. mono_class_from_name() now
25430 supports nested type names directly.
25432 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
25434 * reflection.h reflection.c: Encode already created dynamic methods
25435 and fields correctly as a DEF instead of a REF.
25437 * reflection.c: Get rid of the force_ref argument to
25438 mono_image_typedef_or_ref since it was wrong in the first place.
25440 * string-icalls.c: add error checking to string constructors according
25443 * reflection.c: Emit types in the order their TypeBuilders were
25444 created. Previously, a new table index was assigned to each type before
25445 the tables were emitted. This was wrong because the signature blob
25446 might already refer to a type by its original table index.
25448 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
25450 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
25453 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25455 * Makefile.am: make assemblies dir have \ instead of / on windows.
25457 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
25459 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
25460 iterate over the NESTEDCLASS table using a linear search since the
25461 table is not guaranteed to be sorted by the secondary key.
25463 * class.c (mono_class_create_from_typedef): fixed up call to
25464 mono_metadata_nesting_typedef.
25466 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
25468 * marshal.c (mono_string_to_byvalstr): clear the memory as
25469 suggested by Jerome Laban <jlaban@wanadoo.fr>
25471 2003-02-26 Dick Porter <dick@ximian.com>
25473 * process.c: Cope with padding in .rsrc blocks
25475 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
25477 * metadata.h: reverted the filter_len change, it breaks reflection
25479 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
25481 * metadata.h: added a new field to store the filter_len
25484 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
25486 * reflection.c: handle custom attributes for types and members
25487 created with Reflection.Emit (bug#38422).
25489 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
25491 * reflection.c: define RTSpecialName automatically for constructors for
25492 compatibility with MS.NET.
25494 * reflection.c (mono_reflection_create_runtime_class): initialize
25495 nested_in field of dynamically created classes.
25497 2003-02-22 Martin Baulig <martin@ximian.com>
25499 * debug-mono-symfile.h: Incremented version number.
25501 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
25503 * object.h icall.c process.c: fix warnings.
25505 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
25507 * appdomain.h appdomain.c:
25508 (mono_domain_try_type_resolve): split the
25509 name_or_tb argument into a name and a tb argument.
25510 (mono_domain_has_type_resolve): new function to check whenever the
25511 application has registered a TypeResolve event handler.
25513 * icall.c reflection.h reflection.c: move the type resolve logic into
25514 mono_reflection_get_type () so it will be invoked when
25515 Assembly::GetType () is called.
25518 (mono_reflection_get_type): renamed to get_type_internal.
25519 (mono_reflection_get_type): fixed type name generation so it works
25520 for nested types too.
25521 (mono_reflection_get_type): call has_type_resolve () to avoid the
25522 costly type name generation if there is no resolve event handler.
25524 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25526 * class.c, image.c: load exported types from file references.
25528 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
25530 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
25531 used to cache the managed methods used to create proxies and make
25532 remote invocation of methods.
25533 * class.h: Added in MonoVTable a flag to indicate that a class needs
25534 to be remotely created.
25535 * object.c: Modified the method mono_class_vtable(). It now initializes
25536 the remote flag of the vtable. Modified mono_object_new_specific(),
25537 so now it checks the remote flag.
25538 * icall.c: Added a couple of internal methods, one for enabling instance
25539 creation interception for a type, and one for creating objects bypassing
25542 2003-02-18 Martin Baulig <martin@ximian.com>
25544 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
25545 New interncall to get a method's metadata token.
25547 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
25548 New interncall for the debugger.
25550 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
25552 * class.c (mono_class_setup_vtable): allocate supertype array
25554 2003-02-18 Martin Baulig <martin@ximian.com>
25556 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
25558 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25561 (assembly_name_to_aname): jump over unknown properties (i've found
25562 something like: 'type, assembly, version=xxx, custom=null, public...',
25563 so now will ignore custom=null and still get the rest of the values).
25565 2003-02-17 Dick Porter <dick@ximian.com>
25567 * threads.c: Have Thread.Start() wait for a semaphore to signal
25568 that the thread has set up all its local data. This fixes bug
25569 34323, where Abort() raced the new thread's TLS data.
25571 Also removes the handle_store() call from start_wrapper, because
25572 threads are now always created suspended and there is no longer a
25573 race between the parent and child threads to store the info.
25575 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
25577 * image.c: explain the #- heap issue in a message, hopefully
25578 avoiding FAQs on mono-list.
25580 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25583 (GetEntryAssembly): if the domain has not invoked
25584 AppDomain.ExecuteAssembly yet, return the assembly of the default
25587 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
25589 * class.c (mono_ldtoken): make it work in dynamic assemblies.
25591 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
25593 * metadata.c, reflection.c: simple speedup to type hash
25596 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
25598 * image.c, image.h, class.c, assembly.c: move module loading
25599 to MonoImage. When loading metadata, consider alignemnet from
25600 the start of metadata, not from the metadata address in memory.
25602 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
25604 * reflection.c (mono_reflection_get_custom_attrs): Added support for
25605 AssemblyBuilder objects. Factored out custom attribute creation into
25606 a separate function.
25607 (create_custom_attr): new function to create custom attributes.
25609 2003-02-12 Miguel de Icaza <miguel@ximian.com>
25611 * Makefile.am: Got tired of typing the full pathname to pedump.
25612 Until there is another option, am installing this.
25614 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
25616 * class.c (class_compute_field_layout): always set field->parent
25617 (mono_ldtoken): use mono_defaults.fieldhandle_class;
25619 2003-02-11 Dick Porter <dick@ximian.com>
25622 * monitor.c: Rewrote Monitor, making lock much faster and
25623 Pulse/Wait work as specified. Also uses much fewer handles, and only
25624 creates them as needed.
25626 * exception.c: Added SynchronizationLockException
25628 * threads.c: Deleted old Monitor implementation. The new one is
25631 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
25633 * class.c: handled TypedReference type code. Set the correct size for
25634 class data. Setup interface_offsets for interface classes, too.
25636 2003-02-09 Martin Baulig <martin@ximian.com>
25638 * debug-mono-symfile.h: Reflect latest symbol writer changes.
25640 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
25642 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
25643 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
25644 * object.c: fixed mono_object_get_virtual_method () for interfaces.
25645 * verify.c: check for code that runs after the end of the method.
25647 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
25649 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
25650 "System.Math::Round2".
25651 * sysmath.h: Added Floor, Round and Round2 definitions.
25652 * sysmath.c: Modified certain functions that were not 100% compliant
25653 with MS.NET (math precision) and added the implementation of Floor,
25656 2003-02-07 Martin Baulig <martin@ximian.com>
25658 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
25660 2003-02-07 Martin Baulig <martin@ximian.com>
25662 * debug-mono-symfile.c: Reflected latest symwriter changes.
25663 (mono_debug_create_mono_symbol_file): Removed.
25664 (mono_debug_open_mono_symbol_file): Take an argument which
25665 specifies whether to create a dynamic symbol file.
25667 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
25669 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
25671 2003-02-05 Martin Baulig <martin@ximian.com>
25673 * reflection.c (mono_image_build_metadata): Make this public,
25674 protect it against being called multiple times, don't create
25675 resources and don't build the compressed metadata here.
25676 (mono_image_create_pefile): Do this here.
25679 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
25681 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25683 * socket-io.c: fixed bug #36322.
25685 2003-02-06 Piers Haken <piersh@friskit.com>
25689 * debug-mono-symfile.c:
25695 * socket-io.c: warning cleanups
25697 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
25699 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
25700 function. works like remoting invoke, but does a check for the Proxy first.
25702 2003-02-05 Miguel de Icaza <miguel@ximian.com>
25704 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
25706 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
25708 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
25710 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
25711 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
25713 * object.c (mono_store_remote_field_new): used by the new jit
25714 instead of mono_store_remote_field
25715 (mono_load_remote_field_new): used by the new jit
25716 instead of mono_load_remote_field
25718 2003-02-05 Patrik Torstensson
25720 * appdomain.c: changed unload to take the domain id instead
25723 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
25726 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25728 * appdomain.c: don't look for assemblies in ApplicationBase if
25729 PrivateBinPathProbe is set.
25731 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25733 * object.c: make the first argument in main_args contain the absolute
25734 path to the assembly. Fixes bug #37511.
25736 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25738 * icall.c: get correct UTC offset for countries not using daylight
25739 time saving. Fixes bug #30030.
25741 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25743 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
25744 and 1 are the family).
25746 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
25748 * icall.c (ves_icall_InternalExecute): removed wrong assertion
25750 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
25752 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
25754 * reflection.c: added support for SignatureHelper tokens, which is
25755 needed by the Calli opcode.
25757 * reflection.h: track changes to SignatureHelper class.
25759 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
25761 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25763 * appdomain.c: fixed loading assemblies from PrivateBinPath.
25765 2003-02-03 Patrik Torstensson
25766 * appdomain.[c|h], domain.c :
25767 - Added support for getting a domain via domain id
25768 - Support for setting and getting domain from System.AppDomain
25769 (used in cross appdomain channel)
25770 - Added support for get/set for a MonoAppContext on a thread
25771 (Context class in System.Runtime.Remoting.Contexts),
25772 - Removed hack in Get/SetData and ExecuteAssembly.
25774 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
25775 the managed world to get control when a proxy is created.
25777 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
25779 2003-02-03 Miguel de Icaza <miguel@ximian.com>
25782 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
25783 Populate the codebase field as well.
25785 2003-02-02 Martin Baulig <martin@ximian.com>
25787 * debug-mono-symfile.c
25788 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
25789 (mono_debug_symfile_add_method): Allow interncalls.
25791 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25793 * icall.c: throw parse exception if strtod fails or the string is empty.
25795 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
25797 * marshal.c: handle object type separately from defined
25800 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
25802 * marshal.c: handle NATIVE_LPSTR for strings when it's
25803 explicitly specified.
25805 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
25807 * reflection.c, reflection.h, icall.c: setup the reflection
25808 handle cache for ModuleBuilders and AssemblyBuilders.
25810 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
25812 * reflection.c (reflection_methodbuilder_to_mono_method): set
25815 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25817 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
25819 2003-01-29 Dick Porter <dick@ximian.com>
25821 * threads.c: No need for the fake_thread kludge now that Thread
25822 doesn't run a class constructor
25824 2003-01-29 Dick Porter <dick@ximian.com>
25826 * threads.c: Use g_direct_hash instead of the rather bogus
25829 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
25831 * marshal.c (mono_marshal_get_native_wrapper): add check for null
25832 (fix pinvoke12.exe)
25833 (mono_marshal_get_struct_to_ptr): generate valid IL code
25834 (mono_marshal_get_ptr_to_struct): generate valid IL code
25835 (*): correctly set sig->pinvoke, we need to memdup the signature
25838 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25840 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
25841 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
25843 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
25845 * profiler.c: provide more callers information.
25847 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
25849 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
25851 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
25853 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
25855 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25857 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
25858 exception instead of going into an infinite loop on dates which it
25861 * string-icalls.c (ves_icall_System_String_get_Chars): raise
25862 out-of-range exception if needed.
25864 * class.c (mono_class_setup_vtable): allow a virtual method to provide
25865 an implementation for an interface method and to override an inherited
25866 method at the same time.
25867 Imagine a scenario when a virtual method is used to override a
25868 virtual abstract method in a parent class, and this same method
25869 provides an implementation for an method inherited from an interface.
25870 In this case, the interface resolution code will set im->slot, which
25871 means that the virtual method override pass will skip this method
25872 which means a pointer to the abstract method inherited from the parent
25873 will remain in the vtable of this non-abstract class.
25875 * class.c: (mono_class_setup_vtable): continue search for a real
25876 method if only an abstract method is found.
25878 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
25880 * reflection.c: add size to encoding for ByValStr and ByValArray
25881 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
25883 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25885 * class.c (mono_class_setup_vtable): pass the override info as an
25888 * class.c (mono_class_setup_vtable): set the slot of overriding methods
25891 * reflection.c (ensure_runtime_vtable); add support for method
25894 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25896 * reflection.c (resolution_scope_from_image): Hack to work to work with
25897 dynamic assemblies.
25899 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
25900 added a 'force_ref' argument to force this function to allways return
25901 a TypeRef. This is needed by mono_image_get_memberref_token ().
25903 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25905 * reflection.c (mono_image_get_type_info): interfaces really don't have
25908 * reflection.c (mono_image_basic_init): fill out missing fields of
25911 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
25912 dynamic assemblies. This is required so dynamic assemblies show up in
25913 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
25914 Type::GetType() etc. This is consistent with MS behaviour.
25916 * image.c image.h reflection.c: add newly created classes to the name
25917 cache so mono_class_get () will find them.
25919 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25921 First part of changes to get IKVM.NET running under mono.
25923 * appdomain.h, appdomain.c: added new function
25924 mono_domain_try_type_resolve() which will emit TypeResolve events.
25925 This function will call AppDomain::DoTypeResolve to do the actual work.
25927 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
25928 moved existing code dealing with dynamic tokens to a new function
25929 called mono_reflection_lookup_dynamic_token (). This function will
25930 raise TypeResolve events when appropriate. Since reflection.c is not
25931 part of libmetadata, a new hook function called
25932 mono_lookup_dynamic_token() is added to class.c which will call this.
25934 * assembly.h assembly.c: make the invoke_load_hook function public,
25935 so it can be called for dynamic assemblies.
25937 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
25939 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
25942 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
25943 MonoGHashTable, since it contains pointers to objects which the GC
25946 * assembly.c (search_loaded): remove unused variable.
25948 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
25950 * object.c: fixed issue exposed by gcc-generated IL programs
25951 that use RVA data for pointers.
25953 2003-01-25 Martin Baulig <martin@ximian.com>
25955 * threads.c (start_wrapper): Moved the initialization of
25956 `start_func' above the mono_new_thread_init() call to which we
25957 pass it as argument.
25959 2003-01-24 Martin Baulig <martin@ximian.com>
25961 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
25962 the MonoThread pointer.
25964 2003-01-21 Miguel de Icaza <miguel@ximian.com>
25966 * icall.c: Rename `PowImpl' to Pow.
25968 2003-01-23 Dick Porter <dick@ximian.com>
25970 * threads.c (start_wrapper): Create a Thread object if needed, so
25971 the Main() thread can do the class initialisation in a subthread
25972 that has been set up to allow managed code execution.
25974 Pass the thread ID instead of the MonoThread pointer to the thread
25975 start and attach callbacks. This change is required, because the
25976 jit thread start callback must be called _before_ the Thread
25977 object can be created.
25979 (mono_thread_init): Removed much object creation code that is no
25980 longer needed. No managed code is called from here now.
25982 * object.c (mono_runtime_exec_managed_code): Create a subthread
25983 for Main, and call back to the runtime to use it.
25984 Set the exit code when Main exits.
25986 * gc.c: Make sure domain finalisation happens in a subthread.
25987 Re-enable threaded GC, fixing bug 31333 (again).
25989 * environment.c: System.Environment internall calls (so far just
25990 ExitCode is here, the others are still in icall.c)
25992 * appdomain.c (mono_runtime_cleanup): All threads running managed
25993 code should have finished before mono_runtime_cleanup() is
25994 reached, so no need to clean up threads.
25996 2003-01-22 Martin Baulig <martin@ximian.com>
25998 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
25999 `gpointer func' arguments.
26000 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
26001 but added `MonoThread *thread' argument.
26002 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
26004 * threads.c (mono_new_thread_init): Added `gpointer func' argument
26005 and pass it to the mono_thread_start_cb callback.
26006 (mono_install_thread_callbacks): New public function to install a
26007 set of callbacks which are set by the debugger.
26008 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
26010 2003-01-22 Martin Baulig <martin@ximian.com>
26012 * Makefile.am: Install debug-mono-symfile.h.
26014 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
26016 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
26018 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
26020 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
26021 * class.c (mono_ptr_class_get): correctly set access levels of pointers
26022 (mono_array_class_get): correctly set access levels of arrays
26024 2003-01-20 Patrik Torstensson
26025 * image.h (MonoAssemblyName): changed major, minor, build, revision
26026 from signed to unsigned.
26028 2003-01-20 sean kasun <skasun@azstarnet.com>
26030 * reflection.c (load_cattr_value): Now this handles
26031 MONO_TYPE_SZARRAY. Fixes bug #35629
26033 2003-01-20 Miguel de Icaza <miguel@ximian.com>
26035 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
26038 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26040 * decimal.c: fixed bug #26056.
26042 2003-01-17 Martin Baulig <martin@ximian.com>
26044 * gc.c: Raise an ExecutionEngineException instead of using g_error().
26046 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26049 (mono_get_exception_type_initialization): new function.
26051 * object.c: throw a TypeInitializationException when an exception is
26052 thrown invoking the class constructor.
26054 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26056 * reflection.c: fixed attribute reading.
26058 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26061 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
26062 provided, look for the type in the calling assembly and then in
26063 mscorlib; if the assembly name is provided, only try that one.
26065 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
26067 * object.c: register the vtable before there is a chance it's
26068 queried again recursively.
26070 2003-01-13 Duncan Mak <duncan@ximian.com>
26072 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
26075 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
26077 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
26079 2003-01-11 Martin Baulig <martin@ximian.com>
26081 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
26082 this to 20 for the release.
26084 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
26086 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
26088 * loader.c (mono_method_get_marshal_info): bug fix
26090 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
26091 structures with explicit layout
26093 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
26095 * profiler.c: made the output more readable (and sorted).
26096 Added caller information for the allocation profiler.
26098 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
26100 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
26102 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26104 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
26105 to get value types.
26107 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
26109 * object.c, profiler.h, profiler.c, profiler-private.h:
26110 Added object allocation profiler.
26112 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
26114 * reflection.h, reflection.c: handle global methods.
26115 Compress blob entries.
26117 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
26119 * marshal.c: fix compilation.
26121 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
26123 * loader.c (mono_method_get_marshal_info): impl.
26125 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
26127 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26129 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
26130 for reference types.
26132 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
26134 * loader.c: fixed off by one error in loaded parameter names.
26136 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
26138 * marshal.c (mono_marshal_get_icall_wrapper): like
26139 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
26140 instead of a MonoMethod.
26142 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26144 * decimal.c: fixed bug #36537.
26146 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
26148 * marshal.c: throw a missing method exception if a
26149 P/Invoke method is not found.
26151 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
26153 * icall.c: allow a null this for constructors.
26155 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
26157 * icall.c: raise the proper exceptions if the arguments to the
26158 internal Invoke are incorrect.
26160 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
26162 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
26164 2003-01-03 Martin Baulig <martin@ximian.com>
26166 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
26168 2002-12-31 Martin Baulig <martin@ximian.com>
26170 * debug-mono-symfile.c: Completely rewrote the type section.
26171 Instead of using individual malloc()ed fields, we use one big
26172 continuous memory area and offsets into this area.
26173 See the comments in the source code for details.
26175 2002-12-30 Martin Baulig <martin@ximian.com>
26177 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
26179 2002-12-30 Martin Baulig <martin@ximian.com>
26181 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
26182 line number table in this data blob instead of using an external
26185 2002-12-28 Martin Baulig <martin@ximian.com>
26187 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
26189 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
26191 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
26192 as a boxed return type.
26194 2002-12-21 Miguel de Icaza <miguel@ximian.com>
26197 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
26198 g_build_filename to properly get separators on the filename created.
26200 * object.h: Small change, introduce MonoMarshalByRefObject to
26201 track the layout of that structure in the C# universe as we make
26204 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
26206 * object.c: removed assert to allow static fields on interfaces.
26207 * loader.c: a TypeSpec may be used for any type, not just arrays.
26209 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
26211 * class.c, class.h: added mono_class_array_element_size ().
26212 Ignore static methods in interfaces.
26214 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26216 * threads.c: fixed the build under cygwin.
26218 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
26220 * reflection.c: handle nullref constants. Allocate keys for
26221 reflection handles with the GC.
26223 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
26225 * threads.c, threads.h: added mono_thread_get_abort_signal()
26226 to get a suitable signal for thread abort.
26228 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
26230 * metadata.c: fix handling of ExportedType table.
26232 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26234 * icall.c: added WriteWindowsDebugString internal call.
26236 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26238 * reflection.h: added fields to match C# implementation.
26240 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26242 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
26244 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
26246 * gc.h, gc-internal.h: Rename header for GC internal calls to
26247 gc-internal.h from gc.h as to not clash with Boehm GC having its
26248 header installed as <gc.h> in outside include paths.
26249 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
26250 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
26252 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26254 * icall.c: assign minor, build and revision in FillName.
26256 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
26258 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
26259 Added support for running code generated by Reflection.Emit.
26261 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26263 * appdomain.c: check for NULL argument in LoadFrom.
26265 2002-12-10 Dick Porter <dick@ximian.com>
26267 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
26269 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26271 * appdomain.c: fix buglet when building exe file name. Handle full
26272 assembly name (needed after latest changes to AssemblyName).
26274 (mono_image_close): free some hashtables.
26276 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
26278 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
26279 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
26280 on some systems (redhat 7.3)
26282 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
26284 * threads.c: delete the critical section of a sync block,
26285 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
26287 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
26289 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
26291 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26293 * appdomain.[ch]: handle the assembly preload event to try loading the
26294 assemblies using the paths we have in the current domain.
26296 * assembly.[ch]: created an assembly preload hook that is called to try
26297 loading the assembly by other means that the ones provided here.
26299 * domain.c: initialize the domain search path.
26301 From now on, assemblies (TODO: except corlib and System) are loaded
26302 according to these rules when using mono_assembly_load ():
26304 1. It tries to load the assembly from the ApplicationBase
26305 of the current domain appending .dll and .exe (TODO: have to
26306 try loading from name/name.dll and name/name.exe).
26308 2. It tries the search path specified in PrivateBinPath for the
26309 current domain (if any).
26311 3. Previous behavior.
26313 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
26315 * icall.c: implemented GetInterfaceMap() related icall.
26316 * domain.c, loader.h: load MethodInfo in mono_defaults.
26318 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
26320 * gc.c: disable the finalizer thread for now, untill all the issues
26321 with it are resolved.
26323 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
26325 * string-icalls.c: handle embedded nulls in string ctor when the
26326 length is specified.
26328 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
26330 * class.c: look for explicit interface implementation in parent
26333 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
26335 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
26337 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
26339 * gc.c: protect handles with a critical section.
26341 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26344 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
26345 parameters. If no assembly specified, try getting the type from all
26346 the assemblies in the current domain, else, load the assembly and get
26349 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26351 * marshal.c: applied patch from Aleksey Demakov that fixes
26352 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
26354 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26356 * icall.c: fixed get_location.
26358 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
26360 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
26361 declarations to make it work with older gcc.
26363 * loader.c (mono_get_method): set signature->pinvoke for native calls
26365 2002-11-20 Dick Porter <dick@ximian.com>
26367 * threads.c (mono_thread_init): Set the main thread's handle
26369 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
26371 * gc.c: allow compilation without GC support. Changed to match the
26374 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
26376 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
26378 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
26380 * reflection.c: set a public key token on the core assemblies.
26382 2002-11-18 Dick Porter <dick@ximian.com>
26384 * threads.c: Split out some thread initialisation so that other
26385 files can set the start callback function.
26387 * gc.c: Run finalisers in a separate thread, to avoid stack
26388 overflow. Fixes bug 31333.
26390 * appdomain.c: Set up GC finalisation thread.
26394 * domain.c: Use gc.h macros for GC_malloc
26396 2002-11-15 Dick Porter <dick@ximian.com>
26400 * appdomain.c: Removed mono_runtime_init_with_attach(),
26401 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
26402 merging the extra parameter with the existing function. Removed
26403 unneeded code in mono_thread_attach().
26405 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
26407 * image.c (mono_image_loaded_by_guid): a method to get loaded
26409 (load_metadata_ptrs): we store the guid as string.
26411 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
26413 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
26415 * metadata.c (mono_guid_to_string): imported method form Zoltan
26416 Varga (slightly modified)
26418 * assembly.c (mono_assembly_open): load precompiled code
26420 * loader.h (MonoMethod): we store the method token for use in the
26423 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26425 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
26426 the hook function called when an assembly is loaded.
26428 * domain.c: Modified file.
26429 (mono_domain_assembly_load): removed hash table insertion of assemblies.
26433 2002-11-07 Miguel de Icaza <miguel@ximian.com>
26435 * reflection.c: Map PEFileKind to the value expected by the WinNT
26438 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26440 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
26441 Read until the buffer is filled completely.
26443 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26445 * icall.c: implemented MonoType.InternalGetEvent ().
26447 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26449 * appdomain.c: implemented InitAppDomainSetup. Delayed
26450 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
26451 the entry_assembly.
26453 * assembly.c: base_dir is now an absolute path ending with
26456 * icall.c: modified get_location according to the above changes.
26458 * object.c: init AppDomain.SetupInformation for the default domain after
26459 we have the entry assembly.
26461 * domain.c: when unloading a domain, setup = NULL.
26463 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
26465 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
26467 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
26469 * object.h, object.c: introduced mono_object_get_virtual_method ()
26470 to lookup the method invoked on an object when a callvirt is done on
26472 * icall.c: make MethodInfo::Invoke() always do a virtual call.
26474 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26476 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
26477 current domain when loaded an assembly and failed to load it.
26479 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
26481 2002-10-31 Dick Porter <dick@ximian.com>
26485 * file-io.c: Return the error status in a parameter, as the
26486 GetLastError() value has long since been blown away if we try and
26487 look it up in a subsequent internal call invocation. Delete the
26488 GetLastError() internal call, because it's useless.
26490 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
26492 * class.[ch]: added cast_class to fix bug 29517
26494 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
26496 * marshal.c: create valid IL code in the filter clause:
26497 the new JIT is less forgiving:-)
26499 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26501 * icall.c: removed get_property internal call.
26503 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
26505 * appdomain.h domain.c: Added an ID to appdomains.
26507 * threads.c threads.h icall.c: Implement icall
26508 Thread:GetDomainID(), and remove unused icall
26509 CurrentThreadDomain_internal.
26511 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26513 * icall.c: Don't recurse through the base types in GetConstructor.
26516 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
26518 * mempool.h, mempool.c: added mono_mempool_empty() and
26519 mono_mempool_stats().
26521 2002-10-23 Dick Porter <dick@ximian.com>
26525 * icall.c: Added MonoIO.GetFileType internal call
26527 2002-10-17 Dick Porter <dick@ximian.com>
26529 * appdomain.c (mono_runtime_cleanup): Don't signal the async
26530 delegate semaphore before waiting for all threads to finish,
26531 because new threads can also call async delegates. Fixes bug
26534 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
26535 of 3 seconds, in case another async job is queued. (This part is
26536 needed because the bug fix reintroduced the 3s exit lag.) This
26537 makes the mono_runtime_shutdown flag superfluous.
26539 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
26541 * reflection.c: include ehader size in method section headers.
26542 Really check for suplicated modules entries.
26544 2002-10-17 Martin Baulig <martin@gnome.org>
26546 * debug-mono-symfile.c: Added back support for locals.
26548 2002-10-14 Martin Baulig <martin@gnome.org>
26550 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
26553 2002-10-14 Martin Baulig <martin@gnome.org>
26555 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
26556 mono_class_get() instead of looking in the class cache.
26558 2002-10-13 Martin Baulig <martin@gnome.org>
26560 * debug-mono-symfile.c: Set version number to 28, include the
26561 signature in method names.
26563 2002-10-13 Martin Baulig <martin@gnome.org>
26565 * debug-mono-symfile.h: Set version number to 27.
26567 2002-10-11 Martin Baulig <martin@gnome.org>
26569 * gc.c: Don't register/unregister NULL pointers as disappearing links.
26571 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26573 * metadata.c, metadata.h: added helper function to allocate signatures.
26575 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26577 * icall.c: added internal call to get the location of machine.config.
26579 2002-10-08 Martin Baulig <martin@gnome.org>
26581 * debug-mono-symfile.c: Ignore classes with a pending init for the
26584 2002-10-03 Dick Porter <dick@ximian.com>
26586 * threads.c: Freebsd pthread_t is a pointer
26588 2002-10-03 Dick Porter <dick@ximian.com>
26590 * socket-io.c: Implemented GetHostName_internal
26592 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26595 (mono_config_parse_file): don't leak the text.
26597 2002-10-02 Martin Baulig <martin@gnome.org>
26599 * debug-mono-symfile.c: Added support for methods.
26601 2002-10-01 Martin Baulig <martin@gnome.org>
26603 * debug-mono-symfile.c: Don't emit methods and line numbers for
26604 the dynamic symbol file, just write the type table. We can easily
26605 have an external helper program which creates a symbol file for an
26608 2002-10-01 Dick Porter <dick@ximian.com>
26610 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
26611 Only add the handle to the cleanup array when we're about to
26612 launch the thread. Bug 31425 deadlocked when the test was run on
26615 2002-10-01 Martin Baulig <martin@gnome.org>
26617 * debug-mono-symfile.c: Added support for properties.
26619 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26621 * reflection.c: unaligned store fix from Mark Crichton
26622 <crichton@gimp.org>.
26624 2002-09-27 Martin Baulig <martin@gnome.org>
26626 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
26629 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
26631 * assembly.h, assembly.c: use a sane API to hook into the assembly
26632 loading process instead of a useless special-purpouse hack
26633 (ngen needs a hook, too, for example).
26635 2002-09-27 Dick Porter <dick@ximian.com>
26637 * threads.c (mono_thread_init): Call GetCurrentProcess() so
26638 io-layer can set up some process handle info. Not needed on w32,
26639 but doesn't hurt either.
26641 * process.c: Pass the program name in the second parameter to
26642 CreateProcess, so the path is searched. Include the working
26643 directory. Implemented process name, process enumeration, and some
26644 process detail internal calls.
26646 * icall.c: Added internal calls for process lookup, and some
26649 2002-09-26 Martin Baulig <martin@gnome.org>
26651 * assembly.c (mono_install_open_assembly_hook): New global
26652 function to install a function to be invoked each time a new
26653 assembly is loaded.
26654 (mono_assembly_open): Run this callback function if set.
26656 * debug-mono-symfile.c: Put back line numbers for the dynamic
26657 symbol file and also record the .il file as source file. This
26658 allows us to install the temporary symbol file as `file.dbg' just
26659 like a compiler-generated one.
26661 2002-09-26 Nick Zigarovich <nick@chemlab.org>
26663 * Corrected typo in gc.c (BOHEM vs BOEHM).
26665 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26667 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
26668 GetProperties. Also avoid calling g_slist_length in GetProperties and
26671 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26673 * reflection.c: avoid unaligned stores (bug spotted by
26674 Mark Crichton <crichton@gimp.org>).
26676 2002-09-25 Martin Baulig <martin@gnome.org>
26678 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
26679 instead of guint64 for addresses and added prologue/epilogue info.
26681 2002-09-25 Martin Baulig <martin@gnome.org>
26683 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
26684 store line number info. For the dynamic symbol file, we only need
26685 to provide the JIT generated dynamic line number info for the dynamic
26688 2002-09-25 Martin Baulig <martin@gnome.org>
26690 * debug-mono-symfile.h: Incremented version number.
26692 2002-09-24 Martin Baulig <martin@gnome.org>
26694 * class.c (mono_debugger_class_init_func): New global function
26696 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
26699 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
26700 function. This is called via the mono_debugger_class_init_func
26701 hook to add all types to the dynamic type table.
26702 (ves_icall_MonoDebugger_GetType): New interncall to get a class
26703 from its metadata token.
26705 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
26706 New interncall for the debugger.
26708 2002-09-24 Nick Drochak <ndrochak@gol.com>
26710 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
26711 before using it in case it is null.
26713 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26715 * metadata.c: allow custom modifiers in local var signatures
26716 (bug spotted by Zoltan Varga).
26718 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
26720 * class.c: deal with the <Module> class that may have a NULL vtable.
26721 Eliminate warnings.
26723 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26725 * image.c, image.h: more strong name helpers.
26726 * monosn.c: more work: convert pem keys to cryptoapi format.
26728 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
26730 * string-icalls.c: speedup IndexOf.
26732 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26734 * icall.c: updates from Zoltan.2.Varga@nokia.com.
26736 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
26738 * icall.c: cleanup: use mono_object_domain ().
26740 2002-09-23 Martin Baulig <martin@gnome.org>
26742 * debug-mono-symfile.c: Improved type support.
26744 2002-09-22 Martin Baulig <martin@gnome.org>
26746 * debug-mono-symfile.c: Added support for reference types and strings.
26748 2002-09-22 Martin Baulig <martin@gnome.org>
26750 * debug-mono-symfile.c: Started to work on the type table.
26752 2002-09-21 Martin Baulig <martin@gnome.org>
26754 * debug-mono-symfile.c: Largely reworked the symbol table format.
26755 The symbol table is now incrementally updated each time a new
26756 method is added. We're now also using our own magic and version
26757 so that you don't need to recompile all your classes if the
26758 dynamic table changes.
26759 (mono_debug_update_mono_symbol_file): Removed.
26760 (mono_debug_symfile_add_method): New function to add a method.
26762 2002-09-21 Martin Baulig <martin@gnome.org>
26765 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
26768 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
26769 New interncall to get a method from its metadata token.
26771 2002-09-21 Martin Baulig <martin@gnome.org>
26773 * debug-mono-symfile.c: Create type table.
26775 2002-09-20 Martin Baulig <martin@gnome.org>
26777 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
26779 2002-09-20 Martin Baulig <martin@gnome.org>
26781 * debug-mono-symfile.c: Provide information about params and locals.
26783 2002-09-20 Martin Baulig <martin@gnome.org>
26785 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
26788 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
26789 interncall to get a method from its metadata token.
26791 2002-09-20 Martin Baulig <martin@gnome.org>
26793 * debug-mono-symfile.c: Added a few checks for method->header
26794 being non-NULL. This should never happen, but for the moment
26795 let's use a g_warning() rather than a g_assert().
26797 2002-09-19 Mark Crichton <crichton@gimp.org>
26799 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
26800 even if support for it isn't present. Added an #ifdef to fix this.
26802 * socket-io.c: Added checks back for Solaris support.
26804 2002-09-19 Martin Baulig <martin@gnome.org>
26806 * debug-mono-symfile.c (read_string, write_string): Reflect latest
26807 changes in the symbol file format.
26809 2002-09-18 Martin Baulig <martin@gnome.org>
26811 * debug-mono-symfile.c: Set version number to 21.
26813 2002-09-18 Dick Porter <dick@ximian.com>
26815 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
26816 on netbsd. Fixes bug 30051.
26818 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26821 (set_version_from_string): little fix.
26823 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26825 * monosn.c, Makefile.am: added strong name utility.
26826 * reflection.h, reflection.c: implemented delayed signing,
26827 locale, version and hash id assembly attributes.
26829 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26831 * loader.c, metadata.c: load param attributes in signatures.
26833 2002-09-16 Martin Baulig <martin@gnome.org>
26835 * debug-mono-symfile.c: Added string table with all method names.
26837 2002-09-14 Martin Baulig <martin@gnome.org>
26839 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
26840 fast method lookup.
26842 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26844 * reflection.c: record the public key token of referenced assemblies.
26846 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26848 * image.c, image.h: added functions to get the strong name and the
26849 public key of an assembly.
26850 * pedump.c: use them.
26852 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
26854 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
26856 2002-09-12 Miguel de Icaza <miguel@ximian.com>
26858 * marshal.c (mono_marshal_get_managed_wrapper): Added
26861 2002-09-11 Martin Baulig <martin@gnome.org>
26863 * gc.c: Call GC_unregister_disappearing_link() on all links when
26864 finalizing them, this is necessary to aviod a crash in boehm's
26867 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26869 * gc.c: handle GetTarget for finalized objects spotted and fixed by
26872 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
26874 * icall.c: implemented MonoType::Module.
26875 * reflection.c, reflection.h: mono_module_get_object () from
26876 Tomi Pakarinen <tomi.pakarinen@welho.com>.
26878 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
26880 * icall.c: ignore overridden methods in GetMethods ().
26881 Fix for FieldInfo::SetValue().
26882 * object.c: handle float/double in runtime invoke.
26884 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26886 * object.c: allow a constructor to be called again on an object.
26888 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26890 * class.h, class.c: move field layout code to it's own function and
26891 export it. Get an interface id earlier. Move fields in MonoClass
26892 so they are more cache friendly and align the bitfields.
26893 * loader.c: temporary handle get_param_names() for a runtime method.
26894 * reflection.c, reflection.h: more code to handle runtime creation of
26897 2002-09-09 Martin Baulig <martin@gnome.org>
26899 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
26900 signature with the pinvoke field being set for the actual call.
26902 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26904 * icall.c: removed some unused icalls. Start of map of glib charsets
26905 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
26907 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
26909 * debug-helpers.c: break infinite loop (found and fixed by
26910 Holger Arnold <harnold@gmx.de>).
26912 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26914 * icall.c: target may be null in create_delegate.
26916 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26918 * marshal.c: handle a boolean return type.
26920 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26922 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
26924 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
26926 * gc.c: fix weakreferences.
26928 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
26930 * icall.c: added icall to get default codepage.
26932 2002-09-03 Dick Porter <dick@ximian.com>
26935 * threads.c: Use MonoThread instead of MonoObject where
26938 Store running thread objects in a hash table, so that we have all
26939 the info to hand when waiting for them to finish
26940 (means we don't need OpenThread() any more, so mingw builds should
26941 be fully functional again.)
26944 * object.h: Added thread ID to MonoThread
26946 2002-09-03 Martin Baulig <martin@gnome.org>
26948 * icall.c (System.Reflection.Assembly::get_location): New interncall.
26950 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26952 * icall.c: fixed leak in get_temp_path. Thanks lupus.
26954 2002-09-03 Martin Baulig <martin@gnome.org>
26956 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
26957 argument to store the end address of the disassembled instruction.
26959 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
26960 here from debug-symfile.h.
26961 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
26962 JIT into this struct.
26963 (MonoSymbolFile): Added `char *image_file' field.
26964 (MonoDebugGetMethodFunc): Removed.
26965 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
26966 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
26967 (mono_debug_find_method): New method.
26969 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
26970 create a full symbol file.
26971 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
26972 and static symbol files.
26973 (mono_debug_find_method): The symbol file keeps an internal method hash,
26974 call this to get a MonoDebugMethodInfo from a MonoMethod.
26976 * debug-symfile.[ch]: Removed.
26978 2002-08-29 Miguel de Icaza <miguel@ximian.com>
26980 * image.c (do_mono_image_open): Remove linker version check.
26982 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
26984 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
26985 wrappers for instance methods.
26987 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26989 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
26991 2002-08-28 Dick Porter <dick@ximian.com>
26993 * Makefile.am: Export HOST_CC for w32 builds
26995 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26997 * file-io.c process.c: MonoString are null terminated, no
26998 need for mono_string_to_utf16() anymore.
27000 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27002 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
27004 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
27006 * icall.c, reflection.h: speedup System.MonoType.
27008 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27010 * reflection.c: allow null as the value of a string argument in
27011 custom attributes constructors.
27013 2002-08-27 Martin Baulig <martin@gnome.org>
27015 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
27016 `trampoline_address' field.
27018 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
27020 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
27021 check (fixes bug #29486)
27023 2002-08-27 Martin Baulig <martin@gnome.org>
27025 * debug-mono-symfile.c: Changed the file format in a way that allows us
27026 open it read-only and to use a specially malloced area for all the
27027 dynamic data. We can now also generate a symbol file on-the-fly if we're
27028 debugging IL code and there is no MCS generated symbol file for it.
27030 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
27032 * object.c: added a define for a good string and array
27033 creation speedup (not enabled by default because we need to deal with
27036 2002-08-26 Martin Baulig <martin@gnome.org>
27038 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
27039 function to create a dynamic symbol file. This is used by the
27040 debugger to create a symbol file for IL code on-the-fly.
27042 2002-08-26 Martin Baulig <martin@gnome.org>
27044 * loader.c (mono_lookup_pinvoke_call): Include the error message
27045 from g_module_error() in the error message.
27047 2002-08-24 Martin Baulig <martin@gnome.org>
27049 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
27050 function to update the symbol file. The symbol file is mmap()ed
27051 writable, but private. This allows us to install the symbol file
27052 together with the assembly.
27054 2002-08-24 Martin Baulig <martin@gnome.org>
27056 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
27057 but they can read the new symbol file format which mcs is now creating.
27059 * debug-symfile.c (mono_debug_find_source_location): Moved to
27060 debug-mono-symfile.c; this is now operating on the new symbol file.
27062 2002-08-23 Martin Baulig <martin@gnome.org>
27064 * debug-helpers.c (mono_method_desc_from_method): New function to get
27065 a MonoMethodDesc from a MonoMethod.
27067 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
27069 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
27070 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
27072 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
27074 * string-icalls.[ch]: make helper methods static.
27076 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27078 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
27079 types to it and to SetValueInternal.
27081 * object.c: Moved handle_enum label to its proper place. This was the
27084 This time i compiled mcs and gtk-sharp and they both work.
27086 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27088 * icall.c: reverted partially my previous patch until
27089 object.c:set_value handles enums correcly.
27091 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27094 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
27095 (ves_icall_System_Environment_get_MachineName): removed warning when
27096 compiling under cygwin.
27098 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27100 * object.c: fixed field_get_value() for reference types.
27102 2002-08-22 Dick Porter <dick@ximian.com>
27104 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
27105 Don't free a buffer while it's still needed. Patch from Jonathan
27106 Liger <Jonathan.liger@wanadoo.fr>
27108 2002-08-21 Miguel de Icaza <miguel@ximian.com>
27110 * icall.c (ves_icall_System_Environment_get_Platform): Add new
27113 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
27115 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
27116 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
27118 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
27119 we call unmanaged code which throws exceptions.
27121 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27123 * appdomain.h: added per-domain entry_assembly.
27124 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
27126 * icall.c: Assembly::GetEntryAssembly icall.
27127 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
27128 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
27130 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27132 * appdomain.h, gc.c: added mono_domain_finalize ().
27134 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27137 (mono_print_unhandled_exception): changed g_warning by g_printerr
27138 because g_log has a 1024 characters limit (yeah, i got a big stack
27139 trace). Don't print exception name, that should be in ToString
27142 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27144 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
27145 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
27147 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27150 (mono_print_unhandled_exception): after previous commit, i realized
27151 that MS calls ToString on the exception. I changed this function to
27152 do that. This way we get stack_trace for free.
27154 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27157 (mono_print_unhandled_exception): invoke Message property instead of
27158 getting 'message' field from Exception. Don't allocate memory for
27159 'trace' and 'message' if not needed.
27161 2002-08-18 Dick Porter <dick@ximian.com>
27163 * unicode.c: Fix asserts to match Encoder.cs checks
27165 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27167 * marshal.c: fix unaligned store issue and a few wrong
27168 opcode argument types.
27170 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27172 * icall.c: added GetUninitializedObjectInternal internal call.
27174 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
27176 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
27177 to the right domain.
27179 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
27181 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
27183 * class.c (class_compute_field_layout): set blittable to false for Strings
27185 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
27187 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27189 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
27190 first chunk of code to create types at runtime. Code to
27191 handle ReflectedType/DeclaringType. Make reflection handles
27194 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
27196 * class.c: set correct name in arrays.
27198 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
27200 * appdomain.c (mono_domain_transfer_object): make it work with
27201 valuetypes. bug fixes.
27203 2002-08-12 Dick Porter <dick@ximian.com>
27205 * object.h: Rename some parameters to avoid c++ keywords (Patch
27206 from Joseph Wenninger <kde@jowenn.at>)
27208 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
27210 * icall.c: added icall to implement Assembly.GetFile*.
27212 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27214 * reflection.h, reflection.c: code to embed managed resources.
27216 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
27218 * class.c: move all the type size stuff into
27219 class_compute_field_layout().
27221 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27223 * class.c: ensure enums have always the correct instance size.
27224 * unicode.c: remove wrong assert.
27226 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27228 * assembly.c: fix mem corruption issue.
27229 * image.h, image.c: added mono_image_get_resource () to access
27231 * icall.c: implemented Assembly.EntryPoint property and some
27232 Managed Resources related internalcalls.
27235 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27237 * image.c, image.h: impemented mono_image_get_entry_point ().
27238 * appdomain.c: use mono_image_get_entry_point.
27240 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27242 * reflection.c: support the object type argument when loading
27245 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
27247 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
27248 String as return type.
27250 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
27252 * reflection.c: fix encoding of named args for custom attrs to match
27253 the ms implementation. Read them back when instantiating custom
27256 2002-08-02 Radek Doulik <rodo@ximian.com>
27258 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
27259 by Dietmar as quick fix
27260 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
27261 16 as stack size, used on more places as quick fix before Dietmar
27262 will fix it properly
27264 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27266 * object.h, object.c: added accessors for fields and properties.
27268 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27270 * class.c, class.h: made mono_class_get_field_from_name ()
27271 loop on parent types.
27272 Added mono_class_get_property_from_name ().
27274 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27276 * class.c, class.h: move the code to setup the type vtable in its own
27277 function so that it can be reused also for types created at runtime.
27278 Eliminate the "class" identifier from the header file.
27279 * reflection.c: setup the vtable for enums so that we can create
27280 objects for use in SetConstant ().
27282 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
27284 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
27285 instead of the delegate itself as this pointer (bug #28383)
27287 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
27289 * marshal.c (mono_marshal_get_managed_wrapper): added return type
27292 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27294 * loader.c: don't set the pinvoke bit on icalls.
27296 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
27298 * debug-helpers.c (mono_method_full_name): only print a number to
27299 indicate wrapper type (so that the output is more readable in traces).
27301 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
27303 * class.c (mono_class_init): include method override patch from Paolo
27305 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
27307 * icall.c: fixed GetTypeCode().
27309 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
27311 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
27312 use real delegate invoke function to make it work with multicast
27313 delegates (fix bug# 28291).
27315 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27317 * object.c: load constant strings.
27319 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27321 * reflection.c: no magic numbers.
27322 * tabledefs.h: security action enum.
27324 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27326 * assembly.c: fix possible memory corruption.
27328 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
27330 * reflection.h, reflection.c: added support for linking resources.
27331 * verify.c: check we have an updated corlib.
27333 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
27335 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
27337 (mono_marshal_string_array): null terminate unmanaged string arrays.
27338 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
27340 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27342 * icall.c: Type.GetType () can now return also types from the
27345 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
27347 * loader.h, loader.c: stack walking support.
27348 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
27349 GetCallingAssembly.
27351 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
27353 * marshal.c: added optimisations for blittable types
27355 * class.c (mono_array_class_get): do not set blittable attribute on arrays
27356 (mono_class_setup_mono_type): set blittable attribute for single
27359 * marshal.c (mono_string_utf8_to_builder): impl.
27360 (mono_string_builder_to_utf8): impl.
27361 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
27363 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
27365 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
27366 (mono_marshal_get_managed_wrapper): impl. byref types
27368 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27371 (search_method): don't display debug message.
27373 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
27375 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
27377 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
27379 * appdomain.c: set the missing filename when throwing exception.
27381 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
27383 * metadata.c (mono_type_size): code cleanup
27384 (mono_type_stack_size): removed some test code
27386 2002-07-21 Miguel de Icaza <miguel@ximian.com>
27388 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
27389 mono_get_exception_file_not_found now.
27391 * exception.c (mono_exception_from_name_two_strings): New version
27392 that will call a constructor with two string arguments.
27393 (mono_get_exception_file_not_found): New helper routine, used to
27394 report file-not-found errors.
27396 2002-07-20 Dick Porter <dick@ximian.com>
27399 * process.c: Pass file handles to CreateProcess
27403 * file-io.c: Implemented CreatePipe
27405 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
27407 * metadata.c (mono_get_param_info): set alignment for value types
27409 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27411 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
27412 Constify mono_domain_assembly_open().
27413 * loader.c: handle null namespace in icalls.
27415 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
27417 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
27418 (emit_str_to_ptr_conv): marshal object as structs
27420 * metadata.c (mono_type_to_unmanaged): marshal object as structs
27422 * marshal.c (mono_marshal_get_runtime_invoke): support value types
27424 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
27426 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
27427 (mono_marshal_get_native_wrapper): we an now return value types
27429 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27431 * verify.c: more checks implemented.
27433 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
27435 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
27437 (mono_marshal_get_native_wrapper): allow byref arguments
27438 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
27439 impl. PtrToStringXXX methods
27440 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
27441 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
27442 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
27443 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
27444 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
27446 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27448 * reflection.c: fix buglet in parsing an assembly name.
27450 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
27452 * marshal.c (emit_ptr_to_str_conv): first impl.
27454 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
27456 * object.c, class.h: cache the vtable in the class as suggested by
27457 vargaz@freemail.hu (Zoltan Varga).
27459 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27461 * class.h, loader.c: added mono_field_from_token().
27462 * verify.c: first cut of type checking code.
27464 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
27466 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
27468 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
27470 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
27472 (mono_marshal_get_remoting_invoke): impl.
27473 (mono_delegate_begin_invoke): impl.
27474 (mono_mb_emit_save_args): impl.
27475 (mono_delegate_end_invoke): impl.
27476 (mono_marshal_get_delegate_begin_invoke):
27477 (mono_marshal_get_delegate_end_invoke):
27478 (mono_marshal_get_delegate_invoke): generate a special name for
27479 those methods (including the signature) and associate them whith
27480 the delegate class.
27482 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
27485 (mono_reflection_type_from_name): now it has a MonoImage parameter
27486 which is used as the default image to search the type in. If the image
27487 is NULL or getting the type from it fails, it defaults to corlib.
27489 * icall.c: changed 1 call to mono_reflection_type_from_name to match
27492 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27494 * reflection.c: update the parameter table index.
27496 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27498 * domain.c: don't include the mark byte in the string hash.
27500 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27502 * icall.cs: icall for Type.GetTypeCode ().
27503 * verify: a couple of fixes and disabled local initialization checks.
27505 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
27507 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
27509 * debug-helpers.c (mono_method_full_name): print the type of the
27512 * metadata.c (mono_signature_hash): a hash function for signatures
27513 (mono_signature_hash): better hash algorithm
27515 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
27517 * debug-helpers.c (mono_method_full_name): this can now generate
27518 method names with signatures
27520 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
27521 method dont have this pointers.
27523 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
27525 * reflection.c: fixup typebuilder tokens.
27526 * image.c: fix buglet.
27527 * marshal.h: remove whitespace.
27528 * metadata.h, metadata.c: reinstate code that was removed.
27529 * verify.c: handle catch directives and fix another couple of bugs.
27531 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
27533 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
27534 (mono_marshal_get_native_wrapper): make it comp. with the old code
27535 (mono_marshal_get_native_wrapper): support boolean
27536 (mono_marshal_get_managed_wrapper): support more types
27538 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
27540 * class.c (class_compute_field_layout): compute class->blittable attribute.
27542 2002-07-09 Dick Porter <dick@ximian.com>
27544 * threads.c: Make the thread cleaning up cope with threads that
27547 2002-07-08 Radek Doulik <rodo@ximian.com>
27549 * reflection.c (method_encode_code): use non-translated values to
27550 compute finally_start, this fixes exception handling on ppc, yay!
27552 * decimal.h (struct signscale): fix endianess
27554 2002-07-07 Radek Doulik <rodo@ximian.com>
27556 * reflection.c: swap box_val and not val
27558 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
27560 * reflection.c, reflection.h: handle full assembly info in type name.
27561 Handle Type arguments when loading custom attributes.
27562 * icall.c: updated to use new mono_reflection_type_from_name () method.
27564 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27567 (method_from_memberref): also print assembly name when method not found.
27569 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27572 (ves_icall_TypeGetProperties): fixed bug #27473.
27574 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27576 * reflection.c: display image name and token when cannot find the
27577 .ctor for an attribute.
27579 2002-07-05 Martin Baulig <martin@gnome.org>
27581 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
27583 2002-07-04 Dick Porter <dick@ximian.com>
27585 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
27586 compile on mingw. This will cause mingw builds to not wait for
27587 subthreads to terminate after the main thread does. I've lodged a
27588 bug with the mingw developers for them to wrap OpenThread().
27590 2002-07-03 Dick Porter <dick@ximian.com>
27592 * threads.c: Store thread IDs instead of handles, because
27593 GetCurrentThread() returns a pseudohandle and therefore stores
27594 useless values. mono_thread_cleanup() continues checking the
27595 array of threads until it is empty, to cope with subthreads
27596 spawning new threads after the main thread has finished.
27600 * profiler-private.h: Pass the thread ID to thread profiler
27601 functions, instead of a handle
27603 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27605 * verify.c: fixes to make it more usable.
27606 * pedump.c: added --verify code to verify IL code in an assembly.
27608 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27610 * reflection.c: turn errors into warnings to allow compiling corlib.
27612 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
27614 * reflection.c: add special cases to compile corlib.
27616 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27618 * reflection.c: handle properties with only a set method.
27620 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27622 * opcodes.h: add enum with opcodes in opval order.
27624 2002-07-01 Dick Porter <dick@ximian.com>
27627 * object.c (mono_runtime_run_main): Removed unneeded argument
27629 2002-06-28 Martin Baulig <martin@gnome.org>
27631 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
27633 2002-06-27 Dick Porter <dick@ximian.com>
27635 * threads.c: Store the handle in both the parent thread and in the
27636 subthread, to minimise the time between starting a new thread and
27639 2002-06-26 Dick Porter <dick@ximian.com>
27641 * appdomain.c (mono_runtime_cleanup): Close the socket library
27642 after all the threads have finished, not before
27644 2002-06-26 Martin Baulig <martin@gnome.org>
27646 * debug-symfile.c (mono_debug_find_source_location): Added
27647 `guint32 *line_number' argument. If it's not NULL, store the line number
27648 there and return the file name without the line number.
27650 2002-06-25 Dick Porter <dick@ximian.com>
27654 * process.c: Process forking and other support functions
27656 2002-06-25 Dick Porter <dick@ximian.com>
27658 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
27659 things dont happen when the image is closed.
27660 (mono_image_lookup_resource): Walk the resource section looking
27661 for a particular entry
27663 * cil-coff.h: PE resource section decoding
27665 2002-06-25 Dick Porter <dick@ximian.com>
27669 (mono_assembly_foreach): Accessor functions to walk the list of
27671 (mono_assembly_set_main):
27672 (mono_assembly_get_main): Process methods need to know which
27673 assembly is the "main" one
27675 * object.c (mono_runtime_run_main): Record the main assembly
27677 * debug-helpers.c: Fix typo
27679 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
27681 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
27682 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
27684 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27686 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
27688 2002-06-21 Miguel de Icaza <miguel@ximian.com>
27690 * image.c (do_mono_image_open): Initialize reference count,
27691 otherwise we leak the MonoImage.
27693 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
27695 * reflection.c: small tweak to handle self-hosting.
27697 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
27699 * reflection.c: fix type name parse code.
27701 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27703 * reflection.c: break out of the loop.
27704 * image.c: special case corlib.
27706 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27708 * reflection.c: add all the custom attrs at the end to ensure the
27709 ctors have been properly initialized when the attributes are defined
27710 in the current assembly.
27712 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27714 * reflection.c: handle correctly multiple-nested types.
27716 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
27718 * row-indexes.h: fix typos.
27719 * reflection.c: adjust for typos and fix method_def_or_ref
27720 encoding in MethodImpl table.
27722 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27724 * reflection.c: fix entry point patching (thanks Serge!).
27726 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
27728 * verify.c: add check for System.Exception
27730 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27732 * image.c, class.c: minifix for code just c&p'ed.
27733 * reflection.c: warning fix.
27734 * object.h, loader.h, domain.c: load also StringBuilder.
27736 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27738 * marshal.h, marshal.c: some support code to handle complex marshaling.
27740 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27742 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
27743 Better signatures with vtable error dump.
27745 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
27747 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
27749 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
27751 * icall.c (ves_icall_Type_GetField): impl.
27753 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27755 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
27756 to retrieve a marshal description blob for a field or param.
27758 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27760 * reflection.h, reflection.c: change order of nested type emission
27761 to avoid table corruption. The NestedTypes table is sorted.
27762 * icall.c: change order of GetConstructor results to workaround mcs bug.
27764 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27766 * reflection.h, reflection.c: handle field and param marshal
27769 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27771 * icall.c, marshal.c marshal.h: more Marshal class implementation.
27773 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27775 * reflection.c: fix call convention.
27777 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27779 * reflection.h, reflection.c: mono_image_get_memberref_token()
27780 takes a type instead of a class, now. Added
27781 mono_image_get_array_token() to create tokens for the special
27782 multi-dim array methods.
27784 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27786 * assembly.c: handle modules (no assembly table). Split
27787 loading references in its own function.
27788 * class.c: handle moduleref resolution scope.
27789 * image.c, image.h: cache module name in image.
27791 2002-06-07 Martin Baulig <martin@gnome.org>
27793 * reflection.c (mono_image_get_type_info): Only add a class layout entry
27794 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
27796 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27798 * icall.c: more signature fixes that used uint instead of int.
27800 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27802 * reflection.c: fixed signature of field refs.
27804 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27806 * class.c, reflection.c: handle typerefs of nested types
27807 (both on read and when writing files).
27809 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27811 * icall.c: fix method signatures that tried to workaround the previous
27814 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
27816 * debug-helpers.c: fix typo.
27818 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27820 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
27821 rewrote the PE/COFF writing code (our programs are understood by the
27824 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
27826 * gc.c, gc.h, icall.c: weakreference support.
27828 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27830 * Makefile.am, mono-config.c: use $(sysconfdir).
27832 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27834 * icall.c: changed default precision of Double.ToString() to 15.
27835 Fixed memory leak. Unified with Single.ToString.
27837 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
27839 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
27841 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
27843 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
27844 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
27845 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
27848 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27850 * debug-symfile.c, sysmath.c: yet more compilation fixes.
27852 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27854 * reflection.c, socket-io.c: more compilation fixes.
27856 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27858 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
27859 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
27860 unicode.c: warning and compiler compatibility fixes.
27862 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27864 * class.h, metadata.c: fixed warnings/compilation errors.
27866 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27868 * Makefile.am, mono-config.c, mono-config.h: configuration file
27870 * loader.c, loader.h: make Dll mapping configurable at runtime in the
27871 config file. Export methods to insert and lookup mappings.
27873 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
27875 * reflection.c: handle types and boxed objects in custom attr
27878 2002-05-30 Martin Baulig <martin@gnome.org>
27881 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
27883 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
27885 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
27886 to lookup the implmap row for a P/Invoke method.
27887 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
27888 P/Invoke method from the runtime on an as needed basis.
27890 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
27892 * metadata.c (mono_metadata_parse_signature): impl.
27894 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27896 * class.c: handle .pack directive.
27898 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
27900 * object.c: initialize static fields with RVA data.
27902 2002-05-25 Martin Baulig <martin@gnome.org>
27905 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
27907 2002-05-24 Martin Baulig <martin@gnome.org>
27910 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
27911 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
27912 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
27914 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
27916 * object.c: special case string ctros in invoke.
27917 * gc.c: silly whitespace changes.
27919 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
27921 * threadpool.[ch]: impl. a threadpool that can
27922 be used by mint and mono.
27924 2002-05-22 Martin Baulig <martin@gnome.org>
27926 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
27927 The first argument is now a `MonoReflectionModuleBuilder *', the return
27928 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
27929 `methods' field to get the method builder. The `token' argument is the
27932 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
27933 invalid characters instead of g_assert_not_reached()ing. This seems
27934 to be the behaviour of mscorlib.
27936 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
27938 * object.c (mono_runtime_invoke_array): applied patch from Rachel
27939 Hestilow to fix bug #25104
27941 2002-05-21 Martin Baulig <martin@gnome.org>
27943 * debug-symfile.c (mono_debug_find_source_location): New function.
27944 Looks up an IL offset in the line number table and returns the source
27945 location as a string.
27947 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27950 (mono_double_ToStringImpl): changed %f by %g until we have something
27953 2002-05-21 Nick Drochak <ndrochak@gol.com>
27955 * icall.c : Use different name for Math.Pow's icall. Needed to check
27956 parameters first in C#.
27958 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27960 * icall.c, reflection.h: added icall to get info about an event.
27962 2002-05-20 Radek Doulik <rodo@ximian.com>
27964 * object.c (mono_value_box): don't use memcpy for boxing on BIG
27966 (mono_value_box): don't use memcpy for small sizes on
27967 architectures with unaligned access
27969 2002-05-20 Martin Baulig <martin@gnome.org>
27971 * reflection.c (mono_reflection_setup_internal_class): Don't crash
27972 if `tb->parent == NULL'.
27973 (mono_reflection_create_internal_class): New function. This is
27974 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
27977 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
27980 2002-05-19 Martin Baulig <martin@gnome.org>
27982 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
27983 argument to get the length, don't default to the array length.
27985 2002-05-18 Miguel de Icaza <miguel@ximian.com>
27987 * assembly.c (mono_assembly_setrootdir): New function used to
27988 override the MONO_ASSEMBLIES directory.
27990 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27992 * icall.c: ValueType_GetHashCode() initialize local var.
27994 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27996 * reflection.c: sort custom attributes table.
27998 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
28000 * reflection.c: support named args in custom attributes (write support).
28002 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
28004 * reflection.c: fix finally position calculation.
28006 2002-05-15 Radek Doulik <rodo@ximian.com>
28008 * reflection.c: fixed endianess at many places
28010 * icall.c (ves_icall_InitializeArray): comment out debug msg
28012 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
28014 * object.c (mono_unhandled_exception): new function to handle
28015 unhandled exceptions.
28016 (mono_unhandled_exception): call the UnhandledException event.
28017 (mono_runtime_delegate_invoke): impl.
28019 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
28021 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
28022 returns the RVA, not the direct pointer to the data. Handle the case
28023 when the class size is fixed.
28025 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
28027 * reflection.c: fix some endianess issues.
28029 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
28031 * object.c (mono_runtime_invoke): is now able to catch exceptions.
28033 * threads.c (mono_thread_init): added a callback which is invoked
28036 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
28038 * icall.c: make GetHashCode return non-negative values.
28040 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
28042 * object.c, icall.c, gc.c: revert to address-based hashcode.
28044 2002-05-13 Miguel de Icaza <miguel@ximian.com>
28046 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
28048 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
28050 * icall.c, class.c: special case <Module>.
28052 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
28054 * icall.c: fix bug in GetNow().
28056 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
28058 * object.c (mono_runtime_class_init): make sure that we call all
28059 static class constructors.
28061 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
28063 * reflection.c: sort methodsemantics table.
28065 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
28067 * reflection.h, reflection.c: honour init locals setting.
28069 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
28071 * icall.c: copied Double ToStringImpl for Single ToStringImpl
28073 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
28075 * reflection.c: support ContructorBuilders in attribute blob creation.
28077 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28079 * reflection.c: some changes to build a binary that can be run
28080 directly in windows.
28082 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
28084 * loader.c: print a big message when an icall can't be found.
28086 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28088 * string-icalls.c: fix bug 24248.
28090 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
28092 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
28093 icall.c, reflection.h: separate assembly loading by pathname and by
28094 assembly name. Use the MONO_PATH env var to search for assemblies.
28096 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
28098 * assembly.c, image.h: add some support for assemblies
28099 with multiple modules.
28100 * class.c, class.h: export mono_class_from_typeref().
28101 * loader.c: remove duplicated code and use mono_class_from_typeref(),
28104 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
28106 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
28107 documentation says (the ECMA one is correct).
28109 2002-05-02 Dick Porter <dick@ximian.com>
28111 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
28112 Don't name the synchronisation mutex.
28114 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
28117 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
28118 Make the prototypes match.
28119 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
28123 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
28124 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
28125 all systems have tm.tm_zone, so use strftime() with %Z to print
28126 the timezone abreviation into a temp string.
28128 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
28129 rather than mono_array_addr() on a MonoString on Big Endian
28132 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
28134 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
28137 2002-04-30 Dick Porter <dick@ximian.com>
28139 * socket-io.c: Cope with SOCKET being an integer rather than a
28142 * threads.c: Added Thread_free_internal, to deal with thread
28143 handle cleanup. Moved calls to handle_store() and handle_remove()
28144 to start_wrapper(), so each can only be called once. Allocate
28145 synchronisation blocks with GC_malloc(), and use GC finalisation
28146 to close the handles.
28148 * icall.c: added System.Threading.Thread::Thread_free_internal
28150 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28152 * icall.c: support Environment.Exit, CommandLineArgs().
28154 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
28156 * object.c, object.h: added mono_runtime_run_main () and
28157 mono_runtime_get_main_args () for use in System.Environment.
28159 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
28161 * gc.c: fix thinko, enable actual finalization since the jit is now
28164 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
28166 * gc.c, object.c: take into account that an object may be offset wrt the address
28167 returned by GC_malloc().
28169 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
28171 * image.c: handle files without entries in the assembly table (modules).
28173 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
28175 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
28176 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
28177 allowed to be null when it's System.Object class setup.
28179 2002-04-27 Martin Baulig <martin@gnome.org>
28181 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
28182 if `tb->parent == NULL' rather than crashing.
28184 2002-04-28 Nick Drochak <ndrochak@gol.com>
28186 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
28187 calling acos() where asin() should have been called.
28189 2002-04-26 Martin Baulig <martin@gnome.org>
28191 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
28192 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
28193 there's a subdirectory called `System', but we don't want to read that
28194 subdirectory as an assembly.
28196 2002-04-25 Martin Baulig <martin@gnome.org>
28198 * debug-symfile.c: Reflect latest MonoString changes.
28200 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
28202 * rand.c, rand.h: instance method icalls need to have an explicit
28203 this pointer as first argument in the C implementation.
28205 2002-04-25 Nick Drochak <ndrochak@gol.com>
28207 * icall.c: Fix typo in map for GetNonZeroBytes
28209 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
28211 * string-icalls.c : String does now passes unit tests without any
28212 errors, the following changes has been made:
28214 Implemented replace methods.
28215 Renaming of methods to (try) follow the standard.
28216 Fixed compare ordinal
28217 Made all memory allocated directly to function instead of via icall function.
28218 Small performance fix in is_in_array function
28220 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
28222 c (mono_string_Internal_ctor_charp_int_int):
28223 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
28224 sindex < 0, throw ArgumentOutOfRangeException instead of
28225 ArgumentNullException.
28227 Added new check for length == 0, however
28228 I need to make it return String.Empty from the C code.
28230 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
28231 that calculate the length for us here.
28233 (mono_string_Internal_ctor_sbytep_int_int): Replaced
28234 mono_string_new_utf16 with mono_string_new, since value is utf8.
28236 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28238 * object.c: register the object for finalization if needed.
28239 Allocate one more char in the string for the terminating 0 char.
28241 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28243 * class.c, class.h, image.c: check if a type implemenst a destructor.
28244 Use the proper key for array class lookups.
28245 * icall.c: register the icalls in the System.GC class.
28246 * gc.c, gc.h: GC-related functions and icalls.
28248 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28252 * unicode.c: free some strings gotten from mono_string_to_utf8 and
28253 changed a couple of free () by g_free ().
28255 * decimal.c: one-liner in the comments for decimal2string ().
28257 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
28259 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
28261 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
28263 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
28264 * object.c (mono_runtime_invoke_array) : handle null in params
28266 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
28268 * string-icalls.c: fixed bug in split (one off bug)
28270 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
28272 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
28273 * icalls.c: added String::Equals as internal method
28275 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
28277 * threads.c: fixed bug in the double interlocked functions
28279 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
28281 * threads.c: implemented all of the new interlocked icalls.
28282 * string-icalls.c: fix a bug in insert.
28283 * icalls.c: added the icalls for interlocked, removed old string functions.
28285 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
28287 * loader.c: fix off-by-one error when reading argument names.
28289 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28291 * profiler.c: win32 counter implementation (untested).
28292 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
28293 (the latter needs testing and more complete impl. from win32 folks).
28295 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
28297 * object.c: mono_array_new_full workaround mono_array_class_get
28300 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
28302 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
28303 * object.h (mono_string_chars): Changed casting type.
28305 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
28307 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
28308 method signatures to use gunichar2 instead of gint16.
28310 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
28312 * object.h, object.c: domain-specific versions of mono_object_new and
28315 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
28317 * object.c: changed String layout
28319 * string-icalls.c (mono_string_Internal_ctor_chara): added
28320 internal string constructors.
28322 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
28324 * threads.c: pass 'this' to the thread start routine.
28326 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28328 * string-icalls.c: fix IndexOf and LastIndexOf. Now
28329 InternalCompareStr don't call twice mono_string_cmp_char for the last
28330 character. Improved performance in mono_string_cmp_char.
28332 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
28334 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
28335 code into its own library: libmonoruntime.
28337 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
28339 * object.h, object.c: changed array format so that szarrays do not
28340 require a bounds structure.
28341 * icall.c, appdomain.c: support for new szarray format.
28343 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
28345 * metadata.c: compare also the retuns type when comparing signatures:
28346 we didn't do this as an optimization since really overloaded methods
28347 must differ also in the arguments, but this doesn't work with
28348 low-level IL code (or when using explicit conversion operators: see
28349 bug#23498 for an example).
28351 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
28353 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
28355 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
28357 * icall.c: make MonoType::GetElementType its own icall.
28359 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
28361 * icall.c: remove MonoMethod_get_Name().
28362 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
28365 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
28367 * string-icalls.c: optimized a few methods.
28369 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
28371 * icall.c: added all new string internal calls
28372 * string-icalls.c: added, new string internal call implementation.
28373 * object.c: added mono_string_new_size for allocating a string a size
28375 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
28377 * object.c (mono_object_isinst): use the same code as in the
28378 optimized x86 version.
28380 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
28382 * profiler.c: TSC-based timer code (faster and more accurate).
28383 Not hooked up in configure, yet (set USE_X86TSC to 1).
28385 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
28387 * profiler.c, profiler.h: track time spent compiling methods.
28388 * threads.c: track thread creation/destruction.
28390 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
28392 * profiler.c, profiler.h, profiler-private.h: profiling interface
28393 and sample implementation. Moved here so that it can be used also by
28396 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
28398 * reflection.c, reflection.h: keep types and other handles separate in
28399 the hash tables for referred tokens. Add guid for modules.
28401 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
28403 * assembly.c: fix bugs found with valgrind.
28404 * metadata.h, metadata.c: added mono_metadata_guid_heap().
28406 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
28408 * threads: added icall support for getting current domain for
28411 2002-04-13 Martin Baulig <martin@gnome.org>
28413 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
28414 (MonoDebugVarInfo): Added `index' field for register based addresses.
28415 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
28416 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
28417 `MonoDebugVarInfo *params' and `guint32 this_offset' with
28418 `MonoDebugVarInfo *this_var'.
28420 * debug-symfile.c (relocate_variable): New static function to write
28421 a location description for a local variable or method parameter.
28423 2002-04-12 Martin Baulig <martin@gnome.org>
28425 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
28426 stack offset and begin/end scope address of a local variable.
28427 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
28428 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
28429 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
28431 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
28432 Added new relocation types for start/end scope of a local variable.
28434 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28436 * object.h: add mono_object_domain() macro.
28437 * reflection.c: handle typespecs.
28438 * icall.c: MonoMethod::get_Name() implementation.
28440 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28442 * icall.c: String::GetHashCode() icall implementation.
28444 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28446 * icall.c: String::IndexOfAny icall.
28447 * object.c, object.h: make array->max_length more useful.
28448 Intrduced mono_object_class() and mono_string_length() macros.
28450 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28452 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
28453 instead of g_unichar_isdigit.
28455 2002-04-11 Nick Drochak <ndrochak@gol.com>
28457 * icall.c: Implement a simple Double.ToString().
28459 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
28461 * appdomain.h: only io-layer.h is supposed to be included.
28462 * icall.c: explicitly import environ. Fix warning.
28464 2002-04-10 Nick Drochak <ndrochak@gol.com>
28466 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
28467 return true even if it's not Daylight Savings time.
28468 Only return false for the case where the function isn't
28469 implemented for a plaform (read Windows).
28471 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28473 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
28476 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
28478 * mempool.c (mono_mempool_alloc): only use g_malloc when
28479 absolutely necessary.
28481 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
28483 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
28485 * class.c (mono_class_vtable): use domain mempool to allocate vtable
28486 (mono_class_proxy_vtable): use domain mempool
28488 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
28490 * appdomain.h, appdomain.c: split initialization that requires the
28491 execution engine support into mono_runtime_init().
28493 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
28495 * class.c (mono_class_init): don't include vtable inside MonoClass
28496 to save some memory, gather some statistics.
28497 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
28499 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28501 * icall.c: internalcall implementation for ValueType.Equals().
28503 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
28505 * object.c (mono_message_init): moved
28506 (mono_runtime_exec_main): new arch. independent impl.
28507 (mono_runtime_invoke_array): new method - like
28508 mono_runtime_invoke, but you can pass an array of objects.
28509 (mono_remoting_invoke): new arch. independent impl.
28510 (mono_message_invoke): new arch. independent impl.
28511 (mono_runtime_class_init): new arch. independent impl.
28512 (mono_runtime_object_init): new arch. independent impl.
28514 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28516 * metadata.c, object.c, reflection.c: documented the exported
28519 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
28521 * icall.c: simpler code to pass the assembly builder data to corlib.
28522 Implement GetNestedTypes() internalcall.
28524 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28526 * class.c: warn if a type can't be loaded.
28528 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
28530 * image.h: typedef MonoImageOpenStatus
28531 * types.h: removed unused file
28533 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
28535 * icall.c: Enum_ToObject accepts enum value arguments.
28537 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
28539 * class.c: move initialization of properties, events and nested
28540 classes, so that they happen for interfaces, too.
28542 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
28544 * icall.c: cleanup some ugly casts in Array_SetValue*.
28546 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
28548 * icall.c: the values array fro enums is of the correct type, now.
28549 Implement (correctly) getFullName instead of assQualifiedName for
28551 * reflection.h, reflection.c: added mono_type_get_name ().
28553 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
28555 * assembly.c, image.h: for each MonoImage, record from wich assembly
28557 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
28558 Make Type.Assembly work.
28560 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
28562 * debug-symfile.h: use char* instead of gpointer to avoid
28565 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
28567 * icall.c (ves_icall_InternalExecute): impl. FielSetter
28568 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
28570 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
28572 * icall.c (mono_message_init): impl. (code cleanup)
28573 (ves_icall_InternalExecute): impl. FieldGetter
28575 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
28576 defined we call all (non-static)methods through the vtable.
28578 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
28580 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
28581 finalizer even though the memory is still referenced (and the chunk of
28582 memory is not freed).
28584 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
28586 * assembly.c: fix brokeness.
28588 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
28590 * class.c: kill some warnings. Check explicit interface method
28591 implementation also without considering the namespace.
28592 Load also literal strings in static class data.
28594 2002-03-29 Miguel de Icaza <miguel@ximian.com>
28596 * assembly.c (default_assembly_name_resolver): Kill memory leak.
28597 (default_assembly_name_resolver): Make the resolver take the
28598 "base" directory where the assembly was originally defined, so we
28599 can load DLLs that are in the same directory as the assembly that
28600 is being referenced.
28602 2002-03-28 Dick Porter <dick@ximian.com>
28608 * unicode.c: Warning cleanups
28610 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
28612 * object.h, reflection.h: use the correct type instead of MonoObject.
28614 2002-03-28 Martin Baulig <martin@gnome.org>
28616 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
28617 (mono_debug_update_symbol_file): Initialize classes if necessary.
28619 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
28621 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
28622 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
28624 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
28626 * assembly.h: fix function prototype.
28627 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
28628 * mono-endian.h: use const cast.
28630 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
28632 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
28634 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
28636 * loader.c: don't assert when a typeref can't be loaded, give
28637 a chance to the runtime to trow an exception instead.
28638 * loader.h: fix warning.
28640 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
28642 * class.c (mono_class_proxy_vtable): added proxy support
28644 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
28646 * icall.c: removed last of PAL calls, added System.Environment
28647 * file-io.h, file-io.c: MonoIO implementation
28648 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
28650 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
28652 * appdomain.c: do not use the byte marker in ldstr table lookup.
28653 * debug-helpers.c: allow two ':' to separate class and method name.
28654 * object.c: allocate arrays bounds with the GC, too.
28655 * verify: add a few more checks.
28657 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
28659 * reflection.c: output also literal strings. Allocate parameter data
28660 with GC_malloc() (thanks, Martin, for catching this!).
28662 2002-03-26 Martin Baulig <martin@gnome.org>
28664 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
28665 include the `this' offset in the `param_offsets'.
28667 2002-03-25 Martin Baulig <martin@gnome.org>
28669 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
28670 mono_debug_get_class() function to get the classes. Added new
28671 relocation types for arrays and strings.
28672 (mono_debug_get_class): New static function to search in all
28673 referenced assemblies for a metadata token.
28675 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
28677 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
28679 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
28680 hold gc-allocated objects. Make the string heap a stream like the
28681 others. Removed duplicated code when writing stream info.
28682 Added asserts to catch possible buffer overflows. Set the sorted map
28683 for tables that need sorting. Added some documentation.
28685 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
28687 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
28688 for interned strings and vtables.
28690 2002-03-24 Martin Baulig <martin@gnome.org>
28692 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
28693 it in the array since it was created with g_slist_prepend().
28695 2002-03-24 Martin Baulig <martin@gnome.org>
28697 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
28698 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
28699 (mono_debug_method_from_token): Renamed to
28700 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
28701 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
28703 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
28706 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
28708 2002-03-24 Martin Baulig <martin@gnome.org>
28710 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
28711 (mono_debug_method_from_token): New func.
28713 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
28714 New interncall, calls mono_debug_local_type_from_signature().
28715 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
28716 calls mono_debug_method_from_token().
28718 2002-03-23 Martin Baulig <martin@gnome.org>
28720 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
28721 specifies the number of bytes to be converted, not the array size.
28722 Return the number of chars, not the number of bytes.
28723 (ves_icall_iconv_get_chars): The `byteCount' argument
28724 specifies the number of bytes to be converted, not the array size.
28726 2002-03-23 Martin Baulig <martin@gnome.org>
28728 * reflection.h (MonoReflectionSigHelper): New type.
28730 * reflection.c (mono_reflection_sighelper_get_signature_local),
28731 (mono_reflection_sighelper_get_signature_local): New functions.
28733 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
28734 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
28737 2002-03-23 Martin Baulig <martin@gnome.org>
28739 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
28740 is_writeable is set.
28741 (mono_raw_buffer_update): New function to write the modified map
28744 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
28746 * debug-symfile.c (mono_debug_update_symbol_file): Call
28747 mono_raw_buffer_update() when done writing.
28749 2002-03-23 Martin Baulig <martin@gnome.org>
28751 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
28753 * debug-symfile.c: Added support for arguments and local variables.
28755 2002-03-23 Dick Porter <dick@ximian.com>
28757 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
28758 protected by ifdefs, hence breaking the w32 build.
28760 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28762 * object.c: implement is_interned() the right way.
28764 2002-03-21 Martin Baulig <martin@gnome.org>
28766 * debug-symfile.[ch]: New files to handle debugging information
28767 files. There's also support to dynamically update these symbol
28768 files to include machine dependent information.
28770 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
28772 * threads.c (mono_thread_create): new function to create thread
28775 2002-03-20 Martin Baulig <martin@gnome.org>
28777 * icall.c (ves_icall_InternalInvoke): Create a new object if the
28778 method is a constructor.
28779 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
28780 points to ves_icall_InternalInvoke().
28782 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
28784 * file-io.c: Flush shouldn't throw exceptions.
28786 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
28788 * file-io.c: FileStream flush support; FileSetLength now
28789 restores file pointer.
28791 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
28793 * class.c: set image for pointer classes.
28795 2002/03/19 Nick Drochak <ndrochak@gol.com>
28797 * sysmath.c: Forgot one.
28799 2002-03-18 Miguel de Icaza <miguel@ximian.com>
28801 * sysmath.c: Avoid redefining existing names.
28803 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
28805 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
28806 handled by runtime as icall rather than dllimport from libm.so
28807 * file-io.c, file-io.h: fixed handle argument type.
28809 2002-03-18 Dick Porter <dick@ximian.com>
28811 * reflection.c (mono_image_get_type_info): rename interface to
28812 iface, because of "#define interface struct" on windows.
28814 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
28816 * class.c, class.h: rename and export mono_ptr_class_get().
28817 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
28818 * reflection.c, reflection.h, icall.c: better/saner type name
28819 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
28822 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
28824 * class.c (mono_class_init): removed hardcoded GHC_SLOT
28826 * icall.c (ves_icall_InternalInvoke): impl.
28828 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
28830 * reflection.c: output the interface map table, too.
28832 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
28834 * class.c (class_compute_field_layout): separate computation of
28835 static field layout
28837 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
28839 * icall.c: added System.Buffer support.
28840 * file-io.c: moved file icalls from PAL to FileStream.
28842 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
28844 * icall.c (ves_icall_System_Object_GetHashCode): impl.
28846 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
28848 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
28850 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
28852 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
28854 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28856 * debug-helpers.{c,h}: moved here from monograph some useful functions
28857 to locate a method by name/signature in a class or image. Included
28858 also a small and flexible IL disassembler.
28860 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28862 * reflection.c: fixup tokens in methods with small header size, too.
28864 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
28866 * object.c (mono_string_to_utf8): remove assert(!error), instead
28869 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
28871 * icall.c: update to the new mono_Array_class_get interface.
28873 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
28875 * appdomain.c, object.c: Boehm-GC enable.
28876 * icall.c: make get_data_chunk() support split data requests.
28877 Ensure a class is initialized in more cases. Return only the first
28878 property found in GetProperties() or the compiler gets confused.
28879 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
28880 * reflection.h, reflection.c: add fixup mechanism for field and method
28881 tokens. Initialize assembly->typeref in a single place. Output
28882 properties after events. Support custom attributes for events, too.
28883 Typo fix for paramter custom attrs.
28885 2002-03-07 Martin Baulig <martin@gnome.org>
28887 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
28889 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
28891 * class.c (mono_array_class_get): fix. for multi. dim. arrays
28893 2002-03-06 Martin Baulig <martin@gnome.org>
28895 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
28896 non-zero lower bounds. See testcases #F10-#F13.
28898 2002-03-05 Martin Baulig <martin@gnome.org>
28900 * exception.c (mono_get_exception_argument_out_of_range): New exception.
28902 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
28903 ves_icall_System_Array_GetValue(), only calculate the absolute array position
28905 (ves_icall_System_Array_SetValue): Likewise.
28906 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
28907 as argument and does the actual work. This function is used when copying a
28908 multi-dimensional array.
28909 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
28910 now do all the widening conversions of value types.
28911 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
28913 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28915 * class.c: remove some magic numbers and use the smbolic names,
28916 instead. Added init_events() to load event info at class init time.
28917 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
28918 and mono_metadata_methods_from_event().
28919 * reflection.h, reflection.c: added support for writing out the evnets
28920 related information.
28922 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
28924 * reflection.h, icall.c: use a different method (GetInterfaces)
28925 to gather interface info and add isbyref, isprimitive and
28926 ispointer to the ves_icall_get_type_info() return value.
28928 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
28930 * class.h: stared adding support for events.
28931 * icall.c: split find_members implementation. Added debug icall to get
28932 the address of an object.
28933 * reflection.c: handle TypeBuilders in mono_type_get_object().
28935 2002-03-01 Martin Baulig <martin@gnome.org>
28937 * icall.c (ves_icall_System_Array_GetLength): This must throw an
28938 ArgumentOutOfRangeException(), not an ArgumentException().
28939 (ves_icall_System_Array_GetLowerBound): Likewise.
28940 (ves_icall_System_Array_GetValue): Improved argument checking.
28941 (ves_icall_System_Array_SetValue): Improved argument checking.
28943 2002-03-01 Martin Baulig <martin@gnome.org>
28945 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
28946 called with invalid arguments rather than just dying with g_assert().
28947 (ves_icall_System_Array_SetValue): Likewise.
28948 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
28949 raise a NotImplementedException instead.
28950 (ves_icall_System_Array_GetLength): Added argument checking.
28951 (ves_icall_System_Array_GetLowerBound): Added argument checking.
28953 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
28955 * object.h (mono_assert): new macros mono_assert and
28956 mono_assert_not_reached
28958 2002-02-28 Martin Baulig <martin@gnome.org>
28960 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
28961 and "System::String::IsInterned" to "System::String::_IsInterned".
28963 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
28965 * icall.c: remove hacks for typebuilder. Added icall to create a
28966 modified type from a tybebuilder.
28967 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
28968 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
28969 to create a backing MonoClass for a TypeBuilder.
28971 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
28973 * class.c, class.h: more refactoring of class init.
28974 Export mono_class_setup_mono_type() and mono_class_setup_parent().
28976 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
28978 * marshal.c, marshal.h: start of marshaling interface.
28980 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
28982 * icall.c: fix order in assembly qualified name icall.
28984 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
28986 * class.c: do not free str, since we store it in the hash table.
28987 * reflection.h: add label field to MonoILExceptionInfo.
28988 * reflection.c: handle references to more than one assembly. Handle
28989 case when there isn't a module created in the assembly.
28991 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
28993 * class.c: Fix typo. Start refactoring of class init code.
28995 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
28997 * appdomain.c: exit with 1 on error.
28998 * class.c: we already have the name in MonoClassField.
28999 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
29000 MonoStreamHeader instead of an offset of image->raw_metadata.
29002 2002-02-26 Miguel de Icaza <miguel@ximian.com>
29004 * appdomain.c (mono_init): Be even more descriptive about the error.
29006 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
29008 * appdomain.c: give the user an informative message when corlib can't
29011 2002-02-26 Martin Baulig <martin@gnome.org>
29013 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
29014 New icall to get the time zone data.
29016 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29018 * reflection.c: set virtual and raw size of section correctly.
29019 * threads.c: transfer domain information to newly created threads.
29021 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
29023 * class.c: when instancing a class in a domain, load the default
29024 vaules for static fields from the constant table. Fix System.Enum to
29026 * icall.c: implement Object::GetType() internalcall. Implemented
29027 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
29028 Fixed checking of binding flags in find_members().
29029 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
29030 * reflection.c: handle enumerations when writing to the constant
29031 table. Use a different object cache for types.
29034 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
29036 * object.c (mono_object_isinst): fix for arrays
29038 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
29040 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
29042 * object.c: don't use mprotect () and fix intern pool hash table
29043 lookup for big endian systems.
29045 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
29047 * icall.c: change type_is_subtype_of () signature.
29049 2002-02-21 Mark Crichton <crichton@gimp.org>
29051 * rand.c, rand.h: Added random number generator for
29052 System.Security.Cryptography classes.
29054 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
29056 * icall.c: Added System.Security.Cryptography calls.
29058 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
29060 * class.c, icall.c, metadata.c: better support for pointer types.
29061 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
29062 * reflection.c: Add support for getting custom attrs for properties
29063 and simplify some code.
29065 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
29067 * icall.c: change getToken () and add custom attribute GetBlob()helper
29069 * reflection.h: add custom attrs array to the reflection builder structures.
29070 * reflection.c: encode and emit custom attributes for all the relevant
29071 reflection objects. Cache fieldref and methodref tokens. Change
29072 mono_image_create_token() interface to take a MonoDynamicAssembly.
29073 More complete custom attributes decoder. Load custom attributes for
29074 Assembly, Field, Method and Constructor objects, too. Make the
29075 returned array an Attribute[] one, not object[]. Added
29076 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
29077 custom attribute constructor.
29079 2002-02-20 Dick Porter <dick@ximian.com>
29083 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
29084 problem code out for now).
29086 2002-02-19 Radek Doulik <rodo@ximian.com>
29088 * object.c (mono_ldstr): use hash table to avoid multiple swapping
29090 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
29092 * icall.c: register the GetCustomAttributes method.
29093 * object.c, object.h: add mono_string_new_len ().
29094 * reflection.h, reflection.c: added mono_runtime_invoke(),
29095 mono_install_runtime_invoke(). Added
29096 mono_reflection_get_custom_attrs () to load custom attributes and
29097 create the attribute objects.
29099 2002-02-19 Dick Porter <dick@ximian.com>
29100 * threads-dummy-types.c:
29101 * threads-dummy-types.h:
29104 * threads-pthread-types.c:
29105 * threads-pthread-types.h:
29106 * threads-pthread.c:
29107 * threads-pthread.h: Deleted obsolete files
29109 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
29111 * class.c (mono_class_vtable): runtime init the class when we
29112 allocate static class data.
29114 * icall.c (ves_icall_System_Array_SetValue): check for null values.
29116 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
29117 and String - but we will need generic marshalling support in the
29119 (mono_init): set the domain name in a ms compatible way
29121 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
29124 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
29126 * object.c (mono_array_clone): use alloca() instead of g_malloc
29129 * appdomain.c (mono_domain_unload): impl.
29131 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
29133 * appdomain.c, object.c: fix intern pool implementation.
29134 * class.c: fix alignment code.
29136 2002-02-16 Radek Doulik <rodo@ximian.com>
29138 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
29139 and s2 > s1, just copy lower bytes to be compatible with little
29140 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
29141 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
29143 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
29144 force big_endian to be 1 for big endian machines
29145 (ves_icall_iconv_new_decoder): ditto
29147 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
29149 * socket-io.c (convert_sockopt_level_and_name): If the system
29150 doesn't define SOL_IP or SOL_TCP, get them by hand using
29151 getprotobyname() and caching the values (because this could be a
29153 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
29154 Use the appropriate struct when the system does support it. Ie,
29155 not all systems have struct ip_mreqn so use struct ip_mreq when
29158 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
29160 * reflection.c: handle finally clauses.
29162 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
29164 * socket-io.c: use g_snprintf() instead of snprintf.
29166 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
29168 * reflection.c (mono_param_get_objects): Cast second argument to
29169 mono_method_get_param_names to a const char** to silence the
29172 * appdomain.c (mono_domain_assembly_open): Put parens around the
29173 truth statement in the for-loop.
29175 * unicode.c (iconv_convert): Got rid of a compiler warning about
29176 int i being unused when the system has a new iconv.
29177 (iconv_get_length): Same.
29179 * image.c (load_class_names): Cast the second argument to
29180 g_hash_table_insert() to char* to hush compiler warnings about the
29182 (mono_image_open): Same here.
29184 * socket-io.c: Don't conditionally include sys/filio.h or
29185 sys/sockio.h here anymore since we now get them from
29186 io-layer/io-layer.h
29187 (inet_pton): If the system doesn't support inet_aton, implement
29188 using inet_addr and also #define INADDR_NONE if it isn't defined
29191 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
29193 * metadata.c, metadata.h: added function to get packing and size info
29195 * reflection.h, reflection.c: handle field RVA data. Save info about
29196 the table layout if needed. Assign typedef indexes to all the types
29197 before dumping the info about them to avoid forward reference problems.
29199 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
29201 * socket-io.c (convert_sockopt_level_and_name): ifdef
29202 SO_ACCEPTCONN because it is not defined on my system (old debian)
29204 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
29206 * opcode.c: use stddef.h to get NULL.
29208 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
29210 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
29211 for FIONBIO, FIONREAD and SIOCATMARK.
29212 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
29213 define INADDR_NONE and besides, inet_addr() is deprecated and
29214 should not be used. Use inet_pton() instead - it also has the
29215 added bonus that it can easily handle IPv6 addresses as well.
29216 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
29218 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
29220 * decimal.c: remove _MSC_VER conditional.
29222 2002-02-13 Dick Porter <dick@ximian.com>
29225 * icall.c: Internal calls for Blocking, Select, Shutdown,
29226 GetSocketOption and SetSocketOption
29228 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29230 * assembly.cs: better resolver: use it instead of some kludgy
29233 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
29235 * reflection.c: the best way to speed-up the compiler is to avoid
29238 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
29240 * class.c (mono_class_vtable): changed the object layout
29241 (obj->vtable->class).
29242 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
29244 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29246 * assembly.c: look for assemblies in the assembly dir, too.
29248 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29250 * class.c: fix thinko in mono_class_from_type().
29252 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29254 * exception.h, exception.c: added TypeLoadException.
29255 * object.h, object.c: added mono_array_clone ().
29256 * icall.c: handle throwOnError in AssemblyGetType().
29257 Added Array.Clone().
29258 * opcode.h, opcode.c: use a single value for the opcode val.
29259 Compile fix for non-gcc compilers.
29261 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
29263 * opcodes.c, opcodes.h: export interesting info about opcodes.
29265 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
29267 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
29270 * class.c (class_compute_field_layout): set element_class for enums
29271 (mono_class_create_from_typedef): set element_class for normal classes
29273 * icall.c (ves_icall_System_Enum_get_value): impl.
29275 * class.c (mono_class_create_from_typedef): do not set valuetype
29276 flag for System.ValueType and System.Enum
29278 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
29280 * unicode.c (iconv_convert): fix big endian problem.
29282 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
29284 * class.c: add asserts if we are ever going to scribble over memory.
29285 * socket-io.c: not all systems have AF_IRDA defined.
29287 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
29289 * class.c (class_compute_field_layout): do not consider static
29290 fields to compute alignment
29292 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
29294 * appdomain.c (mono_appdomain_get): impl.
29295 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
29297 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
29299 * icall.c: ignore "file://" prefix when loading an assembly.
29301 2002-01-23 Dick Porter <dick@ximian.com>
29305 * Makefile.am: Added socket support
29307 2002-01-23 Miguel de Icaza <miguel@ximian.com>
29309 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
29310 code back. This should return the assemblies that are loaded by
29311 the runtime on behalf of an application domain.
29313 The current implementation is still broken, it just returns every
29314 assembly loaded, but until we get real applications domain this
29317 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
29319 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
29322 2002-01-23 Miguel de Icaza <miguel@ximian.com>
29324 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
29325 the mono_class_from_name lookup.
29326 (ves_icall_get_parameter_info): ditto.
29327 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
29329 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
29331 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
29333 * class.c: load also nested classes on class init.
29334 System.ValueType instance methods gets passed boxed
29335 values, unless methods in derived classed that get a pointer to the
29337 * icall.c: use better name parsing code in GetType().
29338 * image.c, image.h: add mono_image_loaded ().
29339 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
29340 * reflection.c, reflection.h: added mono_reflection_parse_type().
29342 2002-01-22 Veronica De Santis <veron78@interfree.it>
29344 * icall.c : Added mapping of internal calls for Manual and Auto reset events
29345 * threads.c : Added the implementation of internal calls for events
29346 * threads.h : Added prototypes of internal calls for events
29348 2002-01-21 Radek Doulik <rodo@ximian.com>
29350 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
29352 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
29354 * class.c (mono_class_init): set min_align to 1 (instead of 0)
29355 (mono_class_value_size): use min_align
29357 2002-01-20 Dick Porter <dick@ximian.com>
29360 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
29361 so it compiles on w32.
29363 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
29365 * metadata.c (mono_type_stack_size): impl.
29367 * class.c (mono_class_get_field): impl. memberref token
29369 2002-01-16 Veronica De Santis <veron78@@interfree.it>
29371 * icall.h : Added the internal calls mapping for CreateMutex_internal
29372 and ReleaseMutex_internal.
29373 * threads.h : Added the prototype of mutexes internal calls.
29374 * threads.c : Added the implementations of mutexes internal calls.
29376 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
29378 * metaparse.h: removed unused file.
29379 * reflection.c, reflection.h: added stream_data_align () function
29380 to align data in streams and keep stream aligned. Add support for
29381 exception support in method headers.
29383 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
29385 * unicode.c: make iconv_convert () return the number of bytess written
29386 in the output buffer.
29388 2002-01-15 Dick Porter <dick@ximian.com>
29389 * threads.c: Make the runtime's idea of infinite timeouts coincide
29390 with the class library's
29392 Fix a particularly egregious bug in mono_thread_cleanup(). That
29393 code was so utterly bogus it must have been written on a Monday.
29395 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
29397 * reflection.h: add subtypes field to TypeBuilder.
29398 * reflection.c: encode constants for literal fields.
29399 Handle subtypes. Fix user string token (and add a zero byte)
29402 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
29404 * class.c (mono_class_init): bug fix: assign slot numbers for
29407 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29409 * reflection.c: don't try to output a code RVA for abstract methods.
29410 Small fixes for method header format. Output parameter info to the
29411 ParamDef table. Save method overriding info to MethodImpl table.
29412 Fix property support. Allow typedef.extends to be a type in the
29414 * verify.c: fix off-by-one error.
29416 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
29418 * class.c: fix mono_class_from_mono_type () for szarray types.
29419 Remove unused cache check in mono_class_from_type_spec().
29420 * icall.c: *type_from_name () functions handle simple arrays and byref.
29421 * reflection.c: handle byref and szarray types. Handle methods without
29422 body (gets P/Invoke compilation working). Handle types and fields in
29424 * reflection.h: add rank to MonoTypeInfo.
29426 2002-01-10 Dick Porter <dick@ximian.com>
29428 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
29431 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
29433 * icall.c: initialize class in type_from_handle ().
29434 Loop also in parent classes for get_method ().
29435 * reflection.c: properly encode class and valuetype types.
29436 Start on encoding TypeBuilder types. Handle fieldrefs.
29437 Use correct length when registering a user string.
29438 Handle ConstructorBuilder and MonoMethod in get_token ().
29439 Make mono_type_get_object () aware of cached types.
29440 * object.c: back out change to mono_string_new ().
29442 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
29443 * object.c: mono_string_new should return a NULL when the string
29444 passed in is NULL -- not try to deference it.
29446 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
29448 * icall.c: hack to make IsSubType work for TypeBuilders.
29449 * reflection.c: emit constructors before methods.
29450 Retrieve param names in mono_param_get_objects().
29452 2002/01/05 Nick Drochak <ndrochak@gol.com>
29454 * Makefile.am: fix list of headers and sources so automake 1.5
29455 doesn't complain. Removed \# at end of list.
29457 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
29459 * reflection.c: get token for a method ref. Set return type of
29460 constructor to void.
29461 * loader.c: debug message.
29462 * class.c: typo fix.
29464 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
29466 * icall.c: fix array init with rank > 1. FindMembers
29467 loops in parent class as well.
29468 * image.c: do not insert nested types in name cache.
29469 * reflection.c: warning fix.
29470 * reflection.h: add override method (for interface impl).
29472 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
29474 * metadata.c: fix customattr decoding.
29476 2001-12-21 Miguel de Icaza <miguel@ximian.com>
29478 * rawbuffer.cs: Added native Win32 implementation, avoids using
29479 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
29481 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
29483 * class.c: make the low-level routines handle the cache.
29485 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
29487 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
29489 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
29491 * class.c: fix mono_array_element_size() for objects.
29492 * class.h, class.c: add properties to MonoClass and load them
29494 * icall.c: check with isinst() when assigning a value to an array
29495 instead of requiring the classes to match exactly.
29496 Implemented icall for System.Type::GetType().
29497 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
29498 enums. Handle bindingflags when looking for methods and fields.
29499 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
29500 and mono_metadata_methods_from_property().
29501 * reflection.h, reflection.c: added structures for propreties,
29502 parameters and enums. Implemented mono_property_get_object() and
29503 mono_param_get_objects().
29505 2001-12-18 Dick Porter <dick@ximian.com>
29507 * file-io.c: Use mono_string_to_utf16() instead of
29508 mono_string_chars()
29510 * object.c: Added mono_string_to_utf16(), which copies the non
29511 NULL-terminated MonoString into a new double-null-terminated
29514 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
29516 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
29518 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
29520 * file-io.c: raise exceptions if handle is invalid.
29522 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
29524 * assembly.c: yet another check for mscorlib.
29525 * class.c, class.h: load nesting info for classes.
29526 * icall.c: many new functions to support the Reflection classes.
29527 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
29528 * reflection.h, reflection.c: mono_image_create_token(),
29529 mono_assembly_get_object(), mono_type_get_object(),
29530 mono_method_get_object(), mono_field_get_object(): methods to return
29531 objects that parallel the C representation of assemblies, types,
29534 2001-12-11 Dick Porter <dick@ximian.com>
29537 * file-io.c: Internal calls for file IO.
29539 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
29541 * tabledefs.h: missing FileAttributes.
29542 * verify.h, verify.c: use is_valid_string () to simplify and check for
29543 valid strings more correctly. Fix warnings and speeling.
29544 Check more tables: Filed, File, ModuleRef, StandAloneSig.
29545 Check code: branches, maxstack, method calls.
29547 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
29549 * object.c (mono_object_allocate): removed static, so that the jit
29550 can allocate value types.
29552 * icall.c (ves_icall_System_DateTime_GetNow): impl.
29554 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29556 * class.c: init enum types right away and register the
29557 token->MonoClass map in mono_class_create_from_typedef ().
29558 * verify.h, verify.c: first cut of the verifier.
29559 * pedump.c: add --verify switch to verify metadata tables.
29560 * tabledefs.h: add some missing enums.
29562 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
29564 * class.c (mono_install_runtime_class_init): impl.
29565 (mono_class_init): renamed mono_class_metadata_init to
29566 mono_class_init, also removed the metadata_inited flag
29568 * object.c (mono_object_isinst): use faster algorithm
29570 2001-11-30 Radek Doulik <rodo@ximian.com>
29572 * mono-endian.h: reverted last change
29573 added function prototypes
29575 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
29576 add mono-endian.c back
29578 * mono-endian.c: returned back, as Paolo pointed out, it's needed
29579 for unaligned access, I've mistaked it with endianess. I am
29581 (mono_read16): fix reverted endianess
29582 (mono_read64): ditto
29583 (mono_read32): ditto
29585 2001-11-30 Dick Porter <dick@ximian.com>
29587 * exception.c: Implement mono_exception_from_name()
29589 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
29591 * metadata.h, metadata.c: remove params_size and locals_size and their
29592 calculation from the metadata code: they are only usefult to the
29595 2001-11-29 Radek Doulik <rodo@ximian.com>
29597 * object.c (mono_ldstr): swap bytes here, it's probably not the
29598 best place, but works for me now, I'll redo it once I know mono
29599 better, also note that I add PROT_WRITE and don't reset back, also
29600 note that it's only affects big endians, so x86 should be OK
29602 * mono-endian.h (read16): use just glib macros for both endians
29604 * mono-endian.c: removed as glib macros are used in in
29605 mono-endian.h so we don't need to care about endianess for read
29606 macros as glib does that for us already
29608 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
29610 * class.h, class.h: take minimum alignment into consideration so
29611 that the fields of a class remain aligned also when in an array.
29613 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29615 * loader.h, loader.c: add mono_method_get_param_names().
29616 * class.c: 0-init class fields.
29618 2001-11-26 Dick Porter <dick@ximian.com>
29622 * threads.c: New file that handles System.Threading on all platforms
29625 * object.h: Remove the synchronisation struct from MonoObject,
29626 replace it with a pointer that gets initialised on demand
29628 * Makefile.am: Replace all the system-specific threading code with
29629 a single file that uses the new wrapper library
29631 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
29633 * class.c, class.h: add mono_install_trampoline() so that the runtime
29634 can register a function to create a trampoline: removes the ugly
29635 requirement that a runtime needed to export arch_create_jit_trampoline.
29636 * object.h, object.c: added mono_install_handler() so that the runtime
29637 can install an handler for exceptions generated in C code (with
29638 mono_raise_exception()). Added C struct for System.Delegate.
29639 * pedump.c: removed arch_create_jit_trampoline.
29640 * reflection.c: some cleanups to allow registering user strings and
29641 later getting a token for methodrefs and fieldrefs before the assembly
29643 * row-indexes.h: updates and fixes from the new ECMA specs.
29645 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
29647 * class.h, class.c: add enum_basetype field to MonoClass.
29648 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
29649 to get index in the constant table reated to a field, param or
29651 * reflection.h, reflection.c: handle constructors. Set public-key and
29652 version number of the built assembly to 0.
29653 * row-indexes.h: update from new ECMA spec.
29655 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
29657 * class.h, class.c: add a max_interface_id to MonoClass.
29658 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
29659 since it's used to do that. Added mono_type_type_from_obj().
29660 Make GetType() return NULL instead of segfaulting if the type was not
29661 found. Handle simple arrays in assQualifiedName.
29662 * object.h: add a struct to represent an Exception.
29663 * reflection.c: output call convention in method signature.
29664 Add code to support P/Invoke methods and fixed offsets for fields.
29666 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
29668 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
29670 * icall.c: use mono_array_addr instead of array->vector: fixes the
29671 reflection image writing.
29672 * reflection.c: init call convention byte to 0 in method signature.
29673 Encode the property signature. Don't output property-related methods
29674 twice. Really process the properties for a type (don't cast a field to
29675 a property, my mom always told me that).
29676 Fix 64 bit issues in pointer alignment in a different and more
29679 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
29681 * loader.h: Removed type class from MonoDefaults, added monotype
29683 * loader.c: Loaded MonoType, removed loading of Type
29685 * icall.c (my_mono_new_object): Now returns a System.MonoType,
29686 and fills in System.Type._impl with a RuntimeTypeHandle rather
29687 than the actual MonoClass *
29689 (ves_icall_type_from_handle): change from type_class to
29692 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
29695 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
29698 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
29700 (ves_icall_System_Reflection_Assembly_GetType): implemented
29702 (ves_icall_System_MonoType_assQualifiedName): implemented
29704 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
29706 2001-11-09 Miguel de Icaza <miguel@ximian.com>
29708 * assembly.c (mono_assembly_open): Implement a cache for the
29711 (mono_assembly_close): only destroy the assembly when the last
29714 2001-11-09 Dick Porter <dick@ximian.com>
29716 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
29718 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
29720 * class.c (mono_class_metadata_init): bug fix: compute the right slot
29722 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
29724 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
29725 from Martin Weindel.
29726 * object.h: add mono_string_chars ().
29728 2001-11-07 Miguel de Icaza <miguel@ximian.com>
29730 * reflection.c (build_compressed_metadata): Eliminates warnings
29731 and uses 64-bit clean code.
29733 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
29734 (mono_type_equal): Change signature to eliminate warnings.
29736 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29738 * icall.c, loader.c: remove the internalcall array constructors.
29739 Changes to match the new MonoArray structure.
29740 * object.h, object.c: an array object doesn't allocate an extra
29741 vector. Add mono_array_new_full () to create jagged arrays easily.
29743 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
29745 * metadata.h, metadata.c: add mono_metadata_field_info () to
29746 retreive all the info about a field from vairous tables.
29747 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
29748 * class.h, class.c: augment MonoClassField with more info.
29749 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
29750 policy and load a field's RVA if needed.
29752 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
29754 * class.c (mono_class_metadata_init): create a trampoline for all
29755 virtual functions instead of actually compiling them.
29757 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
29759 * class.h, class.c: include name in MonoClassField.
29760 * class.c: fix fundamental type of System.Object and System.String.
29761 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
29763 * icall.c: remove internalcalls for the Reflection stuff that is now
29765 * loader.c: mono_field_from_memberref () implementation.
29766 * mono-endian.c: thinko (s/struct/union/g).
29767 * object.c, object.h: make the mono_string_* prototypes actually use
29768 MonoString instead of MonoObject.
29769 * reflection.c, reflection.h: updates for changes in the reflection
29770 code in corlib: we use C structures that map to the actual C# classes.
29771 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
29772 fat method header if needed and use the info from the ILGenerator for
29773 methods. Handle fields in types. Misc fixes.
29775 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
29777 * class.c (mono_class_metadata_init): bug fix: always allocate
29778 space for static class data
29780 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
29782 * class.c (mono_compute_relative_numbering): use relative
29783 numbering to support fast runtime type checks.
29785 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
29787 * class.c (mono_class_create_from_typeref): added debugging output
29788 to print class name when MonoDummy is returned instead of real class
29790 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
29792 * class.c (mono_class_metadata_init): interface offset table now
29793 contains pointers into the vtable - this is more efficient for the jit
29795 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
29797 * class.c (mono_class_metadata_init): use a temporary vtable (the
29798 old algorithm only worked for the interpreter, but not for the jit)
29800 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
29802 * loader.c (method_from_memberref): use mono_class_get to get the
29803 class of an array instead of using System.Array directly.
29804 (mono_get_method): also add MEMBERREF methods to the method cache
29805 which usefull for arrays.
29807 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
29809 * pedump.c (arch_compile_method): added to compute vtable entry
29811 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
29812 number of interfaces.
29814 * class.h: merged MonoArrayClass into MonoClass
29816 * class.c (mono_class_create_from_typedef): compute the vtable size and
29817 allocate space to include the vtable inside MonoClass
29818 (mono_class_metadata_init): initialize the vtable
29820 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
29822 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
29823 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
29824 * image.c: endian fixes by Laurent Rioux.
29825 * object.h, object.c: rename MonoStringObject to MonoString and
29826 MonoArrayObject to MonoArray. Change some function names to conform to
29827 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
29828 guint16* as first argument, so don't use char*.
29829 Provide macros to do the interesting things on arrays in a portable way.
29830 * threads-pthread.c: updates for the API changes and #include <sched.h>
29831 (required for sched_yield()).
29832 * icall.c: updates for the API changes above.
29833 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
29834 platforms that need them.
29836 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
29838 * class.c: set the correct type for all the fundamental
29839 type when loading the class.
29841 2001-10-05 Dick Porter <dick@ximian.com>
29843 * threads-pthread.c (pthread_mutex_timedlock): Simple
29844 compatibility version for C libraries that lack this call.
29846 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29848 * class.c: MonoTypes stored in MonoClass are stored as
29849 fundamental MonoTypes when the class represents a
29850 fundamental type (System.Int32, ...).
29851 The TypeHandle return by ldtoken is a MonoType*.
29852 * icall.c: ves_icall_get_data_chunk () write out all the
29853 PE/COFF stuff. Implement ves_icall_define_method (),
29854 ves_icall_set_method_body (), ves_icall_type_from_handle ().
29855 * image.c: properly skip unknown streams.
29856 * loader.h, loader.c: add type_class to mono_defaults.
29857 * metadata.c, metadata.h: export compute_size () as
29858 mono_metadata_compute_size () with a better interface.
29859 Typo and C&P fixes.
29860 * pedump.c: don't try to print the entry point RVA if there is no entry point.
29861 * reflection.c, reflection.h: many cleanups, fixes, output method
29862 signatures and headers, typedef and typeref info, compress the metadata
29863 tables, output all the heap streams, cli header etc.
29864 * row-indexes.h: typo fixes.
29866 2001-10-04 Dick Porter <dick@ximian.com>
29868 * object.h: Add a synchronisation mutex struct to MonoObject
29870 * object.c (mono_new_object): Initialise the object
29871 synchronisation mutexes
29873 * icall.c: System.Threading.Monitor internal calls
29875 * threads-pthread.h:
29876 * threads-pthread.c: System.Threading.Monitor internal calls
29878 * threads-types.h: New file, includes the system-specific thread
29881 * threads-pthread-types.h:
29882 * threads-pthread-types.c: New files, handle pthread-specific
29883 synchronisation types
29885 * threads-dummy-types.h:
29886 * threads-dummy-types.c: New files of dummy support for
29887 thread-specific types
29891 * pedump.c: include mono-endian.h not endian.h
29893 * Makefile.am: More threads files.
29894 Name mono-endian.h not endian.h
29896 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
29898 * Makefile.am, reflection.h, reflection.c: move here the reflection related
29899 stuff and implement a few more bits.
29900 * icall.c: a field needs to be dereferenced twice. Do not use the same
29901 name for two variables in the same scope.
29902 * image.c, image.h: cleanups.
29904 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
29906 * class.c (mono_class_metadata_init): bug fix: compute the right size
29908 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
29910 * icall.c: implemented some of the Reflection internalcalls.
29911 * image.c, image.h: start writing out the PE/COFF image.
29912 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
29913 that does the reverse than decode_blob_size ().
29914 * object.c: use mono_metadata_encode_value (). Move here
29915 temporary implementation of mono_string_to_utf8 ().
29916 * rawbuffer.c: make malloc_map static.
29918 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29920 * metadata.c: fix type comparison for arrays.
29921 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
29922 Added a couple of new classes to monodefaults.
29923 * icall.c: added a couple of Reflection-related internalcalls.
29924 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
29925 Added a byval_arg MonoType to MonoClass.
29927 2001-09-28 Dick Porter <dick@ximian.com>
29930 * threads-pthread.h:
29931 * threads-pthread.c: Implemented internal calls for
29932 LocalDataStoreSlot operations. Applied mutexes around all shared
29933 data. Reworked the thread creation and Start() operations to
29934 avoid a race condition.
29937 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
29939 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
29941 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
29943 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
29945 * class.c, loader.c: warn and return NULL instead of erroring out.
29946 * icall.c: added System.AppDomain::getCurDomain().
29947 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
29949 2001-09-25 Dick Porter <dick@ximian.com>
29951 * threads-pthread.h:
29952 * threads-pthread.c: Implemented timed thread joining and added
29953 System.Threading.Thread::Join_internal internal call
29955 * icall.c: Added System.Threading.Thread::Join_internal internal call
29958 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
29960 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
29962 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
29963 mono_string_intern () to implement the semantics of the ldstr opcode
29964 and the interning of System.Strings.
29965 * icall.c: provide hooks to make String::IsIntern and String::Intern
29968 2001-09-23 Dick Porter <dick@ximian.com>
29971 * threads-dummy.h: New files of dummy threading routines
29973 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
29974 support code based on system specifics
29976 Rename PTHREAD_LIBS to THREAD_LIBS
29978 2001-09-23 Dick Porter <dick@ximian.com>
29980 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
29981 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
29983 (mono_thread_init): Set up a Thread object instance to return when
29984 the main thread calls Thread.CurrentThread
29985 (mono_thread_cleanup): Wait for all subthreads to exit
29987 * icall.c: New internal calls for System.Threading.Thread::Sleep
29988 (including Schedule) and CurrentThread
29990 * threads.h: New file, to insulate thread-specific stuff from the
29993 2001-09-21 Dick Porter <dick@ximian.com>
29995 * threads-pthread.h:
29996 * threads-pthread.c: New file, for handling pthreads-style
29997 threading support. Start() now starts a new thread and executes
29998 the ThreadStart delegate instance.
30000 * icall.c: Added the internalcall for
30001 System.Threading.Thread::Start_internal
30003 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
30005 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
30007 * loader.c: work around the different signatures for delegates
30008 constructors csc generates in compiled code vs the ones compiled in mscorlib.
30010 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
30012 * class.h, class.c: add mono_class_get_field_from_name ().
30013 * *: Fix C comments and other ANSI C issues.
30015 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
30017 * endian.h, assembly.c: fix some endianness issues.
30019 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
30021 * loader.h, load.c: add delegate_class to mono_defaults.
30022 Handle runtime provided methods in mono_get_method ().
30024 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
30026 * loader.c (mono_get_method): use pinvoke for internal call
30028 * icall.c: use pinvoke for internal call
30030 * loader.c (method_from_memberref): set the method name
30032 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
30034 * metadata.c: help the compiler generate better code for
30035 mono_class_from_mono_type ().
30037 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
30039 * class.c (mono_class_metadata_init): delayed computing of the
30040 class size to mono_class_metadata_init ()
30042 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
30044 * class.c, class.h: add an interfaces member to MonoClass.
30045 * image.c, image.h: add assembly_name field to MonoImage
30046 from the assembly table.
30047 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
30049 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
30051 * class.c: Handle Array in mono_class_from_mono_type ().
30052 * metadata.c, pedump.c: some endian fixes.
30054 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
30056 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
30057 * metadata.c: fix small problem introduced with the latest commit.
30059 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
30061 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
30062 We don't need a MonoMetadata pointer anymore to compare signatures in
30063 mono_metadata_signature_equal (), update callers.
30064 Reduced memory usage an number of allocations for MonoMethodHeader and
30065 MonoMethodSignature.
30067 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
30069 * metadata.c: added compare for szarray.
30071 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
30073 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
30074 and add a couple more types to it and mono_defaults. Give an hint on
30075 classes that need implementing in our corlib and are referenced
30078 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
30080 * class.h, class.c: keep track if a class is also an Enum.
30081 * loader.c: Implement a couple more types for use in libffi
30082 marshalling. Gives better diagnostics when failing to dlopen
30083 a library. Set method->klass for P/Invoke methods, too.
30085 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
30087 * class.c, class.h: add a MonoType this_arg to MonoClass that
30088 represents a pointer to an object of the class' type that
30089 can be used by the interpreter and later the type cache.
30090 Add best guess alignment info for valuetype objects.
30092 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
30094 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
30095 into MonoType: one less level of indirection and allocation and
30096 simplifies quite a bit of code. Added cache for MonoTypes that are
30097 used frequently, so that we don't need to allocate them all the time.
30099 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
30101 * class.c (mono_class_create_from_typedef): System.Enum is also a
30102 value type, although it does not derive from System.ValueType
30103 (maybe a bug in the ms compiler?)
30105 * metadata.c (mono_type_size): return the right size for value types
30107 * loader.c (mono_get_method): only initialize method header if not abstract
30109 * class.c (mono_class_from_mono_type): use mono_default values.
30111 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
30113 * *: use MonoClass pointers instead of <type_tokens>
30115 * class.h: new flag: metadata_inited.
30117 * class.c (mono_class_metadata_init): impl.
30118 (mono_class_instance_size): impl.
30119 (mono_class_data_size): impl.
30121 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
30123 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
30124 MonoClass now has the name and name_space fields.
30125 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
30126 mono_get_method () takes and optional MonoClass as argument.
30127 Removed mono_typedef_from_name() and added mono_class_token_from_name()
30128 instead that takes advantage of a map from class names to typedef
30129 tokens in MonoImage.
30131 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
30133 * metadata.c: zero is not a valid alignment boundary.
30134 Merge MONO_TYPE_VOID in default decoding code.
30136 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
30138 * image.h: merged MonoMetadata into MonoImage
30140 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
30141 identify the type of elements.
30143 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
30145 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
30146 * cil-coff.h: split MonoMSDOSHeader and add size info.
30147 * image.c: add some consistency checks.
30148 * metadata.c: fix row size computation: one programmer
30149 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
30150 add explanation for the locator routine.
30151 Fix decoding of size in method header.
30153 2001-08-20 Miguel de Icaza <miguel@ximian.com>
30155 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
30156 (g_concat_dir_and_file): Bring g_concat_dir_and_file
30157 function from gnome-libs. This uses the right path separator
30158 based on the OS, and also works around a bug in some systems where
30159 a double slash is not allowed.
30160 (default_assembly_name_resolver): Use g_concat_dir_and_file
30161 (mono_assembly_open): ditto.
30163 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
30165 * metadata.c (mono_metadata_signature_equal): impl.
30167 * *: void is now a realy MonoType (instead of using NULL)
30169 * metadata.c (do_mono_metadata_parse_type): use
30170 mono_metadata_parse_type to parse void value.
30172 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
30174 * metadata.c, metadata.h: in the signature and method header store
30175 only the space required for holding the loca vars and incoming arguments.
30177 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
30179 * metadata.c (do_mono_metadata_parse_type): treat void like any
30180 other type (instead of assigning NULL);
30182 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
30184 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
30186 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
30188 * image.c (do_mono_image_open): added a cache for arrays.
30190 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
30192 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
30193 decode a single column from a row in a metadata table and changes
30194 to take advantage of it in the typedef locator (gives a nice speed up).
30195 Store offset info for function params.
30197 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
30199 * image.h (MONO_IMAGE_IS_CORLIB): removed
30201 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
30203 * assembly.c: how could mono_assembly_close () had ever worked?
30204 * metadata.c, metadata.h: provide offset info for local vars.
30205 Implement mono_type_size () to take care of alignment as well
30206 as size (it was mono_field_type_size in cli/class.c before).
30208 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
30210 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
30212 * assembly.h (CORLIB_NAME): set to corlib.dll
30214 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
30216 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
30218 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
30219 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
30220 tokentype.h: massive namespace cleanup.
30222 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
30224 * metadata.h, metadata.c: decode exception clauses when parsing method header.
30226 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
30228 * metadata.c (mono_metadata_free_type): added check for type !=
30229 NULL (void) before calling mono_metadata_free_type()
30231 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
30233 * metadata.h, row_indexes.h: added header with enumerations to use
30234 to index in the columns from tables in metadata and to decode coded
30235 tokens: we should start using this instead of embedding magic numbers
30238 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
30240 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
30241 Move metadata_t info from cli_image_info_t to MonoImage, where
30242 it's easily accessible. Changed all the uses accordingly.
30243 Added the method and class caches to MonoImage.
30244 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
30245 and mono_metadata_decode_value () signature to be more consistent
30246 with the other parse functions (and simplify code). Taken advantage
30247 of zero-length array allocation with GCC. Removed reduntant (and
30248 wrong) MonoFieldType struct and use MonoParam instead. Changed
30249 mono_metadata_parse_field_type () to use common code for parsing.
30250 Added mono_metadata_typedef_from_field () and
30251 mono_metadata_typedef_from_method () to lookup a typedef index from a
30252 field or method token.
30253 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
30255 2001-07-23 Miguel de Icaza <miguel@ximian.com>
30257 * metadata.c (mono_metadata_parse_field_type): Implement.
30258 (do_mono_metadata_parse_type): Split engine from
30259 mono_metadata_parse_type, so that we can create smaller structures
30260 for things that just have one pointer to the MonoType (look at
30263 2001-07-20 Miguel de Icaza <miguel@ximian.com>
30265 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
30266 as Jan Gray found out, it is incorrect.
30268 2001-07-18 Miguel de Icaza <miguel@ximian.com>
30270 * assembly.c: Implement asssembly loading. This loads an image
30271 and loads all the referenced assemblies. Come to think of it, we
30272 could always do lazy loading of the assemblies.
30274 * image.c (mono_image_open): Keep loaded images in a hashtable.
30276 * image.h (MonoImage): Add reference count.
30278 2001-07-17 Miguel de Icaza <miguel@ximian.com>
30280 * assembly.c (mono_assembly_open): Keep track of the file name in
30281 case the assembly has no ASSEMBLY table.
30283 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
30286 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
30288 * metadata.c, metadata.h: decode local vars in method header
30289 parse function. Change callers accordingly.
30291 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
30293 * metadata.h, cil-coff.h: protect against multiple inclusion.
30294 Added some new structures to hold information decoded from metadata:
30295 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
30296 and relevant decoding/free functions.
30297 * metadata.c: implement decoding functions. Add warning for out of bounds
30298 index in mono_metadata_locate(). Implement mono_get_method () to retreive
30299 all the info about a method signature and invocation. Remove check on
30300 uninitialized local var in parse_mh() and fix memory leak.
30302 2001-07-12 Miguel de Icaza <miguel@ximian.com>
30304 * metadata.h: More macros.
30306 * tokentype.h: New file.
30308 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
30310 * assembly.c: added a consistency check and initialize
30311 some structures with g_new0().
30312 * metadata.c: fixed a couple more bugs in table size computation
30313 and add other checks for out-of bound access to metadata.
30315 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
30317 * metatada.c: fix bugs computing table sizes. Spew a
30318 warning when index in string heap is out of bounds.
30320 2001-07-04 Miguel de Icaza <miguel@ximian.com>
30322 * metadata.h: Add a couple of macros to manipulate tokens.
30324 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
30326 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
30327 cli_section_tables).
30329 2001-07-01 Miguel de Icaza <miguel@ximian.com>
30331 * metadata.c (mono_metadata_user_string): New function, provides
30332 access to the UserString heap.
30334 2001-06-27 Miguel de Icaza <miguel@ximian.com>
30336 * metadata.c: Add inline documentation.
30338 2001-06-26 Miguel de Icaza <miguel@ximian.com>
30340 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
30343 2001-06-22 Miguel de Icaza <miguel@ximian.com>
30345 * typeattr.h: New file, TypeAttribute flags.
30347 2001-06-21 Miguel de Icaza <miguel@ximian.com>
30349 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
30350 mono_assembly_ensure_section): Section loading code.
30351 (load_section_tables): Load the sections.
30353 * mono/metadata/metadata.c (mono_metadata_locate_token,
30354 mono_metadata_locate): Functions to locate the information
30355 definition given a token or a table and an index.
30356 (mono_metadata_compute_table_bases): New.
30357 (compute_size): New function to compute the sizes of the various
30360 * mono/metadata/metadata.h: Finish listing the different index
30363 * mono/metadata/pedump.c: Improve to dump new information.
30365 2001-06-19 Miguel de Icaza <miguel@ximian.com>
30367 * mono/metadata/metadata.c: Entered all the tables matching
30370 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2