1 2009-02-10 Zoltan Varga <vargaz@gmail.com>
3 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
4 lazily initialize the native wrapper cache.
5 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
6 cache, since they are different from the normal wrappers.
8 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
10 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
11 AOT compiled native wrappers.
13 2009-02-09 Geoff Norton <gnorton@novell.com>
16 * security-core-clr.c: Allow enabling core-clr from the embedding
19 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
21 * socket-io.c: when requesting all the local ips, if there are no
22 interfaces up and running, MS returns 127.0.0.1.
24 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
26 * mono-perfcounters-def.h: processor time is an inverse time.
29 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
31 * socket-io.c: an empty host name returns the list of local IPs.
32 Fixes bug #386637 part 1/2.
34 2009-02-07 Zoltan Varga <vargaz@gmail.com>
36 * verify.c (mono_class_interface_implements_interface): Call
37 mono_class_setup_interfaces ().
38 (merge_stacks): Ditto.
40 2009-02-06 Zoltan Varga <vargaz@gmail.com>
42 * class.c (mono_class_setup_interfaces): New function to lazily initalize
44 (mono_generic_class_get_class): Don't initalize klass->interfaces.
45 (mono_generic_class_get_class): Ditto.
47 2009-02-06 U-QUACK\miguel <miguel@quack>
49 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
50 they live in security.c
52 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
53 another bit from Paolo's code.
55 2009-02-06 Zoltan Varga <vargaz@gmail.com>
57 * object.c (build_imt_slots): Add a small optimization to avoid inflating
58 methods which will be discarded by add_imt_builder_entry ().
60 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
63 * loader.c: Add a statistics for the size of the memberref signature cache.
65 * loader.c (find_cached_memberref_sig): New helper function.
66 (cache_memberref_sig): Ditto.
68 * loader.c: Cache the result of parsing memberref signatures, since otherwise
69 they will be parsed again for every generic instantiation, leading to unbounded
72 2009-02-05 Zoltan Varga <vargaz@gmail.com>
74 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
75 parameters of generic methods.
77 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
78 after the original method is copied to the inflated method.
79 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
81 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
82 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
84 * class.c metadata.c: Update after the changes above.
86 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
88 * metadata-verify.c: Simplified error handling and added
89 section table validation.
91 2009-02-05 Zoltan Varga <vargaz@gmail.com>
93 * class-internals.h (MonoClassExt): New structure containing rarely used
95 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
96 through a new 'ext' field.
98 * class.c (mono_class_alloc_ext): New helper function to allocate
101 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
103 2009-02-05 Mark Probst <mark.probst@gmail.com>
105 * object.c (mono_object_get_virtual_method): Properly inflate
106 generic methods. Fixes #472692.
108 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
110 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
111 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
112 for the parent type, the created type must be ready to be used on a generic
114 We fill this_arg/byval_arg if the parent is a generic instance to make sure
115 we won't have duplicated entries in generic_inst_cache.
119 2009-02-05 Miguel De Icaza <miguel@novell.com>
121 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
122 replace with plain BSD per the comments on the bug MONO77637.
124 2009-02-05 Zoltan Varga <vargaz@gmail.com>
126 * class.c (mono_class_get_generic_class): New accessor function.
127 (mono_class_get_generic_container): Ditto.
129 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
130 fields, similar to the ones in MonoMethod.
132 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
133 (mono_class_create_from_typedef): Set klass->is_generic if needed.
135 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
137 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
138 the same information as element_class->byval_arg.
140 * class.c reflection.c: Remove references to class->byval_arg.
142 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
143 klass->enum_basetype directly.
145 * verify.c metadata.c object.c icall.c reflection.c: Use
146 mono_class_enum_basetype () instead of accessing klass->enum_basetype
149 2009-02-04 Miguel de Icaza <miguel@novell.com>
151 * icall-def.h: Remove internal calls for sockets when
152 DISABLE_SOCKET is defined, file system writing features when the
153 OS only support reading and not writing data and Policy support if
154 the Policy is disabled.
156 * image.c (do_mono_image_open): Apply Paolo's patches for using
157 mono_file_map_ APIs here.
159 * assembly.c: Add support for platforms to avoid prefix
162 2009-02-04 Zoltan Varga <vargaz@gmail.com>
164 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
167 * class.c (mono_class_inflate_generic_class): New helper function.
169 * class.c: Use mono_class_inflate_generic_class in a few places. Add
170 statistics for inflated methods/classes.
172 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
174 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
175 the call is made from Delegate.CreateDelegate () for the invoke method of
178 * loader.c: Add a statistics for the memory occupied by inflated signatures.
180 * metadata.c (mono_metadata_signature_size): New helper function.
182 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
185 * metadata.c (inflated_method_in_image): Avoid calling
186 mono_method_signature () if the method does not already have a signature.
188 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
190 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
191 valuetype is compatible with target type, check by inheritance as a
192 VT is not really compatible with System.ValueType, for example.
194 * verify.c (do_invoke_method): Improve error message.
196 * verify.c (do_box_value): If boxing a nullable, use the type argument
199 * verify.c (do_newobj): Improve error message.
203 2009-02-03 Miguel de Icaza <miguel@novell.com>
205 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
207 2009-02-03 Mark Probst <mark.probst@gmail.com>
209 * generic-sharing.c: Don't hold domain lock when calling
210 instantiate_other_info(). Fixes #471958.
212 * domain-internals.h, loader.c: Describe locking policy of domain
215 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
217 * verify.c (mono_delegate_signature_equal): Make it possible to check
218 first-arg-bound delegates to static method.
220 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
221 static methods with the first arg bound.
225 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
227 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
230 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
231 under strict mode. Any type, when boxed can be seen as a reference type.
235 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
237 * object.h: The lower bound of an array is a signed integer value.
238 Introduce mono_array_lower_bound_t typedef. It should be used instead of
239 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
241 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
242 calculate the upper bound.
246 2009-02-02 Miguel de Icaza <miguel@novell.com>
248 From Paolo's work, refactored, cleared up:
250 * threadpool.c, icall.c: ifdef code that requires a working socket
253 * metadata.c (mono_metadata_field_info): Do not attempt to return
254 a value from a function declared as void.
256 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
257 from the console stack.
259 * assembly.c: use strrchr instead of rindex.
261 * class.c, object.c, marshal.c, icall.c, reflection.c: include
262 alloca.h on systems that have it.
264 * environment.c: Avoid code that uses stuff from
267 * appdomain.c: Include sys/time.h.
269 * console-io.c: include sys/ioctl.h if it is available.
271 2009-02-03 Zoltan Varga <vargaz@gmail.com>
273 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
275 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
278 * marshal.c: Set mb->skip_visibility instead of setting it on the method
279 after it was created and cached, as the later is not thread safe.
281 2009-02-02 Zoltan Varga <vargaz@gmail.com>
283 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
284 called while the debugging module is not initialized. Fixes #471669.
286 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
288 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
292 2009-02-02 Mark Probst <mark.probst@gmail.com>
294 * generic-sharing.c (lookup_or_register_other_info): Make sure the
295 loader lock is not taken while the templates lock is held. Fixes
298 2009-02-02 Mark Probst <mark.probst@gmail.com>
300 * metadata.c (type_in_image): Added a check to fix a monodis
303 2009-02-02 Zoltan Varga <vargaz@gmail.com>
305 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
308 * object.c (mono_runtime_invoke_array): Ditto.
310 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
311 freeing wrappers of dynamic methods.
313 * loader.c (mono_free_method): Call it. Fixes #463323.
315 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
316 methods taking vtype/byref arguments, to fix yet another bug caused by
317 the sharing of runtime invoke wrappers. Partly fixes #471259.
319 2009-02-01 Zoltan Varga <vargaz@gmail.com>
321 * debug-mono-symfile.c (check_line): Return NULL instead of returning
322 <first file in file table>:1 when the IL offset does not have an associated
325 2009-01-31 Zoltan Varga <vargaz@gmail.com>
327 * mono-debug.c (mono_debug_lookup_locals): New function to return local
328 variable info for a method.
330 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
332 2009-01-30 Jb Evain <jbevain@novell.com>
334 * pedump.c: reuse code from monodis to make sure pedump honors
335 MONO_PATH, which is needed to verify net_2_1 assemblies.
337 2009-01-29 Zoltan Varga <vargaz@gmail.com>
339 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
340 there is no line number info.
342 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
344 Avoid some MonoType allocations
345 * reflection.c (mono_reflection_initialize_generic_parameter):
346 Reuse MonoType from param->pklass rather than allocating one.
347 (mono_dynamic_image_free): Update to changes.
349 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
351 Rearrange some code to improve consistency
352 * reflection.c (mono_reflection_setup_generic_class): Move body ...
353 (mono_reflection_initialize_generic_parameter): ... here.
355 2009-01-28 Zoltan Varga <vargaz@gmail.com>
357 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
358 with type constraints as an experiment.
360 * boehm-gc.c (on_gc_notification): Update mono_stats.
362 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
364 Avoid some allocations
365 * class-internals.h (_MonoGenericInst::type_argv): Convert from
366 pointer to tail array to avoid extra allocation.
367 * metadata.c (free_generic_inst): Update to changes.
368 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
371 2009-01-27 Zoltan Varga <vargaz@gmail.com>
373 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
374 return TRUE if the two type objects are the same.
376 2009-01-26 Zoltan Varga <vargaz@gmail.com>
378 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
379 (mono_class_native_size): Use klass->marshal_info->min_align instead of
380 klass->min_align, since klass->min_align contains the managed alignment,
381 while the native alignment can be different, like for longs on x86.
384 * class-internals.h (MonoMarshalType): Add a min_align field.
386 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
388 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
391 2009-01-26 Zoltan Varga <vargaz@gmail.com>
393 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
394 some comments about the usage of the used_regs field.
396 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
399 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
401 * appdomain.c: return NULL instead of throwing FileNotFoundException
402 when LoadAssembly() fails.
404 2009-01-23 Mark Probst <mark.probst@gmail.com>
406 * metadata.c (mono_metadata_generic_param_equal): Only compare the
407 image if the owner is NULL. Fixes the AOT failures.
409 2009-01-23 Zoltan Varga <vargaz@gmail.com>
411 * metadata.c (mono_metadata_load_generic_params): Initialize the
412 MonoGenericParam structure using memset so the image field is initialized
415 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
417 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
420 2009-01-21 Zoltan Varga <vargaz@gmail.com>
422 * class.c (mono_class_setup_vtable_general): In the generic instance
423 optimization, set method->slot for abstract virtual methods. Fixes part of
426 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
428 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
429 which signals that the unloading has started but all appdomain services must
432 * appdomain.c (mono_domain_unload): The initial state for unloading now
433 is unloading_start and we switch to unloading after the managed call to
434 AppDomain::DomainUnload has finished.
436 The new unloading state has to be created because managed code in the
437 DomainUnload event can depend on things like the threadpool still working.
438 The domain must remain fully functional while the event executes.
440 This shown as an issue due to Process::WaitForExit, which waits for
441 async reads of stdout and stderr to complete. Since those are processed
442 in the threadpool the code deadlocks because the DomainUnload callback
443 waits for the async read finished event, which should have been set by a
444 threadpool job but has been discarded due to the domain been in unload
447 2009-01-21 Mark Probst <mark.probst@gmail.com>
449 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
452 2009-01-21 Mark Probst <mark.probst@gmail.com>
454 * reflection.c (resolve_object): For fields, inflate the class and
455 then get the field in the inflated class.
457 2009-01-20 Mark Probst <mark.probst@gmail.com>
459 * object-internals.h (struct _MonoException): Added a comment
460 explaining the new use of trace_ips.
462 2009-01-20 Mark Probst <mark.probst@gmail.com>
464 * generic-sharing.c (inflate_other_data): Inflate array methods
467 * loader.c, class-internals.h: Rename search_in_array_class() to
468 mono_method_search_in_array_class() and make it non-static.
470 2009-01-19 Zoltan Varga <vargaz@gmail.com>
472 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
473 Hopefully fixes #458168.
475 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
477 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
478 as it is performed elsewhere.
480 Code is contributed under MIT/X11 license
482 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
484 * mono-perfcounters-def.h: Add counters for asp.net requests total and
486 * object.c (mono_raise_exception): Increment the exceptions total
487 counter when an exception is thrown.
488 * class-internals.h: Add a location for storing the total number of
489 asp.net requests served.
490 * mono-perfcounters.c: Implement update support for asp.net counters
491 from the class libraries. Implement read support for asp.net counters
492 and exceptions total counter.
494 2009-01-19 Zoltan Varga <vargaz@gmail.com>
496 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
497 accessing klass->methods. Fixes #467385.
499 2009-01-18 Zoltan Varga <vargaz@gmail.com>
501 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
502 for byval arguments without an [Out] attribute. Fixes #467212.
504 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
505 Fix compilation under android.
507 * sgen-gc.c: Instead of scanning gray objects after all roots have been
508 processed, scan them directly after they are copied, to achieve better locality
511 * socket-io.c: Applied patch from Koushik Dutta
512 (koush@koushikdutta.com). Disable IPV6 when running under android.
514 2009-01-18 Zoltan Varga <vargaz@gmail.com>
516 * icall.c (ves_icall_InternalExecute): Add write barriers.
518 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
521 * sgen-gc.c: Implement write barriers in IL code.
523 2009-01-17 Geoff Norton <gnorton@novell.com>
525 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
527 2009-01-17 Geoff Norton <gnorton@novell.com>
529 * image.c: When unloading the image->references table, there can be gaps
530 in it. Ensure that we iterate every entry to avoid leaking assembly references
531 when unloading an appdomain.
533 2009-01-16 Zoltan Varga <vargaz@gmail.com>
535 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
536 speed up ptr-in-nursery checks.
538 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
539 threads_lock () to prevent deadlocks.
541 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
542 does not need to be scanned during minor collections, since writes to it
543 must use write barriers.
545 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
547 * metadata-verify.c: Add pe nt header verification.
549 2009-01-15 Zoltan Varga <vargaz@gmail.com>
551 * gc.c: Fix a few warnings when using SGEN.
553 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
555 * metadata-verify.c: Add pe optional header verification.
557 2009-01-15 Zoltan Varga <vargaz@gmail.com>
559 * sgen-gc.c: Add support for user defined marker functions, used by
560 MonoGHashTable to avoid registering a GC root for every hash node.
562 2009-01-14 Zoltan Varga <vargaz@gmail.com>
564 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
565 non-pinned roots into separate hashes to avoid having to traverse them
566 in functions which are only interested in one kind.
568 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
570 * metadata-verify.c: Add pe header machine field verification.
572 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
574 * metadata-verify.c: Add pe header size verification.
576 2009-01-14 Zoltan Varga <vargaz@gmail.com>
578 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
579 using the GC, they don't contain references.
581 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
583 2009-01-13 Geoff Norton <gnorton@novell.com>
585 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
586 AppDomains created on the native side can be cleaned up on the native side.
588 2009-01-13 Geoff Norton <gnorton@novell.com>
590 * appdomain.c: Ensure that we call mono_context_init for the embedding api
591 as well as the managed api.
593 2009-01-13 Geoff Norton <gnorton@novell.com>
595 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
596 with a MonoAppDomain initialized against it.
598 2009-01-13 Zoltan Varga <vargaz@gmail.com>
600 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
602 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
604 * marshal.c: Avoid setting the exception clauses after a method has been entered
605 into the wrapper caches. Fixes #465700.
607 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
609 (mono_mb_create_method): Set the clauses from the method builder.
611 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
613 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
614 Patch from Makoto Kishimoto.
616 2009-01-13 Zoltan Varga <vargaz@gmail.com>
618 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
619 encoding them as ROOT_DESC_COMPLEX.
620 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
622 2009-01-12 Zoltan Varga <vargaz@gmail.com>
624 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
625 no longer point to the nursery.
627 * sgen-gc.c: Add a few comments/FIXMEs.
629 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
631 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
632 initialization of the various _method variables thread safe. Fixes
635 2009-01-12 Mark Probst <mark.probst@gmail.com>
637 * domain.c, domain-internals.h: Remove the shared_generics_hash
638 and its lookup functions.
640 2009-01-12 Bill Holmes <billholmes54@gmail.com>
642 * socket-io.c: Fixing the MSVC build.
644 Code is contributed under MIT/X11 license.
646 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
648 * metadata-verify.c: Add pe header watermark verification.
650 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
652 * metadata-verify.c: Add lfanew verification.
654 2009-01-12 Jb Evain <jbevain@novell.com>
656 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
657 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
659 2009-01-10 Zoltan Varga <vargaz@gmail.com>
661 * socket-io.c: Fix the build.
663 * environment.c: Fix an #ifdef.
665 2009-01-09 Zoltan Varga <vargaz@gmail.com>
667 * threadpool.c (async_invoke_thread): Handle the wait function returning
668 WAIT_IO_COMPLETION as well.
669 (async_invoke_io_thread): Ditto.
671 2009-01-09 Bill Holmes <billholmes54@gmail.com>
673 * threads.c: Fixing the Windows build.
675 Code is contributed under MIT/X11 license.
677 2009-01-09 Zoltan Varga <vargaz@gmail.com>
679 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
681 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
682 the thread to wait again.
684 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
686 * metadata-verify.c: Initial skeleton of the metadata verifier.
688 * pedump.c: Add support for the metadata verifier.
690 * verify-internal.h: Export the whole assembly metadata verifier function.
692 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
694 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
696 2009-01-09 Zoltan Varga <vargaz@gmail.com>
698 * Makefile.am: Upgrade dtrace-prelink.sh location.
700 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
702 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
703 well. Otherwise the shutdown deadlock that happens on unix will can happen
705 If the main thread code finishes too fast it's possible that the finalizer
706 thread won't have executed yet, won't record itself as the finalizer thread
707 and the shutdown sequence will wait on it forever.
709 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
711 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
714 2009-01-08 Miguel de Icaza <miguel@novell.com>
716 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
717 Robert Jordan for pointing this out.
719 2009-01-08 Christian Prochnow <cproch@seculogix.de>
722 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
723 ves_icall_System_IO_DriveInfo_GetDriveType.
725 2009-01-07 Miguel de Icaza <miguel@novell.com>
727 * icall.c: Wrap calls to mono_strtod in CriticalSection
728 invocations when using eglib, to work around #464316.
730 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
732 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
733 return value of GetCurrentDirectory to never access unitialized memory.
735 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
737 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
738 return value of GetCurrentDirectory and expand the buffer if needed.
742 2009-10-07 Tom Hindle <tom_hindle@sil.org>
744 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
745 Adding a call to mono_init_com_types.
747 Code is contributed under MIT/X11 license.
749 2009-01-07 Geoff Norton <gnorton@novell.com>
751 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
752 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
753 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
754 be the value of the ip buffer.
756 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
758 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
759 interfaces_packed here.
761 Fixes part of #463294.
763 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
765 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
767 Fixes part of #463294.
769 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
771 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
772 is a boxed complex as well.
774 Fixes part of #463294.
776 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
778 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
779 control if a methodspec should be created for the generic method definition from external assemblies.
780 Caching of methodspec is done using the handleref hash table.
784 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
786 * loader.c (find_method): When searching the interfaces of a class
787 check the transitive closure of implemented interfaces.
791 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
793 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
795 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
797 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
798 interfaces calculation to fill_valuetype_array_derived_types.
800 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
801 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
804 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
805 interfaces for valuetypes if needed.
807 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
808 for their basetype as well. Types are array expanded if rank is > 0.
812 2008-12-30 Bill Holmes <billholmes54@gmail.com>
814 * socket-io.h : Changing the signature of
815 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
818 * icall-def.h : Changing the signature of
819 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
821 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
822 For Windows only. Avoid blocking when calling accept by
823 querying for a connection via select. The loop also queries
824 the thread state every 1000 micro seconds for the thread
825 stop state. This will avoid the process hanging on shutdown
826 when using a TcpChannel that is never connected to.
828 Code is contributed under MIT/X11 license.
830 2008-12-30 Marek Safar <marek.safar@gmail.com>
832 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
834 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
836 * class.c (get_implicit_generic_array_interfaces): Extract common
837 code to a helper function making it a lot easier on the eyes.
839 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
841 * class.c (get_implicit_generic_array_interfaces): If the internal
842 enumerator is an interface inflate System.Object instead of itself.
846 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
848 * object.c (mono_runtime_invoke_array): Don't assert with
849 byref nullable types.
851 * marshal.c (mono_marshal_get_runtime_invoke): To handle
852 byref nullables we unbox the object and store it on the
854 We can't use the boxed object since it is the T of Nullable<T>
855 and the boxed representation of a nullable it's underlying type
857 We could cheat and create a boxed nullable and use the same
858 machinery of other byref VTs but this feels like a hack and
859 using the stack has the bonus of reducing heap pressure.
863 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
865 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
870 2008-12-19 Bill Holmes <billholmes54@gmail.com>
872 * icall-def.h : Adding an internal call definition for
873 System.Environment.internalBroadcastSettingChange.
875 * icall.c : Adding a Windows only implementation to broadcast a
876 WM_SETTINGCHANGE when an environment variable has changed.
878 Code is contributed under MIT/X11 license.
880 2008-12-19 Mark Probst <mark.probst@gmail.com>
882 * class.c, class-internals.h: Made
883 mono_class_has_parent_and_ignore_generics() non-static.
885 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
887 * image.c: deal with the mmap failing when loading an image.
889 2008-12-17 Geoff Norton <gnorton@novell.com>
891 * threadpool.c: Ensure that the io_queue_lock is initialized
892 in all circumstances, as we always attempt to cleanup against it.
894 2008-12-17 Miguel de Icaza <miguel@novell.com>
896 * icall.c (ves_icall_System_Environment_get_Platform): For
897 compatibility reasons for existing client code we will keep
898 returning 4 for a while.
900 For how long will depend on the documentation being updated, and
901 for us to give client code a chance to be updated.
903 This reverts the original decison on #433108 since we did not
904 catch roughly 33 instances of the broken code in our own source
905 code base, we did not catch failures on the buildbots, and QA did
906 not bring this as a problem.
908 Only today I found some customer's code breaking due to our own
909 class libraries not being fully updated and tracked it down to
910 this change. I am reverting it because if we could not even get
911 our story straight in our own code base, how can we hope that our
912 end user code be fixed?
914 As of this morning, our Wiki page that documents how to detect
915 Unix had not been fixed.
917 2008-12-16 Zoltan Varga <vargaz@gmail.com>
919 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
921 * class.c (mono_class_get_fields): Handle loading errors.
923 2008-12-12 Mark Mason <mmason@upwardaccess.com>
925 * 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.
927 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
929 * mono-perfcounters.c: avoid warning.
931 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
933 * reflection.c (ensure_runtime_vtable): Work on generic instances and
934 make sure all interfaces have MonoClass::interface_id set.
936 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
937 method table is property set.
939 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
941 * class.c: New function mono_class_setup_interface_id that setup
942 MonoClass::interface_id if needed.
944 * class-internals.h: Export new function.
946 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
948 * class.c: Add code to sanity check the vtable after setup_vtable_general
951 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
953 * icall.c: make Assembly.GetExecutingAssembly work properly when
954 reflection is used to invoke the method.
957 2008-12-11 Mark Probst <mark.probst@gmail.com>
959 * metadata/generic-sharing.c: Look for constraints in all type
960 arguments, not just the first one.
962 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
964 * appdomain.c: return the correct CodeBase for an Assembly instance
965 that was loaded from the shadow-copy directories.
968 2008-12-10 Zoltan Varga <vargaz@gmail.com>
970 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
972 * sgen-gc.c (check_object): New debugging helper function.
974 * object.c: Fix calls to mono_value_copy_array ().
976 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
978 * class.c (mono_class_setup_fields): If working on an inflated class
979 first check if the generic definition did init with success.
983 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
985 pedump.c (main): Fix a warning.
987 2008-12-10 Bill Holmes <billholmes54@gmail.com>
989 * object-internals.h : Adding a definition for
990 MonoReflectionComVisibleAttribute.
992 * marshal.c (cominterop_com_visible) : Method added to check the
993 ComVisible attribute of a class.
995 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
996 cominterop_raise_hr_exception added to consolidate common code
997 to raise hr exceptions.
999 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
1000 if a managed class should support IDispatch.
1003 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
1004 Added additional checks for managed object when getting
1005 an IDispatch interface.
1007 Code is contributed under MIT/X11 license.
1009 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1011 pedump.c (main): Handle mono_get_method () returning NULL.
1013 2008-12-09 Zoltan Varga <vargaz@gmail.com>
1015 * marshal.h: Fix a warning.
1017 2008-12-09 Bill Holmes <billholmes54@gmail.com>
1019 * marshal.c : Adding cominterop_release_all_rcws to release all
1020 runtime callable wrappers held by the runtime.
1022 * marshal.h : Adding declaration for cominterop_release_all_rcws.
1024 Code is contributed under MIT/X11 license.
1026 2008-12-09 Zoltan Varga <vargaz@gmail.com>
1028 * metadata.c (mono_image_alloc_lock): New helper function.
1029 (mono_image_alloc0_lock): Ditto.
1031 * metadata.c: Use the alloc_lock () helper functions for allocating
1032 memory from the image mempool.
1034 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1036 * class.c (mono_class_from_generic_parameter): Document it's
1037 locking behavior. Fix double checked locking here, we stored in
1038 param->pklass a partially initialized MonoClass and no membar was used.
1040 2008-12-05 Marek Habersack <mhabersack@novell.com>
1042 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
1043 (3) functions are present in the C library use them to do the
1044 job. If they are absent, make sure that the sum of int_part and
1045 dec_part is rounded before returning. This is necessary due to the
1046 division of dec_part by the power of 10 before the final addition
1047 is performed - if the result is not rounded in some cases it will
1048 yield invalid results.
1050 2008-12-04 Zoltan Varga <vargaz@gmail.com>
1052 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
1053 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
1054 instruction instead of a pointer constant.
1056 2008-12-03 Zoltan Varga <vargaz@gmail.com>
1058 * loader.c (mono_method_get_header): Do most of the work outside the
1059 loader lock, to avoid assembly load hook deadlocks.
1061 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
1062 (mono_metadata_parse_type_full): Ditto.
1064 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1066 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
1067 Make the stack depth fixed. Ensure proper argument passing to the backtrace
1068 funtions. Finally, use a lock to produce well ordered output.
1070 The lock looks silly, as all calls to the corlib mempool should be guarded
1071 with the loader lock, but for some reason this fact doesn't help.
1073 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
1075 2008-12-02 Mark Probst <mark.probst@gmail.com>
1077 * socket-io.c: 64 bit big-endian fixes.
1079 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1081 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
1082 targets that require strict compatibility between the types.
1084 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
1085 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
1086 Kill the strict argument and create a new one valuetype_must_be_boxed.
1088 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
1089 state that all valuetypes must be boxed.
1093 2008-11-29 Kornél Pál <kornelpal@gmail.com>
1095 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
1096 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
1098 Contributed under MIT/X11 license.
1100 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
1102 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
1103 the inflate_generic_type machinery should handle it.
1105 This avoids a crash when the field's flags is zero and it's type is
1107 What happens is that mono_metadata_parse_type_full will see that opt_attrs
1108 is zero and will return one of the cached built-in primitive types. Since
1109 those types live in read-only memory, the code that copies it crashes.
1111 2008-11-28 Mark Probst <mark.probst@gmail.com>
1113 * object.c: Don't put function descriptors into generalized IMT
1116 2008-11-28 Mark Probst <mark.probst@gmail.com>
1118 * class.c: Enable generic code sharing on PPC64.
1120 2008-11-27 Mark Probst <mark.probst@gmail.com>
1122 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
1125 * generic-sharing.c: Allocate the method template slists from the
1126 image mempool so it doesn't leak.
1128 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1130 * class.c (generic_array_methods): Release the linked list.
1132 2008-11-27 Mark Probst <mark.probst@gmail.com>
1134 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
1135 invocation to g_utf16_to_utf8().
1137 2008-11-26 Mark Probst <mark.probst@gmail.com>
1139 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
1140 arguments on big endian archs.
1142 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1144 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
1145 the type name (test added in corlib).
1147 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1149 * pedump.c: initialize perf. counters. Fixes a segv.
1151 2008-11-25 Martin Baulig <martin@ximian.com>
1153 * mono-debug-debugger.c
1154 (mono_debugger_runtime_invoke): Return the exception object if an
1155 exception was thrown. Visual Studio displays the exception object
1156 in the locals window.
1158 2008-11-24 Mark Probst <mark.probst@gmail.com>
1160 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
1163 2008-11-24 Mark Probst <mark.probst@gmail.com>
1165 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
1166 MONO_TYPE_U are sizeof (gpointer), too.
1168 2008-11-24 Mark Probst <mark.probst@gmail.com>
1170 * marshal.c (mono_type_native_stack_size): Fixed size and
1171 alignment for reference types.
1173 2008-11-23 Mark Probst <mark.probst@gmail.com>
1175 * class.c (mono_class_generic_sharing_enabled): Disable generic
1176 code sharing for PPC64.
1178 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1180 * icall.c (mono_method_get_equivalent_method): Make sure
1181 method->klass->methods is inited before looping over it.
1183 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1185 * object.c: when calling ExecuteAssembly in a newly created domain,
1186 the configuration file and application base are already set up.
1187 Bug #446353 take 2 fixed.
1189 2008-11-20 Zoltan Varga <vargaz@gmail.com>
1191 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
1192 Fixes #444715. Fix a warning.
1194 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
1196 * appdomain.c: write the full path of the assembly to the .ini file
1197 created when "shadow-copying"
1200 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1202 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
1203 if signature==FALSE.
1205 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1207 * marshal.h : Fix the cygwin build.
1208 marshal.c:12442: undefined reference to `_IID_IMarshal'
1210 Code is contributed under MIT/X11 license.
1212 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1214 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
1215 free threaded marshaler when QueryInterface is called on a COM callable
1216 wrapper requesting the IMarshal interface.
1218 Code is contributed under MIT/X11 license.
1220 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1222 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
1224 * reflection.c (mono_type_get_object): Special case the very common
1227 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
1230 2008-11-13 Bill Holmes <billholmes54@gmail.com>
1232 * process.h : Adding method declaration for
1233 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1235 * process.c : Adding implementation for
1236 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1238 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
1239 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1241 Code is contributed under MIT/X11 license.
1243 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
1245 * appdomain.c (unload_thread_main): Clean up threadpool by
1246 calling mono_thread_pool_remove_domain_jobs.
1248 * domain-internals.h (struct _MonoDomain): Add new fields to
1249 help coordinate the cleanup of the threadpool.
1251 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
1252 that cleans up the threadpool of all jobs associated with an appdomain.
1253 It does that by cleaning up the queues and making sure all active
1254 threads are accounted.
1256 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
1257 unloaded or in the process of. Take this is such way that there is
1258 no race condition between another thread starting the unload and the
1259 current thread acknowledging it.
1261 * threadpool.c (async_invoke_thread): Same.
1263 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
1264 firing the new thread.
1266 * threadpool.c (start_tpthread): Same.
1268 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
1270 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
1272 2008-11-06 Jonathan Chambers <joncham@gmail.com>
1274 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
1275 Add support for DuplicateHandle.
1277 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
1278 Add support for DuplicateHandle.
1280 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
1281 Add support for DuplicateHandle.
1283 Code is contributed under MIT/X11 license.
1285 2008-11-06 Mark Probst <mark.probst@gmail.com>
1287 * class-internals.h: Make min_align into a whole byte.
1289 * class.c: Set min_align for SIMD types to 16.
1291 2008-11-05 Geoff Norton <gnorton@novell.com>
1293 * attach.c: Default the attacher to enabled for all cases including
1296 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1298 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
1301 2008-11-04 Mark Probst <mark.probst@gmail.com>
1303 * monitor.c, monitor.h: New function for querying offsets of
1304 members of MonoThreadsSync.
1306 2008-11-04 Zoltan Varga <vargaz@gmail.com>
1308 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
1309 to speed up this function and to avoid the boundless memory growth caused by
1310 the signature_dup () calls.
1312 2008-11-02 Zoltan Varga <vargaz@gmail.com>
1314 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
1317 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
1320 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
1322 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
1325 * domain-internals.h: made mono_set_private_bin_path_from_config()
1327 * object.c: call the above function after setting the configuration
1328 file path for the root domain.
1331 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
1333 * assembly.c: when the assembly is loaded from an absolute path, end
1334 basedir with a directory separator.
1337 2008-10-30 Mark Probst <mark.probst@gmail.com>
1339 * monitor.c (mono_monitor_get_fast_enter_method): If
1340 CompareExchange is not available, don't create the fastpath
1341 instead of asserting. (The method is missing in the 1.1 profile.)
1343 2008-10-30 Mark Probst <mark.probst@gmail.com>
1345 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
1347 * monitor.c, monitor.h: Code for generating Monitor.Enter and
1348 Monitor.Exit IL fastpaths.
1350 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1352 * class.c (mono_class_create_from_typedef): Added Vector2ul.
1354 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1356 * class.c (mono_class_create_from_typedef): Added Vector2l.
1358 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
1360 * class.c (mono_class_create_from_typedef): Added Vector2d.
1362 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1364 * appdomain.c: translate \ into / for cache_path.
1365 * domain-internals.h: new mono_is_shadow_copy_enabled().
1366 * icall.c: (fill_reflection_assembly_name) do the same path
1367 manipulations that get_code_base does.
1368 (get_code_base) use mono_is_shadow_copy_enabled.
1370 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1372 * appdomain.c: shadow-copied assemblies go to CachePath +
1373 ApplicationName when both are set. DynamicBase has nothing to do with
1377 2008-10-26 Zoltan Varga <vargaz@gmail.com>
1379 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
1380 STANDALONESIG table.
1382 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
1383 standalone signatures.
1385 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
1386 comparison code: instead of comparing the signatures using a custom
1387 equals function, transform them to a common signature and compare that. This
1388 works better with AOT.
1390 2008-10-25 Zoltan Varga <vargaz@gmail.com>
1392 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
1394 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
1395 call for generic instances.
1396 (mono_class_setup_properties): Call setup_properties () before accessing
1399 * class.c (mono_class_get_virtual_methods): New helper function to iterate
1400 over the virtual methods of a class using metadata if possible, avoiding the
1401 creation of MonoMethod's for non-virtual methods.
1403 * class.c (mono_class_setup_vtable_general): Rewrite this to use
1404 get_virtual_methods () to iterate over the virtual methods of classes.
1406 2008-10-25 Martin Baulig <martin@ximian.com>
1408 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
1410 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1412 * class.c (mono_class_create_from_typedef): Added Vector4i.
1414 2008-10-24 Mark Probst <mark.probst@gmail.com>
1416 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
1417 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
1418 special-casing applies to eliminate the call completely.
1420 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1422 * class.c (mono_class_create_from_typedef): Added Vector8s.
1424 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
1426 * class.c (mono_class_create_from_typedef): Added Vector16sb.
1428 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
1430 * icall.c: get rid of annoying warning.
1432 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
1434 * threadpool.c: in 1.x, if you change the background status of the
1435 threadpool thread, it's not reset.
1436 Remove unnecessary calls to SetState.
1438 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1440 * threadpool.c: asynchronously create a set of idle threads upon first
1441 use of the threadpool. SetMinThreads will now start the appropriate
1442 number of idle threads if they are not already running. The default is
1443 1 threadpool thread per CPU. Increased the maximum number of threads
1446 2008-10-22 Martin Baulig <martin@ximian.com>
1448 Revert r116521 from Zoltan, it breaks the debugger:
1450 * class.c (mono_class_get_virtual_methods): New helper function to iterate
1451 over the virtual methods of a class using metadata if possible, avoiding the
1452 creation of MonoMethod's for non-virtual methods.
1454 * class.c (mono_class_setup_vtable_general): Rewrite this to use
1455 get_virtual_methods () to iterate over the virtual methods of classes.
1457 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1459 * threads.c: when creating a threadpool thread, set its state to
1461 * threadpool.c: reset the background state of a threadpool thread
1462 after finishing each work item
1465 2008-10-22 Zoltan Varga <vargaz@gmail.com>
1467 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
1469 * class.c (mono_class_setup_vtable_general): Add an optimized version for
1470 generic instances which works by inflating the methods in the container
1473 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
1474 variant which doesn't make a copy if no inflation was done.
1475 (mono_class_setup_fields): Use it.
1477 * metadata.c (mono_metadata_get_shared_type): New helper function to
1478 return a shared instance of a given MonoType.
1480 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
1481 a copy of most non-generic types.
1483 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1485 * threadpool.c: remove one more GetSystemInfo () call.
1487 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
1489 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
1490 use the code in mono-proclib.h to get processor information.
1492 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1494 * appdomain.c: fixed the logic that determines whether assemblies in a
1495 directory are "shadow-copied" or not. Bug #433483 fixed.
1497 2008-10-22 Zoltan Varga <vargaz@gmail.com>
1499 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
1502 2008-10-21 Zoltan Varga <vargaz@gmail.com>
1504 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
1507 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
1508 reflection.c: Use mono_field_get_name () for accessing a field's name.
1510 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
1513 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
1516 * loader.c (find_method_in_class): Reenable the metadata optimization by
1517 not using it for generic instances.
1519 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
1520 data/def_type fields from MonoClassField into a separate structure.
1521 (struct MonoClassField): Remove data/def_type fields.
1522 (struct _MonoClass): Add a 'field_def_values' array to store the default
1523 values/RVA for fields.
1525 * class.c reflection.c: Update after the changes.
1527 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
1528 for accessing field->data.
1530 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
1532 * loader.c (find_method_in_class): Revert the last change for now as
1533 it breaks Mono.C5 unit tests.
1535 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
1536 'field_generic_types' and 'field_objects' which contain the information
1537 previously stored in MonoInflatedField.
1538 (MonoInflatedField): Delete.
1539 (struct _MonoClassField): Delete 'generic_info' field.
1541 * reflection.c: Store the information which was previously in
1542 field->generic_info in MonoDynamicGenericClass instead.
1544 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
1545 MonoClassField changes.
1547 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
1549 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
1550 store the value inside the data array of the MonoMethodWrapper.
1551 This saves memory, is faster and fixes the lifetime issues (methods
1552 were never removed from the hash previously). May also fix bug#436996.
1554 2008-10-21 Zoltan Varga <vargaz@gmail.com>
1556 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
1557 generic instances, compute the type from the generic definition instead of
1558 looking in field->generic_info.
1560 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
1561 for inflated fields, the only user was get_fieldref_token () which no
1564 * class.c (mono_class_init): Revert the last change as it seems to cause
1567 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
1568 bytes on 64 bit platforms.
1570 * object.c (mono_class_create_runtime_vtable): Fix a warning.
1572 * object.c (mono_class_create_runtime_vtable): Don't initalize
1573 field->data/field->def_type here, it is done lazily by
1574 mono_class_get_field_default_value ().
1576 * icall.c (ves_icall_get_enum_info): Call
1577 mono_class_get_field_default_value () instead of directly accessing
1578 field->data and field->def_type.
1580 * object.c (get_default_field_value): Ditto.
1582 * class.c (mono_field_get_data): Ditto.
1584 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
1585 call for generic instances.
1587 * loader.c (find_method_in_class): If klass != from_class, then inflate
1588 the method with the context of from_class, since the caller assumes this.
1590 2008-10-20 Zoltan Varga <vargaz@gmail.com>
1592 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
1593 for accessing method->slot.
1595 2008-10-20 Cedric Vivier <cedricv@neonux.com>
1597 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
1599 2008-10-19 Zoltan Varga <vargaz@gmail.com>
1601 * class.c (mono_method_get_vtable_index): Use
1602 mono_method_get_vtable_slot () for accessing method->slot.
1604 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
1605 accessing klass->methods.
1607 * class.c (mono_method_get_vtable_slot): New helper function.
1608 (mono_class_get_vtable_entry): Ditto.
1609 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
1610 accessing method->slot.
1612 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
1613 method to get_inflated_method ().
1615 * class.c (mono_class_get_inflated_method): New helper method to obtain
1616 a method of an inflated class without calling setup_methods ().
1617 (mono_class_get_cctor): Use get_inflated_method.
1619 * generic-sharing.c (mono_class_get_method_generic): Ditto.
1621 * marshal.c image.c: Lazily create all the marshal caches.
1623 * image.c (mono_image_init): Move initialization of runtime_invoke
1624 caches to marshal.c.
1626 * marshal.c (get_cache): New helper function to lazily initialize a
1628 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
1630 * debug-helpers.c (mono_method_full_name): Include generic arguments.
1632 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
1634 * loader.c: fixed check for interface type.
1636 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1638 * appdomain.c: check for NULL setup before it's referenced.
1641 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1643 * class.c: remove the unused old vtable setup code.
1645 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1647 * class.c: don't depend on interface order in
1648 setup_interface_offsets (bug #435777).
1649 * reflection.c: sort the InterfaceImpl table (patch from
1650 Jb Evain <jbevain@novell.com>).
1652 2008-10-13 Zoltan Varga <vargaz@gmail.com>
1654 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
1655 the low level assemblies lock.
1657 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
1659 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
1660 object.c, reflection.c, socket-io.c, threads.c: introduced
1661 mono_framework_version () to return the major framewrok version,
1662 changed the code that was using more complex patterns to use it.
1663 Return the correct value for PlatformID for OSX.
1665 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
1667 * icall-def.h, process.h, process.c: added an icall to get info about
1668 processes using mono-proclib.
1670 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
1672 * mono-perfcounters.c: use the mono-proclib functions to
1673 access process information.
1675 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1677 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
1678 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
1679 reflection.c: remove rawbuffer usage: mmap support is more sanely
1680 provided by utils/mono-mmap.
1682 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
1684 * gc.c: use posix semaphores when possible so that
1685 mono_gc_finalize_notify() is signal safe.
1687 2008-10-11 Zoltan Varga <vargaz@gmail.com>
1689 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
1690 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
1691 be #ifdef-ed out, the linker will remove the rest.
1693 * marshal.c: Implement DISABLE_COM.
1695 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
1697 2008-10-11 Miguel de Icaza <miguel@novell.com>
1699 * locales.c (string_invariant_compare_char): Optimization: do not
1700 call g_unichar_type unless we actually need the information.
1702 2008-10-10 Mark Probst <mark.probst@gmail.com>
1704 * object.c, class-internals.h: Also create remoting trampolines
1705 for generic methods. Pass the domain to the remoting trampoline
1706 creation function, too.
1708 2008-10-10 Zoltan Varga <vargaz@gmail.com>
1710 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
1712 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1714 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
1717 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1720 * locales.c: remove the use of g_strdown. Fixes bug #322313.
1722 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1724 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
1725 for the least possible amount of time (extending the fix in r113458).
1727 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1729 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
1731 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1733 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
1734 as possible simd intrinsic types.
1735 Optimized the test to check for the common prefix first.
1737 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
1739 * class.c: back out part of a broken optimization committed on
1740 May 23th (bug #433908).
1742 2008-10-09 Mark Probst <mark.probst@gmail.com>
1744 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
1745 Win32. Should fix #432388 for most cases until we have the new
1748 2008-10-08 Zoltan Varga <vargaz@gmail.com>
1750 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
1751 instead of using inst->id so the hash is stable for AOT.
1753 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1756 * icall.c: create a .ini file for shadow-copied assemblies that
1757 contains the location of the original assembly. Use this to return the
1758 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
1759 Also fix the number of '/' for windows when returning the CodeBase.
1762 2008-10-07 Bill Holmes <billholmes54@gmail.com>
1764 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
1766 Code is contributed under MIT/X11 license.
1768 2008-10-07 Bill Holmes <billholmes54@gmail.com>
1770 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
1771 if if the class vtable needs initialized.
1773 Code is contributed under MIT/X11 license.
1775 2008-10-07 Bill Holmes <billholmes54@gmail.com>
1777 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
1778 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
1779 STRING->BSTR, and CLASS->INTERFACE.
1781 Code is contributed under MIT/X11 license.
1783 2008-10-07 Marek Habersack <mhabersack@novell.com>
1785 * sysmath.h: changed the declaration of the
1786 ves_icall_System_Math_Round2 icall by adding an extra
1787 away_from_zero parameter.
1789 * sysmath.c (ves_icall_System_Math_Round2): added support for
1790 away from zero rounding. The icall now takes an extra boolean
1791 parameter to signal that away from zero operation is requested.
1793 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1795 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
1796 the delegate klass so it can work with full-aot.
1797 (mono_marshal_get_delegate_end_invoke): Ditto.
1798 (mono_marshal_get_delegate_invoke): Ditto.
1800 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
1802 * gc.c, attach.h, attach.c: remove a bad pattern:
1803 add_finalizer_callback () is not implemented correctly, it can't
1804 without adding more overhead to the finalizer loop and it's not
1805 even needed, since we know exactly what we need to call, so there is
1806 no need to do so through an expensive function pointer.
1808 2008-10-04 Zoltan Varga <vargaz@gmail.com>
1810 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
1812 * attach.c (mono_attach_init): Remove the #ifdef.
1814 2008-10-04 Andreas Färber <andreas.faerber@web.de>
1816 * attach.c (mono_attach_init): Don't use
1817 mono_gc_add_finalizer_thread_callback when compiling without GC.
1820 Code is contributed under MIT/X11 license.
1822 2008-10-03 Zoltan Varga <vargaz@gmail.com>
1824 * class.c (mono_class_create_from_typedef): Remove the
1825 #ifndef DISABLE_SIMD stuff.
1827 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
1829 * class-internals.h (MonoClass): Added simd_type bit field.
1831 * class.c (mono_class_create_from_typedef): Check if type is a simd
1834 2008-10-03 Mark Probst <mark.probst@gmail.com>
1836 * object.c (mono_method_add_generic_virtual_invocation): Only add
1837 instantiations to the thunk whose count is at least as large as
1840 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
1842 * icall.c: changed the Type of the exception thrown when trying to
1843 invoke a constructor on an abstract class. Part of the fix for bug
1846 2008-10-02 Mark Probst <mark.probst@gmail.com>
1848 * class.c, class-internals.h (mono_method_get_vtable_index): New
1849 function which returns the index into the vtable and properly
1850 handles inflated virtual generic methods.
1852 2008-10-01 Mark Probst <mark.probst@gmail.com>
1854 * object.c, domain.c, object-internals.h, domain-internals.h:
1855 Generalize IMT thunk machinery to also handle thunks for virtual
1856 generic method invokes. When a virtual generic method is invoked
1857 more than a number of times we insert it into the thunk so that it
1858 can be called without lookup in unmanaged code.
1860 * generic-sharing.c, class-internals.h: Fetching a
1861 MonoGenericInst* for a method from an (M)RGCTX.
1863 2008-10-01 Zoltan Varga <vargaz@gmail.com>
1865 * marshal.c (emit_marshal_string): Applied a variant of a patch by
1866 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
1867 marshalling. Fixes #431304.
1869 2008-10-01 Bill Holmes <billholmes54@gmail.com>
1871 * marshal.c (emit_marshal_variant) : Change the attribute checks to
1872 handle when ref is specified without In or Out.
1874 Code is contributed under MIT/X11 license.
1876 2008-09-30 Mark Probst <mark.probst@gmail.com>
1878 * loader.c (mono_get_method_constrained): Don't expand method with
1879 the class's context, because it's already a method of that class.
1881 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
1883 * attach.c : should be correct build fix.
1885 2008-09-29 Zoltan Varga <vargaz@gmail.com>
1887 * attach.c: Fix the previous change.
1889 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
1891 * attach.c : quick w32 build fix.
1893 2008-09-27 Miguel de Icaza <miguel@novell.com>
1895 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
1896 crashes MonoDevelop: #430455.
1898 2008-09-27 Zoltan Varga <vargaz@gmail.com>
1900 * domain-internals.h (struct _MonoDomain): Move most fields used only by
1901 the JIT do MonoJitDomainInfo in ../mini/mini.h.
1903 * domain.c: Remove initialization/cleanup of the removed fields.
1905 2008-09-27 Mark Probst <mark.probst@gmail.com>
1907 * class.c (mono_class_generic_sharing_enabled): Enable generic
1908 code sharing for PPC.
1910 2008-09-26 Bill Holmes <billholmes54@gmail.com>
1912 * attach.c : Fixing the Windows builds.
1914 Code is contributed under MIT/X11 license.
1916 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1918 * class.c (mono_class_generic_sharing_enabled): Experimentally change
1919 the default generic sharing mode to 'all'.
1921 2008-09-25 Mark Probst <mark.probst@gmail.com>
1923 * generic-sharing.c, class-internals.h: New function for checking
1924 whether a method needs a static RGCTX invoke wrapper. A few
1925 funtions moved from mini/generic-sharing.c.
1927 * icall.c: New function used.
1929 2008-09-25 Mark Probst <mark.probst@gmail.com>
1931 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
1932 Static RGCTX invoke wrapping applies to value type methods, too.
1934 * class.c (mono_class_setup_vtable_general): In generic-shared
1935 value types, wrap methods with a static RGCTX invoke wrapper.
1937 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1939 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
1942 2008-09-24 Zoltan Varga <vargaz@gmail.com>
1944 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
1945 register a callback which is called when the finalizer thread is woken
1947 (finalizer_thread): Call the callback if it exists.
1949 * attach.h attach.c: New files, implementing the attach mechanism.
1951 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
1953 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
1954 by the previous change.
1956 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
1958 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
1959 loader.c, marshal.c, metadata-internals.h, metadata.c,
1960 method-builder.c, object.c, reflection.c: introduced specific functions
1961 to allocate from the domain and image mempools and cleaned up most of
1962 the code to use them (still missing a few in reflection.c).
1963 Keep the loader bytes counter updated.
1965 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
1967 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
1968 loader-related counters.
1970 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
1972 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
1973 added more MS-compatible counters.
1975 2008-09-22 Zoltan Varga <vargaz@gmail.com>
1977 * class.c (mono_class_setup_fields): Call setup_fields before accessing
1978 class->blittable. Fixes #428217.
1980 2008-09-21 Zoltan Varga <vargaz@gmail.com>
1982 * reflection.c (mono_image_get_field_on_inst_token): Call
1983 field_encode_signature () since that handles custom modifiers too.
1986 2008-09-20 Zoltan Varga <vargaz@gmail.com>
1988 * reflection.c (add_custom_modifiers): New helper function to merge custom
1989 modifiers stored in objects to a MonoType.
1990 (fieldref_encode_signature): Encode custom modifiers.
1991 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
1992 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
1994 2008-09-19 Kornél Pál <kornelpal@gmail.com>
1996 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
1997 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
1998 64-bit IL only images because imports are not resolved for IL only images.
1999 Special thanks to Bill Holmes for finding this bug and testing the patch.
2000 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
2002 Contributed under MIT/X11 license.
2004 2008-09-19 Miguel de Icaza <miguel@novell.com>
2006 * mono-config.c (dllmap_start): Add support for the bits keyword
2007 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
2009 2008-09-19 Mark Probst <mark.probst@gmail.com>
2011 * reflection.c (inflate_mono_method): When the class the method is
2012 to be inflated for is itself not inflated, just return the method.
2014 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
2016 * mono-perfcounters.c: use more user friendly process instance names.
2018 2008-09-18 Bill Holmes <billholmes54@gmail.com>
2020 * marshal.c (emit_marshal_variant) : Change the attribute checks to
2021 handle "[in] ref" and "[in][out] ref" cases.
2023 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
2024 to mono_mb_create_method. This was causing problems calling native to
2025 managed passing Variants by value.
2027 Code is contributed under MIT/X11 license.
2029 2008-09-18 Zoltan Varga <vargaz@gmail.com>
2031 * class.c (can_access_internals): Call mono_assembly_load_friends ()
2032 before accessing the friend_assembly_names field.
2034 * assembly.c (mono_assembly_load_friends): Make this callable multiple
2036 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
2037 called lazily when it is needed.
2039 * metadata-internals.h (struct _MonoAssembly): Add
2040 'friend_assembly_names_inited' flag.
2042 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
2044 * mono-perfcounters-def.h: fix the types of a few counters.
2045 * mono-perfcounters.c: implemented the instance names getter
2048 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
2050 * culture-info-table.h : regenerated.
2052 2008-09-17 Robert Jordan <robertj@gmx.net>
2054 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
2055 context bound objects. Fixes #415577.
2057 Code is contributed under MIT/X11 license.
2059 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
2061 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
2062 implementation (bug #423582).
2064 2008-09-16 Zoltan Varga <vargaz@gmail.com>
2066 * object.c (mono_object_get_virtual_method): Handle the case method->slot
2067 is not set. Fixes #426309.
2069 2008-09-16 Jb Evain <jbevain@novell.com>
2071 * class.c (mono_class_from_name): fix the exported type look up
2072 when the type is defined in a referenced assembly.
2074 2008-09-16 Jb Evain <jbevain@novell.com>
2076 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
2077 increment the next index counter on each iteration to make that work
2078 for more than one type forwarder. Unmanaged part to fix #422929.
2080 2008-09-15 Mark Probst <mark.probst@gmail.com>
2082 * object-internals.h: enum ComInterfaceType in
2083 MonoInterfaceTypeAttribute is guint32, not guint16.
2085 2008-09-12 Mark Probst <mark.probst@gmail.com>
2087 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
2090 2008-09-11 Mark Probst <mark.probst@gmail.com>
2092 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
2095 2008-09-11 Mark Probst <mark.probst@gmail.com>
2097 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
2098 Endianness fixes for MonoSymbolFileOffsetTable.
2100 2008-09-10 Bill Holmes <billholmes54@gmail.com>
2102 * process.c (complete_path) : Removing quotes from the
2103 input path. The glib file routines do not handle file paths
2104 that have quotes around them.
2106 Code is contributed under MIT/X11 license.
2108 2008-09-10 Bill Holmes <billholmes54@gmail.com>
2110 * socket-io.h : Adding a comment to provide locations where
2111 changes to MonoSocketAsyncResult need to be synced.
2113 Code is contributed under MIT/X11 license.
2115 2008-09-10 Zoltan Varga <vargaz@gmail.com>
2117 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
2118 parameters as well. Fixes #425001.
2120 2008-09-08 Miguel de Icaza <miguel@novell.com>
2122 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
2125 2008-09-07 Miguel de Icaza <miguel@novell.com>
2127 * console-io.c: Add support for tracking the window size if it
2130 The setup is very simple: the TtySetup function will now return a
2131 pointer to a location in memory that tracks the current console
2132 size. The managed code checks its current value every time its
2133 queried against the last value set, and updates accordingly.
2135 With this setup we can work with multiple consoles, and we do not
2136 require to poke into managed code from a signal handler.
2138 Additionally, the environment for COLUMNS and LINES is now handled
2141 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
2143 2008-09-07 Mark Probst <mark.probst@gmail.com>
2145 * marshal.c (mono_type_native_stack_size): Treat
2146 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
2148 2008-09-04 Jb Evain <jbevain@novell.com>
2150 * class.c (mono_class_is_assignable_from): fix assignability of nullables
2153 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
2155 * verify.c (verify_type_compatibility_full): Revert change
2156 to allow converting a native int to unmanaged pointer be verifiable
2157 under non-strict mode.
2158 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
2160 * verify.c: Added some TODOs.
2162 2008-09-02 Bill Holmes <billholmes54@gmail.com>
2164 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
2165 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
2166 Changed to use GlobalAlloc for the memory returned on Windows platforms.
2168 Code is contributed under MIT/X11 license.
2170 2008-09-02 Jb Evain <jbevain@novell.com>
2172 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
2174 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
2176 reflection.c (typebuilder_setup_fields): Handle classes with
2179 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
2181 class.c (mono_class_setup_events): Add memory barrier due to
2182 double checked locking.
2184 class.c (mono_class_setup_properties): Same.
2186 2008-08-31 Zoltan Varga <vargaz@gmail.com>
2188 * class.c (mono_class_is_assignable_from): Fix the build.
2190 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
2191 before accessing klass->interface_bitmap. Fixes #421744.
2193 2008-08-28 Zoltan Varga <vargaz@gmail.com>
2195 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
2196 the runtime into no-exec mode, useful when running the AOT compiler.
2198 * appdomain.c gc.c object.c: Avoid executing managed code when running
2201 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
2203 * reflection.c (_mono_reflection_get_type_from_info): Handle the
2204 special case when the mono_assembly_loaded () returns NULL because the
2205 search hook is not installed.
2207 2008-08-25 Zoltan Varga <vargaz@gmail.com>
2209 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
2210 crashes in bstr marshalling on linux.
2212 2008-08-24 Zoltan Varga <vargaz@gmail.com>
2214 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
2215 with more than one parameter.
2217 2008-08-24 Miguel de Icaza <miguel@novell.com>
2219 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
2220 start/stop flow control as well when turning off ICANON (allows
2221 C-s and C-q to be read by Console.ReadKey).
2223 2008-08-24 Zoltan Varga <vargaz@gmail.com>
2225 * class.c (mono_class_init): Move the initialization of nested classes
2226 into mono_class_get_nested_types (). Fixes #418433.
2228 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
2231 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
2232 iterating tough the nested classes of a class.
2234 2008-08-23 Zoltan Varga <vargaz@gmail.com>
2236 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
2239 2008-08-22 Miguel de Icaza <miguel@novell.com>
2241 * console-io.c (sigcont_handler): Support signal chaining for
2244 (console_set_signal_handlers): Use best practices with sigaction,
2245 clear the structure before using it.
2247 2008-08-22 Robert Jordan <robertj@gmx.net>
2249 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
2250 Fix the Windows build.
2252 2008-08-22 Zoltan Varga <vargaz@gmail.com>
2254 * class.c (mono_class_generic_sharing_enabled): Make the default
2255 sharing mode 'corlib'.
2257 2008-08-21 Zoltan Varga <vargaz@gmail.com>
2259 * console-io.c (console_set_signal_handlers): Fix a warning.
2261 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
2262 method normally, the JIT will take care of avoiding recursion.
2264 2008-08-20 Bill Holmes <billholmes54@gmail.com>
2266 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
2268 Code is contributed under MIT/X11 license.
2270 2008-08-20 Miguel de Icaza <miguel@novell.com>
2272 * console-io.c (sigcont_handler): We need to restore the entire
2273 termios state, not only the original settings, as things like echo
2274 can be controlled after this (Booish exposes this issue with its
2275 own ReadLine implementation).
2277 Additionally, we need to set the terminal back into keypad_xmit
2280 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
2281 string as a paramter as well. Otherwise we get different
2284 2008-08-20 Zoltan Varga <vargaz@gmail.com>
2286 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
2287 delegates with byref out parameter passing. Fixes #351520.
2289 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
2291 (mono_type_get_desc): Add the type arguments for GENERICINST.
2292 (mono_method_full_name): Stringify the class name using mono_type_full_name
2293 so it picks up generic arguments.
2295 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
2297 * console-io.c: Removed debug output.
2299 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
2301 reflection.c (mono_reflection_create_runtime_class): Alloc
2302 the nested classes linked list using the dynamic image mempool.
2303 Fixes leak in corlib compilation.
2305 2008-08-19 Miguel de Icaza <miguel@novell.com>
2307 * console-io.c: Fix incredibly annoying behavior on the console
2308 after resuming execution after control-z. This affected every
2309 console application.
2311 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
2313 * mempool-internals.h: Header for mono private mempool functions. The first
2314 two function are for allocating glib linked lists using pools.
2316 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
2318 * Makefile.am: Added mempool-internals.h.
2320 2008-08-16 Zoltan Varga <vargaz@gmail.com>
2322 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
2323 (mono_domain_free): Ditto.
2325 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
2326 be used by the JIT to store its domain-specific information, instead of putting
2327 it directly into MonoDomain.
2329 * domain.c (mono_install_create_domain_hook): New helper function to install
2330 a hook which initializes domain->runtime_info.
2332 * domain.c (mono_install_free_domain_hook): Ditto.
2334 2008-08-15 Zoltan Varga <vargaz@gmail.com>
2336 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
2337 asserting if the ares parameter is null.
2339 * mono-perfcounters.c: Fix warnings.
2341 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
2342 is not needed, don't check for interruptions either.
2343 (mono_marshal_get_delegate_end_invoke): Ditto.
2345 2008-08-15 Marek Habersack <mhabersack@novell.com>
2347 * mono-perfcounters.c (predef_readonly_counter): added support for
2348 reading the ASP.NET Requests Queued counter from another process.
2350 2008-08-12 Zoltan Varga <vargaz@gmail.com>
2352 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
2353 MonoImage to simplify the AOT code.
2355 2008-08-10 Zoltan Varga <vargaz@gmail.com>
2357 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
2358 marshalling. Fixes #416078.
2360 2008-08-08 Zoltan Varga <vargaz@gmail.com>
2362 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
2363 it is set, looking up the icall address is deferred to the JIT, since
2364 in embedded scenarios, the icall might not be registered in the runtime
2365 doing the AOT compilation. Backported from the 2.0 branch.
2367 2008-08-08 Zoltan Varga <vargaz@gmail.com>
2369 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
2372 2008-08-05 Marek Habersack <mhabersack@novell.com>
2374 * Makefile.am: added support for cross-compilation.
2376 2008-08-04 Zoltan Varga <vargaz@gmail.com>
2378 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
2380 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
2382 * mono-perfcounters.c: jitted methods and jitted bytes counters.
2384 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
2386 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
2387 mono-perfcounters.c: performance counters implementation.
2389 2008-07-31 Zoltan Varga <vargaz@gmail.com>
2391 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
2392 to gpointer, letting the AOT code decide what to store in it.
2394 2008-07-31 Bill Holmes <billholmes54@gmail.com>
2396 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
2397 mono_class_setup_methods if the methods are not initialized.
2399 Code is contributed under MIT/X11 license.
2401 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
2403 * verify.c: Remove some debug code I commited by accident.
2405 * verify.c (mono_method_is_valid_in_context): Change the return value
2406 to make possible to distinguish between invalid and unverifiable.
2408 * verify.c (verifier_load_method): Don't return NULL for unverifiable
2411 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
2413 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
2414 constraints. Fixes regression in gtest-253.
2416 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
2418 * verify.c (mono_verifier_verify_class): Don't allow generic types
2419 with explicit layout.
2421 * verify.c (mono_method_verify): Check locals and argument types.
2423 2008-07-29 Zoltan Varga <vargaz@gmail.com>
2425 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
2426 wait if the thread is in StopRequested state.
2428 * class.c (mono_class_from_name): Refactor the module searching code into
2429 a separate function so it can be reused in the AOT case too.
2431 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
2433 * verify.c (mono_type_is_valid_in_context): Improve the error message.
2434 Check both the type and it's generic type definition for loader errors.
2436 * verify.c (mono_method_is_valid_in_context): Don't generate another
2437 error when a type errors occur, this leads to the wrong exception been
2440 2008-07-28 Dick Porter <dick@ximian.com>
2444 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
2445 New internal calls to duplicate and close a process handle.
2447 2008-07-27 Andreas Färber <andreas.faerber@web.de>
2449 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
2451 2008-07-27 Zoltan Varga <vargaz@gmail.com>
2453 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
2455 2008-07-27 Robert Jordan <robertj@gmx.net>
2457 * class.c (mono_class_init): Don't compute class.has_finalize for
2458 valuetypes. Fixes #412477.
2460 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
2462 * verify.c: Implement constraint equivalence checking.
2463 This is required when a generic parameter is used as
2464 argument to a constrained one.
2468 2008-07-24 Zoltan Varga <vargaz@gmail.com>
2470 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2472 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
2474 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
2475 synch with managed object layout.
2477 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
2479 * verify.c (do_branch_op): Handle valuetypes and generic
2482 * verify.c (do_cmp_op): Same.
2486 2008-07-24 Mark Probst <mark.probst@gmail.com>
2488 * generic-sharing.c: Fix memory leaks.
2490 * class.c, class-internals.h: Make
2491 mono_class_inflate_generic_type_with_mempool() non-static.
2493 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
2495 * pedump.c (dump_verify_info): Dump full class name.
2497 2008-07-24 Mark Probst <mark.probst@gmail.com>
2499 * generic-sharing.c: Removed some old code that didn't do anything.
2501 2008-07-24 Massimiliano Mantione <massi@ximian.com>
2502 * profiler.c: Added runtime_initialized_event,
2503 mono_profiler_install_runtime_initialized and
2504 mono_profiler_runtime_initialized. This new hook tells the profiler
2505 when the runtime is sufficiently initialized to be able to call
2506 mono_thread_attach on the root appdomain.
2507 * profiler.h, profiler-private.h: Likewise.
2509 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
2511 * verify.c (do_cast): Do boxing for generic arguments as well.
2513 * class.c (is_nesting_type): Drop generic instantiations before
2514 checking for nesting.
2516 * class.c (can_access_instantiation): Allow access to generic
2519 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
2521 * verify.c (verify_class_for_overlapping_reference_fields):
2522 On some cases, the field size might be zero, guard against that.
2523 Fix the explicit layout check to work as expected.
2525 2008-07-23 Zoltan Varga <vargaz@gmail.com>
2527 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
2528 mono_thread_resume () during shutdown, since the thread we want to abort
2531 2008-07-22 Zoltan Varga <vargaz@gmail.com>
2533 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
2536 * debug-mono-symfile.c: Fix a warning.
2538 * mono-perfcounters.c (get_cpu_times): Fix a warning.
2540 * object.c (mono_class_vtable): Check if exception_type is set, and return
2541 NULL as defined by the function comments.
2543 2008-07-22 Mark Probst <mark.probst@gmail.com>
2545 * mempool.c: Use malloc for every single mempool allocation if the
2546 configure option is set. This makes it easier to track mempool
2547 allocations with tools like Valgrind.
2549 2008-07-22 Jb Evain <jbevain@novell.com>
2551 * reflection.c (create_dynamic_mono_image): emit the same
2552 metadata version that SL2 does when creating a SL2 image.
2554 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
2557 * icall.c: New icall System.Enum:get_hashcode. This function
2558 avoids the overhead of boxing the enum to the underlying type.
2560 2008-07-21 Mark Probst <mark.probst@gmail.com>
2562 * reflection.c (mono_method_get_object): Don't let static RGCTX
2563 invoke wrappers get into MonoReflectionMethods.
2565 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
2567 * object-internals.h:
2568 * object.c: New mono_runtime_class_init_full function
2569 that makes throwing the exception optinal.
2571 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
2572 for the case where the exception object is supplied.
2574 2008-07-16 Kornél Pál <kornelpal@gmail.com>
2576 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
2579 Contributed under MIT/X11 license.
2581 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
2583 * string-icalls.c (ves_icall_System_String_InternalSplit):
2584 Optimize array allocation by caching the MonoClass of the
2587 * icall.c (ves_icall_Type_GetMethodsByName): Same.
2589 * reflection.c (mono_param_get_objects): Same.
2591 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
2594 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
2595 It inflates the given type using the class context.
2597 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
2599 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
2600 the vtable if it already exists.
2602 * object-internals.h: Add mono_class_try_get_vtable as part of the
2605 * reflection.c (mono_type_get_object): Use the MonoObject from the
2606 vtable when possible. Reduces locking contention on reflection heavy
2609 2008-07-15 Zoltan Varga <vargaz@gmail.com>
2611 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
2612 g_bit_nth_msf () since that macro is not implemented in eglib.
2614 2008-07-13 Zoltan Varga <vargaz@gmail.com>
2616 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
2617 on platforms which do not support it.
2619 2008-07-12 Zoltan Varga <vargaz@gmail.com>
2621 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
2623 2008-07-11 Martin Baulig <martin@ximian.com>
2625 * mono-debug-debugger.h
2626 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
2628 * mono-debug-debugger.c
2629 (_mono_debugger_interruption_request): New global volatile variable.
2630 (mono_debugger_check_interruption): New public function.
2633 (mono_thread_current_check_pending_interrupt): Call
2634 mono_debugger_check_interruption().
2635 (mono_thread_interruption_checkpoint_request): Likewise.
2637 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2639 * verify.c: Add more type checks for loaded types. Verify the result
2640 handle from ldtoken.
2642 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2644 * loader.c (field_from_memberref): Don't crash if the field
2647 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2649 * verify.c: Verify if type and method instantiations
2650 don't have invalid VAR or MVAR arguments.
2652 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2654 * verify.c: Fix double free of function pointer list.
2656 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2658 * object.c (mono_string_to_utf8): Comment the new code as it
2661 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
2663 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
2665 2008-07-07 Bill Holmes <billholmes54@gmail.com>
2667 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
2668 is not throw too many times.
2670 Code is contributed under MIT/X11 license.
2672 2008-07-07 Zoltan Varga <vargaz@gmail.com>
2674 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
2675 debugging is turned off.
2677 2008-07-06 Zoltan Varga <vargaz@gmail.com>
2679 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
2681 2008-07-04 Mark Probst <mark.probst@gmail.com>
2683 * class-internals.h, class.c: Added new generic sharing option:
2684 Share only stuff in System.Collections.Generic, which is now the
2687 2008-07-04 Mark Probst <mark.probst@gmail.com>
2689 * generic-sharing.c, class-internals.h: New function for getting a
2690 generic method in a generic class given the corresponding method
2691 for a different instantiation of the class. Partly refactored
2692 from mini-trampolines.c.
2694 * class.c: Make sure generic methods have a class_inst if they are
2695 part of a generic class.
2697 * metadata.c (mono_type_stack_size_internal): Handle type
2700 2008-07-04 Mark Probst <mark.probst@gmail.com>
2702 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
2703 Signifies whether information on the this/vtable/mrgctx variable
2706 2008-07-04 Mark Probst <mark.probst@gmail.com>
2708 * object.c, object-internals.h, icall.c: New function
2709 mono_delegate_ctor_with_method(), which does the same as
2710 mono_delegate_ctor(), but takes an explicit method argument
2711 instead of taking the method from the jit info.
2713 * marshal.c: When creating a delegate with an inflated method take
2714 the "this" argument as the target class for the castclass.
2716 2008-07-03 Mark Probst <mark.probst@gmail.com>
2718 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
2719 mono_jit_info_table_find() to perform very badly in some cases.
2721 2008-07-02 Zoltan Varga <vargaz@gmail.com>
2723 * icall.c (type_from_typename): Handle 'string'.
2725 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
2726 wrappers into the wrapper_hash, since the key is not a MonoMethod.
2728 2008-07-01 Zoltan Varga <vargaz@gmail.com>
2730 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
2732 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
2733 number of available managed allocator types.
2735 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
2736 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
2738 2008-06-30 Zoltan Varga <vargaz@gmail.com>
2740 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
2741 which is a low level lock protecting just the 'jit_code_hash' hash table.
2743 * domain.c: Initialize+cleanup jit_code_hash_lock.
2745 2008-06-30 Kornél Pál <kornelpal@gmail.com>
2747 * coree.c (mono_load_coree): Set coree_module_handle global variable only
2748 after initialization.
2750 * coree.h: Make MonoFixupExe internal.
2752 Contributed under MIT/X11 license.
2754 2008-06-30 Kornél Pál <kornelpal@gmail.com>
2756 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
2757 because that is platform independent. Check NumberOfRvaAndSizes in PE32
2759 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
2760 image being loaded is a CLI image and _CorValidateImage gets called.
2762 * coree.h: Add MonoLoadImage.
2764 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
2765 instead of LoadLibrary.
2767 Contributed under MIT/X11 license.
2769 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
2771 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
2772 for any primitive type.
2774 2008-06-29 Zoltan Varga <vargaz@gmail.com>
2776 * object.c (mono_array_new_specific): Optimize this and the other allocation
2779 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
2780 domains too if mono_dont_free_domains is set.
2782 * domain-internals.h (mono_dont_free_domains): New internal option controlling
2783 whenever to free appdomain data after it has been unloaded.
2785 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
2787 2008-06-28 Zoltan Varga <vargaz@gmail.com>
2789 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
2790 (mono_method_get_equivalent_method): Fix a warning.
2792 * object.c (mono_message_init): Avoid looking up array types for each call.
2794 2008-06-27 Zoltan Varga <vargaz@gmail.com>
2796 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
2799 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
2802 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
2805 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
2808 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
2810 * object.c (mono_value_box): Fix boxing of nullables.
2812 2008-06-26 Kornél Pál <kornelpal@gmail.com>
2814 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
2815 mono_module_handle that is defined by the linker; no initialization required.
2816 * coree.h: Remove mono_module_handle, add __ImageBase, update
2817 mono_image_open_from_module_handle.
2818 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
2819 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
2820 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
2821 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
2822 to 4 GB away from image base address. IA64 version is not tested but was very
2823 easy to implement and should work if we ever need it.
2824 * domain.c (mono_init_internal): Avoid system error message boxes.
2825 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
2826 with has_entry_point. Handle do_mono_image_load fauilre correctly.
2827 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
2828 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
2829 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
2831 Contributed under MIT/X11 license.
2833 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
2835 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
2836 as part of the private mono API.
2838 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
2839 Do proper argument checking for methods that belong to generic classes.
2840 Do proper type resolution for GMFH/2.
2843 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
2845 * verify.c (do_switch): Fix a memory corruption bug with
2846 the jump index is out of bound.
2848 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
2850 * verify.c: Disable debug code.
2852 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
2854 * reflection.c (mono_image_get_methodbuilder_token): Use
2855 mono_image_get_methodspec_token_for_generic_method_definition
2856 instead of mono_image_get_memberref_token. We cache more memberef
2859 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2861 * verify.c: Inflate exception clause types.
2864 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2866 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
2869 * reflection.c (mono_image_get_ctorbuilder_token): Same.
2871 * reflection.c (mono_image_create_method_token): Same.
2873 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2875 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
2876 It does the same as mono_image_get_methodref_token but works on
2879 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
2880 and always generate a methodspec. This follows the old behavior and fixes
2881 the regressions in System.Core.
2883 2008-06-24 Zoltan Varga <vargaz@gmail.com>
2885 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
2886 don't event mono_class_get () succeeds. Fixes #402182.
2888 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
2890 * metadata-internals.h: Added MonoDynamicImage::methodspec
2891 hashtable to store methodspec tokens created for MethodBuilders.
2893 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
2894 MethodBuilders as open instantiations if a methodspec was requested.
2896 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
2898 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
2900 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
2904 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
2906 * loader.c (method_from_methodspec): Avoid crashing if the
2907 method lookup fails.
2909 2008-06-20 Dick Porter <dick@ximian.com>
2911 * socket-io.c (get_socket_assembly): Cope with Moonlight network
2912 classes being in a different assembly. Fixes bug 399184.
2914 2008-06-20 Zoltan Varga <vargaz@gmail.com>
2916 * loader.c (mono_loader_init): Make this callable multiple times.
2917 (mono_dllmap_insert): Call mono_loader_init () so this works even before
2918 the runtime is initialized. Fixes #401755.
2920 2008-06-19 Dick Porter <dick@ximian.com>
2922 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
2925 2008-06-19 Dick Porter <dick@ximian.com>
2928 * icall-def.h: Implement Socket generic Send() and Receive()
2929 methods. Fixes bug 395168.
2931 2008-06-19 Kornél Pál <kornelpal@gmail.com>
2933 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
2935 Contributed under MIT/X11 license.
2937 2008-06-18 Martin Baulig <martin@ximian.com>
2939 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
2940 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
2941 set to 80.0. The debugger <-> runtime interface is now frozen as
2945 (mono_debug_debugger_version): Bump to 4.
2947 2008-06-18 Martin Baulig <martin@ximian.com>
2949 * debug-mono-symfile.c
2950 (load_symfile): Don't check the minor version.
2952 * debug-mono-symfile.h: Bump the version number to 50.0.
2954 2008-06-18 Martin Baulig <martin@ximian.com>
2956 * debug-mono-symfile.c
2957 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
2958 minimum required version.
2960 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
2962 * reflection.c (mono_custom_attrs_from_property): Fix support for
2963 retriveving cattrs of dynamic inflated generic types.
2965 * reflection.c (mono_custom_attrs_from_event): Same.
2967 * reflection.c (mono_custom_attrs_from_field): Same;
2969 * reflection.c (typebuilder_setup_events): Same cattrs of events.
2971 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
2972 Moved to metadata.c.
2974 * metadata.c: New functions to retrive the equivalent field, event
2975 of property from the generic type definition.
2977 * metadata-internals.h: Added new functions from metadata.c.
2979 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
2981 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
2982 to cached in a mempool is used.
2984 * metadata.c (free_generic_class): In some situations field generic_info type
2985 is not properly dup'ed and leads to double free'ing.
2989 2008-06-17 Mark Probst <mark.probst@gmail.com>
2991 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
2992 this arguments (will be needed later for generic methods).
2995 2008-06-17 Mark Probst <mark.probst@gmail.com>
2997 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
2998 Create a static RGCTX invoke wrapper for methods which require it.
3000 2008-06-17 Mark Probst <mark.probst@gmail.com>
3002 * object.c, class-internals.h: New function for checking whether
3003 an individual field is special static.
3005 2008-06-15 Zoltan Varga <vargaz@gmail.com>
3007 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
3008 linear search since the table is sorted.
3010 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
3013 2008-06-14 Zoltan Varga <vargaz@gmail.com>
3015 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
3016 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
3018 * gc.c (mono_domain_finalize): Allow an infinite timeout.
3020 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
3022 * threads.c (mono_thread_request_interruption): Get rid of locking, use
3023 InterlockedCompareExchange to query and modify
3024 thread->interruption_requested.
3026 * object-internals.h (struct _MonoThread): Change interruption_requested
3027 to a gint32 so it can be modified by atomic operations. Add
3028 'critical_region_level' from the managed side, change small_id to a guint32,
3029 add new set of 'unused' fields.
3031 * appdomain.c: Bump corlib version.
3033 2008-06-13 Zoltan Varga <vargaz@gmail.com>
3035 * class.c (mono_class_from_name): Search modules as well. Fixes
3038 2008-06-13 Mark Probst <mark.probst@gmail.com>
3040 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
3041 templates. Templates are generalized with an additional type_argc
3042 argument. RGCTX templates have type_argc==0, MRGCTX templates
3045 * domain-internals.h, domain.c: New hash table for looking up
3048 * metadata.c, metadata-internals.h: Rename hash and equal
3049 functions for MonoGenericInst's and make them public.
3051 * class-internals.h: New data structures for the MRGCTX. Macros
3052 for distinguishing slots in the RGCTX and the MRGCTX.
3054 2008-06-13 Mark Probst <mark.probst@gmail.com>
3056 * object.c (mono_method_get_imt_slot): Put the same methods of
3057 different instantiations of the same generic interface in the same
3058 IMT slots, to make generic sharing simpler.
3060 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
3062 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
3064 * metadata.c (mono_metadata_field_info_with_mempool): Added.
3065 This function works just like mono_metadata_field_info, but
3066 accept a mempool as argument to be used allocating memory.
3068 * marshal.c (mono_marshal_load_type_info): Use new function
3069 to load marshal data into image mempool.
3071 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
3073 * class.c (mono_class_inflate_generic_type_with_mempool):
3074 This function allows to inflate a generic type using
3077 * class.c (inflate_generic_type): Take a mempool as argument
3078 and use it to do type dup'ing.
3080 * class.c (mono_class_setup_fields): Field type for generic
3081 generic classes are allocated from the image mempool.
3083 * metadata.c (free_generic_class): Inflated field type is
3084 now allocated in the image mempool.
3086 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
3088 * threads.c (thread_cleanup): Free MonoThread::name.
3090 2008-06-12 Marek Habersack <mhabersack@novell.com>
3092 * appdomain.c (ensure_directory_exists): avoid unnecessary
3093 mkdir(2) calls when the shadow directory already exists.
3094 (mono_make_shadow_copy): copy also satellite assemblies from the
3095 private bin directories.
3097 2008-06-11 Zoltan Varga <vargaz@gmail.com>
3099 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
3101 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
3102 a page boundary. Fixes #396219.
3104 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3106 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
3107 due to double-checked locking.
3109 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3111 * assembly.c (build_assembly_name): Release memory on failure.
3113 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
3115 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3117 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
3120 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3122 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
3125 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3127 * loader.c (field_from_memberref): Check if field signature type is equal
3128 to the non-inflated type of the field. Fixes #398980.
3130 2008-06-11 Zoltan Varga <vargaz@gmail.com>
3132 * assembly.c (mono_assembly_load_from_full): Call
3133 mono_assembly_load_friends () outside the assemblies lock, since it can
3134 acquire the loader lock. Fixes #323696.
3136 * reflection.c (resolve_object): Inflate the inst with the context for
3137 FieldOnTypeBuilderInst. Fixes #399010.
3139 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3141 * reflection.c (mono_image_get_field_on_inst_token): Don't
3142 inflate the field to encode it's signature. If it's a
3143 VAR or MVAR it should stay that way in the signature.
3146 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3148 * reflection.c (resolve_object): Release memory of inflated types.
3150 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3152 * loader.c (mono_method_get_signature_full): Remove assert about
3153 loading a methodspec to a generic method. We have such methods, such as
3154 System.Threading.Interlocked::CompareExchange<T>.
3155 This assert was removed since it crashes the verifier when it checks
3156 methods calling CompareExchange<T>.
3158 2008-06-10 Marek Safar <marek.safar@gmail.com>
3160 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
3161 of Type array and not MonoType.
3163 2008-06-10 Marek Habersack <mhabersack@novell.com>
3165 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
3168 2008-06-10 Martin Baulig <martin@ximian.com>
3170 * debug-mono-symfile.h
3171 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
3172 changes to the file format, but we were generating incorrect
3173 source file indices in the line number table due to a bug, which
3174 made backtraces report an incorrect source file.
3176 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
3178 * mono-debug.c: Moved mono_debug_free_method_jit_info from
3179 mini/debug-mini.c to here.
3181 * mono-debug.c (il_offset_from_address): Free memory from find_method.
3183 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
3184 use it to release structs returned by mono_debug_find_method.
3186 2008-06-10 Zoltan Varga <vargaz@gmail.com>
3188 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
3189 since it needs to set method->slot for all interface methods.
3191 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3193 * class-internals.h: Forgot to add.
3195 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3197 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
3199 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
3200 Lookup the custom attributes from property_hash.
3202 * reflection.c (mono_save_custom_attrs): Save the custom attributes
3203 in property_hash. Allocate all data using the image mempool.
3205 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
3206 for dynamic_custom_attrs to checks if the image is dynamic.
3208 2008-06-09 Zoltan Varga <vargaz@gmail.com>
3210 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
3213 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
3214 runtime functions while holding the domain assemblies lock.
3216 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3218 * verify.c: Reapplied the last bit of the reverted changes.
3220 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
3222 * verify.c: Reapplied more of the reverted changes.
3224 2008-06-09 Martin Baulig <martin@ximian.com>
3226 * debug-mono-symfile.c (load_symfile): Check the major version
3227 first; if it's wrong, don't print the minor version in the error message.
3229 2008-06-09 Zoltan Varga <vargaz@gmail.com>
3231 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
3232 lock instead of the domain lock to avoid deadlocks, since the thread might
3233 already hold the loader lock.
3235 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
3236 (mono_thread_attach): Ditto.
3238 * monitor.c: Use a TLS variable for holding the current thread id instead
3239 of calling pthread_self ().
3240 (mono_monitor_init_tls): New internal function to initialize the TLS
3242 (mono_monitor_try_enter_internal): Put the owner == id check after the
3245 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
3246 missed optimizations when using gcc-4.3.
3248 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
3250 * reflection.c (mono_dynamic_image_free): Free the memory
3251 used by MonoGenericParam in MonoDynamicImage::gen_param.
3253 * reflection.c (mono_reflection_setup_generic_class): Allocate
3254 container from mempool.
3256 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
3257 container from mempool.
3259 2008-06-07 Zoltan Varga <vargaz@gmail.com>
3261 * threads.c (mono_set_pending_exception): New internal function to set the
3262 pending exception of the current thread.
3263 (mono_thread_get_and_clear_pending_exception): Check for
3264 thread->pending_exception as well.
3266 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
3268 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
3269 it can trigger a collection.
3271 2008-06-06 Martin Baulig <martin@ximian.com>
3273 Merged the `debugger-kahalo' branch.
3276 (MONO_DEBUGGER_VERSION): Bumped to 72.
3278 * debug-mono-symfile.h
3279 (MonoSymbolFileMethodIndexEntry): Removed.
3280 (MonoSymbolFileMethodEntry): New public typedef.
3281 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
3282 (MonoSymbolFileSourceEntry): Remove everything except `index' and
3284 (MonoSymbolFileMethodEntry): Removed.
3285 (MonoSymbolFileLexicalBlockEntry): Removed.
3286 (MonoSymbolFileLineNumberEntry): Removed.
3287 (MonoDebugLexicalBlockEntry): Removed.
3288 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
3289 removed `num_il_offsets' and `il_offsets'.
3290 (MonoSymbolFile): Replace `version' with `major_version' and
3292 (MONO_SYMBOL_FILE_VERSION): Replace with
3293 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
3294 `MONO_SYMBOL_FILE_MINOR_VERSION'.
3296 * debug-mono-symfile.c
3297 (mono_debug_symfile_lookup_location): Add support for the new line
3298 number table format.
3300 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3302 * metadata.c (free_generic_class): Release the inflated
3303 MonoClass of dynamic generic classes if it's not a generic
3306 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3308 * verify.c: Reapplied more of the reverted changes.
3310 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3312 * reflection.c (lookup_custom_attr): Clean the cached flag or
3313 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
3316 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
3318 * verify.c: Reapplied a small part of the reverted changes.
3320 2008-06-07 Zoltan Varga <vargaz@gmail.com>
3322 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3324 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
3325 previously in managed code.
3326 (mono_monitor_exit): Ditto.
3327 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
3329 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
3330 the managed definition.
3332 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
3334 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
3336 2008-06-06 Zoltan Varga <vargaz@gmail.com>
3338 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
3340 * monitor.c: Add some micro optimizations.
3342 * icall.c (type_from_typename): Handle 'bool'.
3344 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
3346 * verify.c: Implement constructor verification per P III 1.8.1.4.
3349 2008-06-06 Zoltan Varga <vargaz@gmail.com>
3351 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
3352 holding the assemblies lock here too.
3354 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3356 * verify.c: Kill stack_top function.
3358 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3360 * verify.c: Kill stack_get function.
3362 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3364 * verify.c (mono_method_verify): Last change broke the build. Fixed.
3366 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
3368 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
3371 * verify.c (mono_method_verify): Inflate params and locals to avoid
3372 mismatch when checking for compatibility.
3374 2008-06-05 Jonathan Chambers <joncham@gmail.com>
3376 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
3377 Length prefix should be size in bytes. Fix bug #339530.
3379 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
3380 Length prefix should be size in bytes. Fix bug #339530.
3382 Code is contributed under MIT/X11 license.
3384 2008-06-05 Bill Holmes <billholmes54@gmail.com>
3386 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
3388 Contributed under MIT/X11 license.
3390 2008-06-05 Martin Baulig <martin@ximian.com>
3392 * mono-debug-debugger.c
3393 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
3395 2008-06-05 Zoltan Varga <vargaz@gmail.com>
3397 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
3398 while holding the assemblies lock to prevent deadlocks. Handle the case
3399 where the search hook returns NULL but the assembly was still loaded.
3402 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
3403 modify domain state.
3405 2008-06-05 Andreas Färber <andreas.faerber@web.de>
3407 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
3408 * Makefile.am (pedump_LDADD): Post-process object files and
3409 add dtrace-generated object file, if necessary.
3411 Code is contributed under MIT/X11 license.
3413 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
3415 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
3417 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
3419 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
3421 2008-06-04 Mark Probst <mark.probst@gmail.com>
3423 * threads.c: Try to free everything from the delayed free table
3424 when shutting down threads, and set the variable to NULL after the
3425 table is freed so that calling
3426 mono_thread_hazardous_try_free_all() when shutting down the root
3427 domain doesn't crash.
3429 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
3431 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
3432 the caller if resulting type was inflated.
3434 * class.c (mono_class_create_from_typespec): Free the MonoType if it
3437 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
3440 2008-06-04 Zoltan Varga <vargaz@gmail.com>
3442 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
3443 class library tests.
3445 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
3446 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
3449 2008-06-04 Mark Probst <mark.probst@gmail.com>
3451 * domain.c, domain-internals.h: The JIT infos are now freed by the
3452 JIT info table code. They are freed immediately if there only a
3453 single JIT info table in circulation. If there is more, the free
3454 is delayed via a queue.
3456 * threads.c, threads-types.h: New hazard pointer function for
3457 freeing all freeable delayed items in one sitting.
3459 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3461 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
3463 * reflection.c (typebuilder_setup_properties): Same.
3465 * reflection.c (typebuilder_setup_events): Same.
3467 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3469 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
3470 and use it for allocating memory.
3472 * reflection.c (mono_marshal_spec_from_builder): Same.
3474 * reflection.c: Change code to use new signatures.
3476 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
3478 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3480 * decimal.c (rescale128): Put back one line which was accidently commented
3483 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
3486 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3488 * reflection.c (mono_reflection_generic_class_initialize): Name must
3489 be always malloc'ed so we can free it later on. Do this for field, property
3492 * metadata.c (free_generic_class): Free field, property and event names.
3494 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3496 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
3497 instead of g_memdup.
3499 * reflection.c (typebuilder_setup_fields): Same.
3501 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3503 * decimal.c (rescale128): Optimize this function a bit more.
3505 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3507 * metadata.c (free_generic_class): Release some memory from
3508 SRE generic classes.
3510 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
3512 * reflection.c (mono_image_get_generic_field_token): No reference
3513 to name is kept, free it.
3515 * reflection.c (mono_reflection_generic_class_initialize): Free
3516 more memory of the inflated field.
3518 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3520 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
3523 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
3525 * reflection.c (mono_dynamic_image_free): Release memory used by
3526 MonoDynamicImage::array_methods elements.
3528 * reflection.c (assembly_add_win32_resources): Release memory after
3531 2008-06-02 Zoltan Varga <vargaz@gmail.com>
3533 * decimal.c (log2_32): Use an optimized version for this function too.
3535 * decimal.c (log2_64): Fix this on 32 bit machines.
3537 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
3539 * class.c (mono_dup_array_type): Implement allocation using a mempool.
3541 * class.c (mono_metadata_signature_deep_dup): Same.
3543 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
3546 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
3548 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
3550 * metadata-internals.h: Added mono_metadata_signature_dup_full.
3552 * class-internals.h: Update signatures to take a MonoMemPool.
3554 2008-06-02 Dick Porter <dick@ximian.com>
3556 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
3558 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
3559 FormatMessage API to get the error text. Fixes bug 321827.
3561 2008-06-02 Zoltan Varga <vargaz@gmail.com>
3563 * decimal.c: Add some micro optimizations to make decimal operations faster.
3565 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
3567 * reflection.c (method_encode_clauses): Take a mempool
3568 as parameter and use it to allocate the clause array.
3570 * reflection.c (mono_image_get_field_on_inst_token): Free
3571 the inflated type after encoding it.
3573 * reflection.c (mono_dynamic_image_free): Free each element
3574 of MonoDynamicImage::gen_params.
3576 * reflection.c (reflection_methodbuilder_to_mono_method):
3577 Allocate the generic param array from the mempool.
3578 Allocate signature params from the mempool.
3580 * reflection.c (mono_reflection_generic_class_initialize):
3581 Free inflated fields after been used.
3583 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
3585 * icall.c: Reapply the memory leak fixes as they no
3586 longer make mono crash.
3588 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
3590 * reflection.c (mono_type_get_object): Don't store the suplied
3591 MonoType with type_hash. A caller which pass a type that
3592 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
3593 might end with a pointer to freed memory.
3594 The solution is to use byval_arg or this_arg from the associated
3595 MonoClass of the supplied type.
3597 2008-05-29 Zoltan Varga <vargaz@gmail.com>
3599 * icall.c: Revert the rest of the last change as it breaks the build too.
3601 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
3603 * icall.c: Revert a leak fix as it's breaking the build.
3605 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
3607 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
3609 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
3611 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
3613 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
3615 * icall.c: Fix some memory leaks.
3617 2008-05-29 Dick Porter <dick@ximian.com>
3619 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
3620 async socket operations from the pending list when a socket
3621 closes. Leaving it until the threadpool services the event
3622 exposes a race condition when a socket descriptor is reused.
3625 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3627 * object.c: Fix negative index check for array alocation.
3629 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3631 * icall.c, marshal.c: Delegate wrappers should skip visibility.
3632 This check is performed by the verifier for IL created delegates
3633 and by Delegate::CreateDelegate for programatically created ones.
3636 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3638 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
3639 Fix code to use mono_array_size_t instead of int.
3641 Based on patch by Luis F. Ortiz.
3642 Contributed under X11 license.
3643 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3645 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3647 * icall.c: Added ves_icall_System_Array_GetLongLength and
3648 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
3651 * icall.h: Export both new functions.
3653 Based on patch by Luis F. Ortiz.
3654 Contributed under X11 license.
3655 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3657 2008-05-28 Martin Baulig <martin@ximian.com>
3659 The debugger now requires exactly r103463.
3661 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
3662 This version is not supported by the debugger, wait for 72.
3664 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3666 * object.h: Changed array related functions to use
3667 mono_array_size_t instead of guint32. Forgot to commit this file.
3669 Patch by Luis F. Ortiz.
3670 Contributed under X11 license.
3671 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3674 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3676 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
3677 don't define it. Use the number literal instead.
3679 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3681 * icall.c: Changed array related functions to use
3682 mono_array_size_t instead of guint32.
3684 * icall.c (ves_icall_System_Array_GetLength): Check for length
3685 overflow under MONO_BIG_ARRAYS.
3687 Based on patch by Luis F. Ortiz.
3688 Contributed under X11 license.
3689 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3691 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3693 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
3695 Based on patch by Luis F. Ortiz.
3696 Contributed under X11 license.
3697 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3699 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3701 * object.c, object.h: Changed array related functions to use
3702 mono_array_size_t instead of guint32.
3704 Patch by Luis F. Ortiz.
3705 Contributed under X11 license.
3706 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3708 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3710 * object.h: Introduced mono_array_size_t typedef. This must be used
3711 in all places an array length is expected. This is 64bits wide if
3712 MONO_BIG_ARRAYS is enabled.
3714 Patch by Luis F. Ortiz.
3715 Contributed under X11 license.
3716 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3718 2008-05-27 Zoltan Varga <vargaz@gmail.com>
3720 * security-manager.c class.c: Set the class exception info by calling
3721 mono_class_set_failure ().
3723 * class.c (mono_class_get_exception_data): New accessor function.
3724 (mono_class_set_failure): Store exception_data in the property hash.
3726 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
3727 the struct as a property.
3729 * loader.c (mono_get_method_full): Store the lookup result for method
3730 tokens in method_cache, the others in methodref_cache to decrease the memory
3731 usage of hash tables.
3733 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
3734 (mono_image_init): method_cache is lazy inited now.
3736 * metadata-internals.h (struct _MonoImage): Change method_cache to
3737 a MonoValueHashTable, add a separate methodref_cache.
3739 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
3741 * number-formatter.h: Fix tables to avoid arithemtic overflow in
3742 Double.ToString as exposed by Bug #383531.
3744 2008-05-26 Zoltan Varga <vargaz@gmail.com>
3746 * number-formatter.h: Make some tables static.
3748 * class.c (mono_method_set_generic_container): New accessor function.
3749 (mono_method_get_generic_container): Ditto.
3751 * class-internals.h (struct _MonoMethod): Remove rarely used
3752 'generic_container' field, store it in the property hash instead. Add
3753 'is_generic' boolean field instead.
3755 * image.c (mono_image_init): Initialize property_hash.
3756 (mono_image_close): Destroy property_hash.
3758 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
3759 hold rarely used fields of runtime structures belonging to this image.
3761 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
3762 to get/set method->generic_container.
3764 * loader.c (mono_get_method_from_token): Avoid loading the method header for
3767 2008-05-25 Zoltan Varga <vargaz@gmail.com>
3769 * class.c (mono_class_inflate_generic_method_full): Don't increase
3770 mono_stats.inflated_method_count for methods found in the cache.
3772 * threads.c (mono_thread_request_interruption): Add a comment about
3775 2008-05-24 Zoltan Varga <vargaz@gmail.com>
3777 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
3778 interface_offsets_packed table.
3780 * class.c (mono_class_init): Remove some dead code.
3782 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
3783 mono_class_setup_vtable () when CAS is active to detect security problems.
3785 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
3787 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
3789 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
3790 parameters as it's irrelevant for delegate checking.
3792 2008-05-23 Zoltan Varga <vargaz@gmail.com>
3794 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
3796 * class.c (mono_class_init): Control the creation of a generic vtable using
3797 a global which is true by default, but set to false by the runtime startup code.
3799 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
3800 Disabled for now since it breaks the embedding API.
3801 Move the setup of class->methods for arrays to mono_class_setup_methods ().
3802 (mono_class_setup_methods): Add a memory barrier.
3804 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
3805 when mono_class_init () doesn't compute the generic vtable.
3807 2008-05-23 Massimiliano Mantione <massi@ximian.com>
3808 * profiler.c: Added mono_profiler_install_statistical_call_chain,
3809 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
3810 to support call chains (backtrace) in the stat profiler.
3811 * profiler.c, profiler-private.h: Likewise.
3813 2008-05-22 Mark Probst <mark.probst@gmail.com>
3815 * generic-sharing.c: Init generic class when a method of it is
3816 requested via a runtime generic context.
3818 2008-05-22 Zoltan Varga <vargaz@gmail.com>
3820 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
3822 * reflection.c (mono_type_get_object): Add a FIXME.
3824 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
3826 * class.c (mono_class_get_method_by_index): New helper function, returning an
3827 entry in the class->methods array.
3829 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3831 * class.c (mono_class_init): Only do the array optimization for szarrays.
3832 Avoid creating a generic vtable for generic instances as well.
3833 (mono_class_get_method_from_name_flags): Don't search in the metadata for
3836 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
3838 * loader.c (mono_get_method_constrained): Inflate the signature
3839 with class context. Fix #325283.
3841 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3843 * object.c (mono_class_create_runtime_vtable): Add a comment.
3845 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
3847 (setup_interface_offsets): Handle the case when this is called twice for arrays.
3848 (mono_class_setup_vtable_general): Add an assert.
3849 (mono_class_init): Avoid creating a generic vtable for arrays.
3851 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
3852 here, let mono_class_init () do that.
3854 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
3855 interfaces in mscorlib.
3857 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
3858 interfaces. Add some comments.
3859 (mono_class_init): Call mono_class_setup_methods () here since it is no
3860 longer called by mono_class_setup_vtable ().
3862 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
3863 not set in class->vtable.
3864 (mono_class_create_runtime_vtable): Reenable the disabled code.
3866 * object.c (mono_class_create_runtime_vtable): Disable the last change for
3867 now as it causes some test failures.
3869 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
3870 if using the vtable trampoline. Also remove some strange code which put the
3871 generic methods themselves into the vtable slots. Remove the AOT init_vtable
3872 stuff as it is no longer needed.
3874 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
3876 * pedump.c: Give make --verify all option check code as well.
3877 Using --verify code won't check for metadata now.
3879 2008-05-19 Martin Baulig <martin@ximian.com>
3881 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
3884 (_mono_debug_using_mono_debugger): New global variable; it's set
3885 directly by the debugger, so mono_debug_using_mono_debugger() also
3886 works after attaching.
3888 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
3890 * object.c (mono_class_create_runtime_vtable): Use memory barriers
3891 as we do double checked locking on MonoClass::runtime_info and
3892 MonoClassRuntimeInfo::domain_vtables.
3894 2008-05-18 Zoltan Varga <vargaz@gmail.com>
3896 * debug-helpers.c (print_field_value): Fix a warning.
3898 2008-05-16 Zoltan Varga <vargaz@gmail.com>
3900 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
3901 set in the AOT case.
3903 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
3905 * class.c (mono_class_setup_vtable_general): Use memory barriers
3906 as we do double checked locking on MonoClass::vtable.
3908 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
3910 * reflection.c (resolve_object): Inflate only if the generic context
3911 is not null. Fixes #389886.
3913 2008-05-15 Jonathan Chambers <joncham@gmail.com>
3915 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
3918 Code is contributed under MIT/X11 license.
3920 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
3922 * class.c: Revert unrelated change.
3924 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
3926 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
3927 a generic instantiation, use mono_class_from_mono_type instead of playing
3928 with MonoType directly.
3930 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
3932 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
3933 checks must ignore generic instantiations, so mono_class_has_parent is not
3934 suitable. Fixes #390128.
3936 2008-05-14 Zoltan Varga <vargaz@gmail.com>
3938 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
3939 it to avoid registering tokens during metadata generation. Fixes #390023.
3941 2008-05-14 Kornél Pál <kornelpal@gmail.com>
3943 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
3946 Contributed under MIT/X11 license.
3948 2008-05-14 Kornél Pál <kornelpal@gmail.com>
3950 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
3951 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
3952 to fixup the EXE image.
3953 (mono_cleanup): Use mono_close_exe_image.
3954 (mono_close_exe_image): New function.
3955 * image.c: Include "marshal.h".
3956 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
3957 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
3958 counting when the image is loaded outside of mono_image_open_full. Set status
3959 based on GetLastError.
3960 * coree.c: Include required headers. Add init_from_coree.
3961 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
3962 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
3963 (_CorExeMain): Set init_from_coree.
3964 (CorExitProcess): Only call ExitProcess for now.
3965 (CorBindToRuntimeEx): New stub implementation.
3966 (CorBindToRuntime): New function.
3967 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
3968 (MonoFixupExe): ILONLY executables require no fixups.
3969 (mono_set_act_ctx): New function to set activation context.
3970 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
3971 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
3972 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
3973 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
3975 * domain-internals.h: Add mono_close_exe_image.
3977 Contributed under MIT/X11 license.
3979 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
3981 * metadata.c (mono_metadata_compute_size): Correctly calculate field
3982 size for generic param and event tables. Fixes #388977.
3984 2008-05-13 Zoltan Varga <vargaz@gmail.com>
3986 * loader.c (mono_method_signature): Use memory barriers because of the double
3987 checked locking pattern.
3989 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
3990 aborting or aborted as well. Fixes #376391.
3992 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
3993 existing runtime state in the Suspend handler during shutdown.
3995 2008-05-12 Zoltan Varga <vargaz@gmail.com>
3997 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
3999 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
4000 which are starting up or shutting down.
4002 * threads.c (mono_threads_set_shutting_down): Don't return a value since
4003 this function never returns if the runtime is already shutting down.
4005 * icall.c (ves_icall_System_Environment_Exit): Update after
4006 mono_threads_set_shutting_down () signature change.
4008 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
4010 * class.c: Added can_access_instantiation to verify if the instantiation
4011 is visible. Fix access check for nested types as they returned TRUE
4012 before doing type and generic instantiation visibility checks.
4014 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
4016 * reflection.c (mono_reflection_create_generic_class): The created type
4017 must have a different container from its TypeBuilder. Otherwise they
4018 will end sharing generic arguments, which is wrong.
4020 Due to the sharing, making a generic instance of the created type using
4021 the TypeBuider generic arguments resulted in the generic type definition
4022 been returned, which is wrong as well.
4024 As a bonus the code was leaking the type_params array. This memory should
4025 be allocated from the image mempool.
4027 This fixes bug #354047.
4029 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
4031 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
4032 to here as they are now used in assembly.c new code.
4033 Added a skipverification flag to MonoAssembly.
4034 New internal function mono_assembly_has_skip_verification.
4036 * assembly.c: New function mono_assembly_has_skip_verification. It checks
4037 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
4040 2008-05-07 Zoltan Varga <vargaz@gmail.com>
4042 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
4043 needed. Fixes #387034.
4045 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
4047 2008-05-06 Miguel de Icaza <miguel@novell.com>
4049 * assembly.c (mono_assembly_load_reference): Prevent crash while
4050 disassembling Silverlight 2.0 executables while we still do not
4051 have GACed libraries.
4053 2008-05-07 Zoltan Varga <vargaz@gmail.com>
4055 * reflection.c: Special case generic type definitions as well. Fixes #383444.
4057 2008-05-06 Zoltan Varga <vargaz@gmail.com>
4059 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
4060 of the dynamic case. Fixes #387404.
4062 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4064 *verify.c (mono_verifier_is_class_full_trust): If under
4065 verify_all and the verifier mode was not set, only
4066 gac and corlib types are fulltrust. This makes --verify-all
4067 usable to detect unverifiable code, which is the expected
4070 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4072 * verify.h: Ops, commited the header with debug
4075 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4077 * verify.c (merge_stack): Use the new value on unverifiable
4080 * verify.c (verify_type_compatibility_full): Comparison
4081 of nullable types can't use mono_class_is_assignable_from.
4083 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
4084 that makes all verification errors be reported.
4086 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
4089 2008-05-05 Robert Jordan <robertj@gmx.net>
4091 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
4092 support for value types. See #386415.
4094 * object.c: comments.
4096 Code is contributed under MIT/X11 license.
4098 2008-05-05 Martin Baulig <martin@ximian.com>
4100 * debug-mono-symfile.h
4101 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
4102 for old pre-terrania symbol files.
4104 2008-05-05 Andreas Färber <andreas.faerber@web.de>
4106 * mono-config.c: Add ppc64 architecture.
4108 Code is contributed under MIT/X11 license.
4110 2008-05-05 Andreas Färber <andreas.faerber@web.de>
4112 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
4113 PPC64 uses function descriptors as well.
4115 Code is contributed under MIT/X11 license.
4117 2008-05-04 Zoltan Varga <vargaz@gmail.com>
4119 * object.c (compute_class_bitmap): Ignore literal static fields.
4121 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
4122 var has an invalid format.
4123 (describe_ptr): Add some sanity checks for the vtable.
4124 (add_nursery_frag): Clear unused nursery fragments.
4125 (major_collection): Clear all remaining nursery fragments.
4127 2008-05-03 Robert Jordan <robertj@gmx.net>
4129 * image.c, metadata-internals.h: add thunk_invoke_cache.
4131 * marshal.c, marshal.h: implement
4132 mono_marshal_get_thunk_invoke_wrapper ().
4134 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
4136 Code is contributed under MIT/X11 license.
4138 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
4140 * verify.c (do_leave): Empty the stack.
4142 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
4144 * class.c (mono_class_is_assignable_from): Variance
4145 doesn't work between reference and value types. For example,
4146 given type C<T+>, C<int32> is not assignable to C<object>.
4147 Break the argument checking loop on first error.
4149 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
4151 * icall.c : base64_to_byte_array() needs some more strict
4152 check for sequence of '=' characters. Patch by Santa
4153 Marta (http://deee.g.hatena.ne.jp/santamarta).
4155 Contributed under MIT/X11 license.
4156 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
4158 2008-05-02 Jonathan Chambers <joncham@gmail.com>
4160 * domain.c: Disable LoadLibrary support to fix Win32 build.
4162 Code is contributed under MIT/X11 license.
4164 2008-05-02 Zoltan Varga <vargaz@gmail.com>
4166 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
4167 to help with cache behaviour.
4169 2008-05-01 Miguel de Icaza <miguel@novell.com>
4171 * appdomain.c (mono_domain_from_appdomain): Add new accessor
4174 2008-05-01 Zoltan Varga <vargaz@gmail.com>
4176 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
4178 2008-05-01 Dick Porter <dick@ximian.com>
4180 * process.c (process_get_fileversion): Only pass 16 bits of
4181 language ID to VerLanguageName. Fixes bug 381204.
4183 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4185 * verify.c (mono_method_verify): Fix the comparison
4186 operator for code bounds check.
4188 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4190 * verify.c (mono_method_verify): Check the bounds of
4191 all access of the code array.
4193 2008-04-29 Kornél Pál <kornelpal@gmail.com>
4195 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
4197 2008-04-28 Zoltan Varga <vargaz@gmail.com>
4199 * image.c (mono_image_strong_name_position): Fix return value when the rva is
4202 2008-04-28 Kornél Pál <kornelpal@gmail.com>
4204 * loader.c (mono_get_method_from_token, mono_method_signature): Add
4205 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
4206 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
4207 fixup main EXE images when using mono.exe for mixed-mode assembly support.
4208 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
4210 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
4211 runtime initialization from metadata.
4212 * assembly.c: Remove obsolete ceGetModuleFileNameA.
4213 (mono_set_rootdir): Use mono_get_module_file_name.
4214 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
4216 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
4217 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
4218 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
4219 MonoCLIImageInfo. Add support for module handles.
4220 (load_cli_header): Update mono_cli_rva_image_map signature.
4221 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
4222 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
4223 (mono_image_rva_map): Add support for module handles.
4224 (mono_image_ensure_section_idx): Add support for module handles.
4225 (mono_image_close): Add support for module handles.
4226 (do_load_header): Add support for module handles.
4227 (mono_image_open_from_module_handle): New function for internal use.
4228 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
4229 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
4230 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
4232 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
4233 * image.h: Add mono_image_fixup_vtable.
4234 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
4236 * coree.h: New file.
4237 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
4238 unsupported native code.
4239 (mono_marshal_set_callconv_from_modopt): New function splitted from
4240 mono_marshal_get_managed_wrapper.
4241 (mono_marshal_get_managed_wrapper): Use
4242 mono_marshal_set_callconv_from_modopt.
4243 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
4244 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
4245 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
4246 that results in a deadlock when the runtime is loaded in _CorDllMain.
4247 * Makefile.am: Add coree.c and coree.h.
4249 Contributed under MIT/X11 license.
4251 2008-04-28 Mark Probst <mark.probst@gmail.com>
4253 * generic-sharing.c: Search for type arguments in array element
4256 2008-04-28 Mark Probst <mark.probst@gmail.com>
4258 * class-internals.h, generic-sharing.c: New, small runtime generic context.
4260 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
4262 * object.c: Don't setup the RGCTX when the vtable is created,
4263 because we're setting it up lazily now.
4265 2008-04-26 Zoltan Varga <vargaz@gmail.com>
4267 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
4270 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
4272 * verify.c (verify_class_for_overlapping_reference_fields):
4273 If class is under fulltrust allow reference types to overllap
4274 if they have the same RVA.
4276 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
4278 * pedump.c: Added new flag valid-only, that makes the verifier
4279 behaves just like --security=validil. It won't fail type load
4280 due to unverifiable restrictions.
4282 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
4284 * class-internals.h (struct MonoMethod): Added a verification_success
4285 field to cache verifier executions. Reduced MonoMethod:slot size by
4288 2008-04-23 Zoltan Varga <vargaz@gmail.com>
4290 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
4291 instead of a 'vt' argument to save an indirection and to allow these to be used
4293 (scan_vtype): New helper function to scan an area using a gc descriptor.
4294 (mono_gc_wbarrier_value_copy): Implement this.
4295 (handle_remset): Add support for REMSET_VTYPE.
4296 (find_in_remset_loc): Ditto.
4297 (mono_gc_base_init): Allow some debugging options to be controlled through the
4298 use of the MONO_GC_DEBUG env variable.
4299 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
4300 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
4302 2008-04-23 Martin Baulig <martin@ximian.com>
4304 * domain.c (mono_domain_create): Move the call to
4305 mono_debug_domain_create() down, after allocating the domain id.
4307 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
4309 verify.c (verify_class_for_overlapping_reference_fields): Skip
4310 static fields while verifying for overlapping fields as they
4311 don't matter at all.
4313 2008-04-23 Marek Habersack <mhabersack@novell.com>
4315 * domain-internals.h: added a declaration of
4316 mono_make_shadow_copy.
4318 * assembly.c (mono_assembly_open_full): shadow copying of
4319 assemblies moved to here, so that all the assemblies within the
4320 application domain's private binary directories can be
4321 processed. Fixes bug #380546
4323 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
4324 mono_make_shadow_copy and made non-static. The decision whether
4325 to shadow-copy an assembly is made based on its location - it's
4326 copied if it's in one of the private application domain binary
4327 directories and its different to the target file in the shadow
4328 directory. Fixes bug #380546
4330 2008-04-22 Zoltan Varga <vargaz@gmail.com>
4332 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
4334 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
4337 * reflection.c (mono_image_create_token): Handle
4338 Method/ConstructorOnTypeBuilderInst.
4339 (resolve_object): Ditto.
4340 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
4341 so it can be called from resolve_object. Also handle the case when the inflated
4342 class already has its methods setup.
4344 2008-04-21 Martin Baulig <martin@ximian.com>
4346 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
4348 2008-04-20 Geoff Norton <gnorton@novell.com>
4350 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
4351 pointer dereference.
4353 2008-04-15 Marek Habersack <mhabersack@novell.com>
4355 * appdomain.c (try_load_from): if IOMAP is in effect, call the
4356 portability API to look up the assembly file. Fixes behavior in
4357 situations when the application has a bin/ directory, but the
4358 assembly search patch refers to Bin/ (and thus the requested file
4359 name is Bin/SomeLibrary.dll). Fixes bug #379888
4361 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
4363 verify.c (mono_type_is_generic_argument): Extracted this check
4364 from a dozen places to here.
4366 verify.c: Fixed all issues related to boxing generic arguments
4367 and their constraints.
4369 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
4371 verify.c (mono_class_interface_implements_interface): Fix win32 build.
4373 2008-04-14 Zoltan Varga <vargaz@gmail.com>
4375 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
4376 isn't finished yet. Fixes #363447.
4378 2008-04-13 Zoltan Varga <vargaz@gmail.com>
4380 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
4383 2008-04-13 Jb Evain <jbevain@novell.com>
4385 * domain.c: update the 2.1 profile versions.
4386 Merged from the Moonlight 2 branch.
4388 2008-04-12 Zoltan Varga <vargaz@gmail.com>
4390 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
4391 mscorlibs for the non-refonly case as well.
4393 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
4394 in mono_assembly_load_from_full (). Fixes #378924.
4396 2008-04-11 Geoff Norton <gnorton@novell.com>
4398 * icall.c: The global extern environ doesn't exist on Mac. We
4399 need to call NSGetEnviron instead.
4401 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4403 verify.c: Add generic method constraint verification.
4405 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4407 class.c (mono_class_inflate_generic_method_full): Add a long
4408 explanation to the is_mb_open hack. Remove the FIXME.
4410 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4412 * verify.c (mono_method_verify): Mark all unknown opcodes
4413 as invalid. Mark jmp as unverifiable.
4415 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4417 * verify.c: Add code to do type constraint verification on class instances.
4419 * verify.c (mono_verifier_verify_class): Use the type constraint
4422 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
4424 * class.c (mono_class_get_field_default_value): Don't pass cindex
4425 as hint to mono_metadata_get_constant_index. The local is not initialized
4426 and should contain garbage most of the time. This could only work
4429 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
4431 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
4433 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
4435 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
4437 * class.c (mono_class_from_generic_parameter): Save the token of the
4438 generic param in MonoClass::sizes.generic_param_token.
4440 * reflection.c (mono_custom_attrs_from_class): If the class type is
4441 VAR or MVAR retrieve the attributes of the generic param.
4443 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
4445 * class.c (mono_class_init): Do class verification if the verifier
4448 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
4450 * verify-internal.h: Added mono_verifier_verify_class.
4452 * verify.c: Added mono_verifier_verify_class. It checks for
4453 classes with explicit layout that have overlapping reference fields.
4455 * pedump.c: Init the verifier state prior to verification. Fixed
4456 command line arguments.
4458 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
4460 * Makefile.am: Added verify-internals.h, hopefully fix the build.
4462 2008-04-08 Zoltan Varga <vargaz@gmail.com>
4464 * verify-internals.h: Fix a warning.
4466 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
4468 * verify-internals.h: New header with the verifier configuration
4469 extracted from mini.c.
4471 * verify.c: Implemented the new functions exported by verify-internals.h.
4473 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
4475 * verify.c: Add proper verification of ckfinite.
4477 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4479 * verify.c (do_conversion): Improved error message to something
4482 * verify.c (check_is_valid_type_for_field_ops): Fix to work
4483 with primitive types.
4485 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4487 * verify.c: Added tail prefix checking. Marked icall
4490 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
4492 * verify.c: Fix the detection of branches to the middle
4495 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
4497 * verify.c: Implemented verification of volatile. and
4498 unaligned. prefix. Check if a type is valid after retrieving it.
4500 2008-04-01 Dick Porter <dick@ximian.com>
4502 * process.c (process_get_fileversion): If there's no string block,
4503 set the file language to en_US. Fixes the other new part of bug
4506 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
4508 * class.c: New functions mono_method_can_access_field_full and
4509 mono_method_can_access_method_full. They perform type visibility
4510 and type site check.
4512 * class-internal.h: Added exported functions.
4514 * verify.c: Use new functions to implement proper visibility checks.
4516 2008-03-29 Zoltan Varga <vargaz@gmail.com>
4518 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
4520 2008-03-28 Dick Porter <dick@ximian.com>
4522 * process.c (process_get_fileversion): Use the first language ID
4523 we see, rather than insisting on an invariant language. Fixes bug
4526 2008-03-28 Zoltan Varga <vargaz@gmail.com>
4528 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
4529 the streams to fix reading of invalid memory later.
4531 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
4534 2008-03-26 Zoltan Varga <vargaz@gmail.com>
4536 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
4537 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
4539 2008-03-26 Massimiliano Mantione <massi@ximian.com>
4540 * threads.h: Added MonoThreadManageCallback type and
4541 mono_thread_set_manage_callback prototype
4542 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
4543 (used to store the mono_thread_manage callback).
4544 * threads.c: Added mono_thread_set_manage_callback, and handle
4545 "MonoThread->manage_callback" in build_wait_tids.
4547 2008-03-26 Dick Porter <dick@ximian.com>
4549 * process.c (process_get_fileversion): Set FileVersionInfo strings
4550 to Empty when the resource doesn't have the particular info.
4553 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
4555 * verify.c (mono_method_verify): Proper prefix validation.
4557 2008-03-25 Zoltan Varga <vargaz@gmail.com>
4559 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
4560 itself in a separate argument instead of throwing them. Fixes #373448.
4562 * appdomain.c: Bump corlib version.
4564 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
4566 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
4568 2008-03-20 Kornél Pál <kornelpal@gmail.com>
4570 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
4573 2008-03-20 Mark Probst <mark.probst@gmail.com>
4575 * generic-sharing.c, class-internals.h: Code for putting
4576 reflection types into the runtime generic context.
4578 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
4580 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
4584 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
4586 * verify.c (VerifyContext): Added instruction prefix data to the struct.
4588 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
4590 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
4592 * verify.c (do_cast): Let the result value keep the boxed status.
4594 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
4596 2008-03-17 Jb Evain <jbevain@novell.com>
4598 * reflection.c: when running on a 2.0 runtime, emit
4599 unconditionally the #~ header version as 2.0, and the
4600 CLI header version as 2.5, for symmetry's sake with csc.
4602 2008-03-16 Zoltan Varga <vargaz@gmail.com>
4604 * class.c: Remove the unused cache_interface_offsets stuff.
4606 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
4607 profiler.c: Fix warnings.
4609 2008-03-16 Mark Probst <mark.probst@gmail.com>
4611 * generic-sharing.c, class-internals.h: Support for putting
4612 methods into the runtime generic context.
4614 2008-03-16 Zoltan Varga <vargaz@gmail.com>
4616 * class.c (mono_class_setup_fields): Ignore calls made to this function for
4617 classes which are generic instances of not-yet finished typebuilders. Fixes
4620 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
4622 2008-03-15 Zoltan Varga <vargaz@gmail.com>
4624 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
4626 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
4627 field, replace it with a hash table in MonoDynamicImage.
4629 * reflection.c (inflate_mono_method): Access the generic definition object from
4630 image->generic_def_objects instead of imethod->reflection_info.
4632 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
4634 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
4636 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
4637 function in reflection.c so it is easier to keep in sync with the dynamic image
4640 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
4641 mono_image_close ().
4643 2008-03-15 Mark Probst <mark.probst@gmail.com>
4645 * class.c (mono_class_generic_sharing_enabled): Disable generic
4646 sharing for all architectures except AMD64 and x86 to fix build.
4648 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
4650 * verify.c: Use the generic definition MonoGenericContext when available.
4651 Remove code for checking generics instance compatibility in favor of
4652 mono_class_is_assignable_from.
4654 2008-03-14 Mark Probst <mark.probst@gmail.com>
4656 * marshal.c, marshal.h, metadata-internals.h, image.c,
4657 wrapper-types.h: New wrapper for invoking a shared static method
4658 without having to pass the runtime generic context argument.
4660 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
4662 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
4664 2008-03-14 Zoltan Varga <vargaz@gmail.com>
4666 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
4668 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
4669 create a token from a FieldOnTypeBuilderInst.
4670 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
4671 (resolve_object): Ditto.
4673 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
4674 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
4676 2008-03-14 Martin Baulig <martin@ximian.com>
4678 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
4680 * debug-mono-symfile.h
4681 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
4682 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
4684 2008-03-10 Martin Baulig <martin@ximian.com>
4686 * debug-mono-symfile.h
4687 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
4688 `lexical_block_table_offset'.
4689 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
4691 (MonoSymbolFile): Added `version'.
4694 (MonoDebugLexicalBlockEntry): Removed.
4695 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
4698 * mono-debug.c (mono_debug_add_method): Don't compute lexical
4699 blocks here; the debugger now does this internally.
4701 2008-02-27 Martin Baulig <martin@ximian.com>
4703 * object.c (mono_runtime_exec_main): Call
4704 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
4705 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
4707 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
4709 * verify.c (verify_type_compatibility_full): Allow native int to be converted
4710 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
4712 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
4714 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
4715 ldftn with a virtual method.
4717 2008-03-13 Geoff Norton <gnorton@novell.com>
4719 * decimal.c: Only include memory.h if the platform has it.
4721 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
4723 * assembly.c, class.c, metadata-internals.h: make sure public key
4724 tokesns are compared in a case-insensitive way. Also, all
4725 the lookups in the GAC use a lowercase public key token
4726 (gaacutil already does the lowercasing on install). Fixes
4729 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
4731 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
4734 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
4736 * image.c: when someone loads a mscorlib from a file, return the
4737 currently loaded mscorlib (fixes bug #369253).
4739 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
4741 * class.c: handle types with no parents by forcing them to have
4742 System.Object as a parent and marking them as broken (this currently
4743 allows the first part of bug #369173 to work as well, likely because
4744 we don't check for typeload exceptions everywhere yet).
4746 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
4748 * class.c: more complete check that types belong to corlib
4749 (fixes second part of bug #369173).
4751 2007-03-10 Bill Holmes <billholmes54@gmail.com>
4753 * generic-sharing.c: Including glib.h for the MSVC builds to define
4754 "inline" to "__inline" before including mono-membar.h.
4756 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
4757 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
4760 Contributed under MIT/X11 license.
4762 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
4764 * verify.c (do_invoke_method): Remove return type validation.
4766 * verify.c (do_ret): Do return type validation at return site instead of
4769 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
4771 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
4773 * verify.c: Some todos cleaned and improved a few error messages.
4775 2008-03-08 Zoltan Varga <vargaz@gmail.com>
4777 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
4779 2008-03-07 Zoltan Varga <vargaz@gmail.com>
4781 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
4782 system types correctly.
4784 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
4787 2008-03-06 Zoltan Varga <vargaz@gmail.com>
4789 * assembly.c (build_assembly_name): Fix a warning.
4791 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
4793 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
4794 the called function takes an object type argument. Fixes storing or
4795 valuetypes across remoting as well as reducing memory usage.
4796 * image.c, metadata-internals.h: remove now unused ldfld_remote and
4797 stfld_remote wrapper caches.
4799 2008-03-06 Zoltan Varga <vargaz@gmail.com>
4801 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
4804 * reflection.c (mono_image_register_token): New helper function to save
4805 a token->object mapping.
4807 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
4810 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
4811 one dimension arrays. Fixes #367670.
4812 (mono_reflection_get_type_internal): Ditto.
4814 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4816 * marshal.c: mono_load_remote_field_new() always returns object.
4817 so use the proper signature (fixes bug #366445).
4819 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4821 * class-internals.h (MonoMethod): Remove unused uses_this flag,
4822 add an 'inline_failure' flag instead.
4824 2008-03-04 Mark Probst <mark.probst@gmail.com>
4826 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
4827 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
4828 contains the location of "this", used for exception handling.
4830 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4832 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
4833 their size on all platforms for perf reasons.
4835 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4837 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
4840 * object-internal.h: Same.
4842 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4844 * reflection.h: Fix the build I just broke.
4846 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4848 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
4849 Test if a token is valid, this remove explicit usage of
4850 MonoDynamicImage::tokens from the verifier code.
4852 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
4854 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
4855 instead of direct access to MonoDynamicImage::tokens.
4857 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4859 * verify.c (token_bounds_check): Fix the build I just broke.
4861 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4863 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
4865 * verify.c (verifier_load_method): Fixed the errors message.
4867 * verify.c (mono_method_verify): Fixed a debug message.
4869 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
4871 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
4872 mono-perfcounters.h, class-internals.h: support for predefined
4873 writable counters, query of categories and counters, bugfixes.
4875 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
4877 * verify.c (do_refanytype): Verify the refanytype opcode.
4879 * verify.c (mono_method_verify): Use do_refanytype.
4881 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
4883 * verify.c (do_mkrefany): Verify the mkrefany opcode.
4885 * verify.c (mono_method_verify): Use do_mkrefany.
4887 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
4889 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
4890 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
4893 2008-02-27 Zoltan Varga <vargaz@gmail.com>
4895 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
4896 the type load exception.
4898 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
4900 * verify.c: Added a few FIXME for method signatures
4902 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
4903 of mono_method_get_signature and get vararg call working. Removed unused
4904 checks for return value.
4906 * verify.c (do_refanyval): Verify the refanyval opcode.
4908 * verify.c (mono_method_verify): Implemented verification of arglist and
4911 2008-02-27 Zoltan Varga <vargaz@gmail.com>
4913 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
4914 vtypes to marshal.c.
4916 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
4917 it works for AOT as well.
4919 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
4921 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
4922 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
4923 the system time is adjusted.
4925 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
4927 * icall.c, icall-def.h: use the new time functions (fixes the
4928 non-monotonic behaviour of TickCount).
4930 2008-02-26 Zoltan Varga <vargaz@gmail.com>
4932 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
4933 it breaks the build.
4935 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
4936 cattr is not finished yet.
4938 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
4940 * verify.c: Proper token validation for field, method and type.
4942 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
4944 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
4946 * loader.c (method_from_memberref): Generate type load error instead of method missing
4947 if the type is not found.
4949 2008-02-23 Zoltan Varga <vargaz@gmail.com>
4951 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
4952 some of the conversions caused the generation of a marshal directive exception.
4954 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
4956 verify.c: Report which exception should be thrown by the JIT.
4957 Added a lot of FIXME notes.
4959 2008-02-22 Mark Probst <mark.probst@gmail.com>
4961 * generic-sharing.c: Runtime generic context slots are not
4962 instantiated on init anymore. Instead, provide function to do the
4963 instantiating on demand.
4965 * class-internals.h: Added vtable to runtime generic context.
4966 Macros for encoding direct and indirect slot offsets in one
4969 2008-02-21 Mark Probst <mark.probst@gmail.com>
4971 * object.c, generic-sharing.c: Moved some generic sharing code
4972 from object.c to generic-sharing.c.
4974 * generic-sharing.c: Added support for extensible runtime generic
4977 * metadata-internals.h: Two new hash tables in MonoImage for
4978 extensible runtime generic context support.
4980 * domain.c: Unregister generic vtables upon domain unloading.
4982 * image.c: Destroy new hash tables upon image unloading.
4984 * metadata.c: Unregister generic subclasses upon image unloading.
4986 * class-internals.h: New data structure for runtime generic
4987 context template. New fields in the runtime generic context for
4990 * Makefile.am: Added generic-sharing.c.
4992 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
4994 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
4995 there is a pending loader exception, raise it.
4997 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
5000 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
5005 2008-02-20 Zoltan Varga <vargaz@gmail.com>
5007 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
5009 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
5011 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
5012 ref-only requests for compatibility with MS.
5014 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
5016 * reflection.c (mono_custom_attrs_from_method): Don't silently
5017 return an empty list for generic method instances.
5018 (mono_custom_attrs_from_param): Likewise.
5020 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
5021 Raja R Harinath <harinath@hurrynot.org>
5024 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
5025 * class.c (mono_class_inflate_generic_method_full): Initialize it
5026 when a fully-open method is instantiated.
5027 * metadata.c (inflated_method_equal, inflated_method_hash): Update
5029 * reflection.c (inflate_mono_method): Don't create a temporary context.
5031 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
5033 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
5034 Compute correct value, to prepare for imethod->reflection_info going away.
5036 2008-02-19 Zoltan Varga <vargaz@gmail.com>
5038 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
5040 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
5042 * verify.c: Implement skip visibility flag.
5044 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
5046 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
5047 which contains an extra field to tell the kind of exception that should be thrown.
5049 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
5051 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
5053 * loader.c (mono_method_get_param_names): Initialize 'klass' after
5054 'method' is updated.
5056 2008-02-11 Zoltan Varga <vargaz@gmail.com>
5058 * class.c (mono_class_layout_fields): Set class->min_align for classes using
5059 explicit layout as well. Fixes #360375.
5061 2008-02-11 Geoff Norton <gnorton@novell.com>
5063 * loader.c: Guard and dereference against inflated generic methods
5065 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
5067 * class.c: Include Retargetable spec in assembly name.
5068 * assembly.c: Always include PublicKeyToken spec in assembly name
5069 (with value "null" if assembly is not signed), and include
5071 * icall-def.h: Added icall for Assembly.get_fullname.
5072 * icall.c: Added icall returning the fullname of an assembly.
5074 2008-02-09 Zoltan Varga <vargaz@gmail.com>
5076 * class.c (mono_class_setup_vtable_general): Add a missing call to
5077 mono_class_setup_methods () which is needed in the AOT case.
5079 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
5081 * verify.c (mono_type_get_stack_name): Added. Return the name for the
5082 stack type of the given MonoType.
5084 * verify.c (verify_type_compatibility_full): Handle the void type.
5086 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
5087 way stack merging works.
5089 * verify.c (store_local): Improved verification message.
5091 * verify.c (do_branch_op): If the merging is invalid, the method
5092 is unverifiable and not invalid. Improved error message.
5094 * verify.c (merge_stacks): Properly merge a boxed valuetype and
5095 a reference type diferent than System.Object. Improved error
5098 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
5100 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
5102 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
5103 type of an enum even if the argument is byref.
5105 * verify.c: Replace all explicit uses of enumtype and enum_basetype
5106 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
5108 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
5110 *verify.c (verify_type_compatibility_full): Make enum types
5111 compatible with their base types.
5113 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
5114 types are compatible for the special case of a boxed valuetype and
5117 * verify.c (verify_stack_type_compatibility): The function
5118 is_compatible_boxed_valuetype was extracted from here.
5120 * verify.c (push_arg): Only set ctx->has_this_store if the method
5123 * verify.c (do_ldelem): Fixed a typo in an error message and added
5124 strict check for mixing int32 and native int as the array type
5127 * verify.c (merge_stacks): Consider boxed valuetypes in the
5128 compatibility checks.
5130 2008-02-07 Massimiliano Mantione <massi@ximian.com>
5131 * profiler.h: (MonoGCEvent): Added start-stop the world events.
5133 2008-02-06 Massimiliano Mantione <massi@ximian.com>
5134 *class.c: use_new_interface_vtable_code: renamed the env var to have
5135 a "MONO_" prefix, and fix the logic to enable it by default.
5137 2008-02-06 Massimiliano Mantione <massi@ximian.com>
5139 mono_class_setup_vtable_general: rewrote the way in which interface
5140 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
5141 makes the code more maintainable.
5142 For now the old code is still there, and can be activated setting
5143 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
5145 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
5147 * verify.c: guarded some debug functions around and #ifdef.
5149 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
5151 2008-02-06 Zoltan Varga <vargaz@gmail.com>
5153 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
5154 changes for now since they seem to break too many things.
5156 2008-02-05 Mark Probst <mark.probst@gmail.com>
5158 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
5159 mono_marshal_find_nonzero_bit_offset): Added macro and function
5160 for finding the byte- and bit-offset of a bitfield within a
5163 2008-02-05 Zoltan Varga <vargaz@gmail.com>
5165 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
5166 (mono_marshal_get_struct_to_ptr): Ditto.
5168 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
5171 2008-02-03 Zoltan Varga <vargaz@gmail.com>
5173 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
5174 between methods for non-corlib types.
5176 2008-02-02 Geoff Norton <gnorton@novell.com>
5178 * loader.c (mono_method_get_param_names): Populate the parameter name for
5179 generic parameters as well. (Fixes #342536)
5181 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
5183 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
5185 * verify.c (do_invoke_method): Fix for calling with byref structs.
5187 * verify.c (do_cast): push a boxed value type based on the type token and not
5190 2008-01-31 William Holmes <billholmes54@gmail.com>
5192 * process.c (process_module_string_read): Check the size returned form
5193 VerQueryValue to avoid out of memory exception.
5195 2008-01-30 Zoltan Varga <vargaz@gmail.com>
5197 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5198 Handle properly modules which are not in the moduleref table. Fixes
5201 2008-01-29 Zoltan Varga <vargaz@gmail.com>
5203 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
5204 the dynamic case which is now in managed code.
5205 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
5207 * marshal.c (mono_string_to_bstr): Fix a warning.
5208 (init_com_provider_ms): Ditto.
5210 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
5212 * exception.c (mono_get_exception_out_of_memory): New helper function.
5214 2008-01-28 Jonathan Chambers <joncham@gmail.com>
5216 * marshal.c: Add support for BSTR marshalling
5217 using other COM systems.
5219 Code is contributed under MIT/X11 license.
5221 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
5223 * object.c (mono_runtime_invoke_array): reverted previous
5224 commit as it breaks the build.
5226 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
5228 * object.c (mono_runtime_invoke_array): Verify arguments for
5229 invalid types. Fixes #348522.
5231 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
5233 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
5234 non-final virtual calls using call.
5236 * verify.c (do_invoke): fixed some TODOs.
5238 * verify.c (push_arg): set has_this_store for "ldarga 0".
5240 2008-01-27 Zoltan Varga <vargaz@gmail.com>
5242 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
5243 which belong to an inflated class. Fixes #356531.
5245 2008-01-26 Robert Jordan <robertj@gmx.net>
5247 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
5248 which resort to FindFirstFile when a certain error condition
5249 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
5250 Code is contributed under MIT/X11 license.
5252 2008-01-24 Jonathan Chambers <joncham@gmail.com>
5254 * marshal.c (emit_marshal_string): Fix out string marshalling
5255 to use specified encoding. Fixes #323900.
5257 Code is contributed under MIT/X11 license.
5259 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
5261 * class.c (mono_class_inflate_generic_method_full): Don't modify
5262 iresult->context after cache check.
5264 2008-01-23 Zoltan Varga <vargaz@gmail.com>
5266 * class.c (mono_class_inflate_generic_method_full): Change the
5267 struct assignments to memcpy for better visibility and add some comments.
5269 2008-01-23 Dick Porter <dick@ximian.com>
5271 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
5272 procedure, and make it work on windows.
5274 2008-01-22 Zoltan Varga <vargaz@gmail.com>
5276 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
5277 a MonoReflectionTypeBuilder since it is always of that type.
5279 * reflection.c (mono_type_get_object): Remove an unneccesary check.
5281 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
5283 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
5285 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
5287 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
5289 * reflection.c (mono_reflection_create_runtime_class): Remove already created
5290 instantiations from the type cache.
5292 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5294 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
5296 * verify.c (do_unbox_value): push a controled mutability managed pointer.
5298 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5300 * verify.c (do_ldstr): added, verifies if the #US token is valid.
5302 * verify.c (mono_method_verify): removed old TODO
5304 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5306 * verify.c (do_newobj): add visibility check.
5308 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5310 * verify.c (do_load_function_ptr): add visibility check.
5312 2008-01-21 Massimiliano Mantione <massi@ximian.com>
5314 mono_generic_class_get_class: hook profiler events.
5315 mono_field_get_offset: added to support heap-shot in the new profiler.
5316 *class.h: exported mono_field_get_offset.
5318 mono_reflection_setup_internal_class: hook profiler events.
5320 2008-01-20 Zoltan Varga <vargaz@gmail.com>
5322 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
5323 argument here too and use it to avoid checking for pending exceptions if
5326 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
5328 * assembly.c (build_assembly_name): add arg for passing the assembly
5329 flags. Do not consider a PublicKey with value "null" valid.
5330 (mono_assembly_name_parse_full): added boolean argument that will be
5331 set if the assembly name contains a PublicKeyToken spec. Added support
5332 for the Retargetable spec for which only Yes or No are allowed as valid
5333 value. Consider assembly name invalid if Retargetable spec is set, but
5334 either version, culture or public key (token) are not specified.
5335 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
5336 with implementation in assembly.c.
5337 * icall.c (fill_reflection_assembly_name): also copy assembly flags
5338 from MonoAssemblyName.
5339 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
5340 introduced argument for mono_assembly_name_parse_full to know if the
5341 assembly name has a PublicKeyToken spec, and if it has instruct
5342 fill_reflection_assembly_name to use default value for keyToken (if
5343 PublicKeyToken is null).
5345 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
5347 * verify.c (mono_method_verify): fixed ovf ops with
5348 float values. They are unverifiable now.
5350 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
5352 * class.c (set_failure_from_loader_error): add BadImageException to the
5353 list of exceptions that can cause a type to fail to load.
5355 * class.c (mono_class_get_exception_for_failure): same.
5357 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
5359 * verify.c (in_any_exception_block): added, check if offset
5360 is part of any exception handling clause.
5362 * verify.c (get_stack_type): added VAR and MVAR types.
5364 * verify.c (do_stobj): better error messages.
5366 * verify.c (do_cpobj): added, check cpobj.
5368 * verify.c (do_initobj): added, check initobj.
5370 * verify.c (do_sizeof): added, check sizeof.
5372 * verify.c (do_localloc): added, check localloc.
5374 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
5376 2008-01-17 Zoltan Varga <vargaz@gmail.com>
5378 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
5379 save_lmf/restore_lmf opcodes.
5381 * threads.c (mono_threads_install_notify_pending_exc): New function to
5382 install a callback notifying the JIT there is a pending exception on a thread.
5383 (mono_thread_request_interruption): Call the new callback.
5384 (mono_thread_get_and_clear_pending_exception): New function to return the
5385 exception pending on a thread.
5387 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
5388 to turn off checking for pending exceptions.
5389 (mono_marshal_get_native_wrapper): Ditto.
5391 2008-01-16 Zoltan Varga <vargaz@gmail.com>
5393 * threads-types.h: Get rid of the unnecessary extern declarations.
5395 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
5397 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
5398 return field from parent class if not private.
5399 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
5400 returns fields from parent class if they are not private.
5401 (method_nonpublic): added function to determine if a given method
5402 should be considered non-public. Returns false for private methods
5403 on parent class, and internal methods from parent on the 1.0 profile.
5404 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
5405 use method_nonpublic function to determine whether method should be
5407 (property_accessor_public): use newly introduced method_nonpublic
5408 function to determine whether accessor is non-public.
5409 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
5410 event from parent class if not private. Only return static event if
5411 Static flag is set, and only return static event from parent class if
5412 FlattenHierarchy flag is set.
5413 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
5414 include non-private events from parent class.
5416 2008-01-16 Zoltan Varga <vargaz@gmail.com>
5418 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
5421 2008-01-16 Wade Berrier <wberrier@novell.com>
5423 * security.c: Add assembly.h header to appease some warnings
5425 2008-01-16 Dick Porter <dick@ximian.com>
5427 * process.c (process_module_string_read): Remove trailing null
5430 2008-01-16 Mark Probst <mark.probst@gmail.com>
5432 * class-internals.h: A new data structure describing the layout of
5433 a runtime generic context (MonoRuntimeGenericContextTemplate).
5435 * metadata-internals.h: Added a hash table to MonoDomain that maps
5436 from open generic classes to their runtime generic context
5439 * object.c: Building of the runtime generic context, including
5440 proper handling of generic type arguments of superclasses.
5441 Building of the runtime generic context according to the template.
5443 2008-01-15 Zoltan Varga <vargaz@gmail.com>
5445 * class.c (mono_class_setup_fields): Set field.count for generic instances.
5448 * image.c (do_mono_image_open): Pass TRUE as last_exists to
5449 mono_portability_find_file (). Fixes #325466.
5450 (mono_image_get_public_key): Fix a warning.
5452 2008-01-14 Zoltan Varga <vargaz@gmail.com>
5454 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
5456 (mono_class_from_name_case): Ditto.
5458 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
5460 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
5461 common storage for the tables used in the System/NumberFormatter class.
5463 2008-01-13 Zoltan Varga <vargaz@gmail.com>
5465 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
5467 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
5469 * verify.c (get_boxable_mono_type): check if the token is valid.
5471 * verify.c (set_stack_value): changed to add an error if an
5472 invalid type is set on stack. Changed all callers due to signature change.
5474 * verify.c (do_stobj): implement stobj validation.
5476 2008-01-11 Zoltan Varga <vargaz@gmail.com>
5478 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
5479 set container->is_method, it was set earlier.
5481 * metadata.c (type_in_image): Handle MVARs which belong to not finished
5484 * reflection.c (mono_reflection_initialize_generic_parameter): Set
5485 is_method of the generic container to TRUE for methods.
5487 2008-01-10 Zoltan Varga <vargaz@gmail.com>
5489 * metadata.c (type_in_image): Handle type parameters properly.
5491 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
5492 memory ownership of this structure.
5494 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
5496 * verify.c (get_boxable_mono_type): make typedref types been just
5497 unverifiable. check for void type.
5499 * verify.c (do_unbox_any): added, verify opcode unbox.any.
5501 * verify.c (do_load_function_ptr): accept method spec tokens.
5503 2008-01-10 Zoltan Varga <vargaz@gmail.com>
5505 * marshal.c (mono_class_native_size): Always set *align even if this is called
5508 2008-01-09 Zoltan Varga <vargaz@gmail.com>
5510 * verify.c (mono_verify_corlib): Remove this as it was not used and was
5513 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5515 * verify.c: removed some old unused tables. A huge bunch of small fixes
5516 to things found while testing the verifier with mono basic.
5518 * verify.c (dump_stack_value): dump null literal flag to.
5520 * verify.c (verify_type_compatibility_full): fix comparison
5521 for types that have a generic super type.
5523 * verify.c (verify_stack_type_compatibility): fix compatibility
5524 between null literals and reference types. fix compatibility between
5525 boxed valuetypes and object. fix corner case test for enums.
5527 * verify.c (do_cmp_op): proper verification of cgt.un in case
5530 * verify.c (do_invoke_method): fix error message.
5532 * verify.c (do_store_indirect
5534 * verify.c (check_is_valid_type_for_field_ops): proper verification
5535 of managed pointers to valuetypes and boxed valuetypes. proper verification
5538 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
5539 allow token to be a reference type.
5541 * verify.c (do_cast): proper handling of boxes valuetypes.
5543 * verify.c (do_stelem): proper handling of storing a boxed valuetype
5546 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
5547 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
5548 fixed the decoding of unbox_any
5550 2008-01-08 Zoltan Varga <vargaz@gmail.com>
5552 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
5554 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
5556 * verify.c (do_newobj): do delegate verification.
5558 * verify.c (verify_delegate_compatibility): perform delegate
5561 * verify.c (verify_ldftn_delegate): perform tests related to
5564 * verify.c (mono_delegate_signature_equal): perform the
5565 slightly diferent signature comparison required by delegates.
5567 * metadata.c (mono_metadata_type_equal_full): added and exported
5568 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
5569 allows signature only comparison.
5571 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
5574 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
5576 * verify.c: added a bunch of stack_slot_* functions to
5577 make access to stack slot type easier. This is required to
5578 allow optional flags, like null literal, boxed value and
5580 All access paths to IlStackDesc::stype have been changed
5581 to use these new funcions.
5582 Removed a bunch of unused functions and cleared all warnings.
5583 This patch introduces the usage of the this pointer and
5586 2008-01-07 Zoltan Varga <vargaz@gmail.com>
5588 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
5590 2008-01-06 Zoltan Varga <vargaz@gmail.com>
5592 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
5593 match managed version.
5595 * appdomain.c: Bump corlib version.
5597 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
5600 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
5602 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
5603 Set public key token to zero-length byte array if assembly is not
5606 2008-01-05 Zoltan Varga <vargaz@gmail.com>
5608 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
5609 writing a vtype array elem.
5611 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
5613 * assembly.c (build_assembly_name): return FALSE if length of token is
5614 not 16 (if not "null").
5615 (mono_assembly_name_parse_full): return FALSE if value of version,
5616 culture, token or key is 0.
5617 * icall.c (fill_reflection_assembly_name): add boolean arguments to
5618 specify whether public key and public key token must be set to default
5619 value (zero-length byte array) if not available. Set versioncompat to
5620 SameMachine. If public key is available or the default is set, then
5622 (ves_icall_System_Reflection_Assembly_FillName): if no public key
5623 is available, use empty byte array as default value. On the 2.0
5624 profile, use default value for public key token if not set.
5625 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
5626 profile, use default value for public key if not set. On the 2.0
5627 profile, use default value for public key token if not set.
5628 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
5629 default values for public key and public key token.
5631 2008-01-05 Zoltan Varga <vargaz@gmail.com>
5633 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
5634 field to keep it in synch with the managed object.
5636 * marshal.c (emit_marshal_object): Add support for byref marshalling of
5637 delegates. Fixes #351520.
5639 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
5640 contains defined memory.
5642 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
5644 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
5646 * sgen-gc.c (check_consistency): New helper function to do a consistency check
5647 of the GC data structures.
5649 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
5651 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
5653 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
5655 (mono_array_clone_in_domain): Ditto.
5656 (mono_array_clone_in_domain): Ditto.
5658 * threads.c (start_wrapper): Register the thread start argument as a GC root.
5659 (cache_culture): Use a write barrier.
5661 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
5662 (ves_icall_get_property_info): Ditto.
5664 * object.h (MONO_STRUCT_SETREF): New macro.
5666 * class-internals.h (MonoStats): Add some GC statistics.
5668 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
5670 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
5672 * exception.c (mono_exception_from_name_two_strings):
5673 Break from loop after method is found.
5675 2008-01-04 Dick Porter <dick@ximian.com>
5677 * process.c (process_module_string_read): Rename variable to
5678 reflect correct usage, after fixing bug 345972.
5680 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
5682 * verify.c (mono_type_create_fnptr_from_mono_method):
5683 created a MonoType function pointer instance to be used during
5684 verification. The verifier releases this memory at end.
5686 * verify.c (mono_method_is_constructor): extracted repeated
5687 checks for constructor into a single class.
5689 * verify.c (do_push_field): use new extracted method
5690 for constructor check.
5692 * verify.c (do_newobj): same.
5694 * verify.c (do_ldftn): renamed to do_load_function_ptr
5695 and make it verify ldvirtftn too.
5697 * verify.c (mono_method_verify: proper verification
5698 of ldvirtftn. release created MonoMethod instances.
5700 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
5702 * verify.c (token_bounds_check): added.
5704 * verify.c (do_ldftn): added.
5706 * verify.c (mono_method_verify): proper verificartion of ldftn.
5708 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
5710 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
5711 than the table row count. It's the resposibility of the caller to
5712 make the bounds check and raise the correct error.
5714 * metadata.c (mono_metadata_decode_row_col): Same.
5716 * loader.c (mono_get_method_from_token): perform bounds check
5717 on token for methoddef table.
5719 2007-12-29 Miguel de Icaza <miguel@novell.com>
5722 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
5723 assert into a negative result, the managed code already coped with
5726 Some folks on Windows reported this error.
5728 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
5730 * appdomain.c: Bump corlib version.
5732 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
5733 CultureInfo.CreateCulture to create CultureInfo for name.
5734 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
5735 create CultureInfo for name. Fixes bug #347174.
5737 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
5739 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
5742 * verify.c (is_valid_branch_instruction): allow branching to the
5743 first instruction of the protected block.
5745 * verify.c (is_valid_cmp_branch_instruction): same.
5747 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
5748 avoid double initialization.
5750 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
5751 detect which cases the eval stack should just be copied.
5753 * verify.c (mono_method_verify): check if the eval stack
5754 is empty when entering a protected block.
5756 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
5758 * verify.c: added is_clause_in_range, is_clause_inside_range,
5759 is_clause_nested and verify_clause_relationship. They perform
5760 the verifications stated in P1 12.4.2.7.
5762 * verify.c (mono_method_verify): remove some unused variables,
5763 add the new exception clause checks, add instruction border
5764 checks for protected block start/end, improved some error
5765 messages and fixed a bug in the way invalid instruction access
5768 2007-12-26 Zoltan Varga <vargaz@gmail.com>
5770 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
5771 from GC 7.0 if available.
5773 * object.c: Remove an unused define.
5775 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
5777 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
5779 * null-gc.c (mono_gc_make_descr_for_array): Implement.
5781 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
5783 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
5784 to take the same arguments as the other make_descr functions.
5786 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
5788 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
5791 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
5794 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
5797 * boehm-gc.c (mono_gc_register_root): Fix a warning.
5799 * null-gc.c (mono_gc_register_root): Fix a warning.
5801 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
5803 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
5804 (mono_gc_base_init): Call GC_init ().
5806 * null-gc.c: Define mono_gc_register_root () as a no-op.
5808 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5810 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
5812 * verify.c: add prototype for merge_stacks at top
5814 * verify.c (do_switch): added.
5816 * verify.c (merge_stacks): on some cases the stack merging
5817 was not happening properly. Unequal stack sizes at merge
5818 points should be invalid.
5820 * verify.c (mono_method_verify): added more debug info on stack state.
5821 verify switch properly.
5823 2007-12-24 Zoltan Varga <vargaz@gmail.com>
5825 * method-builder.h: New file, moved the mono_mb_ declarations here from
5828 * boehm-gc.c marshal.c: Include method-builder.h.
5830 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
5832 * marshal.c: Remove some code which is now in method-builder.c.
5834 2007-12-23 Zoltan Varga <vargaz@gmail.com>
5836 * method-builder.c: New file, extraction of the method builder functionality
5839 * marshal.c: Move the mb functions into method-builder.c.
5841 * marshal.h marshal.c: Export some mono_mb_... functions.
5843 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
5845 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
5848 * class.c (mono_class_get_full): Check the token type in the dynamic case.
5850 * loader.c (mono_field_from_token): Ditto.
5852 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
5855 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
5858 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
5859 a helper function for setting it.
5861 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
5864 * assembly.c: Significally simplify code now that referenced assemblies are
5865 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
5867 * threads.h: Don't include the internal threads-types.h header file. Fixes
5870 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
5872 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
5873 instructions that were target of branches or are at protected block boundaries.
5875 * verify.c (in_same_block): handle filter clauses.
5877 * verify.c (is_valid_branch_instruction): added. checks the target of
5878 instructions br or brtrue/false.
5880 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
5881 binary branch instructions such as beq and bge.
5883 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
5884 and made it pin the instruction as been part of the exception block.
5886 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
5889 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
5892 * verify.c (do_ret): ret from a protected block is unverifiable and
5895 * verify.c (do_static_branch): verify br and br.s instructions.
5897 * verify.c (merge_stacks): add extra param to support detection
5898 of branches in the middle of instructions.
5900 * verify.c (mono_method_verify): verify branches and exception blocks
5901 that target the middle of instructions. Proper verification of br and br.s.
5903 2007-12-21 Zoltan Varga <vargaz@gmail.com>
5905 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
5906 skip_visibility field.
5907 (reflection_methodbuilder_from_dynamic_method): Ditto.
5909 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
5910 registrations. Fixes #348193.
5912 * threads.h: Move the internal mono_thread_get_pending_exception () to
5913 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
5915 2007-12-20 Zoltan Varga <vargaz@gmail.com>
5917 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
5918 icall registration. Fixes #348193.
5920 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
5921 for corlib classes into object. Fixes #349621.
5923 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
5925 * icall.c (property_accessor_nonpublic): new function to determine
5926 whether an accessor allows a property to be considered non-public.
5927 Returns false for private accessor(s) from parent class, and internal
5928 accessor(s) from parent on 2.0 profile (and higher).
5929 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
5930 to determine whether property should be included if NonPublic flag
5931 is set. Fixes bug #349078.
5933 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
5935 * verify.c (init_stack_with_value): added.
5937 * verify.c (mono_method_verify): extracted common
5938 code for exception initialization into init_stack_with_value.
5940 * verify.c (mono_method_verify): initialize the exception
5941 for handler clauses as well.
5943 * verify.c (mono_method_verify): fix the exception clause
5944 ordering rules, it should use handler end offset and not
5947 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
5949 * rawbuffer.c: remove useless warning.
5951 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
5953 * threads.h, threads-types.h: move functions to the correct header
5956 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
5958 * verify.c (mono_method_verify): proper verification
5959 of exception handling clauses ranges and fallthru in
5960 and out of protected blocks.
5962 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
5964 * verify.c (mono_method_verify): fixed compilation issue.
5966 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
5968 * verify.c (mono_method_verify): a printf slipped in, changed
5969 to use verifier debug macro.
5971 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
5973 * verify.c (is_correct_leave): check for filter clauses.
5975 * verify.c (do_filter): added.
5977 * verify.c (mono_method_verify): property verification of leave.
5980 2007-12-18 Mark Probst <mark.probst@gmail.com>
5982 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
5983 Win32 build, until we figure out how to do the proper thing on
5986 2007-12-17 Zoltan Varga <vargaz@gmail.com>
5988 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
5989 by the previous patch.
5991 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
5992 the assembly resolve handler for refonly assemblies.
5994 2007-12-17 Mark Probst <mark.probst@gmail.com>
5996 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
5997 Make sure only one thread is allowed to commence shutdown, and
5998 don't allow new threads to be started once shutdown is in
6001 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
6003 * verify.c (is_correct_endfilter): added.
6005 * verify.c (is_unverifiable_endfilter): added.
6007 * verify.c (do_endfilter): added.
6009 * verify.c (mono_method_verify): property verification of endfilter
6010 and fixed a corner case or endfinally.
6012 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
6014 * verify.h: new flags to support fail fast of unverifiable code and
6015 do non-strict verification. Non-strict verification is required to
6016 have MS runtime compatibility. There are a huge amount of unverifiable
6017 code that it accepts as verifiable. The strict mode verifies the code
6019 Non-strict mode will be required in cases where code needs to be
6020 accepted as verifiable but fails under strict mode.
6022 * pedump.c: added support to fail fast and non-strict verification.
6024 * verify.c: added support for both fail fast and non-strict verification.
6026 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
6028 * verify.c (is_correct_endfinally): added.
6030 * verify.c (mono_method_verify): property verification of endfinally.
6032 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
6034 * verify.c (in_any_block): check for filter clauses.
6036 * verify.c (is_correct_rethrow): added.
6038 * verify.c (mono_method_verify): property verification of rethrow.
6040 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
6042 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
6044 * verify.c (do_throw): added.
6046 * verify.c (mono_method_verify): property verification of throw
6048 2007-12-11 Zoltan Varga <vargaz@gmail.com>
6050 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
6051 assemblies. Fixes #346425.
6053 2007-12-10 Zoltan Varga <vargaz@gmail.com>
6055 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
6058 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
6060 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
6061 prevent asserts when this is called with a token which might not be valid.
6063 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
6064 lookup_dynamic_token_class with valid_token == FALSE.
6066 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
6068 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
6070 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
6072 2007-12-10 Mark Probst <mark.probst@gmail.com>
6074 * gc.c: Don't delay threadpool thread finalization unless Mono is
6077 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6079 * threads.c: turn an assert into a non-fatal warning.
6081 2007-12-09 Robert Jordan <robertj@gmx.net>
6083 * icall.c (GetVirtualMethod): Add missing argument validation.
6085 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6087 * verify.c (do_cast): added.
6089 * verify.c (mono_method_verify): property verification of castclass and isinst.
6092 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6094 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
6096 * verify.c (do_stelem): added.
6098 * verify.c (mono_method_verify): property verification of stelem.X.
6100 2007-12-07 Mark Probst <mark.probst@gmail.com>
6102 * class.c, class-internals.h: Introduce an environment variable
6103 (MONO_GENERIC_SHARING) through which the extent of generic code
6104 sharing can be controlled (share all classes, share only corlib
6105 classes, or share nothing).
6107 * object.c: Only create runtime generic context for classes for
6108 which sharing is enabled.
6110 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6112 * verify.c (do_ldelem): refactor it to work with ldelem.any.
6114 * verify.c (mono_method_verify): property verification of ldelem.any.
6116 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
6118 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
6119 added ldelem.X opcodes.
6121 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
6123 * verify.c: proper verification of ldelem.X
6125 2007-12-06 Zoltan Varga <vargaz@gmail.com>
6127 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
6129 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
6131 * verify.c (mono_method_verify): null literal requires special handling,
6132 the value pushed on stack need to be flagged as so.
6134 * verify.c (do_ldelema): Verify ldelema properly.
6136 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
6138 * verify.c: Verify ldlen properly.
6140 2007-12-05 Zoltan Varga <vargaz@gmail.com>
6142 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
6143 to the target object's type. Fixes #346160.
6145 2007-12-05 Dick Porter <dick@ximian.com>
6147 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
6148 Solaris needs the same workaround as BSD-derived systems. Fixes
6149 bug 323524, patch by Burkhard Linke
6150 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
6152 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
6154 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
6155 handle to use when error dialog is shown; otherwise, update mask
6156 to show no error dialog when an error occurs.
6158 2007-12-03 Zoltan Varga <vargaz@gmail.com>
6160 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
6162 * class.c (mono_class_get_field_default_value): New helper function to initialize
6163 field->def_type and field->data.
6165 2007-11-30 Zoltan Varga <vargaz@gmail.com>
6167 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
6170 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
6172 * marshal.c: Avoid depending on delegate->method_info being set.
6174 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
6176 * object.c (mono_delegate_ctor): Set delegate->method.
6178 * object-internals.h (struct _MonoDelegate): Add 'method' field.
6180 * appdomain.c: Bump corlib version.
6182 2007-11-27 Raja R Harinath <harinath@gmail.com>
6184 * metadata.c (mono_generic_inst_equal_full): Short-circuit
6185 equality check if we're comparing canonicalized MonoGenericInsts.
6187 2007-11-23 Zoltan Varga <vargaz@gmail.com>
6189 * class.c (generic_array_methods): Call mono_class_setup_methods () before
6190 accessing class->methods.
6192 2007-11-22 Dick Porter <dick@ximian.com>
6194 * threads.c: Ensure that the synch_cs is set before trying to use
6197 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
6199 * profiler.c: r89126 broke the statistial profiler, unbreak.
6201 2007-11-22 Martin Baulig <martin@ximian.com>
6203 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
6206 (mono_debug_debugger_version): Bump to 3.
6207 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
6208 -> mono_debugger_class_initialized().
6210 * mono-debug-debugger.c
6211 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
6214 (mono_debugger_start_class_init_func): Removed.
6215 (mono_debugger_class_loaded_methods_func): Added.
6216 (mono_class_setup_methods): Call it here.
6218 2007-11-22 Martin Baulig <martin@ximian.com>
6221 (mono_debug_add_delegate_trampoline): New public method.
6222 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
6225 (MonoSymbolTable): Added `global_data_table'.
6226 (MonoDebuggerTypeKind): Removed.
6228 2007-11-21 Zoltan Varga <vargaz@gmail.com>
6230 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
6233 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6235 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
6237 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
6239 2007-11-20 Martin Baulig <martin@ximian.com>
6241 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
6243 * mono-debug-debugger.c
6244 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
6245 (mono_debugger_remove_breakpoint): Likewise.
6246 (mono_debugger_check_breakpoints): Likewise.
6247 (mono_debugger_register_class_init_callback): New public method.
6248 (mono_debugger_remove_class_init_callback): Likewise.
6249 (mono_debugger_add_type): Likewise.
6251 * mono-debug-debugger.h
6252 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
6254 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
6256 * class.c: more interface implementations needed for the
6257 array enumerator (fixes bug #341112).
6259 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
6261 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
6262 fix ParamName of ArgumentNullExceptions.
6264 2007-11-17 Miguel de Icaza <miguel@novell.com>
6266 * reflection.c (mono_reflection_encode_sighelper): Generate the
6267 modopts and modreqs. I have a useless test that crashes monodis,
6268 but that shows the code working.
6270 2007-11-17 Zoltan Varga <vargaz@gmail.com>
6272 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
6273 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
6275 2007-11-15 Dick Porter <dick@ximian.com>
6277 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
6278 When joining a thread, it's the thread that's calling Join that
6279 gets WaitSleepJoin state not the target. Fixes the standalone
6280 test case in bug 334740, and hopefully the whole bug too.
6282 2007-11-15 Dick Porter <dick@ximian.com>
6284 * process.c: Read file version info from the files pointed at by
6285 process modules, not the current process. Fixes bug 315969.
6287 Use windows typedef names in some places to fix warnings on the
6290 2007-11-15 Mark Probst <mark.probst@gmail.com>
6292 * image.c, metadata-internals.h: Added a generic_class_cache hash
6293 to MonoImage for looking up generic classes when sharing generics.
6295 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6297 * sgen-gc.c: warning cleanups.
6299 2007-11-15 Zoltan Varga <vargaz@gmail.com>
6301 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
6302 inherited properties.
6304 2007-11-14 Mark Probst <mark.probst@gmail.com>
6306 * object.c, class-internals.h: Added more information to the
6307 runtime generic context.
6309 2007-11-13 Zoltan Varga <vargaz@gmail.com>
6311 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
6312 instead of just the target method. Generalize the abstract method handling to
6313 handle any non-static method.
6315 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
6316 mono_marshal_get_delegate_invoke () signature change.
6318 2007-11-13 Mark Probst <mark.probst@gmail.com>
6320 * class.c, class-internals.h: Made
6321 mono_type_get_basic_type_from_generic () public. Fixed member
6322 access check for shared generics.
6324 * loader.c: Don't insert field into field cache if it's part of a
6325 non-inflated generic class.
6327 * domain.c, domain-internals.h: The generic sharing context is now
6328 part of the jit info data structure. Added two accessor
6331 2007-11-12 Zoltan Varga <vargaz@gmail.com>
6333 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
6334 the array Get/Set/Address methods, since the JIT inlines them.
6336 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
6338 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
6339 (mono_image_init): Initialize runtime_invoke_direct_cache.
6341 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
6342 mono_marshal_get_delegate_invoke signature change.
6344 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
6345 an additional argument. Add support for invoking abstract methods.
6347 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
6349 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
6351 2007-11-09 Mark Probst <mark.probst@gmail.com>
6353 * class.c: Do field layout for open generic classes as well.
6355 2007-11-09 Mark Probst <mark.probst@gmail.com>
6357 * gc.c, gc-internal.h: Don't finalize threadpool threads with
6358 other objects, because the threadpool is still around. Put them
6359 in a list instead and after finalizing all other objects in the
6360 root domain shut down the thread pool and then finalize the
6361 threads. Fixes bug #337383.
6363 * threads.c, thread-types.h: New mono_thread_create_internal()
6364 function for marking a thread with the threadpool flag before it
6365 started. Set synch_cs to NULL after freeing it.
6367 * threadpool.c: Mark threadpool threads before they start.
6369 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6371 * reflection.h, reflection.c: don't export random functions
6372 and lazy load dbnull and missing objects.
6374 2007-11-07 Jonathan Chambers <joncham@gmail.com>
6376 * class.c: Initialize COM types if COM interfaces
6377 are present (not just COM classes).
6379 Code is contributed under MIT/X11 license.
6381 2007-11-07 Massimiliano Mantione <massi@ximian.com>
6383 create_dynamic_mono_image: hook module profiler events (dynamic case).
6384 mono_image_basic_init: hook assembly profiler events (dynamic case).
6386 2007-11-07 Massimiliano Mantione <massi@ximian.com>
6388 simple_appdomain_unload: completely terminate the profiler
6389 instead of only processing the statistical samples.
6390 simple_shutdown: make sure this is really called exactly once,
6391 even in multithreaded applications, and always listen to
6393 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
6394 here, the "[un]load" functions will do it.
6395 Fixes bugs #333791 and #325261.
6397 2007-11-07 Geoff Norton <gnorton@novell.com>
6399 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
6400 rather than depend on __APPLE__.
6402 2007-11-07 Mark Probst <mark.probst@gmail.com>
6404 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
6406 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
6408 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
6409 UTF16 MonoString. Fix the crash from bug #335488
6411 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
6413 * marshal.c: Correct (for non-Win32 OS) length != size in
6414 mono_string_from_bstr. Fix #339530.
6416 2007-11-06 Geoff Norton <gnorton@novell.com>
6418 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
6421 2007-11-05 Kornél Pál <kornelpal@gmail.com>
6423 * process.c: Added run-time GetProcessId API detection for Windows.
6425 2007-11-04 Miguel de Icaza <miguel@novell.com>
6427 * reflection.c (mono_param_get_objects): If a parameter has the
6428 attribute [System.Runtime.InteropServices.Optional] we should
6429 set the DefaultValue of the ParameterInfo to be
6430 System.Reflection.Missing instead of DBNull.
6434 (mono_get_reflection_missing_object): New method,
6435 returns the System.Reflection.Missing.Value singleton instance.
6437 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
6439 * culture-info-table.h : regenerated.
6441 2007-11-02 Jonathan Chambers <joncham@gmail.com>
6443 * icall.c: Use GetEnvironmentStrings on windows
6444 so we are using the same environment block as
6445 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
6448 Code is contributed under MIT/X11 license.
6450 2007-10-31 Martin Baulig <martin@ximian.com>
6452 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
6454 * mono-debug-debugger.h
6455 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
6457 2007-10-30 Zoltan Varga <vargaz@gmail.com>
6459 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
6462 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
6464 * culture-info-table.h : regenerated.
6466 2007-10-30 Robert Jordan <robertj@gmx.net>
6468 * icall-def.h, icall.c:
6469 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
6471 Code is contributed under MIT/X11 license.
6473 2007-10-29 Zoltan Varga <vargaz@gmail.com>
6475 * class.c (mono_class_setup_vtable): Find the inflated methods in the
6476 inflated class instead of inflating them again.
6478 * class.c (mono_class_setup_vtable): Inflate the override methods in the
6481 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
6482 Call setup_supertypes () after klass->parent is set.
6483 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
6485 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
6486 for inflated instances of not yet created dynamic generic classes.
6487 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
6488 times from inflated_method.
6489 (methodbuilder_to_mono_method): Ditto.
6491 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
6493 * gc.c: code cleanup and removed old untested option of not creating the
6496 2007-10-29 Zoltan Varga <vargaz@gmail.com>
6498 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
6499 creating a jump trampoline for dynamic methods.
6501 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
6503 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
6504 generic TypeBuilders when called from another method of the same type (bug #335131).
6507 2007-10-27 Zoltan Varga <vargaz@gmail.com>
6509 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
6510 doesn't seem to work perfectly.
6512 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
6513 called multiple times.
6514 (methodbuilder_to_mono_method): Ditto.
6515 (resolve_object): Inflate FieldBuilder's.
6517 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6519 * string-icalls.c, string-icalls.h, appdomain.c: patch from
6520 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
6521 RemoveEmptyEntries in the string.Split implementation (bug #322375).
6523 2007-10-26 Dick Porter <dick@ximian.com>
6525 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
6526 Thread initialisation changes
6528 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
6530 * verify.c: fix compatibility check between arrays and System.Array
6532 2007-10-26 Zoltan Varga <vargaz@gmail.com>
6534 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
6537 2007-10-25 Zoltan Varga <vargaz@gmail.com>
6539 * object.c (mono_value_box): Use typed allocation here.
6541 2007-10-23 Zoltan Varga <vargaz@gmail.com>
6543 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
6544 trampoline instead of compiling the method right away.
6546 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
6548 2007-10-21 Zoltan Varga <vargaz@gmail.com>
6550 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
6551 related fields for dynamic classes. Fixes #334493.
6553 2007-10-20 Zoltan Varga <vargaz@gmail.com>
6555 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
6557 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
6559 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
6560 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
6562 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
6564 * reflection.c (create_generic_typespec): Initialize klass->generic_container
6566 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
6568 2007-10-18 Jonathan Chambers <joncham@gmail.com>
6570 * marshal.c: Use correct key when removing item
6573 Code is contributed under MIT/X11 license.
6575 2007-10-17 William Holmes <billholmes54@gmail.com>
6577 *marshal.c: Adding a case to marshal booleans to U1
6579 Code is contributed under MIT/X11 license.
6581 2007-10-18 Zoltan Varga <vargaz@gmail.com>
6583 * class.c (mono_class_from_name): Search the modules compromising dynamic
6584 assemblies. Fixes #331601.
6586 2007-10-16 Zoltan Varga <vargaz@gmail.com>
6588 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
6589 exception if the type name contains an assembly component. Fixes #334203.
6591 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
6592 modules inside dynamic assemblies. Fixes #334200.
6594 * reflection.c: Set image->public_key and image->public_key_length;
6596 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
6599 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
6601 2007-10-16 Mark Probst <mark.probst@gmail.com>
6603 * metadata.c: Implemented correct comparing of generic classes.
6604 An inflated generic class can be equal to a non-inflated one if it
6605 is inflated with generic type variables as type arguments. Fixes
6608 2007-10-15 Dick Porter <dick@ximian.com>
6610 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
6611 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
6614 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
6615 instead of a monitor lock. This means that monitor_try_enter and
6616 co can set the thread state safely.
6617 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
6618 thread_interrupt_requested, so interrupt actually works.
6620 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
6621 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
6622 state accessor function
6624 2007-10-15 Martin Baulig <martin@ximian.com>
6627 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
6628 the debugger with the current runtime.
6630 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6632 * object.c, object-internals.h: added the ability to set a single
6633 trampoline for all the slots in a vtable.
6635 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6637 * marshal.c: deal with a possible race condition during multicast
6638 delegate invocation.
6640 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6642 * class.c: ensure value type methods don't have the synchronized
6645 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6647 * string-icalls.c, string-icalls.h: reverted unapproved patch that
6650 2007-10-11 Joel Reed <joelwreed@comcast.com>
6652 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
6653 to take an options parameter so that empty entries can be removed during
6654 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
6656 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6658 * marshal.c: make sure we don't store the signature from a dynamic
6659 method into the runtime invoke cache (bug #327189).
6661 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
6663 * marshal.c: make sure the wrapper methods are properly initialized.
6665 2007-10-11 Mark Probst <mark.probst@gmail.com>
6667 * metadata.c, metadata-internals.h: Generalized
6668 mono_type_stack_size() to mono_type_stack_size_internal() which
6669 takes an additional argument specifying whether it allows open
6672 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6674 * verify.c (do_invoke_method): handle typedbyref params
6675 correctly and check for unverifiable return values.
6677 * verify.c (do_newobj): fix a warning.
6679 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6681 * verify.c: don't tread typedbyref as allways unverifable,
6682 so uses, like (ld/st)loc.0 are valid. verify for the cases
6683 that it matters, like boxing related operations.
6685 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6687 * verify.c: add verification of the newobj opcode. verification
6688 of delegate instantation still missing due ldftn and virldftn not
6689 pushing the function type on stack
6691 2007-10-08 Mark Probst <mark.probst@gmail.com>
6693 * class-internals.h: Runtime generic context data structure
6696 * object.c: Initialization of runtime generic context at runtime
6697 vtable creation time.
6699 2007-10-08 Massimiliano Mantione <massi@ximian.com>
6700 * class.c (mono_class_create_from_typedef,
6701 mono_class_from_generic_parameter, mono_ptr_class_get,
6702 mono_fnptr_class_get, mono_bounded_array_class_get)
6703 * domain.c (mono_domain_create, mono_domain_free)
6704 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
6705 * image.c (do_mono_image_load, mono_image_close):
6706 Hooked up load-unload profiler events.
6708 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6710 * domain.c: track statistics about the actual amount of native code
6713 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6715 * class.c: the valuetype enumerators don't have the additional
6716 supertypes interfaces.
6718 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
6720 * class.c: need more interfaces setup for the IEnumerator<T>
6721 object created for arrays (tests/ienumerator-interfaces.2.cs).
6723 2007-10-05 Zoltan Varga <vargaz@gmail.com>
6725 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
6727 2007-10-05 Alp Toker <alp@atoker.com>
6729 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
6730 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
6733 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
6735 * verify.c (verify_type_compatibility_full): verification of
6736 compatibility improved, validates correctly non-strict checks between
6737 native int and I4 types different than (unsigned)int32.
6739 * verify.c (do_store_indirect): added, do all verification of
6742 * verify.c (get_load_indirect_mono_type): renamed to
6743 get_indirect_op_mono_type, as it now returns the MonoType for
6744 ldind.X and stind.X opcodes.
6746 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
6748 * reflection.c: Fix the encoding of generic type definition for
6751 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
6752 mono_image_typedef_or_ref but allows to specify if typespec lookups should
6753 be made. Typespec check is done prior to typeref cache lookup.
6755 * reflection.c (mono_image_typedef_or_ref): now just delegate to
6756 mono_image_typedef_or_ref_full.
6758 * reflection.c (encode_generic_class): encode the generic class
6759 directly instead of calling encode_type.
6761 * reflection.c (encode_type): encode the generic type definition
6762 MonoClass as a generic instantiation.
6764 * reflection.c (create_typespec): cache typespec tokens in
6765 the assembly->typespec cache. Don't create typespec for a generic
6766 instance MonoClass. Create typespec for the generic type defintion.
6768 * reflection.c (create_generic_typespec): encode the generic
6769 class directly instead of calling encode_type.
6771 * reflection.c (mono_image_create_token): encode the generic
6772 type definition not using a typespec for MonoType instances.
6775 2007-10-04 Raja R Harinath <rharinath@novell.com>
6778 * class.c (mono_image_init_name_cache): Don't return nested
6779 'protected internal' classes.
6780 (mono_class_from_name_case): Likewise.
6782 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
6784 * icall-def.h, icall.c : get_bundled_machine_config() is now the
6785 common function used by both DefaultConfig in System.dll and
6786 InternalConfigurationHost in System.Configuration.dll.
6788 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6790 * class.c: automatically add to vectors only a few essential explicit
6791 generic interfaces. The rest of the interfaces that arrays should
6792 provide are currently implicitly added (but still not lazily, see the
6793 design in the discussion of bug#325495 for the details of what is
6794 needed for that). Additionally, implicit interfaces are assigned the
6795 same vtable slot as the explicit interfaces (as they are compatible):
6796 this enables huge memory savings since we don't need to instantiate
6797 as many memthods and as large vtables anymore. Also, Since
6798 GetEnumerator<T> returns an instance of a type that is required to
6799 support a similarly large set of interfaces as arrays, we add
6800 implicit interfaces and interface offset sharing support to those
6801 types, too. This change adds all the required interfaces so that
6802 the anonarray.cs test case in the bug report works (we don't add
6803 all the interfaces to arrays of arrays 3-level deep and more because
6804 of the memory requirements explained in the bug and since they are much
6805 less common: the lazy-loading support will enabled them to work, too).
6807 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
6809 * verify.c (merge_stacks): major clean up, all type compatibility
6810 checks are done by verify_type_compatibility. This fix my earlier lack
6811 of understanding of the CLR type system and merge_stacks no longer looks
6814 * verify.c: fixed some bad spelling.
6816 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
6818 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
6819 a given stack slock.
6821 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
6822 verify_type_compatibility_full. This removed a near indentical function and fixed
6823 handling of Int32 and IntPtr across all opcodes.
6825 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6827 * class.c: only vectors have the additional generic interfaces.
6829 2007-10-01 Jonathan Chambers <joncham@gmail.com>
6831 * mono-config.c: Use g_strcasecmp instead of
6832 strcasecmp like everywhere else to fix
6833 compilation with MSVC.
6835 Code is contributed under MIT/X11 license.
6837 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6839 * object.c, object-internals.h: refactored the IMT code to enable
6840 building a single slot at a time and lazily creating the IMT trampolines
6843 2007-09-29 Zoltan Varga <vargaz@gmail.com>
6845 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
6847 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
6850 2007-09-29 Raja R Harinath <harinath@gmail.com>
6852 * loader.c (method_from_methodspec): Rearrange to avoid
6853 un-necessary exposition. Don't assert out if the method's
6854 declaring type is a generic type definition.
6856 2007-09-28 Martin Baulig <martin@ximian.com>
6858 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
6860 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6862 * class-internals.h: optimize field layout of MonoClass to
6863 requires less cachelines at runtime and save a few bytes on 64 bit
6866 2007-09-28 Jb Evain <jbevain@novell.com>
6868 * reflection.c: when encoding type names in custom attributes,
6869 if the type is a closed generic type, its generic arguments
6870 have to be serialized as AssemblyQualifiedName, so that when
6871 they are deserialized, it's possible to re-create them properly.
6875 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6877 * object.c, class-internals.h: added delegate-creation counter.
6879 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6881 * class.c: cleanup of the code that synthetizes interfaces for
6882 arrays in 2.0: saves quit a bit of corlib mempool memory.
6883 Code to fix bug #325495 ifdeffed out for now until the issues
6884 with memory usage and O(n^2) behaviour are fixed.
6886 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6888 * marshal.c: when possible, do not duplicate the name of the methods
6889 in the method builder and in the generated MonoMethod.
6891 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
6892 * verify.c: added support for type checking ldind_* opcodes.
6894 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
6896 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
6897 which is used to distinguish the fully open instantiation of a TypeBuilder
6898 with the rest. This temporary hack is required to restore the property that
6899 the fully open instantiation is the same type of the generic type definition.
6901 * class-internals.h (mono_generic_class_is_generic_type_definition):
6902 new function as part of the internal API.
6904 * class.c (inflate_generic_type): return NULL when the generic inst is
6905 fully open. The fully open generic type is now the same as the generic type
6906 definition for non TypeBuilder types.
6908 * class.c (mono_generic_class_get_class): removed assert since it is
6909 no longer valid, gklass->cached_class can point to the generic type definition.
6911 * class.c (mono_generic_class_is_generic_type_definition): new.
6913 * metadata.c (mono_generic_class_hash): added is_tb_open field
6914 to the hash calculation.
6916 * metadata.c (free_generic_class): if the generic class is associated
6917 with the generic type definition, its field will come from the mempool and
6920 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
6921 new, this function identifies the corner case of a TypeBuilder fully open
6924 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
6925 for lookup. Set gclass->cached_class to be the container class in case of
6926 the fully open instantiation of non TypeBuilder types.
6928 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
6929 to compare generic classes.
6931 * reflection.c (method_encode_methodspec): remove assert that
6934 * reflection.c (mono_reflection_generic_class_initialize): add
6935 an aditional assert to ensure the proper type is used.
6937 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
6939 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
6942 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
6944 * verify.c (push_arg): Fixed support for ldarga
6945 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
6946 MonoType used as first arg in case of instance calls.
6948 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
6950 * verify.c: Support for verifying VAR and MVAR types,
6952 2007-09-25 Zoltan Varga <vargaz@gmail.com>
6954 * icall.c (ves_icall_get_property_info): Set the reflected type of the
6955 accessors correctly.
6957 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6959 * threads.c: support OSX and other systems in
6960 mono_thread_get_stack_bounds (bug #328026).
6962 2007-09-25 Martin Baulig <martin@ximian.com>
6965 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
6967 2007-09-24 Martin Baulig <martin@ximian.com>
6970 (MonoDebugClassEntry): Moved the definition of this struct into
6971 mono-debug.c to make it private.
6974 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
6975 type table per symbol file, we don't need to store the symfile id
6978 2007-09-24 Martin Baulig <martin@ximian.com>
6980 Create one type table per symbol file, since a `MonoClass *' gets
6981 invalid when its image is unloaded.
6983 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
6984 (MonoDebugHandle): Added `type_table'.
6986 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6988 * mempool.c, mempool.h: added mono_mempool_new_size () API
6989 to be able to specify a smaller initial size for the pool.
6990 Adjusted the code to slowly increase pool size before using
6991 the previous default size.
6992 * image.c: use a small initial size for image mempools.
6994 2007-09-23 Zoltan Varga <vargaz@gmail.com>
6996 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
6999 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
7000 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
7002 2007-09-22 Zoltan Varga <vargaz@gmail.com>
7004 * metadata.c (mono_type_create_from_typespec): Remove an invalid
7005 free. Fixes #327438.
7007 2007-09-21 Raja R Harinath <harinath@gmail.com>
7009 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
7010 generic instantiations, etc.
7011 <MONO_TYPE_ARRAY>: Likewise.
7013 2007-09-21 Martin Baulig <martin@ximian.com>
7015 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
7016 these structs were never defined.
7017 (MonoDebugHandle): Removed the `_priv' field, it was never used.
7019 2007-09-21 Martin Baulig <martin@ximian.com>
7021 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
7023 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
7025 * image.c: removed the guid hash tables: we can get the same info
7026 without the additional memory usage hit (partially fixes also bug #327052).
7028 2007-09-10 Massimiliano Mantione <massi@ximian.com>
7030 * profiler.h, profiler-private.h, profiler.c: add a new profiler
7031 event to handle unloading methods. After the event is called, the
7032 corresponding MonoMethod* must be considered invalid.
7033 * loader.c (mono_free_method): call the new mono_profiler_method_free
7036 2007-09-20 Mark Probst <mark.probst@gmail.com>
7038 * domain-internals.h: New flag in MonoJitInfo which marks shared
7039 generic methods. New hash table (shared_generics_hash) in
7040 MonoDomain to keep track of shared generic methods. Prototypes
7041 for functions to register and lookup shared generic methods.
7043 * domain.c: Support for registering and looking up shared generic
7044 methods via a hash table (shared_generics_hash) in MonoDomain.
7046 * class-internals.h: New exception to signal failure of shared
7047 compilation of a generic method. New counters for generics
7048 sharing in MonoStats.
7050 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
7052 * image.c, metadata-internals.h: don't keep a file descriptor open
7053 for loaded assemblies (bug#325988).
7055 2007-09-19 Raja R Harinath <rharinath@novell.com>
7057 * metadata.c (signature_in_image): New. Carve out of type_in_image.
7058 (ginst_in_image, gclass_in_image): Simplify. Change signature to
7059 use the corresponding datatypes.
7060 (type_in_image): Update to changes.
7061 (CleanForImageUserData): Simplify.
7062 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
7063 Avoid quadratic behaviour in handling the "stolen" list by
7064 separating the filter predicate out, and by prepending the stolen
7065 items rather than appending them.
7066 (steal_ginst_in_image): Likewise.
7067 (mono_metadata_clean_for_image): Update to changes.
7069 2007-09-19 Martin Baulig <martin@ximian.com>
7071 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
7073 2007-09-19 Martin Baulig <martin@ximian.com>
7075 * mono-debug.c (mono_debug_cleanup): Don't call
7076 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
7078 2007-09-19 Raja R Harinath <harinath@gmail.com>
7080 Fix crash on 'make run-test' in mcs/errors
7081 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
7082 Avoid more potential allocations in mono_class_from_mono_type.
7083 (ginst_in_image): Update to changes.
7084 (gclass_in_image): Rearrange slightly.
7086 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7088 * class.c (mono_class_init): Move the code that sets up class->methods to
7089 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
7091 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
7092 canonical instance of an inflated generic signature.
7093 (mono_type_create_from_typespec): Remove an invalid free.
7095 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
7097 2007-09-18 Marek Habersack <mhabersack@novell.com>
7099 * domain-internals.h: added a declaration of the
7100 mono_assembly_load_full_nosearch internal function.
7102 * assembly.c (mono_assembly_load_with_partial_name): use
7103 mono_try_assembly_resolve return value properly.
7104 (mono_assembly_load_full_nosearch): copied the function body from
7105 mono_assembly_load_full, without the code to invoke assembly
7107 (mono_assembly_load_full): calls the above new function and if the
7108 assembly is not resolved, invokes the search hooks.
7110 * appdomain.c (mono_runtime_init): restore the global postload
7111 assembly search handlers.
7113 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7115 * class.c (mono_class_init): Make sure class->methods and class->properties
7116 are never NULL in the generics case.
7118 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
7120 2007-09-17 Zoltan Varga <vargaz@gmail.com>
7122 * metadata.c (free_generic_class): Disable some code to fix the build.
7124 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
7126 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
7127 from the image mempool.
7129 * metadata.c (free_generic_class): Free more data from the inflated class.
7131 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
7133 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
7135 (mono_type_create_from_typespec): Ditto.
7137 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
7138 MonoImage to the caller.
7139 (mono_init_internal): Save the opened image in a global variable.
7140 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
7142 * reflection.c (resolve_object): Fix a leak.
7144 * metadata.c: Fix the freeing of data in the generics caches.
7146 * metadata.c (free_generic_inst): Comment this out to fix the build.
7147 (free_generic_class): Ditto.
7149 * metadata.c: Free cached generic methods, instantinations and classes when
7150 they are removed from the caches.
7151 (mono_metadata_free_type): Free the type itself.
7153 * class.c: Free the result of mono_class_inflate_generic_type () in a few
7156 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
7158 * boehm-gc.c: restrict managed allocs to __thread supporting
7161 2007-09-16 Zoltan Varga <vargaz@gmail.com>
7163 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
7164 (mono_generic_class_get_class): Fix a leak.
7166 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
7167 mono_metadata_free_type ().
7168 (mono_metadata_inflate_generic_inst): Fix a leak.
7170 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7172 * mono-debug.c (free_header_data): Fix a leak missed earlier.
7174 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
7177 * mono-debug.c (mono_debug_close_image): Fix call to
7178 g_hash_table_remove ().
7180 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
7182 * icall-def.h: redirect all the string ctor to the managed
7183 CreateString () methods.
7184 * string-icalls.c, string-icalls.h: removed dead code for string
7187 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7189 * mono-debug.c: Fix memory leaks.
7191 2007-09-14 Jonathan Chambers <joncham@gmail.com>
7193 * threads-types.h: Implement mono_hazard_pointer_set and
7194 mono_hazard_pointer_clear macros using do/while(0) to fix
7195 compilation with MSVC.
7197 Code is contributed under MIT/X11 license.
7199 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7201 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
7202 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
7204 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7206 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
7209 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7211 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
7212 managed-code allocated as well.
7214 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7216 * class.c (mono_class_is_assignable_from): Add support for generic variance.
7218 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
7220 * boehm-gc.c: fixed the build after the AOT changes.
7222 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7224 * wrapper-types.h: Add an ALLOC wrapper type.
7226 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
7227 reference managed allocator methods.
7229 2007-09-12 Marek Safar <marek.safar@gmail.com>
7231 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
7232 of Type array and not MonoType, a fix suggested by Hari.
7234 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7236 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
7237 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
7239 Code is contributed under MIT/X11 license.
7241 2007-09-10 Massimiliano Mantione <massi@ximian.com>
7243 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
7245 2007-09-12 Marek Habersack <mhabersack@novell.com>
7247 * image.c (do_mono_image_open): if assembly file fails to open and
7248 MONO_IOMAP is in effect, try to find the path in a
7249 case-insensitive way.
7251 * appdomain.c (mono_runtime_init): do not install postload hooks -
7252 tests show that MS.NET doesn't use anything of that sort to
7253 trigger the AppDomain.AssemblyResolve event.
7254 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
7256 (mono_runtime_init): init portability helpers here.
7258 * assembly.c (mono_assembly_load_with_partial_name): if other
7259 attempts fail, trigger the AppDomain.AssemblyResolve event handler
7260 to resolve the assembly.
7262 * domain-internals.h: added mono_try_assembly_resolve and marked
7265 2007-09-11 Jb Evain <jbevain@novell.com>
7267 * object-internals.h (MonoReflectionDynamicMethod): add
7268 a `MonoReflectionType *owner` field. The owner is used
7270 (mono_reflection_create_dynamic_method): use the owner of the dynamic
7271 method as the class declaring the dynamic method.
7272 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
7273 dynamic method to the declaring type of the methodbuilder.
7275 2007-09-11 Mark Probst <mark.probst@gmail.com>
7277 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
7278 rules for calling methods via reflection.
7280 2007-09-11 Zoltan Varga <vargaz@gmail.com>
7282 * reflection.c (resolve_object): Add support for MonoGenericClass.
7285 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
7287 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
7288 provide a managed method that does fast allocations without needing
7289 a managed->unmanaged transition. Boehm GC implementation currently
7290 enabled for ptrfree objects on sane architectures.
7292 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
7294 * marshal.c, marshal.h: exported a couple of useful functions and
7295 added mono_mb_get_label () to easily handle backward branches.
7297 2007-09-10 Zoltan Varga <vargaz@gmail.com>
7299 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
7301 2007-09-10 Massimiliano Mantione <massi@ximian.com>
7303 * loader.c (find_method): Fixed the regression introduced while
7306 2007-09-09 Zoltan Varga <vargaz@gmail.com>
7308 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
7311 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
7312 icall.c reflection.c: Pass a MonoGenericContext argument to
7313 mono_lookup_dynamic_token ().
7315 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
7318 2007-09-09 Robert Jordan <robertj@gmx.net>
7320 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
7321 for generic methods.
7323 * object.c (mono_object_get_virtual_method): Handle generic methods.
7326 Code is contributed under MIT/X11 license.
7328 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
7330 * image.c: fix locking in mono_image_load_file_for_image ().
7332 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
7334 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
7335 used only as a cache: added an icall to fill it.
7337 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
7339 * reflection.h: exposed mono_reflection_free_type_info
7340 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
7341 since mono_reflection_bind_generic_parameters makes a copy of it.
7342 * reflection.c (free_type_info): subinfos should be freed.
7343 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
7345 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
7346 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
7347 this fixes #82695 and #81726.
7350 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
7352 * process.h, process.c: added support for user profile/info in
7353 ProcessStartInfo. For now only Windows works.
7355 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7357 * metadata.c: consider the generic arguments when comparing
7358 signatures (bug #82614).
7360 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7362 * cil-coff.h, image.c: updated assembly loader to cope with the
7363 PE32+ 64 bit file format.
7365 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7367 * assembly.c, class.c, domain.c, loader.c: remove useless
7368 inclusion of cil-coff.h.
7370 2007-08-29 Jonathan Chambers <joncham@gmail.com>
7372 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
7373 if interface is marked with CoClassAttribute.
7375 Code is contributed under MIT/X11 license.
7377 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
7379 * sgen-gc.c: ensure no object from the to space is copied again or finalized
7380 if it's seen twice in major collections.
7382 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7384 * sgen-gc.c: big objects are not copied to the gray area, but they
7385 need to be considered for scanning, too, if they are brought alive
7386 by an object ready for finalizations or a survived one.
7388 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7390 * sgen-gc.c: properly account the number of disappearing links when
7393 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
7395 * sgen-gc.c: share the code to scan the registered roots between the
7396 different types of collections.
7398 2007-08-28 Zoltan Varga <vargaz@gmail.com>
7400 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
7402 2007-08-28 Zoltan Varga <vargaz@gmail.com>
7404 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
7405 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
7407 2007-08-28 Mark Probst <mark.probst@gmail.com>
7409 * security-manager.c (mono_security_manager_get_methods):
7410 LinkDemandSecurityException now has 2 arguments instead of 3.
7412 2007-08-27 Zoltan Varga <vargaz@gmail.com>
7414 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
7415 platforms which need it.
7417 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7419 * sgen-gc.c: unregister thread data structures with a pthread_key_t
7422 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
7424 * threads.c: free the thread static data on thread exit.
7426 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
7428 * class.c: walk the hierarchy to find the generic definition for
7429 a class (fixes runtime part of bug #82498).
7431 2007-08-24 Zoltan Varga <vargaz@gmail.com>
7433 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
7436 * image.c (mono_image_close): Here. Hopefully fixes #82510.
7438 2007-08-24 Mark Probst <mark.probst@gmail.com>
7440 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
7442 2007-08-24 Robert Jordan <robertj@gmx.net>
7444 * appdomain.c: don't perform the ':'->';' substitution on Win32.
7446 2007-08-24 Jb Evain <jbevain@novell.com>
7448 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
7451 2007-08-24 Mark Probst <mark.probst@gmail.com>
7453 * threads.c: Make sure a thread gets cleaned up only once. Fixes
7456 2007-08-24 Zoltan Varga <vargaz@gmail.com>
7458 * assembly.c: Fix a warning.
7460 2007-08-23 Marek Habersack <mhabersack@novell.com>
7462 * appdomain.c: parse the <runtime> section looking for the probing
7463 element with the 'privatePath' attribute, which sets additional
7464 directories in which the runtime should look for assemblies.
7466 2007-08-23 Robert Jordan <robertj@gmx.net>
7468 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
7471 2007-08-23 Martin Baulig <martin@ximian.com>
7473 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
7474 _mono_debug_init_corlib() and remove it from the header file.
7476 2007-08-23 Martin Baulig <martin@ximian.com>
7478 * mono-debug-debugger.c
7479 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
7480 don't notify the debugger about it.
7482 * mono-debug-debugger.h
7483 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
7485 2007-08-23 Robert Jordan <robertj@gmx.net>
7487 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
7488 Code is contributed under MIT/X11 license.
7490 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7492 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
7494 2007-08-22 Martin Baulig <martin@ximian.com>
7496 * mono-debug.c: Store debugging info on a per-domain basis and
7497 free it on domain unload. Add support for unloading symbol files.
7500 (MonoDebugList): New typedef.
7502 - add `data_tables and `type_table'.
7503 - replace 'symbol_files' and `num_symbol_files' with a
7505 (mono_debug_data_table): Removed.
7506 (mono_debug_list_add): New public function.
7507 (mono_debug_list_remove): New public function.
7508 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
7509 (mono_debug_init_2_memory): Renamed into
7510 mono_debug_open_image_from_memory().
7511 (mono_debug_close_image): New public function.
7512 (mono_debug_domain_create): Likewise.
7513 (mono_debug_domain_unload): Likewise.
7514 (MONO_DEBUGGER_VERSION): Bump to 60.
7516 * mono-debug-debugger.h
7517 (MonoDebuggerEvent):
7518 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
7519 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
7520 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
7521 - rename `THREAD_CREATED' and `THREAD_EXITED' into
7522 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
7523 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
7525 (mono_debugger_add_symbol_file): Removed.
7526 (mono_debugger_add_type): Removed.
7527 (mono_debugger_lookup_type): Removed.
7528 (mono_debugger_lookup_assembly): Removed.
7531 (mono_domain_create): Call mono_debug_domain_create().
7532 (mono_init_internal): Call mono_debug_init_corlib().
7535 (mono_assembly_close): Call mono_debug_close_image().
7537 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
7539 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
7542 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
7544 * sgen-gc.c: ensure section->pin_queue_end is initialized
7545 correctly when non pinning objects in the section have been found.
7547 2007-08-22 Marek Habersack <mhabersack@novell.com>
7549 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
7550 containing a list of directories separated by ':'. MSDN docs say
7551 the directories should be separated with ';'. Part of a bugfix for
7554 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
7556 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
7557 it should MonoType and not MonoClass.
7559 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
7561 * culture-info-table.h : regenerated.
7563 2007-08-20 William Holmes <billholmes54@gmail.com>
7565 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
7566 to call ReplaceFile Kernel32 on windows or in io-layer.
7567 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
7568 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
7569 as an internal call.
7571 Code is contributed under MIT/X11 license.
7573 2007-08-20 Jb Evain <jbevain@novell.com>
7575 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
7576 and MONO_EXCEPTION_FIELD_ACCESS.
7578 * debug-helpers.[c|h]: new mono_field_full_name function.
7580 2007-08-20 Mark Probst <mark.probst@gmail.com>
7582 * class.c: Removed class_security_level() and moved it to
7583 security-core-clr.c.
7585 * security-core-clr.c, security-core-clr.h: class_security_level()
7586 is now public and renamed to mono_security_core_clr_class_level().
7587 It also looks for security attributes in the classes a class is
7590 2007-08-20 Mark Probst <mark.probst@gmail.com>
7592 * security-core-clr.c, security-core-clr.h: CoreCLR security
7595 * Makefile.am: Added security-core-clr.[ch].
7597 * security-manager.c, security-manager.h: Functions and enum for
7598 setting and getting the security mode.
7600 * class.c: CoreCLR security checks.
7602 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7604 * icall-def.h, process.c, process.h: implemented icall to get
7605 user/system processor times.
7607 2007-08-17 Mark Probst <mark.probst@gmail.com>
7609 * domain.c, threads.c, class-internals.h, domain-internals.h: New
7610 reader-lock-free jit_info_table.
7612 2007-08-17 Zoltan Varga <vargaz@gmail.com>
7614 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
7616 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
7618 * object-internals.h (MonoException): Add missing _data member.
7620 2007-08-08 Massimiliano Mantione <massi@ximian.com>
7622 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
7623 checking that only methods with matching qname or fqname are picked
7624 from implemented interfaces.
7626 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
7628 * verify.c (do_newarr):added, do type verification of
7629 newarr ops, push the right value on the eval stack.
7630 * verify.c (mono_method_verify): use do_newarr
7633 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
7635 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
7636 factored the common code into get_boxable_mono_type, which
7637 is now using mono_type_get_full, this fixed byref related tests.
7639 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
7641 * class.c: added mono_type_get_full, this function has the same
7642 behavior of mono_class_get_full but the returned MonoType has
7643 all metadata of the associated token in case of a typespec token.
7644 * class.c: added mono_type_retrieve_from_typespec, used by
7645 mono_type_get_full to retrieve the token type.
7646 * class.c (mono_class_create_from_typespec): changed to use
7647 mono_type_retrieve_from_typespec.
7648 * class.c (mono_ldtoken): changed to use mono_type_get_full
7649 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
7650 * class-internals.h: exported mono_type_get_full for internal use.
7652 2007-08-16 Jb Evain <jbevain@novell.com>
7654 * domain.c (supported_runtimes): add entry for
7655 the 'moonlight' runtime version.
7657 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
7659 * verify.c (mono_method_verify): small typo sliped in.
7661 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
7663 * verify.c (do_unbox_value): added, do type verification of
7665 * verify.c (mono_method_verify): use do_unbox_value
7668 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
7670 * verify.c (dump_stack_value): fixed typo, was printing string
7671 instead of object on stack.
7672 * verify.c (do_box_value): moved the byref check up as it leads
7673 to invalid code and should be done earlier.
7674 * verify.c: improved error messages for and ldobj
7676 2007-08-15 William Holmes <billholmes54@gmail.com>
7678 * marshal.c (emit_marshal_custom): Omit the call to
7679 marshal_native_to_managed when calling native to managed
7680 and the argument is specified as an out argument.
7682 Code is contributed under MIT/X11 license.
7684 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
7686 * verify.c: fixed the type checks for generics, function pointers and vectors.
7687 Added type verification for ldobj and ldtoken. The verifier
7688 would segfault if header or signature of a method contained references
7689 to non-existant types.
7691 2007-08-15 Jonathan Chambers <joncham@gmail.com>
7693 * marshal.c (cominterop_get_ccw): Patch from
7694 Bill Holmes to no walk up interface hierarchy.
7695 All parent methods should be present in the interface for COM.
7697 Code is contributed under MIT/X11 license.
7699 2007-08-15 Jonathan Chambers <joncham@gmail.com>
7701 * marshal.c (emit_marshal_com_interface): Patch from
7702 Bill Holmes to handle COM Interfaces as return values
7703 for native->managed calls.
7705 Code is contributed under MIT/X11 license.
7707 2007-08-14 Jonathan Chambers <joncham@gmail.com>
7709 * marshal.c (cominterop_get_idispatch_for_object): Implement
7710 for runtime callable wrappers.
7712 Code is contributed under MIT/X11 license.
7714 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
7716 * pedump.c (main): changed from mono_init to mono_init_from_assembly
7717 so 2.0 types are accessible
7720 2007-08-13 Miguel de Icaza <miguel@novell.com>
7722 * domain.c (mono_init_internal): Call mono_assembly_load_friends
7723 once we load mscorlib. Due to the order in which we initialize,
7724 the mono_assembly_load_full routine that loads mscorlib did not
7725 load friends. We now load it once we load the
7726 mono_defaults.internals_visible_class class.
7728 * assembly.c: Expose the mono_load_friend_assemblies method.
7730 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
7732 * verify.c: improved the handling of boxing, better
7733 type checking for unary ops and conversion. Fix bug
7734 regarding managed pointer compatibility checking
7736 2007-08-11 Zoltan Varga <vargaz@gmail.com>
7738 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
7740 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
7742 2007-08-09 Raja R Harinath <rharinath@novell.com>
7744 * reflection.c (dup_type): Remove.
7745 * class.c (dup_type): Remove.
7746 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
7747 instead of the dodgy 'dup_type'.
7748 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
7749 handle the case where 'dup_type' needed the second argument.
7751 2007-08-08 Zoltan Varga <vargaz@gmail.com>
7753 * domain.c: Fix a warning.
7755 2007-08-08 Massimiliano Mantione <massi@ximian.com>
7757 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
7758 checking that methods with the same fqname are not overridden
7759 with a method from an ancestor.
7761 2007-08-07 Zoltan Varga <vargaz@gmail.com>
7763 * threads.c (free_thread_static_data_helper): Avoid a crash if
7764 thread->static_data is not yet set.
7766 2007-08-07 Jonathan Chambers <joncham@gmail.com>
7768 * marshal.c: Use correct image when emitting
7769 native wrapper for COM calls.
7771 Code is contributed under MIT/X11 license.
7773 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
7775 * icall-def.h, security.c, security.h :
7776 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
7778 2007-08-07 Martin Baulig <martin@ximian.com>
7780 * mono-debug-debugger.h
7781 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
7783 * domain.c (mono_domain_free): Call
7784 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
7786 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
7788 * verify.c (check_underflow, check_overflow): error message now returns IL offset
7789 * verify.c (in_same_block): code should test if either offset is inside the clauses
7790 * verify.c (mono_method_verify): push the exception into the eval stack of exception
7793 2007-08-03 Zoltan Varga <vargaz@gmail.com>
7795 * image.c (mono_image_close): Fix a leak.
7797 * object.c (mono_runtime_invoke_array): Avoid using alloca.
7799 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
7801 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
7803 * domain.c, threads.c, threads-types.h: fix memory retention issue
7804 with thread static variables not being cleared on domain unload.
7805 Reuse thread static slots after domain unload.
7807 2007-08-03 Zoltan Varga <vargaz@gmail.com>
7809 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
7812 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
7813 now done in mono_runtime_invoke_array.
7815 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
7816 receiver is a nullable type.
7818 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
7821 2007-08-03 Jonathan Chambers <joncham@gmail.com>
7823 * marshal.c: Implement COM Objects as return type for
7824 managed->unmanaged calls. Added Release calls for COM Object
7825 out/return values in managed->unmanaged calls.
7827 Code is contributed under MIT/X11 license.
7829 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7831 * threads.h, threads-type.h: move the hazard pointer declarations
7832 to the private header.
7834 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7836 * file-io.c, appdomain.c: memory leak fixes.
7838 2007-08-02 Dick Porter <dick@ximian.com>
7841 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
7842 SO_REUSEADDR setting into io-layer/sockets.c.
7844 2007-08-01 Zoltan Varga <vargaz@gmail.com>
7846 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
7847 from Object when called on a generic parameter. Fixes #82211.
7849 2007-08-01 Dick Porter <dick@ximian.com>
7851 * file-io.c (convert_share): Test FileShare values bit-by-bit.
7852 Fixes bug 79250 yet again.
7854 2007-07-30 Martin Baulig <martin@ximian.com>
7856 Merged the `debugger-dublin' branch.
7859 (MonoDebugDataTable): New typedef.
7860 (MonoDebugMethodAddressList): New typedef.
7861 (MonoDebugWrapperData): Removed.
7862 (MonoDebugSymbolTable): Removed `current_data_table',
7863 `current_data_table_size', `current_data_table_offset'.
7864 (MonoDebugDataItemType): Moved into mono-debug.c.
7865 (MonoDebugMethodJitInfo): Remove `address'.
7866 (mono_debug_data_table): New global variable.
7867 (mono_debug_lookup_method_addresses): New public function.
7868 (mono_debug_find_method): Take a `MonoMethod *', not a
7869 `MonoDebugMethodInfo *'.
7871 * mono-debug.c: Drop support for the old symbol tables.
7873 2007-06-28 Martin Baulig <martin@ximian.com>
7875 * mono-debug.c (mono_debug_debugger_version): New public variable.
7877 2007-07-31 William Holmes <billholmes54@gmail.com>
7879 * metadata.c Changed mono_type_create_from_typespec to not insert
7880 the type into the hash map until after
7881 do_mono_metadata_parse_type has completed.
7883 Code is contributed under MIT/X11 license.
7885 2007-07-31 Zoltan Varga <vargaz@gmail.com>
7887 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
7888 generic parameter. Fixes #82211.
7890 2007-07-27 Jb Evain <jbevain@novell.com>
7892 * pedump.c (dump_metadata, dump_metadata_header): dump
7893 versions contained in the metadata header.
7895 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7897 * threads.c: register small_id_table with the GC.
7899 2007-07-27 Mark Probst <mark.probst@gmail.com>
7901 * threads.c, threads.h, class-internals.h, object-internals.h:
7902 Hazard pointers, to be used by lock-free parallel algorithms.
7904 2007-07-26 Dick Porter <dick@ximian.com>
7906 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
7907 routine on non-windows platforms, as I've not managed to think of
7908 a non-kludgy way of doing this. Finishes off bug 78739.
7910 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7912 * object.c: properly setup interface_bitmap in proxy vtables.
7914 2007-07-25 Marek Habersack <mhabersack@novell.com>
7916 * appdomain.c (get_shadow_assembly_location): do not use TickCount
7917 to create unique shadow copy target directories, use the domain's
7918 serial number instead. Each domain gets a unique target directory
7921 * domain.c (mono_domain_create): added code to increment domain
7922 shadow copy serial number and cache the value in the current
7925 * domain-internals.h (struct _MonoDomain): added a new field -
7926 shadow_serial to hold the serial number used in generation of
7927 shadow-copy directories. This is to make sure that the directory
7928 name is unique for each and every domain created. We avoid a race
7929 condition with overriding assemblies already in use by other app
7932 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
7934 * class.c (mono_bounded_array_class_get): fixed memory leak when
7935 binding generic parameters.
7937 2007-07-24 Raja R Harinath <rharinath@novell.com>
7939 * metadata.c (do_mono_metadata_parse_generic_class): Use
7940 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
7943 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7945 * loader.c, class-internals.h, reflection.c: removed the per-method
7946 generics hashtable: we use the global one through the call of
7947 mono_class_inflate_generic_method ().
7949 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
7951 * class.c, metadata.c, class-internals.h: introduce yet another
7952 generics global cache for inflated methods (fixes 98% of the perf
7953 issue in bug #81806).
7955 2007-07-23 Raja R Harinath <rharinath@novell.com>
7957 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
7958 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
7959 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
7960 return a MonoGenericInst containing (a copy) of those types.
7961 (mono_metadata_inflate_generic_inst): Update to changes.
7962 (mono_metadata_parse_generic_inst): Likewise.
7963 (mono_get_shared_generic_inst): Likewise.
7964 * reflection.c (mono_class_bind_generic_parameters): Likewise.
7965 (mono_reflection_bind_generic_method_parameters): Likewise.
7966 * metadata-internals.h: Likewise.
7967 * icall.c (free_generic_context): Kill.
7968 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
7970 * reflection.c (reflection_methodbuilder_to_mono_method): Use
7971 mono_metadata_type_dup.
7972 * marshal.c (mono_mb_create_method): Likewise.
7974 * metadata.c (mono_metadata_type_dup): Rename from
7975 mono_metadata_type_dup_mp. Take an optional mempool instead of a
7976 MonoImage. Handle a few more cases, esp. when no mempool is given.
7977 * marshal.c, metadata-internals.h: Update to changes.
7979 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7981 * class.c: fixed a small leak for array classes and removed warning.
7983 2007-07-22 Zoltan Varga <vargaz@gmail.com>
7985 * loader.c (mono_method_get_param_token): Make this work on generic methods.
7986 Return 0x8000000 for return parameters. Fixes #82161.
7988 2007-07-21 Marek Habersack <grendello@gmail.com>
7990 * appdomain.c (get_shadow_assembly_location): append the current
7991 ticks value to the path. Avoids overwriting the same assemblies by
7992 several threads at the same time.
7994 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
7995 and Raja R Harinath <rharinath@novell.com>
7997 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
7999 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
8000 property for testing if a method is a generic method definition.
8002 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
8004 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
8006 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8008 * verify.c: used function from private branch, reverted to the one in class.h
8010 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8012 * verify.c: a typo slipped in and the code wont compile
8014 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8016 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
8017 disabled box instruction as it is doing the wrong thing
8018 improved stack dump messages, now it is easier to debug type related issues
8021 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
8023 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
8025 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8027 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
8028 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
8029 grouped with class and valuetype. This change will simply
8030 the code as it should be handled just like unmanaged pointers.
8032 2007-07-19 Mark Probst <mark.probst@gmail.com>
8034 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
8036 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
8038 * verify.c: several stack merge issues fixed, reference comparisons now
8039 check the type size. strict type check now works correctly.
8040 added more uses of IS_MANAGED_POINTER macro.
8041 fixed issues pointed by running the test suite against .net.
8044 2007-07-19 Mark Probst <mark.probst@gmail.com>
8046 * class.c, loader.c, class-internals.h: Removed the
8047 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
8050 * icall.c: Better error checking in some internal reflection
8053 2007-07-18 William Holmes <billholmes54@gmail.com>
8055 * filewatcher.c : removed unused variable 'filename' in
8056 ves_icall_System_IO_FSW_SupportsFSW
8058 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8060 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
8063 2007-07-15 Zoltan Varga <vargaz@gmail.com>
8065 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
8067 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
8069 2007-07-14 Zoltan Varga <vargaz@gmail.com>
8071 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
8072 Implement generics support.
8073 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
8075 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
8076 type_args and method_args arguments.
8077 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
8078 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
8079 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
8081 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
8083 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
8084 It adds a rootimage parameter to mono_reflection_get_type_internal,
8085 adds new function mono_reflection_get_type_with_rootimage and use
8086 the rootimage to resolve the types instead of the current image
8088 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
8090 * culture-info-table.h: Forgot to update after r78304.
8092 2007-07-13 Raja R Harinath <rharinath@novell.com>
8094 * class.c (mono_class_is_open_constructed_type)
8095 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
8097 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
8099 * class.c (mono_bounded_array_class_get): method fails if used with
8100 an incomplete TypeBuilder enum (no basetype field), fixed it by
8101 avoiding calculating the size for such array as it cannot be instantiated.
8104 2007-07-12 Raja R Harinath <rharinath@novell.com>
8106 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
8108 * metadata.c, reflection.c: Update to changes.
8110 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
8112 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
8113 mono_class_is_valid_enum, they are used to valide a enum when loading.
8114 * reflection.c: used new functions to throw TypeLoadException when and
8115 invalid enum is build with TypeBuilder. Fixes #82018
8117 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
8119 * object.c: forgot commit of mono_class_setup_methods () to access
8121 * object-internals.h: added a few more handy fields to
8124 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8126 * object.c (build_imt): Call mono_class_setup_methods () before accessing
8129 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
8131 * class-internals.h, object-internals.h, object.c: IMT-based
8132 interface invocation core from Massimiliano Mantione
8133 (massi@ximian.com) with a reworked arch-specific interface,
8134 bsearch implementation and a few bugfixes and memory savings by me.
8136 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
8138 * class.c (mono_class_create_from_typedef): mono would segfault if
8139 an enum did not have a __value field. It now throws a TypeLoadException
8140 for such cases. Fix bug #82022
8142 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8144 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
8146 2007-07-09 Mark Probst <mark.probst@gmail.com>
8148 * class.c (mono_class_init): If a class is already inited but has
8149 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
8151 2007-07-09 Mark Probst <mark.probst@gmail.com>
8153 * class.c: Properly handle the case of an unimplemented interface
8154 method. Fixes: 81673.
8156 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8158 * class-internals.h, object.c: cleanup patch from massi: use
8159 MonoVTable->interface_bitmap since the vtable interfaces offset array
8162 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8164 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
8165 GetMDStreamVersion icall instead.
8167 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8169 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
8170 not use mono_dl_build_path() with a full library name: makes
8171 fallbacks to libgaim and libfam work.
8173 2007-07-06 William Holmes <billholmes54@gmail.com>
8175 * assembly.c: Added a continue statement in probe_for_partial_name when
8176 parse_assembly_directory_name fails. Fixes : 82002
8178 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
8180 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
8181 and added a verification for TYPEDBYREF.
8182 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
8183 make native int interchangeable with int32 and some small cleanup and formating.
8184 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
8185 handle byref of byref.
8186 * verify.c (push_local): handle byref of byref.
8187 * verify.c (do_binop): invalid mix of values is unverifiable
8188 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
8189 added visibility checks
8190 * verify.c (field related method): added visibility checks
8191 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
8193 2007-07-06 Zoltan Varga <vargaz@gmail.com>
8195 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
8198 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8200 * profiler.c (mono_profiler_load): Fix an off-by-one error.
8202 * marshal.c (emit_marshal_string): When returning a string from managed code,
8203 allways make a copy even for unicode strings. Fixes #81990.
8205 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
8207 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
8208 of byref generic inst types (bug #81997).
8210 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
8212 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
8213 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
8215 2007-07-02 Zoltan Varga <vargaz@gmail.com>
8217 * marshal.c (emit_marshal_string): Add support for unicode strings in
8218 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
8220 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
8222 * verify.c: field load/store are now verified, missing only access checks now
8224 2007-06-28 Martin Baulig <martin@ximian.com>
8226 * mono-debug.c (mono_debug_debugger_version): New public variable.
8228 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
8230 * locales.c: When constructing DateTimeFormat or NumberFormat for
8231 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
8232 MonoCultureInfo contructed from the current locale is always
8233 read-only and has UseUserOverride set to true. All MonoCultureInfo
8234 instances returned for GetCultures have both IsReadOnly and
8235 UseUserOverride set to true. Fixes part of bug #81930.
8237 2007-06-22 Jonathan Chambers <joncham@gmail.com>
8239 * icall-def.h: Update System.__ComObject icalls
8240 * marshal.c: Avoid managed transition (and object creation)
8241 when looking up COM interface in RCW.
8244 Code is contributed under MIT/X11 license.
8246 2007-06-22 Zoltan Varga <vargaz@gmail.com>
8248 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
8249 to avoid crashes during assembly unloading.
8251 2007-06-22 Raja R Harinath <rharinath@novell.com>
8253 Fix MethodInfo.IsGenericMethodDefinition
8254 * reflection.c (mono_reflection_bind_generic_method_parameters):
8255 Rearrange code to ensure we always uses a generic method definition.
8256 * class.c (mono_class_inflate_generic_method_full): Set
8257 'generic_container' field only for generic method definitions.
8258 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
8259 Use presense of 'generic_container' field as indication of being a
8260 generic method definition.
8262 2007-06-21 Zoltan Varga <vargaz@gmail.com>
8264 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8266 * object-internals.h: Reflect changes in the layout of the managed Delegate
8269 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
8270 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
8271 runtime memory used by the dynamic method. Fixes #77146.
8273 2007-06-21 Dick Porter <dick@ximian.com>
8276 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
8277 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
8280 2007-06-21 Raja R Harinath <rharinath@novell.com>
8282 * reflection.c (method_encode_methodspec): Add a tripwire.
8283 * class.c (inflate_generic_type): The fully open generic type is
8284 not the same as the generic type definition.
8286 2007-06-21 Martin Baulig <martin@ximian.com>
8288 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
8290 * mono-debug-debugger.h
8291 (MonoDebuggerBreakpointInfo): Removed.
8292 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
8293 (mono_debugger_remove_breakpoint): Likewise.
8294 (mono_debugger_breakpoint_callback): Likewise.
8295 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
8297 2007-06-21 Raja R Harinath <rharinath@novell.com>
8299 * metadata.c (mono_metadata_lookup_generic_class): The fully open
8300 generic type is not the same as the generic type definition.
8301 * class.c (mono_generic_class_get_class): Likewise.
8303 2007-06-20 Geoff Norton <gnorton@customerdna.com>
8305 * icall.c: The second argument to
8306 System.Reflection.MethodBase.GetMethodFromHandleInternalType
8307 is a MonoType not a MonoClass.
8309 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
8311 * verify.c: support for function pointers in the verifier
8313 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
8315 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
8317 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
8319 * assembly.c: removed Mono.Data.SqliteClient from the list of
8320 forward-compatible assemblies as it breaks the ABI (bug #81899).
8322 2007-06-19 Raja R Harinath <rharinath@novell.com>
8324 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
8325 lookup/update with the loader lock.
8326 * reflection.c (mono_class_bind_generic_parameters): No need to
8327 protect mono_metadata_lookup_* with the loader lock.
8328 * class.c (inflate_generic_type): Likewise.
8330 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
8331 on a generic instantiated type.
8333 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
8335 *verify.c: produce meanfull error messages on verification error
8336 *verify.c: fixed some cases of verification errors reported as validation errors
8337 *pedump.c: fixed the error name array, now it shows validation errors properly
8338 *verify.h: fixed the contant that should be used for verification errors
8340 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8342 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
8343 for bug #77596, 81858 and 80743 (generics data structures on domain
8346 2007-06-15 Raja R Harinath <rharinath@novell.com>
8348 Avoid allocating 'MonoGenericContext' on the heap.
8349 * class-internals (_MonoMethodInflated::context): Make field
8350 inline, not a pointer.
8351 * loader.c (method_from_methodspec): Allocate 'new_context' on the
8352 stack. Use the context embedded within the inflated method as the
8353 hash key, rather than 'new_context'.
8354 * class.c (inflate_generic_context): Simplify. Return a struct
8355 rather than allocating on the heap.
8356 (mono_class_inflate_generic_method_full): Update to changes. Now,
8357 doesn't salt away a copy of the context -- simplifying the
8358 lifetime rules of a 'MonoGenericContext *'.
8359 (mono_method_get_context): Return pointer to embedded context.
8360 (setup_generic_array_ifaces): Allocate temporary context on stack.
8361 * reflection.c (inflate_mono_method): Likewise.
8362 (mono_reflection_bind_generic_method_parameters): Likewise.
8363 Use the context embedded within the inflated method as the hash key.
8365 Avoid a source of allocation of 'MonoGenericContext'.
8366 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
8367 and 'cached_context' fields into embedded 'MonoGenericContext' field.
8368 * class.c: Update to changes.
8369 (mono_generic_class_get_context): Simplify drastically. Now just
8370 returns a pointer to the field.
8371 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
8372 argument as a const pointer.
8373 (mono_metadata_generic_context_equal): Likewise.
8374 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
8377 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
8379 * verify.c improved the handling of brtrue/brfalse, factored out common code
8381 2007-06-14 Raja R Harinath <rharinath@novell.com>
8383 Kill MonoGenericMethod.
8384 * class-internals.h (MonoGenericContext::method_inst): Rename from
8385 'gmethod' and convert to a MonoGenericInst.
8386 (MonoGenericMethod): Remove.
8387 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
8388 * loader.c (method_from_methodspec): Update to changes. Use a
8389 MonoGenericContext as the key to the hashtable.
8390 * metadata.c (mono_metadata_generic_context_equal): Rename from
8391 'mono_metadata_generic_method_equal' and take MonoGenericContext.
8392 (mono_metadata_generic_context_hash): Likewise from
8393 'mono_metadata_generic_method_hash'. Change hash function.
8394 (mono_metadata_load_generic_params): Update to changes.
8395 (mono_get_shared_generic_method): Remove.
8396 * metadata-internals.h (mono_get_shared_generic_method): Remove.
8397 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
8398 (inflate_generic_context): Likewise.
8399 (mono_class_inflate_generic_method_full): Likewise.
8400 (setup_generic_array_ifaces): Likewise.
8401 (mono_class_create_from_typespec): Likewise.
8402 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
8403 (method_encode_methodspec): Update callsite.
8404 (reflection_methodbuilder_to_mono_method): Update to changes.
8405 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
8406 MonoGenericContext as the key to the hashtable.
8407 (inflate_mono_method): Update to changes.
8409 * class-internals.h (MonoGenericMethod::container): Remove.
8410 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
8412 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
8414 * profiler-private.h, profiler.c, profiler.h: added API to profile
8417 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
8419 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
8421 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
8423 * verify.c: method invocation is now validated, now we verify parameter types on stack.
8424 Fixed overflow and underflow not aborting the verification process.
8426 2007-06-13 Mark Probst <mark.probst@gmail.com>
8428 * class-internals.h (MonoStats): Added stats entries for dynamic
8431 2007-06-12 Zoltan Varga <vargaz@gmail.com>
8433 * loader.c (mono_free_method): Free header->locals and header->clauses.
8435 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
8438 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
8440 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
8442 2007-06-12 Raja R Harinath <rharinath@novell.com>
8444 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
8447 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
8449 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
8451 2007-06-11 Raja R Harinath <harinath@gmail.com>
8453 MonoGenericMethod on a diet
8454 * class-internals.h (_MonoMethodInflated::reflection_info): Move
8456 (_MonoGenericMethod::reflection_info): ... from here.
8457 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
8459 * reflection.c (inflate_mono_method): Likewise.
8460 (mono_reflection_bind_generic_method_parameters): Likewise.
8462 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
8464 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
8465 *verify.c: factored long ldarg forms to share code with short forms
8467 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
8469 *verify.c: fixed code formating factored some duplicate code
8472 *verify.h: fixed binary incompatibility introduced earlier
8474 *pedump.c: fixed formating
8476 2007-06-11 Raja R Harinath <harinath@gmail.com>
8478 Fix assertion when disassembling Mono.C5.dll
8479 * loader.c (method_from_methodspec): Avoid inflating a method
8480 twice with the same context. If the methodref is inflated, use
8481 the declaring method instead.
8483 * class.c (mono_class_from_generic_parameter): Fix case similar to
8484 bug #81830 handled below, but for method containers.
8486 2007-06-10 Raja R Harinath <harinath@gmail.com>
8488 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
8489 get_shared_generic_class. Directly inflate the instance.
8490 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
8491 (inflate_generic_class): Delete.
8492 (get_shared_generic_class): Delete. Move setting of
8493 'cached_class' and 'cached_context' ...
8494 * metadata.c (mono_metadata_lookup_generic_class): ... here.
8496 * metadata.c (mono_metadata_lookup_generic_class): Change
8497 signature to take the components of a MonoGenericClass rather than
8498 an allocated MonoGenericClass. Change semantics to be intern-like.
8499 * reflection.c (mono_class_bind_generic_parameters): Update to
8500 changes. Make locking region tighter.
8501 * class.c (inflate_generic_class): Update to changes.
8502 (get_shared_generic_class): Likewise.
8503 * metadata-internals.h: Likewise.
8505 * reflection.c (mono_class_bind_generic_parameters): Take and
8506 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
8507 (mono_reflection_bind_generic_parameters): Use
8508 'mono_class_bind_generic_parameters' rather than duplicate the code.
8509 * class.c (mono_bounded_array_class_get): Update to changes.
8510 * object-internals.h: Likewise.
8512 * reflection.c (mono_class_bind_generic_parameters): Only support
8513 parameterizing generic type definitions. Remove support for other
8516 2007-06-08 Zoltan Varga <vargaz@gmail.com>
8518 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
8520 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
8521 in the dynamic case.
8523 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
8525 * threads.c: When cleaning up thread, reset the Background bit.
8528 2007-06-08 Jonathan Chambers <joncham@gmail.com>
8530 * metadata.c: Move variable declarations to top of scope.
8531 * verify.c: Move variable declarations to top of scope.
8533 Code is contributed under MIT/X11 license.
8535 2007-06-08 Raja R Harinath <rharinath@novell.com>
8537 * reflection.c (mono_class_bind_generic_parameters): Replace
8538 open-coded loop with mono_metadata_inflate_generic_inst.
8540 * class.c (get_shared_generic_class): Don't call
8541 mono_get_shared_generic_inst. Use the container's own
8544 * metadata.c (mono_metadata_load_generic_params): Move
8545 initialization of 'context' field here from ...
8546 * class.c (mono_class_create_from_typedef): ... here, and ...
8547 * loader.c (mono_get_method_from_token): ... here.
8549 * class.c (get_shared_generic_class): Rename from
8550 mono_get_shared_generic_class and make static.
8551 (mono_get_shared_generic_inst): Move to metadata.c.
8552 * loader.c (mono_get_shared_generic_method): Likewise.
8553 * class-internals.h, metadata-internals.h: Update to changes.
8556 * class.c (mono_class_from_generic_parameter): Don't assume a
8557 generic container owner exists. Generic containers from monodis
8560 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
8562 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
8563 * verify.h: new typedefs to returns the non-verifiable status
8564 * verify.c: initial implementation of generics, stack merging and object compatibility check
8566 2007-06-06 Mark Probst <mark.probst@gmail.com>
8568 * class.c, image.c, class-internals.h (MonoImage): class_cache is
8569 a MonoInternalHashTable again (fixed bug in internal hash table
8572 2007-06-06 Mark Probst <mark.probst@gmail.com>
8574 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
8575 MonoInternalHashTable again (fixed bug in internal hash table
8578 2007-06-06 Mark Probst <mark.probst@gmail.com>
8580 * class.c, image.c, class-internals.h, domain.c,
8581 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
8582 changes. Have to figure out what makes them break the SWF
8585 2007-06-04 Mark Probst <mark.probst@gmail.com>
8587 * class.c, image.c, class-internals.h (MonoImage): class_cache is
8588 a MonoInternalHashTable now.
8590 2007-06-04 Mark Probst <mark.probst@gmail.com>
8592 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
8593 MonoInternalHashTable now.
8595 2007-05-31 Zoltan Varga <vargaz@gmail.com>
8597 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
8600 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
8602 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
8603 dependent trampoline.
8605 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8607 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
8609 2007-05-29 Robert Jordan <robertj@gmx.net>
8611 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
8613 2007-05-28 Zoltan Varga <vargaz@gmail.com>
8615 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
8617 2007-05-25 Jonathan Chambers <joncham@gmail.com>
8619 * marshal.c: Fix interface lookup loops for
8620 cominterop_get_com_slot_for_method and
8621 cominterop_get_method_interface. Only need to lookup
8622 if type is a class, else use interface type method is on.
8624 Code is contributed under MIT/X11 license.
8626 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
8628 * reflection.c: HasSecurity can be present even if no specially
8629 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
8630 SecurityAttribute). Fix CAS regression tests on buildbot.
8632 2007-05-24 Jonathan Chambers <joncham@gmail.com>
8634 * appdomain.c: Add configure checks for header files.
8635 * image.c: Add configure checks for header files.
8636 * file-io.c: Add configure checks for header files.
8637 * debug-mono-symfile.c: Add configure checks for header files.
8638 * threadpool.c: Add configure checks for header files.
8639 * console-io.c: Add configure checks for header files.
8640 * profiler.c: Add configure checks for header files.
8641 * rawbuffer.c: Add configure checks for header files.
8642 * icall.c: Add configure checks for header files.
8643 * rand.c: Add configure checks for header files.
8644 * socket-io.c: Add configure checks for header files.
8646 Code is contributed under MIT/X11 license.
8648 2007-05-24 Zoltan Varga <vargaz@gmail.com>
8650 * reflection.c (mono_custom_attrs_from_builders): Remove the
8651 assertion as it breaks the build.
8653 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
8655 * reflection.c (lookup_custom_attr): Make a copy here too.
8657 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
8660 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
8663 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
8666 2007-05-22 Zoltan Varga <vargaz@gmail.com>
8668 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
8669 (load_cattr_value): Ditto.
8671 2007-05-20 Zoltan Varga <vargaz@gmail.com>
8673 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
8675 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
8677 * threads.c: In "start_wrapper", set apartment_state to MTA if
8678 apartment_state is Unknown and we're running on 2.0 profile or
8680 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
8681 to main method, then set apartment_state to Unknown on 1.0 profile,
8682 and MTA on 2.0 profile.
8684 2007-05-16 Jb Evain <jb@nurv.fr>
8686 * class-internals.h (MonoDefaults): Add an attribute_class and
8687 customattribute_data_class.
8688 * domain.c (mono_init_internal): Populate them.
8689 * reflection.c: Use them to remove duplicates. Make a vew
8690 MonoClass variables `static'.
8692 2007-05-15 Massimiliano Mantione <massi@ximian.com>
8694 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
8695 step in implementing IMT, so that all isinst checks now can go
8697 This was needed because vtables for TransparentProxy need to look
8698 like the vtable of the "target" class, so they need to point to
8699 its interface bitmap directly.
8701 * object.c: inside "mono_class_create_runtime_vtable" and
8702 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
8704 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
8706 * object-internals.h
8707 culture-info.h : added territory field in MonoCulture and
8708 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
8709 * locales.c : fill territory field above too.
8710 * culture-info-table.h : regenerated.
8712 2007-05-12 Zoltan Varga <vargaz@gmail.com>
8714 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
8717 2007-05-11 Jonathan Chambers <joncham@gmail.com>
8719 * object.c: Always initialize apartment, even if
8720 there is no custom attributes on entry point.
8722 Code is contributed under MIT/X11 license.
8724 2007-05-10 Jonathan Chambers <joncham@gmail.com>
8726 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
8727 * metadata.c: If no encoding is set, check for unicode
8730 Code is contributed under MIT/X11 license.
8732 2007-05-09 Jonathan Chambers <joncham@gmail.com>
8734 * threads.c: Handle if mono_thread_current returns NULL
8736 Code is contributed under MIT/X11 license.
8738 2007-05-09 Jonathan Chambers <joncham@gmail.com>
8740 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
8741 in start_wrapper. Added mono_thread_init_apartment_state and
8742 mono_thread_cleanup_apartment_state.
8743 * object.c: Initialize thread apartment state on main thread
8744 by checking for STAThreadAttribute on entry point.
8745 * object-internals.h: Add apartment_state field to MonoThread.
8746 * threads-types.h: Add unmanaged definition of
8747 System.Threading.ApartmentState, MonoThreadApartmentState.
8749 Code is contributed under MIT/X11 license.
8751 2007-05-08 Jonathan Chambers <joncham@gmail.com>
8753 * class.c: Fix windows build.
8754 * class-internals.h: Fix windows build.
8756 Code is contributed under MIT/X11 license.
8758 2007-05-08 Robert Jordan <robertj@gmx.net>
8760 * process.c (CreateProcess_internal):
8761 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
8762 .CreateNoWindow was specified. Fixes #81496.
8764 2007-05-08 Massimiliano Mantione <massi@ximian.com>
8766 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
8767 step in implementing IMT, replaced it with two compact arrays
8768 (interfaces_packed and interface_offsets_packed) and a bitmap that
8769 is used for isinst checks (interface_bitmap).
8771 * class.c: (compare_interface_ids): compare function to pass to
8772 bsearch when looking for an interface with a given id.
8773 (mono_class_interface_offset): reimplemented using bsearch on
8774 interfaces_packed, getting the offset from interface_offsets_packed.
8775 (print_implemented_interfaces): utility debugging function.
8776 (setup_interface_offsets): reworked to initialize interfaces_packed,
8777 interface_offsets_packed and interface_bitmap.
8779 * object.c: replaced all accesses to "MonoClass.interface_offsets"
8780 with uses of interfaces_packed and interface_offsets_packed.
8782 2007-05-08 Massimiliano Mantione <massi@ximian.com>
8784 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
8785 mono_class_interface_offset prototype to wrap all accesses to
8786 "MonoClass.interface_offsets".
8788 * class.c: Implemented mono_class_interface_offset, and wrapped all
8789 accesses to "MonoClass.interface_offsets".
8791 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
8792 "MonoClass.interface_offsets".
8794 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
8796 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
8797 GetMethodFromHandle overloads (bug #78637).
8799 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8801 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
8802 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
8804 2007-05-01 Zoltan Varga <vargaz@gmail.com>
8806 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
8809 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
8811 (mono_custom_attrs_from_index): Ditto.
8813 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
8816 2007-04-30 Zoltan Varga <vargaz@gmail.com>
8818 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
8819 is now allocated from a mempool.
8821 2007-04-28 Zoltan Varga <vargaz@gmail.com>
8823 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
8824 caller holds threads_lock, leading to deadlocks. Fixes #81476.
8826 2007-04-26 Zoltan Varga <vargaz@gmail.com>
8828 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
8829 mono_loader_clear_error () too late. Fixes #81463.
8831 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
8833 * culture-info-table.h : regenerated.
8835 2007-04-25 Zoltan Varga <vargaz@gmail.com>
8837 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
8840 2007-04-25 Dick Porter <dick@ximian.com>
8842 * Makefile.am: Put the mingw enforced-optimisation back into the
8843 PLATFORM_WIN32 section.
8845 2007-04-24 Zoltan Varga <vargaz@gmail.com>
8847 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
8850 * image.c (mono_image_load_module): New API function to load a module reference.
8852 * image.c (load_modules): Load modules lazily. Fixes #80812.
8854 * class.c (mono_class_from_typeref): Use mono_image_load_module.
8856 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
8858 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
8859 to mono_image_load_module_dynamic.
8861 2007-04-23 Jonathan Chambers <joncham@gmail.com>
8863 * marshal.c: Fix calling convention for CCW on non-windows
8864 platforms. STDCALL on windows, CDECL everywhere else to work
8865 with XPCOM and MainWin COM.
8867 Code is contributed under MIT/X11 license.
8869 2007-04-23 Martin Baulig <martin@ximian.com>
8874 (method_from_memberref): Added `gboolean *used_context' argument.
8875 (mono_get_method_from_token): Likewise.
8876 (mono_get_method_full): Don't insert the method in the cache when
8877 `used_context' is true.
8879 2007-04-23 Raja R Harinath <rharinath@novell.com>
8881 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
8883 * reflection.c (mono_reflection_bind_generic_parameters): Don't
8884 create new MonoTypes for returned types.
8885 * class.c (mono_generic_class_get_class): Export mono-internal.
8886 * class-internals.h: Update to changes.
8888 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
8890 * threadpool.c, threadpool.h, icall-def.h: patch from
8891 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
8893 2007-04-18 Zoltan Varga <vargaz@gmail.com>
8895 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
8897 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
8899 * threads.c (mono_thread_get_stack_bounds): New helper function.
8901 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
8902 Correctly compute stack bounds when attaching. Fixes #81394.
8904 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
8906 * reflection.c: fix handling of doubles in custom attributes
8907 for the arm-fpa format (bug #81368).
8909 2007-04-18 Raja R Harinath <rharinath@novell.com>
8911 * reflection.c (assembly_add_win32_resources): Mildly relax an
8912 bounds check to let the end pointer point just past the end of the
8913 allocated buffer. (may fix #81384)
8915 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
8917 * culture-info-table.h : regenerated.
8919 2007-04-07 Zoltan Varga <vargaz@gmail.com>
8921 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
8922 the thread is aborted early.
8924 2007-04-05 Dick Porter <dick@ximian.com>
8926 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
8927 FindFirstFile()/FindNextFile() to find entries. This lets the
8928 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
8931 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
8933 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
8935 2007-04-04 Martin Baulig <martin@ximian.com>
8938 (mono_method_desc_full_match): Add support for nested classes.
8940 2007-04-02 Zoltan Varga <vargaz@gmail.com>
8942 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
8944 2007-04-01 Zoltan Varga <vargaz@gmail.com>
8946 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
8947 waiting for too many threads.
8949 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
8951 * environment.c: Fix return value check on uname so we can get the
8952 executing version on Solaris operating systems.
8954 2007-03-28 Jb Evain <jbevain@gmail.com>
8956 * class.c (mono_type_get_name_recurse): Complete the
8957 fix for the creation of assembly qualified names for
8958 pointer types. Fixes #81208.
8960 2007-03-27 Dick Porter <dick@ximian.com>
8962 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
8963 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
8967 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
8968 the value of ReleaseMutex().
8970 2007-03-27 Dick Porter <dick@ximian.com>
8972 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
8973 in little-endian order, not network endian, so must be converted
8974 to host endian here. Fixes bug 80593.
8976 2007-03-22 Jb Evain <jbevain@gmail.com>
8978 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
8979 qualified names for pointer types. Fixes #81208.
8981 2007-03-21 Jonathan Chambers <joncham@gmail.com>
8983 * marshal.c: Add support for PreserveSigAttribute.
8985 Code is contributed under MIT/X11 license.
8987 2007-03-14 Zoltan Varga <vargaz@gmail.com>
8989 * process.c: Fix endianness issues. Fixes #81126.
8991 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
8992 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
8994 * image.c (mono_image_lookup_resource): Make this work on big-endian
8995 machines.Change API contract so the caller needs to free the return value.
8997 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
9000 2007-03-14 Martin Baulig <martin@ximian.com>
9002 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
9003 mono_type_get_desc() as well.
9005 2007-03-13 Jonathan Chambers <joncham@gmail.com>
9007 * icall.c: Fix environ access in VS.
9009 2007-03-13 Alp Toker <alp@atoker.com>
9011 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
9012 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
9015 2007-03-12 Zoltan Varga <vargaz@gmail.com>
9017 * reflection.c (mono_reflection_create_dynamic_method): Add support for
9018 circular references among dynamic methods. Fixes #81091.
9020 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
9022 2007-03-09 Martin Baulig <martin@ximian.com>
9024 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
9026 2007-03-09 Jonathan Chambers <joncham@gmail.com>
9028 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
9029 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
9031 Code is contributed under MIT/X11 license.
9033 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
9035 * loader.c: Reapply patch for bug #79424.
9037 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9039 * metadata.c (mono_type_to_unmanaged): Only convert object to
9040 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
9042 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
9044 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
9045 (and incorrectly set) is_reference field from MonoGenericInst.
9047 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9049 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
9052 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
9054 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
9056 2007-03-05 Miguel de Icaza <miguel@novell.com>
9058 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
9059 FileOptions.1 value to mean "temporary", map that to
9060 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
9064 2007-03-03 Marek Habersack <mhabersack@novell.com>
9066 * appdomain.c: implement MS .Net style shadow copying. Copies of
9067 the assemblies are made in a subdirectory of the dynamic base
9068 directory, the assembly names are preserved.
9069 Copy .mdb and .config files along with the assemblies being shadowed.
9071 2007-02-28 Zoltan Varga <vargaz@gmail.com>
9073 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
9074 (emit_marshal_handleref): Ditto.
9076 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
9077 on Visual C++. Fixes #80671.
9079 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9081 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
9082 for clone operations.
9084 2007-02-28 Zoltan Varga <vargaz@gmail.com>
9086 * marshal.c: Fix warnings.
9088 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
9090 * loader.c: allow case-insensitive matching of the dll name
9091 in dllmap handling when prefixed with "i:".
9093 2007-02-20 Jonathan Chambers <joncham@gmail.com>
9095 * threads.c: Fix #ifdef for dummy_apc function for VS.
9097 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9099 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
9101 2007-02-19 Massimiliano Mantione <massi@ximian.com>
9102 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
9103 giving precedence to the methods with a fully qualified name
9104 (InterfaceName.MethodName) when building the interface sections
9107 2007-02-16 Dick Porter <dick@ximian.com>
9109 * threadpool.c (append_job): Fix fast-path array handling, so it's
9110 less likely the array will grow exponentially when the load is
9113 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9115 * metadata-internals.h, loader.c: fix dllmap lookup order
9116 for non-function maps, too, and prepare for fallback code.
9118 2007-02-12 Robert Jordan <robertj@gmx.net>
9120 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
9121 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
9122 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
9123 GlobalFree. Fixes a part of bug #77075.
9125 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
9127 * loader.c: implemented typedef parent in field memberref.
9129 2007-02-11 Jonathan Chambers <joncham@gmail.com>
9131 * marshal.c: Fix warnings and remember to call Release on
9134 Code is contributed under MIT/X11 license.
9136 2007-02-10 Miguel de Icaza <miguel@novell.com>
9138 * class-internals.h: Add MonoHandleRef definition, and
9139 handleref_class to mono_defaults.
9141 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
9142 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
9144 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
9145 (do nothing on this stage)
9146 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
9147 (emit_marshal_handleref): New method, used for argument handling
9150 2007-02-08 Jonathan Chambers <joncham@gmail.com>
9152 * class.c (mono_class_setup_parent): Lazily init com types.
9153 * domain.c (mono_init_internal, mono_init_com_types): Lazily
9155 * object.c (mono_remote_class_vtable): Lazily init com types.
9156 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
9157 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
9158 * domain-internals.h: Expose mono_init_com_types.
9159 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
9160 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
9161 Add support for COM Callable Wrapper marshalling.
9162 * marshal.h: Add icall definitions.
9163 * gc.c: Handle freeing of CCWs in finalizer code.
9165 Code is contributed under MIT/X11 license.
9167 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
9169 * reflection.c: changed all the signature encoding code to use
9170 a variable-sized buffer.
9172 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9174 * marshal.c: locking fixes: never take the loader lock
9175 or other runtime locks when holding the marshal lock
9178 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
9180 * marshal.c: make the delegate function pointer mapping
9181 work for the moving GC.
9183 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
9185 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
9188 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9190 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
9193 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9195 * threadpool.c: made the code moving-GC safe.
9197 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
9199 * assembly.c, boehm-gc.c, class-internals.h, class.c,
9200 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
9201 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
9203 * reflection.c: warning cleanup, some threading and moving GC fixes.
9205 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
9207 * class.c, loader.c: create the needed Set/Get/Address array methods
9208 as well as the .ctors in mono_class_init (), fixes bug #80567.
9210 2007-01-24 Zoltan Varga <vargaz@gmail.com>
9212 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
9213 we doesn't decrease its alignment. Should fix the sparc build.
9215 2007-01-24 Dick Porter <dick@ximian.com>
9218 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9219 Create the returned object if we need to ignore an unsupported
9220 socket option. Fixes a segfault reported by Atsushi.
9222 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
9224 * class.c, object.c: restrict GC-tracked fields to
9225 UIntPtr fields used inside corlib, so we provide better
9226 type info to the GC and also allow broken packing as in
9229 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
9231 * sgen-gc.c: removed duplicated function.
9233 2007-01-19 Miguel de Icaza <miguel@novell.com>
9235 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
9236 value that means that the value is not supported, but that we
9237 should not return a failure, but instead report this as a
9238 successful operation.
9240 2007-01-19 Raja R Harinath <rharinath@novell.com>
9242 Fix tests/bug79956.2.il
9243 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
9244 (mono_generic_class_get_class): If the generic definition in an
9245 enum, copy over other fields related to it.
9247 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9249 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
9250 genericinst enums (bug #79215).
9252 2007-01-17 Massimiliano Mantione <massi@ximian.com>
9253 * class.c: Fix bug 80307.
9255 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
9257 * image.c: if the file table is not present, try to load
9258 all the modules, since we don't have info about them
9259 having or not metadata (bug #80517).
9260 * assembly.c: allow mono_assembly_load_references () to
9261 work for netmodules.
9263 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9265 * image.c, metadata-internals.h, object.c: execute module
9266 cctors when running on the 2 runtime if present (bug #80487).
9268 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
9270 * icall.c: optimized InitializeArray() on bigendian.
9272 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
9274 * icall.c: fix for the broken ARM FPA double format.
9276 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9278 * icall.c: handle endian issues for r4 and r8 types, too, in
9279 the InitializeArray() icall.
9281 2007-01-15 Miguel de Icaza <miguel@novell.com>
9283 * loader.c (mono_loader_error_prepare_exception): Clear the error
9284 once we have extracted the information from it, do this before we
9285 call into the JIT's class loading mechanisms.
9287 * object.c (mono_class_create_runtime_vtable): Do not clear the
9288 loader error before calling mono_class_get_exception_for_failure
9289 as the loader error is needed inside
9290 mono_class_get_exception_for_failure to throw the error (thinko).
9294 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9296 * reflection.c: align fields rva data so it's faster to load at
9299 2007-01-12 Raja R Harinath <rharinath@novell.com>
9301 Prepare to simplify GenericMethod handling.
9302 * class-internals.h (mono_method_get_context): New accessor function.
9303 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
9304 rather than directly accessing '->context' field.
9306 * class-internals.h (_MonoGenericParam.method): Move ...
9307 (_MonoGenericContainer): ... here. Add into union with klass field.
9308 * class.c, icall.c, loader.c, metadata.c, reflection.c:
9311 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
9313 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
9314 the wrapper type enum and reduce relocations.
9316 2007-01-12 Raja R Harinath <rharinath@novell.com>
9318 * reflection.c (inflate_mono_method): Reuse method instantiation
9319 from the generic method, if available.
9321 2007-01-11 Jonathan Chambers <joncham@gmail.com>
9323 * marshal.c (emit_marshal_variant): Fix conv_arg
9324 type in last commit, based on whether parameter is byref.
9326 2007-01-11 Jonathan Chambers <joncham@gmail.com>
9328 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
9330 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
9331 MONO_TYPE_OBJECT back for VARIANT support.
9333 2007-01-11 Jonathan Chambers <joncham@gmail.com>
9335 * marshal.c, marshal.h, icall-def.h: Implement
9336 Marshal.ReAllocCoTaskMem.
9338 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
9340 * marshal.c: memory retention fixes: use the proper
9341 image cache for runtime_invoke method lookups.
9343 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9345 * mempool.c: added code to help debug mempool allocations.
9347 2007-01-11 Dick Porter <dick@ximian.com>
9349 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
9350 support (experimenting with faking it with IP_MTU_DISCOVER for
9351 systems that don't have IP_DONTFRAGMENT.)
9352 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
9355 * icall-def.h: new System.Net.Sockets.Disconnect icall.
9357 * socket-io.h: Add new fields to MonoSocketAsyncResult
9358 corresponding to the new ones in Socket.cs.
9360 2007-01-11 Raja R Harinath <rharinath@novell.com>
9362 Fix IronPython regression mentioned in #80249
9363 * metadata.c (do_mono_metadata_parse_generic_class): Clear
9364 'cached_context' field, since it may have been initialized as a
9365 side-effect of metadata parsing.
9367 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
9368 (_MonoGenericClass.cached_class): Move here and rename from lone
9369 remaining field of ...
9370 (_MonoInflatedGenericClass): ... this. Remove.
9371 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
9374 Fix mcs/tests/test-128.cs regression.
9375 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
9376 2007-01-10 change below.
9377 [MONO_TYPE_OBJECT]: Recurse into array case.
9379 2007-01-11 Raja R Harinath <harinath@gmail.com>
9381 * class-internals.h (mono_get_inflated_generic_class): Remove.
9382 * class.c (mono_get_inflated_generic_class): Remove.
9383 (mono_generic_class_get_class): Rename from
9384 mono_class_create_generic.
9385 (mono_class_from_mono_type) [GENERICINST]: Use it.
9386 * reflection.c, metadata.c: Update to changes. Use
9387 'mono_class_from_mono_type'.
9389 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
9391 * reflection.c: use passed type when encoding an array element
9392 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
9394 2007-01-09 Robert Jordan <robertj@gmx.net>
9396 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
9397 result arguments (someDelegate.EndInvoke (unrelatedAres)).
9400 2007-01-09 Raja R Harinath <rharinath@novell.com>
9402 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
9404 * object.c (set_value): Avoid aliasing between type->data.klass
9405 and type->data.generic_class.
9407 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
9409 2007-01-08 Raja R Harinath <rharinath@novell.com>
9411 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
9412 between type->data.klass and type->data.generic_class.
9414 2007-01-08 Lluis Sanchez <lluis@ximian.com>
9416 * marshal.c: In MS.NET, StringBuilder objects are not copied by
9417 value in out parameters.
9419 2007-01-08 Raja R Harinath <rharinath@novell.com>
9421 Simplify invariant for MonoGenericClass::klass field.
9422 * class.c (mono_class_create_generic): Verify 'klass' is null.
9423 * metadata.c (do_mono_metadata_parse_generic_class): Don't
9424 initialize 'klass' field.
9426 2007-01-05 Raja R Harinath <rharinath@novell.com>
9428 Ongoing work to avoid redundant data and simplify invariants.
9429 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
9430 'generic_class', and change type to a GenericInst.
9431 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
9432 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
9434 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
9436 * class.c : skip io-layer under PLATFORM_WIN32.
9438 2007-01-03 Tor Lillqvist <tml@novell.com>
9440 Fix #80305: In a bundled executable, look in the bundled exe
9441 assembly to determine the runtime version. Add the possibility to
9442 bundle also the machine.config file.
9444 * assembly.c (mono_assembly_open_from_bundle): Make
9445 non-static. Allow being called even if we have no bundled
9446 assemblies, and return NULL right away in that case.
9448 * domain-internals.h: Declare mono_assembly_open_from_bundle()
9451 * domain.c (app_config_parse): Take an assembly exe file name as
9452 parameter instead of a config file name. Check for a bundled
9453 config file for that assembly by calling
9454 mono_config_string_for_assembly_file() (see below) before looking
9455 for one in the file system.
9456 (get_runtimes_from_exe): Corrsponding change to call of
9458 (get_runtimes_from_exe): Check for bundled assembly exe file first
9459 by calling mono_assembly_open_from_bundle(). If no bundled
9460 assembly exe file is found, call mono_image_open() as before to
9461 look it up in the file system.
9463 * mono-config.c: Add variable bundled_machinec_onfig.
9464 (mono_config_string_for_assembly_file): New function.
9465 (mono_config_for_assembly): Move code snippet that looks for a
9466 bundled assembly .config file into the above new function. Call
9468 (mono_register_machine_config, mono_get_machine_config): New
9469 functions to set and retrieve
9471 * assembly.h: Declare mono_register_machine_config().
9473 * mono-config.h: Declare mono_get_machine_config() and
9474 mono_config_string_for_assembly_file().
9476 * icall.c: No declaration of environ necessary on Win32. It is
9477 declared (as a macro expanding to a function call) in stdlib.h.
9478 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
9479 New internal mono function. Returns the value of
9480 mono_get_machine_config() as a Mono string.
9482 * icall-def.h: Add get_bundled_machine_config().
9484 2007-01-04 Raja R Harinath <rharinath@novell.com>
9486 Remove redundant field
9487 * class-internals.h (_MonoGenericContext.container): Remove field.
9488 * loader.c (mono_method_get_signature_full): Don't parse a
9489 "container" for a signature parse when the signature is inflated
9491 (method_from_methodspec): Likewise, for a generic_inst.
9492 * class.c, metadata.c, reflection.c: Update to changes.
9494 2006-01-04 Raja R Harinath <rharinath@novell.com>
9496 * class-internals.h (_MonoGenericClass): Rename 'context' field to
9497 'cached_context', and change semantics -- it starts off NULL, and
9498 is initialized on demand.
9499 * class.c (mono_generic_class_get_context): New accessor to
9500 replace 'context' field accesses.
9501 (mono_class_get_context): New helper.
9502 (*): Update to changes.
9503 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
9505 2007-01-03 Miguel de Icaza <miguel@novell.com>
9507 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
9508 before the memcpy. Fixes Marshal2 regression.
9510 2007-01-02 Jb Evain <jbevain@gmail.com>
9512 * blob.h: add a MONO_TYPE_ENUM definition
9513 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
9514 fix the encoding of arrays of enums in custom attributes.
9518 2007-01-01 Miguel de Icaza <miguel@novell.com>
9520 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
9521 string is null terminated, but only cut the string short if it
9522 overflows the buffer.
9524 (mono_string_to_byvalstr): Also fix this routine. The code here
9525 was not properly terminating a string (it was only terminated
9526 because of the previous catch-all memset).
9528 I left the memset, because I do not know if applications expect
9529 the runtime to clear this region.
9533 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
9534 Clear the error before returning to unmanaged code to prevent the
9535 runtime from being confused later on (fixes 80420).
9536 (ves_icall_type_from_name): Always call mono_loader_clear_error
9537 after parsing a type that could have failed.
9538 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
9540 * loader.c (mono_loader_clear_error): Fix indentation.
9542 2006-12-28 Martin Baulig <martin@ximian.com>
9544 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
9546 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9548 * reflection.c: patch from Rolf Bjarne Kvinge to fix
9549 getting a token for an EnumBuilder.
9551 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
9553 * reflection.c: be more careful in case resource generation
9554 fails to create the data array.
9556 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9558 * sgen-gc.c: write barrier for clone and fix unregister handles.
9560 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9562 * reflection.c: some fixes needed in the generics code for the moving GC.
9564 2006-12-22 Robert Jordan <robertj@gmx.net>
9566 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
9567 account. Fixes bug #80299.
9569 2006-12-21 Raja R Harinath <rharinath@novell.com>
9571 Fix WaitHandle usage in delegates.
9572 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
9573 * object.c (mono_wait_handle_new): Use the property set method to
9574 initialize the handle.
9575 (mono_wait_handle_get_handle): New.
9576 * threadpool.c (mono_async_invoke): Use it.
9577 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
9579 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
9581 2006-12-21 Jonathan Chambers <joncham@gmail.com>
9583 * marshal.c (emit_marshal): Call emit_marshal_variant and
9584 emit_marshal_com_interface when applicable.
9585 (emit_marshal_variant, emit_marshal_com_interface): Add
9586 methods for this case and remove if's from emit_marshal_object.
9588 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
9590 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
9592 2006-12-19 Jonathan Chambers <joncham@gmail.com>
9594 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
9595 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
9596 and GlobalFree on Windows. Remove FIXME.
9598 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9600 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
9601 implementation for managed objects.
9603 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9605 * object.c: implemented code to be used for checking
9606 that no reference field overlaps with non-references.
9608 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9610 * threadpool.c: fix queue code to be compatible with the
9613 2006-12-18 Miguel de Icaza <miguel@novell.com>
9615 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
9616 in structures by throwing ArgumentNullException.
9618 (emit_marshal_safehandle): Also when they are null parameters.
9620 (emit_marshal_safehandle): Add support for ref
9621 SafeHandles parameters
9623 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9625 * profiler.c: updated to use the mono-dl API instead of
9628 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9630 * profiler.c: updated to use the mono-dl dynamic loading
9631 API instead of gmodule.
9633 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9635 * profiler.c: use readlink, older versions of glib don't have
9636 g_file_read_link ().
9638 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9640 * profiler.c: try to detect the path to mono if libc fails to provide
9641 a useful name (bug #80286).
9643 2006-12-16 Raja R Harinath <rharinath@novell.com>
9646 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
9647 instance, use the generic type definition instead.
9648 (ves_icall_Type_GetNestedTypes): Likewise.
9649 * class.c (mono_class_create_generic): Always set the
9650 nested_classes of a generic instance to NULL, even if the generic
9651 type definition has nested types.
9653 2006-12-15 Jonathan Chambers <joncham@gmail.com>
9655 * marshal.c (mono_string_from_bstr): Revert previous Windows change
9658 2006-12-15 Miguel de Icaza <miguel@novell.com>
9660 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
9661 my arguments were in the wrong order. I also fixed the Windows
9662 version which seems to have had the same issue.
9664 (mono_free_bstr): On Unix, this is g_free.
9665 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
9666 conversions (for the tests in corlib to pass).
9668 2006-12-14 Miguel de Icaza <miguel@novell.com>
9670 * marshal.c (emit_ptr_to_object_conv): For now, ignore
9671 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
9672 exception if a ref SafeHandle in a struct has changed).
9674 (emit_struct_conv): Do not perform layout checks for classes
9675 derived from SafeHandle, as those are specially handled.
9677 (emit_object_to_ptr_conv): Add support for
9678 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
9680 (emit_marshal_safehandle): Implement conversion of return values
9681 of safehandles (MARSHAL_ACTION_CONV_RESULT).
9683 * threads.c: WaitHandle now is compiled with two different handles
9684 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
9687 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
9688 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
9689 these routines to cope with both kinds of fields.
9691 2006-12-12 Miguel de Icaza <miguel@novell.com>
9693 * metadata.c (mono_type_to_unmanaged): Handle the case where
9694 type->data.klass is a SafeHandle, and in that case, return the
9695 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
9696 MONO_MARSHAL_CONV_SAFEHANDLE.
9698 2006-12-11 Miguel de Icaza <miguel@novell.com>
9700 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
9701 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
9702 calling emit_marshal_object.
9704 (emit_marshal_safehandle): Implement marshalling of
9705 SafeHandle parameters (no ref support yet).
9707 (MarshalAction): Document the defines as I implement
9708 them for SafeHandle.
9710 (emit_marshal_object): indentation police.
9712 * class-internals.h: Define MonoSafeHandle.
9713 Add safehandle_class to MonoDefaults type.
9715 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
9716 list of classes to check for fields.
9718 * domain.c (mono_init_internal): Add SafeHandle to the list of
9719 mono_defaults loaded.
9721 2006-12-15 Raja R Harinath <rharinath@novell.com>
9724 * reflection.c (mono_reflection_bind_generic_parameters): If the
9725 generic type definition is a type builder, ensure that it is fully
9726 initialized before instantiating it. Kill some dead code.
9728 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9730 * object.c: clear the loader_error () before loading
9731 more metadata stuff (bug #80258).
9733 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
9735 * icall.c, icall-defs.h: type modifiers icalls for
9736 parameters and properties.
9738 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9740 * object.c, icall.c: fixed warnings.
9742 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9744 * marshal.c: fixed a couple of leaks and coding style in a few places.
9746 2006-12-08 Dick Porter <dick@ximian.com>
9748 * process.c: Cope with NULL ProcessStartInfo arguments on windows
9749 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
9752 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9754 * process.c: ProcessStartInfo may have only filename set and
9755 arguments can be NULL.
9757 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9759 * icall.c: fix leak found by Robert Jordan.
9761 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9763 * marshal.c, marshal.h: generate managed method to access an element
9764 of a multi-dimensional array.
9766 2006-11-30 Paolo Molaro (lupus@ximian.com)
9768 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
9770 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9772 * icall.c: back out GetFields () fix until the serialization code is
9773 fixed to not depend on the incorrect behaviour.
9775 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9777 * profiler.c: provide defaults if none are set.
9779 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9781 * Makefile.am, attrdefs.h: new public header file with
9782 constants for attributes for use by embedders.
9784 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9786 * icall.c: GetFields () fix for bug #80064.
9788 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
9790 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
9791 removed long unused icalls.
9793 2006-11-27 Jonathan Chambers <joncham@gmail.com>
9796 (mono_marshal_emit_managed_wrapper): Level of indirection for
9797 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
9798 can be generated without a delegate class.
9799 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
9801 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
9803 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9805 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
9808 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9810 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
9811 icall-def.h: added icalls needed by System.GC.
9813 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
9815 * loader.c: ensure the class in catch clauses is handled
9816 correctly for generics methods (fixes bug#79980).
9818 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9820 * monitor.h, monitor.c: added mono_locks_dump () function
9821 to help debug deadlocks involving managed locks.
9823 2006-11-13 Dick Porter <dick@ximian.com>
9825 * file-io.c (get_file_attributes): If the file is a symlink try
9826 and get the stat data for the target, but also add the
9827 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
9828 the specs for the windows symlink support, but will probably have
9829 to be reworked when I have test data from a vista machine. Fixes
9832 2006-11-13 Dick Porter <dick@ximian.com>
9834 * gc.c (mono_domain_finalize):
9835 * marshal.c (mono_delegate_begin_invoke):
9836 * threadpool.c (socket_io_init, mono_thread_pool_init)
9837 (mono_thread_pool_finish):
9838 * monitor.c (mono_monitor_try_enter_internal):
9839 * threads.c (mono_thread_resume, mono_thread_init)
9840 (mono_thread_suspend_all_other_threads)
9841 (mono_thread_execute_interruption):
9842 * appdomain.c (mono_domain_unload): Check for NULL error returns
9843 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
9846 2006-11-11 Miguel de Icaza <miguel@novell.com>
9849 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
9850 Only close the handle if the value of the handle is not
9851 INVALID_HANDLE_VALUE. This just makes the process a bit more
9854 Improvement for #75733, so that we do not run into this problem.
9857 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
9858 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
9859 internal variables. Fixes #79462
9862 2006-11-09 Dick Porter <dick@ximian.com>
9864 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
9865 Use poll() not select(). Fixes bug 79397.
9867 2006-11-09 Raja R Harinath <rharinath@novell.com>
9870 * assembly.c (mono_assembly_load_from_full): Check that the given
9871 image has an assembly manifest.
9873 2006-11-09 Ankit Jain <jankit@novell.com>
9875 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
9876 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
9877 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
9879 2006-11-07 Dick Porter <dick@ximian.com>
9881 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
9882 Put the old resolver behaviour back for pre-2.0 profiles.
9884 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
9886 * threadpool.c: precise GC and locking fixes.
9888 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9890 * class.c: don't load types that have an explicit unaligned
9891 managed reference. Provide better info in the TypeLoad exception.
9892 Part of the fix for bug #79744.
9893 * object.c: use the correct check for class type load issues.
9895 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9897 * class.c: enforce alignment of fields with managed references
9898 even when Pack=1 is forced by the user (bug #77788).
9900 2006-11-03 Dick Porter <dick@ximian.com>
9902 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
9903 If the address reverse lookup fails, return it as the hostname
9904 anyway. Fixes bug 79721.
9906 2006-11-03 Dick Porter <dick@ximian.com>
9908 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
9909 Fix build on Windows.
9911 2006-11-02 Dick Porter <dick@ximian.com>
9914 * object-internals.h:
9915 * exception.c (mono_get_exception_thread_interrupted):
9916 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
9919 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
9920 Check for pending Thread.Interrupt.
9922 2006-10-27 Massimiliano Mantione <massi@ximian.com>
9923 * loader.c: Fixed bug 79684.
9925 2006-10-27 Dick Porter <dick@ximian.com>
9927 * file-io.c (get_file_attributes): Force symlinks to directories
9928 to be returned as a regular file. Fixes bug 79733.
9929 2006-10-26 Dick Porter <dick@ximian.com>
9931 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
9932 CreateFile to open a directory then we need to set the
9933 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
9935 2006-10-23 Zoltan Varga <vargaz@gmail.com>
9937 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
9940 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
9942 * sgengc.c: small cleanup of timer code.
9944 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9946 * sgen-gc.c: fix some warnings and start adding support for
9947 complete object removal on domain unload.
9949 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
9951 * assembly.c: build_assembly_name should not consider a version
9952 number without build or revision number invalid. Fixes bug #79715.
9954 2006-10-18 Jonathan Chambers <joncham@gmail.com>
9956 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
9957 call kernel32 function OutputDebugString directly.
9959 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
9961 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
9963 * reflection.c: small cleanup, using a function to insert a MonoString
9966 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
9968 * reflection.c: moving GC fixes.
9970 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9972 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
9973 all the objects with finalizers belonging to an unloading appdomain.
9975 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9977 * sgen-gc.c: added ability to allocate even when the nursery is fully
9978 pinned and fixed a couple of bugs.
9980 2006-10-15 Zoltan Varga <vargaz@gmail.com>
9982 * threads.h: Revert the last change for now.
9984 * threads.h (mono_thread_get_pending_exception): Rename this to
9985 mono_thread_get_undeniable_exception ().
9987 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
9989 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
9990 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
9991 when fname does not refer to valid assembly. This result in a more
9992 meaningful error message.
9993 * exception.c: added mono_get_exception_bad_image_format2 which
9994 constructs a BadImageFormatException using the ctor taking a custom
9995 message and the file name. Passing in a NULL msg results in a default
9997 * exception.h: define mono_get_exception_bad_image_format2 function.
9998 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
9999 when file name pointed to an invalid IL image. Use
10000 mono_get_exception_file_not_found2 to construct FileNotFoundException,
10001 as this results in a more meaningful error message.
10003 2006-10-15 Zoltan Varga <vargaz@gmail.com>
10005 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
10008 2006-10-12 Zoltan Varga <vargaz@gmail.com>
10010 * metadata.c (mono_type_size): Change the align parameter to guint32 for
10011 consistency with the other _size functions.
10012 (mono_type_stack_size): Ditto.
10014 * class.c object.c icall.c: Fix warnings caused by the above change.
10016 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
10018 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
10020 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
10022 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
10024 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
10025 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
10026 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
10027 threadpool.h, threads-types.h: mark more internal functions.
10029 2006-10-11 Dick Porter <dick@ximian.com>
10031 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
10032 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
10033 reproduce the bug even before applying the fix.)
10035 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
10037 * reflection.c: allow retrieving attributes for arguments in generic
10038 methods (bug #79241).
10040 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
10042 * debug-mono-symfile.c: properly check fopen () result (found by
10045 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
10047 * reflection.c: make error message clearer and fixed two
10048 issuelets found by Coverity.
10050 2006-10-10 Zoltan Varga <vargaz@gmail.com>
10052 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
10054 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
10056 * object-internals.h, gc-internal.h, profiler-private.h:
10057 mark internal functions.
10059 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
10061 * reflection.c: put data in the text section.
10062 * icall.c: recognize more types in type_from_typename ().
10063 * process.c, marshal.c: added some GC FIXMEs.
10065 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
10067 * loader.c: check for NULL before initializing.
10069 2006-10-09 Zoltan Varga <vargaz@gmail.com>
10071 * gc.c (finalizer_thread): Use a non-alertable wait here.
10073 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
10074 until the correct solution is found.
10076 2006-10-06 Zoltan Varga <vargaz@gmail.com>
10078 * reflection.c (mono_module_get_object): Avoid an assert when operating on
10079 modules with no metadata. Fixes #79596.
10081 * image.c (load_metadata_ptrs): Put back the error message when
10082 the #- heap is encountered since the support is not complete yet.
10084 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
10086 * gc.c: do not allow the user to SuppressFinalize () a
10087 delegate because it would leak the trampoline if present.
10089 2006-10-06 Zoltan Varga <vargaz@gmail.com>
10091 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
10094 2006-10-05 Zoltan Varga <vargaz@gmail.com>
10096 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
10098 * metadata.c (mono_metadata_get_param_attrs): Ditto.
10100 * row-indexes.h: Add definitions for *Ptr tables.
10102 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
10104 * metadata.c (mono_metadata_translate_token_index): New helper function to
10105 translate table indexes used in uncompressed metadata.
10106 (mono_metadata_decode_table_row): Ditto.
10107 (mono_metadata_decode_table_row_col): Ditto.
10109 * metadata.c: Add table schema for *Ptr tables.
10111 * class.c loader.c: Use the new helper function to access the affected metadata
10114 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
10117 2006-10-04 Zoltan Varga <vargaz@gmail.com>
10119 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
10120 sequences which can be unbounded in size. Fixes #79583.
10122 2006-10-02 Zoltan Varga <vargaz@gmail.com>
10124 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
10125 static initialization.
10127 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
10129 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
10131 * domain.c (mono_domain_free): Free up type_init_exception_hash.
10133 * object.c (mono_runtime_class_init): Implement correct semantics when a static
10134 ctor fails, i.e. throw the same exception on subsequent accesses.
10136 2006-09-0 Jonathan Chambers <joncham@gmail.com>
10138 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
10139 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
10140 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
10141 Handle marshalling of interfaces and VARIANTs contained in structs.
10143 Code is contributed under MIT/X11 license.
10145 2006-09-30 Zoltan Varga <vargaz@gmail.com>
10147 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
10149 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
10152 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10154 * console-io.c: ignore previous SIGINT handler.
10156 2006-09-27 Zoltan Varga <vargaz@gmail.com>
10158 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
10159 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
10160 #79460, #79461, #79485.
10162 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
10164 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
10167 2006-09-26 Zoltan Varga <vargaz@gmail.com>
10169 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
10170 could be generated from it.
10172 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
10174 * rand.c: fix read loop to correctly handle EINTR.
10176 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10178 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
10179 internal calls are defined to keep methods closer to the declaring
10180 type and allow a significant reduction in runtime relocations and
10183 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
10185 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
10186 exception message to have FileNotFoundException use the default
10187 assembly load error message. Fixes bug #79426.
10188 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
10190 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10192 * threadpool.c: (start_thread_or_queue) use the root domain when
10193 creating the thread instead of the async object one.
10195 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
10197 * class.c, object.c, class-internals.h, reflection.c:
10198 for arrays, store element_size inside MonoClass (speedup
10199 for array object creation).
10201 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
10203 * icall.c: fixed CodeBase to use the file name and not the module
10206 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
10208 * mono-debug.c, mono-debug.h: export find_method as
10209 mono_debug_find_method ().
10211 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10213 * debug-helpers.c, class-internals.h: added a few functions useful
10214 when debugging under gdb.
10216 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10218 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
10219 characters that need special handling.
10221 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
10223 * mono-config.c: make the os/cpu specification more flexible,
10224 allowing lists and negation.
10226 2006-09-18 Jonathan Chambers <joncham@gmail.com>
10228 * marshal.c: COM Interop fixes. Handle case where method->klass.
10229 is interface. Handle BSTR/MonoString when null. Use CDECL as
10230 calling convention on non-windows platforms. This is for
10231 compatibility with XPCOM and MainWin COM.
10233 Code is contributed under MIT/X11 license.
10236 2006-09-18 Zoltan Varga <vargaz@gmail.com>
10238 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
10239 correctly. Fixes #79217.
10241 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
10243 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
10245 * mono-config.c: allow both an os and cpu attribute for dllmap
10246 and dllentry elemnets to enable a single config file to be used
10247 for multiple architectures.
10249 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
10251 * loader.c: MonoLoaderError was cleared too soon on load failure.
10254 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
10256 * icall.c: use the defining class vtable when accessing a
10257 static field, not a pobblibly derived class.
10259 2006-09-17 Zoltan Varga <vargaz@gmail.com>
10261 * icall.c string-icalls.c: Remove references to unicode.h.
10263 * unicode.h unicode.c Makefile.am: Remove these unused source files.
10265 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
10267 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
10268 indicating the image where custom marshaller types should be looked up.
10269 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
10270 custom marshallers, instead of corlib. Fixes #79425.
10272 2006-09-14 Zoltan Varga <vargaz@gmail.com>
10274 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
10276 2006-09-14 Jonathan Chambers <joncham@gmail.com>
10278 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
10279 Implement Environment.ProcessorCount.
10281 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
10282 Implement Environment.ProcessorCount.
10285 Add Environment.ProcessorCount icall.
10287 Patch by Jason McFall.
10289 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10291 * assembly.c: don't append .exe/.dll when the filename already contains
10292 one of those extensions.
10294 2006-09-12 Martin Baulig <martin@ximian.com>
10296 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
10297 to array interfaces.
10299 2006-09-11 Martin Baulig <martin@ximian.com>
10301 * reflection.c (mono_image_build_metadata): Create the
10302 MethodImpl's after emitting all types and methods, so we don't
10303 need another fixup pass for them.
10305 2006-09-11 Zoltan Varga <vargaz@gmail.com>
10307 * class.c (mono_class_from_name_case): Fix regression introduced by the last
10310 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
10312 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
10315 2006-09-10 Zoltan Varga <vargaz@gmail.com>
10317 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
10318 args is not set. Fixes #78926.
10320 2006-09-08 Zoltan Varga <vargaz@gmail.com>
10322 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
10324 * image.c (load_class_names): Move this to class.c, and rename it to
10325 'mono_image_init_name_cache'.
10326 (load_modules): Fix a warning.
10328 * class.c icall.c image.c: Initialize image->name_cache lazily.
10330 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
10331 on its name using information in the AOT file.
10333 * class.c (mono_class_from_name): Use the new hook function.
10335 2006-09-06 Zoltan Varga <vargaz@gmail.com>
10337 * reflection.c (mono_param_get_objects): Handle enum default parameter values
10340 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
10343 2006-09-06 Martin Baulig <martin@ximian.com>
10345 * icall.c (mono_lookup_internal_call): Small fix.
10347 2006-09-05 Raja R Harinath <rharinath@novell.com>
10349 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
10352 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
10354 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
10355 when --debug is specified.
10357 2006-09-04 Zoltan Varga <vargaz@gmail.com>
10359 * class.c (setup_generic_array_ifaces): Fix a warning.
10361 2006-09-04 Miguel de Icaza <miguel@novell.com>
10363 * Temporarily remove the patch to assemly.c that checks the
10364 assembly versions as it breaks our gacutil.
10366 2006-09-03 Zoltan Varga <vargaz@gmail.com>
10368 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
10370 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
10373 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
10374 created using the default ctor. Fixes #79152.
10375 (mono_string_builder_to_utf16): Ditto.
10377 2006-09-01 Martin Baulig <martin@ximian.com>
10379 Fix handling of the generic array interfaces.
10381 * class-internals.h
10382 (MonoDefaults): Removed `generic_array_class' and added
10383 `generic_ilist' class.
10386 (mono_bounded_array_class_get): Add the new generic array interfaces.
10387 (setup_generic_array_ifaces): New static method; create vtable
10388 entries for each method in the generic array interfaces.
10391 (select_container): Allow "parent-less" generic methods.
10394 (mono_marshal_get_generic_array_helper): New public method.
10397 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
10398 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
10399 moved the interncall into System.Array.
10401 2006-09-01 Raja R Harinath <rharinath@novell.com>
10403 A few more cases of avoiding work on types with ->byref set.
10404 Has the real fix for #79238
10405 * icall.c (is_generic_parameter): New helper.
10406 (ves_icall_Type_GetGenericParameterPosition): Use it.
10407 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
10408 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
10409 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
10410 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
10412 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
10414 (ves_icall_Type_get_IsGenericInstance): Likewise.
10415 (ves_icall_Type_get_IsGenericType): Likewise.
10417 2006-09-01 Zoltan Varga <vargaz@gmail.com>
10419 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
10422 * mempool.h (mono_mempool_get_allocated): New helper function.
10424 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
10427 * mempool.c: Fix warnings and the calculation of stats.
10429 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
10431 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
10433 * loader.c (mono_get_method_from_token): Update method_count stat.
10435 * class-internals.h (MonoStats): Add some stats.
10437 2006-08-31 Robert Jordan <robertj@gmx.net>
10439 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
10440 with managed variants.
10441 All code is contributed under the MIT/X11 license.
10443 2006-08-31 Zoltan Varga <vargaz@gmail.com>
10445 * reflection.c (reflection_methodbuilder_to_mono_method): Set
10446 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
10448 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
10450 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
10451 with cycles in classes.
10453 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
10455 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
10456 missing a [MarshalAs] directive. Fixes #79203.
10458 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
10459 klass->marshal_info. Fixes #79217.
10461 2006-08-30 Martin Baulig <martin@ximian.com>
10463 Committing a patch from Joachim Ante <joe@otee.dk>:
10464 Add support for binary data symbol stores.
10466 * debug-mono-symfile.c
10467 (mono_debug_open_mono_symbol_file): Renamed into
10468 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
10472 (mono_debug_open_image): Added `raw_contents' and `size' args.
10473 (mono_debug_init_2_memory): New public function.
10475 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
10477 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
10479 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10481 * appdomain.c: implement support for ShadowCopyFiles.
10483 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
10485 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
10486 when value is NULL (and should remove CID #51).
10488 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10490 * image.c: moved 2 functions to ../utils.
10492 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10494 * gc.c: cope with the target object of a GC handle being NULL
10497 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10499 * class.c: recursively check parent's explicit implementations
10500 of interface methods (fixes bug #79125).
10502 2006-08-19 Miguel de Icaza <miguel@novell.com>
10504 * filewatcher.c: Avoid warnings when building, do not redefine
10505 constants that are defined.
10509 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10511 * image.c: don't fail when the link points to an absolute path.
10513 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
10515 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
10518 2006-08-17 Miguel de Icaza <miguel@novell.com>
10520 * image.c (full_path): A new method used to obtain the actual path
10521 of an assembly even in the presence of symbolic links.
10523 This is necessary for the case where we are running a binary that
10524 has been GACed, but we are using the "published" path name
10525 ($prefix/mono/1.0/blah.exe) which happens to point to the real
10528 This was the source of the failure for the `xsp' command with the
10529 recent AppDomain changes, as far as the runtime was concerned,
10530 there were two different assemblies: $prefix/mono/1.0/blah.exe and
10531 $prefix/mono/gac/blah/version/blah.exe.
10533 (do_mono_image_open): use full path
10535 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10537 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
10539 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
10541 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
10542 domain_id is supplied. Fix CID #241 and corlib's unit tests.
10544 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10546 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
10547 small structures. Fixes #78990.
10549 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10551 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
10553 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
10555 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10558 * marshal.c: don't load all the assemblies from a domain into newly
10559 created ones. The new domains might have different rules and load
10560 assemblies from different locations. Fixes bug #76757.
10562 Patch by Lluis. Conflicts resolved by Brian Crowell.
10564 2006-08-16 Alp Toker <alp@atoker.com>
10566 * socket-io.c: First half of the fix for #79084.
10567 Set sa_size to the length of the content, not that of the struct.
10568 Don't add NULL suffix to the content, this should be done in
10569 managed code if needed.
10571 2006-08-14 Raja R Harinath <rharinath@novell.com>
10574 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
10575 mono_metadata_parse_type returns NULL.
10577 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
10579 * normalization-tables.h : new file for string normalization data.
10580 * locales.c, locales.h, icall.c :
10581 added load_normalization_resource() for string normalization,
10583 * Makefile.am : added normalization-tables.h to the sources.
10585 2006-08-13 Zoltan Varga <vargaz@gmail.com>
10587 * marshal.c: Add more helper functions to reduce code duplication and use them
10590 2006-08-12 Zoltan Varga <vargaz@gmail.com>
10592 * marshal.c: Fix non-x86 stdcall warnings.
10594 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
10597 2006-08-11 Jonathan Chambers <joncham@gmail.com>
10599 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
10600 type check on multi-dimensional arrays. Fixes #79000.
10602 2006-08-10 Jonathan Chambers <joncham@gmail.com>
10604 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
10605 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
10606 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
10607 * class-internals.h: add is_com_object to class structure.
10608 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
10609 null checks to COM object marshalling. Fix .ctor call on RCW.
10610 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
10612 All code is contributed under the MIT/X11 license.
10614 2006-08-09 Dick Porter <dick@ximian.com>
10616 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
10617 racing mono_monitor_allocator_lock() somewhere, so don't delete
10618 the critical section for now. Found by running and exiting
10621 2006-08-10 Zoltan Varga <vargaz@gmail.com>
10623 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
10624 (ves_icall_System_ComObject_FindInterface): Ditto.
10625 (ves_icall_System_ComObject_CacheInterface): Ditto.
10627 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
10628 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
10630 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10632 * threadpool.c: treat pipes from process asynchronous reads as sockets
10633 when reading from them, so we get select/poll or epoll to wait for
10636 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
10638 * loader.c: Fix a typo (CID #233) in the null check.
10640 2006-08-07 Zoltan Varga <vargaz@gmail.com>
10642 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
10643 Hopefully fixes #78949.
10645 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
10646 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
10647 bytes. Fixes #78972.
10649 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10651 * filewatcher.c: we need to set errno here.
10653 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10655 * filewatcher.c: let Win32Exception get the error value.
10657 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10659 * filewatcher.c: translate errno into win32 errors for Win32Exception
10660 to know what happened.
10662 2006-08-01 Zoltan Varga <vargaz@gmail.com>
10664 * threadpool.c: Fix more warnings.
10666 * assembly.c (search_loaded): Fix warnings.
10668 * threadpool.c (mono_thread_pool_finish): Fix warnings.
10669 (mono_async_invoke): Ditto.
10671 2006-07-28 Jonathan Chambers <joncham@gmail.com>
10673 * object.c (mono_remote_class_vtable): Need to create proxy vtable
10674 entries for __ComObject type in addition to ComImport types.
10675 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
10678 All code is contributed under the MIT/X11 license.
10680 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
10682 * image.c: avoid tentative loading of modulerefs that contain
10683 no metadata (P/Invoke library names).
10685 2006-07-28 Dick Porter <dick@ximian.com>
10687 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
10688 mono_loader_lock() somewhere, so don't delete the critical section
10689 for now. Found by running and exiting monodevelop.
10691 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10693 * filewatcher.c: define the inotify syscalls when we're building on
10694 linux and have sys/syscall.h. The build system might not have support
10695 for inotify but the target system might have it.
10697 2006-07-26 Miguel de Icaza <miguel@novell.com>
10699 * domain.c: Documentation updates.
10701 * loader.c (mono_free_method): Do not release the method
10702 information if we are being profiled, as profilers will use this
10703 information at shut down to present some data to the user.
10705 This is needed so that the profiler does not crash, as the
10706 profiler tends to keep MonoMethods around, and they might become
10707 invalid if we free these.
10709 (mono_get_method_constrained): Return the original CIL stream
10710 method as well, so verification can be performed against it.
10712 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10714 * filewatcher.[ch]: support for inotify file system watcher.
10715 * icall.c: add new internal calls for the inotify file system watcher.
10717 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10719 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
10722 2006-07-20 Dick Porter <dick@ximian.com>
10724 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
10727 2006-07-20 Dick Porter <dick@ximian.com>
10729 * threads.c (start_wrapper): Do the thread cleanup while we still
10730 hold a reference to its object. Fixes bug 78123.
10732 2006-07-18 Kornél Pál <kornelpal@gmail.com>
10734 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
10735 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
10736 "managed-to-managed".
10737 * icall.c: Redirect string constructors that take sbyte* to
10738 ves_icall_System_String_ctor_RedirectToCreateString.
10739 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
10740 to CreateString () methods with matching signature.
10741 * reflection.c: Use original security informations for
10742 MONO_WRAPPER_MANAGED_TO_MANAGED.
10743 * security-manager.c: Use original security informations for
10744 MONO_WRAPPER_MANAGED_TO_MANAGED.
10745 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
10746 that is a placeholder and only its address should be used.
10747 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
10748 that is a placeholder and only its address should be used.
10750 2006-07-15 Jonathan Chambers <joncham@gmail.com>
10752 Begin implementing COM Interop.
10753 * appdomain.c: Increment corlib version.
10754 * class.c: Set ComImport classes' parent to __ComObject.
10755 * loader.c: Mark cominterop methods as such.
10756 * domain.c: Add __ComObject class to MonoDefaults structure.
10757 * image.c: Add 2 hashtables to the image for COM Interop related methods
10758 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
10759 using the mempool allocator
10761 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
10762 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
10763 declaration for mono_metadata_type_dup_mp.
10765 * debug-helpers.c: Added strings for two additional wrapper types
10766 * object.c: Create proxy objects for ComImport classes
10767 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
10768 and added __ComObject class to MonoDefaults structure.
10770 * object-internals.h: Finish MonoRealProxy definition, and add definition of
10771 MonoComInteropProxy and MonoComObject.
10773 * marshal.c: Added support for COM Interop
10774 (signature_cominterop): Converts managed signature to corresponding
10775 unmanaged COM signature.
10776 (cominterop_get_function_pointer): gets unmanaged function pointer via
10778 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
10779 (cominterop_get_method_interface): returns interface type that method is defined on
10780 (mono_mb_emit_cominterop_call): emits native call to function pointer
10782 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
10783 that matches signature of unmanaged function.
10784 (cominterop_get_native_wrapper): wrapper around adjusted method call.
10785 (cominterop_get_invoke): forwards call from proxy to __ComObject
10786 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
10787 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
10788 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
10790 * marshal.h: Added Marshal icall declarations.
10791 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
10792 so we can access them in finalizer
10794 2006-07-14 Dick Porter <dick@ximian.com>
10796 * object.c (mono_type_initialization_cleanup): Fix a race
10797 condition by temporarily commenting out the critical section
10800 2006-07-14 Zoltan Varga <vargaz@gmail.com>
10802 * reflection.c (create_custom_attr): Fix some warnings.
10803 (create_custom_attr_data): Ditto.
10804 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
10805 types. Fixes #78855.
10807 2006-07-11 Zoltan Varga <vargaz@gmail.com>
10809 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
10811 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
10813 2006-07-08 Zoltan Varga <vargaz@gmail.com>
10815 * reflection.c (resolve_object): Add support for DynamicMethod.
10817 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
10818 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
10820 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
10822 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
10823 don't leak GPtrArray's pdata has we have no use (nor free) for it.
10825 2006-07-01 Zoltan Varga <vargaz@gmail.com>
10827 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
10830 2006-06-30 Raja R Harinath <rharinath@novell.com>
10832 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
10833 slightly: remove a shadow local variable.
10835 2006-06-29 Raja R Harinath <rharinath@novell.com>
10837 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
10838 definition that introduces the virtual function slot.
10839 Also fix Coverity #105.
10841 2006-06-29 Zoltan Varga <vargaz@gmail.com>
10843 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
10844 for dynamic assemblies. Fixes #78724.
10846 2006-06-28 Zoltan Varga <vargaz@gmail.com>
10848 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
10851 2006-06-21 Martin Baulig <martin@ximian.com>
10854 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
10857 2006-06-21 Zoltan Varga <vargaz@gmail.com>
10859 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
10861 2006-06-20 Raja R Harinath <rharinath@novell.com>
10863 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
10865 * class.c (mono_class_create_from_typespec): Add 'context' argument.
10866 Inflate result if necessary.
10867 (mono_class_get_full): Remove old version. Rename from
10868 'mono_class_get' and add 'context' argument. Pass it to
10869 ..._create_from_typespec.
10870 (mono_class_get): New. Simple wrapper to mono_class_get_full.
10871 (mono_ldtoken): Revert change below.
10873 2006-06-20 Martin Baulig <martin@ximian.com>
10875 * class.c (mono_ldtoken): Don't pass the generic context to
10876 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
10878 2006-06-15 Zoltan Varga <vargaz@gmail.com>
10880 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
10881 and later freeing it. Fixes #78638.
10883 2006-06-15 Miguel de Icaza <miguel@novell.com>
10885 * icall.c (mono_class_get_throw): Revert over-zealous error
10886 throwing, the caller for mono_class_get_throw will cope with
10887 errors when classes are not properly initialized already.
10889 The code still copes with loader exceptions though.
10891 Fixes the regression in reftype1 and reftype3 from the CAS tests.
10893 2006-06-14 Miguel de Icaza <miguel@novell.com>
10895 Fixes the `make run1' version of RuntimeAbort (to be commited,
10896 source is in Bugzilla).
10898 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
10899 FALSE on class loading failure instead of returning true.
10901 * class.c (mono_class_create_from_typedef): It is possible for
10902 mono_metadata_interfaces_from_typedef_full to fail if a class is
10903 not found, cope with this.
10906 2006-06-14 Dick Porter <dick@ximian.com>
10909 * process.c: Fix a bunch of signed/unsigned warnings from gcc
10912 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
10914 * culture-info-table.h : oops, forgot to make it nsync with r61548.
10916 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
10918 * icall.c: Another fix for building mono in Visual Studio.
10920 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
10922 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
10924 2006-06-09 Martin Baulig <martin@ximian.com>
10926 * debug-mono-symfile.c: Put this back and really fix it this
10927 time. Sorry for all the trouble.
10929 2006-06-08 Zoltan Varga <vargaz@gmail.com>
10931 * icall.c (mono_class_get_throw): Fix a warning.
10932 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
10933 ReflectionTypeLoadException if needed. Fixes #78606.
10935 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
10936 (mono_class_init): Ditto.
10938 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
10939 ref_only exceptions.
10940 (mono_loader_clear_error): Make this work even if there is no error.
10942 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
10944 * object-internals.h marshal.c marshal.h icall.c: Implement method
10945 Marshal.GetComSlotForMethodInfo using internal call.
10947 2006-06-07 Zoltan Varga <vargaz@gmail.com>
10949 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
10950 a function for signalling it.
10952 * class.c (mono_class_from_typeref): Use the new kind of loader error when
10953 a referenced assembly is not found.
10955 * loader.c (mono_loader_error_prepare_exception): Add support for
10956 LOADER_ERROR_ASSEMBLY. Fix formatting.
10958 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
10960 * domain.c appdomain.c class-internals.h marshal.c: Add support
10961 for VARIANT marshalling on windows and increment corlib version
10962 since Variant struct was added.
10964 2006-06-03 Miguel de Icaza <miguel@novell.com>
10966 * debug-mono-symfile.c: Revert Martin's previous patch which broke
10967 stack trace line information:
10969 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
10970 (Martin) when looking up B which is between A and C, return A not C.
10974 Thanks to Alexander Olk for tracking this down.
10976 2006-06-02 Zoltan Varga <vargaz@gmail.com>
10978 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
10980 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
10981 avoid clobbering its value.
10982 (mono_string_to_lpstr): Fix a warning on windows.
10984 2006-05-31 Zoltan Varga <vargaz@gmail.com>
10986 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
10988 * reflection.c loader.c: Removed references to 'dummy' flag.
10990 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
10992 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
10993 it gets GC tracking.
10995 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
10998 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
11000 * marshal.c threadpool.c: Update callers of mono_async_result_new.
11002 * appdomain.c: Bump corlib version.
11004 2006-05-30 Zoltan Varga <vargaz@gmail.com>
11006 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
11007 CEE_STIND_REF when working with object references.
11009 2006-05-31 Zoltan Varga <vargaz@gmail.com>
11011 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
11014 2006-05-30 Miguel de Icaza <miguel@novell.com>
11016 * loader.c (method_from_memberref): Fix argument value for
11017 mono_loader_set_error_method_load (I was passing the MonoClass
11018 instead of the class name char *).
11020 2006-05-30 Zoltan Varga <vargaz@gmail.com>
11022 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
11023 CEE_STIND_REF when working with object references.
11025 2006-05-30 Martin Baulig <martin@ximian.com>
11027 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
11028 mono_method_full_name() change and replace the ':' with a '.'
11031 2006-05-30 Martin Baulig <martin@ximian.com>
11033 * debug-mono-symfile.c
11034 (mono_debug_symfile_lookup_location): Fix the algorithm:
11035 when looking up B which is between A and C, return A not C.
11037 2006-05-29 Martin Baulig <martin@ximian.com>
11040 (MonoDebugMethodInfo): Make the typedef public.
11041 (MonoDebugSourceLocation): New public struct.
11044 (mono_debug_source_location_from_address): Removed.
11045 (mono_debug_source_location_from_il_offset): Removed.
11046 (mono_debug_il_offset_from_address): Removed.
11047 (mono_debug_address_from_il_offset): Removed.
11048 (mono_debug_lookup_method): New public function.
11049 (mono_debug_lookup_source_location): New public function; replaces
11050 the old mono_debug_source_location_from_*() functions; see the
11051 inline documentation.
11052 (mono_debug_free_source_location): New public function.
11053 (mono_debug_print_stack_frame): New public function; see the
11054 inline documentation.
11056 * debug-mono-symfile.c
11057 (mono_debug_find_source_location): Renamed into
11058 mono_debug_symfile_lookup_location(); only take a
11059 `MonoDebugMethodInfo *' and an `offset' argument; added inline
11061 (mono_debug_find_method): Renamed into
11062 mono_debug_symfile_lookup_method().
11064 2006-05-27 Zoltan Varga <vargaz@gmail.com>
11066 * assembly.c (mono_assembly_open_full): Dont overwrite the status
11067 returned by mono_image_open_full ().
11069 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
11070 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
11073 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
11076 2006-05-27 Miguel de Icaza <miguel@novell.com>
11078 * class.c (mono_class_from_typeref): handle missing images
11079 earlier, deals with bug #78418. Refactor code;
11081 Fix a warning introduced in my previous commit (some stale code
11082 from before I revisited my patch).
11084 * class.c (mono_class_create_from_typedef): On failure, remove the
11085 class from the MonoImage->class_cache as the class is not
11086 initialized; Fixes the leak pointed out by Paolo.
11088 2006-05-25 Dick Porter <dick@ximian.com>
11090 * threads.c (mono_thread_cleanup): Build fix. Comment out the
11091 DeleteCriticalSections until I figure out which one may still be
11092 sometimes locked when mono_thread_cleanup is called.
11094 2006-05-24 Dick Porter <dick@ximian.com>
11096 * threads.c (mono_thread_cleanup): Move the threading cleanup out
11097 of mono_thread_manage and back into its own function, so it can be
11098 called after the finalizer thread has finished.
11100 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
11102 2006-05-24 Zoltan Varga <vargaz@gmail.com>
11104 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
11107 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
11108 with non-blittable elements.
11109 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
11111 2006-05-24 Martin Baulig <martin@ximian.com>
11113 * mono-debug-debugger.h (MonoDebuggerEvent): Added
11114 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
11116 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
11117 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
11118 `mono_debugger_event_handler' to NULL.
11120 2006-05-24 Martin Baulig <martin@ximian.com>
11122 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
11124 2006-05-24 Martin Baulig <martin@ximian.com>
11126 * mono-debug-debugger.h
11127 (mono_debugger_create_notification_function): Added
11128 `MonoCodeManager *' argument.
11130 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
11132 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
11134 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
11136 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
11137 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
11140 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
11142 * icall.c: precise GC support: objects can't be stored in unmanaged
11143 memory anymore, even if they are kept alive by other references: since
11144 they can move the GC needs to be able to always find them.
11146 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11148 * object.c: precise GC support for static fields. Support
11149 for moving GCs: write barriers and pinned allocation for interned
11152 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
11154 * domain.c, domain-internals.h: precise GC support for the MonoDomain
11157 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11159 * class.c, gc.c: sgen and precise GC updates.
11161 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
11163 * marshal.h, marshal.c: added write barrier wrapper and precise type
11166 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
11168 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
11171 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
11173 * reflection.c: precise and sgen GC updates.
11175 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
11177 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
11179 2006-05-22 Zoltan Varga <vargaz@gmail.com>
11181 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
11183 2006-05-20 Zoltan Varga <vargaz@gmail.com>
11185 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
11186 MONO_TYPE_OBJECT. Fixes #78462.
11188 2006-05-18 Zoltan Varga <vargaz@gmail.com>
11190 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
11191 and blittable types.
11193 2006-05-17 Miguel de Icaza <miguel@novell.com>
11195 * class.c (mono_class_get_exception_for_failure): Implement parts
11196 of a TODO: if the loader error is set (instead of the class
11197 error), we return a Loader exception that can be properly thrown
11200 This was exposed by some Winforms 2.0 code that I tried to run
11201 (Atsushi pointed me to it).
11203 2006-05-17 Zoltan Varga <vargaz@gmail.com>
11205 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
11206 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
11208 * marshal.c (emit_marshal_vtype): Add limited support for
11209 UnmanagedType.LPStruct. Fixes #78427.
11211 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
11212 Applied a patch from kangaroo to fix #77523.
11214 2006-05-17 Martin Baulig <martin@ximian.com>
11217 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
11218 (debugger_thread_created): Removed.
11219 (debugger_thread_exited): Removed.
11221 2006-05-15 Zoltan Varga <vargaz@gmail.com>
11223 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11225 * object-internals.h (MonoReflectionResource): Sync with managed version.
11227 2006-05-12 Wade Berrier <wberrier@novell.com>
11229 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
11231 2006-05-12 Zoltan Varga <vargaz@gmail.com>
11233 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
11234 functions try to allocate from the image mempool.
11236 2006-05-12 Dick Porter <dick@ximian.com>
11238 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
11240 2006-05-12 Lluis Sanchez <lluis@ximian.com>
11242 * object.c: The FieldGetter and FieldSetter methods require the full
11243 name of the class, not only the name. Fixes bug #78277.
11245 2006-05-11 Miguel de Icaza <miguel@novell.com>
11247 * loader.c (method_from_memberref): Do not pass the NULL klass to
11248 mono_loader_set_error_() methods. Pass the non-NULL value
11251 2006-05-11 Zoltan Varga <vargaz@gmail.com>
11253 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
11254 (mono_assembly_close): Null out assembly->image->references after freeing it.
11256 * image.c (mono_image_close): Free image->references.
11258 * reflection.c (mono_image_basic_init): Fix a small memory leak.
11260 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
11262 * marshal.c: In function mono_mb_add_local don't use the mb pointer
11263 before checking if it's NULL (g_assert).
11265 2006-05-10 Martin Baulig <martin@ximian.com>
11267 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
11268 I thought I already killed that two months ago, but now it somehow reappeared.
11270 2006-05-10 Martin Baulig <martin@ximian.com>
11272 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
11274 2006-05-10 Zoltan Varga <vargaz@gmail.com>
11276 * reflection.c: Allocate memory for dynamically created methods in the image
11279 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
11281 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
11282 don't use the ad pointer before checking if it's NULL (g_assert).
11284 2006-05-09 Zoltan Varga <vargaz@gmail.com>
11286 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
11287 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
11289 * marshal.c: Allocate all signatures from mempools.
11291 * marshal.c: Allocate some more signatures from mempools.
11293 2006-05-09 Miguel de Icaza <miguel@novell.com>
11295 * object.c (mono_load_remote_field): The code used to provide a
11296 temporary variable for returning results if the user did not
11297 provide a result pointer. But our temporary variable was allocted
11300 Fix calling code to always pass a result area. Coverity ID 103.
11302 2006-05-06 Zoltan Varga <vargaz@gmail.com>
11304 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
11305 value, not the old. Fixes #78312.
11306 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
11308 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
11309 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
11312 * assembly.c (mono_assembly_close): Free image->references.
11314 * assembly.c (mono_assembly_names_equal): Fix a warning.
11315 (mono_assemblies_cleanup): Cleanup more global data.
11317 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
11319 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
11320 ptr_cache and image->modules.
11322 * image.c (mono_image_init): Allocate array_cache lazily.
11324 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11326 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
11327 behavior was changed recently and has bad side effects.
11329 2006-05-05 Zoltan Varga <vargaz@gmail.com>
11331 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
11333 * assembly.c (mono_assembly_close): Remove a debug printf.
11335 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
11337 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
11338 to also allow for temporary references between mono_image_open ()/close ().
11340 * domain.c (get_runtimes_from_exe): Add a FIXME.
11342 2006-05-04 Zoltan Varga <vargaz@gmail.com>
11344 * marshal.c: Fix support for dynamic methods.
11346 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
11348 * marshal.c (mono_marshal_cleanup): New cleanup function.
11350 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
11353 * class.c (mono_class_init): Fix leaking class->nested_classes.
11355 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
11357 * image.c (mono_image_init): Initialize the new cashes.
11359 * image.c (mono_image_close): Destroy the new cashes.
11361 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
11363 * mempool.c (mono_mempool_strdup): New helper function.
11365 * class-internals.h: Add prototype for mono_loader_unlock ().
11367 * domain.c (mono_jit_info_table_find): Fix a warning.
11368 (mono_debugger_check_runtime_version): Ditto.
11370 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
11371 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
11372 functions to these modules.
11374 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
11377 * marshal.c (mono_free_bstr): Fix a warning.
11379 * assembly.c (mono_assembly_open_full): Fix another small leak.
11381 * object.c: Fix some unload leaks in the remoting code.
11383 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
11386 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
11388 * reflection.c: Fix some unload leaks in dynamic assemblies.
11390 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
11392 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
11393 * marshal.h: Add BSTR support on Win32
11394 * icall.c: Add BSTR icalls
11395 * metadata.h: Add BSTR enums
11397 2006-04-28 Miguel de Icaza <miguel@novell.com>
11399 Work to catch the crash from #76795 and turn it into an
11400 exception. As I stubbed out pieces of the VisualBasic support,
11401 I found a number of places where the code was failing and I added
11402 checks to those places.
11404 * metadata.c (do_mono_metadata_parse_generic_class): Make this
11405 function return a status code. If we fail to parse the signature
11406 from mono_metadata_parse_generic_inst, return FALSE.
11408 * loader.c (mono_get_method_from_token): If we fail to load the
11409 method (mono_class_get) return NULL.
11411 * (method_from_memberref): Return NULL if we are unable to parse
11412 the method signature
11414 (mono_loader_error_prepare_exception): Since we now use the
11415 loader_error flag internally to stop processing, and obtaining
11416 exceptions that might be thrown will walk this code path the
11417 proper way of going from a MonoLoaderError into a
11418 MonoException was convoluted. This new routine encapsulates the
11419 process of turning the error into an exception and *clearing* the
11422 2006-04-27 Miguel de Icaza <miguel@novell.com>
11424 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
11425 with missing assemblies), and to cope with:
11427 * Missing fieldref from a non-existing assembly.
11428 * Missing methodref from a non-existing assembly.
11430 The first batch of work to address *some* of the issues from 76661.
11432 * object.c (mono_class_create_runtime_vtable): If we fail to
11433 initialize the class raise the exception here.
11435 * metadata.c (mono_class_get_overrides_full): If any methods fail
11436 to load return the failure to the caller.
11438 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
11439 flagging assemblies that failed to load.
11441 Do not crash if we are unable to load the assembly.
11443 (mono_assembly_close): Do nothing with REFERENCE_MISSING
11446 * loader.c (mono_loader_set_error_type_load): Change the
11447 convention to always pass unallocated strings, so we make our own
11448 copies (I know our own code had duplicated strings before, but
11449 this keeps the normal conventions).
11450 (method_from_memberref): Call mono_loader_set_error_method_load
11451 for all possible failures of loading the class.
11452 Remove assert, turn into a loader error.
11454 (mono_loader_error_to_exception): Move this routine from mini
11455 (mini_loader_error_to_exception) there was no need to have that in
11458 * class.c (mono_class_from_typeref): If we were not able to load
11459 the assembly with mono_assembly_load_reference, call the
11460 mono_loader_set_error_type_load to register the problem.
11462 (mono_class_setup_fields): If we fail to load the type from
11463 mono_metadata_parse_type_full, call mono_class_set_failure and
11464 break from the loop.
11466 If class->exception_type is set, we do not layout the fields as
11467 that might crash the runtime, and instead return (from breaking
11468 from the previous loop).
11470 (mono_class_setup_vtable): This now returns a boolean indicating
11471 whether the table was properly setup. The decision is driven by
11472 mono_class_get_overrides_full which might run into non-existing
11475 (mono_class_init): Returns TRUE on success or FALSE if there was a
11476 problem in loading the type (incorrect assemblies, missing
11477 assemblies, methods, etc).
11479 When we call mono_class_setup_fields we also check for a potential
11480 error inside this call (either a class exception or a general
11483 (mono_class_create_from_typedef): If the parent fails to load
11484 (calling mono_class_get_full) return NULL.
11488 calls to mono_metadata_parse_type_full should be checked
11489 everywhere and set the mono_class_set_failure
11490 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
11492 The current patch checks the places where my manually constructed
11493 tests show the errors are showing up, but we should do it
11498 mono_class_init return values should be tested everywhere, like
11499 the previous case this is something that we should audit
11500 everywhere and not only on the cases exposed by the tests I
11503 2006-04-26 Miguel de Icaza <miguel@novell.com>
11505 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
11506 boolean parameter and instead pass the information on `options'
11507 parameter (FileOptions).
11509 * icall.c: Register the new signature for MonoIO.Open.
11511 * debug-helpers.c (dis_one): Trying to understand how coverity
11512 works. Fix Run 5, item 78.
11514 2006-04-26 Dick Porter <dick@ximian.com>
11516 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
11519 2006-04-25 Martin Baulig <martin@ximian.com>
11521 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
11523 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
11524 debugger_thread_created().
11525 (debugger_gc_push_all_stacks): Don't handle the main thread in any
11527 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
11528 (mono_debugger_finalize_threads): New function; undo the effects
11529 of mono_debugger_init_threads().
11530 (mono_debugger_create_all_threads): Removed.
11532 2006-04-24 Zoltan Varga <vargaz@gmail.com>
11534 * image.c (mono_image_close): Tidy up trace messages.
11536 * assembly.c (mono_assembly_close): Ditto.
11538 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
11539 no longer references an already freed assembly. Fixes #78168.
11541 2006-04-21 Dick Porter <dick@ximian.com>
11543 * threads.c (mono_thread_detach): Fix reference counting when
11546 2006-04-21 Zoltan Varga <vargaz@gmail.com>
11548 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
11551 2006-04-19 Zoltan Varga <vargaz@gmail.com>
11553 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
11554 (mono_type_to_stind): Ditto.
11556 * marshal.c: Use the new helper functions to simplify code.
11558 * image.c (mono_image_close): Add some code for help debug assembly unloading
11561 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
11564 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
11565 assembly was already loaded in another appdomain. Fixes #78083.
11567 2006-04-13 Zoltan Varga <vargaz@gmail.com>
11569 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
11570 referenced assemblies.
11571 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
11573 * domain.c (mono_domain_free): Add a trace message.
11575 * appdomain.c (add_assemblies_to_domain): Ditto.
11577 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
11580 2006-04-12 Zoltan Varga <vargaz@gmail.com>
11582 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
11584 2006-04-12 Martin Baulig <martin@ximian.com>
11586 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
11587 `USE_INCLUDED_LIBGC'.
11589 2006-04-12 Zoltan Varga <vargaz@gmail.com>
11591 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
11592 the patch contains ../ and a small directory name later. Hopefully fixes
11595 2006-04-10 Martin Baulig <martin@ximian.com>
11597 Clean up the debugger's thread-handling code.
11599 The debugger's thread-handling code has been moved from
11600 ../mini/debug-debugger.c to threads.c. We now iterate directly
11601 over the `threads' hash, keep track of exiting threads and also
11602 use proper locking.
11604 We can now debug XSP and XSP based applications with the debugger.
11606 * object-internals.h (MonoThread): Added `gpointer end_stack'.
11609 (MonoThreadCallbacks): Removed; this was only used by the debugger.
11610 (mono_install_thread_callbacks): Likewise.
11612 * threads.c (mono_thread_callbacks): Removed.
11613 (debugger_thread_created, debugger_thread_exited): New static functions.
11614 (start_wrapper): Call debugger_thread_created().
11615 (thread_cleanup): Call debugger_thread_exited().
11616 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
11617 (mono_debugger_init_threads): New public function.
11618 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
11619 iterate directly over the `threads' hash and also use proper locking.
11621 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
11623 * mono-debug-debugger.h
11624 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
11626 2006-04-10 Zoltan Varga <vargaz@gmail.com>
11628 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
11629 argument type=array. Fixes #78057.
11631 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
11633 * culture-info-table.h : regenerated. Fixed bug #69652.
11635 2006-04-07 Zoltan Varga <vargaz@gmail.com>
11637 * loader.c metadata.c: Reapply a variant r59116.
11639 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
11641 * class.c (mono_class_setup_interface_offsets): New internal function.
11643 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
11644 interfaces too. Fixes #77398.
11646 * reflection.c (encode_cattr_value): Add support for
11647 parameter type=object, argument type=array.
11648 (load_cattr_value): Ditto. Fixes #77916.
11650 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
11651 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
11653 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
11654 a byval char array and CharSet is Ansi.
11656 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
11658 2006-04-06 Zoltan Varga <vargaz@gmail.com>
11660 * metadata.c: Add some locking comments.
11662 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
11664 (mono_metadata_free_method_signature): Don't free the signature itself.
11666 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
11668 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
11669 reference the same MonoImage.
11670 (mono_assembly_load_from_full): Add an assert.
11672 2006-04-05 Zoltan Varga <vargaz@gmail.com>
11674 * image.c (mono_image_close): Don't put the image we are about to free into the
11675 loaded_images_guid_hash.
11677 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
11678 to reduce code duplication.
11680 * marshal.c: Register the native functions called by this module as icalls, to
11681 somewhat centralize the creation of MonoMethodSignature's.
11683 * loader.c (mono_method_signature): Add a cache for method signatures.
11685 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
11686 the parameter attributes of a method.
11687 (mono_metadata_parse_method_signature_full): Refactored the computation of
11688 parameter attributes into a separate function. Also avoid one allocation in
11691 * assembly.c (mono_assembly_close): Ditto.
11693 * image.c (mono_image_close): Log trace messages with INFO level.
11695 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
11697 * image.c reflection.c: Correct reference counting of image modules.
11699 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
11700 of this function from the image mempool.
11702 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
11703 to allow more cached types to be used.
11705 * mono-debug.c (mono_debug_add_method): Appled patch from
11706 David S. Miller <davem@sunset.davemloft.net>: Access
11707 minfo->lexical_blocks[] entry elements using read32().
11709 2006-04-04 Zoltan Varga <vargaz@gmail.com>
11711 * loader.c (mono_free_method): No longer free the method header for non-dynamic
11712 methods as it is allocated from the mempool.
11714 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
11717 * metadata-internals.h: Add comments describing the reference counting scheme
11718 used for MonoImage and MonoAssembly.
11720 * image.c assembly.c reflection.c: Rework reference counting of images and
11721 assemblies so they are freed when the runtime is shut down. Free some
11722 additional memory structures when an image is unloaded.
11724 2006-04-03 Zoltan Varga <vargaz@gmail.com>
11726 * class.c loader.c reflection.c: Allocate more data structures in
11729 2006-03-31 Miguel de Icaza <miguel@novell.com>
11732 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
11733 build on pre glib 2.4 systems.
11735 2006-03-31 Zoltan Varga <vargaz@gmail.com>
11737 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
11739 * icall.c: Fix some warnings.
11741 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
11743 * culture-info-table.h : regenerated.
11745 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
11747 * threads.c, object-internals.h, verify.c: changed the culture caching
11748 code to use a normal MonoArray for storage so the GC can keep track of
11749 them easily. Fixed bits of the cache logic, too and simplified the
11752 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
11754 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
11755 thread for non-Boehm GCs.
11757 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
11759 * domain.c, object.c, domain-internals.h: reduce the amount of memory
11760 needed to keep track of the data for static fields.
11762 2006-03-29 Raja R Harinath <rharinath@novell.com>
11765 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
11766 for interface classes. Use 'num_methods' instead.
11767 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
11768 before using '->vtable_size' field.
11770 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
11772 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
11773 doesn't contain managed pointers, so use a normal hashtable.
11775 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
11777 * reflection.c, class-internals.h, domain.c: fixed handling of types
11778 used as values for objects in custom attributes (bug #77915):
11780 2006-03-24 Martin Baulig <martin@ximian.com>
11782 * class.c (mono_class_setup_fields): Added support for generic
11783 instances; fixes #77580.
11785 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11787 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
11789 2006-03-24 Dick Porter <dick@ximian.com>
11791 * file-io.c (get_file_attributes): More stat macro breakage.
11794 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
11796 * profiler.c: added the file=filename option in the default profiler
11797 to output the profile data to filename.
11799 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11801 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
11804 2006-03-22 Martin Baulig <martin@ximian.com>
11806 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
11807 allocated `MonoClassField *' in `fb->handle'.
11809 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11811 * class.c, image.c, metadata-internals.h: implemented new mechanism to
11812 allocate interface ID to save memory and allow better ID reuse on
11813 appdomain unload. setup_generic_vtable () removal from Martin.
11815 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
11817 * object.h, appdomain.c, domain.c, exception.c, icall.c,
11818 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
11819 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
11820 write barriers for reference stores with managed objects accessed with
11821 C structures in the runtime and in embedding programs.
11823 2006-03-20 Raja R Harinath <rharinath@novell.com>
11825 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
11826 'interface_id' and 'max_interface_id' fields of MonoClasses
11827 representing open generic types.
11829 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
11831 * object.h, object.c, icall.c: added functions to deal with
11832 storing valuetypes that contain references in managed objects.
11833 * reflection.c, string-icalls.c, threads.c, marshal.c: small
11834 fixes and comments around uses of mono_array_addr ().
11836 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
11838 * object.h, icall.c, monitor.c: object.GetHashCode ()
11839 implementation that supports the moving garbage collector.
11841 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
11843 * icall.c, threads-types.h, threads.c: implemented finalizer for
11844 LocalDataStoreSlot.
11846 2006-03-15 Zoltan Varga <vargaz@gmail.com>
11848 * metadata.c (mono_type_size): Add a fixme.
11849 (mono_type_stack_size): Ditto.
11851 * object-internals.h (MonoReflectionAssemblyBuilder): Added
11852 'type_forwarders' field.
11854 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
11855 attribute from net 2.0.
11857 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
11860 * class.c (mono_class_setup_fields): Fix a warning.
11862 * class.c (mono_class_from_name): Add support for assemblyref entries
11863 in the EXPORTEDTYPE table.
11865 * reflection.c: Add support for handling type forwarders under net 2.0.
11867 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11869 2006-03-14 Zoltan Varga <vargaz@gmail.com>
11871 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
11872 overwriting entries in ModuleBuild->types, also clean up the code
11873 a little. Fixes #77774.
11875 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
11877 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
11878 load friend assembly info when present.
11880 2006-03-14 Raja R Harinath <rharinath@novell.com>
11882 Fix crasher on gtest-158.cs.
11883 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
11884 the return value if the MonoClass we want is yet in an
11885 inconsistent state.
11886 * class.c (mono_class_create_from_typedef): Add an comment
11887 explaining an order dependency between mono_class_setup_parent and
11888 mono_class_setup_mono_type.
11890 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
11892 * class.c: documentation updates and events bug fix.
11894 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
11896 * class.c: some cleanup, locking fixes.
11898 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11900 * class.c: fix the generics code to setup nested
11901 type info to the instantiated type (bug #77770).
11903 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11905 * marshal.c: fixed a few type correctness issues.
11907 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11909 * loader.c: the Set/Get/Addrtess array methods should be public.
11911 2006-03-11 Zoltan Varga <vargaz@gmail.com>
11913 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
11915 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
11918 2006-03-10 Zoltan Varga <vargaz@gmail.com>
11920 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
11922 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
11924 * mempool.c (mono_mempool_alloc): Speed this up a bit.
11925 (mono_mempool_alloc0): Ditto.
11927 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11930 (create_object_from_sockaddr): it was allocating 4 extra bytes
11931 for the AF_UNIX data. Fixes bug #77747.
11933 2006-03-09 Zoltan Varga <vargaz@gmail.com>
11935 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
11937 2006-03-09 Dick Porter <dick@ximian.com>
11939 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
11940 Fixes bug 76966 again.
11942 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
11944 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
11946 * appdomain.c: Bumped corlib version to 48 (due to r57532)
11948 2006-03-07 Martin Baulig <martin@ximian.com>
11951 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
11953 2006-03-07 Martin Baulig <martin@ximian.com>
11956 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
11957 regression introduced in r56970; see gtest-252.cs.
11959 * loader.c (mono_get_method_constrained): Correctly handle generic
11960 methods; see gtest-253.cs.
11962 2006-03-04 Zoltan Varga <vargaz@gmail.com>
11964 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
11966 2006-03-04 Martin Baulig <martin@ximian.com>
11968 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
11969 compute the parent type at runtime, just like we're already doing
11973 (mono_reflection_bind_generic_parameters): Don't compute the
11974 parent type anymore.
11976 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
11978 2006-03-04 Martin Baulig <martin@ximian.com>
11980 * mono-debug-debugger.h
11981 (mono_debugger_create_notification_function): Allocate memory at
11982 runtime and return a pointer to it.
11984 2006-03-03 Zoltan Varga <vargaz@gmail.com>
11986 * assembly.c: Fix windows build.
11988 * assembly.c: Fix build.
11990 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
11992 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
11994 2006-03-03 Dick Porter <dick@ximian.com>
11997 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
11998 Check parameters before dereferencing them. Fixes Aaron's part of
12001 2006-03-03 Raja R Harinath <rharinath@novell.com>
12003 Fix performance regression.
12004 * loader.c (find_method_in_class): Add 'from_class' argument.
12005 Rename 'klass' argument to 'in_class'. The signature is compared
12006 against the method in 'in_class', and the corresponding method is
12007 returned from 'from_class'.
12008 (find_method): Walk both 'in_class' and 'from_class' in parallel.
12009 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
12010 type definition and generic instantiation in parallel.
12011 (mono_get_method_constrained): Update to changes.
12013 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12015 * threads.c: make sure the domain is correct, too when doing
12016 mono_thread_attach ().
12018 2006-03-01 Zoltan Varga <vargaz@gmail.com>
12020 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
12021 windows. Fixes #77683.
12023 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12025 * object.h, *: introduced specific way to set elements of an array
12026 of references to be used as write barrier. Still need to audit the
12027 uses of mono_array_addr.
12029 2006-03-01 Miguel de Icaza <miguel@novell.com>
12031 * object-internals.h: New field to cache the assmebly name, patch
12032 from Tambet Ingo (tambet@ximian.com)
12034 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
12036 * decimal.h, class-internals.h, metadata-internals.h,
12037 file-io.h: mark a few function declarations as internal, to
12038 reduce the number of PLT entries.
12040 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12042 * file-io.c: fix typo in warning message.
12044 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
12046 * loader.c: on unix, lookup the "*A" version of a function
12047 if charset is auto as a second option before failing.
12049 2006-02-28 Raja R Harinath <rharinath@novell.com>
12051 * class.h (mono_class_inflate_generic_method): Revert to two
12053 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
12054 (mono_class_inflate_generic_method_full): Add.
12055 * class.c (mono_class_inflate_generic_method_full): Rename from
12056 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
12057 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
12058 * loader.c, reflection.c: Update to changes.
12060 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
12062 * icall.c: const fixes and small improvements.
12064 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12066 * threadpool.c: for asynchronous connect(), enable the same workaround
12067 for BSD 6 as for the Mac. Fixes bug #77637.
12069 2006-02-24 Zoltan Varga <vargaz@gmail.com>
12071 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
12072 formatted classes. Fixes #77524.
12074 2006-02-24 Raja R Harinath <rharinath@novell.com>
12076 * class.c (inflate_generic_type): Add a couple more
12077 micro-optimizations.
12078 (inflate_generic_context): Don't use the 'gmethod' from
12080 (mono_class_inflate_generic_method): If the method has generic
12081 parameters, but the passed-in context doesn't have a 'gmethod',
12082 create one. Use the possibly simplified generic instantiation
12083 from the declaring class instead of the one passed in.
12085 2006-02-24 Raja R Harinath <harinath@gmail.com>
12087 Make generic method signature and method header handling lazy.
12088 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
12089 (inflate_generic_header): Likewise.
12090 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
12091 parameter to avoid inflating types.
12092 (mono_get_inflated_method): Empty out.
12093 * class.h (mono_class_inflate_generic_method): Update to changes.
12094 * loader.c (mono_get_method_from_token): Don't parse signature for
12095 generic methods, nor methods of generic classes.
12096 (mono_method_signature): Rename from 'mono_method_signature'.
12097 Inflate signature on demand.
12098 (mono_method_get_header): Inflate method header on demand.
12099 * reflection.c: Update to changes.
12101 2006-02-23 Raja R Harinath <rharinath@novell.com>
12103 * metadata.c (mono_metadata_inflate_generic_inst): If the
12104 instantiation is closed, don't bother expanding it in the new
12106 * class.c (inflate_generic_class): If the generic instantiation
12107 doesn't change after inflation, return the argument itself.
12108 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
12110 (inflate_generic_context): If neither the generic class nor the
12111 generic method instantiations change, return the original context.
12112 * reflection.c (mono_method_get_object): Do
12113 'mono_get_inflated_method' before accessing the ->klass field.
12114 (inflate_mono_method): Don't create a MonoGenericMethod unless
12116 (inflate_method): Don't pass a constructed type as the declaring
12117 type of a methodbuilder.
12119 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
12121 * object.c: fix memory overwrite.
12123 2006-02-22 Dick Porter <dick@ximian.com>
12125 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
12126 it doesn't work any more.
12127 (mono_threads_request_thread_dump): Fix unused variable warnings.
12129 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12131 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
12132 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
12133 the public header file.
12135 2006-02-21 Zoltan Varga <vargaz@gmail.com>
12137 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
12139 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12141 * class-internals.h, object.c: reduce the size of MonoVTable
12142 and store the interface_offsets array at negative offsets.
12144 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
12146 * metadata.c: tweak table descriptors data structures to reduce
12147 size and runtime relocations.
12149 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12151 * marshal.c: fix some types and opcodes to be type-safe
12152 in marshaling wrappers.
12154 2006-02-21 Ankit Jain <jankit@novell.com>
12156 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
12158 2006-02-21 Raja R Harinath <rharinath@novell.com>
12160 * metadata.c (get_constraints): Relax debugging checks for monodis.
12162 2006-02-21 Ankit Jain <jankit@novell.com>
12164 * metadata.c (mono_metadata_load_generic_params): Move the code
12165 checking for ambiguous generic params from here to mono/dis/get.c
12166 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
12168 2006-02-21 Raja R Harinath <harinath@gmail.com>
12170 Fix assertion triggered when compiling nemerle.
12171 * class.c (mono_get_shared_generic_inst): Rename from
12172 get_shared_inst and make non-static.
12173 * loader.c (mono_get_shared_generic_method): New. Used to create
12174 the MonoGenericContext-equivalent of a MonoGenericContainer.
12175 (mono_get_method_from_token): Initialize the 'context' field of
12176 the created MonoGenericContainer.
12177 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
12178 * metadata.c (get_constraints): Add sanity check.
12179 * class-internals.h: Add new internal methods.
12181 * reflection.c (verify_safe_for_managed_space): New sanity check.
12182 Currently checks that owner-less generic parameters aren't allowed
12184 (mono_type_get_object): Use it.
12185 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
12186 that are now in mono_type_get_object.
12187 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
12189 2006-02-19 Raja R Harinath <harinath@gmail.com>
12191 * metadata.c (mono_type_create_from_typespec): Rename from
12192 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
12193 argument and caching of types in the generic container.
12194 (unwrap_arrays, find_generic_param): Remove.
12195 * metadata-internals.h: Update.
12196 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
12198 2006-02-18 Zoltan Varga <vargaz@gmail.com>
12200 * class.c (mono_class_get_exception_for_failure): Fix a warning.
12202 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
12203 return values. Fixes #77581.
12205 * class.c (mono_fnptr_class_get): Switch name and name_space.
12207 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
12208 classes and add support for [In, Out] attributes.
12209 (mono_marshal_free_asany): Ditto. Fixes #77524.
12211 2006-02-18 Raja R Harinath <harinath@gmail.com>
12213 * class.c (mono_class_from_generic_parameter): Make more robust to
12214 incomplete MonoGenericContainers from monodis.
12216 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
12218 * class-internals.h: added some more exception types.
12219 * class.c, metadata.c: added a few checks to handle missing
12222 2006-02-17 Raja R Harinath <rharinath@novell.com>
12224 Use owner-less generic-params some more.
12225 * class.c (my_mono_class_from_generic_parameter): Remove.
12226 (mono_class_from_generic_parameter): Handle null image,
12227 param->name and param->owner.
12228 (mono_class_from_mono_type): Update.
12229 (mono_class_create_from_typespec): Remove 'container' parameter.
12230 If that parameter is non-null, the result is always inflated by
12231 'mono_class_get_full' anyway.
12232 (mono_class_get): Rename from _mono_class_get. Remove 'container'
12234 (mono_class_get_full): Update.
12236 * class.c (inflate_generic_type) [GENERICINST]: If the generic
12237 instance is not open, don't bother inflating.
12238 (mono_class_setup_fields): Hoist some loop-invariants. Don't
12239 parse metadata for inflated classes.
12240 (_mono_class_get): Change GenericContext* parameter to
12242 (mono_class_create_from_typespec): Likewise. Simplify, and
12243 implement trivially. All the cases are handled in
12244 mono_class_from_mono_type. Don't inflate returned class.
12245 (mono_class_get_full): Delegate GENERICINST optimization to
12246 inflate_generic_type.
12247 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
12249 2006-02-16 Dick Porter <dick@ximian.com>
12251 * socket-io.c (create_object_from_sockaddr): Fix typo.
12252 (create_sockaddr_from_object): Check array lengths before
12253 potentially accessing items off the end.
12254 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
12255 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
12256 (ves_icall_System_Net_Sockets_Socket_Send_internal)
12257 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
12258 length checks to avoid wraparound overflows.
12259 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
12260 contents of the array of sockets
12261 (hostent_to_IPHostEntry2)
12262 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
12263 Check return value of inet_ntop ().
12264 (addrinfo_to_IPHostEntry): Fix typo
12266 2006-02-16 Raja R Harinath <rharinath@novell.com>
12268 Type metadata parsing doesn't use generic-instantiation information.
12269 * metadata.c (mono_metadata_parse_array_full): Change
12270 MonoGenericContext* parameter to MonoGenericContainer*.
12271 (mono_metadata_parse_type_full): Likewise.
12272 (mono_type_create_from_typespec_full): Likewise.
12273 (mono_metadata_parse_mh_full): Likewise.
12274 (mono_metadata_parse_generic_inst): Likewise.
12275 (do_mono_metadata_parse_generic_class): Likewise.
12276 (do_mono_metadata_parse_type): Likewise.
12277 * metadata-internals.h: Update to changes.
12278 * class.c (mono_class_find_enum_basetype): Likewise.
12279 (mono_class_setup_fields): Likewise.
12280 (mono_class_create_from_typespec): Likewise.
12281 * loader.c (method_from_methodspec): Likewise.
12282 (mono_get_method_from_token): Likewise.
12283 (mono_method_get_header): Likewise.
12285 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12287 * marshal.c: handle additional GENERICINST case (patch from
12288 Thong Nguyen <tum@veridicus.com>).
12289 Fix a few cases where LDIND_I/STIND_I was used for references.
12291 2006-02-16 Raja R Harinath <rharinath@novell.com>
12293 * reflection.c (mono_reflection_get_token): Remove unused variable.
12295 2006-02-16 Martin Baulig <martin@ximian.com>
12297 * reflection.c (mono_reflection_get_token): Add support for fields
12298 in instantiated generic types.
12301 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
12303 2006-02-15 Martin Baulig <martin@ximian.com>
12306 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
12307 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
12308 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
12309 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
12311 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
12313 * class.c, metadata.c, metadata.h, object.c, icall.c,
12314 marshal.c: changed mono_type_get_underlying_type () to do
12315 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
12316 Fixed handling of instantiated generic valuetypes (bug #75479).
12318 2006-02-15 Raja R Harinath <rharinath@novell.com>
12320 * metadata.c (mono_metadata_decode_signed_value): Simplify.
12321 Delegate to mono_metadata_decode_value, and work on the returned value.
12323 * icall.c (ves_icall_MonoType_GetGenericArguments):
12324 Add consistency check here too.
12326 2006-02-15 Ankit Jain <jankit@novell.com>
12328 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
12331 2006-02-15 Ankit Jain <jankit@novell.com>
12333 * metadata.c (mono_metadata_decode_signed_value): New function to decode
12334 signed values, used only for representing lower bounds of arrays.
12335 (mono_metadata_parse_array_full): Use new
12336 mono_metadata_decode_signed_value to decode lower bounds.
12338 2006-02-14 Martin Baulig <martin@ximian.com>
12341 (mono_reflection_get_token): Support "MonoGenericMethod" and
12342 "MonoGenericCMethod" and allow generic instances / methods.
12344 2006-02-11 Zoltan Varga <vargaz@gmail.com>
12346 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
12347 to obtain the terminal size using an ioctl.
12349 * object.c (mono_nullable_init): Revert this as nullable reference
12350 types are not valid.
12351 (mono_nullable_box): Ditto.
12353 2006-02-09 Dick Porter <dick@ximian.com>
12355 * threads.c (mono_thread_detach): Drop a reference to the thread
12358 2006-02-09 Zoltan Varga <vargaz@gmail.com>
12360 * object.c (mono_nullable_init): Handle nullable reference types.
12361 (mono_nullable_box): Ditto. Fixes #77446.
12363 2006-02-07 Martin Baulig <martin@ximian.com>
12365 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
12367 2006-02-07 Ankit Jain <jankit@novell.com>
12369 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
12370 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
12371 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
12372 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
12373 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
12374 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
12376 2006-02-02 Zoltan Varga <vargaz@gmail.com>
12378 * class.c (mono_class_create_generic): Set type_token as well.
12380 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
12381 compatible with MS.
12383 2006-02-02 Martin Baulig <martin@ximian.com>
12385 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
12386 has never been used so far.
12388 2006-02-02 Martin Baulig <martin@ximian.com>
12390 * mono-debug-debugger.h: Changed comment at the top of this file;
12391 the header is not installed, but it's safe to #include it from
12394 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
12395 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
12397 2006-02-02 Martin Baulig <martin@ximian.com>
12400 (MonoSymbolTable): Removed the `metadata_info' field.
12403 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
12405 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
12406 (mono_debugger_add_builtin_types): Removed.
12407 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
12408 (mono_debugger_create_notification_function): We now operate on a
12409 pre-allocated area; take a `gpointer' and return `void'.
12411 * mono-debug-debugger.c
12412 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
12413 (mono_debugger_add_builtin_types): Removed.
12415 2006-02-02 Martin Baulig <martin@ximian.com>
12417 * threads.c (mono_debugger_create_all_threads): New public method.
12419 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
12421 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
12422 breaks on several platforms.
12424 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
12426 * assembly.c: the VS.NET build doesn't supply default values for
12427 MONO_ASSEMBLIES and MONO_CFG_DIR.
12429 2006-02-01 Zoltan Varga <vargaz@gmail.com>
12431 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
12434 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
12436 * loader.c (method_from_memberref): Fix a warning.
12438 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
12440 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
12441 with explicit layout. Fixes #77433.
12443 2006-01-31 Zoltan Varga <vargaz@gmail.com>
12445 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
12446 max_interface_id is initialized before using it. Fixes #77398.
12447 (ves_icall_Type_GetInterfaces): Ditto.
12449 2006-01-30 Raja R Harinath <rharinath@novell.com>
12451 * metadata.c (mono_metadata_parse_method_signature_full): Don't
12452 allocate memory for parameter attributes when parsing memberref
12454 * loader.c (mono_loader_set_error_method_load): Don't warn.
12455 (method_from_memberref): Ensure MissingMethodException gets thrown
12456 if method is not found. Make warning more informative.
12458 2006-01-29 Raja R Harinath <harinath@gmail.com>
12461 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
12462 return true if is byref.
12463 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
12464 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
12465 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
12467 2006-01-27 Raja R Harinath <rharinath@novell.com>
12469 Fix tests/find-method.2.il
12470 * loader.c (find_method, find_method_in_class): Remove is_inflated
12471 argument. Revert 2006-01-18 change.
12472 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
12473 is generic, search for method in its generic definition.
12474 * class.c (mono_class_setup_vtable_general): Print generic
12475 arguments of generic types in debugging printf.
12477 2006-01-26 Zoltan Varga <vargaz@gmail.com>
12479 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
12481 * threads.c (mono_threads_request_thread_dump): New helper function.
12483 2006-01-25 Raja R Harinath <rharinath@novell.com>
12485 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
12487 2006-01-25 Ankit Jain <jankit@novell.com>
12489 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
12490 move definition to ..
12491 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
12493 2006-01-25 Ankit Jain <jankit@novell.com>
12494 Raja R Harinath <rharinath@novell.com>
12496 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
12497 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
12500 2006-01-25 Martin Baulig <martin@ximian.com>
12502 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
12503 `MonoDebuggerThread' into debug-debugger.c.
12505 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12507 * profiler.c: fix printing of data.
12509 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
12511 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
12512 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
12514 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
12516 * object.c: fix deadlock related to string interning.
12518 2006-01-23 Martin Baulig <martin@ximian.com>
12520 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
12522 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
12524 2006-01-23 Martin Baulig <martin@ximian.com>
12526 * mono-debug.h: Moved the prototypes of some functions which are
12527 used by the JIT here from mono-debug-debugger.h.
12529 2006-01-21 Martin Baulig <martin@ximian.com>
12531 * Makefile.am: Don't install mono-debug-debugger.h.
12533 2006-01-21 Martin Baulig <martin@ximian.com>
12535 * mono-debug-debugger.h: Enforce the private status of this header
12536 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
12537 Moved some stuff from mono-debugger-jit-wrapper.h here.
12539 2006-01-20 Raja R Harinath <rharinath@novell.com>
12541 * class.c (mono_class_from_typeref): Add a sanity test to help
12542 catch lack of assembly load/search hooks.
12544 2006-01-19 Zoltan Varga <vargaz@gmail.com>
12546 * marshal.c (emit_struct_conv): Relax the fields with same offset
12547 check even more. Fixes #77230.
12549 2006-01-18 Martin Baulig <martin@ximian.com>
12551 * loader.c (find_method_in_class): Added `gboolean is_inflated'
12552 argument; if false, we compare the uninstantiated signatures.
12553 (method_from_memberref): Compare the uninstantiated signatures;
12556 2006-01-18 Robert Jordan <robertj@gmx.net>
12558 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
12559 Clear the weak link. Fixes bug #77170.
12561 * gc.c (mono_gchandle_free):
12562 Reflect *-gc.c changes (tiny optimization).
12564 2006-01-18 Zoltan Varga <vargaz@gmail.com>
12566 * metadata.c (mono_metadata_signature_dup): Applied patch from
12567 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
12570 2006-01-17 Zoltan Varga <vargaz@gmail.com>
12572 * marshal.c (emit_struct_conv): Allow fields with the same offset when
12573 marshalling from native to managed code. Fixes #77230.
12575 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12577 * threadpool.c: fix problem (Mac only) when more than one asynchronous
12578 connect. Fixes bug #77020.
12580 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
12582 * class.c: fixed id assignement for nested interfaces (bug #77275).
12583 Added also better info for --print-vtable debugging.
12585 2006-01-12 Martin Baulig <martin@ximian.com>
12587 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
12588 interfaces on-the-fly; fixes #76625.
12590 * class-internals.h
12591 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
12592 don't need that anymore.
12594 2006-01-12 Miguel de Icaza <miguel@novell.com>
12597 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
12598 To avoid initing the nested_classes when not needed I turned the
12599 PeerCredData as a toplevel internal class, as it has to be shared
12602 Fixes the CASA issue.
12604 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
12606 * domain.c: Accessors for MonoJitInfo
12608 * profiler-private.h: Add jitinfo to the end jit hook
12610 * profiler.[ch]: Define new hooks, called after jitting which give
12611 the MonoJitInfo that was compiled
12613 2006-01-10 Martin Baulig <martin@ximian.com>
12615 * class.c (mono_class_setup_events): Add support for generic
12616 classes; fixes #76440.
12618 2006-01-06 Raja R Harinath <rharinath@novell.com>
12621 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
12622 on passed-in method.
12624 2006-01-03 Zoltan Varga <vargaz@gmail.com>
12626 * object.c (mono_runtime_invoke_array): Add Nullable support.
12628 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
12630 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
12632 * file-io.c: Don't consider sockets as directory and avoid an endless
12633 loop. Fix bug #76966.
12635 2006-01-03 Zoltan Varga <vargaz@gmail.com>
12637 * object.c (mono_nullable_init): New helper function.
12638 (mono_nullable_box): Ditto.
12640 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
12642 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
12644 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
12646 2006-01-02 Zoltan Varga <vargaz@gmail.com>
12648 * class.c (mono_class_is_assignable_from): Make T assignable to
12651 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
12653 * appdomain.c: Bump corlib version to 46.
12654 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
12655 serialization purpose) and changed ves_icall_System_Reflection_
12656 Assembly_get_code_base signature to accept a boolean (to escape, or
12657 not, the assembly code base).
12659 2005-12-23 Dick Porter <dick@ximian.com>
12663 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
12664 CreateEvent icall now returns "created" boolean parameter.
12666 2005-12-22 Zoltan Varga <vargaz@gmail.com>
12668 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
12671 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
12672 when attr_klass is an interface. Fixes #77045.
12674 2005-12-20 Zoltan Varga <vargaz@gmail.com>
12676 * marshal.c (emit_struct_conv): Fix previous patch.
12678 * marshal.c (emit_struct_conv): Add a check for fields with the same
12681 2005-12-20 Raja R Harinath <rharinath@novell.com>
12683 Fix regression in Mono.C5.
12684 * class.c (mono_class_create_generic): If 'klass' is an interface
12685 set up the interface offsets.
12686 (mono_class_is_assignable_from): Don't throw away generic arguments.
12688 2005-12-19 Raja R Harinath <rharinath@novell.com>
12690 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
12693 2005-12-15 Raja R Harinath <rharinath@novell.com>
12695 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
12697 (do_mono_metadata_parse_generic_class): Don't pass the current
12698 generic context when parsing the type being instantiated: it
12699 cannot use it, anyway.
12701 * loader.c (method_from_memberref): Don't inflate a signature if
12702 it doesn't contain any type parameters.
12704 2005-12-15 Zoltan Varga <vargaz@gmail.com>
12706 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
12708 2005-12-14 Martin Baulig <martin@ximian.com>
12711 (mono_type_get_name_recurse): Don't return null for type
12712 parameters and open generic classes.
12713 (mono_class_setup_methods): Don't exclude generic instances.
12714 (mono_get_unique_iid): Use different IDs for different
12715 instantiations of the same generic type.
12716 (mono_class_setup_vtable): Only use setup_generic_vtable() for
12717 open generic instances; create a normal vtable for closed generic
12719 (mono_class_setup_vtable_general): We're now also called for
12720 closed generic instances.
12723 (mono_reflection_bind_generic_parameters): Correctly use
12724 mono_metadata_lookup_generic_inst() everywhere.
12726 2005-12-14 Zoltan Varga <vargaz@gmail.com>
12728 * object.c (mono_class_create_runtime_vtable): Call
12729 mono_class_setup_vtable ().
12731 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
12733 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
12736 * loader.c (mono_loader_set_error_type_load): Print the type load
12737 warnings to the console so they are more visible to the user.
12738 (mono_loader_set_error_method_load): Ditto.
12740 * reflection.c (ensure_runtime_vtable): Revert the last change as it
12743 * reflection.c (ensure_runtime_vtable): Fix build.
12745 * reflection.c (ensure_runtime_vtable): Disable an optimization which
12746 doesn't work in all cases.
12748 2005-12-13 Zoltan Varga <vargaz@gmail.com>
12750 * object.c (mono_array_new_full): Treat a single dimensional array
12751 with 0 lower bounds as an szarray. Fixes #76973.
12753 * reflection.c (custom_attr_visible): Really fix this.
12755 2005-12-12 Zoltan Varga <vargaz@gmail.com>
12757 * reflection.c (custom_attr_visible): Allow nested public attributes
12760 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
12763 2005-12-12 Raja R Harinath <harinath@gmail.com>
12765 * class.c (set_generic_param_owner): Delete.
12766 (mono_class_create_from_typedef): Don't set ->owner field of
12767 generic parameters to "param containers" of enclosing classes.
12768 * reflection.c (mono_reflection_initialize_generic_parameter):
12771 2005-12-11 Zoltan Varga <vargaz@gmail.com>
12773 * reflection.c (custom_attr_visible): Fix build.
12775 2005-12-10 Zoltan Varga <vargaz@gmail.com>
12777 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
12778 private attributes.
12780 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
12781 handling of null parameter defaults.
12783 2005-12-09 Raja R Harinath <rharinath@novell.com>
12785 * class.c (mono_class_from_generic_parameter): Don't set
12786 klass->generic_container.
12787 (my_mono_class_from_generic_parameter): Likewise.
12789 2005-12-07 Zoltan Varga <vargaz@gmail.com>
12791 * reflection.c (load_public_key): Fix a warning.
12792 (method_encode_code): Fix unaligned accesses.
12794 2005-12-07 Martin Baulig <martin@ximian.com>
12796 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
12799 (write_generic_param_entry): Encode our custom attrs.
12801 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
12803 2005-12-07 Martin Baulig <martin@ximian.com>
12805 * reflection.c (encode_new_constraint): Removed; we don't use the
12806 `NewConstraintAttribute' anymore.
12808 2005-12-06 Zoltan Varga <vargaz@gmail.com>
12810 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
12811 not fire a TypeResolve event when Assembly.GetType () is called.
12813 2005-12-05 Ben Maurer <bmaurer@ximian.com>
12815 Beginning of support for nullable types in the runtime. Parts of
12816 this patch are from Martin.
12818 * appdomain.c (MONO_CORLIB_VERSION): Bump
12820 * domain.c (mono_init_internal): get the nullable type
12822 * class.c (mono_class_is_nullable): New method
12823 (mono_class_get_nullable_param): New mehod
12824 (mono_class_create_generic): In types T? set cast_class to T
12826 * class-internals.h (MonoDefaults): new nullable default class
12827 (mono_class_get_nullable_param, mono_class_get_nullable_param):
12830 2005-12-05 Raja R Harinath <rharinath@novell.com>
12832 * metadata.c (select_container): New. Refactor code to select the
12833 appropriate GenericContainer given the type of generic parameter
12834 we are looking for.
12835 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
12836 not a MonoGenericContext. Use select_container. Update parameters.
12837 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
12838 and MONO_TYPE_MVAR.
12839 (unwrap_arrays): Remove duplicate tests.
12840 (find_generic_param): Rename from 'has_same_context'. Now walks a
12841 generic instantiated class to find any arguments that are generic
12843 (mono_type_create_from_typespec_full): Use find_generic_param to
12844 avoid evicting some generic instantiations from the typespec
12847 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
12849 * reflection.c: fixed writing of doubles on ARM FPA.
12851 2005-12-02 Robert Jordan <robertj@gmx.net>
12853 * icall.c: Fixed EventInfo.ReflectedType (#76829).
12855 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12857 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
12858 least on SUSE 10 they are not the same (on debian, they are just the
12861 2005-12-01 Raja R Harinath <rharinath@novell.com>
12863 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
12864 DeclaringType for VARs and MVARs.
12865 * class.c (set_generic_param_owner): Fix initialization of owner
12868 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
12870 * icall.c: fixed Enum.ToObject() to correctly convert the values.
12872 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12874 * threadpool.c: workaround for a bug that shows up on the Mac:
12875 select()+connect() on a blocking socket is not like it should
12876 be, so we proceed to connect() in that case, wasting the I/O
12877 threadpool thread until connect succeedes. Fixes bug #75436.
12879 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12881 * threadpool.c: fix typo when setting file descriptor states.
12883 2005-11-28 Raja R Harinath <rharinath@novell.com>
12885 * class-internals.h (MonoGenericContainer.is_signature): Remove.
12886 * metadata.c (mono_metadata_parse_method_signature_full): Don't
12887 create a temporary signature container.
12888 (mono_metadata_parse_generic_param): Update to changes.
12889 (mono_type_create_from_typespec_full): Update to changes.
12890 * loader.c (method_from_memberref): Don't use a
12891 MonoGenericContainer while parsing a memberref signature.
12892 (method_from_methodspec): Remove dead-store of the 'container'
12893 variable. It's overwritten before use.
12895 * metadata.c (mono_type_create_from_typespec_full): Make debugging
12897 (mono_metadata_parse_generic_param): Likewise.
12898 * loader.c (find_method_in_class): Does not need a
12899 MonoGenericContainer. Use 'mono_method_signature' rather than
12900 'mono_method_signature_full'.
12901 (find_method, mono_get_method_constrained, method_from_memberref):
12904 * metadata.c (mono_type_create_from_typespec_full): Ensure that
12905 owner-less generic-parameters are never evicted from the typespec
12908 * loader.c (method_from_memberref): Don't use the current context
12909 when parsing signatures.
12910 (method_from_methodspec, mono_get_method_from_token): Update to changes.
12912 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
12913 side-effects in g_assert.
12914 * loader.c (mono_get_method_from_token): Resolve klass earlier so
12915 that we don't potentially lose information.
12917 2005-11-26 Dick Porter <dick@ximian.com>
12920 * threads.c: icalls to implement basic (ie, not named)
12921 System.Threading.Semaphore.
12923 2005-11-24 Dick Porter <dick@ximian.com>
12926 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
12927 Use GetProcessId() if it's available.
12929 2005-11-23 Zoltan Varga <vargaz@gmail.com>
12931 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
12933 2005-11-23 Raja R Harinath <rharinath@novell.com>
12934 Ankit Jain <jankit@novell.com>
12936 * loader.c (mono_get_method_from_token): Initialize 'method' field
12937 of all generic parameters before parsing the signature. Remove
12938 code that "fixed"-up MVAR references.
12940 2005-11-23 Ankit Jain <jankit@novell.com>
12942 * metadata.c (mono_metadata_has_generic_params):
12943 (mono_metadata_load_generic_param_constraints):
12944 (mono_metadata_load_generic_params): Move duplicate code ...
12945 (mono_metadata_get_generic_param_row): ... here. Returns the
12946 first row-id in GenericParam table for a given owner (token).
12947 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
12950 2005-11-23 Raja R Harinath <rharinath@novell.com>
12951 Ankit Jain <jankit@novell.com>
12953 * metadata.c (mono_metadata_class_equal): Pass signature_only when
12954 comparing VARs too.
12955 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
12956 type->data.generic_param only if the type is an MVAR.
12957 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
12958 leak owner-less VARs and MVARs into managed space.
12960 2005-11-21 Martin Baulig <martin@ximian.com>
12962 * class-internals.h
12963 (MonoMethod): Moved the `generic_container' here from
12964 `MonoMethodNormal' since we now also need it for
12965 `MonoMethodPInvoke';
12966 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
12967 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
12968 an union containing both `MonoMethodNormal' and
12969 `MonoMethodPInvoke'.
12972 (mono_get_method_from_token): Allow implementing generic methods
12976 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
12979 2005-11-17 Dick Porter <dick@ximian.com>
12983 * process.c: Split the Process Start_internal icall into
12984 ShellExecuteEx_internal and CreateProcess_internal, which are
12985 called depending on whether UseShellExecute is true. Fixes bug
12988 * appdomain.c (MONO_CORLIB_VERSION): Incremented
12990 2005-11-17 Zoltan Varga <vargaz@gmail.com>
12992 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
12993 'msize' parameters, use the information in 'mspec' instead.
12994 (emit_object_to_ptr_conv): Ditto.
12996 * marshal.c (emit_struct_conv): Handle explicit layout structs with
12997 fields out of order. Fixes #76733.
12999 2005-11-17 Ankit Jain <jankit@novell.com>
13001 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
13003 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
13005 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
13008 2005-11-16 Zoltan Varga <vargaz@gmail.com>
13010 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
13011 for types with non-auto layout. Fixes #76717.
13013 2005-11-16 Ankit Jain <jankit@novell.com>
13015 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
13016 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
13017 if generic_context is null.
13018 (mono_metadata_generic_param_equal): param->owner can be null.
13019 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
13022 2005-11-16 Zoltan Varga <vargaz@gmail.com>
13024 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
13027 2005-11-15 Martin Baulig <martin@ximian.com>
13029 * object.c (set_value): Use mono_class_from_mono_type() instead of
13030 the hack for generic instances; fixes #76136.
13032 2005-11-15 Zoltan Varga <vargaz@gmail.com>
13034 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
13037 * image.c (load_metadata_ptrs): Initialize the new fields.
13039 * reflection.c (create_dynamic_mono_image): Ditto.
13041 * reflection.c (build_compressed_metadata): Use the new fields.
13043 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
13046 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
13049 2005-11-15 Ankit Jain <jankit@novell.com>
13050 Raja R Harinath <harinath@gmail.com>
13052 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
13053 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
13054 new per-generic_container cache if the cached MonoType's context matches
13055 the current context.
13056 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
13057 to the expected context.
13058 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
13060 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13062 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
13063 we changed the signature of an icall.
13064 * icall.c: Modify to mono_double_ParseImpl return true/false
13065 depending on the success, instead of throwing the exception. This will
13066 help us in Double.TryParse methods.
13068 2005-11-14 Zoltan Varga <vargaz@gmail.com>
13070 * marshal.c (emit_marshal_object): Throw an exception when
13071 marshalling 'object' instead of crashing. Fixes #76696.
13073 2005-11-11 Zoltan Varga <vargaz@gmail.com>
13075 * class-internals.h: Add prototype for mono_type_get_full_name ().
13077 2005-11-11 Dick Porter <dick@ximian.com>
13079 * threads.c (mono_thread_manage): Make sure the main thread has
13080 abandoned all its mutexes when cleaning up. Fixes bug 74680.
13082 2005-11-11 Zoltan Varga <vargaz@gmail.com>
13084 * loader.c (mono_loader_set_error_type_load): Log a warning to the
13085 console about the missing type.
13086 (mono_loader_set_error_method_load): Ditto.
13088 2005-11-09 Miguel de Icaza <miguel@novell.com>
13090 * mono-config.c (mono_get_config_dir): Set the system defaults if
13093 * assembly.c (mono_set_dirs): New API entry point to set the
13094 assembly and the config directory in one call
13096 2005-11-09 Zoltan Varga <vargaz@gmail.com>
13098 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
13099 the ftnptr was created from a delegate in a domain other than the
13100 current domain. Fixes #75377.
13102 * exception.h exception.c: Add mono_get_exception_not_supported ().
13104 2005-11-08 Martin Baulig <martin@ximian.com>
13106 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
13108 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
13110 * security-manager.h: Added definitions to deal with strongname key
13111 pairs bigger (and smaller) than 1024 bits.
13112 * reflection.c: Remove hardcoded strongname size (128 bytes) and
13113 adjust wrt the public key length being used.
13115 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
13117 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
13118 Windows build (r51396-51397).
13120 2005-11-03 Martin Baulig <martin@ximian.com>
13122 * class.c (mono_class_setup_vtable_general): Also add generic
13123 methods to the vtable; fixes #76581.
13125 2005-11-01 Miguel de Icaza <miguel@novell.com>
13127 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
13128 sure that we lookup GetString method from the System.Text.Encoding
13129 class, not the derived class or we get an empty method.
13131 Fixed class #76612.
13133 2005-10-25 Miguel de Icaza <miguel@novell.com>
13135 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
13136 if it has been previously set (embedders).
13138 Make mono_set_rootdir available also on Unix.
13140 005-10-24 Robert Jordan <robertj@gmx.net>
13142 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
13144 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
13146 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
13147 only calls which are made to native code use this flag.
13149 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
13151 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
13153 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
13154 Add support for FieldBuilders.
13156 2005-10-29 Martin Baulig <martin@ximian.com>
13159 (mono_debug_using_mono_debugger): New public method; returns
13160 whether we're running inside the debugger.
13162 2005-10-27 Zoltan Varga <vargaz@gmail.com>
13164 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
13165 for Method/Constructor/FieldBuilders.
13167 2005-10-26 Zoltan Varga <vargaz@gmail.com>
13169 * reflection.c (module_add_cattrs): Save custom attributes for global methods
13170 and fields as well.
13172 2005-10-26 Martin Baulig <martin@ximian.com>
13174 * mono-debug-debugger.c
13175 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
13177 2005-10-24 Raja R Harinath <harinath@gmail.com>
13179 * icall.c (base64_to_byte_array): Don't pass an out-of-range
13180 integer to isspace.
13182 2005-10-21 Zoltan Varga <vargaz@gmail.com>
13184 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
13185 when passing valuetypes byref. Fixes #76502.
13187 2005-10-19 Jackson Harper <jackson@ximian.com>
13189 * profiler.c: Don't put a . in front of types that are not in a
13192 2005-10-18 Zoltan Varga <vargaz@gmail.com>
13194 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
13196 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
13198 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
13200 (mono_marshal_get_ldflda_wrapper): Fix a warning.
13202 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13204 * assembly.c metadata-internals.h icall.c: Define an additional
13205 parameter for mono_assembly_name_parse_full, so we can avoid creating
13206 S.R.AssemblyName.Version when no version info wasn't passed.
13208 2005-10-09 Miguel de Icaza <miguel@novell.com>
13210 * class.c (mono_type_get_full_name): Reimplement method that was
13213 * image.c: Some docs
13215 2005-10-10 Zoltan Varga <vargaz@gmail.com>
13217 * profiler.c (output_newobj_profile): Fix printing of Total memory
13220 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
13222 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
13224 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
13226 * threads.c: remove debug output.
13228 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
13230 * threads.c (mono_thread_manage): Fix crashes if more than 64
13231 threads need to be aborted. Hopefully fixes #75899.
13233 * assembly.c (mono_stringify_assembly_name): New helper function.
13235 * class.c: Use mono_stringify_assembly_name instead of the similar
13238 * assembly.h assembly.c: Add support for calling a postload search
13239 hook if an assembly cannot be loaded.
13241 * appdomain.c: Register new search hooks which call the AssemblyResolve
13242 events in AppDomain. Fixes #75231
13244 2005-10-07 Martin Baulig <martin@ximian.com>
13246 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
13247 methods without debug info.
13249 2005-10-07 Zoltan Varga <vargaz@gmail.com>
13251 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
13254 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13256 * file-io.c: now that we return symlinks, use lstat and, when the file
13257 is a symbolic link, stat, to get the file attributes. Also avoid the
13258 conversion to/from utf16/external.
13260 2005-10-06 Zoltan Varga <vargaz@gmail.com>
13262 * class.c (mono_class_layout_fields): Compute klass->has_references
13263 correctly if an embedded valuetype is not yet initialized. Fixes
13266 2005-10-04 Martin Baulig <martin@ximian.com>
13269 (mono_metadata_load_generic_param_constraints): New public
13270 function; splitted the constraints loading out from
13271 mono_metadata_load_generic_params().
13273 * class.c (mono_class_create_from_typedef): Call
13274 mono_metadata_load_generic_param_constraints() after setting up
13275 the type and creating our parent; fixes #75329.
13277 2005-10-04 Martin Baulig <martin@ximian.com>
13279 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
13280 non-dynamic parent classes.
13282 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
13284 * file-io.c : win32 build fix (ETXTBSY seems not found).
13286 2005-10-04 Martin Baulig <martin@ximian.com>
13289 (mono_image_get_methodspec_token): Make the cache actually work;
13292 2005-10-04 Martin Baulig <martin@ximian.com>
13294 * class.c (mono_class_name_from_token): Removed the unneccessary
13295 `MonoGenericContext *' argument.
13297 2005-10-04 Martin Baulig <martin@ximian.com>
13300 (method_from_methodspec): Make the caching work again; fixes the
13301 performance regression from #76262.
13303 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13307 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
13308 GetFileSystemEntries that performs the same work but without going
13309 into io-layer, locking, etc.
13311 2005-09-30 Zoltan Varga <vargaz@gmail.com>
13313 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
13314 ThreadState_Stopped as well. Fixes #76047.
13316 2005-09-29 Martin Baulig <martin@ximian.com>
13319 (inflate_generic_context): If the new context has a `gmethod', set
13320 its `container' that that gmethod's `container'.
13323 (mono_metadata_parse_generic_param): Simplify things;
13324 `generic_container = generic_context->container;' is just fine.
13326 * loader.c (method_from_methodspec): Code cleanups.
13328 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13330 * decimal.c: fix warning (and let gcc generate correct
13331 code on ARM with optimizations).
13333 2005-09-28 Martin Baulig <martin@ximian.com>
13336 (method_from_memberref): Added `MonoGenericContext *class_context'
13337 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
13338 (method_from_methodspec): If we're a memberref, use the enclosing
13339 context when parsing its parent. Fixes #76262; see gtest-206.cs.
13341 2005-09-28 Martin Baulig <martin@ximian.com>
13343 * object.c (mono_runtime_invoke_array): Added support for
13344 MONO_TYPE_GENERICINST; fixes #75917.
13346 2005-09-27 Martin Baulig <martin@ximian.com>
13348 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
13349 `k->byval_arg.type' to determine the actual type.
13351 * loader.c (method_from_methodspec): Removed some hacks.
13353 2005-09-27 Ben Maurer <bmaurer@ximian.com>
13355 * class-internals.h (mono_field_is_deleted): Do the test for
13356 rtspecialname before we check the actual name of the field. This
13357 prevents us from dereferencing a pointer into the string table,
13358 saving us from accessing a few pages
13360 * *.c: Replace the use of {Enter,Leave}CriticalSection with
13361 macros. This will allow a deadlock debugger to easily be plugged
13364 2005-09-27 Martin Baulig <martin@ximian.com>
13366 * loader.c (method_from_methodspec): Create a "signature"
13367 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
13369 2005-09-27 Martin Baulig <martin@ximian.com>
13372 (inflate_generic_class): Correctly set the new context's
13376 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
13377 instead of a `MonoGenericContext *'.
13378 (mono_method_signature_full): Take a `MonoGenericContainer *'
13379 instead of a `MonoGenericContext *'.
13382 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
13383 instead of a `MonoGenericContext *'.
13384 (mono_metadata_parse_method_signature_full): Likewise.
13386 2005-09-26 Martin Baulig <martin@ximian.com>
13389 (mono_class_from_generic_parameter): Set `klass->generic_container'
13390 (mono_class_from_generic_parameter): Likewise.
13391 (mono_bounded_array_class_get): We inherit the generic container
13392 from the element class.
13395 (find_method, find_method_in_class): Take a `MonoGenericContext *'
13396 argument rather than computing it here.
13397 (method_from_memberref): Correctly set the generic context before
13398 parsing the signature. Fixes #75681.
13400 2005-09-26 Zoltan Varga <vargaz@gmail.com>
13402 * object.c (mono_class_has_special_static_fields): Fix warnings.
13404 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13406 * assembly.c: Add parse_public_key function, to
13407 par the public keys. Also added mono_assembly_name_parse_full,
13408 to define it the parsed key should be freed or not.
13409 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
13410 to parse a long format assembly name.
13411 * metadata-internals.h: Keep mono_assembly_name_parse_full as
13412 private, since calling it to preserve the key requires
13413 freeing it manually.
13415 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
13417 * locales.c : removed HAVE_ICU part.
13419 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
13421 * object.c (mono_class_create_runtime_vtable): Avoid calling
13422 field_is_special_static if the klass has no special static fields.
13424 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
13425 (MonoCachedClassInfo): Likewise.
13427 * object.c (mono_class_has_special_static_fields): New helper function.
13429 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13431 * class.c (mono_class_create_from_typedef): Don't call
13432 interfaces_from_typedef_full for enums.
13433 (mono_class_create_from_typedef): Compute the base types of enums directly
13434 without calling mono_class_setup_fields ().
13435 (mono_class_find_enum_basetype): New helper function.
13437 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
13438 one place inside the string heap.
13440 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
13442 * class.c: locking fixes, code cleanups, some docs added.
13443 Allocate some data structures in the image mempool.
13445 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13447 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
13450 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
13452 * class-internals.h, class.c, reflection.c: reduce memory taken by
13455 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
13457 * metadata.c, metadata.h, loader.h: documentation updates, code and
13460 2005-09-23 Zoltan Varga <vargaz@gmail.com>
13462 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
13465 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
13466 page faults caused by the runtime while reading metadata.
13468 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13470 * socket-io.c: the field names were changed 3 months ago and no one
13471 realized until bug #76077 got filed!
13473 2005-09-20 Martin Baulig <martin@ximian.com>
13475 * icall.c (assembly_icalls): Removed some unused debugger icalls.
13477 2005-09-20 Martin Baulig <martin@ximian.com>
13479 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
13480 write the rank into the class entry.
13482 2005-09-20 Martin Baulig <martin@ximian.com>
13484 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
13486 2005-09-19 Zoltan Varga <vargaz@gmail.com>
13488 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13490 * icall.c (custom_attrs_defined_internal): New icall.
13492 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
13494 (mono_custom_attrs_construct_by_type): New helper function.
13496 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
13498 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
13499 terminate the resulting string. Fixes #76123.
13501 2005-09-16 Martin Baulig <martin@ximian.com>
13504 (mono_debug_add_method): Ignore inflated methods for the moment.
13506 2005-09-14 Martin Baulig <martin@ximian.com>
13508 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
13510 2005-09-13 Zoltan Varga <vargaz@gmail.com>
13512 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
13513 return a success/failure indication.
13514 (mono_metadata_interfaces_from_typedef_full): Ditto.
13515 (get_constraints): Ditto.
13517 2005-09-12 Zoltan Varga <vargaz@gmail.com>
13519 * marshal.c (emit_marshal_array): Fix handling of null arrays.
13521 * marshal.c (emit_marshal_array): Add support for returning string
13522 arrays from delegates. Fixes #76063.
13524 * marshal.c: Use the emit_ldloc/stloc macros where possible.
13526 2005-09-11 Zoltan Varga <vargaz@gmail.com>
13528 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
13531 2005-09-09 Zoltan Varga <vargaz@gmail.com>
13533 * reflection.c icall.c: Fix after mono_get_exception_type_load
13536 * assembly.c (mono_assembly_get_assemblyref): New helper function.
13537 (mono_assembly_load_reference): Use the new helper.
13539 * class-internals.h (MonoLoaderError): New structure containing
13540 information about type loading errors.
13542 * class-internals.h loader.c: Add APIs to store per-thread loader
13545 * loader.c class.c: Set the loader error if needed.
13547 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
13549 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
13551 * decimal.c: fixed to handle the broken ARM fp format.
13553 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
13555 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
13558 2005-09-06 Martin Baulig <martin@ximian.com>
13560 * domain.c (supported_runtimes): Added v2.0.50727.
13562 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
13564 * culture-info.h: reduce the size of some structures.
13566 2005-09-05 Martin Baulig <martin@ximian.com>
13568 Reflect latest API changes in the August CTP.
13571 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
13572 ("MonoType.HasGenericArguments"): Removed.
13573 ("MonoMethod.BindGenericParameters"): Renamed to
13574 "MakeGenericMethod".
13575 ("MethodBuilder.BindGenericParameters"): Renamed to
13576 "MakeGenericMethod".
13578 2005-09-05 Martin Baulig <martin@ximian.com>
13580 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
13582 2005-09-05 Martin Baulig <martin@ximian.com>
13584 Applying a patch from Michal Moskal <malekith@nemerle.org>.
13586 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
13587 generic_container is non-NULL.
13589 2005-09-05 Martin Baulig <martin@ximian.com>
13591 Applying a patch from Michal Moskal <malekith@nemerle.org>.
13593 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
13595 2005-08-29 Michal Moskal <malekith@nemerle.org>
13597 * reflection.c (encode_locals,
13598 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
13599 for large generic types.
13601 2005-09-05 Martin Baulig <martin@ximian.com>
13603 Applying a patch from Michal Moskal <malekith@nemerle.org>.
13605 * class.c (mono_dup_array_type): New public method.
13606 (mono_metadata_signature_deep_dup): New public method.
13607 (dup_type): Correctly duplicate array and function types.
13609 2005-09-05 Martin Baulig <martin@ximian.com>
13611 Applying a patch from Michal Moskal <malekith@nemerle.org>.
13613 * reflection.c (get_default_param_value_blobs): Handle generic types
13614 and generic methods.
13616 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
13618 * class.c: Fixed error reporting (method/class were inversed) for
13619 inheritance demands.
13620 * security-manager.c|h: Added the AppDomain when calling the managed
13621 System.Security.SecurityManager.InheritanceDemand method.
13623 2005-09-01 Raja R Harinath <rharinath@novell.com>
13625 * reflection.c (encode_marshal_blob): 'marshaltype' and
13626 'marshaltyperef' are alternate sources for the custom marshaler
13629 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
13631 * class.c: fix creation of array classes with rank == 1
13632 (patch by Ankit Jain <jankit@novell.com>).
13634 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
13636 * object.c: fix check for creating the bound data for arrays vs
13639 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13641 * object.c: configuration file name is now based on the executable name,
13642 not the image name. Fixes bug #75931.
13644 2005-08-29 Zoltan Varga <vargaz@gmail.com>
13646 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
13647 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
13649 2005-08-25 Zoltan Varga <vargaz@gmail.com>
13651 * rand.c: Use wincrypt.h instead of WinCrypt.h.
13653 2005-08-24 Ankit Jain <jankit@novell.com>
13654 Raja R Harinath <rharinath@novell.com>
13656 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
13657 called by it recursively.
13658 (mono_class_init): Remove special case in pending_init handling, since it's
13659 superseded by the fix to mono_class_from_typeref.
13661 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
13663 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
13664 BROKEN_THREAD_START stuff.
13666 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
13668 * class-internals.h object.c: Add a new kind of trampoline called a delegate
13671 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
13673 * object.c (mono_delegate_ctor): Replace the original function address with
13674 a delegate trampoline.
13676 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
13678 * icall.c: add boolean argument to base64_to_byte_array and
13679 InternalFromBase64String to control whether a whitespace-only string
13680 is allowed (or should casue a FormatException to be thrown). We need
13681 this as the behavior has changed between MS.NET 1.x and 2.0, and we
13682 to match the MS behaviour in both profiles.
13683 * appdomain.c: Bump corlib version.
13685 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13687 This patch implements a big portion of publisher policy
13688 support, used to bind assembly versions and redirect
13689 one assembly from version A to version B.
13692 New GSList loaded_assembly_bindings, for storing the cached
13694 (assembly_binding_maps_name): New static function for checking if a
13695 assembly binding information maps an assembly name.
13696 (mono_assembly_binding_info_free): New function for freeing
13697 assembly binding information resources.
13698 (get_publisher_policy_info): New static function for retrieving
13699 assembly binding information from a MonoImage.
13700 (compare_versions): New static function for comparing an assembly
13701 binding information data and the version of an assembly name.
13702 (check_policy_versions): New static function for checking if an
13703 assembly binding info mapping an assembly name is valid for it.
13704 (mono_assembly_load_publisher_policy): New static function for
13705 loading the 'policy.major.minor.MyAssembly' image for an assembly
13706 with an assembly name 'aname'.
13707 (mono_assembly_bind_version): New static function for updating
13708 assembly redirection.
13709 (mono_assembly_apply_binding): New static function for applying
13711 (search_binding_loaded): New static function for searching
13712 loaded assembly binding infos in the cache domain.
13713 (mono_assembly_load_full): Don't apply assembly binding for
13714 reflection only assemblies.
13716 * metadata-internals.h: Add MonoAssemblyBindingInfo,
13717 which contains information about assembly binding. Also
13718 declare signature for mono_config_parse_publisher_policy ()
13719 function, used to retrieve pub policy info.
13722 (publisher_policy_start): New static function used to parse publisher
13723 policy config files.
13724 (publisher_policy_parser): New static MonoParseHandler containing
13725 the functions used when parsing config files.
13726 (mono_config_parse_publisher_policy): New function for parsing
13727 publisher policy files.
13729 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
13731 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
13733 * marshal.c (mono_delegate_free_ftnptr): Ditto.
13735 * object.c (mono_get_addr_from_ftnptr): New helper function.
13737 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
13739 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13741 2005-08-19 Dick Porter <dick@ximian.com>
13743 * threads.c, threads.h, appdomain.c, appdomain.h,
13744 profiler-private.h, monitor.c, object.c, object-internals.h,
13745 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
13746 store the thread ID, so it can hold a 64 bit value if needed.
13748 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
13750 * reflection.c (mono_reflection_create_dynamic_method): Store the
13751 handle class into the method references as well so ldtoken works in
13754 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
13757 2005-08-19 Ankit Jain <jankit@novell.com>
13760 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
13761 here rather than using the method signature of a arbitrary function
13762 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
13764 Hack done with Harinath.
13766 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13768 * threadpool.c: disable printing stack traces when we get a exception
13769 in a threadpool thread. I need to do more testing to figure out which
13770 cases actually print this. Fixes bug #75828.
13772 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13774 * icall.c: there might be ignored whitespace after the last '='. This
13775 fixes length computation and bug #75840.
13777 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
13779 * assembly.c (mono_assembly_load_full): Consider .exe extension as
13780 well. Fixes #75809.
13782 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
13785 * reflection.c (create_custom_attr_data): Ditto.
13787 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
13789 * locales.c, culture-info.h : removed RegionLCIDMap.
13790 * culture-info-tables.h : regenerated.
13792 2005-08-16 Martin Baulig <martin@ximian.com>
13794 * class.c (mono_type_get_name_recurse): Small fix.
13796 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
13798 * locales.c : indentation fixie.
13800 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
13802 * object-internals.h,
13806 icall.c : added RegionInfo table support.
13807 * culture-info-table.h : regenerated for region support.
13809 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
13811 * reflection.c (resolve_object): handle all kinds of MonoMethod
13812 including generic ones
13814 2005-08-12 Ankit Jain <jankit@novell.com>
13816 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
13817 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
13819 2005-09-12 Lluis Sanchez <lluis@ximian.com>
13821 * process.c: Don't close a thread handle when it's NULL. This is a
13822 workaround for bug #75733.
13824 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
13826 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
13828 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
13830 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
13832 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13834 * threadpool.c: if a work item in the thread pool has a callback that
13835 catches a exception, don't propagate it after invoking the callback.
13838 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
13840 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
13842 * class-internals.h (MonoCachedClassInfo): Add some new fields.
13844 * class.c (mono_class_init): Load field info lazily in the AOT case.
13846 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
13848 2005-08-03 Ankit Jain <jankit@novell.com>
13851 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
13852 PInvoke calling convention is 0.
13854 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
13856 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
13857 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
13859 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
13861 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
13862 to handle threads not started by the GC (patch by Michael Meeks
13863 <michael.meeks@novell.com>).
13865 2005-07-31 Kamil Skalski <nazgul@omega.pl>
13867 * reflection.c: Make buffer used in emitting types larger for some
13868 big generic types (patch by Michal Moskal).
13870 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
13872 * mono-debug.c: Fix some (not all) alignment problems.
13874 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13876 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
13877 Invoke mono_image_load_from_data_full passing the refonly
13881 (mono_assembly_open_from_bundle): Add the refonly argument,
13882 in order to pass it to other methods it calls to.
13883 (do_mono_assembly_open): Add the refonly argument, in order
13884 to pass it to other methods it calls to.
13885 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
13886 the refonly parameter to it.
13888 * image.c: Add loaded_images_refonly_hash and
13889 loaded_images_refonly_guid_hash to cache the reflection
13890 only loaded images.
13891 (mono_images_init): Initialize the hash tables used for
13892 caching the reflection only images.
13893 (load_modules): Invoke mono_image_open_full passing the refonly
13894 parameter to load the modules the correct way.
13895 (build_guid_table): Add the refonly argument, to re-build the
13896 correct hash table.
13897 (do_mono_image_open): Added the refonly argument, in order to
13898 define it for the loaded image.
13899 (mono_image_loaded_full): New function, which receives an
13900 additional parameter to look for the image in the refonly or
13901 non-refonly section.
13902 (mono_image_loaded): Updated, using mono_image_loaded_full.
13903 (mono_image_loaded_by_guid_full): The same case that happens
13904 with mono_image_loaded_full.
13905 (mono_image_loaded_by_guid): Likewise.
13906 (register_image): Use the ref_only variable inside MonoImage
13907 to decide in which hash table store the current image.
13908 (mono_image_open_from_data_full): Rename
13909 mono_image_open_from_data to mono_image_open_from_data_full,
13910 adding the refonly argument, to define the ref_only variable
13912 (mono_image_open_from_data): Return
13913 mono_image_open_from_data_full.
13914 (mono_image_open_full): Rename mono_image_open to
13915 mono_image_open_full, receiving the new refonly argument,
13916 to pass it to inner methods.
13917 (mono_pe_file_open): Update this function, to open
13918 a MonoImage as a non-refonly image.
13919 (mono_image_close): Use the refonly variable inside
13920 MonoImage to remove the image from the correct caches.
13922 * image.h: Add the signatures of mono_image_open_full,
13923 mono_image_open_from_data_full, mono_image_loaded_full,
13924 mono_image_loaded_by_guid_full.
13926 * metadata-internals.h: Add the ref_only field to
13929 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13931 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
13932 Fix the last behavior, which used to load the assemblies and
13933 extract MonoReflectionAssemblyName information, instead of
13934 extract it from the metadata tables. Needed for Reflection
13937 2005-07-29 Martin Baulig <martin@ximian.com>
13939 * mono-debug-debugger.c
13940 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
13944 (mono_debug_address_from_il_offset): Check whether we have
13945 debugging support before attempting to take the lock.
13946 (mono_debug_source_location_from_address): Likewise.
13947 (mono_debug_source_location_from_il_offset): Likewise.
13948 (mono_debug_il_offset_from_address): Likewise.
13949 (mono_debug_address_from_il_offset): Likewise.
13951 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
13953 * class.c (mono_class_from_name_case): Add support for dynamic images.
13956 * object.c (mono_class_compute_gc_descriptor): Add a workaround
13959 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
13961 * reflection.c (mono_method_get_object): Fix warning.
13963 2005-07-28 Martin Baulig <martin@ximian.com>
13966 (mono_debug_add_wrapper): Also write the wrapper type.
13968 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
13970 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
13972 * class.c (mono_class_init): Avoid reading nested classes if the AOT
13973 data indicates the class has none.
13975 2005-07-26 Ben Maurer <bmaurer@ximian.com>
13977 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
13978 loader lock with the debugger lock. Prevents deadlocks for beagle.
13980 Beagle can now run on an smp box for a weekend without any
13983 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
13985 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
13986 in a module. Fixes #75629.
13988 2005-07-26 Martin Baulig <martin@ximian.com>
13990 * mono-debug.c (mono_debug_add_wrapper): New static method.
13991 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
13992 interncall or a wrapper.
13994 * mono-debug.h (MonoDebugWrapperData): New public typedef.
13995 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
13996 (MONO_DEBUGGER_VERSION): Bump to 51.
13998 * mono-debug-debugger.c
13999 (mono_debugger_add_type): Removed this empty function.
14000 (mono_debugger_add_method): Likewise.
14002 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
14004 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
14005 before accessing method->slot.
14007 2005-07-21 Jb Evain <jbevain@gmail.com>
14009 * reflection.c (method_encode_clauses/class): Handle filters clauses.
14012 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
14014 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
14017 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
14019 * image.h image.c: Add mono_image_get_guid () API function.
14021 2005-07-19 Ben Maurer <bmaurer@ximian.com>
14023 There were issues when multiple threads tried to load
14024 assemblies. A deadlock was created between assemblies_mutex and
14025 mono_domain_assemblies_lock. This fixes the issue by making the
14026 assembly ref counting be lock free. See bug 75586.
14028 * image.c (mono_image_close): The add ref function here was using
14029 Interlocked operations while the unref was using a mutex and a
14030 --. I don't think this was ever a bug that would be exposed in a
14031 non-pendantic way (ie, by an embedder doing a ref on one thread
14032 and an unref on another), but for the sake of correctness, this is
14035 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
14036 (mono_assembly_load_reference): Call mono_assembly_addref rather
14037 than touching the refcount ourselves.
14038 (mono_assembly_close): Use InterlockedDecrement to unref the
14039 assembly. Don't acquire the lock unless it is actually needed.
14041 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
14043 * class.c (mono_class_layout_fields): Fix calculation of has_references
14046 2005-07-12 Martin Baulig <martin@ximian.com>
14048 Applying a patch from Michal Moskal <malekith@nemerle.org>.
14051 (mono_type_hash): Provide better hashing for generic instances.
14052 (mono_generic_inst_hash): Improve hashing.
14053 (mono_generic_class_hash): Likewise.
14055 * reflection.c (mymono_metadata_type_hash): Improve hashing for
14058 2005-07-12 Martin Baulig <martin@ximian.com>
14060 * reflection.c (mono_reflection_create_runtime_class): Remove the
14061 hack for generic type definitions and non-`Run' assemblies.
14062 (mono_reflection_bind_generic_parameters): Also use
14063 `klass->wastypebuilder' to check for TypeBuilders.
14065 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
14067 * class.c (mono_class_layout_fields): Fix calculation of has_references
14070 * class.c (inflate_generic_class): Fix a leak.
14071 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
14074 2005-07-11 Martin Baulig <martin@ximian.com>
14076 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
14079 2005-07-11 Martin Baulig <martin@ximian.com>
14081 * loader.c (find_method): Also lookup in
14082 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
14084 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14086 * appdomain.c (mono_domain_unload): Don't free the error message
14087 before passing it to mono_get_exception_...
14089 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
14091 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
14093 * threads.c: try to better guess an available RT signal (bug #75387).
14095 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14097 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
14100 2005-07-07 Martin Baulig <martin@ximian.com>
14102 * class.c (mono_type_get_name_full): Return NULL for
14103 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
14106 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
14108 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
14109 exit the appdomain as well being aborted.
14111 * threadpool.c: Create all threadpool threads inside the root appdomain, and
14112 change back to the root domain after calling managed code. This enables
14113 appdomains using threadpools to be unloaded.
14115 2005-07-07 Martin Baulig <martin@ximian.com>
14117 * class-internals.h
14118 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
14119 into `MonoDynamicGenericClass' since we only need it for dynamic
14122 * reflection.c (mono_class_bind_generic_parameters): We don't need
14123 to compute the `parent' here.
14125 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
14127 * culture-info-table.h : regenerated.
14129 2005-07-06 Martin Baulig <martin@ximian.com>
14132 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
14134 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
14136 2005-07-06 Martin Baulig <martin@ximian.com>
14138 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
14139 we're doing a signature-only comparision; fixes #74945.
14141 2005-07-06 Martin Baulig <martin@ximian.com>
14143 * class-internals.h (MonoGenericClass): Moved some things out into
14144 a new `MonoInflatedGenericClass' type.
14145 (MonoInflatedGenericClass): New type; the `klass' of a
14146 `MonoGenericClass' is now computed lazyly in
14147 mono_get_inflated_generic_class().
14149 * class.c (mono_get_inflated_generic_class): New public function.
14150 (mono_class_inflate_generic_method): Removed the unused
14151 `MonoClass *' argument.
14152 (setup_generic_vtable): Don't call mono_get_inflated_method() on
14154 (mono_class_create_generic): Make this static and merge it with
14155 mono_class_create_generic_2(); we're now called automatically from
14156 mono_get_inflated_generic_class().
14158 * loader.c (mono_method_signature): Call
14159 mono_get_inflated_method() here.
14161 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
14163 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
14164 type of fields with RVA.
14166 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
14167 for this pseudo class.
14168 (my_mono_class_from_generic_parameter): Likewise.
14169 (mono_class_init): Allow interfaces to have cctors.
14171 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
14173 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
14174 lazily for AOT methods.
14176 2005-07-05 Martin Baulig <martin@ximian.com>
14178 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
14179 returns FALSE for a successful match, not TRUE.
14181 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
14183 * loader.c (mono_method_get_index): Optimize this a bit.
14185 2005-07-04 Martin Baulig <martin@ximian.com>
14188 (class_compute_field_layout): Move the check for generic type
14189 definitions into mono_class_layout_fields(). Fixes #74684.
14190 (mono_class_from_generic_parameter): Correctly compute
14191 `klass->parent'; fixes #75457.
14193 * reflection.c (register_assembly, register_module): Make sure
14194 `domain->rejobject_hash' is already created.
14196 2005-07-02 Martin Baulig <martin@ximian.com>
14198 * class-internals.h
14199 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
14200 `MonoDynamicGenericClass'.
14202 2005-07-01 Lluis Sanchez <lluis@ximian.com>
14204 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
14205 returned by a field getter is null, since null is a valid value.
14207 2005-07-01 Martin Baulig <martin@ximian.com>
14209 * reflection.c (mono_reflection_generic_class_initialize): Update
14210 the `dgclass->fields [i].parent' to the correct class.
14211 (mono_image_get_fieldref_token): Use the declaring type, not the
14214 2005-07-01 Martin Baulig <martin@ximian.com>
14216 * loader.c (find_method): Also look in the interfaces; fixes #75429.
14218 2005-06-30 Ben Maurer <bmaurer@ximian.com>
14220 * threads.c (thread_cleanup): assert that thread != NULL
14221 (wait_for_tids_or_state_change): We were using the wrong variable
14222 when accessing wait->threads. `i' was always out of the bounds of
14225 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14227 * loader.c: map user32 and kernel32 to libMonoSupportW
14229 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
14231 * appdomain.c (unload_thread_main): Mark this as WINAPI.
14233 2005-06-28 Martin Baulig <martin@ximian.com>
14235 * loader.c (method_from_methodspec): Fix #75334.
14237 2005-06-28 Martin Baulig <martin@ximian.com>
14239 Fix #74953 - Arrays now implement the generic IList<T> interface
14240 on the 2.0 platform.
14242 * class-internals.h (MonoDefaults): Added `generic_array_class'.
14244 * reflection.c (mono_class_bind_generic_parameters): New public
14245 function; similar to mono_reflection_bind_generic_parameters(),
14246 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
14248 * domain.c (mono_init_internal): Try to initialize.
14249 `mono_defaults.generic_array_class' here; this'll only succeed if
14250 we're using the 2.0 corlib.
14253 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
14254 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
14255 (mono_lookup_internal_call): Added support for nested classes.
14258 (mono_get_method_from_token): Set `result->signature->pinvoke' if
14259 we're an interncall and have generic arguments.
14262 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
14263 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
14264 instance of System.Array.InternalArray<T> for arrays, so they
14265 implement the generic IList<T> interface.
14267 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
14269 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
14270 (chastamar@yahoo.com). Fixes #75374.
14272 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
14274 * culture-info-table.h: regenerated.
14276 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14278 * icall.c: handle spaces correctly for base64 strings.
14280 2005-06-26 Ben Maurer <bmaurer@ximian.com>
14282 * *.c: Kill some warnings.
14284 2005-06-23 Duncan Mak <duncan@novell.com>
14286 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
14287 that this builds on Solaris 10 (x86).
14289 2005-06-23 Martin Baulig <martin@ximian.com>
14292 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
14293 generic type definitions.
14295 2005-06-23 Martin Baulig <martin@ximian.com>
14299 * metadata.c (mono_class_get_overrides): Renamed to
14300 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
14301 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
14302 pass it to mono_get_method_full().
14304 2005-06-22 Ben Maurer <bmaurer@ximian.com>
14306 * reflection.c (mono_reflection_create_runtime_class): take the
14307 mono_domain_lock in this method. Prevents deadlocks
14309 2005-06-22 Martin Baulig <martin@ximian.com>
14311 * loader.c (method_from_methodspec): Fix #75330.
14313 2005-06-22 Martin Baulig <martin@ximian.com>
14315 * reflection.c (type_get_qualified_name): Use
14316 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
14317 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
14318 argument; use it if we don't have an assembly name.
14320 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
14322 * object.c: In mono_message_init, set "copy out" flag for in
14323 parameters with the [Out] flag.
14325 2005-06-21 Martin Baulig <martin@ximian.com>
14328 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
14331 2005-06-21 Martin Baulig <martin@ximian.com>
14333 * class.c (mono_class_init): Don't initialize `class->fields' for
14334 generic instances since they're initialized again in
14335 compute_field_layout().
14336 (compute_field_layout): Set the field's `generic_info' here; fix
14339 2005-06-21 Martin Baulig <martin@ximian.com>
14341 * class-internals.h
14342 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
14344 * metadata.c (mono_metadata_generic_method_equal): Also
14345 distinguish the `generic_class'; fixes #75334.
14347 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14351 * domain-internals.h:
14352 * reflection.c: 'domain_assemblies' field is now protected by its own
14353 lock. Don't call into managed code to run the AssemblyLoad event if we
14354 now there are no registered delegates for it.
14356 2005-06-20 Martin Baulig <martin@ximian.com>
14358 * class.c (mono_class_is_assignable_from): Use a custom version of
14359 mono_class_has_parent() to make things work for generic instances;
14362 2005-06-20 Martin Baulig <martin@ximian.com>
14364 * loader.c (method_from_methodspec): Apply a patch from
14365 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
14367 2005-06-20 Martin Baulig <martin@ximian.com>
14369 * class.c (mono_class_init): Reverted Zoltan's last change; it
14372 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
14374 * threads.c (wait_for_tids_or_state_change): Add missing locking.
14376 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14378 * socket-io.c: fix the index in the socket array for writable/error
14379 sockets. Fixes bug #75306.
14381 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
14383 * class.c (mono_class_init): Allow interfaces to have static ctors.
14385 2005-06-17 Martin Baulig <martin@ximian.com>
14387 * loader.c (method_from_methodspec): Use `context->container' when
14388 parsing the `gmethod->inst'.
14390 2005-06-17 Martin Baulig <martin@ximian.com>
14392 * class.c (mono_type_get_name_recurse): Don't add the assembly
14393 name for type arguments.
14395 2005-06-15 Martin Baulig <martin@ximian.com>
14397 * reflection.c (mono_image_get_inflated_method_token): Encode
14398 correct klass; fixes #75260.
14400 2005-06-13 Michal Moskal <malekith@nemerle.org>
14402 * icall.c: Make GetCorrespondingMethod/Constructor take
14403 MonoReflectionMethod method not MonoMethod. Removed
14404 MonoType.GetCorrespondingField, and make
14405 MonoGenericType.GetCorrespondingField take name not
14408 2005-06-13 Michal Moskal <malekith@nemerle.org>
14410 * reflection.c (field_encode_signature, encode_locals):
14411 Make sizes of buffers for types larger (for big generic types).
14412 (create_generic_typespec,
14413 mono_reflection_sighelper_get_signature_local,
14414 mono_reflection_sighelper_get_signature_field):
14415 Add asserts for too small buffers.
14417 2005-06-15 Martin Baulig <martin@ximian.com>
14419 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
14420 if our parent is not a dynamic type.
14422 2005-06-15 Martin Baulig <martin@ximian.com>
14424 * class-internals.h (MonoTypeNameFormat): New enum.
14427 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
14428 (mono_type_get_full_name): Removed.
14429 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
14430 argument instead of the boolean's.
14432 * icall.c (ves_icall_System_MonoType_getFullName):
14433 Added `gboolean assembly_qualified'.
14436 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
14438 * reflection.c (mono_reflection_parse_type): Parse the new type
14441 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14443 * icall.c: no need to convert from utf16 to utf8 and then back again
14444 after the call to GetLogicalDrives.
14446 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14448 * icall.c: frombase64. Fix problems exposed by new tests.
14450 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14452 * icall.c: added internal calls for converting char [] and strings in
14453 base64 into byte [].
14455 2005-06-10 Martin Baulig <martin@ximian.com>
14457 * class.c (mono_class_create_generic_2): Read the nested classes
14458 from the metadata rather than from `gklass->nested_classes' since
14459 `gklass' might not be initialized yet.
14461 2005-06-09 Duncan Mak <duncan@novell.com>
14463 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
14464 all public headers. Fixes #74919.
14466 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
14468 * domain.c: The key for proxy_vtable_hash is now a pointer
14469 array. Added new GHashFunc and GCompareFunc functions for this.
14471 * class.h: The list of interfaces in MonoRemoteClass is known in
14472 advance and can't grow (we create a new MonoRemoteClass if needed),
14473 so now the interface array can be allocated together with
14476 * object.c: Added a new method create_remote_class_key.
14477 Fixed mono_remote_class so it does not depend on
14478 mono_upgrade_remote_class.
14479 Removed extend_interface_array.
14480 Added new method clone_remote_class(), which makes a copy of a remote
14481 class and adds a new interface or class to it.
14482 mono_upgrade_remote_class() now creates a new remote class (or gets
14483 it from the cache) if an vtable upgrade is needed. In this way
14484 we make sure that other objects sharing the same remote class
14485 don't get the new vtable with unwanted interfaces.
14487 * object-internals.h:
14488 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
14490 * marshal.c: Track changes in mono_upgrade_remote_class().
14492 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
14493 * icall.c: Add runtime methods for obtaining members of inflated
14494 class, which were created from supplied non-inflated members. It
14495 is used in internal Get{Method,Constructor,Field} methods in
14498 2005-06-09 Martin Baulig <martin@ximian.com>
14501 (mono_reflection_bind_generic_method_parameters): Fix #75169.
14503 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14504 * reflection.c (mono_image_basic_init): Define
14505 Version in MonoDynamicAssembly.
14507 2005-06-08 Martin Baulig <martin@ximian.com>
14512 (mono_method_signature_full): New public method; takes a
14513 `MonoGenericContext *'.
14514 (find_method): Use mono_method_signature_full() and pass the
14515 klass'es context to it.
14517 * class.c (mono_class_is_inflated_method): Use
14518 mono_method_signature_full() and pass the context to it.
14520 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
14522 * object.c: add proper locking in mono_remote_class_vtable(),
14523 fixes possible memory corruption.
14525 2005-06-08 Michael Meeks <michael.meeks@novell.com>
14527 * marshal.c (mono_remoting_marshal_init): set
14528 initialized after initialization.
14530 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
14532 * locales.c : hush.
14534 2005-06-06 Michael Meeks <michael.meeks@novell.com>
14536 * object.c (extend_interface_array): fix really silly
14537 memory corrupting / comparison bug.
14539 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14541 * reflection.c: Functions added to support the creation
14542 of CustomAttributeData, which includes Attribute data
14543 used by ReflectionOnly methods.
14545 * reflection.h: mono_reflection_get_custom_attrs_data and
14546 mono_custom_attrs_data_construct added (functions exposed).
14548 * icall.c: Added mono_reflection_get_custom_attrs_data
14551 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
14553 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
14556 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
14558 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
14560 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
14561 dynamic DllImportAttribute.
14563 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
14564 dynamic DllImportAttribute.
14566 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
14569 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14571 * threads.c: avoid segfault when an unstarted thread is aborted.
14573 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
14575 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
14576 Returns the name and version of the runtime for reporting.
14578 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14580 * appdomain.c: bump corlib version.
14581 * object-internals.h: new field in MonoReflectionAssembly.
14583 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14585 * object-internals.h: Carlos forgot to add this field.
14587 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14589 * icall.c: Added create_version to create instances
14590 of Version of MonoReflectionAssemblyName. This change helps
14591 the AssemblyName tests to keep running fine.
14593 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
14595 * object.c (mono_method_return_message_restore): A somehow less
14596 intrusive fix for #75138.
14598 2005-06-03 Raja R Harinath <rharinath@novell.com>
14600 * object.c (mono_method_return_message_restore): Fix computation
14601 of expected number of out args.
14603 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
14605 * reflection.c (mono_image_get_method_info): Fix the case when the
14608 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
14610 * object.c: Added missing null check in
14611 mono_method_return_message_restore.
14613 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
14615 * reflection.c (mono_image_get_method_info): Handle the case when
14618 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
14620 * object.c: When creating the vtable for a proxy, take into account
14621 all inherited interfaces, not only the ones registered in
14622 iclass->interfaces. This fixs bug #74996.
14623 Also, in mono_method_return_message_restore, verify that the array
14624 of out args has the expected lengh.
14626 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14628 * socket-io.c: update the timeout in Poll when the call is interrupte.
14630 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14632 * socket-io.c: support abort/suspend in Select_internal after last
14635 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14637 * threadpool.c: remove warning.
14639 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14642 * socket-io.[ch]: Select_internal uses poll() now when available, thus
14643 removing the 1024 limit from select(). Runtime part of the fix for
14646 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14648 * socket-io.c: when resolving the addresses for the same
14649 host returned by gethostname(), get the local IPs from the interface
14650 list. Loopback addresses are discarded if the are interfaces up with
14651 non-loopback ones. Fixes bug #63265.
14653 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
14655 * appdomain.c, verify.c, object-internals.h, reflection.c:
14656 bumped corlib number to 36, and added new extra_flags field
14657 to ReflectionMethodBuilder and friends. Fixes #75060.
14659 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
14661 * gc.c: register a new weak link only if the object is non-null
14664 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
14666 * culture-info.h : short time pattern too.
14668 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
14670 * culture-info.h : expand long time pattern string length.
14672 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
14674 * culture-info-table.h : update (more French date format; #72788).
14676 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
14678 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
14679 the method is static. Fixes #75029.
14681 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
14683 * reflection.c: Update the table_idx field of method builders after
14684 saving the module, since it can change. This is a workaround for
14687 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
14689 * culture-info-table.h : update (additional French date format).
14691 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
14693 * icall.c (ves_icall_type_Equals): Revert last change.
14695 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
14697 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
14699 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
14701 * class-internals.h: Added executioncontext_class field to
14702 MonoDefaults structure.
14703 * domain.c: Cache System.Threading.ExecutionContext class in
14705 * object.c: Capture the ExecutionContext for asynchroneous calls in
14706 mono_async_result_new.
14707 * object-internals.h: Added execution_context and original_context
14708 fields to MonoAsyncResult. Added execution_context to MonoThread.
14709 * security-manager.c|.h: Added mono_get_context_capture_method to
14710 return the capture method (if required by the security manager or by
14711 the framework version used).
14712 * threadpool.c: Apply capture (if present) ExecutionContext in
14713 mono_async_invoke and revert to original context after it completes.
14715 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
14717 * culture-info-table.h : updated (real hacky solution for zh-CHT).
14719 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
14721 * culture-info-table.h : zh-CHT related workaround.
14723 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
14725 * marshal.c (emit_marshal_custom): Add some error checking and call the
14726 methods in the ICustomMarshaler interface. Fixes #74875.
14728 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
14729 native->managed wrappers.
14731 2005-05-12 Martin Baulig <martin@ximian.com>
14733 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
14734 here and use the loader lock.
14736 * mono-debug.c: Properly lock when the debugger is not attached.
14737 (mono_debug_init): Release the initial lock if we're not running
14740 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
14742 * marshal.c (emit_marshal_custom): Pass through NULL values without
14743 calling the custom marshalling routines.
14745 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
14746 conversion in structures. Fixes #74882.
14748 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
14750 * culture-info-table.h : zh-* cultures were missing.
14752 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
14754 * threads.c: Added a new event background_change_event which is signaled
14755 when a thread changes its background mode.
14756 Moved here several checks previously done in managed code. The checks
14757 require the thread lock, and using the thread lock in managed code
14758 can result in deadlocks.
14759 Merged Start_internal and Thread_internal into a single method. Now
14760 Thread_internal does all work of creating and starting a thread.
14761 Added icalls for setting and getting the state of the object. Moved from
14762 managed code to avoid locking there.
14763 Added wait_for_tids_or_state_change() which is called instad of
14764 wait_for_tids when waiting for non-backround threads to end. This method
14765 will return if one of the threads ends or the background_change_event
14767 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
14768 the background mode. This method signals the background_change_event
14771 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
14772 removed Start_internal.
14774 2005-05-11 Martin Baulig <martin@ximian.com>
14776 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
14777 to order of some fields to get proper alignment on 64-bit machines.
14779 2005-05-11 Martin Baulig <martin@ximian.com>
14781 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
14782 changes as they're broken and completely fuck up the debugger.
14784 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
14786 2005-05-10 Martin Baulig <martin@ximian.com>
14788 * reflection.c (mono_reflection_generic_class_initialize): Don't
14789 call mono_class_setup_parent() here.
14791 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14793 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
14794 send/receive timeout use an integer in milliseconds. We were using a
14797 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14800 (internal_get_cultures): reserve the first slot of the array for the
14801 InvariantCulture, which will be filled in managed code.
14803 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
14805 * reflection.c (mono_image_fill_module_table): Initialize the
14806 GENERATION field as well.
14808 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14810 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
14811 Monitor.Enter on the object.
14813 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
14815 * threads.c: Enable the wait for running threads when exiting.
14816 * icall.c: Suspend all threads before exiting.
14818 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
14820 * assembly.c (mono_assembly_load_reference): Fix warning.
14822 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14824 * threadpool.c: changed the default number of threads per cpu. From now
14825 on, the default will be 20 + (5 * number of cpus) instead of 50.
14827 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
14829 * loader.c (mono_method_get_signature_full): Add locking here.
14831 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
14833 * appdomain.c: Moved methods for parsing and freeing assembly
14834 names to assembly.c.
14835 * assembly.c, domain-internals.h: Created public methods for parsing
14836 assembly names. Fixed mono_assembly_load_with_partial_name:
14837 it now finds the best match, taking into account the version,
14838 token and culture specified in the partial name. Also return
14839 the latest version if no version information is specified.
14841 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
14843 * threadpool.c: replace check for SocketAsyncCall class.
14845 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14847 * threadpool-internals.h:
14848 * Makefile.am: added threadpool-internals.h
14850 * threadpool.c: call mono_unhandled_exception on exceptions not handled
14851 that happen in threadpool threads (tested on MS).
14852 (mono_thread_pool_remove_socket): new function that dispatch any pending
14853 AIO call on a socket that is closing. By now only epoll really needs it,
14854 as select/poll wake up when the socket closes.
14857 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
14859 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
14861 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
14863 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
14865 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
14867 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
14869 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
14870 has an abort request, convert it into a suspend request.
14872 2005-04-30 Ben Maurer <bmaurer@ximian.com>
14874 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
14875 warning for the usage of `UnmanagedFunctionPointerAttribute' which
14876 is not supported yet.
14878 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14880 * image.c: register assemblies loaded from data (bundles) in the loaded
14881 assemblies hash. Fixes bug #74772.
14883 2005-04-29 Martin Baulig <martin@ximian.com>
14885 * class.c (mono_type_get_name_recurse): Update to the new naming
14886 schema from the latest .NET 2.x beta2.
14887 (mono_class_setup_vtable_general): If we're a generic instance,
14888 copy the vtable from our generic type definition and inflate all
14891 * loader.c (find_method): Update to the new naming schema from the
14892 latest .NET 2.x beta2.
14894 2005-04-29 Raja R Harinath <harinath@gmail.com>
14896 * class.c (mono_class_init): Add a mono_loader_unlock to the
14899 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
14901 * icall.c (ves_icall_System_Environment_Exit): Remove the
14902 suspend_all_other_threads () call for the time being, since it can hang.
14904 * threads.c (mono_thread_manage): Similarly, disable the waiting for
14905 the background threads to exit, since it can also hang.
14907 * class.c (mono_class_init): Applied patch from Ankit Jain
14908 (radical@gmail.com). Avoid pending init errors when a field refers
14909 to a nested class using a typeref. Fixes #74734.
14911 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
14912 this for dynamic modules.
14914 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14916 * threads.c: don't wait for threads that are in the process of aborting
14917 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
14918 and waiting for background threads to finish. This makes xsp and
14919 mod-mono-server exit without random length delays and/or hangs.
14921 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14923 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
14925 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
14927 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
14928 dynamic types to prevent infinite loops. Fixes #74727.
14930 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
14931 ..._is_assignable_to.
14933 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
14935 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
14937 2005-04-25 Martin Baulig <martin@ximian.com>
14939 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
14942 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
14944 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
14946 * reflection.c (build_compressed_metadata): Set metadata header
14949 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
14951 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
14952 number into an integral and a decimal part. Fixes #70473.
14954 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
14956 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
14958 * culture-info-table.h : reflected the latest locale-builder output.
14960 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14962 * threadpool.c: check for SuspendRequested too when deciding if
14963 mono_thread_interruption_checkpoint should be called.
14965 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14967 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
14968 * threads.c: remove interruption_mutex and use Interlocked instead. When
14969 suspending all the threads, wait for all the suspended events at once.
14970 If we're shutting down and get an APC that is going to be queued,
14971 call mono_thread_execute_interruption immediately, as the thread might
14972 be sleeping on a pthread condition or mutex.
14974 * icall.c: call mono_runtime_set_shutting_down before suspending the
14977 Fixes bug #74693. And now xsp is happier when exiting.
14979 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
14981 * loader.c (mono_stack_walk): Fix #74690.
14983 2005-04-22 Martin Baulig <martin@ximian.com>
14985 * mono-debug.h (MonoDebugMethodJitInfo): Added
14986 `MonoDebugMethodJitInfo *jit'.
14988 * mono-debug.c (mono_debug_read_method): Cache the
14989 MonoDebugMethodJitInfo in `address->jit'.
14990 (mono_debug_free_method_jit_info): New public method.
14992 2005-04-22 Martin Baulig <martin@ximian.com>
14994 * class.c (mono_class_is_assignable_from): Disallow
14995 type parameter -> interface.
14997 2005-04-21 Dick Porter <dick@ximian.com>
14999 * threads.c (mono_thread_create): Turn an assertion into an error.
15001 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
15003 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
15005 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
15006 Fix some gcc 4.0 warnings.
15008 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
15010 * file-io.c: fix alt dir separator char on unix systems
15011 and cleanup (fixes bug #71214).
15013 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
15015 * marshal.c: Use CALLVIRT instead of CALL when dispatching
15016 a call to a remote domain, since the method may be an
15017 interface method in the client domain. This fixes bug #74192.
15019 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15021 * threadpool.c: recv/send are now performed before going back to managed
15022 code to save one transition.
15024 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15026 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
15028 * metadata/threadpool.c: removed hack to workaround the bug above.
15032 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
15034 * reflection.c reflection.h: Fix handling of parameter defaults in
15035 dynamic methods. Also fixes handling of parameter attributes.
15038 * mono-debug.c (mono_debug_close_image): Fix warning.
15040 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15042 * socket-io.h: replaced old unused field with new 'blocking'.
15043 * threadpool.c: restore socket blocking state on windows(tm).
15045 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
15047 * icall.c: don't return the codebase in the AssemblyName[] returned by
15048 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
15049 * object-internals.h: Removed FIXME (fields were presents) and fixed
15050 versioncompat declaration.
15052 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15054 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
15055 not closed, so don't cleanup when it happens.
15057 2005-04-13 Chris Toshok <toshok@ximian.com>
15059 * mono-debug-debugger.h: change prototype for
15060 mono_debugger_lookup_type.
15062 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
15063 this function, although it should probably be named
15064 mono_debugger_init_type.
15066 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15068 * threadpool.c: fix non-AIO case.
15070 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
15072 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
15073 the built-in profiler to measure just JIT compilation times.
15075 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15077 * threadpool.c: the epollfd might be closed by another thread at
15078 any time, so ignore EBADF at treat it as a "we're closing" sign.
15080 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15082 * threadpool.c: release the semaphores with a count equals to the number
15083 of working threads in both IO and regular pools. Fixed typo that messed
15084 up the count of IO pool threads. Don't initialize the pipe handles if
15087 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15089 * threadpool.c: some systems don't like a NULL when deleting the socket
15092 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15094 * threadpool.c: fix semaphore allocation.
15096 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15098 * threadpool.c: added epoll() based implementation for asynchronous IO
15099 that is used instead of the default poll() when available.
15100 It can be disabled by setting MONO_DISABLE_AIO.
15102 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15104 * threadpool.c: windows needs 'closesocket' and instead of returning
15105 0 when the stream is closed while in select, it returns -1. Fixes bug
15108 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
15110 * class.c (class_compute_field_layout): Fix the regression caused by
15113 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15115 * threadpool.c: separate pool for socket async. IO.
15116 * threadpool.h: mono_max_worker_threads is not a global any more.
15118 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
15120 * class.c (class_compute_field_layout): Fix #74549.
15122 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15124 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
15125 use 2 connected sockets instead.
15127 2005-04-08 Miguel de Icaza <miguel@novell.com>
15129 * mono-config.c: Add new entry point for mkbundle
15130 mono_config_parse_memory.
15132 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15134 * threadpool.c: removed another unused function.
15136 2005-04-08 Ankit Jain <radical@corewars.org>
15138 * reflection.c (get_default_param_value_blobs): Add 'types'
15139 parameter to get the types encoded in the constant table.
15140 (mono_param_get_objects): Use the type from the constant table,
15141 not the type of the parameter, when creating default values.
15142 Handle null default values correctly.
15144 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15151 * socket-io.c: removed dead code for async IO.
15153 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15155 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
15157 * threadpool.c: intercept socket async. calls and pass them to a thread
15158 that is polling and dispatching the job items to the threadpool as
15159 socket become ready. Fixes bugs #71217, #71933.
15161 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
15162 between char and short/ushort arrays.
15164 * socket-io.c: remove dead code.
15166 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
15169 icall.c : removed InternalToUpper_Comp() and
15170 InternalToLower_Comp().
15172 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
15174 * char-conversions.h : The tables were incorrectly generated. Should
15175 be generated against invariant culture.
15177 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
15179 * object.c (mono_runtime_invoke_array): Fix return value when
15180 passing pre-created valuetype objects to ctors.
15182 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
15183 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
15186 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
15188 * domain.c: removed g_assert for runtimesecurityframe_class. This is
15189 only used with --security and hides the wrong corlib version error.
15191 2005-03-30 Joshua Tauberer <tauberer@for.net>
15193 * class.c: Changed mono_class_name_from_token so that types
15194 outside of a namespace don't have an initial period. Improved
15195 the g_warning message used in _mono_class_get when loading
15197 * assembly.c: In mono_assembly_load_reference, when an assembly
15198 can't be found, "No such file or directory" is misleading and
15199 unhelpful because a few paths were checked for the presence of
15200 the assembly. When that happens (ENOENT), display a nicer
15201 message indicating the directories that were searched. In all
15202 cases, the warning is made easier to read for non-hackers.
15204 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
15206 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
15208 * appdomain.h|domain.c: Removed inline from functions.
15209 * appdomain.c: Reduced warnings when compiling on windows.
15210 * icall.c: Fixed output_debug declaration to gunichar2*.
15211 * mono-config.c: Reduced warnings when compiling on windows.
15212 * rand.c: Added missing "windows.h". Added missing return value.
15213 * rawbuffer.c: Added missing winsock2.h for windows.
15214 * sysmath.h: Added mono-compiler.h header to allow/ease
15215 compilation with non-GCC compilers.
15216 * threads.c: Fixed declarations to compile with VS.NET C compiler.
15217 Removed cast warnings.
15219 Adapted from the work of J Lothian (for VC6).
15221 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
15223 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
15226 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
15228 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
15231 2005-03-27 Raja R Harinath <harinath@gmail.com>
15233 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
15234 has to be in $(exec_prefix). $(prefix) is for arch-independent
15235 stuff, and it would probably use $(prefix)/share rather than
15238 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15240 * console-io.c: added 2 includes that might be missing.
15242 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
15244 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
15247 * reflection.c (create_custom_attr): Allocate the params array using
15248 alloca so it gets GC tracking.
15250 2005-03-23 Chris Toshok <toshok@ximian.com>
15252 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
15255 2005-03-24 Raja R Harinath <rharinath@novell.com>
15257 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
15258 changes to pick up any changes in prefix, etc.
15260 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
15262 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
15264 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
15265 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
15267 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
15269 * class-internals.h object-internals.h class.c reflection.c: Extend the
15270 mono_lookup_dynamic_token () function to return the class of the
15273 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
15274 well. Fixes #73848.
15276 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
15278 * security-manager.c: Skip inheritance checks for intra-corlib
15279 class inheritance and method overrides. This skips a lot of checks
15280 and (anyway) permissions cannot work until corlib is loaded.
15282 2005-03-23 Martin Baulig <martin@ximian.com>
15284 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
15285 MONO_TYPE_GENERICINST.
15287 2005-03-23 Martin Baulig <martin@ximian.com>
15289 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
15291 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15293 * class.c: added locking comments to some functions.
15294 Cache the interface offsets arrays (saves about 20 KB
15295 of runtime memory in a typical app).
15296 Reduce the time overhead in mono_class_setup_supertypes ().
15298 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
15300 * icall.c: speedup and fix leaks in GetMethodsByName and
15301 GetPropertiesByName.
15303 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
15305 * reflection.c: some locking fixes.
15307 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
15309 * metadata.c: added missing break in case statement.
15311 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
15313 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
15314 typedbyref return values. Fixes #73941.
15316 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
15318 * security-manager.c|h: Added demandunmanaged method and
15319 suppressunmanagedcodesecurity class to MonoSecurityManager.
15320 Renamed aptc class to allowpartiallytrustedcallers.
15322 2005-03-17 Martin Baulig <martin@ximian.com>
15324 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
15326 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15328 * file-io.c: disabled file async. IO using aio_*. It uses the
15329 threadpool now. Workaround for bug #73718.
15331 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
15333 * assembly.h, mono-config.c: added code to deal with bundled configs
15334 for bundled assemblies.
15336 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
15338 * *.c, private.h: cleanup, removing old private.h header file.
15340 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
15342 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
15343 and throw_on_unmappable_char attributes.
15345 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
15347 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
15348 _ProcessName_internal.
15350 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
15352 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
15355 * icall.c threads.c threads-types.h: Remove slothash icalls as they
15356 are no longer used.
15358 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
15360 * object.c (compute_class_bitmap): Add support for generics. Fixes
15363 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
15365 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
15367 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15369 * filewatcher.c: commented out the code for windows watcher, as we don't
15370 use it (we use the managed implementation instead).
15372 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
15374 * object-internals.h (MonoThread): Remove 'unused1' field.
15376 * appdomain.c: Bump corlib version.
15378 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
15380 * reflection.c (mono_reflection_create_runtime_class): Remove the
15381 AssemblyBuilder.Save optimization since it causes too many problems.
15383 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
15385 * exception.c|h: Added mono_get_exception_reflection_type_load to
15386 create a ReflectionTypeLoadException object.
15387 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
15388 to return NULL is a InheritanceDemand fails during reflection. Updated
15389 ves_icall_System_Reflection_Assembly_GetTypes to throw a
15390 ReflectionTypeLoadException if an InheritanceDemand fails during
15391 reflection. Added icall mapping for GetLinkDemandSecurity.
15392 * security-manager.c|h: Added ves_icall_System_Security_
15393 SecurityManager_GetLinkDemandSecurity internal call to return the
15394 class and methods permissions set for a LinkDemand. Removed unused
15395 fields in MonoSecurityManager.
15397 2005-03-10 Martin Baulig <martin@ximian.com>
15399 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
15400 it's a generic instance.
15402 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
15404 * reflection.c (mono_get_object_from_blob): Applied patch from
15405 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
15407 * class.c (mono_class_is_assignable_from): Another try at fixing
15408 #73469 without breaking anything.
15410 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
15412 * class.c: (mono_class_is_assignable_from): Revert the last changes
15413 since they don't work with generics.
15415 * class.c (mono_class_is_assignable_from): Fix build bustage.
15417 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
15418 the managed IsAssignableFrom method. Fixes #73469.
15420 * reflection.c (mono_reflection_call_is_assignable_from): New helper
15423 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
15425 * object.c (mono_load_remote_field_new): Fix returning uninitialized
15426 memory when the remoting callback does not sets the out arguments.
15429 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
15432 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
15434 * object-internals.h (MonoStackFrame): Sync with managed object layout.
15436 * appdomain.c: Bump corlib version.
15438 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
15440 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
15443 * threads.c (mono_thread_attach): Detect threads which are not started
15444 by the GC pthread wrappers.
15446 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
15448 * icall.c: Added new icall for RNG.
15449 * rand.c|h: Added new icall to open the RNG. This allows to share a
15450 single handle on Linux to access /dev/urandom and fix #73183.
15452 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
15454 * object.c: setting the new vtable in a transparent proxy object must
15455 not change the GC descriptor.
15457 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15459 * object.c: fixed compilation without GCJ support.
15460 * reflection.c: for runtime-created types ensure klass->has_references
15461 is correct (bug #73215).
15463 2005-03-02 Martin Baulig <martin@ximian.com>
15465 * class.c (mono_class_is_assignable_from): Make this work if
15466 `oklass' is a generic instance; fixes #72831.
15468 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
15470 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
15473 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
15475 * marshal.c: Reorganize native->managed marshalling code to also use
15476 the emit_marshal_... functions.
15478 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
15480 * object.c: typed allocs have issues with bitmap sizes > 30,
15481 so check for max_set >= 30.
15483 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
15485 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
15486 managed code. Fixes #73012.
15488 * metadata.h (MonoMarshalSpec): Add elem_mult field.
15490 * metadata.c reflection.c: Load/Emit elem_mult as well.
15492 * metadata.h (MonoMarshalSpec): Add comment.
15494 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
15496 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
15497 num_elem to -1 if not given.
15499 * object-internals.h (MonoReflectionMarshal): Add has_size field.
15501 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
15504 2005-03-01 Marek Safar <marek.safar@seznam.cz>
15506 * null-gc.c (mono_gc_free_fixed): Was not compilable.
15508 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
15510 * reflection.c (encode_marshal_blob): Encode param_num field as well.
15512 * object-internals.h (MonoReflectionMarshal): Add param_num field.
15514 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
15516 * object.c: generalized the reference bitmap creation
15517 and added hooks for the new GC.
15518 * class-internals.c: removed the gc_bitmap field from MonoClass.
15520 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15522 * domain.c: help the compiler to produce better code
15523 in mono_jit_info_table_find ().
15525 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
15527 * object.c: make all allocations look typed.
15529 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15531 * socket-io.c: load Mono.Posix if it's not loaded already
15534 2005-02-24 Martin Baulig <martin@ximian.com>
15536 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
15537 * reflection.c (dup_type): Likewise.
15539 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
15541 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
15542 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
15544 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15546 * domain.c, threads.c, object-internals.h: make the critical thread
15547 local vars use the fast access mode (even when we're compiled in
15548 a lib). Provide accessors to be used by the jit during codegen.
15550 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
15552 * appdomain.c: Changed hook functios behavior to include
15553 support for the reflection only assemblies. Some icalls were changed
15554 to support the mentioned assemblies too. Signatures of static methods
15555 try_assembly_resolve and real_load now have an additional parameter:
15558 * assembly.c: General changes to mono_assembly_ methods to support
15559 reflection only api. Functions mono_assembly_open, mono_assembly_load,
15560 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
15561 suffix, to support an additional gbool parameter to specify whether
15562 the assembli is reflection only or not. Created some new hook functions
15563 to add support for reflection only assemblies. Signatures of static
15564 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
15565 have now an additional parameter: refonly.
15567 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
15568 indicating whether the assembly is reflection only or not.
15570 * exception.c: Add mono_get_exception_invalid_operation.
15572 * icall.c: Throw an InvalidOperationException when trying to invoke
15573 a property/method/event, or trying to set/get the value of a field.
15574 Also add an icall to retrieve the ref_only flag to the
15575 MonoReflectionAssembly.
15577 2005-02-23 Chris Toshok <toshok@ximian.com>
15579 Part of fix for #72827.
15580 * mono-debug.c (mono_debug_add_method): add lexical block data to
15581 the info we write. Kind of a hack at the moment - we copy the
15582 lexical block info from the MonoDebugMethodInfo to the
15583 MonoDebugMethodJitInfo here, before writing it.
15584 (mono_debug_read_method): read the lexical block info.
15586 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
15588 * debug-mono-symfile.h: add lexical block support.
15590 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
15593 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
15595 * loader.c (mono_lookup_pinvoke_call): Fix warning.
15597 * object.c (mono_runtime_free_method): Call mono_free_method () and
15598 put the TODOs there.
15600 * loader.c (mono_free_method): Free up most memory allocated for
15603 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15605 * reflection.c: properly flag a Type argument to a
15606 named custom attr value (bug #72248).
15608 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15610 * reflection.c: reduce code duplication in named custom
15611 attribute encoding.
15613 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
15615 * reflection.c: properly encode custom attrs of type object
15618 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
15620 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
15622 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
15624 * socket-io.c: load System.dll if it's not loaded already
15625 (bug #72850 and #70477).
15627 2005-02-21 Martin Baulig <martin@ximian.com>
15629 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
15632 2005-02-21 Martin Baulig <martin@ximian.com>
15634 * reflection.c (mono_image_build_metadata): We also need to
15635 "fixup" the MethodImpl table after we computed the final method
15636 indices. Call fixup_methodimpl() to do that.
15637 (fixup_methodimpl): New private method.
15639 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
15641 * assembly.c: special case mscorlib.dll (bug#72536),
15642 patch from Carlos Alberto Cortez.
15644 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
15646 * threads-types.h threads.c: Fix build bustage.
15648 * threads.c: Use a union for long<->double conversions.
15650 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
15651 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
15653 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
15654 containing the checkpoint call with NOT_TAKEN.
15656 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
15657 checkpoint before pushing the arguments, so they won't have to be
15660 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15662 * domain.c, assembly.c, domain-internals.h: make some data
15663 const and relocation-free.
15665 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
15667 * object.c, appdomain.c, class-internals.h: introduce the
15668 MonoClassRuntimeInfo structure to hold the info needed to
15669 use a class at runtime. Made mono_class_vtable() lock-free
15670 for all the appdomains.
15672 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
15674 * metadata-internals.h, image.c: introduce a per-image mempool to
15675 be used for memory that has the same lifetime as the image.
15677 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
15679 * domain.c: In mono_init_internal(), instead of selecting the first
15680 runtime version supported by an executable, get a list of all
15681 supported versions and select the one for which an mscorlib exists
15682 (since even if the runtime supports a given version, it doesn't mean
15683 that the framework for that version is installed).
15684 Modified get_runtimes_from_exe to support this behavior.
15685 In supported_runtimes, added information about additional system
15688 * assembly.c: Added support for more than one system assembly version
15689 per runtime version. Updated the assembly list.
15690 In mono_assembly_remap_version, removed the initial version check,
15691 since we don't know to which version we need to compare until we
15692 get the version set on which the assembly is based.
15693 Moved the code for loading corlib into the new method
15694 mono_assembly_load_corlib(), so it can be used by the initialization
15697 * domain-internals.h: Updated data structures and added declaration
15698 for mono_assembly_load_corlib.
15700 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
15702 * reflection.c (resolve_object): Fix the creation of the signature in
15703 the SignatureHelper case.
15705 * assembly.c (mono_assembly_remap_version): Fix binary search.
15707 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
15709 * class.c: Added inheritance check when a method is overloaded (from a
15710 virtual method or when implementing an interface) and when a class is
15711 inherited. Added functions to set a failure for a class and to
15712 retreive the exception from a failure.
15713 * class-internals.h: Added fields to MonoClass to keep the exception
15714 information status for inheritance (or other exceptions) to be thrown
15715 later (i.e. not at load time).
15716 * object.c: Throw the inheritance SecurityException when a type is to
15717 be created with either class or method inheritance violations.
15718 * reflection.c|h: Fix when getting declsec from a class. Removed
15719 unrequired code for class. Improved sanity in parameter naming.
15720 * security-manager.c|h: Added functions to check for class and method
15723 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
15725 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
15726 and has_finalize in dynamic types as well.
15728 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
15730 * culture-info-table.h : fixed currency format for en-GB (and so on).
15732 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
15734 * gc.c: ensure the GC handles never have 0 as a value.
15736 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
15738 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
15739 a pointer to a struct to unmanaged code. Fixes #72625.
15741 2005-02-16 Martin Baulig <martin@ximian.com>
15743 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
15745 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
15747 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
15749 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
15751 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
15753 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
15754 UnmanagedFunctionPointerAttribute, use it for determining calling convention
15757 * reflection.c (mono_custom_attrs_get_attr): New helper function.
15759 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
15761 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
15763 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
15764 changes to make the current context a field in MonoThread.
15766 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
15768 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
15771 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
15772 extracted from mono_marshal_get_native_wrapper.
15774 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
15775 to create wrappers around native functions.
15777 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
15778 delegates for arbitrary function pointers. Fixes #71472.
15780 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
15782 * threads.c: cleaned up the code a little.
15784 2005-02-15 Martin Baulig <martin@ximian.com>
15786 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
15789 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
15790 allocate larger chunks if needed.
15792 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
15794 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
15797 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
15799 * domain.c: keep the domains in an array and ensure the domain ids
15800 are kept small, so they can be used as indexes to domain-specific data
15801 with a small memory overhead.
15803 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
15805 * icall.c: Handle byref types in Type icalls. Fixes #72544.
15807 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
15809 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
15811 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
15813 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
15815 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
15818 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
15820 2005-02-12 Ben Maurer <bmaurer@ximian.com>
15822 * domain-internals.h: add the hashtable here.
15824 * class-internals.h: Remove `info' from MonoMethod
15826 * domain.c: Add a new hashtable, jit_trampoline_hash
15828 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
15830 * object.c: don't set the value of static fields
15833 2005-02-11 Martin Baulig <martin@ximian.com>
15835 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
15836 (mono_debug_add_method): Silently ignore the method if it's too big.
15837 (mono_debug_add_type): Likewise.
15839 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
15841 * threads.c, appdomain.c: remove #ifdefs from the code.
15843 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
15845 * metadata-internals.h: Added flags to MonoAssembly to cache the most
15846 common security informations. This allows us to stay in unmanaged code
15847 when doing LinkDemand and it's special cases (except for the first
15848 time for initialization). The flags a very much used with --security.
15849 * reflection.c|h: Added code to get declarative security attributes
15850 for LinkDemand and InheritanceDemand. This required to refactor the
15851 existing code for Demand.
15852 * security-manager.c|h: Added new method fields for the special cases
15855 2005-02-10 Martin Baulig <martin@ximian.com>
15857 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
15858 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
15860 2005-02-10 Martin Baulig <martin@ximian.com>
15862 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
15863 debugging code; this is almost a complete rewrite.
15865 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
15867 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15869 * domain.c, object.h: expose mono_string_equal () and
15870 mono_string_hash ().
15871 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
15872 it's implemented in managed code.
15874 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15876 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
15877 lo leak objects between appdomains.
15879 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
15881 * assembly.c: old compilers compilation fix from
15882 robertj@gmx.net (Robert Jordan).
15884 2005-02-09 Ben Maurer <bmaurer@ximian.com>
15886 * class-internals.h: Little reminder for the future.
15888 * debug-helpers.c: Fix up wrapper_type_names
15890 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
15892 * image.c, metadata-internals.h: when loading an image from a file,
15893 mmap all of it and use the same codepaths as when using a
15894 in-memory image: the code is simpler and we use less memory
15895 (both writable and readonly).
15897 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
15899 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
15900 API to alloc runtime data structures that need to be tracked by the
15901 GC and contain pointers.
15902 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
15903 make the code more readable and eventually use a different GC.
15905 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
15907 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
15910 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
15912 * object.c: In release_type_locks(), don't release the cctor lock
15913 if it has already been released. This fixes a crash in the
15916 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15918 * gc.c, marshal.c, icall.c: register a delegate for finalization
15919 only when the native function pointer has been allocated for it.
15921 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
15923 * object.c: cleaned up some code, allocate objects that are
15924 pointer free with the atomic malloc variant. Allocate memory
15925 for static data from the mempool if it's pointer-free.
15926 Allocate the bounds array at the end of the array data, when needed.
15927 * object-internals.h, object.h: move a private function in a private
15929 * class.c: handle missing case in tracking references in fields.
15931 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
15933 * class.c, class-internals.h: keep track if a type has
15934 reference fields in either the instance or static fields.
15936 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
15938 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
15939 and renamed to MonoRuntimeInfo. Added fields to store the expected
15940 framework assembly version. Changed mono_get_framework_version and
15941 mono_get_runtime_version for a single mono_get_runtime_info method.
15943 * assembly.c: Added method to remap system assembly versions to the
15944 current executing runtime version. Removed old mapping code.
15945 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
15947 * icall.c, reflection.c: Track api changes.
15949 2005-02-06 Miguel de Icaza <miguel@novell.com>
15951 * loader.c (method_from_memberref): Improve error reporting,
15952 produce the class name instead of the typeref/typedef index.
15954 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
15956 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
15958 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
15960 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
15961 stdcall and charset name mangling. Reorganize the code and add
15962 some tracing stuff.
15964 2005-02-05 Ben Maurer <bmaurer@ximian.com>
15966 * monodiet.c: More iters!
15968 * marshal.c: Iter usage.
15970 * icall.c: Iter usage.
15972 * object.c: Use iters.
15974 * debug-helpers.c: More iters
15976 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
15978 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
15981 2005-02-05 Ben Maurer <bmaurer@ximian.com>
15983 * mono-debug-debugger.c: use iters
15985 * class.c, class-internals.h: mono_class_setup_events is static
15988 * All callers: use iters
15990 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
15992 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
15993 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
15995 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
15997 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
15999 * marshal.h: Add prototypes for ldfld/stfld_remote.
16001 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
16002 this is called during startup.
16004 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
16006 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
16007 MonoThreadsSync struct private in monitor.c. Changed the way
16008 MonoThreadsSync is allocated so it's faster and there is no
16009 need to keep track of it with a finalizer and it uses less memory.
16010 This also finally allows us to allocate mono objects as ptrfree when
16011 there are no reference fields.
16013 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
16015 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
16016 disappearing link to the GC interface and use them to simplify
16017 the gchandles code.
16019 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
16021 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
16022 stfld_remote which call mono_load/store_field_new. This allows methods
16023 calling ldfld/stfld wrappers to be AOTed.
16025 * console-io.c: Include sys/filio.h under solaris.
16027 * console-io.c: Include curses.h if needed correctly.
16029 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
16031 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
16032 method->klass as well.
16034 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
16036 * class.c (mono_class_init): Switch on lazy initialization of
16039 * class.c (mono_class_get_finalizer): Handle the case when the
16040 finalizer is inherited.
16042 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16044 * console-io.c: <curses.h> is needed by term.h on solaris.
16046 2005-02-03 Ben Maurer <bmaurer@ximian.com>
16048 * icall.c, class-internals.h, monodiet.c, class.c: Remove
16049 mono_class_setup_properties where possible. Remove this ftn from
16050 the header file, and make it static.
16052 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
16054 * loader.c: Add missing setup_... call.
16056 * class.c: Add missing setup_... calls.
16058 * class.c (mono_class_init): Switch on lazy initialization of
16059 the generic vtable.
16061 * class.c (mono_class_init): Fix generics broken by the recent changes.
16063 * monodiet.c (handle_type): Add missing setup_... calls.
16065 * class.c: Back out garbage in previous patch.
16067 * class.c: Add missing setup_... calls.
16069 * class.c (mono_class_get_method_from_name_flags): Avoid calling
16070 mono_class_setup_methods () if possible.
16072 * class-internals.h (MonoClass): Add 'has_cctor' flag.
16074 * class-internals.h (MonoCachedClassInfo): New structure.
16076 * class.c: Initialize properties and events fields of MonoClass lazily.
16078 * class.c: Add infrastructure for lazily initializing the methods and
16079 vtable fields of MonoClass. Not yet used.
16081 * class.c (mono_class_get_finalizer): New helper function.
16083 * class.c: Add infrastructure for loading some class related data from
16086 * object.c: Add infrastructure for initializing the vtable from data
16089 * gc.c (run_finalize): Use mono_class_get_finalizer ().
16091 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
16092 appropriate initialization function before accessing parts of the
16093 MonoClass structure.
16095 * marshal.c: Fix warnings.
16097 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
16099 * mono-debug-debugger.c (get_exception_message): Use
16100 mono_class_get_method_from_name_flags ().
16102 2005-02-02 Ben Maurer <bmaurer@ximian.com>
16104 * reflection.c, appdomain.c: Replace a few manual searches that
16105 Zoltan missed. (Paolo approved this part of my initial patch).
16107 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
16109 * profiler.c: disable recording statistical events at report time.
16111 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16113 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
16114 to byteswap arrays of enum values, too (bug #72080).
16116 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
16118 * appdomain.c (set_domain_search_path): Allow this to be called if
16119 domain->setup is not yet set.
16121 * loader.c (mono_method_get_index): New helper function.
16123 * loader.c reflection.c: Use mono_method_get_index ().
16125 * class.c (mono_class_get_method_from_name_flags): New helper method.
16127 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
16130 * class.c (mono_class_get_cctor): New helper method.
16132 * string-icalls.c object.c class.c marshal.c reflection.c: Use
16133 mono_class_get_method () to look up methods.
16135 2005-02-01 Miguel de Icaza <miguel@novell.com>
16137 * console-io.c: Fix the build, this should work on Windows.
16139 2005-01-31 Ben Maurer <bmaurer@ximian.com>
16141 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
16142 be set to null to keep things valid
16144 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16146 * icall.c: added Console 2.0 icalls.
16147 * Makefile.am: added console-io.[ch]
16148 * console-io.[ch]: internal calls for Console 2.0 API.
16150 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16152 * class.c: make sure we consider all the interfaces
16153 when calculating max_interface_id (bug found by
16154 Jeroen Frijters running ikvm).
16156 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
16158 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
16159 valuetype fields to null.
16161 * object.c (set_value): Ditto. Fixes #71669.
16163 2005-01-31 Martin Baulig <martin@ximian.com>
16165 * metadata.c (mono_metadata_has_generic_params): New public
16166 function; checks whether something is a generic method.
16168 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16170 * appdomain.c: fix infinite recursion when adding assemblies.
16172 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
16174 * object.c: Fix small typo to return all items for Environment.
16175 GetCommandLineArgs.
16177 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16179 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
16180 reflection.c: more domain and assembly-unload related fixes
16181 and memory leaks plugs.
16183 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
16185 * 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.
16187 2005-01-29 Ben Maurer <bmaurer@ximian.com>
16189 * loader.c (mono_method_signature): Make this method lazy
16190 (mono_get_method_from_token): Don't computate the signature here.
16192 Doing this saves quite a bit of memory. I got 90 kb on starting up
16193 monodoc. It should also save some disk reads on startup.
16195 * *: MonoMethod->signature might be NULL now. You *MUST* use
16196 mono_method_signature.
16198 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
16200 * object.c (mono_runtime_get_main_args): Return an array from the
16201 current domain here. Fixes #71938.
16203 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
16205 * monitor.c: formatting changes to comply with the
16206 mono coding style and remove #ifdefs from the code.
16208 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
16210 * metadata.c, private.h: remove some unneeded data
16211 and use a more compact representation for table schemas.
16213 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16215 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
16216 to get a better distribution in hash tables.
16217 * *.c: use mono_aligned_addr_hash() where appropriate.
16218 * assembly.c: make var static.
16220 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
16222 * domain-internals.h: Put MonoJitInfo on a diet.
16224 * domain.c: Fix a warning.
16226 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16228 * gc.c: rework the gc handles code to reuse handles
16231 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
16233 * domain.c: fixed long standing bug in mono_string_equal() which
16234 was brought to light with the ldstr changes.
16236 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
16238 * reflection.c: Remove warning by adding missing include for marshal.h
16240 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16242 * domain.c, object.c: change the ldstr_table to hold
16243 MonoString* as keys: makes the runtime isinterned lookup
16244 faster and simplifies memory management.
16246 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
16248 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
16249 possible to add imperative security checks before calling the icall.
16250 * reflection.c: Return security attributes on the original MonoMethod
16251 (and not the wrapped one). This fix permissions on icalls.
16253 2005-01-25 Dick Porter <dick@ximian.com>
16255 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
16256 the check for mktime() support actually test the mktime() return
16257 value. "Fixes" bug 71682, though the output is still different to
16260 2005-01-25 Martin Baulig <martin@ximian.com>
16262 * class.c (mono_class_is_assignable_from): Make this work for
16265 2005-01-24 Ben Maurer <bmaurer@ximian.com>
16267 * marshal.c (mono_string_utf8_to_builder)
16268 (mono_string_builder_to_utf16): We might not have ownership of the
16269 string. In thise case, we need to create a new buffer.
16271 * object-internals.h (mono_stringbuilder_capacity): sb->str might
16272 be null, in which case, use the default capacity.
16274 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16276 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
16277 GC events to the profiler.
16279 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
16281 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
16282 if you don't want the GC to run.
16284 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
16286 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
16287 start providing a GC API and keeping different implementations in
16289 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
16291 2005-01-22 Ben Maurer <bmaurer@ximian.com>
16293 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
16294 mmap rather than allocating a huge buffer.
16295 (mono_debug_close_mono_symbol_file): Free the buffer allocated
16298 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
16300 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
16301 and CheckExecutionRights.
16302 * reflection.c|h: Keep the index of the declarative security to be
16303 used, instead of the pointer, when AOT compiler is used. Also add
16304 class initialization when requesting demands.
16305 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
16306 CheckExecutionRights. Both properties are now FALSE by default, and
16307 unmodifiable, unless the --security option is used.
16309 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16311 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
16312 reflection.c: properly refcount images and assemblies, many leaks fixed.
16314 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16316 * threadpool.c: increase the timeout for threads in the thread pool to
16317 10s. Fixes bug #67159.
16319 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
16321 * class-internals.h: Sun's compiler insists on explicit
16322 signed on bit fields to handle then correctly.
16324 2005-01-19 Miguel de Icaza <miguel@ximian.com>
16326 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
16327 Make the size of the array fit only the number of invalid path
16328 chars that we have.
16330 * class.c (_mono_class_get): Improve the error reporting when a
16331 class referenced is not found, to assist debugging.
16333 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
16335 * threads.c: fix off-by-one error.
16336 * domain.c: free data allocated in the domain.
16338 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
16340 * reflection.c (mono_method_body_get_object): Fill out exception info
16343 * object-internals.h: Add MonoReflectionExceptionHandlingClause
16346 2005-01-19 Martin Baulig <martin@ximian.com>
16348 * loader.c (mono_get_method_constrained): Make this work again.
16350 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
16352 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
16353 guint16 to match the managed side.
16355 * reflection.c (mono_reflection_body_get_object): Fill out local
16358 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
16361 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
16362 'local_var_sig_token'.
16364 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
16366 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
16369 * reflection.c (mono_method_body_get_object): Handle abstract and
16372 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
16374 * marshal.c, loader.c, class-internals.h, reflection.c:
16375 store the emthod data for a wrapper in an array instead of a list.
16377 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
16379 * marshal.c: change the code to allocate memory more
16380 conservatively for method wrappers.
16382 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16384 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
16385 fields from MonoClass to the marshal info structure where they belong.
16387 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16389 * class.c, object.c, class-internals.h, marshal.c: rearrange
16390 some fields and tweak some types to lower memory usage.
16392 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
16394 * threads.c (signal_thread_state_change): Handle the case when the
16395 target thread is the current thread.
16397 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
16399 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
16400 emit_ptr_to_object_conv.
16402 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
16403 marshalling. Fixes #71352.
16405 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16407 * metadata.h, blob.h: move table enum to blob.h so it can be included
16409 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
16410 cut the size of MonoImage/MonoDynamicImage.
16412 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
16414 * profiler.c (mono_profiler_install_simple): Fix default arguments.
16416 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
16418 * reflection.c, reflection.h, icall.c: add a function to check
16419 if an attribute type is defined for a metadata object.
16421 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
16423 * object-internals.h: Added some needed fields from StringBuilder class.
16424 * marshal.c: Set the maxCapacity when creating a StringBuilder.
16426 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
16428 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
16429 threads before shutting down the runtime.
16431 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
16433 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
16435 * object-internal.h, threads.c: implement stacksize and
16436 parameterized thread start functionality (requires
16437 matching corlib). Marked broken code for later removal.
16439 2005-01-12 Martin Baulig <martin@ximian.com>
16441 * class-internals.h (MonoGenericClass): Moved the `initialized'
16442 flag to MonoDynamicGenericClass, removed `init_pending'.
16443 (MonoGenericInst): Added `is_reference' flag.
16445 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
16447 * reflection.c (mono_image_create_pefile): Only set the pe_offset
16448 inside the MSDOS header. Fixes #71201.
16450 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
16452 (mono_domain_finalize): Ditto.
16454 2005-01-12 Martin Baulig <martin@ximian.com>
16456 * class.c (mono_get_shared_generic_class): Use the cache for
16457 non-dynamic generic classes.
16459 * class-internals.h (mono_class_create_generic_2): Removed
16460 function prototype, this function is now static inside class.c.
16462 * class.c (mono_class_create_generic_2): Made this static, only
16463 call it from mono_class_init() and mono_class_setup_parent().
16464 (collect_implemented_interfaces_aux): Call mono_class_init() on
16465 the interfaces we collect.
16466 (mono_class_setup_vtable): Call mono_class_init (class->parent).
16468 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
16470 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
16471 it a real thread handle.
16473 * domain-internals.h: Move exvar_offset from MonoJitInfo to
16474 MonoJitExceptionInfo, since each catch clause needs its own variable.
16476 2005-01-11 Dick Porter <dick@ximian.com>
16478 * image.c (mono_pe_file_open): New variant on mono_image_open()
16479 that does not set up the CLI metadata; used for FileVersionInfo so
16480 it can get the data for windows binaries too.
16482 * process.c (process_read_string_block): Don't read off the end of
16483 the StringTable block.
16485 These both fix bug 70766.
16487 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
16489 * gc.c: set some fields to NULL at GC cleanup time.
16490 * threads.c: if we quit the main thread, call exit ().
16492 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
16494 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
16496 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
16498 * threads.h, threads.c, object.c: added accessor and settor for
16499 main_thread. Handle it specially when exiting from it: wait
16500 for other foreground threads to exit.
16502 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
16504 * process.c, verify.c: remove some bloat.
16506 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
16508 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
16509 the calling convention to cdecl under win32.
16511 2005-01-08 Ben Maurer <bmaurer@ximian.com>
16513 * object.c (mono_object_get_size): New function to get the size of
16514 an object instance.
16516 * profiler.c (simple_allocation): Use above.
16518 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
16520 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
16521 ves_icall_System_AppDomain_getRootDomain (as it's not required to
16522 get an appdomain by it's id and we can't assume the root's id is 0).
16523 * domain-internals.h: Change the function prototype to match.
16524 * icall.c: Change the icall table for AppDomain.
16526 2005-01-08 Miguel de Icaza <miguel@ximian.com>
16528 * locales.c (string_invariant_compare_char): Only compute
16529 GUnicodeTypes in the case where we need them. Test for ordinality
16530 first and return if so.
16535 * FIXME: here we must use the information from c1type and c2type
16536 * to find out the proper collation, even on the InvariantCulture, the
16537 * sorting is not done by computing the unicode values, but their
16538 * actual sort order.
16541 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16543 * loader.c: for P/Invoke methods, allow the "Internal" shared
16544 library name to refer to the calling process symbol namespace.
16546 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
16548 * Makefile.am: Add the security manager to the build.
16549 * security-manager.c|h: New. Initialization of the security manager.
16551 2005-01-07 Dick Porter <dick@ximian.com>
16554 * monitor.c: Update thread state during Monitor and WaitHandle
16555 waits. Fixes bug 71031.
16557 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
16559 * reflection.c (property_encode_signature): Correctly handle when the
16560 property has no methods.
16562 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
16564 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
16566 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
16567 fields from mb, not rmb. Fixes #71017.
16569 * marshal.c (emit_ptr_to_str_conv): Add support for
16570 ByValTStr -> string conversion. Fixes #71015.
16572 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
16574 * mempool.c (mono_mempool_contains_addr): New helper function.
16576 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
16578 * metadata.c (mono_metadata_compute_size): Fix size calculation of
16579 HasSematics encoded fields.
16581 * metadata.c (mono_type_to_unmanaged): Improve error message for
16582 invalid string marshalling.
16584 * metadata.c: Fix warnings.
16586 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16588 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
16591 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
16593 * domain.c object.c domain-internals.h: Revert part of r38077 since the
16594 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
16597 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
16599 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
16600 so methods containing these can be AOTed.
16602 2005-01-03 Martin Baulig <martin@ximian.com>
16604 * loader.c (find_method): Removed the hack for generic instances.
16605 (method_from_memberref): If our parent is a generic instance, pass
16606 its generic type definition to find_method() and then inflate the
16608 (mono_get_method_constrained): Pass the generic type definition to
16609 find_method() and inflate the method later.
16611 * class-internals.h (MonoStats): Added `generic_class_count'.
16613 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
16614 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
16616 * reflection.c (mono_custom_attrs_from_params): Don't ignore
16617 generic type definitions.
16619 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
16621 * loader.c icall.c: Fix warnings.
16623 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
16625 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
16626 blittable types. Fixes #70864.
16628 2004-12-29 Martin Baulig <martin@ximian.com>
16631 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
16633 * reflection.c (mono_method_get_object): Create a
16634 "System.Reflection.MonoGenericMethod" for inflated methods; don't
16635 call mono_get_inflated_method().
16637 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
16639 2004-12-27 Martin Baulig <martin@ximian.com>
16641 * class-internals.h (MonoMethod): Added `is_inflated' flag.
16642 (MonoMethodInflated): Added `inflated' field.
16644 * class.c (mono_class_inflate_generic_method): Don't really
16645 inflate the method here; just set the `is_inflated' flag in the
16647 (mono_class_get_inflated_method): Actually inflate the method here
16648 if it's not already inflated; we use the MonoMethodInflated's new
16649 `inflated' field as a cache.
16651 2004-12-26 Martin Baulig <martin@ximian.com>
16654 (inflate_generic_class): Moved some code out of inflate_generic_type().
16655 (mono_class_inflate_generic_method): If we're already inflated,
16656 inflate the context and use the declaring method; ie. make sure
16657 the declaring method of an inflated method is always the generic
16659 (mono_class_create_from_typedef): Create
16660 `class->generic_container->context->gclass'.
16662 2004-12-24 Ben Maurer <bmaurer@ximian.com>
16664 * metadata-internals.h, marshal.c, reflection.c: More
16665 MonoGHashTable->GHashTable.
16667 * domain-internals.h, class.c: Change MonoGHashTable's into
16668 GHashTables for some cases where no gc stuff is used
16670 All users: update apis
16672 2004-12-23 Ben Maurer <bmaurer@ximian.com>
16674 * metadata.c (builtin_types): Make this `const'. Makes this get
16675 put into the shareable section.
16676 (mono_metadata_init): Casts to make gcc happy.
16678 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
16680 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
16682 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
16684 * icall.c: Added an internal call to retrieve the position and length
16685 of assembly-level declarative security attributes (RequestMinimum,
16686 RequestOptional and RequestRefuse). This is used by the Assembly class
16687 to re-create the corresponding permission sets.
16689 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
16691 * marshal.c: fix the stelemref wrapper to be type correct
16694 2004-12-20 Ben Maurer <bmaurer@ximian.com>
16696 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
16697 to do key & 0x7fffffff. Hashtable already does this. It just
16698 results in longer code.
16700 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
16702 * appdomain.c: Bump corlib version.
16703 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
16704 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
16705 * reflection.c|h: Add functions to get declarative security infos
16706 (blob position and length) for assemblies, classes and methods.
16708 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
16710 * reflection.c: sort the constant table (bug #70693).
16712 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
16714 * object-internals.h, threads.c, domain.c: add accessors for
16715 the MonoThread and MonoDomain tls keys.
16717 2004-12-18 Martin Baulig <martin@ximian.com>
16719 * class.c (inflate_generic_type): If we're inflating a generic
16720 instance, set `ngclass->context->container = context->container';
16721 ie. the container we inflated into.
16723 * metadata.c (mono_metadata_parse_generic_param): Reflect above
16724 inflate_generic_type() changes.
16726 2004-12-17 Martin Baulig <martin@ximian.com>
16728 * class-internals.h
16729 (MonoGenericClass): Replaced `MonoType *generic_type' with
16730 `MonoClass *generic_class'. Removed `dynamic_info'; if
16731 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
16732 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
16734 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
16736 * exception.c (mono_exception_from_token): New helper function.
16738 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
16740 * assembly.c (mono_assembly_load_with_partial_name): Call
16741 mono_assembly_loaded before invoking the preload hooks. Fixes
16744 * object-internals.h (MonoThread): Change culture_info and
16745 ui_culture_info into an array.
16747 * threads.c: Cache culture info objects from more than one appdomain.
16749 * threads.c threads-types.h icall.c: Add icalls for manipulating the
16750 current UI culture.
16752 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
16754 * threads.h threads.c appdomain.c: Clear the culture_info field of
16755 all threads during unloading if they point to an object in the dying
16758 2004-12-13 Ben Maurer <bmaurer@ximian.com>
16760 * culture-info.h (TextInfoEntry): New struct
16761 * object-internals.h: sync with managed
16762 * locales.c: fill the `text_info_data' field
16763 * culture-info-tables.h: update
16765 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
16767 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
16770 2004-12-12 Ben Maurer <bmaurer@ximian.com>
16772 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
16773 (ves_icall_ModuleBuilder_getMethodToken): Ditto
16775 2004-12-12 Martin Baulig <martin@ximian.com>
16777 * mono-debug-debugger.c (write_type): If we're an enum and the
16778 builtin types have already been initialized, call mono_class_init().
16780 2004-12-11 Martin Baulig <martin@ximian.com>
16782 * metadata.c (mono_metadata_load_generic_params): Added
16783 `MonoGenericContainer *parent_container' argument; automatically
16784 compute `container->is_method'; pass the correct owner to
16787 * reflection.c (compare_genericparam): Sort the GenericParam table
16788 according to increasing owners.
16790 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
16792 * profiler.c: allow disabling the default profiler.
16794 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
16796 * decimal.c, icall.c: allow disabling System.Decimal support.
16798 2004-12-09 Marek Safar <marek.safar@seznam.cz>
16800 * reflection.c: Add support for null attribute arguments.
16802 2004-12-09 Martin Baulig <martin@ximian.com>
16804 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
16805 names to get rid of compiler warnings.
16807 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
16809 * marshal.c (mono_marshal_get_struct_to_ptr): Call
16810 mono_marshal_load_type_info (). Fixes #69625.
16811 (mono_marshal_get_ptr_to_struct): Likewise.
16813 2004-12-08 Martin Baulig <martin@ximian.com>
16815 * mono-debug.h: Bumped version number to 47.
16817 * mono-debug-debugger.c
16818 (mono_debugger_event_handler, mono_debugger_event): Take two
16819 guint64 arguments insteed of a gpointer and a guint32.
16821 2004-12-08 Martin Baulig <martin@ximian.com>
16823 * debug-mono-symfile.h
16824 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
16825 `address' to `native_offset'.
16827 2004-12-08 Martin Baulig <martin@ximian.com>
16829 * class.c (mono_class_create_from_typespec): Only inflate if we
16830 either have `context->gclass' or `context->gmethod'.
16832 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
16834 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
16836 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
16838 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
16840 * reflection.c (mono_assembly_get_object): Remove the workaround put
16841 in for the release.
16843 * appdomain.c: Use the corlib_internal field from MonoAssembly.
16845 * appdomain.c: Bump corlib version.
16847 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
16848 be visible in other appdomains.
16850 2004-12-07 Ben Maurer <bmaurer@ximian.com>
16852 * threads.c: Interlocked inc and dec for longs were messed up,
16853 use a KISS based impl for this. Fixes 70234
16855 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
16857 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
16859 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
16861 * icall.c: fix to follow policy not to allow struct
16862 arguments in icalls.
16864 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16866 * process.c: make the patch that handles spaces in file paths work
16867 on mono/windows too.
16869 2004-12-06 Martin Baulig <martin@ximian.com>
16871 * class.c (mono_class_create_generic): Call
16872 mono_class_setup_supertypes() if we're dynamic.
16873 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
16875 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
16877 * object-internals.h: Add new fields to MonoThread.
16879 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16881 * icall.c threads-types.h threads.c: Add new icalls.
16883 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
16885 * object-internals.h (MonoReflectionAssembly): Sync object layout with
16888 * appdomain.c: Bump corlib version.
16890 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
16891 internal assemblies. Fixes #69181.
16893 2004-12-05 Martin Baulig <martin@ximian.com>
16895 * class.c (mono_class_inflate_generic_signature): Make this a
16896 no-op if `context' is NULL or we don't have any type parameters;
16897 also copy `sentinelpos'.
16899 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
16901 * image.c: Add unbox_wrapper_cache.
16903 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
16905 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
16906 function generator.
16908 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
16911 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
16913 2004-12-04 Martin Baulig <martin@ximian.com>
16915 * loader.c (mono_method_get_signature_full): New public function;
16916 like mono_method_get_signature(), but with an additional
16917 `MonoGenericContext *' argument.
16919 * class.c (mono_class_inflate_generic_signature): Formerly known
16920 as inflate_generic_signature(); make this public.
16922 2004-12-04 Martin Baulig <martin@ximian.com>
16925 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
16926 instead of a `MonoGenericContainer *'.
16927 (mono_metadata_parse_array_full): Likewise.
16928 (mono_metadata_parse_signature_full): Likewise.
16929 (mono_metadata_parse_method_signature_full): Likewise.
16930 (mono_metadata_parse_generic_inst): Likewise.
16931 (mono_metadata_parse_generic_param): Likewise.
16932 (mono_metadata_parse_mh_full): Likewise.
16933 (mono_type_create_from_typespec_full): Likewise.
16935 2004-12-03 Martin Baulig <martin@ximian.com>
16937 * class-internals.h (MonoGenericContainer): Replaced the
16938 `MonoGenericContext * pointer with a `MonoGenericContext'
16939 structure and made it the first element.
16941 2004-12-03 Martin Baulig <martin@ximian.com>
16944 (inflate_generic_type): Set the `context->container' when creating
16945 a new MonoGenericContext.
16946 (mono_class_inflate_generic_method): Likewise.
16947 (mono_class_create_from_typespec): Just use `context->container'
16948 to get the container.
16950 * loader.c (method_from_methodspec): Set `context->parent' from
16951 `context->container' - and if that's a method container, use its
16952 parent. Also set the `context->container' when creating a new
16953 MonoGenericContext.
16954 (mono_get_method_from_token): Use just `context->container' to get
16957 * metadata.c (do_mono_metadata_parse_generic_class): Also set
16958 `gclass->context->container'.
16960 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
16961 the `context->container' when creating a new MonoGenericContext.
16963 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
16965 * reflection.c (compare_genericparam): Sort params with identical
16966 owner by their number. Fixes gen-111 on sparc.
16968 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
16970 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
16971 around the domain changes.
16973 * appdomain.c (mono_domain_unload): Handle the case when the thread
16974 calling Unload is itself being aborted during unloading. Fixes #70022.
16976 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
16978 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
16979 checkpoint_func as an icall so it gets a wrapper.
16980 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
16981 in the cross-appdomain wrappers too.
16983 * threads.c (mono_thread_has_appdomain_ref): Make this public.
16985 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
16987 * reflection.c: Fix some memory leaks.
16989 2004-12-02 Martin Baulig <martin@ximian.com>
16991 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
16993 * metadata.c (generic_class_cache): New static hashtable.
16994 (mono_metadata_lookup_generic_class): New public method.
16996 2004-12-02 Martin Baulig <martin@ximian.com>
16998 * class.c (mono_class_create_from_typedef): Call
16999 mono_class_setup_parent() and mono_class_create_mono_type() before
17000 parsing the interfaces.
17002 2004-12-02 Martin Baulig <martin@ximian.com>
17004 * metadata.c (generic_inst_cache): New static hashtable.
17005 (mono_metadata_lookup_generic_inst): New public function.
17006 (mono_metadata_inflate_generic_inst): New public function.
17007 (mono_metadata_parse_generic_inst): New public function.
17008 (do_mono_metadata_parse_generic_class): Use the new
17009 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
17010 since this'll also use the cache.
17012 * reflection.c (mono_reflection_bind_generic_method_parameters):
17013 Use mono_metadata_lookup_generic_inst() to use the new cache.
17015 * class.c (inflate_mono_type): Use
17016 mono_metadata_inflate_generic_inst() to inflate a generic
17017 instance; this'll also use the new cache.
17019 * loader.c (method_from_methodspec): Use
17020 mono_metadata_parse_generic_inst() and
17021 mono_metadata_inflate_generic_inst() rather than parsing it
17022 manually, so we can use the new cache.
17024 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
17026 * threads.c (wait_for_tids): Do not incorrectly free threads when
17027 the wait times out.
17029 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17031 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
17032 iter->args based on whether parameters are passed in registers (i.e.
17033 MONO_ARCH_REGPARMS is defined)
17035 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
17037 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
17038 the exception message. Fixes #70070.
17039 (method_from_methodspec): Fix warnings.
17041 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17043 * process.c: (complete_path) return the path quoted
17045 2004-12-01 Martin Baulig <martin@ximian.com>
17047 * class-internals.h (MonoGenericInst): New structure.
17048 (MonoGenericClass): Replaced `type_argc', `type_argv' and
17049 `is_open' with `MonoGenericInst *inst'.
17050 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
17051 `is_open' with `MonoGenericInst *inst'.
17053 2004-11-30 Martin Baulig <martin@ximian.com>
17055 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
17057 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
17058 to `generic_class_cache'.
17061 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
17062 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
17063 (mono_generic_inst_is_valuetype): Renamed to
17064 mono_generic_class_is_valuetype().
17066 * class-internals.h
17067 (MonoGenericInst): Renamed to MonoGenericClass.
17068 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
17069 (MonoClass): Renamed `generic_inst' to `generic_class'.
17070 (MonoGenericContext): Renamed `ginst' to `gclass'.
17072 * object-internals.h
17073 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
17075 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
17076 mono_reflection_generic_class_initialize().
17078 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
17079 now known as "System.Reflection.MonoGenericClass".
17080 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
17082 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
17084 * class-internals.h: Added a flag field to MonoClass to cache the
17085 declarative security attributes actions associated with the class.
17086 * domain-internals.h: Added booleans to MonoJitInfo to cache the
17087 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
17088 applicable to the JITted method.
17089 * reflection.c|h: Added functions to extract (as flags) which security
17090 actions are available (declaratively) for a method, class or assembly.
17091 * metadata.c|h: Added functions to search the declarative security
17092 table in the metadata.
17094 2004-11-29 Ben Maurer <bmaurer@ximian.com>
17096 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
17097 EXPORTEDTYPES are already in the class name cache, so there is no
17098 need to add extra code here to look at them. Just removes a bit of
17101 (ves_icall_System_Environment_get_TickCount): No need for #if
17102 WINDOWS. We already have the code in io-layer.
17104 2004-11-28 Martin Baulig <martin@ximian.com>
17107 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
17110 2004-11-27 Miguel de Icaza <miguel@ximian.com>
17112 * assembly.c (do_mono_assembly_open): Instead of having a
17113 conditional WITH_BUNDLE, incorporate support for bundles here, by
17114 having a global `bundles' variable holding a pointer to the actual
17117 (mono_register_bundled_assemblies): New API call used by the
17120 See mkbundle.1 for details.
17122 2004-11-27 Martin Baulig <martin@ximian.com>
17124 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
17125 the vtable for generic methods.
17127 2004-11-26 Martin Baulig <martin@ximian.com>
17130 (mono_metadata_generic_method_hash): New public function.
17131 (mono_metadata_generic_method_equal): Likewise.
17133 * class-internals.h
17134 (MonoGenericContainer): Added `GHashTable *method_hash'.
17136 * reflection.c (ReflectionMethodBuilder): Added
17137 `MonoGenericContainer *generic_container'.
17138 (reflection_methodbuilder_to_mono_method): Don't create a new
17139 MonoGenericContainer each time we're called.
17140 (mono_reflection_bind_generic_method_parameters): Use
17141 `container->method_hash' to cache the results so we don't create a
17142 different method if we're called several times with the same
17145 * loader.c (method_from_methodspec): Use the new
17146 `container->method_hash' here, too.
17148 2004-11-26 Martin Baulig <martin@ximian.com>
17150 * class.c (inflate_generic_signature): Correctly compute
17151 `res->has_type_parameters'.
17152 (mono_class_vtable): Use the `has_type_parameters' flag to
17153 determine whether we're a generic method.
17155 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
17157 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
17159 * object.c (mono_runtime_run_main): Fix a small memory leak.
17161 2004-11-25 Martin Baulig <martin@ximian.com>
17163 * class.c (set_generic_param_owner): Fixed the loop.
17165 2004-11-25 Martin Baulig <martin@ximian.com>
17167 * object.c (mono_class_vtable): Don't create any JIT wrappers for
17170 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
17172 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
17173 names. Fixes #69787.
17175 2004-11-24 Martin Baulig <martin@ximian.com>
17177 * class.c (mono_class_create_generic_2): If we don't have a
17178 `ginst->parent', inflate `gklass->parent' to get our parent.
17180 2004-11-24 Martin Baulig <martin@ximian.com>
17182 * reflection.c (compare_genericparam): Correctly sort the
17183 GenericParam table; fixes #69779.
17185 2004-11-23 Ben Maurer <bmaurer@ximian.com>
17187 * reflection.c: When writing a PE file, don't create a huge
17188 buffer in memory. Just write the arrays we have to the file.
17189 This reduces memory usage.
17191 * metadata-internals.h: MonoDynamicStream pefile is no longer used
17194 2004-11-17 Martin Baulig <martin@ximian.com>
17196 * class.c (mono_class_init): Don't setup `class->parent' for
17197 dynamic instances; moved this to mono_class_generic_2().
17198 (mono_class_create_generic): Also set `klass->inited' for dynamic
17200 (mono_class_create_generic_2): Don't do anything for dynamic
17201 generic instances. Set `klass->parent' here and also call
17202 mono_class_setup_parent() here.
17204 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
17205 `MonoType *parent' argument; set `ginst->parent' before calling
17206 mono_class_create_generic_2(), so we set the correct parent.
17208 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
17210 * reflection.c: allow getting attributes from ModuleBuilder
17213 2004-11-17 Martin Baulig <martin@ximian.com>
17215 * class.c (mono_class_create_from_typedef): If a type parameter is
17216 inherited from an outer class, set its owner to that class.
17218 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
17220 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
17221 for (int*) written size. This fixes bug #69592.
17223 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
17225 * icall.c: Added IsAuthenticodePresnet internal call.
17226 * image.c|h: New function that check a MonoImage for an Authenticode
17227 signature in the certificate PE data directory.
17228 * security.c|h: New internal call to ask the runtime if an
17229 Authenticode signature seems referenced in the PE header.
17231 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
17233 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
17235 * reflection.c (mono_image_create_pefile): Free the assembly streams
17236 after writing out the assembly file.
17238 * object.c (mono_runtime_run_main): Fix small memory leak.
17240 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
17241 property access modifiers. Fixes #69389.
17243 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17245 * domain.c, object.c, object-internals.h, domain-internals.h,
17246 object.h, marshal.c: keep dynamic code info per domain.
17248 2004-11-15 Martin Baulig <martin@ximian.com>
17250 * class.c (mono_type_get_name_recurse): Put type arguments in
17251 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
17254 2004-11-15 Martin Baulig <martin@ximian.com>
17256 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
17257 (mono_class_setup_vtable): When computing `the_cname' for a
17258 generic instance, don't include the namespace since we'd otherwise
17261 2004-11-15 Martin Baulig <martin@ximian.com>
17263 * class.c (mono_class_create_generic): Changed return type to void.
17264 (mono_class_create_generic_2): New public function; setup
17265 `class->method', `class->field' and `class->interfaces' here
17266 instead of in mono_class_init().
17268 * class.h (mono_class_create_generic): Moved to class-internals.h.
17270 2004-11-14 Ben Maurer <bmaurer@ximian.com>
17272 * reflection.c (mono_image_create_pefile): take a file HANDLE.
17273 rather than writing to memory, write to this file. Right now,
17274 we are just writting into a buffer, and copying that. However
17275 we can avoid the buffer later.
17277 (mono_dynamic_stream_reset): new function
17279 * icall.c, object-internals.h: update for the above.
17281 2004-11-13 Ben Maurer <bmaurer@ximian.com>
17283 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
17284 have been using gc'd memory. First it is slower, unlikely
17285 the comment in the source code said, secondly, it increases
17286 our footprint to do it in the gc.
17288 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
17289 the method so that it does not have to copy to managed code.
17291 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
17293 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
17295 2004-11-12 Martin Baulig <martin@localhost>
17297 * reflection.c (mono_image_create_token): Allow generic method
17298 definitions here, since they may appear in an `.override'; see
17299 gen-98/gen-99 for an example.
17301 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
17303 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
17306 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
17309 2004-11-11 Martin Baulig <martin@ximian.com>
17311 * class.c (mono_class_setup_vtable): In an explicit interface
17312 implementation, the method name now includes the arity.
17314 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
17316 * object.c (mono_array_full_copy): Fix warning.
17318 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
17320 * appdomain.c: Removed look_for_method_by_name(). Use the new method
17321 mono_class_get_method_from_name() instead.
17323 * class-internals.h: Added two new types of wrappers.
17324 Added MonoRemotingTarget enum. Added new trampoline function type, which
17325 takes an additional MonoRemotingTarget value as parameter, so it is
17326 possible to request a trampoline for a specific target.
17328 * class.c: Added new mono_class_get_method_from_name() method.
17330 * class.h: In MonoRemoteClass, we can have now to vtables, one for
17331 general remoting sinks and one specific for cross domain calls.
17333 * debug-helpers.c: Added new wrapper names.
17335 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
17338 * image.c: Porperly delete value objects form the remoting invoke hashtable.
17340 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
17341 with several other methods (mono_marshal_get_xappdomain_dispatch,
17342 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
17343 and others) can generate a fast remoting wrapper for cross domain calls.
17344 More information can be found in docs/remoting.
17345 Other changes: Removed mono_find_method_by_name, and used
17346 mono_class_get_method_from_name instead.
17347 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
17348 is stored in the remoting invoke hashtable.
17350 * marshal.h: published the new method for getting the xdomain wrapper,
17351 and also added a method for getting the adequate wrapper for a given
17354 * object-internals.h, object.c: Added a couple of methods for capying and
17356 Modified mono_install_remoting_trampoline, which takes the new remoting
17357 trampoline that has a remoting target as parameter.
17358 mono_class_proxy_vtable now also takes a remoting target as parameter, and
17359 will return the most suitable vtable for the target.
17360 Added mono_remote_class_vtable, which returns the vtable of a remote class
17361 (which can be the normal remoting vtable or the xdomain vtable).
17363 * threads.c: the xdomain invoke and dispatch wrappers must also be
17364 protected against interruptions.
17366 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17368 * icall.c: use memmove in BlockCopyInternal when the source and
17369 destination arrays are the same.
17371 2004-11-09 Martin Baulig <martin@ximian.com>
17373 * class-internals.h (MonoGenericContainer): Removed `method' and
17374 `signature', replaced them with `is_method' and `is_signature'
17375 flags. Added `context'.
17377 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
17378 instead of a `MonoGenericContainer *'.
17380 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
17381 for dynamic type parameters.
17382 (mono_metadata_load_generic_params): Setup `container->context'.
17384 * reflection.c (mono_reflection_setup_generic_class): Setup
17385 `tb->generic_container->context'.
17386 (do_mono_reflection_bind_generic_parameters): Use
17387 mono_class_inflate_generic_type() to correctly inflate types,
17388 rather than using our own hack just for MONO_TYPE_VAR.
17390 2004-11-09 Martin Baulig <martin@ximian.com>
17392 * class.c (mono_class_inflate_generic_method): Small fix; don't
17396 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
17397 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
17398 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
17399 (ves_icall_Type_BindGenericParameters): Likewise.
17400 (ves_icall_Type_get_IsGenericInstance): Likewise.
17401 (ves_icall_Type_GetGenericParameterPosition): Likewise.
17402 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
17403 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
17404 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
17406 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
17408 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
17409 assembly versions and public key tokens. Fixes #69113.
17411 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
17413 * metadata.c: fix bug introduced with the type cache changes
17416 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
17418 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
17419 the MonoClass pointer instead of the token in exception clauses.
17420 * reflection.c: updates for the above and make the code not depend
17421 on the structure of MonoExceptionClause.
17423 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
17425 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
17426 Add support for dynamic assemblies. Fixes #69114.
17428 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
17430 2004-11-07 Ben Maurer <bmaurer@ximian.com>
17432 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
17433 since most only those methods use it. the code member of
17434 MonoMethodPInvoke was dead, so that can be removed too. Also,
17435 remove inline_count (again, not used), and move slot so that it
17436 can share bits with some other flags. This saves 8 bytes in the
17437 structure and gives us about 50 kb back for mcs helloworld.cs
17439 * *.[ch]: Do naming changes for the above.
17441 * loader.c (mono_method_get_header): Lazily init the header
17443 (mono_get_method_from_token): don't init the header here
17444 (mono_free_method): the header may never be allocated
17446 Overall, this saves 150 kb of unmanaged allocations
17447 for mcs helloworld.cs. That accounts for 10% of the unmanaged
17450 * loader.c, loader.h (mono_method_get_header): new accessor.
17452 * *.[ch]: use the above method. Prepares us to lazily load
17455 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
17456 three warnings, which are actual bugs (see 69206).
17458 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
17459 unused. Saves a cool 4 bytes / method.
17461 2004-11-06 Ben Maurer <bmaurer@ximian.com>
17463 * metadata.c (builtin_types): Add types for System.Object here.
17464 (mono_metadata_parse_type_full): Cache MonoType*'s that are
17465 for a class or valuetype from klass->this_arg or klass->byval_arg.
17467 On mcs for a hello world, this gets us down from 21836 MonoType's
17470 (mono_metadata_free_type): Account for the above change.
17472 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
17474 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
17475 exception instead of asserting if name is null.
17476 (ves_icall_System_AppDomain_GetData): Ditto.
17478 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
17480 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
17483 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
17484 Return NULL when the domain does not have entry_assembly set.
17486 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
17487 Add a 'resource_modules' argument.
17488 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
17490 * reflection.c (mono_reflection_create_runtime_class): Move setting
17491 of wastypebuilder here, so mono_get_type_object () returns a MonoType
17494 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
17495 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
17496 Throw an ArgumentNullException if 'ptr' is null.
17498 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
17499 assemblies here. Fixes #69020.
17501 2004-11-05 Geoff Norton <gnorton@customerdna.com>
17503 * reflection.c (build_compressed_metadata): Fix the previous patch for
17504 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
17507 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
17509 * assembly.c (mono_assembly_names_equal): Allow a match if one of
17510 the cultures is false. Fixes #69090.
17512 * reflection.c (build_compressed_metadata): Fix invalid memory read
17513 detected by valgrind.
17515 * reflection.c (mono_reflection_get_type): Avoid triggering a
17516 TypeResolve multiple times for the same type. Fixes #65577.
17518 2004-11-04 Ben Maurer <bmaurer@ximian.com>
17520 * marshal.c: Avoid using ldftn to call managed functions. It is
17521 much slower than just a call.
17523 * reflection.c (mono_module_get_object): free the basename we
17524 allocate here from glib.
17526 * reflection.c (ensure_runtime_vtable): make sure to free
17527 overrides. Also, we were allocating an array of MonoMethod not an
17528 array of MonoMethod*.
17530 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
17532 * image.c (mono_image_close): free image->guid here.
17534 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
17536 * reflection.c: Fix some spec conformance issues with the PE file
17537 structures so mcs compiled apps run on the Net 2.0 beta.
17539 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
17541 * string-icalls.c (ves_icall_System_String_ctor_encoding):
17542 Implement this. Fixes #67264.
17544 * debug-helpers.h debug-helpers.c marshal.c: Move
17545 mono_find_method_by_name to debug-helpers.c.
17547 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
17549 * object.c (mono_release_type_locks): type_initialization_hash is
17552 * reflection.c object.c object-internals.h: Fix warnings.
17554 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
17555 without accessors. Fixes #61561.
17557 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
17558 application base from the root domain if not set. Fixes #65641.
17559 (mono_runtime_init): Fix warning.
17561 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17563 * appdomain.c: call mono_thread_pool_init.
17564 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
17565 of worker threads based on the number of CPUs and the environment
17566 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
17567 for non-windows (windows) systems.
17569 2004-10-27 Chris Toshok <toshok@ximian.com>
17571 * mono-debug-debugger.c (write_class): don't call mono_class_init
17572 here, as even with the check for (!klass->init_pending), we get
17573 into a situation where we're hitting cycles in class
17574 initialization. Fixes #68816.
17576 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
17578 * image.c: Avoid overwriting values in the loaded_images_hash when an
17579 assembly is loaded multiple times. Fixes #61152.
17581 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
17582 so multiple satellite assemblies for the same name can be loaded.
17585 * mono_domain_assembly_preload: Actually return the loaded assembly,
17588 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
17589 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
17591 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
17592 pending finalizers are not invoked after the appdomain has been
17593 unloaded. Fixes #67862.
17595 2004-10-22 Martin Baulig <martin@ximian.com>
17597 * mono-debug-debugger.c
17598 (mono_debugger_runtime_invoke): Don't box valuetypes.
17600 2004-10-22 Chris Toshok <toshok@ximian.com>
17602 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
17603 don't hide private methods.
17605 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
17607 * icall.c: Allows the runtime to "share" (when known) the public key
17608 token of an assembly. This avoid the need to recalculate the token
17609 (from the public key) in managed code.
17611 2004-10-21 Chris Toshok <toshok@ximian.com>
17613 * debug-helpers.c (append_class_name): argh, revert last patch.
17615 2004-10-21 Chris Toshok <toshok@ximian.com>
17617 * debug-helpers.c (append_class_name): use '+' as the delimiter,
17618 not '/', so that it matches what the debugger uses to look up
17621 2004-10-21 Martin Baulig <martin@ximian.com>
17623 * mono-debug-debugger.c (mono_debugger_throw_exception): New
17624 public method; this is called each time an exception is thrown and
17625 allows the debugger to use exception catch points.
17627 2004-10-21 Martin Baulig <martin@ximian.com>
17629 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
17630 the stack pointer and the exception object in some struct and pass
17631 that to the debugger.
17633 2004-10-21 Chris Toshok <toshok@ximian.com>
17635 * mono-debug-debugger.c (do_write_class): add instance/static
17636 event support. We don't expose "raise" or "other" yet.
17637 (event_is_static): new method.
17639 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
17641 * mono-debug-debugger.c
17642 (mono_debugger_handle_exception): Remove
17643 bogus return value for fussy compilers.
17645 2004-10-20 Martin Baulig <martin@ximian.com>
17647 * mono-debug-debugger.c
17648 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
17649 (mono_debugger_handled_exception): Likewise.
17651 2004-10-20 Martin Baulig <martin@ximian.com>
17653 * mono-debug-debugger.h (MonoDebuggerEvent): Added
17654 MONO_DEBUGGER_EVENT_EXCEPTION.
17656 * mono-debug-debugger.c (mono_debugger_handle_exception): New
17657 public function to send the debugger a notification for an
17658 exception and inform it about a catch/finally clause.
17660 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
17662 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
17663 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
17666 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
17668 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
17670 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
17671 marshalled as [In,Out]. Fixes #58325.
17673 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
17675 * reflection.c (mono_method_body_get_object): Implement some fields.
17677 2004-10-12 Martin Baulig <martin@ximian.com>
17679 * reflection.c (mono_reflection_bind_generic_parameters): Small
17680 fix, correctly retrieve our parent from a generic instance.
17682 2004-10-12 Martin Baulig <martin@ximian.com>
17684 * metadata.c (mono_metadata_generic_param_equal): We always have
17688 (mono_class_from_generic_parameter): We need to have an owner.
17689 (my_mono_class_from_generic_parameter): Likewise.
17691 * reflection.c (mono_reflection_setup_generic_class): Renamed to
17692 mono_reflection_create_generic_class() and added a new
17693 mono_reflection_setup_generic_class().
17694 (mono_reflection_initialize_generic_param): If we're a nested
17695 generic type and inherited from the containing class, set our
17696 owner to the outer class.
17698 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
17700 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
17702 * reflection.c (mono_method_body_get_object): New function to create
17703 a MethodBody object.
17705 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
17707 2004-10-11 Martin Baulig <martin@ximian.com>
17709 * metadata.c (_mono_metadata_type_equal): Renamed to
17710 do_mono_metadata_type_equal() and made static.
17712 2004-10-11 Martin Baulig <martin@ximian.com>
17714 * appdomain.c: Bump corlib version number to 28.
17716 2004-10-10 Martin Baulig <martin@ximian.com>
17718 * class-internals.h
17719 (MonoGenericInst): Added `MonoGenericContainer *container'.
17720 (MonoGenericMethod): Likewise.
17721 (MonoGenericContext): Likewise.
17722 (MonoGenericParam): Added `MonoGenericContainer *owner'.
17725 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
17726 (do_mono_metadata_parse_generic_inst): Likewise.
17727 (mono_metadata_parse_type_full): New public method. This is the actual
17728 mono_metadata_parse_type() implementation - with an additional
17729 `MonoGenericContainer *' argument.
17730 (mono_metadata_parse_array_full): Likewise.
17731 (mono_metadata_parse_signature_full): Likewise.
17732 (mono_metadata_parse_method_signature_full): Likewise.
17733 (mono_metadata_parse_mh_full): Likewise.
17734 (mono_type_create_from_typespec): Likewise.
17735 (mono_metadata_interfaces_from_typedef_full): New public method;
17736 this is similar to the other _full() methods, but we take a
17737 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
17738 (mono_metadata_parse_generic_param): Take an additional
17739 `MonoGenericContainer *' argument and lookup the MonoGenericParam
17740 from that container.
17741 (mono_metadata_generic_param_equal): New static method to compare
17742 two type parameters.
17743 (_mono_metadata_type_equal): New static method; takes an
17744 additional `gboolean signature_only' argument - if true, we don't
17745 compare the owners of generic parameters.
17746 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
17747 with a TRUE argument - do a signature-only comparision.
17749 * loader.c: Use the new _full() methods and pass the
17750 MonoGenericContainer to them.
17752 * object-internals.h (MonoReflectionTypeBuilder): Added
17753 `MonoGenericContainer *generic_container' field.
17754 (MonoReflectionMethodBuilder): Likewise.
17756 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
17758 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
17759 case initial images of dynamic assemblies.
17761 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
17763 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
17765 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
17766 length of event->other array.
17767 (typebuilder_setup_events): Ditto.
17769 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
17770 'assembly_by_name' and add an 'assemblies' list.
17772 * assembly.h assembly.c: Add a new search hook for determining whenever
17773 an assembly is already loaded. Use this instead of searching in the
17774 loaded_assemblies list.
17776 * domain.c appdomain.c: Implement the new search hook so loaded
17777 assemblies are now scoped by appdomain. Fixes #67727.
17779 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
17781 * threads.c (mono_thread_attach): Initialize synch_lock field so
17782 mono_thread_detach works again.
17784 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
17785 'lib' too. Fixes #63130.
17787 2004-10-06 Jackson Harper <jackson@ximian.com>
17789 * culture-info-tables.h: regenerated.
17791 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
17793 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
17794 implemented by other interfaces in the result. Fixes #65764.
17796 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
17797 Handle unloadable modules without crashing.
17799 * image.c (load_modules): Revert the previous patch since modules must
17800 have a fixed index inside the array.
17802 * image.c (load_modules): Don't include native modules in the modules
17805 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
17807 * reflection.h: Add param_defaults field.
17809 * reflection.c: Add support for parameter defaults in dynamic methods.
17812 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
17813 an empty string when a type has no namespace. Fixes #64230.
17815 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
17817 * tabledefs.h: Added "internal" security actions to support non-CAS
17818 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
17819 Note: they do not seems to be used anymore in 2.0 (new metadata format)
17821 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
17823 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
17824 constructor of abstract class. Fixes #61689.
17826 2004-10-04 Martin Baulig <martin@ximian.com>
17828 * class-internals.h (MonoGenericContainer): New type.
17829 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
17830 `MonoGenericContainer *generic_container'.
17831 (MonoClass): Replaced `gen_params' and `num_gen_params' with
17832 `MonoGenericContainer *generic_container'.
17834 * metadata.c (mono_metadata_load_generic_params): Return a
17835 `MonoGenericContainer *' instead of a `MonoGenericParam *';
17836 removed the `num' argument.
17838 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
17840 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
17841 for dynamic images.
17843 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
17846 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
17848 * reflection.c: Save pe_kind and machine values into the generated
17851 * appdomain.c: Bump corlib version number.
17853 * object-internals.h: Reorganize layout of LocalBuilder.
17855 * class-internals.h class.c (mono_class_get_implemented_interfaces):
17856 New helper function.
17858 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
17859 created MonoType for dynamic types. Fixes #66180.
17861 2004-10-02 Ben Maurer <bmaurer@ximian.com>
17863 * threadpool.c: the ares hashtable needs a critical section around it.
17864 this prevents some nasty segfaults
17866 2004-10-02 Massimiliano Mantione <massi@ximian.com>
17868 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
17869 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
17872 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
17874 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
17876 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
17878 * image.c: Always canonicalize image file names, to avoid loading
17879 the same assembly twice when referenced using a relative path.
17881 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
17883 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
17885 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
17887 * marshal.c: Fix warnings.
17889 2004-09-29 Geoff Norton <gnorton@customerdna.com>
17891 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
17892 attempting to marshal the delegate_trampoline as the method_addr.
17893 This patch has a static hashtable of marshalled delegates so that
17894 we can map delegate_trampoline addresses back to delegates. This
17895 allows a delegate passed to managed code to be passed back into native
17898 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
17900 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
17902 * reflection.c (method_encode_code): Align method headers properly.
17905 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
17907 * marshal.c: In the runtime invoke wrapper, reset the abort
17908 exception if it is cached. This avoids the automatic rethrowal of
17909 the exception after the catch of the wrapper. Also check for pending
17910 interruptions before calling the managed method. This is done using
17911 the new method emit_thread_force_interrupt_checkpoint, since the
17912 normal checkpoint method is ignored when running the invoke wrapper.
17913 * object.c: If the abort exception is rethrown, set the abort_exc
17914 field of the thread, so it will be rethrown aftere every catch.
17915 * threadpool.c: Only run an interruption checkpoint if what has been
17916 requested is a stop of the thread (aborts will be ignored).
17917 * threads.c: By default, a thread will now never be interrumped while
17918 running the runtime invoke wrapper (this ensures that runtime_invoke
17919 will always return to the caller if an exception pointer is provided).
17920 There is a new special method mono_thread_force_interruption_checkpoint()
17921 to force an interruption checkpoint even if running a protected
17922 wrapper, which is used by the same runtime invoke wrapper to do a check
17925 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
17927 * object.c, object-internals.h: Implemented mono_release_type_locks,
17928 which releases the cctor locks held by a thread.
17929 * threads.c, threads.h: In thread_cleanup, release cctor locks held
17930 by a thread. Added mono_thread_exit() method to be used to safely stop
17933 2004-09-28 Raja R Harinath <rharinath@novell.com>
17935 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
17936 Move null check before dereference. Avoid indexing beyond the end
17937 of the 'modules' array.
17939 2004-09-28 Raja R Harinath <rharinath@novell.com>
17941 * metadata-internals.h (MonoImage): Add module_count field.
17942 * image.c (load_modules): Set image->module_count.
17943 (mono_image_load_file_for_image): Use image->module_count.
17944 * reflection.c (mono_image_load_module): Append to image->modules array
17945 of dynamic assembly.
17946 (mono_module_get_object): Fix loop to actually increment index.
17947 Use image->module_count.
17948 * assembly.c (mono_assembly_load_references): Use image->module_count.
17949 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
17952 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
17954 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
17955 Avoid assert on generic types.
17957 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
17959 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
17961 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
17963 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
17964 function to convert a MarshalSpec structure to its managed counterpart.
17966 * reflection.c: Fix warnings.
17968 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
17971 * icall.c (mono_create_icall_signature): Fix build.
17973 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
17975 * icall.c: Add MakePointType icall.
17977 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
17980 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17982 * threadpool.c: reuse allocated slots in the queue.
17984 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
17986 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
17988 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
17990 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
17993 * tabledefs.h: Add constants for pinvoke attributes BestFit and
17994 ThrowOnUnmappableChar.
17996 * icall.c (ves_icall_Type_GetPacking): New icall.
17998 2004-09-24 Martin Baulig <martin@ximian.com>
18000 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
18002 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18005 (mono_domain_set): allow setting a domain that is being unloaded.
18006 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
18009 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
18011 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
18012 the GetCustomAttributes icall.
18014 2004-09-23 Martin Baulig <martin@ximian.com>
18016 * object-internals.h (MonoReflectionGenericParam): Replaced
18017 'has_ctor_constraint', `has_reference_type' and `has_value_type'
18018 with `guint32 attrs'.
18020 2004-09-23 Martin Baulig <martin@ximian.com>
18022 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
18024 2004-09-23 Martin Baulig <martin@ximian.com>
18026 * object-internals.h (GenericParameterAttributes): New enum.
18028 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
18030 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
18032 * class.c (init_events): Fill out event->other field.
18034 * class.c: Fix warnings.
18036 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
18038 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
18040 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
18041 walk which doesn't supply the IL offset.
18043 2004-09-22 Martin Baulig <martin@ximian.com>
18045 * reflection.c (mono_reflection_setup_internal_class): If we're
18046 System.ValueType, System.Object or System.Enum, set
18047 `klass->instance_size' and create the vtable.
18048 (mono_reflection_create_internal_class): If we're an enum type,
18049 get the base class from our current corlib.
18051 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
18053 * reflection.h (MonoResolveTokenError): New type.
18055 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
18058 * icall.c: Add an 'error' argument to the ResolveToken icalls.
18060 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
18062 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
18063 Support also calling constructors, but only for already allocated objects.
18065 2004-09-17 Geoff Norton <gnorton@customerdna.com>
18067 * reflection.c (type_get_qualified_name): If the klass is null
18068 return the typename to avoid a NullRefEx.
18069 (encode_cattr_value): Get the qualified name of the boxed type,
18070 not the underlying enumtype. Fixes #62984.
18072 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
18074 * marshal.c: Fix problems with previous checkin.
18076 2004-09-21 <vargaz@freemail.hu>
18078 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
18079 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
18081 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
18083 2004-09-21 Geoff Norton <gnorton@customerdna.com>
18085 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
18086 should only return a type for pointers, arrays, and passbyref types.
18089 2004-09-21 Martin Baulig <martin@ximian.com>
18091 * domain.c (mono_debugger_check_runtime_version): New public
18094 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
18096 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
18098 * reflection.c: Added missing sort to the declarative security
18099 attributes table. MS implementation stops seeing the attributes if the
18100 token number regress in the table (as shown by ildasm and permview).
18102 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
18104 * object-internals.h (MonoReflectionModule): Add 'token' field.
18106 * reflection.c (mono_reflection_get_token): Add support for Module
18108 (mono_module_get_object): Set 'token' field.
18109 (mono_module_file_get_object): Set 'token' field.
18111 * icall.c: Add new Assembly and Module icalls.
18113 * appdomain.c: Bump corlib version.
18115 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
18117 * loader.h loader.c class.h class.c: Add helper functions for obtaining
18118 tokens of metadata objects.
18120 * reflection.h reflection.c (mono_reflection_get_token): New function
18121 to obtain the token of a metadata object.
18123 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
18125 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
18127 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
18129 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
18131 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
18133 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
18134 * object-internals.h: Added 3 MonoArray* members to MonoReflection
18135 AssemblyBuilder to access the permissions set in the class lib.
18136 * reflection.c: Added security attributes encoding step in
18137 mono_image_build_metadata.
18138 * tabledefs.h: Added new security actions defined in 2.0:
18139 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
18141 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
18143 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
18146 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
18148 * locales.c: nullify the ICU_collator member of CompareInfo when it is
18149 finalized. There where random SIGSEVs at program termination, when
18150 an object being finalized was trying to do a string comparison and
18151 the current culture was already finalized.
18153 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18155 * threads.c: call thread_cleanup before finishing the thread if we get
18158 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
18160 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
18161 assemblies from the parent. Fixes #65665.
18163 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
18165 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
18168 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
18170 * reflection.h: add prototype for mono_get_dbnull_object
18171 * reflection.c: add prototypes for get_default_param_value_blobs
18172 and mono_get_object_from_blob for fussier compilers
18174 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
18176 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
18177 false deadlock checks in class initialization.
18179 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
18181 * image.c (mono_image_addref): Fix comment.
18183 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
18186 2004-09-12 Jambunathan K <kjambunathan@novell.com>
18188 * reflection.c (mono_param_get_objects): Modified to return
18189 ParameterInfo.DefaultValue object.
18191 (get_default_param_value_blobs):
18192 (mono_get_object_from_blob):
18193 (mono_get_dbnull_object): New helper routines.
18195 * object.c (mono_get_constant_value_from_blob): New helper routine
18196 carved out from get_default_field_value ()
18198 * object-internals.h (mono_get_constant_value_from_blob): Added
18199 function declaration.
18201 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
18203 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
18204 referenced assemblies. Fixes #62135.
18206 * exception.h exception.c (mono_get_exception_file_not_found2): New
18209 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
18211 * class.h class.c: Add mono_type_get_underlying_type ().
18213 2004-09-09 Geoff Norton <gnorton@customerndna.com>
18215 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
18216 Fix GetTypes() to support dynamically created assemblies.
18218 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
18220 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
18222 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
18225 * reflection.h reflection.c loader.c: Allow dynamic construction of
18226 pinvoke methods. Fixes #65571.
18228 * reflection.c (mono_reflection_get_type): Revert previous change since
18229 it causes regressions.
18231 2004-09-08 Martin Baulig <martin@ximian.com>
18233 * class.c (class_compute_field_layout): Don't call
18234 mono_class_layout_fields() for open generic instances.
18236 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
18237 * threads.c appdomain.c: fix typo in GC macro
18239 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18241 * threads.c: don't call mono_thread_detach() in start_wrapper(),
18242 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
18244 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
18246 * image.c (mono_image_close): Applied patch from
18247 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
18248 assembly is loaded multiple times from data.
18250 * image.c (mono_image_open): Fix warning.
18252 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18254 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
18255 once. Fixes #58334.
18257 * reflection.c (mono_reflection_create_runtime_class): Initialize
18258 klass->nested_classes. Fixes #61224.
18260 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
18262 * threads.c: sched_yield() on exit, to allow threads to quit.
18264 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18266 * object.c (mono_unhandled_exception): Remove leftover debug code.
18268 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
18270 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
18272 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
18274 * marshal.c (emit_marshal_array): Really null terminate string arrays.
18276 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
18278 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18280 * marshal.c (emit_marshal_array): Null terminate string arrays.
18282 * marshal.c (raise_auto_layout_exception): Fix warning.
18284 * reflection.c (mono_param_get_objects): Initialize the default value
18285 with DBNull.Value, not null. Fixes #62123.
18287 2004-09-01 Miguel de Icaza <miguel@ximian.com>
18289 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
18290 throw an exception with a cute explanation.
18292 2004-09-06 Dick Porter <dick@ximian.com>
18294 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
18295 Close the new process's thread handle, as we don't use it. The
18296 handle stays around forever otherwise.
18298 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18300 * object.c (arith_overflow): Fix warning.
18302 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
18303 calling conventions in method refs. Fixes #65352.
18305 * reflection.c: Fix warnings.
18307 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
18309 * icall.c: Add a new icall for Array.Clear
18311 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
18313 * object.c: When allocating an array, we have to throw
18314 an overflow exception if any of the lengths are < 0.
18316 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
18318 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
18319 properly. Also move implementation of string array marshalling to
18320 managed code. Fixes #42316.
18322 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18324 * assembly.c: provide more information when loading an assembly fails.
18326 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18328 * filewatcher.c: don't expect the development fam package to be
18331 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
18333 * marshal.c: Make a copy of the signature cookie since it will be
18334 freed by the caller.
18336 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
18338 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
18340 * metadata.c (mono_metadata_free_marshal_spec): New function to free
18343 * marshal.c: More refactoring.
18345 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
18348 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
18350 * object.c: In mono_message_invoke, fill the output parameter array after
18351 calling the managed method (it was done before the call). This fixes
18354 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18356 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
18359 2004-09-02 Martin Baulig <martin@ximian.com>
18361 * class.c (mono_class_instance_size): Don't allow generic type
18362 definitions or open generic instances.
18363 (mono_class_array_element_size): If we're a value type, call
18364 mono_class_instance_size() on the original class.
18366 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
18367 handle generic instances.
18369 * mono-debug-debugger.c (write_type): Handle generic instances
18372 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
18374 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
18375 the allocation request fails. Fixes #65089.
18377 * object.c (mono_runtime_free_method): Do not call mono_free_method.
18379 * object.c (mono_runtime_free_method): New function to free a dynamic
18382 * marshal.c (mono_delegate_free_ftnptr): New function to free the
18383 delegate trampoline.
18385 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
18386 with hasthis as dynamic,
18388 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
18390 * domain.c (mono_jit_info_table_remove): New function to remove an
18391 entry from the jit info table.
18393 * class-internals.h (MonoMethod): Add 'dynamic' field.
18395 * loader.c: Fix warnings.
18397 2004-09-01 Martin Baulig <martin@ximian.com>
18399 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
18400 instead of mono_debugger_lock() because the latter one is a no-op
18401 unless running in the debugger.
18403 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
18405 * class.c (class_compute_field_layout): Classes with auto-layout or
18406 reference fields are not blittable.
18408 2004-09-01 Dick Porter <dick@ximian.com>
18410 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
18411 mono_image_get_filename() to get the assembly location.
18414 * metadata.h: Fix compile warnings
18416 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
18418 * class.c (class_compute_field_layout): System.Object is blittable.
18420 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
18421 as in/out. Fixes #59909.
18423 2004-09-01 Martin Baulig <martin@ximian.com>
18425 * metadata.h (MONO_TYPE_ISREFERENCE): Call
18426 mono_metadata_generic_inst_is_valuetype() if we're a generic
18427 instance to check whether our underlying type is a reference type.
18429 2004-09-01 Martin Baulig <martin@ximian.com>
18431 * metadata.c (mono_type_size): If we're a generic instance, call
18432 mono_class_value_size() for value types.
18434 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
18436 * marshal.c: Implement more custom marshalling functionality. Fixes
18439 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
18441 * mono-debug.c, debug-mono-symfile.c: add some locking love.
18443 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
18445 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
18447 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
18449 * icall.c: Fix some warnings.
18451 * threads.c (abort_appdomain_thread): Fix unref errors.
18452 (mono_thread_current): Fix THREAD_DEBUG define.
18454 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
18456 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
18458 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
18460 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
18462 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
18465 2004-08-28 Martin Baulig <martin@ximian.com>
18468 (mono_metadata_generic_inst_is_valuetype): New public function.
18470 * metadata.h (MONO_TYPE_ISSTRUCT): Call
18471 mono_metadata_generic_inst_is_valuetype() if we're a generic
18472 instance to check whether our underlying type is a valuetype.
18474 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
18476 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
18479 2004-08-25 Martin Baulig <martin@ximian.com>
18481 * loader.c (mono_get_method_from_token): Abstract methods can also
18482 be generic and thus have type parameters.
18484 * metadata-internals.h
18485 (MonoDynamicImage): Added `GPtrArray *gen_params'.
18487 * reflection.c (mono_image_get_generic_param_info): Don't create a
18488 metadata row, just add an entry to the `gen_params' array.
18489 (build_compressed_metadata): Sort the `gen_params' array and then
18490 actually create the metadata.
18492 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18494 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
18496 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
18498 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
18500 2004-08-24 Martin Baulig <martin@ximian.com>
18502 * class.cs (mono_class_is_subclass_of): Like an interface, a
18503 generic instance also derives from System.Object.
18505 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
18507 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
18508 custom modifiers to be in any order. Fixes #61990.
18510 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
18512 * object.c: Register mono_object_new_fast icall.
18514 * object.c (mono_class_get_allocation_ftn): Return to calling
18515 mono_object_new_fast, since it seems faster to compute the object
18516 size in unmanaged code than passing it as a parameter.
18518 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
18520 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
18521 this function with Boehm as the oom handler, so we don't have to check
18522 the result of GC_malloc.
18524 * object.c: Remove checks for oom.
18526 * object.h object.c (mono_class_get_allocation_ftn): New function to
18527 return the icall which can be used to allocate an instance of a given
18530 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
18532 * class-internals.h: Add 'enabled' field.
18534 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
18536 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
18538 2004-08-18 Jambunathan K <kjambunathan@novell.com>
18539 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
18542 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
18544 * appdomain.c: use the Tls function for appdomain too,
18545 at Zoltan's request. Actually return in mono_context_get
18547 * appdomain.c, profiler.c, threads.c: use __thread
18549 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
18551 * appdomain.c threads.c: Call GC_CreateThread on windows.
18553 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
18554 multiple libraries since this don't work on windows.
18556 2004-08-18 Martin Baulig <martin@ximian.com>
18558 * class-internals.h
18559 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
18562 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
18563 MonoMethodNormal since we also need it for abstract and interface
18567 (build_compressed_metadata): Sort the GenericParam table.
18568 (mono_image_create_token): Added `gboolean create_methodspec'
18569 argument; this is false when generating a MethodImpl token.
18570 (reflection_methodbuilder_to_mono_method): Abstract and interface
18571 methods may also have generic parameters.
18573 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
18575 * appdomain.c: thread local alloc
18577 2004-08-17 Martin Baulig <martin@ximian.com>
18579 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
18582 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
18585 * class.c (mono_type_get_full_name): New public function.
18586 (mono_type_get_name): Don't include the type arguments.
18588 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
18590 * Makefile.am: Build static versions of libmetadata and libmonoruntime
18591 for inclusion into the mono executable.
18593 2004-08-16 Martin Baulig <martin@ximian.com>
18595 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
18596 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
18598 2004-08-14 Martin Baulig <martin@ximian.com>
18600 * class.c (dup_type): Also copy the `byref' field.
18602 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
18604 * reflection.c (create_dynamic_mono_image): Revert the last change
18605 since it breaks bootstrap.
18607 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
18609 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
18611 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
18612 not free them with g_free.
18614 2004-08-11 Martin Baulig <martin@ximian.com>
18616 * reflection.c (mono_reflection_setup_internal_class): Also call
18617 mono_class_setup_mono_type() if we already have a `tb->type.type'.
18619 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
18621 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
18622 called during default (first) AppDomain creation. Keep track of
18623 Evidence when loading assemblies.
18625 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
18627 * opcodes.c, opcodes.h: reduce runtime relocations.
18629 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
18631 * culture-info.h, locales.c: fixes and chages to sue the new
18632 optimized format of the locale data.
18633 * culture-info-tables.h: regenerated.
18635 2004-08-06 Geoff Norton <gnorton@customerdna.com>
18637 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
18639 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
18641 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
18642 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
18643 * domain-internals.h: icall declaration.
18644 * icall.c: icall registration.
18645 * object-internals.h: New fields in MonoAssembly for CAS.
18647 2004-08-05 Duncan Mak <duncan@ximian.com>
18649 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
18652 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
18654 * reflection.c: fix to deal with object[] arrays in custom ctors
18657 2004-08-05 Martin Baulig <martin@ximian.com>
18659 * class.c (mono_class_array_element_size): Added support for
18660 generic instances and correctly handle "recursive" types.
18662 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
18664 * assembly.c: Fix warnings.
18666 2004-08-04 Martin Baulig <martin@ximian.com>
18669 (mono_type_get_name_recurse): Added `gboolean include_arity'
18670 argument specifying whether or not we should include the generic
18671 arity in the type name.
18672 (_mono_type_get_name): New static function.
18673 (mono_class_setup_vtable): If we're a generic instance, don't
18674 include the generic arity in the names of explicit method
18677 2004-08-03 Martin Baulig <martin@ximian.com>
18679 * class.c (mono_type_get_name_recurse): Enclose the generic type
18680 arguments in `<', '>'.
18682 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
18684 * gc.c: make GC warning messages use the trace API, they are just
18685 noise to most of the users.
18687 2004-08-03 Martin Baulig <martin@ximian.com>
18689 * debug-mono-symfile.c (read_string): Correctly read the string.
18691 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
18693 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
18695 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
18697 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
18699 2004-07-30 Martin Baulig <martin@ximian.com>
18701 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
18702 Reflect latest symbol writer changes.
18704 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
18706 * object.c: always create an object if null is passed
18707 to Invoke() where a valuetype is expected.
18709 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
18711 * marshal.c (mono_marshal_init): make managed
18712 signatures match native ones better for 64bits.
18714 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18716 * appdomain.c: hack to build correctly the private bin path on windows.
18719 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
18721 * assembly.c: Load mscorlib from the correct framework directory
18722 (mono/<version>/mscorlib.dll).
18723 * appdomain.h: Added prototypes for new functions.
18724 * internals.h: Added some prototypes.
18725 * domain.c: When initializing the runtime, get from the executable and
18726 the configuration files the runtime version that the app supports.
18727 Added support methods for reading app.exe.config. Added list of versions
18728 supported by the JIT. Added two new methods: mono_init_from_assembly,
18729 which initializes the runtime and determines the required version from
18730 the provided exe file, and mono_init_version, which initializes
18731 the runtime using the provided version.
18732 * icall.c: Get machine.config from version-specific directory.
18733 * reflection.c: When generating an image, embed the version number
18734 of the current runtime.
18736 2004-07-28 Dick Porter <dick@ximian.com>
18739 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
18740 returned sockaddr size before creating the remote address object.
18741 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
18744 2004-07-28 Dick Porter <dick@ximian.com>
18746 * locales.c (string_invariant_compare_char): Fix invariant char
18747 compares between upper and lower cases. Fixes bug 61458.
18749 2004-07-27 Ben Maurer <bmaurer@ximain.com>
18751 * marshal.c: actually cache stelem.ref wrappers.
18753 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18755 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
18756 sections and remove the mono_cli_rva_map () function.
18758 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
18760 * debug-mono-symfile.c: fix one more endianess issue, from a patch
18761 by Geoff Norton (<gnorton@customerdna.com>).
18763 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
18765 * class.c: fix class loads for pointer types (typeof(int) !=
18768 2004-07-27 Martin Baulig <martin@ximian.com>
18770 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
18771 reading the debugging information from an external ".mdb" file.
18773 2004-07-24 Martin Baulig <martin@ximian.com>
18775 * reflection.c (mono_image_get_type_info): Only write a class
18776 layout entry if we actually have a size or a packing size.
18778 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
18780 * reflection.c (type_get_fully_qualified_name):
18781 insert cast to get type checking of ?: with non-gcc compilers
18783 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
18785 * rand.c: use g_getenv for both lookups of
18788 2004-07-17 Martin Baulig <martin@ximian.com>
18790 * reflection.c (mono_reflection_bind_generic_method_parameters):
18791 Set `gmethod->reflection_info'.
18793 2004-07-17 Martin Baulig <martin@ximian.com>
18795 * class.c (mono_class_create_from_typedef): Insert the newly
18796 created class into the hash table before computing the interfaces
18797 since we could be called recursively.
18799 2004-07-16 Ben Maurer <bmaurer@ximain.com>
18801 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
18802 function to implement stelem.ref in managed code
18803 * class-internals.h, debug-helpers.c: a new wrapper type
18806 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
18808 * gc.c: allow GC handles to work even when no GC is compiled in.
18809 Fix part of bug #61134 (GetAddrOfPinnedObject).
18811 2004-07-13 Peter Williams <peter@newton.cx>
18813 * process.c (complete_path): Make sure we don't attempt to execute
18816 2004-07-12 Geoff Norton <gnorton@customerdna.com>
18818 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
18819 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
18820 and will add/subtract the hour if needed
18822 2004-07-12 Martin Baulig <martin@ximian.com>
18824 * reflection.c (mono_field_get_object): If we have
18825 `field->generic_info', take the attributes from
18826 `field->generic_info->generic_type'.
18828 2004-07-12 Martin Baulig <martin@ximian.com>
18830 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
18831 This function must be called before initializing the runtime.
18832 (mono_debug_init_1): New function; call this after initializing
18833 the runtime, but before loading the assembly. It tells the
18834 debugger to load corlib and the builtin types.
18836 * mono-debug-debugger.c: Did some larger changes in the debugging
18837 code; support recursive class declarations, make sure we actually
18840 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18842 * debug-helpers.c: undo my previous patch and fixed the real issue in
18843 ../mini/exceptions-x86.c
18845 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18847 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
18848 when no HOME env. variable was set and a NullRef was thrown in a .cctor
18849 called from other .cctors.
18851 2004-07-09 Miguel de Icaza <miguel@ximian.com>
18853 * loader.c: Removed the mono_loader_wine_init hack now that we are
18854 doing a managed version of Windows.Forms.
18856 2004-07-09 Ben Maurer <bmaurer@ximian.com>
18858 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
18859 threadpool.c, threads.c: remove static data from rootset.
18861 2004-07-09 Dick Porter <dick@ximian.com>
18863 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
18864 Don't do any more processing if the matched length was 0. It was
18865 increasing the size of the string before. Fixes bug 61167.
18867 2004-07-09 Dick Porter <dick@ximian.com>
18871 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
18872 Add support for SO_PEERCRED if its available.
18874 2004-07-09 Peter Bartok <pbartok@novell.com>
18875 * loader.c: winelib.exe.so error message is now only displayed if
18876 MONO_DEBUG is set. To help us avoid questions when people are trying
18877 out the new Managed.Windows.Forms.
18879 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
18881 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
18882 for isinst and castclass wrappers.
18884 * class-internals.h icall.c: Move registration and lookup of JIT icalls
18885 to libmetadata from the JIT, so they could be used by the marshalling
18886 code and the interpreter.
18888 * marshal.c: Register marshalling related JIT icalls here instead of
18889 in mini.c. Use CEE_MONO_ICALL instead of the family of
18890 CEE_MONO_PROC<x> opcodes to call marshalling functions.
18892 * metadata.h: Remove unneeded marshalling conversions.
18894 * opcodes.c: Update for new opcodes.
18896 2004-07-08 Martin Baulig <martin@ximian.com>
18898 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
18899 (mono_debug_get_domain_data): Make this function static.
18901 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
18903 * gc.c, object.h: add nice GC handle API for embedders.
18905 2004-07-06 Ben Maurer <bmaurer@ximian.com>
18907 * reflection.c: more changes for the new api
18909 * object.c: When we reflect on a field w/ a constant value, it
18910 will not have a memory location, so we must access metadata. Also,
18911 allow easier reading of strings so that we can read them from
18914 * class.c (mono_class_layout_fields): no need for literal fields here.
18916 * class-internals.h: api changes for const fields
18918 * icall.c (ves_icall_get_enum_info): use new apis for const fields
18920 2004-07-06 Martin Baulig <martin@ximian.com>
18922 * mono-debug.h: Increment version number to 44.
18924 * mono-debug.c (mono_debug_add_wrapper): The second argument is
18925 now a gpointer, rewrote this whole method.
18927 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
18928 function. Add information about the wrapper in a new "misc table".
18930 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
18931 for the new misc table.
18933 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
18935 * metadata-internals.h image.c: Add a cache for helper signatures.
18937 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
18939 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
18941 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
18942 delegates from a delegate. Fixes #61033.
18944 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
18945 marshalling of stringbuilder arrays. Fixes #59900.
18947 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
18949 * icall.c: Add EnumBuilder:setup_enum_type icall.
18951 2004-06-30 Ben Maurer <bmaurer@ximian.com>
18953 * icall.c: Added a new icall for the property version of
18954 OffsetOfStringData.
18956 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
18958 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
18959 it has a constant size across platforms.
18961 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
18964 2004-06-29 Martin Baulig <martin@ximian.com>
18966 * mono-debug.c (mono_debug_add_method): Protect the whole function
18967 in mono_debugger_lock(), not just parts of it.
18969 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
18971 * reflection.c: make sure padding bytes in heaps are zeroed.
18973 2004-06-24 David Waite <mass@akuma.org>
18975 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
18976 image.c, loader.c, locales.c, marshal.c, metadata.c,
18977 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
18978 string-icalls.c, threads.c: change to C90-style comments from C99 /
18981 2004-06-24 Dick Porter <dick@ximian.com>
18984 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
18985 return createdNew. Fixes bug 60412.
18988 * icall.c: Add createdNew parameter to CreateMutex icall
18990 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
18992 * reflection.c, object-internals.h: save default value in params.
18994 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18996 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
18997 no need to build a new path combining that with the application base.
19000 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19002 * reflection.c: fixed minor standard compliance issues.
19004 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
19006 * reflection.c: fixed issue with encoding some custom attributes
19007 (arrays in properties and fields, bug #60411).
19009 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19011 * reflection.c: fix start address when copying the public key token.
19013 2004-06-23 Martin Baulig <martin@ximian.com>
19015 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
19016 the `exc' object in a static object to put it into the GC's root set.
19018 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19020 * reflection.c: make mono_reflection_setup_internal_class ()
19021 callable a second time to setup a new parent class.
19023 2004-06-23 Dick Porter <dick@ximian.com>
19025 * threads.c: Check for WAIT_IO_COMPLETION return values.
19027 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
19029 * appdomain.c: Removed the g_free on the public key token. Now copy
19030 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
19031 * assembly.c: Added public key token string value when loading
19032 assemblies. Fix bug #60439.
19033 * icall.c: Added missing informations (like public key) in
19034 GetReferencedAssemblies. Fix #60519.
19035 * image.h: Changed definition for public key token from const char*
19036 public_tok_value to guchar public_key_token [17];
19037 * reflection.c: Updated for changes to public key token.
19039 2004-06-22 Lluis Sanchez Gual
19041 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
19042 for the field in base classes.
19044 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
19046 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
19047 mark headers as not supported, they are installed only for use by the
19050 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
19052 * *.c, *.h: avoid namespace pollution in public headers.
19054 2004-06-21 Martin Baulig <martin@ximian.com>
19056 * exception.c (mono_get_exception_security): It's in
19057 "System.Security", not in "System".
19059 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
19060 the exception classes.
19062 2004-06-21 Martin Baulig <martin@ximian.com>
19064 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
19065 Protect the exception object from being finalized.
19067 2004-06-21 Martin Baulig <martin@ximian.com>
19069 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
19072 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
19074 * reflection.c: Load the assembly in mono_reflection_type_from_name,
19075 if it was not loaded before. Fix parts of #60439.
19077 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
19079 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
19080 code that was broken since Ben's change: wrappers are now
19081 dependent on the method signature only again.
19083 2004-06-21 Martin Baulig <martin@ximian.com>
19085 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
19086 added interface support.
19088 2004-06-21 Martin Baulig <martin@ximian.com>
19090 * class.c (mono_vtable_get_static_field_data): New public method.
19092 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
19094 * filewatcher.c : Windows build fix to be compliant with API changes.
19096 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19098 * class.h, class.c: more accessors.
19099 * metadata.h, metadata.c: prepare for hiding MonoType and
19100 MonoMethodSignature: people should use the accessors from now on
19101 outside of the tree.
19103 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19105 * *.c, *.h: more API cleanups.
19107 2004-06-18 Jackson Harper <jackson@ximian.com>
19109 * assembly.c: Trace loading assemblies.
19110 * loader.c: Trace loading native libraries.
19111 * mono-config.c: Trace loading config files.
19113 2004-06-18 Dick Porter <dick@ximian.com>
19115 * locales.c: Tell ICU the lengths of strings, it can cope with
19116 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
19118 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19120 * image.c: swapped name/filename;
19122 2004-06-18 Martin Baulig <martin@ximian.com>
19124 * mono-debug-debugger.c (write_class): Write the parent class at
19125 the end of the header.
19127 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
19129 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
19131 2004-06-17 Raja R Harinath <rharinath@novell.com>
19133 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
19134 (bundle_obj): New conditional define.
19135 (BUILT_SOURCES): Remove.
19136 ($(bundle_srcs)): Make parallel-make safe.
19137 (libmonoruntime_la_LIBADD): Make unconditional.
19138 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
19139 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
19141 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
19143 * culture-info-tables.h: It was inconsistent with the latest
19146 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
19148 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
19151 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
19154 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19156 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
19157 cleaned up public header threads.h.
19159 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19161 * Makefile.am, *.c, *.h: more API cleanups.
19163 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19165 * Makefile.am: removed monosn from compilation.
19166 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
19167 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
19168 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
19169 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
19170 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
19171 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
19173 2004-06-15 Jackson Harper <jackson@ximian.com>
19175 * assembly.c: Make locales lower case when searching the GAC for
19176 assemblies. gacutil will always make locales lowercase when
19177 installing so this effectively makes them case insensitive.
19179 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
19181 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
19182 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
19183 parameter which allows to choose whether the wait can be interrupted or
19184 not. Also added the method mono_monitor_enter(), which locks the monitor
19185 using an infinite wait and without allowing interruption.
19186 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
19188 * object.h: Added new fields in MonoThread. suspend_event holds the event
19189 used to susped/resume the thread. synch_lock is the lock object to use for
19190 modifying the thread state.
19191 * threads.c: Use the new synch_lock object for locking, instead of "this",
19192 which can generate deadlocks.
19193 Moved thread state change in Thread.Sleep and Thread.Join from managed
19194 to unmanaged code. This avoids a deadlock when the thread was suspended
19195 just after acquiring the thread lock.
19196 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
19197 Implemented Thread.Suspend using an event instead of ThreadSuspend,
19198 which is not fully implemented in the io-layer.
19199 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
19201 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
19203 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
19204 threads-types.h: more API cleanups.
19206 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19208 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
19209 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
19210 threadpool.c, threads.c: first pass at the exported API cleanup.
19212 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19214 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
19216 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19218 * icall.c: added internalGetHome.
19220 2004-06-14 Dick Porter <dick@ximian.com>
19222 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
19223 possible to return successfully when '.' or '..' were the only
19224 entries in a directory, but were skipped. The MonoIOStat was not
19225 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
19228 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19230 * reflection.c: make binaries run on .Net 1.1 by default.
19232 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19234 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
19236 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
19238 * marshal.c: keep track of struct size with explicit layout
19241 2004-06-12 Martin Baulig <martin@ximian.com>
19243 * mono-debug-debugger.c: Comment out a debugging g_message().
19245 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
19247 * reflection.c, reflection.h: do not free custom attrs that are cached.
19248 * icall.c: use braces to make code clearer.
19250 2004-06-11 Martin Baulig <martin@ximian.com>
19252 * class.h (MonoInflatedField): New type.
19253 (MonoClassField): Replaced `MonoType *generic_type' with
19254 `MonoInflatedField *generic_info'.
19257 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
19259 2004-06-11 Martin Baulig <martin@ximian.com>
19261 * reflection.c (mono_image_create_method_token): Correctly encode
19264 2004-06-11 Martin Baulig <martin@ximian.com>
19266 * metadata.c (mono_metadata_parse_method_signature): When parsing
19267 a MethodDef which has VarArgs, also set sentinelpos if we don't
19268 have any parameters.
19270 2004-06-11 Martin Baulig <martin@ximian.com>
19272 * verify.c (mono_method_verify): In CEE_CALL, use
19273 mono_method_get_signature() to get the method's signature, unless
19274 we're a PInvoke method.
19276 2004-06-10 Jackson Harper <jackson@ximian.com>
19278 * assembly.c: Use <path>/lib/mono/gac for the extra paths
19279 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
19280 logical name as the supplied path is just a prefix to the gac not
19281 the direct path to it.
19283 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
19285 * reflection.c: make the token for a created method match
19286 the token of the MethodBuilder it was created from
19287 (IKVM requires this behaviour now).
19289 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
19291 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
19292 reflection.c, socket-io.c: leak fixes.
19294 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19296 * icall.c: handle sentinel pos in vararg methods in position different
19299 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19301 * culture-info-tables.h: freshly generated.
19303 2004-06-09 Martin Baulig <martin@ximian.com>
19305 * loader.c (mono_get_method_constrained): Call `mono_class_init
19306 (constrained_class)'.
19308 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
19310 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
19311 any methods. Fixes #59629.
19313 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
19315 * culture-info-tables.h: reflecting locale-builder updates.
19317 2004-06-08 Dick Porter <dick@ximian.com>
19320 * locales.c: Fixed compile warnings, including a real bug in
19321 CompareInfo_internal_compare.
19323 2004-06-08 Dick Porter <dick@ximian.com>
19326 (ves_icall_System_Globalization_CompareInfo_internal_index):
19327 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
19328 Double-check the resuls of usearches, because ICU currently
19329 ignores most of the collator settings here. Fixes bug 59720.
19331 2004-06-08 Dick Porter <dick@ximian.com>
19334 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
19335 Fix memory leak and segfault-causing typo. No idea how this one
19336 lasted so long without being noticed.
19338 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
19340 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
19341 any methods. Fixes #59629.
19343 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19346 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
19347 own the critical section before). Removed dead code (that's done
19348 in the preload hook).
19350 (mono_assembly_load_with_partial_name): call the preload hook.
19352 2004-06-08 Martin Baulig <martin@ximian.com>
19354 * metadata.c (mono_metadata_signature_alloc): Default
19355 `sentinelpos' to -1.
19357 * reflection.c (mono_image_get_array_token): Likewise.
19359 2004-06-08 Martin Baulig <martin@ximian.com>
19361 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
19363 * metadata.c (mono_metadata_parse_method_signature): When parsing
19364 a MethodDef which has VarArgs, set sentinelpos.
19366 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
19367 `gint16' since we're using -1 for non-varargs methods.
19370 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
19371 (method_encode_signature): Added varargs support.
19372 (method_builder_encode_signature): Likewise.
19373 (mono_image_get_varargs_method_token): New static method.
19374 (mono_image_create_method_token): New public method; this is
19375 called via an icall instead of mono_image_create_token() when
19376 calling a varargs method.
19378 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
19380 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
19382 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
19384 * culture-info-tables.h : Reflecting the latest locale-builder that
19385 fixed empty array representation ({} to {0}).
19387 2004-06-07 Jackson Harper <jackson@ximian.com>
19389 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
19390 looking up extra gac paths. This allows MONO_GAC_PATH to act
19391 exactly like a prefix.
19393 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
19395 * reflection.c (mono_reflection_type_from_name): Make a copy of the
19396 type name before modifying it. Fixes #59405.
19398 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
19400 * culture-info.h: added fields for "all datetime patterns".
19401 * locales.c: ( ves_icall_System_Globalization_CultureInfo
19402 _construct_datetime_format ()): fill xxx_patterns fields.
19403 * object.h: added fields for "all datetime patterns" to
19404 MonoDateTimeFormatInfo.
19405 * culture-info-tables.h: reflecting locale-builder updates.
19407 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
19409 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
19410 the event has no add and remove methods. Fixes #59629.
19412 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
19414 * object.c: Fixed possible integer overflow when allocating large
19417 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
19419 * culture-info-tables.h: reflecting locale-builder updates.
19421 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
19423 * culture-info-tables.h: reflecting locale-builder updates.
19425 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
19427 * culture-info-tables.h: reflecting locale-builder updates.
19429 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
19431 * threads.c: Made Thread.Sleep abortable.
19433 2004-06-02 Martin Baulig <martin@ximian.com>
19435 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
19437 * debug-mono-symfile.h: Bumped symbol file version number to 37.
19439 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
19441 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
19443 2004-05-30 Jackson Harper <jackson@ximian.com>
19445 * reflection.c: Do not hardcode assembly versions or public key
19446 tokens anymore. All of this except the corlib section was dead
19449 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
19451 * object.c (mono_runtime_invoke_array): Automatically create boxed
19452 objects for byref valuetypes if needed. Fixes #59300.
19454 * object.c (mono_method_return_message_restore): Handle
19455 MONO_TYPE_OBJECT as well.
19457 2004-05-28 Jackson Harper <jackson@ximian.com>
19459 * reflection.c: The modified type encoding was causing build
19460 problems. Reverted for now.
19462 2004-05-28 Jackson Harper <jackson@ximian.com>
19464 * reflection.c/h: Take an assembly ref so that we dont create
19465 fully qualified names when encoding types in the same assembly as
19466 the custom attribute being emitted.
19467 * appdomain.c: Increment version number.
19469 2004-05-26 Duncan Mak <duncan@ximian.com>
19472 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19473 Set the full version number (major, minor, build, revision).
19475 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
19477 * marshal.c (emit_struct_conv): increment src/dst after blit
19478 (mono_marshal_get_managed_wrapper,
19479 mono_marshal_get_native_wrapper): make sure we have marshalling
19480 info before marshalling params (info computation affects
19483 * class.c (class_compute_field_layout): correctly deal with
19485 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
19486 value types (as per what windows dows by default)
19487 (mono_class_setup_mono_type): System.ValueType is blittable
19488 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
19491 * marshal.c (mono_marshal_load_type_info): flag types as
19492 non-blittable if the native layout doesn't match the managed
19495 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19497 * appdomain.c: don't add stuff in the private search path that is
19498 above the application base. If application base is not set, there's
19499 no private search path.
19501 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
19503 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
19504 byref struct arguments in native->managed marshalling.
19506 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
19508 * marshal.c (mono_marshal_get_runtime_invoke): correctly
19509 cache methods using signature (special case for methods
19510 that are value type or string class)
19512 * image.c (mono_image_close): clean up allocated GSList's
19513 in runtime_invoke_cache.
19515 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19517 * mono-config.c: set the correct path for mono_cfg_dir on windows when
19518 there's no MONO_CFG_DIR environment variable defined.
19520 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19522 * threads.c: windows version must be >= 0x0500 to include OpenThread.
19524 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
19526 * threadpool.c: Really wait for 500ms after the async call, even if the wait
19528 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
19529 before waiting for it, and call CloseHandle after the wait to unref it.
19530 This will make sure that handles are not disposed too early.
19532 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19537 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
19540 * object.c: se the application_base only for the domain that runs
19541 Main. Fixes bug #59216,
19543 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19546 * object.c: only the domain in which Main is run have
19547 SetupInformation.ConfigurationFile set, so moved a few lines from
19548 appdomain.c to object.c.
19550 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19552 * appdomain.c: we tried to load [name].(dll|exe), but according
19553 to bug #57710, we must also try [culture]/[name].(dll|exe) and
19554 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
19555 There's a test case attached to bug #58922.
19557 2004-05-27 Dick Porter <dick@ximian.com>
19560 * file-io.c: Implemented icalls for locking and unlocking regions
19562 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
19563 FALSE on error (fixes both compiler warning and real bug.)
19565 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
19567 * culture-info-tables.h: reflecting locale-builder updates.
19569 (Added missing ChangeLog entry for 05/26)
19571 2004-05-27 Jackson Harper <jackson@ximian.com>
19573 * locales.c: Fix some cut and paste errors.
19575 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19577 * mono-config.c: set the correct path for config. directory on windows.
19579 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
19581 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
19584 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
19586 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
19587 from pinvoke functions.
19589 * marshal.c (mono_ftnptr_to_delegate): Implement this.
19591 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
19593 * culture-info-tables.h: reflecting locale-builder updates.
19595 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
19597 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
19600 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
19602 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
19603 * icall.c: Modified icalls for RNG.
19604 * rand.c|h: Changed RNG interface to allow thread-safe usage under
19605 Windows (CryptoAPI).
19607 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
19609 * locales.c: Fix build.
19611 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
19613 * culture-info-tables.h: reflecting locale-builder updates.
19615 2004-05-25 Jackson Harper <jackson@ximian.com>
19617 * locales.c: When creating the current culture use the $LANGs
19618 specific culture. So DateTimeFormat and NumberFormat entries are created.
19620 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
19622 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
19623 a char array as parameter.
19625 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
19627 * image.c: In mono_image_open(), always use an absolute path name to
19628 look for already loaded images.
19630 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
19632 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
19633 missing in the windows build (like older cygwin include files).
19635 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
19637 * icall.c: Fixed check for possible integer overflow in Buffer_
19638 BlockCopy icall. Replaced comments style // by /* */.
19640 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
19642 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
19644 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
19645 check after MONO_VTADDR. Fixes pinvoke2.exe.
19647 * marshal.h marshal.c metadata.h: Add beginnings of support for
19648 ftnptr -> delegate marshalling.
19650 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
19652 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
19653 * threads.c: Fix warnings.
19655 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
19657 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
19658 * icall.c: Registered icalls for Suspend and Resume.
19659 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
19661 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
19662 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
19663 * process.c: Use WaitForSingleObjectEx.
19664 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
19666 * threads.c, threads.h: Make use of new Ex wait methods. Improved
19667 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
19668 for Suspend and Resume. Added new mono_thread_stop, used for stoping
19669 background threads. Added basic support for Abort in Windows.
19670 Start new threads using a managed delegate invoke wrapper. This wrapper
19671 has an interruption checkpoint that is needed since an interruption
19672 can be requested before the thread leaves the unmanaged code that starts
19674 * marshal.c: Added interruption checkpoint after every native call, and
19675 also before managed calls for wrappers called from unmanaged code to
19676 go into managed code.
19677 * object.h: Added new field in MonoThread to keep track of interruption
19680 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
19682 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
19685 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19692 * rand.c: getenv -> g_getenv (windows!)
19694 * process.c: complete_path is also used on non-windows platforms.
19696 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19698 * icall.c: new signature for Process_Start.
19700 * process.[ch]: new signature for Process_Start. If we're on windows
19701 and UseShellExecute is false, we have to search for the program by
19702 ourselves if we don't get a full path.
19704 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
19706 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
19707 marshalling and call CleanUpNativeData if needed. Fixes #58646.
19709 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19711 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
19714 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19716 * process.c: use double quotes to quote program name and arguments on
19717 windows. Fixes bug #58575.
19719 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19721 * file-io.c: don't return "." and ".." when using windows Find*File.
19723 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
19725 * marshal.c: Don't pass wrappers to message init because method
19726 addressed used to lookup metadata. part of remoting[2|3] fix.
19728 2004-05-15 Jackson Harper <jackson@ximian.com>
19730 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
19731 path is essentially the same as MONO_PATH except that it points to
19732 GACs instead of lib directories.
19733 * loader.h: The user gac is gone so we dont need function to
19735 * mono-config.c: user gac option is now gone.
19737 2004-05-15 Jackson Harper <jackson@ximian.com>
19739 * culture-info.h: Make defines more consistent, add calendar data
19740 to the culture info table.
19741 * culture-info-tables.h: Add basic calendar data. Basically
19742 everyone gets default gregorian until all the data is
19744 * locales.c: Use the new consistent defines. Set calendar data for
19745 culture info objects.
19746 * object.h: add a field for calendar data to CultureInfo
19748 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
19750 * image.c: image->runtime_invoke_cache is keyed on signatures now.
19751 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
19753 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
19754 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
19755 an extra param that is the pointer of the method to invoke. The IL for
19756 the invoke method is no longer specific to the method, but to the
19757 signature of the method. Thus, we can share the same code for multiple
19758 methods. This reduces the number of methods that have to be compiled.
19760 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
19762 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
19764 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
19766 * icall.c: Optimize Buffer.BlockCopy.
19768 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19770 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
19771 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
19772 quote). Changed them to "MMMM yyyy".
19774 2004-05-12 Miguel de Icaza <miguel@ximian.com>
19777 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
19779 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
19781 * reflection.h: Updated after changes to managed structures.
19783 * appdomain.c: Bump corlib version.
19785 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19787 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
19790 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19792 * Makefile.am: link to ../os/libmonoos.la on windows.
19795 -If MONO_DEBUG, warn about non-existing directories in
19797 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
19798 compile time variable.
19799 -Removed init_default_path and call mono_set_rootdir from
19800 libmonoos.a instead (windows only).
19802 * assembly.h: declare mono_assembly_getrootdir().
19805 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
19807 * loader.c: s/getenv/g_getenv/
19809 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
19811 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
19813 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
19815 * metadata.h: Add new marshalling conversions.
19817 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
19820 * reflection.c (mono_reflection_get_type): Lookup the type in all
19821 modules of a multi-module assembly. Fixes #58291.
19823 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
19825 * threads.c: Before aborting a background, set the StopRequested
19826 state. This avoids throwing the Abort exception.
19827 In mono_thread_manage, don't continue with the shutdown until all
19828 aborted threads have actually stopped.
19830 2004-05-10 Jackson Harper <jackson@ximian.com>
19832 * locales.c: Remove the modifier from culture names.
19834 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19836 * Makefile.am: monosn is not installed any more. It has been deprecated
19839 2004-05-07 Jackson Harper <jackson@ximian.com>
19842 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
19843 Fix array construction, add bailout if the length is 0.
19845 2004-05-07 Dick Porter <dick@ximian.com>
19847 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
19848 machine doesn't have a DNS entry. Patch by Urs Muff
19849 (umuff@quark.com), fixes bug 57928.
19851 2004-05-06 Jackson Harper <jackson@ximian.com>
19853 * reflection.c: Handle null PublicTokens properly. alloc mem for
19854 assembly names culture so we dont crash when freeing it.
19856 2004-05-06 Jackson Harper <jackson@ximian.com>
19858 * assembly.c: Check the usergac when loading with partial names.
19860 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
19862 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
19863 does nothing for now (not required for Linux/Windows) but the class
19864 library can call it (and a newer or modified runtime could need it).
19865 * icall.c: Registred icall.
19867 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19869 * loader.c: prints a message on module loading error we set MONO_DEBUG
19870 environment variable.
19872 2004-05-05 Jackson Harper <jackson@ximian.com>
19874 * appdomain.c: Handle PublicKeyToken=null properly.
19876 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
19878 * environment.c|h: Added icall ves_icall_System_Environment_
19879 GetOSVersionString to get the current OS version as a string.
19880 * icall.c: Registred icall.
19882 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
19884 * object.c: in mono_object_get_virtual_method(), take into account that
19885 non-virtual methods don't have a slot in the vtable. Check needed when
19886 the object is a proxy.
19888 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
19890 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
19891 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
19893 * object.c (mono_class_compute_gc_descriptor): Fix warning.
19895 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
19896 passed when a valuetype is expected.
19898 * object.c (mono_unhandled_exception): Only set the exit code if the
19899 exception happens in the main thread. Fixes thread5.exe.
19901 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
19902 invalid names. Fixes #58047.
19904 2004-05-03 Jackson Harper <jackson@ximian.com>
19906 * assembly.c: This line was committed accidently and is unneeded.
19908 2004-05-03 Jackson Harper <jackson@ximian.com>
19910 * icall.c: Add new icall for Assembly::LoadWithPartialName
19911 * assembly.c/.h: new function that probes the GAC to load partial
19912 assembly names by Paolo Molaro.
19914 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19916 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
19917 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
19918 (type_get_fully_qualified_name): Added PublicKeyToken when building a
19921 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19923 * appdomain.c: fixed check for 'neutral' culture and removed warning.
19924 * reflection.c: fix bug when parsing a full type name and Version is not
19925 the last thing in the string.
19927 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
19929 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
19930 crashes when it is freed.
19932 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19934 * assembly.c: print the compat warning to stderr.
19936 2004-05-01 Miguel de Icaza <miguel@ximian.com>
19938 * assembly.c (mono_assembly_load_references): Add a compatibility
19939 hack to run old applications that might be still referencing the
19940 3300-based assemblies, only do this for System.xxx.
19942 2004-05-01 Jackson Harper <jackson@ximian.com>
19944 * appdomain.c: If the culture is neutral we set it to "".
19946 2004-04-29 Jackson Harper <jackson@ximian.com>
19948 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
19950 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
19952 * string-icalls.c: added low overhead function for copying chars
19953 * icall.c: added needed icall for the above function
19955 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19957 * icall.c: fix return value of get_global_assembly_cache. Implemented
19958 Environment.GetLogicalDrives.
19960 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
19962 * rand.c: try and talk to egd or prngd
19963 for random bytes if opening devices fail.
19965 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
19967 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
19968 alignment for the type using the native alignment of its members
19969 instead of using klass->min_align.
19971 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
19973 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19976 * socket-io.c: added check for sys/aio.h.
19978 2004-04-28 Dick Porter <dick@ximian.com>
19980 * threads.c: Don't abort a thread thats already aborting, when
19981 terminating everything.
19983 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19985 * icall.c: added 2 new async calls for Socket.
19987 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
19988 IO on *nix systems.
19990 * threadpool.c: removed unused variable.
19992 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
19994 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
19996 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
19998 * locales.c: put back string_invariant_tolower () and
19999 string_invariant_toupper ().
20001 2004-04-26 David Waite <mass@akuma.org>
20006 * unicode.h: remove comma from end of enumeration declarations
20008 2004-04-26 David Waite <mass@akuma.org>
20010 * debug-mono-symfile.h:
20013 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
20016 2004-04-26 Jackson Harper <jackson@ximian.com>
20018 * appdomain.c: Increment version number.
20020 2004-04-26 Jackson Harper <jackson@ximian.com>
20022 * appdomain.c: Set assembly references public token value when
20023 PublicKeyToken is specified, not the hash_value. Free public token
20024 values when free assembly name data. Previously the public key
20025 token was hex decoded, however we are using hex encoded public key
20026 tokens, so this is not neccasary.
20027 * assembly.c: Lookup assemblies in the gac if their public token
20028 value is set. Add function to allow enabling user gac
20029 lookups. Specify whether or not the assembly was loaded from the
20030 GAC. Compare full assembly names when checking the cache for
20031 assemblies (Temporarily disabled see comment in code). Remove
20032 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
20033 specifies trace-loader they get extra info to stdout on the
20034 loading of assemblies.
20035 * image.h: Add a field for an assembly references public token
20036 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
20037 whether an assembly has been loaded from the GAC.
20038 * image.c: Remove a corlib -> mscorlib name mapping.
20039 * loader.h: Add function to enable/disable the user gac.
20040 * mono-config.c: Check if the usergac is enabled in the config
20042 * icall.c: New icall to determine whether or not an assembly has
20043 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
20044 * tabldefs.h: Add constant for assemblyref flag that specifies a
20045 full public key is used instead of a public token.
20046 * reflection.c: Remove mscorlib -> corlib mappings. Set
20047 PublicTokenValue instead of hash value. This value is a hex
20048 string so it does not need to be expanded.
20050 2004-04-26 Martin Baulig <martin@ximian.com>
20052 * mono-debug-debugger.c (mono_debugger_initialize): Set
20053 `mono_debugger_initialized' before calling mono_debug_lock().
20055 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
20057 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
20058 InternalToUpper/InternalToLower.
20059 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
20060 removed invariant culture shortcut. This is now done in managed code.
20061 * locales.c: (string_invariant_toupper/tolower) removed.
20063 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20065 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
20066 Added Poll internal call.
20068 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
20069 call for Poll. Select was too heavy for polling a single socket.
20071 * threadpool.[ch]: added mono_threadpool_cleanup.
20072 * threads.c: use it. Don't use Thread_Abort on windows.
20074 2004-04-23 Martin Baulig <martin@ximian.com>
20076 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
20078 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
20080 * icall.c: Registred new icalls for key pair protection and added an
20081 icall for Environment.GetFolderPath on Windows.
20082 * security.c|h: Added new icalls for key pair protection.
20084 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20086 * socket-io.c: don't display the non-supported family warning for known
20087 families. Now this is not displayed on windows when checking support
20090 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20092 * class.c: don't display the layout warning for static fields.
20094 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
20096 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
20097 * locales.c, locales.h: Added new icalls for culture-specific
20098 Char.ToLower and Char.ToUpper.
20100 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20102 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
20105 2004-04-20 Martin Baulig <martin@ximian.com>
20107 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
20108 of the type name before passing it to mono_reflection_type_from_name().
20110 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
20112 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
20113 encodings here. Fixes #56965.
20115 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
20117 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
20118 fix test on strstr result not that I can see anything that
20119 relies on the result.
20121 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
20123 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
20126 * marshal.c (mono_marshal_get_string_encoding): New helper function.
20128 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
20129 function to determine which marshalling to use for strings. Fixes
20132 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
20134 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
20136 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
20138 * icall.c: #include mono-config.h
20140 2004-04-15 Jackson Harper <jackson@ximian.com>
20142 * culture-info-tables.h: Fix date formats for en-US culture.
20144 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
20146 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
20147 ThreadPool.SetMinThreads.
20148 * threadpool.c: Implemented ThreadPool.GetMinThreads and
20149 ThreadPool.SetMinThreads.
20151 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
20153 * mono-config.c: also load the .config file in the directory
20154 where the assembly was found.
20156 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
20158 * assembly.c: load per-assembly config files.
20159 * icall.c: decrapified code to get the config dir and moved to
20161 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
20162 per-assembly config files. When doing a dll map lookup give precedence
20163 to the per-assembly data.
20165 2004-04-14 Martin Baulig <martin@ximian.com>
20167 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
20168 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
20169 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
20171 * mono-debugger-debugger.c: While the debugger is locked, remember
20172 whether the symbol tables have changes and send one single
20173 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
20175 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
20177 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
20179 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
20182 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
20183 account when marshalling string arrays. Fixes #56965.
20185 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
20187 * icall.c: Add new icalls mapping for security.
20188 * security.c|h: Add internal calls for WindowsIdentity,
20189 WindowsImpersonationContext and WindowsPrincipal.
20191 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
20193 * class.c: Added comment to ensure the System.MonoDummy class
20194 is removed when no longer necessary
20196 2004-04-13 Miguel de Icaza <miguel@ximian.com>
20198 * appdomain.c: Pass arguments to the bootstraping exceptions to
20199 minimize JITed methods at boot
20201 * metadata.c (mono_exception_from_name_two_strings): Allow for the
20202 second string to be null.
20204 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
20205 Change the protocol to minimize the JIT methods at startup. Now
20206 it Returns the internal codepage, if the value of "int_code_page"
20207 is 1 at entry, and we can not compute a suitable code page
20208 number, returns the code page as a string.
20210 2004-04-13 Jackson Harper <jackson@ximian.com>
20212 * culture-info-tables.h: Fix number of decimal digits for all
20215 2004-04-13 Jackson Harper <jackson@ximian.com>
20217 * icall.c: Clairfy out of sync error message. It is not always
20218 your corlib that is out of sync.
20220 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
20222 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
20223 properties when only the set accessor is overriden. Fixes #55874.
20225 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
20227 * assembly.c (mono_assembly_load_references): Make this thread safe.
20230 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
20232 * monosn.c: Add missing initialization calls.
20234 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
20237 ves_icall_System_Globalization_CultureInfo_construct_number_format
20238 Fix g_assert so it compiles on fussier compilers re int/ptr
20241 2004-04-08 Dick Porter <dick@ximian.com>
20244 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
20245 53992. Also rearrange the code so that the internal calls return
20246 an error value and exceptions are thrown from managed code.
20248 * icall.c: Add type info to the socket icalls.
20250 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20252 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
20255 2004-04-07 Martin Baulig <martin@ximian.com>
20257 * class.c (mono_class_from_generic_parameter): Don't default
20258 `klass->parent' to `mono_defaults.object_type'.
20260 2004-04-07 Martin Baulig <martin@ximian.com>
20262 * reflection.c (mono_reflection_initialize_generic_parameter): Set
20263 `param->pklass->reflection_info'.
20265 2004-04-07 Jackson Harper <jackson@ximian.com>
20267 * culture-info-tables.h: Fix date separator symbol.
20269 2004-04-07 Martin Baulig <martin@ximian.com>
20271 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
20272 from System.Type to System.MonoType.
20274 2004-04-07 Martin Baulig <martin@ximian.com>
20277 (MonoReflectionGenericParam): Added `has_reference_type' and
20278 `has_value_type' fields.
20280 * reflection.c (mono_image_get_generic_param_info): Encode the
20281 correct flags if we have the `class' or `struct' constraint.
20283 2004-04-07 Martin Baulig <martin@ximian.com>
20286 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
20288 2004-04-07 Jackson Harper <jackson@ximian.com>
20290 * appdomain.c: Revert extra patches, just wanted to bump the
20293 2004-04-07 Jackson Harper <jackson@ximian.com>
20295 * Makefile.am: Add culture-info private headers.
20296 * icall.c: Add new icalls for contructing locales.
20297 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
20298 * locales.h: Declare new culture info construction methods.
20299 * object.h: Add new fields used to avoid the CultureMap to
20301 * culture-info.h: Definition of structs used in the culture info
20303 * culture-info-tables.h: Autogenerated tables that contain culture
20304 info data. This file was generated with the locale-builder tool.
20305 * appdomain.c: Incement corlib version number.
20307 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
20309 * appdomain.c: (mono_runtime_init) move mono_thread_init
20310 to before mono_object_new calls so critical sections
20311 are initialized before use.
20313 2004-04-07 Martin Baulig <martin@ximian.com>
20316 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
20317 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
20318 (ves_icall_MonoGenericParam_initialize): Removed.
20319 (monogenericparam_icalls): Removed.
20320 (generictypeparambuilder_icalls): Added new table for
20321 System.Reflection.Emit.GenericTypeParameterBuilder.
20324 (mono_reflection_define_generic_parameter): Removed.
20325 (mono_reflection_initialize_generic_parameter): This is now called
20326 from GenericTypeParameterBuilder's .ctor.
20328 2004-04-06 Martin Baulig <martin@ximian.com>
20330 * class.c (mono_class_init): Don't inflate nested classes in a
20332 (mono_type_get_name_recurse): Include the generic arguments for
20333 generic instances and generic type declarations.
20334 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
20335 (_mono_class_get_instantiation_name): Removed.
20336 (mono_class_create_generic): Always use `gklass->name' as our name.
20338 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
20340 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
20341 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
20342 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
20343 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
20344 closed generic methods here.
20347 (mono_reflection_generic_inst_get_nested_types): Removed.
20348 (inflate_mono_method): Copy the generic parameters from the
20349 MonoMethodHeader into out MonoGenericMethod.
20351 2004-04-06 Martin Baulig <martin@ximian.com>
20354 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
20356 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
20358 * reflection.c (build_compressed_metadata): If we have any entries
20359 in the GenericParam, MethodSpec or GenericParamConstraint tables,
20360 set the header version to 1.1.
20362 2004-04-06 Martin Baulig <martin@ximian.com>
20364 * class.c (mono_class_init): If we're a generic instance,
20365 initialize our nested classes, too.
20366 (_mono_class_get_instantiation_name): Deal with the new `!%d'
20369 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20371 * process.c: quote the argument passed to the shell on windows.
20373 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
20375 * threads.c (mono_alloc_special_static_data): Allow this to be
20376 called during startup.
20378 2004-04-02 Martin Baulig <martin@ximian.com>
20381 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
20383 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
20385 * icall.c: Fix build.
20387 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
20389 * Makefile.am: Added security.c|h.
20390 * icall.c: Added icall for get_UserName;
20391 * security.c: New file for security related icalls. Added function
20392 get_UserName for System.Environment (fix #56144).
20393 * security.h: New. Header file for security.c
20395 2004-04-02 Dick Porter <dick@ximian.com>
20397 * icall.c: Deleted the icalls that were obsoleted some time ago
20398 by the ICU string code, and which were mixed into the icall
20399 rearranging. Fixes bug 55969.
20402 * string-icalls.c: Deleted the code that those icalls reference.
20404 2004-04-01 Martin Baulig <martin@ximian.com>
20406 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
20408 * class.c (mono_class_from_generic_parameter): Don't set
20409 TYPE_ATTRIBUTE_INTERFACE.
20410 (my_mono_class_from_generic_parameter): Likewise.
20412 2004-04-01 Martin Baulig <martin@ximian.com>
20414 * loader.c (find_method): Added an optional `MonoClass *ic'
20415 argument to search in a specific interface.
20416 (mono_get_method_constrained): New public function.
20418 2004-04-01 Martin Baulig <martin@ximian.com>
20420 * reflection.c (mono_image_get_generic_field_token): Use the
20421 `handleref' cache here.
20423 2004-04-01 Martin Baulig <martin@ximian.com>
20425 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
20427 * reflection.c (create_generic_typespec): Use the `typespec' hash
20428 here, not the `typeref' one.
20430 2004-04-01 Martin Baulig <martin@ximian.com>
20432 * class.c (mono_class_inflate_generic_type): Moved the
20433 functionality into a new static inflate_generic_type() which
20434 returns NULL if it didn't do anything. Only increment the
20435 `mono_stats.inflated_type_count' if we actually inflated
20437 (mono_class_get_full): Check the classes type to see whether we
20438 need to inflate it; also inflate MONO_TYPE_(M)VAR.
20440 2004-04-01 Jackson Harper <jackson@ximian.com>
20442 * reflection.c: Set culture for assembly references.
20444 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
20446 * reflection.[ch], icall.[ch], Fix support for pinning variables.
20448 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20451 (do_mono_assembly_open): the critical section also covers
20452 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
20454 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20457 (mono_manage_threads): abort the background threads when finishing.
20460 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20462 * gc.c: only close the done_event handle if there was no timeout.
20465 2004-03-30 Martin Baulig <martin@ximian.com>
20467 * icall.c (icall_entries): It's called "System.Activator", not
20468 "System.Activation".
20470 2004-03-30 Martin Baulig <martin@ximian.com>
20472 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
20473 (mono_class_create_from_typespec): Likewise.
20475 2004-03-30 Martin Baulig <martin@ximian.com>
20477 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
20478 `has_ctor_constraint' and `initialized'.
20480 2004-03-30 Martin Baulig <martin@ximian.com>
20482 * reflection.c (encode_new_constraint): New static function to add
20483 the constructor constraint attribute to a type parameter.
20484 (encode_constraints): Call encode_new_constraint() if necessary.
20487 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
20489 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
20491 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
20493 * reflection.c, icall.c: add support for pinning variables.
20495 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
20497 * marshal.c (mono_marshal_get_managed_wrapper):
20498 init bool local with zero rather than null.
20500 2004-03-29 Martin Baulig <martin@ximian.com>
20502 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
20503 the "official" behavior here.
20504 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
20506 2004-03-29 Martin Baulig <martin@ximian.com>
20508 * icall.c: Reflect latest API changes.
20510 2004-03-29 Martin Baulig <martin@ximian.com>
20512 * loader.c (mono_get_method_from_token): Also call
20513 mono_metadata_load_generic_params () for abstract and interface
20514 methods; replace the type arguments in the method signature with
20515 the ones which are loaded from the metadata.
20517 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
20519 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
20520 of the lock is not the current thread. MS.NET don't do it, in spite of
20521 what the documentation says. See bug #56157.
20523 2004-03-28 Martin Baulig <martin@ximian.com>
20525 * class.c (mono_class_init): Don't call init_properties() and
20526 init_events() for generic instances; set `prop->parent' when
20527 inflating properties.
20529 * reflection.c (mono_generic_inst_get_object): Call
20530 `mono_class_init (ginst->klass)'.
20531 (mono_type_get_object): Only create a MonoGenericInst if your
20532 generic type is a TypeBuilder.
20533 (do_mono_reflection_bind_generic_parameters): Only set
20534 `ginst->is_dynamic' if our generic type is a TypeBuilder.
20536 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
20538 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
20541 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20543 * icall.c: added Kill_internal icall.
20544 * process.[ch]: added Kill_internal icall.
20546 2004-03-25 Martin Baulig <martin@ximian.com>
20548 * class.h (MonoStats): Added `generic_instance_count',
20549 `inflated_method_count', `inflated_type_count' and
20550 `generics_metadata_size'.
20552 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20554 * reflection.c: no warnings now.
20556 2004-03-25 Martin Baulig <martin@ximian.com>
20558 * class.c (mono_class_get_full): New public function; does a
20559 mono_class_get(), but also takes a `MonoGenericContext *'.
20561 * loader.c (mono_field_from_memberref): Renamed to
20562 `field_from_memberref', made static and added `MonoGenericContext *'
20564 (mono_field_from_token): Added `MonoGenericInst *' argument.
20565 (method_from_memberef): Likewise.
20566 (mono_get_method_from_token): Likewise.
20567 (mono_get_method_full): New public function; does a
20568 mono_get_method(), but also takes a `MonoGenericContext *'.
20570 * verify.c (mono_method_verify): Get the method's generic context
20571 and pass it to mono_field_from_token(), mono_get_method_full() and
20572 mono_class_get_full().
20574 2004-03-25 Martin Baulig <martin@ximian.com>
20576 * class.c (mono_class_inflate_generic_type): Take a
20577 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
20578 `MonoGenericMethod *'.
20580 2004-03-25 Martin Baulig <martin@ximian.com>
20582 * loader.h (MonoMethodInflated): Store the MonoGenericContext
20583 instead of the MonoGenericMethod here.
20585 2004-03-25 Martin Baulig <martin@ximian.com>
20587 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
20588 each time we create a new MonoGenericInst, we also create a new
20589 context which points back to us.
20591 * class.c (inflate_method): Use `ginst->context' instead of
20592 creating a new context.
20594 * loader.c (method_from_memberref): Use
20595 `klass->generic_inst->context' instead of creating a new context.
20597 2004-03-25 Martin Baulig <martin@ximian.com>
20599 * class.h (MonoGenericContext): New struct.
20600 (MonoGenericMethod): Removed `generic_inst'.
20602 * class.c (mono_class_inflate_generic_method): Take a
20603 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
20605 2004-03-25 Martin Baulig <martin@ximian.com>
20607 * loader.h (MonoMethodInflated): New typedef.
20609 * metadata.h (MonoMethodSignature): Removed `gen_method', make
20610 `generic_param_count' consume just 30 bits, added `is_inflated'
20611 and `has_type_parameters' flags (one bit each).
20613 * class.c (mono_class_inflate_generic_method): Create a
20614 MonoMethodInflated instead of a MonoMethodNormal and set
20615 `is_inflated' in the method signature.
20617 * class.h (MonoGenericMethod): Removed `generic_method'.
20619 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
20621 * image.c: Make sure the name of a MonoImage is always an absolute path.
20622 This fixes bug #54415.
20624 2004-03-24 Martin Baulig <martin@ximian.com>
20626 * class.c (mono_class_setup_vtable): If we're a generic instance,
20627 use our generic type's vtable size.
20629 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
20631 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
20632 MONO_NO_UNLOAD env var as a temporary workaround for unloading
20635 2004-03-23 Martin Baulig <martin@ximian.com>
20637 * class.h (MonoDynamicGenericInst): Added `int count_events' and
20638 `MonoEvent *events'.
20640 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
20641 (typebuilder_icalls): Added "get_event_info"; calls
20642 mono_reflection_event_builder_get_event_info().
20644 * reflection.c (mono_reflection_generic_inst_initialize): Added
20645 `MonoArray *events'.
20646 (mono_reflection_event_builder_get_event_info): New function.
20648 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
20650 * object.h: add mono_type_initialization_init
20652 * object.c (mono_runtime_class_init):
20653 implement class constructor synchronization rules
20654 to cope with threading issues.
20655 add mono_type_initialization_init
20657 * appdomain.c (mono_runtime_init): call
20658 mono_type_initialization_init
20660 * class.h: removing initializing field from MonoVTable
20662 2004-03-23 Martin Baulig <martin@ximian.com>
20664 * class.c (my_mono_class_from_generic_parameter): Use
20665 `param->name' if it's not NULL.
20667 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
20669 * class.c: do not insert non-virtual methods in the vtable.
20670 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
20671 that means the method is non-virtual. This never would have
20674 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
20676 * profiler.c: Added lock for accessing coverage_hash.
20678 2004-03-22 Martin Baulig <martin@ximian.com>
20680 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
20681 `method->method->signature->generic_param_count != 0' to make it
20682 work for interface methods.
20684 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20686 * process.c: quote the string passed to the shell using g_shell_quote.
20688 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20691 (mono_threads_manage): don't remove the finalizer thread and self
20692 from the threads hash table so that mono_thread_manage can be called
20695 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20697 * process.c: quote the arguments when UseShellExecute is true. Fixes
20700 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20702 * threads.c: set mono_thread_detach as a cleanup routine for every
20703 thread. This way it's always executed upon thread termination, either
20704 aborted or finished normally. No more xsp hangs!
20706 2004-03-17 Martin Baulig <martin@ximian.com>
20708 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
20709 `int count_nested' and a `MonoType **nested'.
20711 * reflection.c (mono_reflection_bind_generic_parameters): Moved
20712 most of the functionality into a new static
20713 do_mono_reflection_bind_generic_parameters() and don't take a
20714 `MonoType *nested_in' argument any more. Don't compute nested
20716 (mono_reflection_generic_inst_get_nested_types): New public method
20717 to get nested types.
20719 * class.c (mono_class_create_generic): Set `klass->nested_in' if
20720 we're a nested class.
20722 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
20723 mono_reflection_generic_inst_get_nested_types() to compute the
20726 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
20728 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
20729 descriptive error message under windows.
20731 2004-03-17 Martin Baulig <martin@ximian.com>
20733 * class.c (dup_type): Added `const MonoType *original' argument;
20734 copy the attrs from the original type.
20736 2004-03-17 Martin Baulig <martin@ximian.com>
20738 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
20739 `m->generic_inst_cache' here.
20741 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
20743 * exception.h exception.c: Add stack_overflow_exception.
20745 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20748 (overlapped_callback): call SetEvent *after* invoking the callback.
20749 No need to call CloseHandle.
20751 2004-03-16 Martin Baulig <martin@ximian.com>
20753 * reflection.c (mono_image_get_fieldref_token): Take a
20754 `MonoReflectionField *' instead of a `MonoClassField *' and a
20755 `MonoClass *'; store the `MonoReflectionField *' in the hash.
20757 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20759 * appdomain.c: don't add the culture to the filename we're looking for
20760 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
20762 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20764 * locales.c: don't ignore symbols when doing case insensitive compares.
20765 Thanks Dick! Fixes bug #54046.
20767 * threads.c: surround 'threads' usage with enter/leave in
20768 mono_thread_manage.
20770 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
20772 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
20773 implicitly marshalled as [Out]. Fixes #55450.
20775 (mono_marshal_get_runtime_invoke): Zero out the result if there is
20778 2004-03-16 Martin Baulig <martin@ximian.com>
20780 * class.c (mono_class_from_generic_parameter): Use the actual
20783 2004-03-16 Martin Baulig <martin@ximian.com>
20785 * reflection.c (type_get_signature_size): New static function.
20786 Compues the size of the type in a method signature.
20787 (method_get_signature_size): New static function; calls
20788 type_get_signature_size() to compute the actual size of the
20789 method's signature.
20790 (method_encode_signature): Use method_get_signature_size() to get
20791 the signature's size rather than using `nparams * 10'.
20793 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20795 * file-io.h: define here WapiOverlapped on windows. I don't want the
20796 regular OVERLAPPED one.
20799 * threadpool.c: somehow, BindIoCompletionCallback is not found.
20800 Disabling AIO on windows.
20802 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20804 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
20807 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20809 * appdomain.c: upgraded corlib version.
20811 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
20812 and BeginWrite. Allow opening files for asynchrnous operations.
20814 * file-io.h: new struct that maps FileStreamAsyncResult.
20815 * icall.c: added new icalls.
20816 * process.[ch]: support setting child process environment variables
20817 and use the SHELL or COMSPEC when UseShellExecute is true.
20819 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
20820 callback for async. IO is here and also BindHandle.
20822 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
20825 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
20827 * reflection.c (create_custom_attr): Allow len == 0.
20829 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
20830 computation on big-endian machines.
20832 2004-03-13 Martin Baulig <martin@ximian.com>
20834 * class.h (MonoGenericInst): Added `int count_ifaces'.
20836 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
20837 `ginst->count_ifaces' instead `klass->interface_count' since we
20838 may get called before the vtable is created.
20840 * loader.c (mono_method_get_param_names): If we're a generic
20841 instance, return and don't initialize the class.
20843 * reflection.c (mono_reflection_setup_generic_class): Don't call
20844 ensure_runtime_vtable().
20845 (mono_reflection_bind_generic_parameters): Set
20846 `ginst->count_ifaces'.
20848 2004-03-11 Jackson Harper <jackson@ximian.com>
20852 * unicode.h: Remove unused System.Char icalls.
20854 2004-03-11 Miguel de Icaza <miguel@ximian.com>
20856 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
20857 code when we P/Invoke the first library in Windows.Forms, instead
20858 of when we first open the assembly.
20860 * assembly.c: Drop the lookup from here.
20862 2004-03-10 Martin Baulig <martin@ximian.com>
20864 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
20865 class for properties, fields and events. Finally fixes #54945.
20867 2004-03-10 Martin Baulig <martin@ximian.com>
20869 * metadata.c (mono_metadata_class_equal): New static function;
20870 checks whether two generic instances or two generic parameters are
20872 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
20875 2004-03-10 Martin Baulig <martin@ximian.com>
20877 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
20879 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
20880 argument and write it into the `reflection_info' field.
20883 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
20884 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
20886 2004-03-09 Jackson Harper <jackson@ximian.com>
20888 * char-conversions.h: use 8 bits for numeric data its all we need
20889 * icall.c: numeric data is only 8 bits now.
20891 2004-03-09 Martin Baulig <martin@ximian.com>
20893 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
20895 * class.c (init_properties, init_events): Initialize the new
20898 * reflection.c (typebuilder_setup_properties): Likewise.
20899 (typebuilder_setup_events): Likewise.
20901 * reflection.h (MonoEventInfo): Replaced `parent with
20902 `declaring_type' and `reflected_type'.
20904 * icall.c (ves_icall_get_property_info): Distinguish between
20905 declaring and reflected type.
20906 (ves_icall_get_event_info): Likewise.
20908 2004-03-09 Martin Baulig <martin@ximian.com>
20910 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
20911 (ves_icall_Type_GetField): Correctly set field->klass.
20913 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
20915 * loader.h: Fix warning.
20917 2004-03-08 Miguel de Icaza <miguel@ximian.com>
20919 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
20920 library routine if present. Notice that it will still continue
20921 executing even if its missing, for those working on the Gtk#
20922 edition of Windows.Forms.
20924 * assembly.c (do_mono_assembly_open): If loading the
20925 System.Windows.Forms call mono_loader_wini_init.
20927 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
20929 * class.h: Added MonoRemoteClass struct.
20930 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
20931 function for MonoStrings.
20932 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
20933 Added internal call for getting the proxy type.
20934 * marshal.c: Get the type of transparent proxies from its remote_class.
20935 Added methods that generate the IL for type checks and casts:
20936 mono_marshal_get_isinst, mono_marshal_get_castclass,
20937 mono_marshal_get_proxy_cancast.
20938 * marshal.h: Declaration of the previous new methods.
20939 * object.c: Added new moethods for creating and updating MonoRemoteClass
20940 instances: mono_remote_class, mono_upgrade_remote_class,
20941 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
20942 * verify.c: FIx transparent_proxy_fields layout.
20943 * appdomain.c: Bump corlib version.
20945 2004-03-04 Jackson Harper <jackson@ximian.com>
20947 * icall.c: Add icall to access char conversion tables.
20948 * char-conversions.h: Character conversion tables.
20949 * Makefile.am: Add char-conversions.h private header file.
20951 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
20953 * appdomain.c (unload_thread_main): Increase unloading timeout to
20954 10 sec as a temporary workaround for Nant problems.
20956 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
20958 * gc.c: Add checks for GC_enable and GC_disable.
20960 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
20961 (jaak@zd.com.pl). Fix memory corruption in String.Replace
20964 2004-02-27 Martin Baulig <martin@ximian.com>
20966 * reflection.c (mono_reflection_bind_generic_parameters): Take a
20967 `MonoReflectionType *' instead of a `MonoType *'.
20969 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
20971 * gc.c (run_finalize): Avoid finalizing the object representing the
20973 (finalizer_thread): Fix warning.
20975 2004-02-25 Martin Baulig <martin@ximian.com>
20977 * class.c (_mono_class_get_instantiation_name): Added `int offset'
20978 argument for nested types.
20979 (mono_class_create_generic): Added support for nested generictypes.
20981 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
20984 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
20986 * reflection.c (method_encode_signature): Increase the minimum
20987 value of `size' from 10 to 11.
20988 (mono_reflection_bind_generic_parameters): Take `int type_argc'
20989 and `MonoType **types' arguments instead of the `MonoArray
20990 *types'; added `MonoType *nested_in'. Recursively instantiate
20993 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
20995 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
20996 stack_overflow_ex members which are used by exception handling.
20998 * appdomain.c (mono_runtime_init): Initialize the new members.
21000 * gc.c (mono_gc_enable): New helper function.
21001 * gc.c (mono_gc_disable): New helper function.
21003 2004-02-23 Martin Baulig <martin@ximian.com>
21005 * icall.c: I must have been really stupid - make it actually work
21008 2004-02-23 Martin Baulig <martin@ximian.com>
21010 * loader.c (method_from_memberref): Only inflate the method if
21011 it's in another klass.
21013 2004-02-23 Martin Baulig <martin@ximian.com>
21015 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
21016 (mono_class_init): If we're a generic instance and an interface,
21017 compute `class->interface_id'; also create `class->interfaces'
21018 here and inflate them.
21020 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
21022 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
21024 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
21026 2004-02-15 Miguel de Icaza <miguel@ximian.com>
21028 * reflection.c (method_encode_code): Improved the error message
21029 generated by the exception.
21031 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21033 * icall.c: Martin did not do what he said in the ChangeLog for
21034 2004-02-18, but put back the changes for properties and events.
21035 Commenting those changes out again and adding comment to bug #54518.
21037 * process.c: removed warning.
21039 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
21041 * marshal.c (emit_struct_conv): Print an error message instead of
21042 asserting when a type does not have the StructLayout attribute.
21044 2004-02-20 Martin Baulig <martin@ximian.com>
21046 * reflection.c (mono_type_get_object): Also use the cache for
21048 (mono_reflection_bind_generic_parameters): Always compute
21051 2004-02-20 Martin Baulig <martin@ximian.com>
21053 * class.h (MonoGenericMethod): Removed `klass'.
21055 * class.c (mono_class_inflate_generic_method): Added `MonoClass
21058 2004-02-20 Martin Baulig <martin@ximian.com>
21060 * reflection.c (method_encode_methodspec): Actually use the
21061 uninflated signature for the memberref.
21063 2004-02-20 Martin Baulig <martin@ximian.com>
21065 * class.h (MonoGenericMethod): Removed `declaring'.
21067 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
21068 is NULL, compute it here.
21070 2004-02-20 Martin Baulig <martin@ximian.com>
21072 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
21074 * metadata.c (mono_metadata_generic_inst_hash): New method.
21075 (mono_metadata_generic_inst_equal): New method.
21077 * reflection.c (mono_reflection_bind_generic_parameters): Use the
21078 `klass->image->generic_inst_cache' cache to avoid creating
21079 duplicate MonoGenericInst's.
21081 * class.c (mono_class_inflate_generic_type): Use the cache.
21083 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
21085 * object.c: fixed gc descriptor calculation for embedded valuetypes.
21087 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21089 * icall.c: added Socket.WSAIoctl icall.
21091 * socket-io.[ch]: implemented
21092 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
21094 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
21096 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
21098 2004-02-18 Urs C Muff <umuff@quark.com>
21100 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
21101 this work on PPC and other big-endian architectures.
21103 * debug-mono-symfile.h: Prepended the names of all the `guint32'
21104 fields with an underscore to make sure they're only accessed by
21105 the read32() macro.
21107 2004-02-18 Martin Baulig <martin@ximian.com>
21109 * icall.c: Put the klass->refclass changes back for methods and
21110 fields, but not for properties and events. We're currently not
21111 distinguishing between DeclaringType and ReflectedType for
21112 properties and events, that's what caused the regressions.
21114 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21117 (mono_async_result_new): the handle can be NULL.
21119 * threadpool.c: Use an event instead of a semaphore, don't initialize
21120 it until needed. This saves quite a few semaphores from being created
21121 when using the threadpool.
21123 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
21125 * object.c (mono_string_is_interned_lookup): Fix interning of long
21126 strings. Fixes #54473.
21128 * domain.c (ldstr_equal): Optimize if the two strings are equal.
21130 * icall.c: Revert the klass->refclass changes since they introduce
21131 regressions (bug #54518).
21133 2004-02-18 Martin Baulig <martin@ximian.com>
21135 * class.c (mono_class_init): If we're a generic instance and don't
21136 come from a TypeBuilder, inflate our members here.
21137 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
21138 (mono_class_create_generic): New public method.
21139 (mono_class_initialize_generic): Removed.
21140 (get_instantiation_name): Renamed to
21141 _mono_class_get_instantiation_name() and made it public.
21143 2004-02-18 Martin Baulig <martin@ximian.com>
21145 * class.c (mono_class_inflate_generic_type): Clear the new
21146 instance's `nginst->klass' when inflating a generic instance.
21147 (mono_class_is_subclass_of): Added (basic) support for generic
21150 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
21152 * appdomain.h, domain.c: use a MonoCodeManager instead of a
21153 MonoMempool to hold compiled native code.
21155 2004-02-17 Martin Baulig <martin@ximian.com>
21157 * class.h (MonoDynamicGenericInst): Added `count_properties' and
21160 * reflection.c (mono_reflection_generic_inst_initialize): Added
21161 `MonoArray *properties' argument.
21163 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
21165 2004-02-17 Martin Baulig <martin@ximian.com>
21167 * icall.c (ves_icall_Type_GetFields): Renamed to
21168 ves_icall_Type_GetFields_internal() and added a
21169 `MonoReflectionType *rtype' argument; pass it to
21170 mono_field_get_object() to set the field's "reflected" type.
21171 (ves_icall_Type_GetConstructors): Likewise.
21172 (ves_icall_Type_GetEvents): Likewise.
21173 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
21174 argument; pass it to mono_method_get_object() to set the method's
21177 2004-02-17 Martin Baulig <martin@ximian.com>
21179 * class.h (MonoDynamicGenericInst): New type.
21180 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
21182 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
21183 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
21184 (ves_icall_MonoGenericInst_GetFields): New interncall.
21186 * class.c (mono_class_from_generic): Don't call
21187 mono_class_initialize_generic() if this is a dynamic instance;
21188 ie. it's being created from a TypeBuilder.
21189 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
21190 `class->byval_arg.type'.
21192 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
21193 to `inflate_method' and made static.
21194 (mono_reflection_inflate_field): Removed.
21195 (mono_reflection_generic_inst_initialize): New public method.
21197 * reflection.h (MonoReflectionGenericInst): Removed `methods',
21198 `ctors' and `fields'; added `initialized'.
21200 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
21202 * debug-helpers.c (mono_method_full_name): Fix output for empty
21205 2004-02-12 Martin Baulig <martin@ximian.com>
21207 * class.h (MonoClassField): Added `MonoType *generic_type'.
21209 * reflection.c (mono_image_get_fieldref_token): Added support for
21210 instantiated generic types.
21211 (field_encode_inflated_field): Removed.
21212 (mono_image_get_inflated_field_token): Removed.
21213 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
21215 * reflection.h (MonoReflectionInflatedField): Removed.
21217 2004-02-12 Martin Baulig <martin@ximian.com>
21219 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
21220 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
21222 * reflection.c (mono_image_get_methodspec_token): Take a
21223 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
21224 (mono_image_create_token): Check whether we have a
21225 `method->signature->gen_method' and call
21226 mono_image_get_methodspec_token() if appropriate.
21227 (inflated_method_get_object): Removed.
21228 (mono_reflection_bind_generic_method_parameters): Return a
21229 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
21230 (mono_reflection_inflate_method_or_ctor): Likewise.
21232 * reflection.h (MonoReflectionInflatedMethod): Removed.
21234 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
21236 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
21237 for custom valuetype marshalling.
21239 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
21241 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21243 * icall.c: fixed WSAGetLastError_internal name.
21245 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
21247 * threads.c (mono_thread_attach): Allow this to be called multiple
21248 times for a thread.
21250 * threads.c (build_wait_tids): Do not wait for ourselves.
21252 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
21253 appdomain list is empty.
21255 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
21256 memory returned by mono_string_builder_to_utf16, since it points into
21257 managed memory. Thanks to Bernie Solomon for noticing this.
21259 * icall.c: Add AppDomainSetup icalls.
21261 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
21263 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
21266 * reflection.c (reflection_methodbuilder_to_mono_method): Save
21267 custom attributes to the method_aux struct. Also fix array indexes etc.
21269 * loader.c (mono_method_get_param_names): Make dynamic case work again.
21271 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
21273 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
21274 (both static and runtime) and reduce startup time.
21276 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
21278 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
21279 AsAny marshalling conversion instead of crashing.
21281 * marshal.c: Fix warnings.
21283 2004-02-09 Martin Baulig <martin@ximian.com>
21285 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
21287 * reflection.h (MonoReflectionInflatedMethod): Removed the
21288 `declaring' field, it's now in the unmanaged MonoGenericMethod.
21290 * reflection.c (method_encode_methodspec): Removed the `method'
21291 argument; we get it from `gmethod->declaring'.
21292 (inflated_method_get_object): Removed the `declaring' argument.
21294 2004-02-09 Martin Baulig <martin@ximian.com>
21296 * class.h (MonoGenericMethod): New type.
21297 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
21300 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
21301 a `MonoGenericMethod *gen_method' one.
21303 * class.c (mono_class_inflate_generic_type): Take an additional
21304 `MonoGenericMethod * argument. This is only non-NULL if we're
21305 inflating types for a generic method.
21306 (mono_class_inflate_generic_signature): Renamed to
21307 inflate_generic_signature() and made static; take a
21308 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
21309 (inflate_generic_header): Take a `MonoGenericMethod *' argument
21310 instead of a `MonoGenericInst *' one.
21311 (mono_class_inflate_generic_method): Likewise.
21313 * reflection.c (encode_generic_method_sig): Take a
21314 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
21315 (method_encode_methodspec): Likewise.
21316 (inflated_method_get_object): Likewise.
21318 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
21319 field with a `MonoGenericMethod *gmethod' one.
21321 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
21323 * class.h (mono_class_has_parent): add parens to expansion
21326 2004-02-08 Martin Baulig <martin@ximian.com>
21328 * image.h (MonoImage): Removed `generics_cache'.
21330 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
21331 instead of a `MonoType *' argument; removed the `inflate_methods'
21332 argument. Don't inflate methods here.
21334 * loader.c (find_method): If it's a generic instance, call
21335 mono_class_init() on the `sclass->generic_inst->generic_type'.
21337 * metadata.c (mono_type_size): Make this work on uninitialized
21338 generic instances; call it on the `ginst->generic_type's class.
21340 * reflection.c (mono_reflection_bind_generic_parameters): Call
21341 mono_class_from_generic() to create the `ginst->klass'.
21343 2004-02-08 Martin Baulig <martin@ximian.com>
21345 * class.h (MonoClass): Changed type of `generic_inst' from
21346 `MonoType *' to `MonoGenericInst *'.
21348 2004-02-08 Martin Baulig <martin@ximian.com>
21350 * icall.c (ves_icall_Type_BindGenericParameters): Just call
21351 mono_type_get_object(), this is now creating a `MonoGenericInst'
21352 for MONO_TYPE_GENERICINST.
21353 (ves_icall_MonoGenericInst_GetParentType): Likewise.
21354 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
21356 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
21357 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
21358 (inflated_method_get_object): Added `MonoClass *refclass' argument.
21359 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
21360 and reflected type.
21362 * reflection.h (MonoReflectionInflatedMethod): Removed
21363 `declaring_type' and `reflected_type'.
21365 2004-02-08 Martin Baulig <martin@ximian.com>
21367 * class.h (MonoGenericInst): Added `MonoType *parent' and
21368 `MonoType **ifaces'.
21370 * reflection.h (MonoReflectionGenericInst): Removed `klass',
21371 `parent' and `interfaces'.
21373 * reflection.c (mono_reflection_bind_generic_parameters): Take a
21374 `MonoType *' argument and return a `MonoType *'.
21377 (ves_icall_MonoGenericInst_GetParentType): New interncall.
21378 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
21380 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
21382 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
21383 valuetype marshalling.
21385 2004-02-06 Martin Baulig <martin@ximian.com>
21388 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
21389 (my_mono_class_from_generic_parameter): Likewise.
21391 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
21393 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
21394 contents of the symbol files lazily.
21396 * object.h (MonoThread): Add 'name' and 'name_len' fields.
21398 * threads.h threads.c icall.c: New icalls for getting and setting the
21401 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
21403 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
21404 Raise an exception when the domain is not found.
21406 2004-02-03 Martin Baulig <martin@ximian.com>
21408 * reflection.c (mono_image_get_methodspec_token): Use the
21409 uninflated signature; fixes gen-33.
21411 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
21413 * gc.c threads.c: Make the finalizer thread a normal managed thread so
21414 the finalizer code can use thread functionality.
21416 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
21417 the finalizer thread.
21419 * threads.c: Make some functions more robust.
21421 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
21423 * metadata.h: Add new marshalling conventions.
21425 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
21426 stringbuilder marshalling. Fixes #53700.
21428 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
21430 * reflection.c (mono_image_get_type_info): Save declarative security
21433 * reflection.c (mono_image_get_field_info): Handle uninitialized
21434 unmanaged fields as well.
21436 * appdomain.c: Bump corlib version.
21438 2004-02-01 Martin Baulig <martin@ximian.com>
21440 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
21441 method type arguments.
21443 2004-01-30 Duncan Mak <duncan@ximian.com>
21445 * marshal.h: Add prototype for
21446 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
21448 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
21451 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
21453 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
21454 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
21456 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
21458 * marshal.c (mono_marshal_get_native_wrapper): Add support for
21459 custom marshalling of valuetypes.
21461 * marshal.c: Fix some warnings.
21463 2004-01-29 Martin Baulig <martin@ximian.com>
21465 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
21466 for generic method parameters.
21468 * reflection.c (method_encode_methodspec): Write the uninflated
21469 signature into the methodspec table.
21470 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
21471 is always the uninflated method.
21472 (reflection_methodbuilder_to_mono_method): Copy the generic
21473 parameters from the MethodBuilder into `header->gen_params'.
21475 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
21477 * class.c (mono_class_from_generic_parameter): Fix warning.
21479 2004-01-27 Martin Baulig <martin@ximian.com>
21481 * class.c (mono_class_from_generic_parameter): Don't create
21482 `klass->methods' here.
21484 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
21486 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
21487 extension since it does not work with libraries named lib<FOO>.dll.so.
21489 2004-01-25 Martin Baulig <martin@ximian.com>
21491 * class.c (mono_class_inflate_generic_type): Added support for
21492 MONO_TYPE_GENERICINST.
21494 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
21495 inflate methods on open constructed types.
21497 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21499 * object.c: fire ProcessExit event in the root AppDomain after running
21500 Main. Fixes bug #53299.
21502 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
21504 * socket-io.c: include the new socket-wrappers.h header.
21505 Use the wrappers instead of the unix socket functions to make the code
21508 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
21510 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
21512 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
21515 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
21517 * reflection.c (mono_image_create_pefile): Handle the case when the
21518 entry point is not a MethodBuilder.
21520 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
21521 field to ReflectionMethod since it is not allways a builder.
21523 * reflection.c (type_get_fully_qualified_name): New helper function to
21524 return the fully qualified name of a type.
21526 * reflection.c (encode_marshal_blob): Always emit the fully qualified
21527 type name for custom marshallers.
21529 * reflection.c (mono_marshal_spec_from_builder): Ditto.
21531 * class.c (mono_class_setup_vtable): If a parent class already
21532 implements an interface, use the implementing methods from that class.
21535 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21537 * threadpool.c: just return instead of ExitThread to allow for thread
21540 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
21542 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
21543 when closing resource modules.
21545 * reflection.c (mono_image_create_pefile): Handle the case when the
21546 entry point is not a MethodBuilder.
21548 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
21549 field to ReflectionMethod since it is not allways a builder.
21551 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
21553 * marshal.c (mono_marshal_get_managed_wrapper):
21554 mono_marshal_alloc takes native int so CONV_I
21555 the arg for 64bits.
21557 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
21559 * reflection.c (fixup_cattrs): New function to fixup the methoddef
21560 tokens in the cattr table. Fixes #53108.
21562 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21564 * loader.c: don't trim ".dll" before looking up in the config file.
21565 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
21567 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
21569 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
21570 Return the module which contains the resource as well.
21571 (ves_icall_System_Reflection_Module_Close): New icall.
21573 * appdomain.c: Bump corlib version number.
21575 * image.c (mono_image_addref): New public function.
21577 * assembly.c: Call mono_image_addref.
21579 * reflection.c (mono_module_get_object): Increase reference count of
21582 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
21585 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
21586 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
21587 proper exceptions on DllImport problems.
21589 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
21591 * class.c, metadata.c: eliminate CSIZE macro.
21593 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
21595 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
21596 * object.h: Added async_callback field in MonoAsyncResult.
21597 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
21598 * verify.c: Added async_callback in MonoAsyncResult layout.
21600 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
21602 * reflection.c (mono_reflection_get_custom_attrs): Add support
21605 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
21607 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
21609 (mono_marshal_method_from_wrapper): Add null pointer check.
21611 2004-01-16 Martin Baulig <martin@ximian.com>
21613 * debug-mono-symfile.h: Set version number to 36 and reflect
21614 latest symbol writer changes.
21616 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
21618 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
21619 multi-dimensional arrays.
21620 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
21621 (mono_class_from_mono_type): Use bounded_array_class_get.
21623 * class.c (mono_bounded_array_class_get): New function which takes
21624 a 'bounded' bool argument to distinguish vectors from one dimensional
21627 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
21628 bounded_array_class_get if the array has bounds.
21630 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
21631 Search modules loaded using AssemblyBuilder:AddModule as well.
21633 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21635 * appdomain.c: increased corlib version.
21636 * filewatcher.c: removed g_print.
21638 (get_property_info): only allocate what is actually requested.
21639 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
21641 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21643 * Makefile.am: added filewatcher.[ch]
21644 * filewatcher.[ch]: FileSystemWatcher runtime support.
21645 * icall.c: added new FSW icalls.
21647 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
21649 * string-icalls.c: fix stringbuilder regression as suggested by
21650 Iain McCoy <iain@mccoy.id.au>.
21652 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
21654 * process.c (process_read_stringtable_block): Recognize '007f' as
21655 a language neutral stringtable block.
21657 2004-01-12 Patrik Torstensson
21659 * object.h (MonoStringBuilder) : Changed layout to support our
21660 new stringbuilder class.
21661 * marshal.c: Change marshalling to support the new layout of
21663 * appdomain.c: increased version number because new layout of
21666 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
21668 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
21669 assembly name as an string instead of an AssemblyName, since it is
21670 easier to extract info from it.
21672 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
21673 the culture subdirectories too. Fixes #52231.
21675 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21677 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
21678 It takes 2 new parameters with an optional name for the method to look
21679 for and case ignoring info.
21681 * threadpool.c: removed unused variable.
21683 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21685 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
21686 It takes 2 new parameters with an optional name for the property to look
21687 for and case ignoring info.
21690 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
21692 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
21695 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21698 * assembly.c: escape the uri before passing it to g_filename_from_uri.
21701 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
21703 * reflection.c: Add support for more than one unmanaged resource.
21705 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
21706 in field->def_value, as done in all other cases.
21708 * reflection.c (mono_reflection_get_custom_attrs): Add support for
21711 * reflection.c (mono_reflection_create_runtime_class): Remove
21712 errorneous assignment to klass->element_class, since it is already
21713 done in mono_reflection_setup_internal_class.
21715 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21717 * gc.c: added missing LeaveCriticalSection.
21718 * icall.c: indented a couple of lines.
21719 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
21720 if we call EndInvoke inside a callback. Fixes bug #52601.
21722 2004-01-07 Martin Baulig <martin@ximian.com>
21724 * mono-debug-debugger.h
21725 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
21727 2004-01-06 Miguel de Icaza <miguel@ximian.com>
21729 * appdomain.c: Use messages in NotImplementedException.
21731 * exception.c (mono_get_exception_not_implemented): Now this takes
21732 a message argument.
21734 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
21735 exception instead of g_asserting an aborting when something is not
21738 Add some inline docs.
21740 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
21742 * reflection.h: Update after changes to object layout.
21744 * reflection.c: Implement saving of unmanaged aka win32 resources.
21746 * appdomain.c: Bump version number.
21748 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
21749 Handle missing domains gracefully.
21751 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
21753 * file-io.c : On Windows, there are much more invalid_path_chars.
21755 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
21757 * class.h, object.c: prepare for GetType () speedup.
21759 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
21761 * profiler.c: workaround for --profile null reference exception on
21762 cygwin. Patch by Patrik Torstensson.
21764 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
21766 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
21767 make work for unaligned access.
21769 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
21771 * class.c: small cleanup (class->fields [i] -> field).
21772 * image.c: check address of metadata is valid.
21774 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
21776 * assembly.h assembly.c (mono_assembly_loaded): New public function to
21777 search the list of loaded assemblies.
21779 * reflection.c (mono_reflection_type_from_name): Use
21780 mono_assembly_loaded instead of mono_image_loaded.
21782 * reflection.c: Fix warnings.
21784 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
21786 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
21787 is dynamic. This is needed since an assembly can contain both dynamic and
21788 non-dynamic images.
21790 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
21793 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
21795 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
21796 to store modules loaded using AddModule.
21798 * reflection.c (mono_image_fill_file_table): Generalize this so it works
21801 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
21803 * reflection.c (mono_image_fill_export_table_from_module): New function to
21804 fill out the EXPORTEDTYPES table from a module.
21806 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
21807 into a separate function. Also handle loaded non-dynamic modules.
21809 * reflection.c (mono_image_basic_init): Fix memory allocation.
21811 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21813 * assembly.c (mono_assembly_load_references): Make this public.
21815 2003-12-19 Martin Baulig <martin@ximian.com>
21817 * class.c (mono_class_initialize_generic): Made this static, take
21818 a `MonoGenericInst *' instead of a `MonoClass *'.
21819 (mono_class_from_generic): Call mono_class_initialize_generic()
21820 unless we're already initialized or being called from
21821 do_mono_metadata_parse_generic_inst().
21823 * class.h (MonoGenericInst): Added `initialized' and
21824 `init_pending' flags.
21826 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
21827 `mono_class_init (gklass)' or mono_class_initialize_generic()
21828 here; set `generic_inst->init_pending' while parsing the
21831 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
21833 * locales.c: include string.h for memxxx prototypes
21835 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
21837 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
21838 constructor when accessing literal fields.
21840 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
21842 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21844 * reflection.c (assembly_add_resource_manifest): New function to fill
21845 the MANIFESTRESOURCE table.
21847 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
21849 * reflection.h: Update to changes in class layout.
21851 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
21852 Reenable call to mono_runtime_is_shutting_down ().
21854 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
21855 determine if the runtime is shutting down.
21857 2003-12-16 Jackson Harper <jackson@ximian.com>
21859 * icall.c: comment out call to mono_runtime_is_shutting_down to
21862 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
21864 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
21865 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
21867 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
21869 * reflection.c: move definition of swap_with_size
21870 to before its first call
21872 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
21874 * appdomain.c (mono_runtime_is_shutting_down): New public function.
21876 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
21879 * object.c: Fix warnings.
21881 * icall.c (ves_icall_Type_Get...): Only consider inherited static
21882 members if FlattenHierarchy is set.
21884 * reflection.c (mono_image_add_decl_security): New function to emit
21885 declarative security.
21887 * reflection.h reflection.c: Add support for declarative security.
21889 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
21891 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
21893 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
21895 * appdomain.c verify.c: Moved corlib version checking into its own
21896 function in appdomain.c since it needs to create vtables etc.
21898 2003-12-13 Patrik Torstensson <p@rxc.se>
21900 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
21901 instead of unwrapped server.
21903 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
21905 * verify.c (check_corlib): Fix field index.
21907 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
21909 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
21912 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
21914 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
21915 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
21916 cope with sizeof(size_t) != sizeof(guint32).
21918 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21920 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
21921 in case of failure.
21923 2003-12-10 Mark Crichton <crichton@gimp.org>
21925 * icall.c: removed the GetNonZeroBytes. We now handle this case
21928 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
21930 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
21932 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
21935 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
21937 * verify.c (check_corlib): Handle the case when the version field is
21938 initialized by a static constructor.
21940 2003-12-08 Patrik Torstensson <p@rxc.se>
21942 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
21944 2003-12-08 Martin Baulig <martin@ximian.com>
21946 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
21947 a MonoReflectionGenericParameter, also take the parameter index
21948 and name as arguments.
21949 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
21950 (ves_icall_MonoGenericParam_initialize): New interncall.
21951 (ves_icall_Type_make_byref_type): New interncall.
21953 * reflection.h (MonoReflectionGenericParam): Derive from
21954 MonoReflectionType, not just from MonoObject. Added `refobj' and
21957 * reflection.c (mono_reflection_define_generic_parameter): Create
21958 and return a new MonoReflectionGenericParam; don't initialize the
21960 (mono_reflection_initialize_generic_parameter): New public method;
21961 initializes the constraints and creates the `param->pklass'.
21963 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
21965 * reflection.h reflection.c: Use the new fields 'num_types',
21966 'num_fields' and 'num_methods' to track the number of types etc.
21968 * verify.c (check_corlib): Check corlib version number.
21970 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
21972 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
21973 function works on all methods.
21975 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
21977 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
21978 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
21979 the custom_type_info flag of the transparent proxy.
21980 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
21981 objects that supports IRemotingTypeInfo.
21982 * object.h: Added custom_type_info field in transparent proxy.
21984 2003-12-06 Martin Baulig <martin@ximian.com>
21986 * class.c (mono_class_create_from_generic): Removed.
21987 (mono_class_from_generic): Check `ginst->klass' before doing
21988 anything else. This is important to fully support "recursive"
21991 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
21992 empty `generic_inst->klass' before doing anything else.
21994 2003-12-06 Dick Porter <dick@ximian.com>
21999 * locales.c: Use C structs to access class fields. Don't do a
22000 conversion between MonoString and UChar because both are
22001 platform-endian UTF-16. Compare now takes startindex and count
22002 parameters. Add a char overload for IndexOf. Speed up the
22003 invariant string IndexOf.
22005 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
22007 * Makefile.am (monosn_LDADD): Fix parallel build.
22009 2003-12-04 Martin Baulig <martin@ximian.com>
22012 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
22013 (ves_icall_Type_make_array_type): New interncall.
22015 2003-12-04 Martin Baulig <martin@ximian.com>
22017 * locales.c: also change it in the !HAVE_ICU case.
22019 2003-12-04 Dick Porter <dick@ximian.com>
22022 * locales.c: construct_compareinfo is now in CompareInfo, not
22025 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
22027 * image.c (mono_image_load_file_for_image): Cache loaded images in the
22028 image->files array.
22030 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
22033 * assembly.c (mono_assembly_load_references): Only load references
22036 * class.c (mono_class_from_name): Avoid linear search of the
22037 EXPORTEDTYPE table.
22039 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
22041 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
22043 * image.h (MonoImage): Add 'field_cache' field.
22045 * loader.c (mono_field_from_token): Cache field lookups.
22047 * reflection.c (mono_module_get_object): Fix name property.
22049 * icall.c (ves_icall_get_enum_info): Update after changes to
22050 mono_metadata_get_constant_index ().
22052 * icall.c: Get rid of get_type_info icall, use a separate icall for
22053 each type property to avoid needless memory allocations. Fixes #51514.
22055 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
22056 to avoid needless binary searches.
22058 * class.c (class_compute_field_layout): Move the initialization of
22059 field->def_value to mono_class_vtable ().
22061 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
22064 * object.c (mono_object_allocate): Make it inline.
22066 * object.c (mono_object_allocate_spec): Make it inline.
22068 2003-12-02 Dick Porter <dick@ximian.com>
22070 * locales.c (create_NumberFormat): NumberFormatInfo construction.
22071 Patch by Mohammad DAMT (mdamt@cdl2000.com).
22073 2003-12-01 Dick Porter <dick@ximian.com>
22075 * threads.c: Fix signature and call in CreateMutex and
22078 2003-12-01 Dick Porter <dick@ximian.com>
22081 * locales.c: Implement string compares and searching
22083 * object.h: Add extra Thread field
22085 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
22087 * reflection.c (fixup_method): Add support for MonoCMethod.
22089 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
22091 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
22093 * reflection.c (assembly_name_to_aname): Allow extra characters in
22094 assembly names. Fixes #51468.
22096 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
22098 * exception.c (mono_exception_from_name_domain): New helper function.
22100 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
22101 exception object in the correct domain.
22103 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
22104 formatting + make a copy a the input data.
22106 * loader.c (mono_get_method_from_token): Methods which contain
22107 native code do not have entries in the ImplMap.
22109 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
22110 Thanks to Gonzalo for spotting this.
22112 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
22113 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
22115 * assembly.h (mono_assembly_load_from): Split the second part of
22116 assembly loading into a new public function.
22118 * exception.h (mono_get_exception_bad_image_format): New function.
22120 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
22122 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
22123 Enumerate all modules inside a dynamic assembly. Fixes #51293.
22125 * icall.c: Add new icall for creating dynamic methods.
22127 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
22129 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
22131 * reflection.c (mono_reflection_create_dynamic_method): New icall to
22132 create a dynamic method.
22134 * reflection.c (resolve_object): New helper function.
22136 * reflection.c: Generalize ReflectionMethodBuilder and the functions
22137 which manipulate it so they can also work on dynamic methods.
22139 * reflection.c (reflection_method_builder_to_mono_method): Avoid
22140 creating the MonoReflectionMethodAux structure if it is not needed.
22142 * reflection.h verify.c: Update after changes to object layout.
22144 * reflection.c (method_builder_encode_signature): Fix compilation on
22147 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
22149 * appdomain.h: Added support for context static fields. Added static_data
22150 field to MonoAppContext and renamed thread_static_fields to a more
22151 generic special_static_fields in MonoAppDomain, since it can now contain
22152 context static fields.
22153 * domain.c: Updated hashtable name.
22154 * object.c: Replaced field_is_thread_static() for a more generic
22155 field_is_special_static() which also checks for context static attribute.
22156 In mono_class_vtable(), added support for static context fields.
22157 * threads.c: Changed methods that manage thread static fields to more
22158 generic methods so they can be reused both for thread and context static
22160 * threads.h: Declared some new methods.
22162 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
22164 * reflection.h: Update after changes to the managed types.
22166 * reflection.c (encode_custom_modifiers): New helper function.
22168 * reflection.c (method_encode_signature): Emit custom modifiers.
22170 * reflection.c (field_encode_signature): Emit custom modifiers.
22172 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
22174 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
22176 * icall.c (ves_icall_System_ValueType_Equals): New optimized
22179 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
22182 * object.c (mono_field_get_value_object): New function.
22184 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
22187 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
22189 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
22190 return a preallocated out-of-memory exception instance.
22192 * object.c (out_of_memory): Use the new function.
22194 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
22195 flag is before the custom modifiers. Fixes #49802.
22197 2003-11-16 Martin Baulig <martin@ximian.com>
22199 * class.c (mono_class_is_open_constructed_type): Implemented the
22200 MONO_TYPE_GENERICINST case.
22202 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
22204 * assembly.c (mono_assembly_fill_assembly_name): New function to
22205 fill out the MonoAssemblyName structure.
22206 (mono_assembly_open): Use the new function.
22208 * icall.c (fill_reflection_assembly_name): New helper function.
22210 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
22213 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
22215 2003-11-15 Martin Baulig <martin@ximian.com>
22217 * class.c (mono_class_is_open_constructed_type): New public
22218 function; checks whether a type is an open constructed type,
22219 ie. whether it still contains type parameters.
22220 (mono_class_inflate_generic_type): If we're a type parameter and
22221 the inflated type is also a MONO_TYPE_(M)VAR, return the original
22224 * class.h (MonoGenericInst): Added `guint32 is_open'.
22226 * loader.c (method_from_methodspec): Check whether we're an open
22227 or closed constructed type and set `ginst->is_open'.
22229 * reflection.c (mono_reflection_bind_generic_parameters): Check
22230 whether we're an open or closed constructed type and set
22232 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
22233 from open constructed types.
22235 2003-11-15 Martin Baulig <martin@ximian.com>
22237 * reflection.c (mono_reflection_bind_generic_parameters): If we're
22238 a generic instance (instead of a generic type declaration) with
22239 unbound generic parameters, bind them to our actual types.
22241 2003-11-14 Martin Baulig <martin@ximian.com>
22243 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
22245 * reflection.c (mono_reflection_bind_generic_parameters): If we're
22246 an interface type, populate `res->interfaces' with instantiated
22247 versions of all the interfaces we inherit.
22249 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
22251 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
22252 when MONO_PATH is set but doesn't contain the install dir.
22254 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22257 (ves_icall_Type_GetInterfaces): don't return an interface twice when
22258 it's also implemented in base classes. Fixes bug #50927.
22260 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
22262 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
22263 if this method is called from a finalizer. Fixes #50913.
22265 2003-11-12 Miguel de Icaza <miguel@ximian.com>
22267 * threads.c: Implement VolatileRead/VolatileWrite
22269 * icall.c: Add new icalls for VolatileRead/VolatileWrite
22271 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
22273 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
22274 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
22277 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
22278 from Peter Ross (pro@missioncriticalit.com).
22280 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
22282 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
22284 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
22286 * assembly.c (mono_assembly_load_references): Disable check because it
22287 triggers on older corlibs which lots of people have.
22289 2003-11-12 Jackson Harper <jackson@ximian.com>
22291 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
22292 load corlib.dll if mscorlib.dll is not found.
22293 * assembly.h: Remove corlib name define.
22296 * image.c: Change corlib name to mscorlib.
22298 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
22300 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
22302 2003-11-11 Miguel de Icaza <miguel@ximian.com>
22304 * appdomain.h: Added loader_optimization here to sync with the C#
22305 code, and add disallow_binding_redirects field.
22307 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
22309 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
22311 * reflection.c (mono_image_build_metadata): Fix crash on modules
22314 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
22316 * icall.c (ves_icall_get_method_info): Return callingConvention as
22319 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
22320 namespaces from the EXPORTEDTYPE table as well.
22322 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
22323 from all modules inside the assembly.
22325 2003-11-11 Martin Baulig <martin@ximian.com>
22327 * reflection.c (mono_reflection_bind_generic_parameters): Make
22328 this work for interfaces.
22330 2003-11-11 Martin Baulig <martin@ximian.com>
22332 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
22334 2003-11-11 Martin Baulig <martin@ximian.com>
22336 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
22337 "MonoInflatedMethod" and "MonoInflatedCtor".
22339 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
22341 * reflection.c (resolution_scope_from_image): Use the assembly table
22342 from the manifest module, since other modules don't have it.
22344 * debug-helpers.c (mono_type_full_name): New helper function.
22346 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
22348 * image.c (mono_image_load_file_for_image): New public function which
22349 is a replacement for the load_file_for_image in class.c.
22351 * assembly.c (mono_assembly_load_module): A wrapper for the function
22352 above which does assembly association and reference loading too.
22354 * class.c (mono_class_from_name): Call mono_assembly_load_module.
22356 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22358 * appdomain.c: not all of the attributes for the full assembly name
22359 are required and the order doesn't matter. Fixes bug #50787.
22361 2003-11-10 Dick Porter <dick@ximian.com>
22363 * locales.c: Use platform-endian UTF16
22365 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
22367 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
22369 2003-11-10 Martin Baulig <martin@ximian.com>
22372 (mono_metadata_load_generic_params): Make this actually work.
22374 * reflection.c (mono_reflection_bind_generic_parameters): If our
22375 parent is a generic instance, pass all the `types' to it, no
22376 matter whether it has the same number of type parameters or not.
22378 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
22380 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
22382 * assembly.c (mono_assembly_load_references): Move the image<->assembly
22383 assignment code to this function so it gets called recursively for all
22386 * image.c (load_modules): Remove the assembly assignment since it is
22387 now done by mono_assembly_load_references.
22389 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
22390 Add 'module' argument.
22391 (mono_module_get_types): New helper function.
22392 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
22394 2003-11-08 Martin Baulig <martin@ximian.com>
22396 * class.c (mono_class_inflate_generic_method): Interface method
22397 don't have a header.
22399 * reflection.c (mono_image_get_methodspec_token): Take an
22400 additional `MonoGenericInst *' argument instead of reading it from
22401 the header; this is necessary to support interfaces.
22402 (mono_image_create_token): Pass the `MonoGenericInst *' from the
22403 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
22404 (inflated_method_get_object): Take an additional `MonoGenericInst *'
22407 * reflection.h (MonoReflectionInflatedMethod): Added
22408 `MonoGenericInst *ginst'.
22410 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
22412 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
22414 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
22416 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
22418 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
22421 (reflection_methodbuilder_from_method_builder):
22422 (reflection_methodbuilder_from_ctor_builder): New helper functions to
22423 initialize a ReflectionMethodBuilder structure.
22424 (mono_image_get_methodbuilder_token):
22425 (mono_image_get_ctorbuilder_token): New functions to emit memberref
22426 tokens which point to types in another module inside the same assembly.
22428 * reflection.c: Use the new helper functions.
22430 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
22432 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
22433 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
22435 * reflection.c (resolution_scope_from_image): Emit a moduleref if
22438 * reflection.c (mono_image_build_metadata): Emit metadata only for the
22439 current module. Emit the manifest only for the main module.
22441 * reflection.c (mono_image_create_token): Add assertion when a
22442 memberref needs to be created.
22444 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
22446 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
22447 larger buffer for the custom attribute blob. Fixes #50637.
22449 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22451 * threadpool.c: notify listener on async processing handles after
22452 invoking the async callback. Thanks to Zoltan.
22454 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
22456 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
22457 avoid code duplication.
22459 * reflection.h (MonoDynamicImage): New type which is currently unused,
22460 but will be used through the ref.emit code in place of
22461 MonoDynamicAssembly.
22463 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
22466 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
22467 a MonoDynamicImage instead of just a MonoImage.
22469 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
22470 icalls to ModuleBuilder but keep their semantics, so they will work
22471 with moduleb->assemblyb. This will change later.
22473 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
22475 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
22478 * reflection.c (mono_image_build_metadata): Avoid creation of a default
22479 main module, since it is now done by the managed code.
22481 2003-11-03 Martin Baulig <martin@ximian.com>
22483 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
22484 `ginst->klass' here.
22485 (method_encode_methodspec): Don't use the `ginst->generic_method's
22486 klass if it's a generic instance, use `ginst->klass' in this case.
22488 2003-11-03 Martin Baulig <martin@ximian.com>
22490 * reflection.c (mono_image_get_generic_method_param_info):
22491 Removed, use mono_image_get_generic_param_info() instead.
22492 (mono_image_get_type_info): Write the GenericParam table before
22493 the Method table. This is neccessary because in the GenericParam
22494 table, type parameters of the class (ie. '!0' etc.) must come
22495 before the ones from its generic methods (ie. '!!0' etc).
22497 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
22499 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
22501 2003-11-02 Martin Baulig <martin@ximian.com>
22503 * reflection.c (create_generic_typespec): Take a
22504 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
22505 the generic parameters from it.
22507 2003-11-02 Martin Baulig <martin@ximian.com>
22509 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
22510 instead of a `MonoClassField *' since we just need the type.
22511 (create_generic_typespec): New static function. Creates a
22512 TypeSpec token for a generic type declaration.
22513 (mono_image_get_generic_field_token): New static function.
22514 (mono_image_create_token): If we're a FieldBuilder in a generic
22515 type declaration, call mono_image_get_generic_field_token() to get
22518 2003-11-02 Martin Baulig <martin@ximian.com>
22521 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
22522 `MonoReflectionGenericInst *declaring_type' and
22523 `MonoReflectionGenericInst *reflected_type' fields.
22525 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
22526 `MonoReflectionGenericInst *declaring_type' and a
22527 `MonoReflectionGenericInst *reflected_type' argument instead of a
22528 single `MonoReflectionGenericInst *type' one. Set
22529 `res->declaring_type' and `res->reflected_type' from them.
22530 (mono_reflection_inflate_field): Likewise.
22532 2003-11-02 Martin Baulig <martin@ximian.com>
22534 * class.c (mono_class_setup_vtable): Don't store generic methods
22537 2003-11-02 Martin Baulig <martin@ximian.com>
22539 * reflection.h (MonoReflectionGenericInst): Added
22540 `MonoReflectionType *declaring_type'.
22542 * reflection.c (mono_reflection_bind_generic_parameters): Use
22543 `if (tb->parent)' instead of `klass->parent'.
22545 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
22547 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
22548 with an empty ASSEMBLY table.
22550 * reflection.c (mono_image_build_metadata): Avoid using the same loop
22551 variable in the inner and outer loops.
22553 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
22555 * metadata.h (mono_metadata_make_token): Put parentheses around macro
22558 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
22560 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
22561 icalls. Instead, do everything in managed code. This is needed since
22562 it is hard to restore the original domain etc. in unmanaged code in the
22563 presence of undeniable exceptions.
22565 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
22566 New icalls to push and pop appdomain refs.
22568 2003-10-31 Martin Baulig <martin@ximian.com>
22570 * class.c (inflate_generic_type): Renamed to
22571 mono_class_inflate_generic_type() and made it public.
22573 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
22576 * loader.c (mono_field_from_memberref): Also set the retklass for
22579 * fielder.c (mono_image_get_inflated_field_token): New static
22580 method; creates a metadata token for an inflated field.
22581 (mono_image_create_token, fixup_method): Added support for
22582 "MonoInflatedField".
22583 (fieldbuilder_to_mono_class_field): New static function.
22584 (mono_reflection_inflate_field): New public function.
22587 (MonoReflectionGenericInst): Added `MonoArray *fields'.
22588 (MonoReflectionInflatedField): New typedef.
22590 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
22592 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
22593 for Solaris and other platforms without s6_addr16
22595 2003-10-30 Martin Baulig <martin@ximian.com>
22597 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
22598 argument instead of two.
22599 (mono_class_inflate_generic_signature): Likewise.
22600 (inflate_generic_header): Likewise.
22601 (mono_class_inflate_generic_method): Likewise. In addition, if
22602 `ginst->klass' is set, it becomes the new `method->klass'.
22604 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
22607 * reflection.c (encode_generic_method_sig): Write a 0xa as the
22608 first byte. [FIXME]
22609 (method_encode_methodspec): If we have generic parameters, create
22610 a MethodSpec instead of a MethodRef.
22611 (fixup_method): Added support for "MonoInflatedMethod" and
22612 "MonoInflatedCtor".
22613 (mono_image_create_token): Added support for "MonoInflatedMethod"
22614 and "MonoInflatedCtor".
22615 (inflated_method_get_object): New static function; returns a
22616 managed "System.Reflection.MonoInflatedMethod" object.
22617 (mono_reflection_bind_generic_method_parameters): Return a
22618 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
22619 (mono_reflection_inflate_method_or_ctor): Likewise.
22620 (mono_image_get_generic_method_param_info): Initialize unused
22622 (mono_image_get_generic_param_info): Likewise.
22624 * reflection.h (MonoReflectionInflatedMethod): New public
22625 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
22626 "S.R.MonoInflatedCtor" classes.
22628 * loader.c (method_from_memberref): If we're a TypeSpec and it
22629 resolves to a generic instance, inflate the method.
22631 2003-10-28 Dick Porter <dick@ximian.com>
22633 * object.c (mono_runtime_run_main): Convert command-line arguments
22634 into utf8, falling back to the user's locale encoding to do so.
22636 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
22638 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
22641 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
22643 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
22644 up icalls at method definition time. Partially fixes #33569.
22646 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
22648 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
22649 marshalling of arrays. Fixes #50116.
22651 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
22653 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
22654 points to a vtable in the dying appdomain.
22656 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
22657 listeners into unmanaged code inside the lock.
22659 * object.c (mono_class_vtable): Turn off typed allocation in non-root
22660 domains and add some comments.
22662 2003-10-25 Martin Baulig <martin@ximian.com>
22664 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
22666 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
22668 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
22669 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
22670 currently parsing. Create the generic class and store it in
22671 `generic_inst->klass' before parsing the type arguments. This is
22672 required to support "recursive" definitions; see mcs/tests/gen-23.cs
22674 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
22675 to support recursive typespec entries.
22677 * class.c (mono_class_setup_parent): If our parent is a generic
22678 instance, we may get called before it has its name set.
22679 (mono_class_from_generic): Splitted into
22680 mono_class_create_from_generic() and mono_class_initialize_generic().
22682 2003-10-25 Martin Baulig <martin@ximian.com>
22684 * icall.c (ves_icall_Type_BindGenericParameters): Return a
22685 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
22686 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
22687 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
22689 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
22690 (create_typespec): Likewise.
22691 (mono_reflection_bind_generic_parameters): Return a
22692 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
22693 (mono_reflection_inflate_method_or_ctor): New public function.
22695 * reflection.h (MonoReflectionGenericInst): New typedef.
22697 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
22699 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
22700 inside the domain lock. Fixes #49993.
22702 * object.c (mono_class_vtable): When typed allocation is used,
22703 allocate vtables in the GC heap instead of in the mempool, since the
22704 vtables contain GC descriptors which are used by the collector even
22705 after the domain owning the mempool is unloaded.
22707 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
22709 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
22710 reflect what it does. Also invalidate mempools instead of freeing
22711 them if a define is set.
22713 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
22716 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
22717 hold the finalizable objects in this domain.
22719 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
22722 * appdomain.c (mono_domain_set): New function to set the current
22723 appdomain, but only if it is not being unloaded.
22725 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
22726 appdomain which is being unloaded.
22728 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
22729 unloading of the root appdomain.
22731 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
22732 icall to execute a method in another appdomain. Intended as a
22733 replacement for InternalSetDomain, which can confuse the code
22734 generation in the JIT.
22736 * appdomain.c (mono_domain_is_unloading): New function to determine
22737 whenever an appdomain is unloading.
22739 * appdomain.c (mono_domain_unload): New function to correctly unload
22742 * assembly.c (mono_assembly_load_references): Check that an assembly
22743 does not references itself.
22745 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
22746 domain manually, it asks the finalizer thread to do it, then waits for
22747 the result. Also added a timeout.
22749 * icall.c: Register the new icalls.
22751 * threads.h threads.c: Export the mono_gc_stop_world and
22752 mono_gc_start_world functions.
22754 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
22755 function to fill out the mempool with 0x2a.
22757 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
22759 * reflection.h (MonoReflectionMethodAux): New structure to store
22760 information which is rarely used, thus is not in the MonoMethod
22763 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
22764 store the aux info.
22766 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
22767 and marshalling info into the aux structure.
22769 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
22770 from the aux structure.
22772 * loader.c (mono_method_get_param_names): Retrieve the param names from
22775 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
22777 * exception.h exception.c: Add AppDomainUnloadedException && fix
22780 2003-10-21 Dick Porter <dick@ximian.com>
22783 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
22784 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
22786 2003-10-21 Martin Baulig <martin@ximian.com>
22788 * reflection.c (mono_reflection_bind_generic_parameters):
22789 `klass->parent' is NULL for interfaces.
22791 2003-10-21 Martin Baulig <martin@ximian.com>
22793 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
22795 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
22797 * exception.c (mono_exception_from_name_msg): New helper function for
22798 creating exceptions and initializing their message field.
22800 * exception.c: Simplify functions using the new helper.
22802 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
22805 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
22806 mono_raise_exception, since otherwise gcc doesn't generate the function
22807 epilog for raise_exception, confusing the stack unwinding in the JIT.
22810 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
22811 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
22814 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22816 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
22819 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
22821 * icall.c: Removed GetUninitializedObject method because
22822 AllocateUninitializedClassInstance does the same.
22824 2003-10-18 Martin Baulig <martin@ximian.com>
22826 * class.c (inflate_generic_signature): Renamed to
22827 mono_class_inflate_generic_signature() and made it public.
22828 (my_mono_class_from_generic_parameter): New static function; if we
22829 don't already have the generic parameter's MonoClass, create a
22830 very simple one which is just used internally in the runtime and
22831 not passed back to managed code.
22833 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
22835 * metadata.h (MonoMethodSignature): Moved the
22836 `MonoGenericParam *gen_params' to the MonoMethodHeader.
22837 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
22839 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
22840 ves_icall_MonoMethod_GetGenericArguments(); this is now an
22841 interncall on the MonoMethod class, not on MethodInfo.
22842 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
22843 calling mono_reflection_bind_generic_method_parameters() directly.
22845 * loader.c (mono_method_get_signature): If this is a MethodSpec;
22846 return the already computed `method->signature'.
22847 (method_from_methodspec): New static function to load a method
22848 from a MethodSpec entry.
22849 (mono_get_method_from_token): Call the new method_from_methodspec()
22850 for MethodSpec tokens.
22851 (mono_get_method_from_token): If we're a generic method, load the
22854 * reflection.c (mono_image_get_memberref_token): Allow
22855 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
22857 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
22858 (mono_image_create_token): First check whether it's a generic
22859 method (so we'd need to create a MethodSpec), then do the other
22861 (mono_reflection_bind_generic_method_parameters): Return a
22862 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
22863 called directly from the interncall.
22865 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
22867 * reflection.c (load_public_key): Move loading of the public key
22870 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
22872 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
22875 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
22876 culture, hash_alg and public_key. Fixes #49555.
22878 2003-10-17 Martin Baulig <martin@ximian.com>
22880 * class.h (MonoGenericInst): Moved this declaration here and added
22881 `MonoMethod *generic_method'.
22884 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
22885 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
22887 * metadata.c (mono_metadata_type_equal): Two types of
22888 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
22889 index; ie. don't compare the address of the `MonoGenericParam'
22891 (mono_metadata_load_generic_params): Removed the `MonoMethod
22894 * metadata.h (MonoGenericInst): Moved declaration to class.h.
22895 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
22897 * reflection.c (method_encode_signature): Encode the number of
22898 generic parameters.
22899 (encode_generic_method_sig): New static function.
22900 (method_encode_methodspec): New static function; creates an entry
22901 in the MethodSpec table for a generic method.
22902 (mono_image_get_methodspec_token): New static function.
22903 (mono_image_create_token): Call mono_image_get_methodspec_token()
22904 for generic methods.
22905 (mono_reflection_bind_generic_method_parameters): New public
22906 function. Instantiates a generic method.
22908 2003-10-16 Martin Baulig <martin@ximian.com>
22910 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
22911 *gen_params' here from MonoMethodHeader.
22913 * metadata.c (mono_metadata_parse_method_signature): If we have
22914 generic parameters, initialize `method->gen_params' and then set
22915 the correct `type->data.generic_param' in all the parameters.
22917 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
22919 * threads.c (mono_threads_get_default_stacksize): New function to
22920 return the default stacksize.
22922 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
22923 termination of the finalizer thread, since the previous method had
22924 race conditions. Fixes #49628.
22926 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
22927 as for the other managed threads.
22929 2003-10-16 Martin Baulig <martin@ximian.com>
22931 * class.c (inflate_generic_signature): Copy `generic_param_count'
22934 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
22937 * metadata.c (mono_metadata_parse_method_signature): Actually set
22938 the `method->generic_param_count' here.
22939 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
22941 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
22943 * object.h: Add a new field to TypedRef to simplify the implementation
22944 of the REFANY opcodes in the JIT.
22946 * icall.c: Make use of the new field.
22948 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
22951 2003-10-15 Martin Baulig <martin@ximian.com>
22953 * class.c (mono_class_from_gen_param): Renamed to
22954 mono_class_from_generic_parameter() and moved most of the
22955 functionality from mono_reflection_define_generic_parameter()
22956 here; ie. we create a "real" class here.
22957 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
22958 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
22959 previously been called.
22961 * class.h (MonoGenericParam): Moved the declaration of this struct
22962 here from metadata.h and added `MonoMethod *method'.
22964 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
22967 * loader.c (mono_get_method_from_token): If we have any generic
22968 parameters, call mono_metadata_load_generic_params() to read them
22969 from the MONO_TABLE_GENERICPAR.
22971 * metadata.c (mono_metadata_load_generic_params): Added
22972 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
22974 * metadata.h (MonoMethodSignature): Replaced
22975 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
22976 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
22978 * reflection.c (mono_reflection_define_generic_parameter): Moved
22979 most of the functionality into the new
22980 mono_class_from_generic_parameter(); set the `method' field if
22981 we're a method parameter.
22983 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
22985 * marshal.c (emit_struct_conv): if native size is 0
22988 2003-10-14 Martin Baulig <martin@ximian.com>
22990 * icall.c: The generics API has changed in the spec since it was
22991 added to System.Type; these modifications make it match the spec
22993 (ves_icall_Type_GetGenericParameters): Renamed to
22994 `ves_icall_Type_GetGenericArguments'.
22995 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
22996 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
22997 `ves_icall_MonoType_get_HasGenericArguments'.
22998 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
22999 `ves_icall_MonoType_get_IsGenericParameter'.
23000 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
23001 this is no interncall anymore.
23002 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
23003 `ves_icall_TypeBuilder_get_IsGenericParameter'.
23005 2003-10-14 Martin Baulig <martin@ximian.com>
23007 * reflection.c (mono_reflection_bind_generic_parameters): Also
23008 inflate generic methods if we're reading the class from IL.
23010 2003-10-13 Martin Baulig <martin@ximian.com>
23012 * reflection.c (mono_reflection_define_generic_parameter): This
23013 method isn't called directly from the icall anymore; take a
23014 `MonoReflectionAssemblyBuilder *' so we can use this for type and
23015 method generic parameters.
23016 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
23017 (method_builder_encode_signature): Encode generic parameters.
23018 (mono_image_get_method_info): Write generic params to the
23019 MONO_TABLE_GENERICPARAM table.
23021 * reflection.h (MonoReflectionMethodBuilder): Added
23022 `MonoArray *generic_params'.
23024 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
23026 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
23027 wrapper for mono_reflection_define_generic_parameter().
23028 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
23030 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
23032 * marshal.h: Add missing function to fix build.
23034 * marshal.c (mono_marshal_get_native_wrapper): Add support for
23035 the SetLastError pinvoke attribute.
23037 * marshal.c (mono_marshal_set_last_error): New helper function called
23038 by the generated code.
23040 * marshal.c (mono_mb_emit_branch): New helper function.
23042 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
23044 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
23045 classes as parameters and return values of delegates. Fixes #29256.
23047 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
23049 * locales.c: use gint32 in non HAVE_ICU case
23051 2003-10-11 Martin Baulig <martin@ximian.com>
23053 * mono-debug.c (mono_debug_add_method): Added a workaround for
23056 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
23058 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
23059 delegates passed to native code must use the STDCALL calling
23060 convention. Fixes #35987.
23062 2003-10-10 Martin Baulig <martin@ximian.com>
23064 * class.c (inflate_generic_type): If we're inflating for a generic
23065 type instance (and not for a generic method), return
23066 MONO_TYPE_MVAR unchanged.
23068 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23070 * string-icalls.c: Join ignores null strings in the source array.
23071 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
23072 * threads.c: GetAvailableTheads is slightly more accurate.
23074 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
23076 * threads.h threads.c : add mono_threads_set_default_stacksize
23077 and pass default to CreateThread calls.
23079 2003-10-09 Dick Porter <dick@ximian.com>
23083 * locales.c: Internal calls for constructing CultureInfo and
23084 related objects from libicu (if its available.)
23086 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
23088 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
23090 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23092 * threadpool.c: added an argument to async_invoke_thread that is the
23093 item to process, pass the MonoAsyncResult to the thread start function
23094 when creating a new thread. This way we don't need to acquire any lock
23095 when we're creating a new thread. Readded a semaphore for faster
23096 response times (instead of that Sleep i added).
23098 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
23100 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
23101 get daylight change dates better on Windows, fix handling
23102 of platforms without tm_gmtoff.
23104 2003-10-06 Martin Baulig <martin@ximian.com>
23106 * class.c (inflate_generic_method): Renamed to
23107 mono_class_inflate_generic_method() and made public.
23108 (mono_class_init): Don't inflate the generic methods here.
23109 (mono_class_from_generic): Added `gboolean inflate_methods'
23110 argument. Inflate the methods here.
23112 * loader.c (mono_method_get_param_names): Ignore instances of
23113 generic types for the moment.
23115 * reflection.c (fixup_method): Added support for inflated methods.
23116 (mono_image_create_token): Use mono_image_get_methodref_token()
23117 for inflated methods.
23118 (mono_custom_attrs_from_param): Ignore instances of generic types
23120 (mono_reflection_bind_generic_parameters): New public function.
23121 Moved all the functionality from
23122 ves_icall_Type_BindGenericParameters() here and added support for
23124 (mono_reflection_define_generic_parameter): Initialize
23125 `klass->methods' here.
23127 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
23128 functionality into mono_reflection_define_generic_parameter().
23129 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
23130 TypeBuilder, return that TypeBuilder.
23132 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23134 * appdomain.c: removed mono_delegate_semaphore.
23137 (mono_thread_pool_add): moved hash table creation inside and the thread
23138 creation outside of the critical region.
23139 (mono_thread_pool_finish): removed obsolete code.
23140 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
23141 continue or exit the thread depending on the queue.
23143 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
23145 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
23146 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
23147 handle more bool marshalling options
23149 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
23151 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
23152 arrays of structs. Also add a more descriptive error message when
23153 a structure member is marshalled as LPArray.
23155 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
23157 * marshal.c (mono_marshal_get_native_wrapper): Add support for
23158 marshalling arrays of complex types. Fixes #29098. Also remove an
23159 usused and incomplete function.
23161 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
23163 * gc.c: report heap_size - free_bytes as total memory allocated
23166 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
23168 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
23169 fix timezone handling problems on Windows.
23171 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
23172 asserts when the year is outside the range handled by ms the functions.
23174 * class.c (setup_interface_offsets): If the class is an interface,
23175 fill out its interface_offsets slot.
23177 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23179 * threadpool.c: mark threadpool threads as background.
23181 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
23183 * decimal.c - define DECINLINE to nothing if not using GCC
23185 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
23187 * assembly.c: More refcount fixes.
23189 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23191 * string-icalls.c: if we're not trimming, return the same string.
23192 When not splitting, don't create a new string.
23194 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23197 (mono_image_open): increment the ref_count inside the critical section.
23199 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
23201 * image.c (mono_image_open): Fix reference counting bug.
23203 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
23205 * marshal.c (mono_marshal_type_size) struct alignment changed for
23206 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
23207 64bits. Avoid leak in mono_marshal_get_native_wrapper when
23208 mono_lookup_pinvoke_call throws.
23210 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
23212 * reflection.c (mono_reflection_parse_type): Fix #49114.
23214 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
23215 temporary workaround for cygwin header problem.
23217 * object.c (mono_object_isinst): Synchronize this with the code
23218 generated by the JIT for casts.
23220 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
23222 * reflection.c (encode_type): Fix #38332.
23224 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
23226 * marshal.c (mono_marshal_method_from_wrapper): New function to return
23227 the original method from the wrapper method.
23229 2003-09-25 Martin Baulig <martin@ximian.com>
23231 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
23232 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
23233 (ves_icall_Type_get_IsGenericInstance): New interncall.
23235 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
23237 * object.c: fix cast warning in big endian code.
23239 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
23241 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
23243 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23245 * assembly.c: don't call check_env from mono_assembly_load. It's
23246 already done once in mono_assemblies_init and may cause headaches when
23247 multiple threads are loading assemblies.
23249 2003-09-19 Martin Baulig <martin@ximian.com>
23251 * reflection.c (mono_reflection_define_generic_parameter): Don't
23252 allocate `klass->methods', set `klass->flags' to
23253 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
23255 2003-09-18 Martin Baulig <martin@ximian.com>
23257 * class.c (mono_class_init): Don't create `class->methods' if it's
23258 already initialized.
23260 * metadata.c (mono_metadata_load_generic_params): Make this
23263 * reflection.c (mono_reflection_define_generic_parameter): Set
23264 parent class and interfaces from the constraints.
23266 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
23267 to keep this struct in sync with the declaration in TypeBuilder.cs.
23269 2003-09-17 Martin Baulig <martin@ximian.com>
23271 * metadata.h (MonoType): Replaced the data's `int type_param'
23272 field with `MonoGenericParam *generic_param'.
23273 (MonoGenericParam): Added `MonoClass *klass'.
23275 * class.c (mono_class_from_gen_param): Removed the
23276 `MonoImage *image' and `int type_num' arguments.
23278 * metadata.c (mono_metadata_parse_generic_param): New static
23279 method; creates a MonoGenericParam which just contains the index.
23280 (do_mono_metadata_parse_type): Call
23281 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
23284 * reflection.c (mono_image_typedef_or_ref): Generic type
23285 parameters may be in the same assembly, but never use a typedef
23287 (mono_reflection_define_generic_parameter): We're now creating a
23288 "real" class for the type parameter; it's now safe to call
23289 mono_class_from_mono_type() on the class'es type, it'll do the
23292 2003-09-16 Martin Baulig <martin@ximian.com>
23294 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
23295 `symfile->range_entry_size' and `symfile->class_entry_size' here;
23296 the `symfile' data structure must be fully initialized before it
23297 gets added to the table.
23299 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
23301 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
23303 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
23304 class init trampolines.
23306 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
23308 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
23309 to the built-in profiler to turn off time and allocation profiling
23312 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
23314 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
23317 * debug-helpers.c (mono_method_full_name): Print the wrapper type
23318 in human readable form.
23320 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
23322 * reflection.c icall.c: Fixed warnings.
23324 * image.c (load_class_names): Use a temporary hash table to hold the
23325 namespaces in order to avoid doing many string comparisons.
23327 * image.h: Fix typo.
23329 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
23330 Pass NULL instead of g_direct_equal to the GHashTable constructor
23331 since the NULL case is short-circuited inside g_hash_table_lookup,
23332 leading to better performance.
23334 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
23335 obtain the first custom attribute for a given index. Depends on the
23336 CustomAttribute table being sorted by the parent field.
23338 * reflection.c (mono_custom_attrs_from_index): Use the new function
23339 for better performance.
23341 2003-09-07 Martin Baulig <martin@ximian.com>
23343 * class.c (mono_class_init): If we're a generic instance, inflate
23344 all our methods instead of loading them from the image.
23345 (mono_class_from_generic): Set `class->methods = gklass->methods'.
23347 2003-09-07 Martin Baulig <martin@ximian.com>
23349 * mono-debug-debugger.c: Added support for constructors.
23351 2003-09-06 Martin Baulig <martin@ximian.com>
23353 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
23356 * reflection.c (mono_reflection_setup_generic_class): Call
23357 ensure_runtime_vtable() to create the vtable.
23359 2003-09-05 Martin Baulig <martin@ximian.com>
23361 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
23364 2003-09-04 Martin Baulig <martin@ximian.com>
23366 * reflection.c (mono_reflection_define_generic_parameter): Generic
23367 parameters start with zero.
23369 2003-09-04 Martin Baulig <martin@ximian.com>
23371 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
23373 * reflection.h (MonoReflectionGenericParam): New typedef.
23374 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
23375 the generic parameters from the managed TypeBuilder.
23377 * reflection.c (mono_reflection_define_generic_parameter): New function.
23378 (mono_reflection_create_runtime_class): Encode generic parameters.
23379 (mono_reflection_setup_generic_class): New function; this is
23380 called after adding adding all generic params to the TypeBuilder.
23381 (encode_type): Added MONO_TYPE_VAR.
23383 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
23385 * class.h class.c (mono_class_needs_cctor_run): Moved this method
23388 * assembly.h assembly.c: Moved the AOT loading code into an assembly
23391 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
23393 * reflection.h reflection.c class.h class.c: Delete duplicate
23394 definition of mono_type_get_name () from reflection.c and export the
23397 * class.c: Class loading fixes from Bernie Solomon
23398 (bernard@ugsolutions.com).
23400 * reflection.c: Endianness fixes from Bernie Solomon
23401 (bernard@ugsolutions.com).
23403 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
23405 * assembly.h assembly.c: Define a file format version for AOT
23408 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
23410 * appdomain.h (MonoJitInfo): New field to determine whenever the
23411 code is domain neutral.
23413 2003-08-31 Miguel de Icaza <miguel@ximian.com>
23415 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
23417 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
23419 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
23420 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
23421 Avoid caching the result since strings must be domain specific. Fixes
23424 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
23426 * marshal.c (mono_marshal_init): Make this callable multiple times
23427 since it is hard to find a correct place to call it.
23429 * object.c (mono_runtime_class_init): Execute static constructors in
23430 the correct appdomain.
23432 * image.c (build_guid_table): Handle the case when multiple images have
23435 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23437 * icall.c: added a couple of icalls for System.Web.
23439 2003-08-28 Martin Baulig <martin@ximian.com>
23441 * icall.c (ves_icall_Type_BindGenericParameters): Use
23442 `klass->generic_inst' instead of `&klass->byval_arg' in the
23443 mono_type_get_object() call. The returned type must be
23444 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
23446 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
23450 * object.c (mono_class_proxy_vtable): Make it thread safe.
23452 * pedump.c: Fix warning.
23454 * object.c appdomain.h: Get rid of metadata_section.
23455 It is no longer needed and it was causing deadlocks with domain->lock.
23457 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
23459 2003-08-26 Martin Baulig <martin@ximian.com>
23461 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
23463 2003-08-26 Martin Baulig <martin@ximian.com>
23465 * pedump.c (main): Call mono_metadata_init(),
23466 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
23467 and mono_loader_init().
23469 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
23471 * loader.h: Add missing include to fix build.
23473 * image.h: mono_image_load_references is no more.
23475 * assembly.c: Reworked assembly loading to make it really thread safe.
23476 After these changes, the assembly returned by mono_assembly_open is
23477 fully initialized, i.e. all its references assemblies are loaded.
23479 * assembly.c (mono_image_load_references): Renamed to
23480 mono_assembly_load_references, and made private, since clients no
23481 longer need to call it.
23483 * class.c: Removed calls to mono_assembly_load_references, since it was
23484 a source of deadlocks.
23486 * loader.h loader.c class.h class.c: Protect data structures using a
23487 new lock, the loader lock.
23489 * class.c (mono_class_setup_vtable): Create temporary hash tables and
23490 GPtrArrays only when needed.
23492 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
23493 into empty structures by mcs. Fixes pinvoke7.cs.
23495 * domain.c (mono_init): Call a new initialization function.
23497 * appdomain.c (mono_runtime_init): Call the new initializer function
23498 of the marshal module.
23500 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
23501 inserted into empty structures by mcs. Fixes pinvoke7.cs.
23503 * marshal.h marshal.c: Added locks around the wrapper caches to make
23504 this module thread safe.
23506 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
23507 this argument. Fixes pinvoke1.exe.
23509 2003-08-25 Lluis Sanchez <lluis@ximian.com>
23511 * object.h: Added call_type field to MonoMethodMessage and the corresponding
23512 enumeration of values. Removed fields to store remote call output values in
23513 MonoAsyncResult. Not needed any more.
23514 * object.c: Initialize call_type and async_result fields in mono_message_init.
23515 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
23516 dispatching the message.
23517 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
23518 async call to finish. To do it use a message with EndInvoke call type.
23520 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
23522 * loader.h loader.c (mono_method_hash_marhal_info): New function which
23523 determines whenever a method has marshalling info.
23525 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23527 * assembly.c: fix the build on windows.
23529 2003-08-22 Lluis Sanchez <lluis@ximian.com>
23531 * object.cs: Fixed bug #47785.
23533 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
23535 * string-icalls.c (StringReplace): If their are no occurances of
23536 the old string found return a reference to the supplied
23537 string. This saves some memory and matches MS behavoir.
23539 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23541 * socket-io.c: fixed compilation for systems that define AF_INET6
23542 and don't define SOL_IP/SOL_IPV6.
23544 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
23546 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
23547 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
23549 * rawbuffer.c rawbuffer.h: Make this module thread safe.
23551 * domain.c: Make this module thread safe.
23553 * domain.c (mono_init): Call new initialization function.
23555 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
23556 reference types too. Fixes #38812.
23558 * image.c (mono_image_init): Fixed warnings.
23560 * class.c (mono_class_from_typeref): Handle assembly load failure
23563 * appdomain.c (add_assemblies_to_domain): Handle the case when
23564 the references of an assembly are not yet loaded.
23566 * metadata.c image.c assembly.c: Moved initialization of global
23567 variables to a separate function called at startup since lazy
23568 initialization of these variables is not thread safe.
23570 * image.c assembly.c: Made this module thread safe by adding locks in
23571 the appropriate places.
23573 * domain.c (mono_init): Call the new initialization functions of the
23576 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
23578 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
23579 make a direct call. It is proxy's work to make the call asynchronous.
23580 mono_delegate_end_invoke(): If the targe is a proxy, just collect
23582 * object.cs: mono_method_call_message_new(): read AsyncResult and
23583 state object from parameters list, if this info is requested.
23584 * object.h: Added fields to store remote call output values in
23585 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
23587 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
23589 * object.h: add needed fields to MonoThread.
23590 * threads.c, threads.h: allow registering a function to cleanup data
23591 allocated per thread by the JIT.
23593 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23595 * loader.h: portability fix by Bernie Solomon
23596 * <bernard@ugsolutions.com>.
23598 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
23600 * reflection.h reflection.c (mono_param_get_objects): Changed this to
23601 return a MonoArray. This simplifies the code and also ensures that
23602 the cache allways contains an object reference as a value.
23604 * icall.c (ves_icall_get_parameter_info): Simplified using the new
23607 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23609 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
23610 fixes a problem with byte ordering when getting the address family for
23613 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
23615 * .cvsignore: Added monosn.
23617 * reflection.h reflection.c loader.c: Added support for parameter
23618 marshalling to dynamically created types. Fixes #47295.
23620 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
23622 * rand.c: remove useless warnings.
23624 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
23626 * class.c: implemented ldtoken for methods and fieldrefs.
23628 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23630 * threadpool.c: when mono_async_invoke was called, no one took care of
23631 monitoring the queue. So if the method invoked took some time and we
23632 got new async invoke requests after 500 ms (the thread created waited
23633 that long in WaitForSingleObject), the new async invoke was not called
23634 until the previous one finished.
23636 This is fixed now. Thanks to Totte for helping with it.
23638 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23640 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
23642 2003-08-11 Martin Baulig <martin@ximian.com>
23644 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
23646 2003-08-06 Martin Baulig <martin@ximian.com>
23648 * mono-debug-debugger.c: Added support for static fields,
23649 properties and methods.
23651 2003-08-06 Martin Baulig <martin@ximian.com>
23653 * mono-debug-debugger.c: Don't store the MonoString's vtable to
23654 make this work for applications with multiple application domains.
23656 2003-08-04 Martin Baulig <martin@ximian.com>
23658 * mono-debug-debugger.c: Completely reworked the type support; the
23659 most important thing is that we're now just using one single
23660 `MonoType' instance per type.
23662 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
23664 * mono-endian.h, mono-endian.c, icall.c: Added icall
23665 ves_icall_System_Double_AssertEndianity to assert double word endianity
23666 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
23668 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
23670 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
23671 support, icalls and fixes.
23673 2003-07-31 Miguel de Icaza <miguel@ximian.com>
23675 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
23676 classes that are a punctuation character in .NET is not the same a
23679 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23681 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
23683 2003-07-29 Miguel de Icaza <miguel@ximian.com>
23685 * icall.c: Add new MemCopy internalcall.
23686 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
23687 Simplified code; It is not necessary to handle all the cases here,
23688 as the C# code takes care of it. Only handle the case of the name
23689 resource embedded into the assembly.
23691 Changed signature to return the data pointer and the size of the
23694 2003-07-26 Miguel de Icaza <miguel@ximian.com>
23696 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
23697 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
23699 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
23701 * socket-io.c: ignore EINTR error in select.
23703 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
23705 * class.h, class.c: removed unused subclasses field in MonoClass.
23707 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
23709 * icall.c: improve fix of get_base_definition(). If the parent class
23710 doesn't have the mehod, look at the parent of the parent.
23711 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
23712 to check if a parameter is an in or out parameter
23713 (PARAM_ATTRIBUTE_IN is not set by default).
23714 mono_method_return_message_restore(): Use mono_class_value_size to
23715 get the size of a value type. mono_type_stack_size (parameterType)
23716 does not return the correct value if parameterType is byRef.
23717 mono_load_remote_field(), mono_load_remote_field_new(),
23718 mono_store_remote_field(), mono_store_remote_field_new():
23719 raise exception if the remote call returns an exception.
23721 2003-07-28 Martin Baulig <martin@ximian.com>
23723 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
23724 method. This is a wrapper around mono_runtime_invoke() which
23725 boxes the instance object if neccessary.
23727 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
23729 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
23730 metadata.h, row-indexes.h, verify.c: first cut of generics support.
23732 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
23734 * icall.c: disable mcs bug workaround.
23736 2003-07-21 Miguel de Icaza <miguel@ximian.com>
23738 * object.c (mono_runtime_class_init): Take the metadata_section
23739 mutex before obtaining the domain mutex.
23741 * appdomain.h: Added definition of metadata_section mutex here.
23743 * object.c: define metadata_mutex here.
23745 2003-07-24 Ravi Pratap <ravi@ximian.com>
23747 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
23750 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
23752 * reflection.c: Fix bug #46669
23754 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23759 * object.h: fill in the type name for TypeLoadException.
23761 2003-07-23 Ravi Pratap <ravi@ximian.com>
23763 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
23764 relationship between TypeBuilders while compiling corlib) and bug
23765 45993 (Array types returned from the runtime while compiling
23766 corlib were from the loaded corlib).
23768 2003-07-22 Martin Baulig <martin@ximian.com>
23770 * mono-debug-debugger.c: Reworked the type support a bit more;
23771 distinguish between types and classes.
23773 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
23775 * icall.c: add IsArrayImpl icall.
23777 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
23779 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
23780 initializing real_size only once. Also fix bug #46602.
23782 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
23784 * object.c: Renamed mono_metadata_section to metadata_section.
23786 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
23788 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
23789 empty array if the type is an array. Fixed.
23790 ves_icall_MonoMethod_get_base_definition: if the base method
23791 is abstract, get the MethodInfo from the list of methods of
23793 * reflection.c: ParameterInfo.PositionImpl should be zero-based
23794 and it was 1-based. Fixed in mono_param_get_objects.
23796 2003-07-20 Martin Baulig <martin@ximian.com>
23798 * mono-debug.h: Set version number to 31.
23799 (mono_debug_init): Added `MonoDomain *' argument.
23801 * mono-debug-debugger.c: Reworked the type support; explicitly
23802 tell the debugger about builtin types; pass the `klass' address to
23805 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
23807 * image.c: Allow new metadata tables to be loaded without a
23808 warning. Also update the warning message to give the new constant value.
23810 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
23812 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
23813 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
23814 array type representation changes.
23816 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
23818 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
23819 on Environment.Exit () call.
23821 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
23823 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
23824 requires a matching corlib.
23826 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
23828 * Changelog: My editor decided to add a CR to each line. Sorry about that.
23829 Committed again without the CRs.
23831 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
23833 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
23834 getting it from the "this" socket instance. Did not work
23835 if the socket is a subclass of Socket.
23836 Also fixed bug #35371.
23838 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
23840 * metadata.c: fixed size for TypedByRef.
23841 * loader.c: when searching for a method, consider the vararg amrker.
23842 * unicode.c, decimal.c: constify some arrays.
23844 2003-07-15 Dick Porter <dick@ximian.com>
23846 * socket-io.c: Fixed compilation for gcc < 3.2.
23848 Fixed compilation for machines that don't have AF_INET6 (thanks to
23849 Bernie Solomon <bernard@ugsolutions.com> for that part.)
23851 Fixed compile warnings.
23853 Fixed formatting and line endings.
23855 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
23858 * socket-io.c: Added IPv6 support.
23860 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
23862 * class.c (mono_class_is_assignable_from): New function to implement
23863 the is_assignable_from logic. Used by mono_object_isinst,
23864 Type::IsAssignableFrom () and the interpreter.
23866 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
23867 Object, even interfaces.
23869 * object.c (mono_object_isinst): Implement in terms of
23870 is_assignable_from.
23872 * icall.c (ves_icall_type_is_assignable_from): New icall.
23874 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
23876 * domain.c (foreach_domain): fix compiler warning.
23878 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
23880 * image.c (load_metadata_ptrs): use g_strndup because strndup is
23881 not available on all plattforms
23883 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
23885 * image.h image.c: Store the metadata version string in MonoImage.
23886 * icall.c: New icall to retrieve the image version.
23887 * reflection.c (create_dynamic_image): Fill in the image version field
23888 * reflection.c (build_compressed_metadata): Use the image version
23889 from the image structure.
23891 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23893 * appdomain.c: modified comment.
23894 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
23895 That will be its last iteration when mono_gc_cleanup is called from
23896 mono_runtime_cleanup and before the domain is unloaded.
23900 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
23902 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
23905 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
23907 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
23908 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
23909 Bernie Solomon <bernard@ugsolutions.com>.
23911 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
23913 * object.c, object.h: provide mono_object_new_fast() for faster
23914 allocation in some special cases.
23916 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
23918 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
23919 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
23921 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
23923 * threadpool.c: fix leaks.
23925 2003-07-01 Dick Porter <dick@ximian.com>
23927 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
23928 using MonoGHashTables. Fixes threadpool bug posted to list.
23930 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
23932 * image.h, image.c: added support to load an assembly from a byte array.
23933 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
23934 assembly bundle support.
23936 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
23938 * threadpool.c (mono_thread_pool_add): keep a reference to the
23939 AsyncResult to prevent GC
23941 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
23943 * class.c: leak fix.
23945 2003-06-25 Dick Porter <dick@ximian.com>
23947 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
23948 for the async object, the WaitHandle object will close the handle.
23951 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
23953 * class.c: in mono_array_class_get (), lookup from the hash with the
23954 same type we insert: this works around a bug in
23955 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
23956 lluis. The real fix will have to wait for after the release.
23958 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23960 * icall.c: fix memory leak when getting type members.
23962 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
23964 * reflection.c: added more pubtoken special cases.
23966 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
23968 * class.c: handle field offset correctly when class size
23969 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
23971 2003-06-20 Martin Baulig <martin@ximian.com>
23973 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
23976 2003-06-20 Martin Baulig <martin@ximian.com>
23978 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
23980 2003-06-20 Martin Baulig <martin@ximian.com>
23982 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
23983 just distinguish between variables in registers and variables at
23984 an offset relative to a register.
23986 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23988 * icall.c: #ifdef out latest changes until mcs is fixed.
23990 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
23992 * icall.c: return members in metadata order.
23994 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
23996 * icall.c: avoid infinite loop in GetTimeZoneData.
23998 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
24000 * icall.c: added Marshal.Prelink/All icalls.
24002 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
24004 * object.c, object.h: fix warnings and do some overflow checking
24005 when creating arrays.
24007 2003-06-17 Dick Porter <dick@ximian.com>
24010 * file-io.c: File attributes need to be tweaked slightly when
24011 passed from the managed to the w32 world.
24013 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
24014 * profiler.h profiler-private.h profiler.c: Rework last patch
24015 based on suggestion by Paolo.
24017 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
24019 * profiler.h profiler-private.h profiler.c: Added infrastructure for
24020 instruction level coverage data collection.
24021 * profiler.h profiler.c (: Added new callback function which can be
24022 used by the profiler to limit which functions should have coverage
24024 * profiler.c (mono_profiler_load): Call g_module_build_path to
24025 generate the file name of the profiler library.
24027 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24029 * profiler.c, profiler.h, profiler-private.h: added basic block
24030 coverage profiling API.
24032 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
24034 * reflection.c (mono_reflection_create_runtime_class): Add support
24035 for events in dynamically generated code.
24037 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
24040 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24042 * icall.c: when getting timezone info, return reasonable values if we
24043 can't get the actual data.
24045 2003-06-14 Dick Porter <dick@ximian.com>
24047 * threads.c (start_wrapper): Remove the reference to the thread
24048 object in the TLS data, so the thread object can be finalized.
24049 This won't be reached if the thread threw an uncaught exception,
24050 so those thread handles will stay referenced :-( (This is due to
24051 missing support for scanning thread-specific data in the Boehm GC
24052 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
24054 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
24056 * reflection.c: ensure streams and tables are first allocated with
24057 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
24059 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24061 * icall.c: fixed GetElementType for byrefs (bug# 44792).
24063 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
24065 * reflection.c (mono_reflection_create_runtime_class): Add support for
24066 properties to dynamically created classes.
24067 * reflection.c: Fix a few places where non-MonoObjects were inserted
24068 into the tokens hashtable.
24070 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24072 * object.c: some support to handle out of memory exceptions.
24074 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
24076 * marshal.c (mono_marshal_get_native_wrapper): support reference
24079 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24081 * object.h, object.c: more portability stuff from Bernie Solomon.
24082 Unexport mono_object_allocate(). Added mono_object_unbox ().
24083 Set exitcode when an unhandled exception is thrown.
24085 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
24087 * marshal.c (mono_marshal_get_native_wrapper): use custom
24088 marshaler for return types.
24090 2003-06-10 Dick Porter <dick@ximian.com>
24092 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
24093 ip_mreq is available
24095 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
24097 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
24098 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
24099 by Bernie Solomon <bernard@ugsolutions.com>.
24101 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
24103 * gc.c (mono_gc_init): Avoid error message on shutdown when
24104 GC_DONT_GC=1 is used.
24106 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
24107 New icall to return the GUID of a module.
24109 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24111 * class.c: ensure instance size always includes the parent's size
24112 even whem class size is set explicitly (fixes bug#44294).
24114 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24116 * profiler.h, profiler.c: made the simple profiler thread-safe,
24117 get more accurate timing info. Allow the loading of an
24118 externally-developed profiler module.
24120 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
24122 * marshal.c (mono_marshal_get_native_wrapper): improved
24123 class/byref arguments.
24124 (mono_marshal_get_native_wrapper): better string marshaling support.
24126 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24128 * class.c: ensure .pack and .size are handled correctly and
24129 simplified layout of static fields.
24131 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
24134 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
24136 * loader.c (mono_lookup_pinvoke_call): look for modules in the
24137 current directory (fix bug 44008)
24139 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
24141 * marshal.c (mono_marshal_get_native_wrapper): started support for
24143 (mono_delegate_to_ftnptr): consider marshalling specifications
24145 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24147 * reflection.c, reflection.h: emit custom marshal info.
24149 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24151 * object.c: free the GError.
24152 * icall.c: added CloseEvent_internal.
24154 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
24157 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
24159 * loader.c (mono_method_get_signature): Add support for dynamic
24162 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24164 * reflection.c: fixed bug #43905.
24166 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24168 * class.c, domain.c, icall.c, metadata.h, object.h: support for
24169 handling TypedReference and ArgIterator.
24170 * loader.c, loader.h: added function to get signature at call site.
24172 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24174 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
24175 data readonly. Buglets and warning fixes. Some MethodSpec support.
24177 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24179 * class.h, class.c, object.c: remove relative numbering support.
24181 2003-05-26 Miguel de Icaza <miguel@ximian.com>
24183 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
24184 free the string, until we get a chance to fix Gtk#
24186 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24188 * marshal.c: revert last patch.
24190 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
24192 * icall.c: updates for new mono_class_vtable() not calling
24193 the type constructor anymore.
24195 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24197 * object.h, object.c: separate vtable creation from type
24198 initialization. Make running the .cctor thread safe.
24200 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
24202 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
24204 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
24206 * loader.c (mono_get_method): consider calling convention
24208 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
24210 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
24211 to return the invisible global type for a module.
24213 * reflection.c (mono_image_build_metadata): Emit global fields too.
24215 2003-05-20 Peter Williams <peterw@ximian.com>
24217 * loader.c (mono_lookup_internal_call): Add a few newlines.
24219 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
24221 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
24224 * appdomain.c (set_domain_search_path): Recalculate search path when
24225 AppDomainSetup.PrivateBinPath changes.
24227 * object.c (mono_class_compute_gc_descriptor): It turns out some
24228 parts of the class libs (like System.Thread) holds pointers to
24229 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
24230 to treat native int a pointer type here.
24232 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
24234 * appdomain.h, domain.c: add hashtable for jump target resolution.
24236 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
24238 * reflection.h reflection.c icall.c: Added new icalls
24239 GetManifestResourceInfoInternal, GetModulesInternal and support
24242 2003-05-16 Dick Porter <dick@ximian.com>
24246 * file-io.c: Implement System.IO.MonoIO::GetTempPath
24248 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
24250 * object.c: mono_store_remote_field: little fix to previous patch.
24252 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24254 * class.c: add constructors to array classes.
24255 * icall.c: special case array construction for InternalInvoke (),
24257 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
24259 * class.h class.c reflection.c object.c: Added support for field
24260 defaults in dynamically generated classes.
24262 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24264 * reflection.c: properly encode charset for ddlimport.
24266 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
24268 * threads.c: allow compiling without GC.
24270 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24272 * appdomain.h, object.c, object.h, threads.c, threads.h: added
24273 handling of thread static data.
24275 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24277 * reflection.h, reflection.c: added mono_custom_attrs_free ().
24279 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
24281 * class.c (mono_array_class_get): always set the serializable flags
24282 (mono_array_class_get): always set the SEALED attribute for array types
24284 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
24286 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
24287 attributes (fix for bug 42021).
24289 2003-05-12 Dick Porter <dick@ximian.com>
24291 * gc.c: Don't run finalizers when the finalizer thread is
24292 finishing up, because the default domain has already been
24295 2003-05-11 Miguel de Icaza <miguel@ximian.com>
24297 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
24298 value is null, we should throw an exception. This is slightly
24299 different than the other conventions used for the constructor.
24301 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24303 * socket-io.c: fixed windows build.
24305 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24307 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
24309 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
24311 * object.c (mono_string_new_wrapper): Compatibility fix for MS
24314 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
24316 * class.c (mono_class_layout_fields): Add experimental GC aware
24317 auto layout facility. Requires class library changes to work correctly.
24319 (mono_class_setup_vtable): Avoid overriding explicit interface
24320 method implementations. Fixes iface3.exe test.
24322 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
24324 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
24325 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
24327 * metadata.h: Add new type classification macro which determines
24328 whenever the type holds an object reference.
24330 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
24332 * marshal.c (mono_marshal_get_native_wrapper): cleanups
24334 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
24336 * gc.c (finalizer_thread): Work around a GC bug.
24338 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
24340 * marshal.c (emit_struct_conv): allow unions
24342 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
24344 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
24346 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
24348 2003-05-06 Martin Baulig <martin@ximian.com>
24350 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
24352 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24355 (Select_internal): allow NULLs, don't create arrays if not needed.
24356 Coupled with Socket.cs changes.
24359 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
24360 register a finalizer for it that will close the semaphore handle. This
24361 fixes the leak and make Lupus' test run with > 4080 loops.
24363 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
24365 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
24366 Jerome Laban (bug #42287)
24368 2003-05-02 Martin Baulig <martin@ximian.com>
24370 * debug-mono-symfile.h
24371 (MonoSymbolFile): Moved declaration into mono-debug.h.
24372 (MonoDebugMethodJitInfo): Likewise.
24373 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
24375 (_mono_debug_address_from_il_offset): Take a
24376 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
24379 (MonoDebugDomainData): New struct.
24380 (mono_debug_get_domain_data): New function.
24381 (mono_debug_add_method): Take an additional `MonoDomain *'
24383 (mono_debug_source_location_from_address): Likewise.
24384 (mono_debug_il_offset_from_address): Likewise.
24385 (mono_debug_address_from_il_offset): Likewise.
24387 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
24389 * reflection.c: one more check for null type in custom attrs.
24391 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24393 * reflection.c: avoid warning (comparison is always false due to limited
24394 range of data type).
24396 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24398 * icall.c: throw an exception in Type.GetField if the argument 'name'
24401 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
24403 * reflection.c: fixed handling of enums in named arguments to custom
24404 attributes (bug #42123).
24406 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24408 * reflection.c: use the right array element type and handle
24409 a null for a Type argument, too.
24411 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
24413 * reflection.c: handle arrays as arguments to custom attributes.
24415 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
24417 * reflection.c: handle a string value in a custom attr
24418 ctor that takes an object.
24420 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
24422 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
24425 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
24427 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
24429 2003-04-27 Martin Baulig <martin@ximian.com>
24431 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
24432 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
24433 MONO_DEBUGGER_EVENT_BREAKPOINT.
24434 (mono_breakpoint_trampoline_code): Removed.
24435 (mono_debugger_event_handler): The last argument is now a
24437 (mono_debugger_insert_breakpoint_full): Removed the
24438 `use_trampoline' argument.
24439 (mono_debugger_method_has_breakpoint): Likewise.
24440 (mono_debugger_trampoline_breakpoint_callback): Renamed to
24441 mono_debugger_breakpoint_callback(); take the method and
24442 breakpoint number as arguments.
24444 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24446 * metadata.c: fix off by one when loading parameters attributes.
24448 2003-04-24 Martin Baulig <martin@ximian.com>
24450 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
24452 2003-04-24 Martin Baulig <martin@ximian.com>
24454 * mono-debug-debugger.c: Moved all code which interacts with the
24455 Mono Debugger here.
24457 * debug-mono-symfile.c: This code now just deals with the symbol
24458 file itself, the debugger code is now in mono-debug-debugger.c.
24460 2003-04-23 Martin Baulig <martin@ximian.com>
24462 * mono-debug.c (mono_debug_source_location_from_il_offset):
24463 New method; like mono_debug_source_location_from_address(), but
24464 takes an IL offset instead of a machine address.
24466 2003-04-23 Martin Baulig <martin@ximian.com>
24468 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
24469 `line' field; this is now computed by the debugger.
24471 2003-04-23 Martin Baulig <martin@ximian.com>
24473 * mono-debug.[ch]: New files. This is the new debugging interface.
24475 * mono-debug-debugger.[ch]: New files. Moved all code which
24476 interacts with the Mono Debugger here.
24478 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
24480 * domain.c (mono_init): initialize mono_defaults.monitor_class
24482 2003-04-21 Miguel de Icaza <miguel@ximian.com>
24484 * reflection.c (method_encode_code): Add a spicy exception to help
24485 future compiler authors.
24487 2003-04-21 Martin Baulig <martin@ximian.com>
24490 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
24491 Make this work with relative pathnames; g_filename_to_uri() needs
24492 an absolute filename.
24494 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
24496 * icall.c: Track name changes in Object and ValueType.
24498 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
24500 * metadata.c (mono_type_stack_size): size should be a multiple of
24503 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24506 (internal_domain_finalize): moved into mono_domain_finalize. No need
24507 to create another thread because the finalizers will be run in the
24510 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
24511 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
24512 to be run (MS does this too).
24514 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
24516 * object.c (mono_class_compute_gc_descriptor): Update comment.
24518 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
24520 * image.h: Add synchronized wrapper cache.
24522 * image.c (do_mono_image_open): Initialize cache.
24524 * reflection.c (create_dynamic_mono_image): Initialize cache.
24526 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24528 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
24529 ves_icall_System_Buffer_ByteLengthInternal.
24531 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24533 * reflection.c: setup klass->nested_in earlier. Allow
24534 a dash in the assembly name.
24536 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
24538 * metadata.c (mono_type_to_unmanaged): dont access
24539 type->data.klass for MONO_TYPE_OBJECT
24540 (mono_type_to_unmanaged): consider System.Delegate class
24542 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
24544 * class.c: just setup supertypes in the proper place instead of
24545 initializing the full element class for arrays.
24547 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24549 * class.c: ensure the element class of arrays is initialized.
24550 Setup the supertype info for array classes, too.
24552 2003-04-14 Miguel de Icaza <miguel@ximian.com>
24554 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
24556 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24558 * Makefile.am: re-added -m option when running cygpath. This way,
24559 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
24561 * mono-config.c: same codepath for locating mono config file for WIN32
24563 * assembly.c: if mono_assembly_setrootdir is called, don't override
24566 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24568 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
24569 MONO_ASSEMBLIES variable.
24571 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
24573 * icall.c: added Assembly::GetNamespaces() icall.
24575 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24577 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
24579 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
24581 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
24582 * object.c: fixed bug in the construction of vtable for proxies
24584 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
24586 * object.c (mono_array_new): Mark mono_array_new as an icall.
24588 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24590 * class.c: fixed test for public method when overriding interfaces.
24593 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24595 * appdomain.h, domain.c: added mono_domain_foreach() to
24596 be able to access the currently loaded appdomains.
24597 * object.c: make string interning work across sppdomains.
24598 Mark some functions for use as icalls.
24600 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
24602 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
24604 * reflection.h reflection.c: Allocate long living data using
24605 GC_MALLOC_ATOMIC so the collector does not need to scan it.
24607 * reflection.c: Double the allocation size in streams instead of
24608 increasing it, to prevent unneccesary copying on large assemblies.
24610 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
24611 creation if the assembly does not have the Run flag set.
24613 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24615 * class.h: avoid the C++ keywords in header files (Jerome Laban
24616 spotted and fixed this).
24618 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24621 (mono_unhandled_exception): fill in the arguments for the
24622 UnhandledException event. Only trigger that event for the default
24623 domain (as MS does).
24625 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
24627 * object.c: Improve typed allocation stuff based on suggestions from
24628 Paolo. Also turn it on if the GC library supports it.
24630 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
24632 * object.c object.h class.h: Added experimental typed allocation
24633 facility using the interfaces in gc_gcj.h.
24635 * os/gc_wrapper.h: Added new include files.
24637 2003-04-03 Martin Baulig <martin@ximian.com>
24639 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
24640 which is not yet enabled by default.
24642 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
24644 (mono_gc_lock, mono_gc_unlock): New static functions.
24646 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
24647 functions; stop/start the world for the garbage collector. This
24648 is using the windows API; we need to complete the SuspendThread()/
24649 ResumeThread() implementation in the io-layer to make this work on Unix.
24650 (mono_gc_push_all_stacks): New public function; tells the garbage
24651 collector about the stack pointers from all managed threads.
24653 2003-04-03 Martin Baulig <martin@ximian.com>
24655 * object.h (MonoThread): Added `gpointer stack_ptr'.
24657 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
24659 2003-04-03 Martin Baulig <martin@ximian.com>
24661 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
24663 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
24665 * reflection.c (typebuilder_setup_fields): Initialize field.first and
24668 2003-04-02 Miguel de Icaza <miguel@ximian.com>
24670 * loader.c (mono_lookup_internal_call): Report the corlib that is
24673 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
24675 * icall.c (ves_icall_type_GetTypeCode): fixed check for
24676 System.DBNull (it's class not valuetype).
24678 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24680 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
24681 if the array method was already assigned a token (fixes bug#40646).
24683 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
24685 * reflection.c (mono_reflection_get_type): Attempt type resolve even
24686 if no assembly is given.
24688 2003-04-01 Miguel de Icaza <miguel@ximian.com>
24690 * metadata.h: Added the new tables.
24692 * row-indexes.h: Added definitions for new tables.
24694 * metadata.c: Add schemas for new tables, and add support for
24695 computing the sizes of them.
24697 * class.c: Update for handling the new type cases.
24699 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
24701 * metadata.h (MONO_TYPE_IS_VOID): new macro
24703 2003-03-31 Martin Baulig <martin@ximian.com>
24705 * threads.h (MonoThreadCallbacks): Added `thread_created'.
24707 * threads.c (mono_thread_new_init): Call `thread_created' in the
24708 mono_thread_callbacks.
24710 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
24712 * loader.h: added marshalbyrefobject_class to mono_defaults
24713 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
24714 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
24715 generation of output parameters.
24716 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
24717 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
24718 contextbound and the target object belongs to the context of the caller.
24719 * object.h: added context and unwrapped_server variables in MonoRealProxy.
24720 * object.c: Implemented support for interfaces and abstract classes
24721 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
24722 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
24724 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
24726 * class.h class.c (mono_class_is_subclass_of): New function.
24728 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
24729 routines for most common case (calls from ArrayList::ToArray).
24731 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
24732 routine so programs which call Environment::Exit() can be profiled.
24734 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
24735 Added MONO_ARCH_SAVE_REGS.
24737 * icall.c (ves_icall_type_is_subtype_of): Use new function.
24739 2003-03-29 Miguel de Icaza <miguel@ximian.com>
24741 * blob.h: Add a couple of new MonoType types definitions.
24743 * tabledefs.h: Add a couple of new call convs.
24745 2003-03-27 Zoltan Varga <vargaz@freemail.h>
24747 * reflection.h (MonoReflectionDynamicAssembly): track changes in
24748 the layout of the class.
24750 * reflection.c (alloc_table): double the size on overflow to avoid
24751 unnecessary copying.
24753 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
24754 avoid filling out metadata tables and blobs. Also set mb->ilgen to
24755 null so it can be garbage collected.
24757 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
24759 * reflection.c (mono_reflection_get_type): Return the resolved type
24760 only if it is in the assembly we searched.
24762 * reflection.c (ensure_runtime_vtable): Initialize method slots.
24764 * class.c (mono_class_setup_vtable): Set the slot of the overriding
24767 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24770 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
24771 the right one is 'file:///blah', but MS allows it.
24773 (mono_assembly_open): allow 'file://blah'
24775 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
24777 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
24779 * socket-io.c: fixes bug #40310.
24781 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
24783 * reflection.c (mono_reflection_parse_type): handle deeply nested
24786 * reflection.c (mono_image_create_token): Use unique token values
24787 since they will be put into a hash table.
24789 * class.c (mono_class_setup_vtable): If a method occurs in more than
24790 one place in the vtable, and it gets overriden, then change the
24791 other occurances too.
24793 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
24794 object as return type.
24796 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
24798 * icall.c: Deleted "ToString" implementation for double and float
24799 because they are full implemented in managed code.
24801 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
24803 * reflection.c, reflection.h: implemented and exported functions
24804 to retrieve info about custom attributes.
24806 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24808 * appdomain.c: moved Uri handling to assembly.c
24809 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
24810 work when using a file Uri in *nix and windows.
24812 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
24813 GetReferencedAssemblies.
24815 2003-03-18 Dick Porter <dick@ximian.com>
24817 * icall.c: Rename a couple of internal calls
24819 * threads.c: Set the thread state to Stopped when a thread exits.
24822 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
24824 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
24827 * object.c (mono_class_vtable): fix warning.
24829 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
24831 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
24833 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
24835 (method_encode_clauses): Create exception info structures in the right
24837 (mono_reflection_setup_internal_class): Initialize supertypes field.
24839 * class.c object.c: Handle interfaces which implement other interfaces
24842 * class.h class.c: Move the supertypes array initialization code into
24843 a separate function so it can be used for dynamic types too. Also call
24844 it earlier, in mono_class_init(), since it can be used before the
24845 type is initialized.
24847 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24851 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
24856 * object.c: remove warnings.
24858 2003-03-13 Martin Baulig <martin@ximian.com>
24860 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
24861 (MonoDebugLexicalBlockEntry): New types.
24863 * debug-mono-symfile.c
24864 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
24866 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24868 * process.c: ret can be any non-zero value accroding to MS doc.
24870 2003-03-07 Miguel de Icaza <miguel@ximian.com>
24872 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
24873 fixing a warning for a miss-used prototype, would have cause
24874 random memory corruption.
24876 2003-03-07 Martin Baulig <martin@ximian.com>
24878 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
24879 getting really annoying ....
24881 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
24883 * reflection.c (fixup_method): added support for array methods.
24885 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
24887 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
24888 (pointed out by Michael Adams).
24890 2003-03-04 Dick Porter <dick@ximian.com>
24892 * icall.c: Temporarily reverted the Double and Single ToString()
24893 change, because it broke nunit.
24895 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
24897 * object.h, threads.h: make include files compatible with C++
24898 (patch by Jerome Laban <jlaban@wanadoo.fr>).
24900 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
24902 * icall.c: Erased ToString helper functions for Double and Single.
24903 Now, that implementations ar all in managed code (Double and Single
24906 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
24908 * appdomain.c: Added method for initializing the default context of
24909 a domain. Added internal call for getting the default context.
24910 * appdomain.h: Added context variable in MonoDomain struct.
24911 * domain.c: mono_domain_set also sets the default context of the domain
24912 * icall.c: Mapped internal method InternalGetDefaultContext.
24913 * object.c: mono_object_get_virtual_method returns always a remoting
24914 wrapper if the object is a transparent proxy.
24915 mono_runtime_invoke_array: when creating an object by calling the
24916 constructor, if the created object is a proxy, then the constructor should
24917 be called using the a remoting wrapper.
24919 2003-03-03 Dick Porter <dick@ximian.com>
24921 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
24922 variable so it compiles on solaris. Problem spotted by
24923 Christopher Taylor <ct@cs.clemson.edu>
24925 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24928 (get_info_from_assembly_name): don't leak value.
24931 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
24934 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
24936 * assembly.c: export mono_image_load_references ().
24937 * class.c: handle function pointers. mono_class_from_name() now
24938 supports nested type names directly.
24940 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
24942 * reflection.h reflection.c: Encode already created dynamic methods
24943 and fields correctly as a DEF instead of a REF.
24945 * reflection.c: Get rid of the force_ref argument to
24946 mono_image_typedef_or_ref since it was wrong in the first place.
24948 * string-icalls.c: add error checking to string constructors according
24951 * reflection.c: Emit types in the order their TypeBuilders were
24952 created. Previously, a new table index was assigned to each type before
24953 the tables were emitted. This was wrong because the signature blob
24954 might already refer to a type by its original table index.
24956 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
24958 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
24961 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24963 * Makefile.am: make assemblies dir have \ instead of / on windows.
24965 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
24967 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
24968 iterate over the NESTEDCLASS table using a linear search since the
24969 table is not guaranteed to be sorted by the secondary key.
24971 * class.c (mono_class_create_from_typedef): fixed up call to
24972 mono_metadata_nesting_typedef.
24974 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
24976 * marshal.c (mono_string_to_byvalstr): clear the memory as
24977 suggested by Jerome Laban <jlaban@wanadoo.fr>
24979 2003-02-26 Dick Porter <dick@ximian.com>
24981 * process.c: Cope with padding in .rsrc blocks
24983 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
24985 * metadata.h: reverted the filter_len change, it breaks reflection
24987 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
24989 * metadata.h: added a new field to store the filter_len
24992 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
24994 * reflection.c: handle custom attributes for types and members
24995 created with Reflection.Emit (bug#38422).
24997 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
24999 * reflection.c: define RTSpecialName automatically for constructors for
25000 compatibility with MS.NET.
25002 * reflection.c (mono_reflection_create_runtime_class): initialize
25003 nested_in field of dynamically created classes.
25005 2003-02-22 Martin Baulig <martin@ximian.com>
25007 * debug-mono-symfile.h: Incremented version number.
25009 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
25011 * object.h icall.c process.c: fix warnings.
25013 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
25015 * appdomain.h appdomain.c:
25016 (mono_domain_try_type_resolve): split the
25017 name_or_tb argument into a name and a tb argument.
25018 (mono_domain_has_type_resolve): new function to check whenever the
25019 application has registered a TypeResolve event handler.
25021 * icall.c reflection.h reflection.c: move the type resolve logic into
25022 mono_reflection_get_type () so it will be invoked when
25023 Assembly::GetType () is called.
25026 (mono_reflection_get_type): renamed to get_type_internal.
25027 (mono_reflection_get_type): fixed type name generation so it works
25028 for nested types too.
25029 (mono_reflection_get_type): call has_type_resolve () to avoid the
25030 costly type name generation if there is no resolve event handler.
25032 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25034 * class.c, image.c: load exported types from file references.
25036 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
25038 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
25039 used to cache the managed methods used to create proxies and make
25040 remote invocation of methods.
25041 * class.h: Added in MonoVTable a flag to indicate that a class needs
25042 to be remotely created.
25043 * object.c: Modified the method mono_class_vtable(). It now initializes
25044 the remote flag of the vtable. Modified mono_object_new_specific(),
25045 so now it checks the remote flag.
25046 * icall.c: Added a couple of internal methods, one for enabling instance
25047 creation interception for a type, and one for creating objects bypassing
25050 2003-02-18 Martin Baulig <martin@ximian.com>
25052 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
25053 New interncall to get a method's metadata token.
25055 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
25056 New interncall for the debugger.
25058 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
25060 * class.c (mono_class_setup_vtable): allocate supertype array
25062 2003-02-18 Martin Baulig <martin@ximian.com>
25064 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
25066 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25069 (assembly_name_to_aname): jump over unknown properties (i've found
25070 something like: 'type, assembly, version=xxx, custom=null, public...',
25071 so now will ignore custom=null and still get the rest of the values).
25073 2003-02-17 Dick Porter <dick@ximian.com>
25075 * threads.c: Have Thread.Start() wait for a semaphore to signal
25076 that the thread has set up all its local data. This fixes bug
25077 34323, where Abort() raced the new thread's TLS data.
25079 Also removes the handle_store() call from start_wrapper, because
25080 threads are now always created suspended and there is no longer a
25081 race between the parent and child threads to store the info.
25083 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
25085 * image.c: explain the #- heap issue in a message, hopefully
25086 avoiding FAQs on mono-list.
25088 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25091 (GetEntryAssembly): if the domain has not invoked
25092 AppDomain.ExecuteAssembly yet, return the assembly of the default
25095 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
25097 * class.c (mono_ldtoken): make it work in dynamic assemblies.
25099 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
25101 * metadata.c, reflection.c: simple speedup to type hash
25104 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
25106 * image.c, image.h, class.c, assembly.c: move module loading
25107 to MonoImage. When loading metadata, consider alignemnet from
25108 the start of metadata, not from the metadata address in memory.
25110 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
25112 * reflection.c (mono_reflection_get_custom_attrs): Added support for
25113 AssemblyBuilder objects. Factored out custom attribute creation into
25114 a separate function.
25115 (create_custom_attr): new function to create custom attributes.
25117 2003-02-12 Miguel de Icaza <miguel@ximian.com>
25119 * Makefile.am: Got tired of typing the full pathname to pedump.
25120 Until there is another option, am installing this.
25122 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
25124 * class.c (class_compute_field_layout): always set field->parent
25125 (mono_ldtoken): use mono_defaults.fieldhandle_class;
25127 2003-02-11 Dick Porter <dick@ximian.com>
25130 * monitor.c: Rewrote Monitor, making lock much faster and
25131 Pulse/Wait work as specified. Also uses much fewer handles, and only
25132 creates them as needed.
25134 * exception.c: Added SynchronizationLockException
25136 * threads.c: Deleted old Monitor implementation. The new one is
25139 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
25141 * class.c: handled TypedReference type code. Set the correct size for
25142 class data. Setup interface_offsets for interface classes, too.
25144 2003-02-09 Martin Baulig <martin@ximian.com>
25146 * debug-mono-symfile.h: Reflect latest symbol writer changes.
25148 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
25150 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
25151 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
25152 * object.c: fixed mono_object_get_virtual_method () for interfaces.
25153 * verify.c: check for code that runs after the end of the method.
25155 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
25157 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
25158 "System.Math::Round2".
25159 * sysmath.h: Added Floor, Round and Round2 definitions.
25160 * sysmath.c: Modified certain functions that were not 100% compliant
25161 with MS.NET (math precision) and added the implementation of Floor,
25164 2003-02-07 Martin Baulig <martin@ximian.com>
25166 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
25168 2003-02-07 Martin Baulig <martin@ximian.com>
25170 * debug-mono-symfile.c: Reflected latest symwriter changes.
25171 (mono_debug_create_mono_symbol_file): Removed.
25172 (mono_debug_open_mono_symbol_file): Take an argument which
25173 specifies whether to create a dynamic symbol file.
25175 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
25177 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
25179 2003-02-05 Martin Baulig <martin@ximian.com>
25181 * reflection.c (mono_image_build_metadata): Make this public,
25182 protect it against being called multiple times, don't create
25183 resources and don't build the compressed metadata here.
25184 (mono_image_create_pefile): Do this here.
25187 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
25189 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25191 * socket-io.c: fixed bug #36322.
25193 2003-02-06 Piers Haken <piersh@friskit.com>
25197 * debug-mono-symfile.c:
25203 * socket-io.c: warning cleanups
25205 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
25207 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
25208 function. works like remoting invoke, but does a check for the Proxy first.
25210 2003-02-05 Miguel de Icaza <miguel@ximian.com>
25212 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
25214 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
25216 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
25218 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
25219 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
25221 * object.c (mono_store_remote_field_new): used by the new jit
25222 instead of mono_store_remote_field
25223 (mono_load_remote_field_new): used by the new jit
25224 instead of mono_load_remote_field
25226 2003-02-05 Patrik Torstensson
25228 * appdomain.c: changed unload to take the domain id instead
25231 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
25234 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25236 * appdomain.c: don't look for assemblies in ApplicationBase if
25237 PrivateBinPathProbe is set.
25239 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25241 * object.c: make the first argument in main_args contain the absolute
25242 path to the assembly. Fixes bug #37511.
25244 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25246 * icall.c: get correct UTC offset for countries not using daylight
25247 time saving. Fixes bug #30030.
25249 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25251 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
25252 and 1 are the family).
25254 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
25256 * icall.c (ves_icall_InternalExecute): removed wrong assertion
25258 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
25260 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
25262 * reflection.c: added support for SignatureHelper tokens, which is
25263 needed by the Calli opcode.
25265 * reflection.h: track changes to SignatureHelper class.
25267 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
25269 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25271 * appdomain.c: fixed loading assemblies from PrivateBinPath.
25273 2003-02-03 Patrik Torstensson
25274 * appdomain.[c|h], domain.c :
25275 - Added support for getting a domain via domain id
25276 - Support for setting and getting domain from System.AppDomain
25277 (used in cross appdomain channel)
25278 - Added support for get/set for a MonoAppContext on a thread
25279 (Context class in System.Runtime.Remoting.Contexts),
25280 - Removed hack in Get/SetData and ExecuteAssembly.
25282 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
25283 the managed world to get control when a proxy is created.
25285 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
25287 2003-02-03 Miguel de Icaza <miguel@ximian.com>
25290 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
25291 Populate the codebase field as well.
25293 2003-02-02 Martin Baulig <martin@ximian.com>
25295 * debug-mono-symfile.c
25296 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
25297 (mono_debug_symfile_add_method): Allow interncalls.
25299 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25301 * icall.c: throw parse exception if strtod fails or the string is empty.
25303 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
25305 * marshal.c: handle object type separately from defined
25308 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
25310 * marshal.c: handle NATIVE_LPSTR for strings when it's
25311 explicitly specified.
25313 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
25315 * reflection.c, reflection.h, icall.c: setup the reflection
25316 handle cache for ModuleBuilders and AssemblyBuilders.
25318 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
25320 * reflection.c (reflection_methodbuilder_to_mono_method): set
25323 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25325 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
25327 2003-01-29 Dick Porter <dick@ximian.com>
25329 * threads.c: No need for the fake_thread kludge now that Thread
25330 doesn't run a class constructor
25332 2003-01-29 Dick Porter <dick@ximian.com>
25334 * threads.c: Use g_direct_hash instead of the rather bogus
25337 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
25339 * marshal.c (mono_marshal_get_native_wrapper): add check for null
25340 (fix pinvoke12.exe)
25341 (mono_marshal_get_struct_to_ptr): generate valid IL code
25342 (mono_marshal_get_ptr_to_struct): generate valid IL code
25343 (*): correctly set sig->pinvoke, we need to memdup the signature
25346 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25348 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
25349 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
25351 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
25353 * profiler.c: provide more callers information.
25355 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
25357 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
25359 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
25361 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
25363 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25365 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
25366 exception instead of going into an infinite loop on dates which it
25369 * string-icalls.c (ves_icall_System_String_get_Chars): raise
25370 out-of-range exception if needed.
25372 * class.c (mono_class_setup_vtable): allow a virtual method to provide
25373 an implementation for an interface method and to override an inherited
25374 method at the same time.
25375 Imagine a scenario when a virtual method is used to override a
25376 virtual abstract method in a parent class, and this same method
25377 provides an implementation for an method inherited from an interface.
25378 In this case, the interface resolution code will set im->slot, which
25379 means that the virtual method override pass will skip this method
25380 which means a pointer to the abstract method inherited from the parent
25381 will remain in the vtable of this non-abstract class.
25383 * class.c: (mono_class_setup_vtable): continue search for a real
25384 method if only an abstract method is found.
25386 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
25388 * reflection.c: add size to encoding for ByValStr and ByValArray
25389 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
25391 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25393 * class.c (mono_class_setup_vtable): pass the override info as an
25396 * class.c (mono_class_setup_vtable): set the slot of overriding methods
25399 * reflection.c (ensure_runtime_vtable); add support for method
25402 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25404 * reflection.c (resolution_scope_from_image): Hack to work to work with
25405 dynamic assemblies.
25407 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
25408 added a 'force_ref' argument to force this function to allways return
25409 a TypeRef. This is needed by mono_image_get_memberref_token ().
25411 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25413 * reflection.c (mono_image_get_type_info): interfaces really don't have
25416 * reflection.c (mono_image_basic_init): fill out missing fields of
25419 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
25420 dynamic assemblies. This is required so dynamic assemblies show up in
25421 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
25422 Type::GetType() etc. This is consistent with MS behaviour.
25424 * image.c image.h reflection.c: add newly created classes to the name
25425 cache so mono_class_get () will find them.
25427 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
25429 First part of changes to get IKVM.NET running under mono.
25431 * appdomain.h, appdomain.c: added new function
25432 mono_domain_try_type_resolve() which will emit TypeResolve events.
25433 This function will call AppDomain::DoTypeResolve to do the actual work.
25435 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
25436 moved existing code dealing with dynamic tokens to a new function
25437 called mono_reflection_lookup_dynamic_token (). This function will
25438 raise TypeResolve events when appropriate. Since reflection.c is not
25439 part of libmetadata, a new hook function called
25440 mono_lookup_dynamic_token() is added to class.c which will call this.
25442 * assembly.h assembly.c: make the invoke_load_hook function public,
25443 so it can be called for dynamic assemblies.
25445 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
25447 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
25450 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
25451 MonoGHashTable, since it contains pointers to objects which the GC
25454 * assembly.c (search_loaded): remove unused variable.
25456 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
25458 * object.c: fixed issue exposed by gcc-generated IL programs
25459 that use RVA data for pointers.
25461 2003-01-25 Martin Baulig <martin@ximian.com>
25463 * threads.c (start_wrapper): Moved the initialization of
25464 `start_func' above the mono_new_thread_init() call to which we
25465 pass it as argument.
25467 2003-01-24 Martin Baulig <martin@ximian.com>
25469 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
25470 the MonoThread pointer.
25472 2003-01-21 Miguel de Icaza <miguel@ximian.com>
25474 * icall.c: Rename `PowImpl' to Pow.
25476 2003-01-23 Dick Porter <dick@ximian.com>
25478 * threads.c (start_wrapper): Create a Thread object if needed, so
25479 the Main() thread can do the class initialisation in a subthread
25480 that has been set up to allow managed code execution.
25482 Pass the thread ID instead of the MonoThread pointer to the thread
25483 start and attach callbacks. This change is required, because the
25484 jit thread start callback must be called _before_ the Thread
25485 object can be created.
25487 (mono_thread_init): Removed much object creation code that is no
25488 longer needed. No managed code is called from here now.
25490 * object.c (mono_runtime_exec_managed_code): Create a subthread
25491 for Main, and call back to the runtime to use it.
25492 Set the exit code when Main exits.
25494 * gc.c: Make sure domain finalisation happens in a subthread.
25495 Re-enable threaded GC, fixing bug 31333 (again).
25497 * environment.c: System.Environment internall calls (so far just
25498 ExitCode is here, the others are still in icall.c)
25500 * appdomain.c (mono_runtime_cleanup): All threads running managed
25501 code should have finished before mono_runtime_cleanup() is
25502 reached, so no need to clean up threads.
25504 2003-01-22 Martin Baulig <martin@ximian.com>
25506 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
25507 `gpointer func' arguments.
25508 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
25509 but added `MonoThread *thread' argument.
25510 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
25512 * threads.c (mono_new_thread_init): Added `gpointer func' argument
25513 and pass it to the mono_thread_start_cb callback.
25514 (mono_install_thread_callbacks): New public function to install a
25515 set of callbacks which are set by the debugger.
25516 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
25518 2003-01-22 Martin Baulig <martin@ximian.com>
25520 * Makefile.am: Install debug-mono-symfile.h.
25522 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
25524 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
25526 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
25528 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
25529 * class.c (mono_ptr_class_get): correctly set access levels of pointers
25530 (mono_array_class_get): correctly set access levels of arrays
25532 2003-01-20 Patrik Torstensson
25533 * image.h (MonoAssemblyName): changed major, minor, build, revision
25534 from signed to unsigned.
25536 2003-01-20 sean kasun <skasun@azstarnet.com>
25538 * reflection.c (load_cattr_value): Now this handles
25539 MONO_TYPE_SZARRAY. Fixes bug #35629
25541 2003-01-20 Miguel de Icaza <miguel@ximian.com>
25543 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
25546 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25548 * decimal.c: fixed bug #26056.
25550 2003-01-17 Martin Baulig <martin@ximian.com>
25552 * gc.c: Raise an ExecutionEngineException instead of using g_error().
25554 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25557 (mono_get_exception_type_initialization): new function.
25559 * object.c: throw a TypeInitializationException when an exception is
25560 thrown invoking the class constructor.
25562 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25564 * reflection.c: fixed attribute reading.
25566 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25569 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
25570 provided, look for the type in the calling assembly and then in
25571 mscorlib; if the assembly name is provided, only try that one.
25573 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
25575 * object.c: register the vtable before there is a chance it's
25576 queried again recursively.
25578 2003-01-13 Duncan Mak <duncan@ximian.com>
25580 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
25583 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
25585 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
25587 2003-01-11 Martin Baulig <martin@ximian.com>
25589 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
25590 this to 20 for the release.
25592 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
25594 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
25596 * loader.c (mono_method_get_marshal_info): bug fix
25598 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
25599 structures with explicit layout
25601 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
25603 * profiler.c: made the output more readable (and sorted).
25604 Added caller information for the allocation profiler.
25606 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
25608 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
25610 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25612 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
25613 to get value types.
25615 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
25617 * object.c, profiler.h, profiler.c, profiler-private.h:
25618 Added object allocation profiler.
25620 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
25622 * reflection.h, reflection.c: handle global methods.
25623 Compress blob entries.
25625 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
25627 * marshal.c: fix compilation.
25629 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
25631 * loader.c (mono_method_get_marshal_info): impl.
25633 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
25635 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25637 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
25638 for reference types.
25640 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
25642 * loader.c: fixed off by one error in loaded parameter names.
25644 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
25646 * marshal.c (mono_marshal_get_icall_wrapper): like
25647 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
25648 instead of a MonoMethod.
25650 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25652 * decimal.c: fixed bug #36537.
25654 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
25656 * marshal.c: throw a missing method exception if a
25657 P/Invoke method is not found.
25659 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
25661 * icall.c: allow a null this for constructors.
25663 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
25665 * icall.c: raise the proper exceptions if the arguments to the
25666 internal Invoke are incorrect.
25668 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
25670 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
25672 2003-01-03 Martin Baulig <martin@ximian.com>
25674 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
25676 2002-12-31 Martin Baulig <martin@ximian.com>
25678 * debug-mono-symfile.c: Completely rewrote the type section.
25679 Instead of using individual malloc()ed fields, we use one big
25680 continuous memory area and offsets into this area.
25681 See the comments in the source code for details.
25683 2002-12-30 Martin Baulig <martin@ximian.com>
25685 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
25687 2002-12-30 Martin Baulig <martin@ximian.com>
25689 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
25690 line number table in this data blob instead of using an external
25693 2002-12-28 Martin Baulig <martin@ximian.com>
25695 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
25697 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
25699 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
25700 as a boxed return type.
25702 2002-12-21 Miguel de Icaza <miguel@ximian.com>
25705 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
25706 g_build_filename to properly get separators on the filename created.
25708 * object.h: Small change, introduce MonoMarshalByRefObject to
25709 track the layout of that structure in the C# universe as we make
25712 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
25714 * object.c: removed assert to allow static fields on interfaces.
25715 * loader.c: a TypeSpec may be used for any type, not just arrays.
25717 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25719 * class.c, class.h: added mono_class_array_element_size ().
25720 Ignore static methods in interfaces.
25722 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25724 * threads.c: fixed the build under cygwin.
25726 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
25728 * reflection.c: handle nullref constants. Allocate keys for
25729 reflection handles with the GC.
25731 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
25733 * threads.c, threads.h: added mono_thread_get_abort_signal()
25734 to get a suitable signal for thread abort.
25736 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
25738 * metadata.c: fix handling of ExportedType table.
25740 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25742 * icall.c: added WriteWindowsDebugString internal call.
25744 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25746 * reflection.h: added fields to match C# implementation.
25748 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25750 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
25752 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
25754 * gc.h, gc-internal.h: Rename header for GC internal calls to
25755 gc-internal.h from gc.h as to not clash with Boehm GC having its
25756 header installed as <gc.h> in outside include paths.
25757 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
25758 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
25760 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25762 * icall.c: assign minor, build and revision in FillName.
25764 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
25766 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
25767 Added support for running code generated by Reflection.Emit.
25769 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25771 * appdomain.c: check for NULL argument in LoadFrom.
25773 2002-12-10 Dick Porter <dick@ximian.com>
25775 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
25777 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25779 * appdomain.c: fix buglet when building exe file name. Handle full
25780 assembly name (needed after latest changes to AssemblyName).
25782 (mono_image_close): free some hashtables.
25784 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
25786 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
25787 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
25788 on some systems (redhat 7.3)
25790 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
25792 * threads.c: delete the critical section of a sync block,
25793 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
25795 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
25797 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
25799 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25801 * appdomain.[ch]: handle the assembly preload event to try loading the
25802 assemblies using the paths we have in the current domain.
25804 * assembly.[ch]: created an assembly preload hook that is called to try
25805 loading the assembly by other means that the ones provided here.
25807 * domain.c: initialize the domain search path.
25809 From now on, assemblies (TODO: except corlib and System) are loaded
25810 according to these rules when using mono_assembly_load ():
25812 1. It tries to load the assembly from the ApplicationBase
25813 of the current domain appending .dll and .exe (TODO: have to
25814 try loading from name/name.dll and name/name.exe).
25816 2. It tries the search path specified in PrivateBinPath for the
25817 current domain (if any).
25819 3. Previous behavior.
25821 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
25823 * icall.c: implemented GetInterfaceMap() related icall.
25824 * domain.c, loader.h: load MethodInfo in mono_defaults.
25826 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
25828 * gc.c: disable the finalizer thread for now, untill all the issues
25829 with it are resolved.
25831 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25833 * string-icalls.c: handle embedded nulls in string ctor when the
25834 length is specified.
25836 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
25838 * class.c: look for explicit interface implementation in parent
25841 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
25843 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
25845 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
25847 * gc.c: protect handles with a critical section.
25849 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25852 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
25853 parameters. If no assembly specified, try getting the type from all
25854 the assemblies in the current domain, else, load the assembly and get
25857 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25859 * marshal.c: applied patch from Aleksey Demakov that fixes
25860 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
25862 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25864 * icall.c: fixed get_location.
25866 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
25868 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
25869 declarations to make it work with older gcc.
25871 * loader.c (mono_get_method): set signature->pinvoke for native calls
25873 2002-11-20 Dick Porter <dick@ximian.com>
25875 * threads.c (mono_thread_init): Set the main thread's handle
25877 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
25879 * gc.c: allow compilation without GC support. Changed to match the
25882 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25884 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
25886 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
25888 * reflection.c: set a public key token on the core assemblies.
25890 2002-11-18 Dick Porter <dick@ximian.com>
25892 * threads.c: Split out some thread initialisation so that other
25893 files can set the start callback function.
25895 * gc.c: Run finalisers in a separate thread, to avoid stack
25896 overflow. Fixes bug 31333.
25898 * appdomain.c: Set up GC finalisation thread.
25902 * domain.c: Use gc.h macros for GC_malloc
25904 2002-11-15 Dick Porter <dick@ximian.com>
25908 * appdomain.c: Removed mono_runtime_init_with_attach(),
25909 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
25910 merging the extra parameter with the existing function. Removed
25911 unneeded code in mono_thread_attach().
25913 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
25915 * image.c (mono_image_loaded_by_guid): a method to get loaded
25917 (load_metadata_ptrs): we store the guid as string.
25919 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
25921 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
25923 * metadata.c (mono_guid_to_string): imported method form Zoltan
25924 Varga (slightly modified)
25926 * assembly.c (mono_assembly_open): load precompiled code
25928 * loader.h (MonoMethod): we store the method token for use in the
25931 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25933 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
25934 the hook function called when an assembly is loaded.
25936 * domain.c: Modified file.
25937 (mono_domain_assembly_load): removed hash table insertion of assemblies.
25941 2002-11-07 Miguel de Icaza <miguel@ximian.com>
25943 * reflection.c: Map PEFileKind to the value expected by the WinNT
25946 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25948 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
25949 Read until the buffer is filled completely.
25951 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25953 * icall.c: implemented MonoType.InternalGetEvent ().
25955 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25957 * appdomain.c: implemented InitAppDomainSetup. Delayed
25958 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
25959 the entry_assembly.
25961 * assembly.c: base_dir is now an absolute path ending with
25964 * icall.c: modified get_location according to the above changes.
25966 * object.c: init AppDomain.SetupInformation for the default domain after
25967 we have the entry assembly.
25969 * domain.c: when unloading a domain, setup = NULL.
25971 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
25973 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
25975 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
25977 * object.h, object.c: introduced mono_object_get_virtual_method ()
25978 to lookup the method invoked on an object when a callvirt is done on
25980 * icall.c: make MethodInfo::Invoke() always do a virtual call.
25982 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25984 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
25985 current domain when loaded an assembly and failed to load it.
25987 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
25989 2002-10-31 Dick Porter <dick@ximian.com>
25993 * file-io.c: Return the error status in a parameter, as the
25994 GetLastError() value has long since been blown away if we try and
25995 look it up in a subsequent internal call invocation. Delete the
25996 GetLastError() internal call, because it's useless.
25998 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
26000 * class.[ch]: added cast_class to fix bug 29517
26002 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
26004 * marshal.c: create valid IL code in the filter clause:
26005 the new JIT is less forgiving:-)
26007 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26009 * icall.c: removed get_property internal call.
26011 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
26013 * appdomain.h domain.c: Added an ID to appdomains.
26015 * threads.c threads.h icall.c: Implement icall
26016 Thread:GetDomainID(), and remove unused icall
26017 CurrentThreadDomain_internal.
26019 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26021 * icall.c: Don't recurse through the base types in GetConstructor.
26024 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
26026 * mempool.h, mempool.c: added mono_mempool_empty() and
26027 mono_mempool_stats().
26029 2002-10-23 Dick Porter <dick@ximian.com>
26033 * icall.c: Added MonoIO.GetFileType internal call
26035 2002-10-17 Dick Porter <dick@ximian.com>
26037 * appdomain.c (mono_runtime_cleanup): Don't signal the async
26038 delegate semaphore before waiting for all threads to finish,
26039 because new threads can also call async delegates. Fixes bug
26042 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
26043 of 3 seconds, in case another async job is queued. (This part is
26044 needed because the bug fix reintroduced the 3s exit lag.) This
26045 makes the mono_runtime_shutdown flag superfluous.
26047 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
26049 * reflection.c: include ehader size in method section headers.
26050 Really check for suplicated modules entries.
26052 2002-10-17 Martin Baulig <martin@gnome.org>
26054 * debug-mono-symfile.c: Added back support for locals.
26056 2002-10-14 Martin Baulig <martin@gnome.org>
26058 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
26061 2002-10-14 Martin Baulig <martin@gnome.org>
26063 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
26064 mono_class_get() instead of looking in the class cache.
26066 2002-10-13 Martin Baulig <martin@gnome.org>
26068 * debug-mono-symfile.c: Set version number to 28, include the
26069 signature in method names.
26071 2002-10-13 Martin Baulig <martin@gnome.org>
26073 * debug-mono-symfile.h: Set version number to 27.
26075 2002-10-11 Martin Baulig <martin@gnome.org>
26077 * gc.c: Don't register/unregister NULL pointers as disappearing links.
26079 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26081 * metadata.c, metadata.h: added helper function to allocate signatures.
26083 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26085 * icall.c: added internal call to get the location of machine.config.
26087 2002-10-08 Martin Baulig <martin@gnome.org>
26089 * debug-mono-symfile.c: Ignore classes with a pending init for the
26092 2002-10-03 Dick Porter <dick@ximian.com>
26094 * threads.c: Freebsd pthread_t is a pointer
26096 2002-10-03 Dick Porter <dick@ximian.com>
26098 * socket-io.c: Implemented GetHostName_internal
26100 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26103 (mono_config_parse_file): don't leak the text.
26105 2002-10-02 Martin Baulig <martin@gnome.org>
26107 * debug-mono-symfile.c: Added support for methods.
26109 2002-10-01 Martin Baulig <martin@gnome.org>
26111 * debug-mono-symfile.c: Don't emit methods and line numbers for
26112 the dynamic symbol file, just write the type table. We can easily
26113 have an external helper program which creates a symbol file for an
26116 2002-10-01 Dick Porter <dick@ximian.com>
26118 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
26119 Only add the handle to the cleanup array when we're about to
26120 launch the thread. Bug 31425 deadlocked when the test was run on
26123 2002-10-01 Martin Baulig <martin@gnome.org>
26125 * debug-mono-symfile.c: Added support for properties.
26127 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26129 * reflection.c: unaligned store fix from Mark Crichton
26130 <crichton@gimp.org>.
26132 2002-09-27 Martin Baulig <martin@gnome.org>
26134 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
26137 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
26139 * assembly.h, assembly.c: use a sane API to hook into the assembly
26140 loading process instead of a useless special-purpouse hack
26141 (ngen needs a hook, too, for example).
26143 2002-09-27 Dick Porter <dick@ximian.com>
26145 * threads.c (mono_thread_init): Call GetCurrentProcess() so
26146 io-layer can set up some process handle info. Not needed on w32,
26147 but doesn't hurt either.
26149 * process.c: Pass the program name in the second parameter to
26150 CreateProcess, so the path is searched. Include the working
26151 directory. Implemented process name, process enumeration, and some
26152 process detail internal calls.
26154 * icall.c: Added internal calls for process lookup, and some
26157 2002-09-26 Martin Baulig <martin@gnome.org>
26159 * assembly.c (mono_install_open_assembly_hook): New global
26160 function to install a function to be invoked each time a new
26161 assembly is loaded.
26162 (mono_assembly_open): Run this callback function if set.
26164 * debug-mono-symfile.c: Put back line numbers for the dynamic
26165 symbol file and also record the .il file as source file. This
26166 allows us to install the temporary symbol file as `file.dbg' just
26167 like a compiler-generated one.
26169 2002-09-26 Nick Zigarovich <nick@chemlab.org>
26171 * Corrected typo in gc.c (BOHEM vs BOEHM).
26173 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26175 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
26176 GetProperties. Also avoid calling g_slist_length in GetProperties and
26179 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26181 * reflection.c: avoid unaligned stores (bug spotted by
26182 Mark Crichton <crichton@gimp.org>).
26184 2002-09-25 Martin Baulig <martin@gnome.org>
26186 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
26187 instead of guint64 for addresses and added prologue/epilogue info.
26189 2002-09-25 Martin Baulig <martin@gnome.org>
26191 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
26192 store line number info. For the dynamic symbol file, we only need
26193 to provide the JIT generated dynamic line number info for the dynamic
26196 2002-09-25 Martin Baulig <martin@gnome.org>
26198 * debug-mono-symfile.h: Incremented version number.
26200 2002-09-24 Martin Baulig <martin@gnome.org>
26202 * class.c (mono_debugger_class_init_func): New global function
26204 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
26207 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
26208 function. This is called via the mono_debugger_class_init_func
26209 hook to add all types to the dynamic type table.
26210 (ves_icall_MonoDebugger_GetType): New interncall to get a class
26211 from its metadata token.
26213 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
26214 New interncall for the debugger.
26216 2002-09-24 Nick Drochak <ndrochak@gol.com>
26218 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
26219 before using it in case it is null.
26221 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26223 * metadata.c: allow custom modifiers in local var signatures
26224 (bug spotted by Zoltan Varga).
26226 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
26228 * class.c: deal with the <Module> class that may have a NULL vtable.
26229 Eliminate warnings.
26231 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26233 * image.c, image.h: more strong name helpers.
26234 * monosn.c: more work: convert pem keys to cryptoapi format.
26236 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
26238 * string-icalls.c: speedup IndexOf.
26240 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26242 * icall.c: updates from Zoltan.2.Varga@nokia.com.
26244 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
26246 * icall.c: cleanup: use mono_object_domain ().
26248 2002-09-23 Martin Baulig <martin@gnome.org>
26250 * debug-mono-symfile.c: Improved type support.
26252 2002-09-22 Martin Baulig <martin@gnome.org>
26254 * debug-mono-symfile.c: Added support for reference types and strings.
26256 2002-09-22 Martin Baulig <martin@gnome.org>
26258 * debug-mono-symfile.c: Started to work on the type table.
26260 2002-09-21 Martin Baulig <martin@gnome.org>
26262 * debug-mono-symfile.c: Largely reworked the symbol table format.
26263 The symbol table is now incrementally updated each time a new
26264 method is added. We're now also using our own magic and version
26265 so that you don't need to recompile all your classes if the
26266 dynamic table changes.
26267 (mono_debug_update_mono_symbol_file): Removed.
26268 (mono_debug_symfile_add_method): New function to add a method.
26270 2002-09-21 Martin Baulig <martin@gnome.org>
26273 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
26276 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
26277 New interncall to get a method from its metadata token.
26279 2002-09-21 Martin Baulig <martin@gnome.org>
26281 * debug-mono-symfile.c: Create type table.
26283 2002-09-20 Martin Baulig <martin@gnome.org>
26285 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
26287 2002-09-20 Martin Baulig <martin@gnome.org>
26289 * debug-mono-symfile.c: Provide information about params and locals.
26291 2002-09-20 Martin Baulig <martin@gnome.org>
26293 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
26296 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
26297 interncall to get a method from its metadata token.
26299 2002-09-20 Martin Baulig <martin@gnome.org>
26301 * debug-mono-symfile.c: Added a few checks for method->header
26302 being non-NULL. This should never happen, but for the moment
26303 let's use a g_warning() rather than a g_assert().
26305 2002-09-19 Mark Crichton <crichton@gimp.org>
26307 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
26308 even if support for it isn't present. Added an #ifdef to fix this.
26310 * socket-io.c: Added checks back for Solaris support.
26312 2002-09-19 Martin Baulig <martin@gnome.org>
26314 * debug-mono-symfile.c (read_string, write_string): Reflect latest
26315 changes in the symbol file format.
26317 2002-09-18 Martin Baulig <martin@gnome.org>
26319 * debug-mono-symfile.c: Set version number to 21.
26321 2002-09-18 Dick Porter <dick@ximian.com>
26323 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
26324 on netbsd. Fixes bug 30051.
26326 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26329 (set_version_from_string): little fix.
26331 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26333 * monosn.c, Makefile.am: added strong name utility.
26334 * reflection.h, reflection.c: implemented delayed signing,
26335 locale, version and hash id assembly attributes.
26337 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26339 * loader.c, metadata.c: load param attributes in signatures.
26341 2002-09-16 Martin Baulig <martin@gnome.org>
26343 * debug-mono-symfile.c: Added string table with all method names.
26345 2002-09-14 Martin Baulig <martin@gnome.org>
26347 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
26348 fast method lookup.
26350 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26352 * reflection.c: record the public key token of referenced assemblies.
26354 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26356 * image.c, image.h: added functions to get the strong name and the
26357 public key of an assembly.
26358 * pedump.c: use them.
26360 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
26362 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
26364 2002-09-12 Miguel de Icaza <miguel@ximian.com>
26366 * marshal.c (mono_marshal_get_managed_wrapper): Added
26369 2002-09-11 Martin Baulig <martin@gnome.org>
26371 * gc.c: Call GC_unregister_disappearing_link() on all links when
26372 finalizing them, this is necessary to aviod a crash in boehm's
26375 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26377 * gc.c: handle GetTarget for finalized objects spotted and fixed by
26380 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
26382 * icall.c: implemented MonoType::Module.
26383 * reflection.c, reflection.h: mono_module_get_object () from
26384 Tomi Pakarinen <tomi.pakarinen@welho.com>.
26386 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
26388 * icall.c: ignore overridden methods in GetMethods ().
26389 Fix for FieldInfo::SetValue().
26390 * object.c: handle float/double in runtime invoke.
26392 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26394 * object.c: allow a constructor to be called again on an object.
26396 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26398 * class.h, class.c: move field layout code to it's own function and
26399 export it. Get an interface id earlier. Move fields in MonoClass
26400 so they are more cache friendly and align the bitfields.
26401 * loader.c: temporary handle get_param_names() for a runtime method.
26402 * reflection.c, reflection.h: more code to handle runtime creation of
26405 2002-09-09 Martin Baulig <martin@gnome.org>
26407 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
26408 signature with the pinvoke field being set for the actual call.
26410 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26412 * icall.c: removed some unused icalls. Start of map of glib charsets
26413 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
26415 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
26417 * debug-helpers.c: break infinite loop (found and fixed by
26418 Holger Arnold <harnold@gmx.de>).
26420 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26422 * icall.c: target may be null in create_delegate.
26424 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26426 * marshal.c: handle a boolean return type.
26428 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26430 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
26432 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
26434 * gc.c: fix weakreferences.
26436 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
26438 * icall.c: added icall to get default codepage.
26440 2002-09-03 Dick Porter <dick@ximian.com>
26443 * threads.c: Use MonoThread instead of MonoObject where
26446 Store running thread objects in a hash table, so that we have all
26447 the info to hand when waiting for them to finish
26448 (means we don't need OpenThread() any more, so mingw builds should
26449 be fully functional again.)
26452 * object.h: Added thread ID to MonoThread
26454 2002-09-03 Martin Baulig <martin@gnome.org>
26456 * icall.c (System.Reflection.Assembly::get_location): New interncall.
26458 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26460 * icall.c: fixed leak in get_temp_path. Thanks lupus.
26462 2002-09-03 Martin Baulig <martin@gnome.org>
26464 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
26465 argument to store the end address of the disassembled instruction.
26467 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
26468 here from debug-symfile.h.
26469 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
26470 JIT into this struct.
26471 (MonoSymbolFile): Added `char *image_file' field.
26472 (MonoDebugGetMethodFunc): Removed.
26473 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
26474 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
26475 (mono_debug_find_method): New method.
26477 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
26478 create a full symbol file.
26479 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
26480 and static symbol files.
26481 (mono_debug_find_method): The symbol file keeps an internal method hash,
26482 call this to get a MonoDebugMethodInfo from a MonoMethod.
26484 * debug-symfile.[ch]: Removed.
26486 2002-08-29 Miguel de Icaza <miguel@ximian.com>
26488 * image.c (do_mono_image_open): Remove linker version check.
26490 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
26492 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
26493 wrappers for instance methods.
26495 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26497 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
26499 2002-08-28 Dick Porter <dick@ximian.com>
26501 * Makefile.am: Export HOST_CC for w32 builds
26503 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26505 * file-io.c process.c: MonoString are null terminated, no
26506 need for mono_string_to_utf16() anymore.
26508 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26510 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
26512 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26514 * icall.c, reflection.h: speedup System.MonoType.
26516 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26518 * reflection.c: allow null as the value of a string argument in
26519 custom attributes constructors.
26521 2002-08-27 Martin Baulig <martin@gnome.org>
26523 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
26524 `trampoline_address' field.
26526 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
26528 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
26529 check (fixes bug #29486)
26531 2002-08-27 Martin Baulig <martin@gnome.org>
26533 * debug-mono-symfile.c: Changed the file format in a way that allows us
26534 open it read-only and to use a specially malloced area for all the
26535 dynamic data. We can now also generate a symbol file on-the-fly if we're
26536 debugging IL code and there is no MCS generated symbol file for it.
26538 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26540 * object.c: added a define for a good string and array
26541 creation speedup (not enabled by default because we need to deal with
26544 2002-08-26 Martin Baulig <martin@gnome.org>
26546 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
26547 function to create a dynamic symbol file. This is used by the
26548 debugger to create a symbol file for IL code on-the-fly.
26550 2002-08-26 Martin Baulig <martin@gnome.org>
26552 * loader.c (mono_lookup_pinvoke_call): Include the error message
26553 from g_module_error() in the error message.
26555 2002-08-24 Martin Baulig <martin@gnome.org>
26557 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
26558 function to update the symbol file. The symbol file is mmap()ed
26559 writable, but private. This allows us to install the symbol file
26560 together with the assembly.
26562 2002-08-24 Martin Baulig <martin@gnome.org>
26564 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
26565 but they can read the new symbol file format which mcs is now creating.
26567 * debug-symfile.c (mono_debug_find_source_location): Moved to
26568 debug-mono-symfile.c; this is now operating on the new symbol file.
26570 2002-08-23 Martin Baulig <martin@gnome.org>
26572 * debug-helpers.c (mono_method_desc_from_method): New function to get
26573 a MonoMethodDesc from a MonoMethod.
26575 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
26577 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
26578 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
26580 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
26582 * string-icalls.[ch]: make helper methods static.
26584 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26586 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
26587 types to it and to SetValueInternal.
26589 * object.c: Moved handle_enum label to its proper place. This was the
26592 This time i compiled mcs and gtk-sharp and they both work.
26594 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26596 * icall.c: reverted partially my previous patch until
26597 object.c:set_value handles enums correcly.
26599 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26602 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
26603 (ves_icall_System_Environment_get_MachineName): removed warning when
26604 compiling under cygwin.
26606 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
26608 * object.c: fixed field_get_value() for reference types.
26610 2002-08-22 Dick Porter <dick@ximian.com>
26612 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
26613 Don't free a buffer while it's still needed. Patch from Jonathan
26614 Liger <Jonathan.liger@wanadoo.fr>
26616 2002-08-21 Miguel de Icaza <miguel@ximian.com>
26618 * icall.c (ves_icall_System_Environment_get_Platform): Add new
26621 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
26623 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
26624 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
26626 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
26627 we call unmanaged code which throws exceptions.
26629 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26631 * appdomain.h: added per-domain entry_assembly.
26632 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
26634 * icall.c: Assembly::GetEntryAssembly icall.
26635 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
26636 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
26638 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
26640 * appdomain.h, gc.c: added mono_domain_finalize ().
26642 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26645 (mono_print_unhandled_exception): changed g_warning by g_printerr
26646 because g_log has a 1024 characters limit (yeah, i got a big stack
26647 trace). Don't print exception name, that should be in ToString
26650 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26652 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
26653 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
26655 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26658 (mono_print_unhandled_exception): after previous commit, i realized
26659 that MS calls ToString on the exception. I changed this function to
26660 do that. This way we get stack_trace for free.
26662 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26665 (mono_print_unhandled_exception): invoke Message property instead of
26666 getting 'message' field from Exception. Don't allocate memory for
26667 'trace' and 'message' if not needed.
26669 2002-08-18 Dick Porter <dick@ximian.com>
26671 * unicode.c: Fix asserts to match Encoder.cs checks
26673 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26675 * marshal.c: fix unaligned store issue and a few wrong
26676 opcode argument types.
26678 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26680 * icall.c: added GetUninitializedObjectInternal internal call.
26682 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
26684 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
26685 to the right domain.
26687 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
26689 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
26691 * class.c (class_compute_field_layout): set blittable to false for Strings
26693 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
26695 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26697 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
26698 first chunk of code to create types at runtime. Code to
26699 handle ReflectedType/DeclaringType. Make reflection handles
26702 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
26704 * class.c: set correct name in arrays.
26706 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
26708 * appdomain.c (mono_domain_transfer_object): make it work with
26709 valuetypes. bug fixes.
26711 2002-08-12 Dick Porter <dick@ximian.com>
26713 * object.h: Rename some parameters to avoid c++ keywords (Patch
26714 from Joseph Wenninger <kde@jowenn.at>)
26716 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
26718 * icall.c: added icall to implement Assembly.GetFile*.
26720 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
26722 * reflection.h, reflection.c: code to embed managed resources.
26724 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
26726 * class.c: move all the type size stuff into
26727 class_compute_field_layout().
26729 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26731 * class.c: ensure enums have always the correct instance size.
26732 * unicode.c: remove wrong assert.
26734 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
26736 * assembly.c: fix mem corruption issue.
26737 * image.h, image.c: added mono_image_get_resource () to access
26739 * icall.c: implemented Assembly.EntryPoint property and some
26740 Managed Resources related internalcalls.
26743 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26745 * image.c, image.h: impemented mono_image_get_entry_point ().
26746 * appdomain.c: use mono_image_get_entry_point.
26748 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
26750 * reflection.c: support the object type argument when loading
26753 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
26755 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
26756 String as return type.
26758 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
26760 * reflection.c: fix encoding of named args for custom attrs to match
26761 the ms implementation. Read them back when instantiating custom
26764 2002-08-02 Radek Doulik <rodo@ximian.com>
26766 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
26767 by Dietmar as quick fix
26768 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
26769 16 as stack size, used on more places as quick fix before Dietmar
26770 will fix it properly
26772 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
26774 * object.h, object.c: added accessors for fields and properties.
26776 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
26778 * class.c, class.h: made mono_class_get_field_from_name ()
26779 loop on parent types.
26780 Added mono_class_get_property_from_name ().
26782 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26784 * class.c, class.h: move the code to setup the type vtable in its own
26785 function so that it can be reused also for types created at runtime.
26786 Eliminate the "class" identifier from the header file.
26787 * reflection.c: setup the vtable for enums so that we can create
26788 objects for use in SetConstant ().
26790 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
26792 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
26793 instead of the delegate itself as this pointer (bug #28383)
26795 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
26797 * marshal.c (mono_marshal_get_managed_wrapper): added return type
26800 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
26802 * loader.c: don't set the pinvoke bit on icalls.
26804 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
26806 * debug-helpers.c (mono_method_full_name): only print a number to
26807 indicate wrapper type (so that the output is more readable in traces).
26809 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
26811 * class.c (mono_class_init): include method override patch from Paolo
26813 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
26815 * icall.c: fixed GetTypeCode().
26817 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
26819 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
26820 use real delegate invoke function to make it work with multicast
26821 delegates (fix bug# 28291).
26823 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26825 * object.c: load constant strings.
26827 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
26829 * reflection.c: no magic numbers.
26830 * tabledefs.h: security action enum.
26832 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
26834 * assembly.c: fix possible memory corruption.
26836 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
26838 * reflection.h, reflection.c: added support for linking resources.
26839 * verify.c: check we have an updated corlib.
26841 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
26843 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
26845 (mono_marshal_string_array): null terminate unmanaged string arrays.
26846 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
26848 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
26850 * icall.c: Type.GetType () can now return also types from the
26853 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26855 * loader.h, loader.c: stack walking support.
26856 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
26857 GetCallingAssembly.
26859 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
26861 * marshal.c: added optimisations for blittable types
26863 * class.c (mono_array_class_get): do not set blittable attribute on arrays
26864 (mono_class_setup_mono_type): set blittable attribute for single
26867 * marshal.c (mono_string_utf8_to_builder): impl.
26868 (mono_string_builder_to_utf8): impl.
26869 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
26871 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
26873 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
26874 (mono_marshal_get_managed_wrapper): impl. byref types
26876 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26879 (search_method): don't display debug message.
26881 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
26883 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
26885 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26887 * appdomain.c: set the missing filename when throwing exception.
26889 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
26891 * metadata.c (mono_type_size): code cleanup
26892 (mono_type_stack_size): removed some test code
26894 2002-07-21 Miguel de Icaza <miguel@ximian.com>
26896 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
26897 mono_get_exception_file_not_found now.
26899 * exception.c (mono_exception_from_name_two_strings): New version
26900 that will call a constructor with two string arguments.
26901 (mono_get_exception_file_not_found): New helper routine, used to
26902 report file-not-found errors.
26904 2002-07-20 Dick Porter <dick@ximian.com>
26907 * process.c: Pass file handles to CreateProcess
26911 * file-io.c: Implemented CreatePipe
26913 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
26915 * metadata.c (mono_get_param_info): set alignment for value types
26917 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26919 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
26920 Constify mono_domain_assembly_open().
26921 * loader.c: handle null namespace in icalls.
26923 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
26925 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
26926 (emit_str_to_ptr_conv): marshal object as structs
26928 * metadata.c (mono_type_to_unmanaged): marshal object as structs
26930 * marshal.c (mono_marshal_get_runtime_invoke): support value types
26932 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
26934 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
26935 (mono_marshal_get_native_wrapper): we an now return value types
26937 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
26939 * verify.c: more checks implemented.
26941 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
26943 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
26945 (mono_marshal_get_native_wrapper): allow byref arguments
26946 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
26947 impl. PtrToStringXXX methods
26948 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
26949 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
26950 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
26951 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
26952 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
26954 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26956 * reflection.c: fix buglet in parsing an assembly name.
26958 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
26960 * marshal.c (emit_ptr_to_str_conv): first impl.
26962 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
26964 * object.c, class.h: cache the vtable in the class as suggested by
26965 vargaz@freemail.hu (Zoltan Varga).
26967 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26969 * class.h, loader.c: added mono_field_from_token().
26970 * verify.c: first cut of type checking code.
26972 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
26974 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
26976 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
26978 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
26980 (mono_marshal_get_remoting_invoke): impl.
26981 (mono_delegate_begin_invoke): impl.
26982 (mono_mb_emit_save_args): impl.
26983 (mono_delegate_end_invoke): impl.
26984 (mono_marshal_get_delegate_begin_invoke):
26985 (mono_marshal_get_delegate_end_invoke):
26986 (mono_marshal_get_delegate_invoke): generate a special name for
26987 those methods (including the signature) and associate them whith
26988 the delegate class.
26990 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
26993 (mono_reflection_type_from_name): now it has a MonoImage parameter
26994 which is used as the default image to search the type in. If the image
26995 is NULL or getting the type from it fails, it defaults to corlib.
26997 * icall.c: changed 1 call to mono_reflection_type_from_name to match
27000 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27002 * reflection.c: update the parameter table index.
27004 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27006 * domain.c: don't include the mark byte in the string hash.
27008 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27010 * icall.cs: icall for Type.GetTypeCode ().
27011 * verify: a couple of fixes and disabled local initialization checks.
27013 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
27015 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
27017 * debug-helpers.c (mono_method_full_name): print the type of the
27020 * metadata.c (mono_signature_hash): a hash function for signatures
27021 (mono_signature_hash): better hash algorithm
27023 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
27025 * debug-helpers.c (mono_method_full_name): this can now generate
27026 method names with signatures
27028 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
27029 method dont have this pointers.
27031 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
27033 * reflection.c: fixup typebuilder tokens.
27034 * image.c: fix buglet.
27035 * marshal.h: remove whitespace.
27036 * metadata.h, metadata.c: reinstate code that was removed.
27037 * verify.c: handle catch directives and fix another couple of bugs.
27039 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
27041 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
27042 (mono_marshal_get_native_wrapper): make it comp. with the old code
27043 (mono_marshal_get_native_wrapper): support boolean
27044 (mono_marshal_get_managed_wrapper): support more types
27046 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
27048 * class.c (class_compute_field_layout): compute class->blittable attribute.
27050 2002-07-09 Dick Porter <dick@ximian.com>
27052 * threads.c: Make the thread cleaning up cope with threads that
27055 2002-07-08 Radek Doulik <rodo@ximian.com>
27057 * reflection.c (method_encode_code): use non-translated values to
27058 compute finally_start, this fixes exception handling on ppc, yay!
27060 * decimal.h (struct signscale): fix endianess
27062 2002-07-07 Radek Doulik <rodo@ximian.com>
27064 * reflection.c: swap box_val and not val
27066 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
27068 * reflection.c, reflection.h: handle full assembly info in type name.
27069 Handle Type arguments when loading custom attributes.
27070 * icall.c: updated to use new mono_reflection_type_from_name () method.
27072 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27075 (method_from_memberref): also print assembly name when method not found.
27077 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27080 (ves_icall_TypeGetProperties): fixed bug #27473.
27082 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27084 * reflection.c: display image name and token when cannot find the
27085 .ctor for an attribute.
27087 2002-07-05 Martin Baulig <martin@gnome.org>
27089 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
27091 2002-07-04 Dick Porter <dick@ximian.com>
27093 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
27094 compile on mingw. This will cause mingw builds to not wait for
27095 subthreads to terminate after the main thread does. I've lodged a
27096 bug with the mingw developers for them to wrap OpenThread().
27098 2002-07-03 Dick Porter <dick@ximian.com>
27100 * threads.c: Store thread IDs instead of handles, because
27101 GetCurrentThread() returns a pseudohandle and therefore stores
27102 useless values. mono_thread_cleanup() continues checking the
27103 array of threads until it is empty, to cope with subthreads
27104 spawning new threads after the main thread has finished.
27108 * profiler-private.h: Pass the thread ID to thread profiler
27109 functions, instead of a handle
27111 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27113 * verify.c: fixes to make it more usable.
27114 * pedump.c: added --verify code to verify IL code in an assembly.
27116 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27118 * reflection.c: turn errors into warnings to allow compiling corlib.
27120 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
27122 * reflection.c: add special cases to compile corlib.
27124 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27126 * reflection.c: handle properties with only a set method.
27128 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27130 * opcodes.h: add enum with opcodes in opval order.
27132 2002-07-01 Dick Porter <dick@ximian.com>
27135 * object.c (mono_runtime_run_main): Removed unneeded argument
27137 2002-06-28 Martin Baulig <martin@gnome.org>
27139 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
27141 2002-06-27 Dick Porter <dick@ximian.com>
27143 * threads.c: Store the handle in both the parent thread and in the
27144 subthread, to minimise the time between starting a new thread and
27147 2002-06-26 Dick Porter <dick@ximian.com>
27149 * appdomain.c (mono_runtime_cleanup): Close the socket library
27150 after all the threads have finished, not before
27152 2002-06-26 Martin Baulig <martin@gnome.org>
27154 * debug-symfile.c (mono_debug_find_source_location): Added
27155 `guint32 *line_number' argument. If it's not NULL, store the line number
27156 there and return the file name without the line number.
27158 2002-06-25 Dick Porter <dick@ximian.com>
27162 * process.c: Process forking and other support functions
27164 2002-06-25 Dick Porter <dick@ximian.com>
27166 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
27167 things dont happen when the image is closed.
27168 (mono_image_lookup_resource): Walk the resource section looking
27169 for a particular entry
27171 * cil-coff.h: PE resource section decoding
27173 2002-06-25 Dick Porter <dick@ximian.com>
27177 (mono_assembly_foreach): Accessor functions to walk the list of
27179 (mono_assembly_set_main):
27180 (mono_assembly_get_main): Process methods need to know which
27181 assembly is the "main" one
27183 * object.c (mono_runtime_run_main): Record the main assembly
27185 * debug-helpers.c: Fix typo
27187 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
27189 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
27190 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
27192 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27194 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
27196 2002-06-21 Miguel de Icaza <miguel@ximian.com>
27198 * image.c (do_mono_image_open): Initialize reference count,
27199 otherwise we leak the MonoImage.
27201 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
27203 * reflection.c: small tweak to handle self-hosting.
27205 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
27207 * reflection.c: fix type name parse code.
27209 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27211 * reflection.c: break out of the loop.
27212 * image.c: special case corlib.
27214 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27216 * reflection.c: add all the custom attrs at the end to ensure the
27217 ctors have been properly initialized when the attributes are defined
27218 in the current assembly.
27220 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27222 * reflection.c: handle correctly multiple-nested types.
27224 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
27226 * row-indexes.h: fix typos.
27227 * reflection.c: adjust for typos and fix method_def_or_ref
27228 encoding in MethodImpl table.
27230 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27232 * reflection.c: fix entry point patching (thanks Serge!).
27234 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
27236 * verify.c: add check for System.Exception
27238 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27240 * image.c, class.c: minifix for code just c&p'ed.
27241 * reflection.c: warning fix.
27242 * object.h, loader.h, domain.c: load also StringBuilder.
27244 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27246 * marshal.h, marshal.c: some support code to handle complex marshaling.
27248 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27250 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
27251 Better signatures with vtable error dump.
27253 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
27255 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
27257 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
27259 * icall.c (ves_icall_Type_GetField): impl.
27261 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27263 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
27264 to retrieve a marshal description blob for a field or param.
27266 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27268 * reflection.h, reflection.c: change order of nested type emission
27269 to avoid table corruption. The NestedTypes table is sorted.
27270 * icall.c: change order of GetConstructor results to workaround mcs bug.
27272 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27274 * reflection.h, reflection.c: handle field and param marshal
27277 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27279 * icall.c, marshal.c marshal.h: more Marshal class implementation.
27281 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27283 * reflection.c: fix call convention.
27285 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27287 * reflection.h, reflection.c: mono_image_get_memberref_token()
27288 takes a type instead of a class, now. Added
27289 mono_image_get_array_token() to create tokens for the special
27290 multi-dim array methods.
27292 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27294 * assembly.c: handle modules (no assembly table). Split
27295 loading references in its own function.
27296 * class.c: handle moduleref resolution scope.
27297 * image.c, image.h: cache module name in image.
27299 2002-06-07 Martin Baulig <martin@gnome.org>
27301 * reflection.c (mono_image_get_type_info): Only add a class layout entry
27302 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
27304 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27306 * icall.c: more signature fixes that used uint instead of int.
27308 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27310 * reflection.c: fixed signature of field refs.
27312 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27314 * class.c, reflection.c: handle typerefs of nested types
27315 (both on read and when writing files).
27317 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27319 * icall.c: fix method signatures that tried to workaround the previous
27322 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
27324 * debug-helpers.c: fix typo.
27326 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27328 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
27329 rewrote the PE/COFF writing code (our programs are understood by the
27332 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
27334 * gc.c, gc.h, icall.c: weakreference support.
27336 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27338 * Makefile.am, mono-config.c: use $(sysconfdir).
27340 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27342 * icall.c: changed default precision of Double.ToString() to 15.
27343 Fixed memory leak. Unified with Single.ToString.
27345 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
27347 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
27349 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
27351 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
27352 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
27353 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
27356 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27358 * debug-symfile.c, sysmath.c: yet more compilation fixes.
27360 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27362 * reflection.c, socket-io.c: more compilation fixes.
27364 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27366 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
27367 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
27368 unicode.c: warning and compiler compatibility fixes.
27370 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27372 * class.h, metadata.c: fixed warnings/compilation errors.
27374 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27376 * Makefile.am, mono-config.c, mono-config.h: configuration file
27378 * loader.c, loader.h: make Dll mapping configurable at runtime in the
27379 config file. Export methods to insert and lookup mappings.
27381 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
27383 * reflection.c: handle types and boxed objects in custom attr
27386 2002-05-30 Martin Baulig <martin@gnome.org>
27389 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
27391 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
27393 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
27394 to lookup the implmap row for a P/Invoke method.
27395 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
27396 P/Invoke method from the runtime on an as needed basis.
27398 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
27400 * metadata.c (mono_metadata_parse_signature): impl.
27402 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27404 * class.c: handle .pack directive.
27406 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
27408 * object.c: initialize static fields with RVA data.
27410 2002-05-25 Martin Baulig <martin@gnome.org>
27413 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
27415 2002-05-24 Martin Baulig <martin@gnome.org>
27418 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
27419 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
27420 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
27422 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
27424 * object.c: special case string ctros in invoke.
27425 * gc.c: silly whitespace changes.
27427 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
27429 * threadpool.[ch]: impl. a threadpool that can
27430 be used by mint and mono.
27432 2002-05-22 Martin Baulig <martin@gnome.org>
27434 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
27435 The first argument is now a `MonoReflectionModuleBuilder *', the return
27436 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
27437 `methods' field to get the method builder. The `token' argument is the
27440 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
27441 invalid characters instead of g_assert_not_reached()ing. This seems
27442 to be the behaviour of mscorlib.
27444 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
27446 * object.c (mono_runtime_invoke_array): applied patch from Rachel
27447 Hestilow to fix bug #25104
27449 2002-05-21 Martin Baulig <martin@gnome.org>
27451 * debug-symfile.c (mono_debug_find_source_location): New function.
27452 Looks up an IL offset in the line number table and returns the source
27453 location as a string.
27455 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27458 (mono_double_ToStringImpl): changed %f by %g until we have something
27461 2002-05-21 Nick Drochak <ndrochak@gol.com>
27463 * icall.c : Use different name for Math.Pow's icall. Needed to check
27464 parameters first in C#.
27466 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27468 * icall.c, reflection.h: added icall to get info about an event.
27470 2002-05-20 Radek Doulik <rodo@ximian.com>
27472 * object.c (mono_value_box): don't use memcpy for boxing on BIG
27474 (mono_value_box): don't use memcpy for small sizes on
27475 architectures with unaligned access
27477 2002-05-20 Martin Baulig <martin@gnome.org>
27479 * reflection.c (mono_reflection_setup_internal_class): Don't crash
27480 if `tb->parent == NULL'.
27481 (mono_reflection_create_internal_class): New function. This is
27482 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
27485 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
27488 2002-05-19 Martin Baulig <martin@gnome.org>
27490 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
27491 argument to get the length, don't default to the array length.
27493 2002-05-18 Miguel de Icaza <miguel@ximian.com>
27495 * assembly.c (mono_assembly_setrootdir): New function used to
27496 override the MONO_ASSEMBLIES directory.
27498 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27500 * icall.c: ValueType_GetHashCode() initialize local var.
27502 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27504 * reflection.c: sort custom attributes table.
27506 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27508 * reflection.c: support named args in custom attributes (write support).
27510 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
27512 * reflection.c: fix finally position calculation.
27514 2002-05-15 Radek Doulik <rodo@ximian.com>
27516 * reflection.c: fixed endianess at many places
27518 * icall.c (ves_icall_InitializeArray): comment out debug msg
27520 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
27522 * object.c (mono_unhandled_exception): new function to handle
27523 unhandled exceptions.
27524 (mono_unhandled_exception): call the UnhandledException event.
27525 (mono_runtime_delegate_invoke): impl.
27527 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
27529 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
27530 returns the RVA, not the direct pointer to the data. Handle the case
27531 when the class size is fixed.
27533 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
27535 * reflection.c: fix some endianess issues.
27537 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
27539 * object.c (mono_runtime_invoke): is now able to catch exceptions.
27541 * threads.c (mono_thread_init): added a callback which is invoked
27544 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
27546 * icall.c: make GetHashCode return non-negative values.
27548 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
27550 * object.c, icall.c, gc.c: revert to address-based hashcode.
27552 2002-05-13 Miguel de Icaza <miguel@ximian.com>
27554 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
27556 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27558 * icall.c, class.c: special case <Module>.
27560 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
27562 * icall.c: fix bug in GetNow().
27564 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
27566 * object.c (mono_runtime_class_init): make sure that we call all
27567 static class constructors.
27569 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27571 * reflection.c: sort methodsemantics table.
27573 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27575 * reflection.h, reflection.c: honour init locals setting.
27577 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
27579 * icall.c: copied Double ToStringImpl for Single ToStringImpl
27581 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
27583 * reflection.c: support ContructorBuilders in attribute blob creation.
27585 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27587 * reflection.c: some changes to build a binary that can be run
27588 directly in windows.
27590 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
27592 * loader.c: print a big message when an icall can't be found.
27594 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27596 * string-icalls.c: fix bug 24248.
27598 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
27600 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
27601 icall.c, reflection.h: separate assembly loading by pathname and by
27602 assembly name. Use the MONO_PATH env var to search for assemblies.
27604 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27606 * assembly.c, image.h: add some support for assemblies
27607 with multiple modules.
27608 * class.c, class.h: export mono_class_from_typeref().
27609 * loader.c: remove duplicated code and use mono_class_from_typeref(),
27612 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27614 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
27615 documentation says (the ECMA one is correct).
27617 2002-05-02 Dick Porter <dick@ximian.com>
27619 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
27620 Don't name the synchronisation mutex.
27622 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
27625 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
27626 Make the prototypes match.
27627 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
27631 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
27632 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
27633 all systems have tm.tm_zone, so use strftime() with %Z to print
27634 the timezone abreviation into a temp string.
27636 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
27637 rather than mono_array_addr() on a MonoString on Big Endian
27640 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
27642 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
27645 2002-04-30 Dick Porter <dick@ximian.com>
27647 * socket-io.c: Cope with SOCKET being an integer rather than a
27650 * threads.c: Added Thread_free_internal, to deal with thread
27651 handle cleanup. Moved calls to handle_store() and handle_remove()
27652 to start_wrapper(), so each can only be called once. Allocate
27653 synchronisation blocks with GC_malloc(), and use GC finalisation
27654 to close the handles.
27656 * icall.c: added System.Threading.Thread::Thread_free_internal
27658 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27660 * icall.c: support Environment.Exit, CommandLineArgs().
27662 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27664 * object.c, object.h: added mono_runtime_run_main () and
27665 mono_runtime_get_main_args () for use in System.Environment.
27667 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27669 * gc.c: fix thinko, enable actual finalization since the jit is now
27672 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27674 * gc.c, object.c: take into account that an object may be offset wrt the address
27675 returned by GC_malloc().
27677 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
27679 * image.c: handle files without entries in the assembly table (modules).
27681 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
27683 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
27684 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
27685 allowed to be null when it's System.Object class setup.
27687 2002-04-27 Martin Baulig <martin@gnome.org>
27689 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
27690 if `tb->parent == NULL' rather than crashing.
27692 2002-04-28 Nick Drochak <ndrochak@gol.com>
27694 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
27695 calling acos() where asin() should have been called.
27697 2002-04-26 Martin Baulig <martin@gnome.org>
27699 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
27700 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
27701 there's a subdirectory called `System', but we don't want to read that
27702 subdirectory as an assembly.
27704 2002-04-25 Martin Baulig <martin@gnome.org>
27706 * debug-symfile.c: Reflect latest MonoString changes.
27708 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27710 * rand.c, rand.h: instance method icalls need to have an explicit
27711 this pointer as first argument in the C implementation.
27713 2002-04-25 Nick Drochak <ndrochak@gol.com>
27715 * icall.c: Fix typo in map for GetNonZeroBytes
27717 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
27719 * string-icalls.c : String does now passes unit tests without any
27720 errors, the following changes has been made:
27722 Implemented replace methods.
27723 Renaming of methods to (try) follow the standard.
27724 Fixed compare ordinal
27725 Made all memory allocated directly to function instead of via icall function.
27726 Small performance fix in is_in_array function
27728 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
27730 c (mono_string_Internal_ctor_charp_int_int):
27731 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
27732 sindex < 0, throw ArgumentOutOfRangeException instead of
27733 ArgumentNullException.
27735 Added new check for length == 0, however
27736 I need to make it return String.Empty from the C code.
27738 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
27739 that calculate the length for us here.
27741 (mono_string_Internal_ctor_sbytep_int_int): Replaced
27742 mono_string_new_utf16 with mono_string_new, since value is utf8.
27744 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27746 * object.c: register the object for finalization if needed.
27747 Allocate one more char in the string for the terminating 0 char.
27749 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27751 * class.c, class.h, image.c: check if a type implemenst a destructor.
27752 Use the proper key for array class lookups.
27753 * icall.c: register the icalls in the System.GC class.
27754 * gc.c, gc.h: GC-related functions and icalls.
27756 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27760 * unicode.c: free some strings gotten from mono_string_to_utf8 and
27761 changed a couple of free () by g_free ().
27763 * decimal.c: one-liner in the comments for decimal2string ().
27765 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
27767 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
27769 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
27771 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
27772 * object.c (mono_runtime_invoke_array) : handle null in params
27774 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
27776 * string-icalls.c: fixed bug in split (one off bug)
27778 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
27780 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
27781 * icalls.c: added String::Equals as internal method
27783 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
27785 * threads.c: fixed bug in the double interlocked functions
27787 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
27789 * threads.c: implemented all of the new interlocked icalls.
27790 * string-icalls.c: fix a bug in insert.
27791 * icalls.c: added the icalls for interlocked, removed old string functions.
27793 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
27795 * loader.c: fix off-by-one error when reading argument names.
27797 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27799 * profiler.c: win32 counter implementation (untested).
27800 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
27801 (the latter needs testing and more complete impl. from win32 folks).
27803 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
27805 * object.c: mono_array_new_full workaround mono_array_class_get
27808 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
27810 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
27811 * object.h (mono_string_chars): Changed casting type.
27813 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
27815 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
27816 method signatures to use gunichar2 instead of gint16.
27818 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
27820 * object.h, object.c: domain-specific versions of mono_object_new and
27823 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
27825 * object.c: changed String layout
27827 * string-icalls.c (mono_string_Internal_ctor_chara): added
27828 internal string constructors.
27830 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
27832 * threads.c: pass 'this' to the thread start routine.
27834 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27836 * string-icalls.c: fix IndexOf and LastIndexOf. Now
27837 InternalCompareStr don't call twice mono_string_cmp_char for the last
27838 character. Improved performance in mono_string_cmp_char.
27840 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
27842 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
27843 code into its own library: libmonoruntime.
27845 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
27847 * object.h, object.c: changed array format so that szarrays do not
27848 require a bounds structure.
27849 * icall.c, appdomain.c: support for new szarray format.
27851 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
27853 * metadata.c: compare also the retuns type when comparing signatures:
27854 we didn't do this as an optimization since really overloaded methods
27855 must differ also in the arguments, but this doesn't work with
27856 low-level IL code (or when using explicit conversion operators: see
27857 bug#23498 for an example).
27859 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27861 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
27863 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
27865 * icall.c: make MonoType::GetElementType its own icall.
27867 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27869 * icall.c: remove MonoMethod_get_Name().
27870 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
27873 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
27875 * string-icalls.c: optimized a few methods.
27877 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
27879 * icall.c: added all new string internal calls
27880 * string-icalls.c: added, new string internal call implementation.
27881 * object.c: added mono_string_new_size for allocating a string a size
27883 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
27885 * object.c (mono_object_isinst): use the same code as in the
27886 optimized x86 version.
27888 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27890 * profiler.c: TSC-based timer code (faster and more accurate).
27891 Not hooked up in configure, yet (set USE_X86TSC to 1).
27893 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
27895 * profiler.c, profiler.h: track time spent compiling methods.
27896 * threads.c: track thread creation/destruction.
27898 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
27900 * profiler.c, profiler.h, profiler-private.h: profiling interface
27901 and sample implementation. Moved here so that it can be used also by
27904 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
27906 * reflection.c, reflection.h: keep types and other handles separate in
27907 the hash tables for referred tokens. Add guid for modules.
27909 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
27911 * assembly.c: fix bugs found with valgrind.
27912 * metadata.h, metadata.c: added mono_metadata_guid_heap().
27914 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
27916 * threads: added icall support for getting current domain for
27919 2002-04-13 Martin Baulig <martin@gnome.org>
27921 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
27922 (MonoDebugVarInfo): Added `index' field for register based addresses.
27923 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
27924 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
27925 `MonoDebugVarInfo *params' and `guint32 this_offset' with
27926 `MonoDebugVarInfo *this_var'.
27928 * debug-symfile.c (relocate_variable): New static function to write
27929 a location description for a local variable or method parameter.
27931 2002-04-12 Martin Baulig <martin@gnome.org>
27933 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
27934 stack offset and begin/end scope address of a local variable.
27935 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
27936 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
27937 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
27939 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
27940 Added new relocation types for start/end scope of a local variable.
27942 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27944 * object.h: add mono_object_domain() macro.
27945 * reflection.c: handle typespecs.
27946 * icall.c: MonoMethod::get_Name() implementation.
27948 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27950 * icall.c: String::GetHashCode() icall implementation.
27952 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27954 * icall.c: String::IndexOfAny icall.
27955 * object.c, object.h: make array->max_length more useful.
27956 Intrduced mono_object_class() and mono_string_length() macros.
27958 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27960 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
27961 instead of g_unichar_isdigit.
27963 2002-04-11 Nick Drochak <ndrochak@gol.com>
27965 * icall.c: Implement a simple Double.ToString().
27967 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
27969 * appdomain.h: only io-layer.h is supposed to be included.
27970 * icall.c: explicitly import environ. Fix warning.
27972 2002-04-10 Nick Drochak <ndrochak@gol.com>
27974 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
27975 return true even if it's not Daylight Savings time.
27976 Only return false for the case where the function isn't
27977 implemented for a plaform (read Windows).
27979 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27981 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
27984 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
27986 * mempool.c (mono_mempool_alloc): only use g_malloc when
27987 absolutely necessary.
27989 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
27991 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
27993 * class.c (mono_class_vtable): use domain mempool to allocate vtable
27994 (mono_class_proxy_vtable): use domain mempool
27996 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27998 * appdomain.h, appdomain.c: split initialization that requires the
27999 execution engine support into mono_runtime_init().
28001 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
28003 * class.c (mono_class_init): don't include vtable inside MonoClass
28004 to save some memory, gather some statistics.
28005 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
28007 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28009 * icall.c: internalcall implementation for ValueType.Equals().
28011 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
28013 * object.c (mono_message_init): moved
28014 (mono_runtime_exec_main): new arch. independent impl.
28015 (mono_runtime_invoke_array): new method - like
28016 mono_runtime_invoke, but you can pass an array of objects.
28017 (mono_remoting_invoke): new arch. independent impl.
28018 (mono_message_invoke): new arch. independent impl.
28019 (mono_runtime_class_init): new arch. independent impl.
28020 (mono_runtime_object_init): new arch. independent impl.
28022 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28024 * metadata.c, object.c, reflection.c: documented the exported
28027 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
28029 * icall.c: simpler code to pass the assembly builder data to corlib.
28030 Implement GetNestedTypes() internalcall.
28032 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28034 * class.c: warn if a type can't be loaded.
28036 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
28038 * image.h: typedef MonoImageOpenStatus
28039 * types.h: removed unused file
28041 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
28043 * icall.c: Enum_ToObject accepts enum value arguments.
28045 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
28047 * class.c: move initialization of properties, events and nested
28048 classes, so that they happen for interfaces, too.
28050 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
28052 * icall.c: cleanup some ugly casts in Array_SetValue*.
28054 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
28056 * icall.c: the values array fro enums is of the correct type, now.
28057 Implement (correctly) getFullName instead of assQualifiedName for
28059 * reflection.h, reflection.c: added mono_type_get_name ().
28061 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
28063 * assembly.c, image.h: for each MonoImage, record from wich assembly
28065 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
28066 Make Type.Assembly work.
28068 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
28070 * debug-symfile.h: use char* instead of gpointer to avoid
28073 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
28075 * icall.c (ves_icall_InternalExecute): impl. FielSetter
28076 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
28078 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
28080 * icall.c (mono_message_init): impl. (code cleanup)
28081 (ves_icall_InternalExecute): impl. FieldGetter
28083 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
28084 defined we call all (non-static)methods through the vtable.
28086 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
28088 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
28089 finalizer even though the memory is still referenced (and the chunk of
28090 memory is not freed).
28092 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
28094 * assembly.c: fix brokeness.
28096 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
28098 * class.c: kill some warnings. Check explicit interface method
28099 implementation also without considering the namespace.
28100 Load also literal strings in static class data.
28102 2002-03-29 Miguel de Icaza <miguel@ximian.com>
28104 * assembly.c (default_assembly_name_resolver): Kill memory leak.
28105 (default_assembly_name_resolver): Make the resolver take the
28106 "base" directory where the assembly was originally defined, so we
28107 can load DLLs that are in the same directory as the assembly that
28108 is being referenced.
28110 2002-03-28 Dick Porter <dick@ximian.com>
28116 * unicode.c: Warning cleanups
28118 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
28120 * object.h, reflection.h: use the correct type instead of MonoObject.
28122 2002-03-28 Martin Baulig <martin@gnome.org>
28124 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
28125 (mono_debug_update_symbol_file): Initialize classes if necessary.
28127 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
28129 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
28130 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
28132 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
28134 * assembly.h: fix function prototype.
28135 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
28136 * mono-endian.h: use const cast.
28138 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
28140 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
28142 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
28144 * loader.c: don't assert when a typeref can't be loaded, give
28145 a chance to the runtime to trow an exception instead.
28146 * loader.h: fix warning.
28148 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
28150 * class.c (mono_class_proxy_vtable): added proxy support
28152 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
28154 * icall.c: removed last of PAL calls, added System.Environment
28155 * file-io.h, file-io.c: MonoIO implementation
28156 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
28158 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
28160 * appdomain.c: do not use the byte marker in ldstr table lookup.
28161 * debug-helpers.c: allow two ':' to separate class and method name.
28162 * object.c: allocate arrays bounds with the GC, too.
28163 * verify: add a few more checks.
28165 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
28167 * reflection.c: output also literal strings. Allocate parameter data
28168 with GC_malloc() (thanks, Martin, for catching this!).
28170 2002-03-26 Martin Baulig <martin@gnome.org>
28172 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
28173 include the `this' offset in the `param_offsets'.
28175 2002-03-25 Martin Baulig <martin@gnome.org>
28177 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
28178 mono_debug_get_class() function to get the classes. Added new
28179 relocation types for arrays and strings.
28180 (mono_debug_get_class): New static function to search in all
28181 referenced assemblies for a metadata token.
28183 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
28185 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
28187 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
28188 hold gc-allocated objects. Make the string heap a stream like the
28189 others. Removed duplicated code when writing stream info.
28190 Added asserts to catch possible buffer overflows. Set the sorted map
28191 for tables that need sorting. Added some documentation.
28193 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
28195 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
28196 for interned strings and vtables.
28198 2002-03-24 Martin Baulig <martin@gnome.org>
28200 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
28201 it in the array since it was created with g_slist_prepend().
28203 2002-03-24 Martin Baulig <martin@gnome.org>
28205 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
28206 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
28207 (mono_debug_method_from_token): Renamed to
28208 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
28209 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
28211 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
28214 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
28216 2002-03-24 Martin Baulig <martin@gnome.org>
28218 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
28219 (mono_debug_method_from_token): New func.
28221 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
28222 New interncall, calls mono_debug_local_type_from_signature().
28223 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
28224 calls mono_debug_method_from_token().
28226 2002-03-23 Martin Baulig <martin@gnome.org>
28228 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
28229 specifies the number of bytes to be converted, not the array size.
28230 Return the number of chars, not the number of bytes.
28231 (ves_icall_iconv_get_chars): The `byteCount' argument
28232 specifies the number of bytes to be converted, not the array size.
28234 2002-03-23 Martin Baulig <martin@gnome.org>
28236 * reflection.h (MonoReflectionSigHelper): New type.
28238 * reflection.c (mono_reflection_sighelper_get_signature_local),
28239 (mono_reflection_sighelper_get_signature_local): New functions.
28241 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
28242 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
28245 2002-03-23 Martin Baulig <martin@gnome.org>
28247 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
28248 is_writeable is set.
28249 (mono_raw_buffer_update): New function to write the modified map
28252 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
28254 * debug-symfile.c (mono_debug_update_symbol_file): Call
28255 mono_raw_buffer_update() when done writing.
28257 2002-03-23 Martin Baulig <martin@gnome.org>
28259 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
28261 * debug-symfile.c: Added support for arguments and local variables.
28263 2002-03-23 Dick Porter <dick@ximian.com>
28265 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
28266 protected by ifdefs, hence breaking the w32 build.
28268 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28270 * object.c: implement is_interned() the right way.
28272 2002-03-21 Martin Baulig <martin@gnome.org>
28274 * debug-symfile.[ch]: New files to handle debugging information
28275 files. There's also support to dynamically update these symbol
28276 files to include machine dependent information.
28278 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
28280 * threads.c (mono_thread_create): new function to create thread
28283 2002-03-20 Martin Baulig <martin@gnome.org>
28285 * icall.c (ves_icall_InternalInvoke): Create a new object if the
28286 method is a constructor.
28287 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
28288 points to ves_icall_InternalInvoke().
28290 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
28292 * file-io.c: Flush shouldn't throw exceptions.
28294 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
28296 * file-io.c: FileStream flush support; FileSetLength now
28297 restores file pointer.
28299 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
28301 * class.c: set image for pointer classes.
28303 2002/03/19 Nick Drochak <ndrochak@gol.com>
28305 * sysmath.c: Forgot one.
28307 2002-03-18 Miguel de Icaza <miguel@ximian.com>
28309 * sysmath.c: Avoid redefining existing names.
28311 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
28313 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
28314 handled by runtime as icall rather than dllimport from libm.so
28315 * file-io.c, file-io.h: fixed handle argument type.
28317 2002-03-18 Dick Porter <dick@ximian.com>
28319 * reflection.c (mono_image_get_type_info): rename interface to
28320 iface, because of "#define interface struct" on windows.
28322 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
28324 * class.c, class.h: rename and export mono_ptr_class_get().
28325 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
28326 * reflection.c, reflection.h, icall.c: better/saner type name
28327 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
28330 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
28332 * class.c (mono_class_init): removed hardcoded GHC_SLOT
28334 * icall.c (ves_icall_InternalInvoke): impl.
28336 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
28338 * reflection.c: output the interface map table, too.
28340 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
28342 * class.c (class_compute_field_layout): separate computation of
28343 static field layout
28345 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
28347 * icall.c: added System.Buffer support.
28348 * file-io.c: moved file icalls from PAL to FileStream.
28350 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
28352 * icall.c (ves_icall_System_Object_GetHashCode): impl.
28354 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
28356 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
28358 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
28360 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
28362 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28364 * debug-helpers.{c,h}: moved here from monograph some useful functions
28365 to locate a method by name/signature in a class or image. Included
28366 also a small and flexible IL disassembler.
28368 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28370 * reflection.c: fixup tokens in methods with small header size, too.
28372 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
28374 * object.c (mono_string_to_utf8): remove assert(!error), instead
28377 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
28379 * icall.c: update to the new mono_Array_class_get interface.
28381 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
28383 * appdomain.c, object.c: Boehm-GC enable.
28384 * icall.c: make get_data_chunk() support split data requests.
28385 Ensure a class is initialized in more cases. Return only the first
28386 property found in GetProperties() or the compiler gets confused.
28387 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
28388 * reflection.h, reflection.c: add fixup mechanism for field and method
28389 tokens. Initialize assembly->typeref in a single place. Output
28390 properties after events. Support custom attributes for events, too.
28391 Typo fix for paramter custom attrs.
28393 2002-03-07 Martin Baulig <martin@gnome.org>
28395 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
28397 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
28399 * class.c (mono_array_class_get): fix. for multi. dim. arrays
28401 2002-03-06 Martin Baulig <martin@gnome.org>
28403 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
28404 non-zero lower bounds. See testcases #F10-#F13.
28406 2002-03-05 Martin Baulig <martin@gnome.org>
28408 * exception.c (mono_get_exception_argument_out_of_range): New exception.
28410 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
28411 ves_icall_System_Array_GetValue(), only calculate the absolute array position
28413 (ves_icall_System_Array_SetValue): Likewise.
28414 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
28415 as argument and does the actual work. This function is used when copying a
28416 multi-dimensional array.
28417 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
28418 now do all the widening conversions of value types.
28419 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
28421 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28423 * class.c: remove some magic numbers and use the smbolic names,
28424 instead. Added init_events() to load event info at class init time.
28425 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
28426 and mono_metadata_methods_from_event().
28427 * reflection.h, reflection.c: added support for writing out the evnets
28428 related information.
28430 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
28432 * reflection.h, icall.c: use a different method (GetInterfaces)
28433 to gather interface info and add isbyref, isprimitive and
28434 ispointer to the ves_icall_get_type_info() return value.
28436 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
28438 * class.h: stared adding support for events.
28439 * icall.c: split find_members implementation. Added debug icall to get
28440 the address of an object.
28441 * reflection.c: handle TypeBuilders in mono_type_get_object().
28443 2002-03-01 Martin Baulig <martin@gnome.org>
28445 * icall.c (ves_icall_System_Array_GetLength): This must throw an
28446 ArgumentOutOfRangeException(), not an ArgumentException().
28447 (ves_icall_System_Array_GetLowerBound): Likewise.
28448 (ves_icall_System_Array_GetValue): Improved argument checking.
28449 (ves_icall_System_Array_SetValue): Improved argument checking.
28451 2002-03-01 Martin Baulig <martin@gnome.org>
28453 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
28454 called with invalid arguments rather than just dying with g_assert().
28455 (ves_icall_System_Array_SetValue): Likewise.
28456 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
28457 raise a NotImplementedException instead.
28458 (ves_icall_System_Array_GetLength): Added argument checking.
28459 (ves_icall_System_Array_GetLowerBound): Added argument checking.
28461 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
28463 * object.h (mono_assert): new macros mono_assert and
28464 mono_assert_not_reached
28466 2002-02-28 Martin Baulig <martin@gnome.org>
28468 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
28469 and "System::String::IsInterned" to "System::String::_IsInterned".
28471 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
28473 * icall.c: remove hacks for typebuilder. Added icall to create a
28474 modified type from a tybebuilder.
28475 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
28476 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
28477 to create a backing MonoClass for a TypeBuilder.
28479 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
28481 * class.c, class.h: more refactoring of class init.
28482 Export mono_class_setup_mono_type() and mono_class_setup_parent().
28484 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
28486 * marshal.c, marshal.h: start of marshaling interface.
28488 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
28490 * icall.c: fix order in assembly qualified name icall.
28492 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
28494 * class.c: do not free str, since we store it in the hash table.
28495 * reflection.h: add label field to MonoILExceptionInfo.
28496 * reflection.c: handle references to more than one assembly. Handle
28497 case when there isn't a module created in the assembly.
28499 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
28501 * class.c: Fix typo. Start refactoring of class init code.
28503 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
28505 * appdomain.c: exit with 1 on error.
28506 * class.c: we already have the name in MonoClassField.
28507 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
28508 MonoStreamHeader instead of an offset of image->raw_metadata.
28510 2002-02-26 Miguel de Icaza <miguel@ximian.com>
28512 * appdomain.c (mono_init): Be even more descriptive about the error.
28514 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
28516 * appdomain.c: give the user an informative message when corlib can't
28519 2002-02-26 Martin Baulig <martin@gnome.org>
28521 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
28522 New icall to get the time zone data.
28524 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
28526 * reflection.c: set virtual and raw size of section correctly.
28527 * threads.c: transfer domain information to newly created threads.
28529 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
28531 * class.c: when instancing a class in a domain, load the default
28532 vaules for static fields from the constant table. Fix System.Enum to
28534 * icall.c: implement Object::GetType() internalcall. Implemented
28535 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
28536 Fixed checking of binding flags in find_members().
28537 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
28538 * reflection.c: handle enumerations when writing to the constant
28539 table. Use a different object cache for types.
28542 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
28544 * object.c (mono_object_isinst): fix for arrays
28546 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
28548 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
28550 * object.c: don't use mprotect () and fix intern pool hash table
28551 lookup for big endian systems.
28553 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28555 * icall.c: change type_is_subtype_of () signature.
28557 2002-02-21 Mark Crichton <crichton@gimp.org>
28559 * rand.c, rand.h: Added random number generator for
28560 System.Security.Cryptography classes.
28562 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
28564 * icall.c: Added System.Security.Cryptography calls.
28566 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
28568 * class.c, icall.c, metadata.c: better support for pointer types.
28569 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
28570 * reflection.c: Add support for getting custom attrs for properties
28571 and simplify some code.
28573 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28575 * icall.c: change getToken () and add custom attribute GetBlob()helper
28577 * reflection.h: add custom attrs array to the reflection builder structures.
28578 * reflection.c: encode and emit custom attributes for all the relevant
28579 reflection objects. Cache fieldref and methodref tokens. Change
28580 mono_image_create_token() interface to take a MonoDynamicAssembly.
28581 More complete custom attributes decoder. Load custom attributes for
28582 Assembly, Field, Method and Constructor objects, too. Make the
28583 returned array an Attribute[] one, not object[]. Added
28584 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
28585 custom attribute constructor.
28587 2002-02-20 Dick Porter <dick@ximian.com>
28591 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
28592 problem code out for now).
28594 2002-02-19 Radek Doulik <rodo@ximian.com>
28596 * object.c (mono_ldstr): use hash table to avoid multiple swapping
28598 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
28600 * icall.c: register the GetCustomAttributes method.
28601 * object.c, object.h: add mono_string_new_len ().
28602 * reflection.h, reflection.c: added mono_runtime_invoke(),
28603 mono_install_runtime_invoke(). Added
28604 mono_reflection_get_custom_attrs () to load custom attributes and
28605 create the attribute objects.
28607 2002-02-19 Dick Porter <dick@ximian.com>
28608 * threads-dummy-types.c:
28609 * threads-dummy-types.h:
28612 * threads-pthread-types.c:
28613 * threads-pthread-types.h:
28614 * threads-pthread.c:
28615 * threads-pthread.h: Deleted obsolete files
28617 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
28619 * class.c (mono_class_vtable): runtime init the class when we
28620 allocate static class data.
28622 * icall.c (ves_icall_System_Array_SetValue): check for null values.
28624 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
28625 and String - but we will need generic marshalling support in the
28627 (mono_init): set the domain name in a ms compatible way
28629 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
28632 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
28634 * object.c (mono_array_clone): use alloca() instead of g_malloc
28637 * appdomain.c (mono_domain_unload): impl.
28639 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
28641 * appdomain.c, object.c: fix intern pool implementation.
28642 * class.c: fix alignment code.
28644 2002-02-16 Radek Doulik <rodo@ximian.com>
28646 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
28647 and s2 > s1, just copy lower bytes to be compatible with little
28648 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
28649 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
28651 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
28652 force big_endian to be 1 for big endian machines
28653 (ves_icall_iconv_new_decoder): ditto
28655 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
28657 * socket-io.c (convert_sockopt_level_and_name): If the system
28658 doesn't define SOL_IP or SOL_TCP, get them by hand using
28659 getprotobyname() and caching the values (because this could be a
28661 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
28662 Use the appropriate struct when the system does support it. Ie,
28663 not all systems have struct ip_mreqn so use struct ip_mreq when
28666 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
28668 * reflection.c: handle finally clauses.
28670 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
28672 * socket-io.c: use g_snprintf() instead of snprintf.
28674 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
28676 * reflection.c (mono_param_get_objects): Cast second argument to
28677 mono_method_get_param_names to a const char** to silence the
28680 * appdomain.c (mono_domain_assembly_open): Put parens around the
28681 truth statement in the for-loop.
28683 * unicode.c (iconv_convert): Got rid of a compiler warning about
28684 int i being unused when the system has a new iconv.
28685 (iconv_get_length): Same.
28687 * image.c (load_class_names): Cast the second argument to
28688 g_hash_table_insert() to char* to hush compiler warnings about the
28690 (mono_image_open): Same here.
28692 * socket-io.c: Don't conditionally include sys/filio.h or
28693 sys/sockio.h here anymore since we now get them from
28694 io-layer/io-layer.h
28695 (inet_pton): If the system doesn't support inet_aton, implement
28696 using inet_addr and also #define INADDR_NONE if it isn't defined
28699 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
28701 * metadata.c, metadata.h: added function to get packing and size info
28703 * reflection.h, reflection.c: handle field RVA data. Save info about
28704 the table layout if needed. Assign typedef indexes to all the types
28705 before dumping the info about them to avoid forward reference problems.
28707 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
28709 * socket-io.c (convert_sockopt_level_and_name): ifdef
28710 SO_ACCEPTCONN because it is not defined on my system (old debian)
28712 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
28714 * opcode.c: use stddef.h to get NULL.
28716 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
28718 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
28719 for FIONBIO, FIONREAD and SIOCATMARK.
28720 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
28721 define INADDR_NONE and besides, inet_addr() is deprecated and
28722 should not be used. Use inet_pton() instead - it also has the
28723 added bonus that it can easily handle IPv6 addresses as well.
28724 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
28726 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
28728 * decimal.c: remove _MSC_VER conditional.
28730 2002-02-13 Dick Porter <dick@ximian.com>
28733 * icall.c: Internal calls for Blocking, Select, Shutdown,
28734 GetSocketOption and SetSocketOption
28736 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28738 * assembly.cs: better resolver: use it instead of some kludgy
28741 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
28743 * reflection.c: the best way to speed-up the compiler is to avoid
28746 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
28748 * class.c (mono_class_vtable): changed the object layout
28749 (obj->vtable->class).
28750 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
28752 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28754 * assembly.c: look for assemblies in the assembly dir, too.
28756 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
28758 * class.c: fix thinko in mono_class_from_type().
28760 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
28762 * exception.h, exception.c: added TypeLoadException.
28763 * object.h, object.c: added mono_array_clone ().
28764 * icall.c: handle throwOnError in AssemblyGetType().
28765 Added Array.Clone().
28766 * opcode.h, opcode.c: use a single value for the opcode val.
28767 Compile fix for non-gcc compilers.
28769 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
28771 * opcodes.c, opcodes.h: export interesting info about opcodes.
28773 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
28775 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
28778 * class.c (class_compute_field_layout): set element_class for enums
28779 (mono_class_create_from_typedef): set element_class for normal classes
28781 * icall.c (ves_icall_System_Enum_get_value): impl.
28783 * class.c (mono_class_create_from_typedef): do not set valuetype
28784 flag for System.ValueType and System.Enum
28786 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
28788 * unicode.c (iconv_convert): fix big endian problem.
28790 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
28792 * class.c: add asserts if we are ever going to scribble over memory.
28793 * socket-io.c: not all systems have AF_IRDA defined.
28795 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
28797 * class.c (class_compute_field_layout): do not consider static
28798 fields to compute alignment
28800 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
28802 * appdomain.c (mono_appdomain_get): impl.
28803 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
28805 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28807 * icall.c: ignore "file://" prefix when loading an assembly.
28809 2002-01-23 Dick Porter <dick@ximian.com>
28813 * Makefile.am: Added socket support
28815 2002-01-23 Miguel de Icaza <miguel@ximian.com>
28817 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
28818 code back. This should return the assemblies that are loaded by
28819 the runtime on behalf of an application domain.
28821 The current implementation is still broken, it just returns every
28822 assembly loaded, but until we get real applications domain this
28825 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
28827 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
28830 2002-01-23 Miguel de Icaza <miguel@ximian.com>
28832 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
28833 the mono_class_from_name lookup.
28834 (ves_icall_get_parameter_info): ditto.
28835 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
28837 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
28839 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
28841 * class.c: load also nested classes on class init.
28842 System.ValueType instance methods gets passed boxed
28843 values, unless methods in derived classed that get a pointer to the
28845 * icall.c: use better name parsing code in GetType().
28846 * image.c, image.h: add mono_image_loaded ().
28847 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
28848 * reflection.c, reflection.h: added mono_reflection_parse_type().
28850 2002-01-22 Veronica De Santis <veron78@interfree.it>
28852 * icall.c : Added mapping of internal calls for Manual and Auto reset events
28853 * threads.c : Added the implementation of internal calls for events
28854 * threads.h : Added prototypes of internal calls for events
28856 2002-01-21 Radek Doulik <rodo@ximian.com>
28858 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
28860 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
28862 * class.c (mono_class_init): set min_align to 1 (instead of 0)
28863 (mono_class_value_size): use min_align
28865 2002-01-20 Dick Porter <dick@ximian.com>
28868 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
28869 so it compiles on w32.
28871 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
28873 * metadata.c (mono_type_stack_size): impl.
28875 * class.c (mono_class_get_field): impl. memberref token
28877 2002-01-16 Veronica De Santis <veron78@@interfree.it>
28879 * icall.h : Added the internal calls mapping for CreateMutex_internal
28880 and ReleaseMutex_internal.
28881 * threads.h : Added the prototype of mutexes internal calls.
28882 * threads.c : Added the implementations of mutexes internal calls.
28884 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
28886 * metaparse.h: removed unused file.
28887 * reflection.c, reflection.h: added stream_data_align () function
28888 to align data in streams and keep stream aligned. Add support for
28889 exception support in method headers.
28891 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
28893 * unicode.c: make iconv_convert () return the number of bytess written
28894 in the output buffer.
28896 2002-01-15 Dick Porter <dick@ximian.com>
28897 * threads.c: Make the runtime's idea of infinite timeouts coincide
28898 with the class library's
28900 Fix a particularly egregious bug in mono_thread_cleanup(). That
28901 code was so utterly bogus it must have been written on a Monday.
28903 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
28905 * reflection.h: add subtypes field to TypeBuilder.
28906 * reflection.c: encode constants for literal fields.
28907 Handle subtypes. Fix user string token (and add a zero byte)
28910 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
28912 * class.c (mono_class_init): bug fix: assign slot numbers for
28915 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
28917 * reflection.c: don't try to output a code RVA for abstract methods.
28918 Small fixes for method header format. Output parameter info to the
28919 ParamDef table. Save method overriding info to MethodImpl table.
28920 Fix property support. Allow typedef.extends to be a type in the
28922 * verify.c: fix off-by-one error.
28924 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
28926 * class.c: fix mono_class_from_mono_type () for szarray types.
28927 Remove unused cache check in mono_class_from_type_spec().
28928 * icall.c: *type_from_name () functions handle simple arrays and byref.
28929 * reflection.c: handle byref and szarray types. Handle methods without
28930 body (gets P/Invoke compilation working). Handle types and fields in
28932 * reflection.h: add rank to MonoTypeInfo.
28934 2002-01-10 Dick Porter <dick@ximian.com>
28936 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
28939 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
28941 * icall.c: initialize class in type_from_handle ().
28942 Loop also in parent classes for get_method ().
28943 * reflection.c: properly encode class and valuetype types.
28944 Start on encoding TypeBuilder types. Handle fieldrefs.
28945 Use correct length when registering a user string.
28946 Handle ConstructorBuilder and MonoMethod in get_token ().
28947 Make mono_type_get_object () aware of cached types.
28948 * object.c: back out change to mono_string_new ().
28950 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
28951 * object.c: mono_string_new should return a NULL when the string
28952 passed in is NULL -- not try to deference it.
28954 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
28956 * icall.c: hack to make IsSubType work for TypeBuilders.
28957 * reflection.c: emit constructors before methods.
28958 Retrieve param names in mono_param_get_objects().
28960 2002/01/05 Nick Drochak <ndrochak@gol.com>
28962 * Makefile.am: fix list of headers and sources so automake 1.5
28963 doesn't complain. Removed \# at end of list.
28965 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
28967 * reflection.c: get token for a method ref. Set return type of
28968 constructor to void.
28969 * loader.c: debug message.
28970 * class.c: typo fix.
28972 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
28974 * icall.c: fix array init with rank > 1. FindMembers
28975 loops in parent class as well.
28976 * image.c: do not insert nested types in name cache.
28977 * reflection.c: warning fix.
28978 * reflection.h: add override method (for interface impl).
28980 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
28982 * metadata.c: fix customattr decoding.
28984 2001-12-21 Miguel de Icaza <miguel@ximian.com>
28986 * rawbuffer.cs: Added native Win32 implementation, avoids using
28987 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
28989 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
28991 * class.c: make the low-level routines handle the cache.
28993 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
28995 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
28997 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
28999 * class.c: fix mono_array_element_size() for objects.
29000 * class.h, class.c: add properties to MonoClass and load them
29002 * icall.c: check with isinst() when assigning a value to an array
29003 instead of requiring the classes to match exactly.
29004 Implemented icall for System.Type::GetType().
29005 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
29006 enums. Handle bindingflags when looking for methods and fields.
29007 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
29008 and mono_metadata_methods_from_property().
29009 * reflection.h, reflection.c: added structures for propreties,
29010 parameters and enums. Implemented mono_property_get_object() and
29011 mono_param_get_objects().
29013 2001-12-18 Dick Porter <dick@ximian.com>
29015 * file-io.c: Use mono_string_to_utf16() instead of
29016 mono_string_chars()
29018 * object.c: Added mono_string_to_utf16(), which copies the non
29019 NULL-terminated MonoString into a new double-null-terminated
29022 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
29024 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
29026 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
29028 * file-io.c: raise exceptions if handle is invalid.
29030 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
29032 * assembly.c: yet another check for mscorlib.
29033 * class.c, class.h: load nesting info for classes.
29034 * icall.c: many new functions to support the Reflection classes.
29035 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
29036 * reflection.h, reflection.c: mono_image_create_token(),
29037 mono_assembly_get_object(), mono_type_get_object(),
29038 mono_method_get_object(), mono_field_get_object(): methods to return
29039 objects that parallel the C representation of assemblies, types,
29042 2001-12-11 Dick Porter <dick@ximian.com>
29045 * file-io.c: Internal calls for file IO.
29047 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
29049 * tabledefs.h: missing FileAttributes.
29050 * verify.h, verify.c: use is_valid_string () to simplify and check for
29051 valid strings more correctly. Fix warnings and speeling.
29052 Check more tables: Filed, File, ModuleRef, StandAloneSig.
29053 Check code: branches, maxstack, method calls.
29055 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
29057 * object.c (mono_object_allocate): removed static, so that the jit
29058 can allocate value types.
29060 * icall.c (ves_icall_System_DateTime_GetNow): impl.
29062 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29064 * class.c: init enum types right away and register the
29065 token->MonoClass map in mono_class_create_from_typedef ().
29066 * verify.h, verify.c: first cut of the verifier.
29067 * pedump.c: add --verify switch to verify metadata tables.
29068 * tabledefs.h: add some missing enums.
29070 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
29072 * class.c (mono_install_runtime_class_init): impl.
29073 (mono_class_init): renamed mono_class_metadata_init to
29074 mono_class_init, also removed the metadata_inited flag
29076 * object.c (mono_object_isinst): use faster algorithm
29078 2001-11-30 Radek Doulik <rodo@ximian.com>
29080 * mono-endian.h: reverted last change
29081 added function prototypes
29083 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
29084 add mono-endian.c back
29086 * mono-endian.c: returned back, as Paolo pointed out, it's needed
29087 for unaligned access, I've mistaked it with endianess. I am
29089 (mono_read16): fix reverted endianess
29090 (mono_read64): ditto
29091 (mono_read32): ditto
29093 2001-11-30 Dick Porter <dick@ximian.com>
29095 * exception.c: Implement mono_exception_from_name()
29097 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
29099 * metadata.h, metadata.c: remove params_size and locals_size and their
29100 calculation from the metadata code: they are only usefult to the
29103 2001-11-29 Radek Doulik <rodo@ximian.com>
29105 * object.c (mono_ldstr): swap bytes here, it's probably not the
29106 best place, but works for me now, I'll redo it once I know mono
29107 better, also note that I add PROT_WRITE and don't reset back, also
29108 note that it's only affects big endians, so x86 should be OK
29110 * mono-endian.h (read16): use just glib macros for both endians
29112 * mono-endian.c: removed as glib macros are used in in
29113 mono-endian.h so we don't need to care about endianess for read
29114 macros as glib does that for us already
29116 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
29118 * class.h, class.h: take minimum alignment into consideration so
29119 that the fields of a class remain aligned also when in an array.
29121 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29123 * loader.h, loader.c: add mono_method_get_param_names().
29124 * class.c: 0-init class fields.
29126 2001-11-26 Dick Porter <dick@ximian.com>
29130 * threads.c: New file that handles System.Threading on all platforms
29133 * object.h: Remove the synchronisation struct from MonoObject,
29134 replace it with a pointer that gets initialised on demand
29136 * Makefile.am: Replace all the system-specific threading code with
29137 a single file that uses the new wrapper library
29139 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
29141 * class.c, class.h: add mono_install_trampoline() so that the runtime
29142 can register a function to create a trampoline: removes the ugly
29143 requirement that a runtime needed to export arch_create_jit_trampoline.
29144 * object.h, object.c: added mono_install_handler() so that the runtime
29145 can install an handler for exceptions generated in C code (with
29146 mono_raise_exception()). Added C struct for System.Delegate.
29147 * pedump.c: removed arch_create_jit_trampoline.
29148 * reflection.c: some cleanups to allow registering user strings and
29149 later getting a token for methodrefs and fieldrefs before the assembly
29151 * row-indexes.h: updates and fixes from the new ECMA specs.
29153 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
29155 * class.h, class.c: add enum_basetype field to MonoClass.
29156 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
29157 to get index in the constant table reated to a field, param or
29159 * reflection.h, reflection.c: handle constructors. Set public-key and
29160 version number of the built assembly to 0.
29161 * row-indexes.h: update from new ECMA spec.
29163 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
29165 * class.h, class.c: add a max_interface_id to MonoClass.
29166 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
29167 since it's used to do that. Added mono_type_type_from_obj().
29168 Make GetType() return NULL instead of segfaulting if the type was not
29169 found. Handle simple arrays in assQualifiedName.
29170 * object.h: add a struct to represent an Exception.
29171 * reflection.c: output call convention in method signature.
29172 Add code to support P/Invoke methods and fixed offsets for fields.
29174 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
29176 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
29178 * icall.c: use mono_array_addr instead of array->vector: fixes the
29179 reflection image writing.
29180 * reflection.c: init call convention byte to 0 in method signature.
29181 Encode the property signature. Don't output property-related methods
29182 twice. Really process the properties for a type (don't cast a field to
29183 a property, my mom always told me that).
29184 Fix 64 bit issues in pointer alignment in a different and more
29187 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
29189 * loader.h: Removed type class from MonoDefaults, added monotype
29191 * loader.c: Loaded MonoType, removed loading of Type
29193 * icall.c (my_mono_new_object): Now returns a System.MonoType,
29194 and fills in System.Type._impl with a RuntimeTypeHandle rather
29195 than the actual MonoClass *
29197 (ves_icall_type_from_handle): change from type_class to
29200 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
29203 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
29206 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
29208 (ves_icall_System_Reflection_Assembly_GetType): implemented
29210 (ves_icall_System_MonoType_assQualifiedName): implemented
29212 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
29214 2001-11-09 Miguel de Icaza <miguel@ximian.com>
29216 * assembly.c (mono_assembly_open): Implement a cache for the
29219 (mono_assembly_close): only destroy the assembly when the last
29222 2001-11-09 Dick Porter <dick@ximian.com>
29224 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
29226 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
29228 * class.c (mono_class_metadata_init): bug fix: compute the right slot
29230 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
29232 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
29233 from Martin Weindel.
29234 * object.h: add mono_string_chars ().
29236 2001-11-07 Miguel de Icaza <miguel@ximian.com>
29238 * reflection.c (build_compressed_metadata): Eliminates warnings
29239 and uses 64-bit clean code.
29241 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
29242 (mono_type_equal): Change signature to eliminate warnings.
29244 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29246 * icall.c, loader.c: remove the internalcall array constructors.
29247 Changes to match the new MonoArray structure.
29248 * object.h, object.c: an array object doesn't allocate an extra
29249 vector. Add mono_array_new_full () to create jagged arrays easily.
29251 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
29253 * metadata.h, metadata.c: add mono_metadata_field_info () to
29254 retreive all the info about a field from vairous tables.
29255 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
29256 * class.h, class.c: augment MonoClassField with more info.
29257 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
29258 policy and load a field's RVA if needed.
29260 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
29262 * class.c (mono_class_metadata_init): create a trampoline for all
29263 virtual functions instead of actually compiling them.
29265 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
29267 * class.h, class.c: include name in MonoClassField.
29268 * class.c: fix fundamental type of System.Object and System.String.
29269 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
29271 * icall.c: remove internalcalls for the Reflection stuff that is now
29273 * loader.c: mono_field_from_memberref () implementation.
29274 * mono-endian.c: thinko (s/struct/union/g).
29275 * object.c, object.h: make the mono_string_* prototypes actually use
29276 MonoString instead of MonoObject.
29277 * reflection.c, reflection.h: updates for changes in the reflection
29278 code in corlib: we use C structures that map to the actual C# classes.
29279 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
29280 fat method header if needed and use the info from the ILGenerator for
29281 methods. Handle fields in types. Misc fixes.
29283 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
29285 * class.c (mono_class_metadata_init): bug fix: always allocate
29286 space for static class data
29288 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
29290 * class.c (mono_compute_relative_numbering): use relative
29291 numbering to support fast runtime type checks.
29293 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
29295 * class.c (mono_class_create_from_typeref): added debugging output
29296 to print class name when MonoDummy is returned instead of real class
29298 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
29300 * class.c (mono_class_metadata_init): interface offset table now
29301 contains pointers into the vtable - this is more efficient for the jit
29303 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
29305 * class.c (mono_class_metadata_init): use a temporary vtable (the
29306 old algorithm only worked for the interpreter, but not for the jit)
29308 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
29310 * loader.c (method_from_memberref): use mono_class_get to get the
29311 class of an array instead of using System.Array directly.
29312 (mono_get_method): also add MEMBERREF methods to the method cache
29313 which usefull for arrays.
29315 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
29317 * pedump.c (arch_compile_method): added to compute vtable entry
29319 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
29320 number of interfaces.
29322 * class.h: merged MonoArrayClass into MonoClass
29324 * class.c (mono_class_create_from_typedef): compute the vtable size and
29325 allocate space to include the vtable inside MonoClass
29326 (mono_class_metadata_init): initialize the vtable
29328 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
29330 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
29331 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
29332 * image.c: endian fixes by Laurent Rioux.
29333 * object.h, object.c: rename MonoStringObject to MonoString and
29334 MonoArrayObject to MonoArray. Change some function names to conform to
29335 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
29336 guint16* as first argument, so don't use char*.
29337 Provide macros to do the interesting things on arrays in a portable way.
29338 * threads-pthread.c: updates for the API changes and #include <sched.h>
29339 (required for sched_yield()).
29340 * icall.c: updates for the API changes above.
29341 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
29342 platforms that need them.
29344 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
29346 * class.c: set the correct type for all the fundamental
29347 type when loading the class.
29349 2001-10-05 Dick Porter <dick@ximian.com>
29351 * threads-pthread.c (pthread_mutex_timedlock): Simple
29352 compatibility version for C libraries that lack this call.
29354 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29356 * class.c: MonoTypes stored in MonoClass are stored as
29357 fundamental MonoTypes when the class represents a
29358 fundamental type (System.Int32, ...).
29359 The TypeHandle return by ldtoken is a MonoType*.
29360 * icall.c: ves_icall_get_data_chunk () write out all the
29361 PE/COFF stuff. Implement ves_icall_define_method (),
29362 ves_icall_set_method_body (), ves_icall_type_from_handle ().
29363 * image.c: properly skip unknown streams.
29364 * loader.h, loader.c: add type_class to mono_defaults.
29365 * metadata.c, metadata.h: export compute_size () as
29366 mono_metadata_compute_size () with a better interface.
29367 Typo and C&P fixes.
29368 * pedump.c: don't try to print the entry point RVA if there is no entry point.
29369 * reflection.c, reflection.h: many cleanups, fixes, output method
29370 signatures and headers, typedef and typeref info, compress the metadata
29371 tables, output all the heap streams, cli header etc.
29372 * row-indexes.h: typo fixes.
29374 2001-10-04 Dick Porter <dick@ximian.com>
29376 * object.h: Add a synchronisation mutex struct to MonoObject
29378 * object.c (mono_new_object): Initialise the object
29379 synchronisation mutexes
29381 * icall.c: System.Threading.Monitor internal calls
29383 * threads-pthread.h:
29384 * threads-pthread.c: System.Threading.Monitor internal calls
29386 * threads-types.h: New file, includes the system-specific thread
29389 * threads-pthread-types.h:
29390 * threads-pthread-types.c: New files, handle pthread-specific
29391 synchronisation types
29393 * threads-dummy-types.h:
29394 * threads-dummy-types.c: New files of dummy support for
29395 thread-specific types
29399 * pedump.c: include mono-endian.h not endian.h
29401 * Makefile.am: More threads files.
29402 Name mono-endian.h not endian.h
29404 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
29406 * Makefile.am, reflection.h, reflection.c: move here the reflection related
29407 stuff and implement a few more bits.
29408 * icall.c: a field needs to be dereferenced twice. Do not use the same
29409 name for two variables in the same scope.
29410 * image.c, image.h: cleanups.
29412 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
29414 * class.c (mono_class_metadata_init): bug fix: compute the right size
29416 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
29418 * icall.c: implemented some of the Reflection internalcalls.
29419 * image.c, image.h: start writing out the PE/COFF image.
29420 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
29421 that does the reverse than decode_blob_size ().
29422 * object.c: use mono_metadata_encode_value (). Move here
29423 temporary implementation of mono_string_to_utf8 ().
29424 * rawbuffer.c: make malloc_map static.
29426 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29428 * metadata.c: fix type comparison for arrays.
29429 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
29430 Added a couple of new classes to monodefaults.
29431 * icall.c: added a couple of Reflection-related internalcalls.
29432 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
29433 Added a byval_arg MonoType to MonoClass.
29435 2001-09-28 Dick Porter <dick@ximian.com>
29438 * threads-pthread.h:
29439 * threads-pthread.c: Implemented internal calls for
29440 LocalDataStoreSlot operations. Applied mutexes around all shared
29441 data. Reworked the thread creation and Start() operations to
29442 avoid a race condition.
29445 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
29447 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
29449 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
29451 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
29453 * class.c, loader.c: warn and return NULL instead of erroring out.
29454 * icall.c: added System.AppDomain::getCurDomain().
29455 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
29457 2001-09-25 Dick Porter <dick@ximian.com>
29459 * threads-pthread.h:
29460 * threads-pthread.c: Implemented timed thread joining and added
29461 System.Threading.Thread::Join_internal internal call
29463 * icall.c: Added System.Threading.Thread::Join_internal internal call
29466 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
29468 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
29470 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
29471 mono_string_intern () to implement the semantics of the ldstr opcode
29472 and the interning of System.Strings.
29473 * icall.c: provide hooks to make String::IsIntern and String::Intern
29476 2001-09-23 Dick Porter <dick@ximian.com>
29479 * threads-dummy.h: New files of dummy threading routines
29481 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
29482 support code based on system specifics
29484 Rename PTHREAD_LIBS to THREAD_LIBS
29486 2001-09-23 Dick Porter <dick@ximian.com>
29488 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
29489 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
29491 (mono_thread_init): Set up a Thread object instance to return when
29492 the main thread calls Thread.CurrentThread
29493 (mono_thread_cleanup): Wait for all subthreads to exit
29495 * icall.c: New internal calls for System.Threading.Thread::Sleep
29496 (including Schedule) and CurrentThread
29498 * threads.h: New file, to insulate thread-specific stuff from the
29501 2001-09-21 Dick Porter <dick@ximian.com>
29503 * threads-pthread.h:
29504 * threads-pthread.c: New file, for handling pthreads-style
29505 threading support. Start() now starts a new thread and executes
29506 the ThreadStart delegate instance.
29508 * icall.c: Added the internalcall for
29509 System.Threading.Thread::Start_internal
29511 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
29513 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
29515 * loader.c: work around the different signatures for delegates
29516 constructors csc generates in compiled code vs the ones compiled in mscorlib.
29518 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
29520 * class.h, class.c: add mono_class_get_field_from_name ().
29521 * *: Fix C comments and other ANSI C issues.
29523 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
29525 * endian.h, assembly.c: fix some endianness issues.
29527 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
29529 * loader.h, load.c: add delegate_class to mono_defaults.
29530 Handle runtime provided methods in mono_get_method ().
29532 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
29534 * loader.c (mono_get_method): use pinvoke for internal call
29536 * icall.c: use pinvoke for internal call
29538 * loader.c (method_from_memberref): set the method name
29540 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
29542 * metadata.c: help the compiler generate better code for
29543 mono_class_from_mono_type ().
29545 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
29547 * class.c (mono_class_metadata_init): delayed computing of the
29548 class size to mono_class_metadata_init ()
29550 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
29552 * class.c, class.h: add an interfaces member to MonoClass.
29553 * image.c, image.h: add assembly_name field to MonoImage
29554 from the assembly table.
29555 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
29557 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
29559 * class.c: Handle Array in mono_class_from_mono_type ().
29560 * metadata.c, pedump.c: some endian fixes.
29562 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
29564 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
29565 * metadata.c: fix small problem introduced with the latest commit.
29567 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
29569 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
29570 We don't need a MonoMetadata pointer anymore to compare signatures in
29571 mono_metadata_signature_equal (), update callers.
29572 Reduced memory usage an number of allocations for MonoMethodHeader and
29573 MonoMethodSignature.
29575 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
29577 * metadata.c: added compare for szarray.
29579 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
29581 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
29582 and add a couple more types to it and mono_defaults. Give an hint on
29583 classes that need implementing in our corlib and are referenced
29586 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
29588 * class.h, class.c: keep track if a class is also an Enum.
29589 * loader.c: Implement a couple more types for use in libffi
29590 marshalling. Gives better diagnostics when failing to dlopen
29591 a library. Set method->klass for P/Invoke methods, too.
29593 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
29595 * class.c, class.h: add a MonoType this_arg to MonoClass that
29596 represents a pointer to an object of the class' type that
29597 can be used by the interpreter and later the type cache.
29598 Add best guess alignment info for valuetype objects.
29600 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
29602 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
29603 into MonoType: one less level of indirection and allocation and
29604 simplifies quite a bit of code. Added cache for MonoTypes that are
29605 used frequently, so that we don't need to allocate them all the time.
29607 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
29609 * class.c (mono_class_create_from_typedef): System.Enum is also a
29610 value type, although it does not derive from System.ValueType
29611 (maybe a bug in the ms compiler?)
29613 * metadata.c (mono_type_size): return the right size for value types
29615 * loader.c (mono_get_method): only initialize method header if not abstract
29617 * class.c (mono_class_from_mono_type): use mono_default values.
29619 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
29621 * *: use MonoClass pointers instead of <type_tokens>
29623 * class.h: new flag: metadata_inited.
29625 * class.c (mono_class_metadata_init): impl.
29626 (mono_class_instance_size): impl.
29627 (mono_class_data_size): impl.
29629 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29631 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
29632 MonoClass now has the name and name_space fields.
29633 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
29634 mono_get_method () takes and optional MonoClass as argument.
29635 Removed mono_typedef_from_name() and added mono_class_token_from_name()
29636 instead that takes advantage of a map from class names to typedef
29637 tokens in MonoImage.
29639 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
29641 * metadata.c: zero is not a valid alignment boundary.
29642 Merge MONO_TYPE_VOID in default decoding code.
29644 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
29646 * image.h: merged MonoMetadata into MonoImage
29648 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
29649 identify the type of elements.
29651 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
29653 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
29654 * cil-coff.h: split MonoMSDOSHeader and add size info.
29655 * image.c: add some consistency checks.
29656 * metadata.c: fix row size computation: one programmer
29657 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
29658 add explanation for the locator routine.
29659 Fix decoding of size in method header.
29661 2001-08-20 Miguel de Icaza <miguel@ximian.com>
29663 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
29664 (g_concat_dir_and_file): Bring g_concat_dir_and_file
29665 function from gnome-libs. This uses the right path separator
29666 based on the OS, and also works around a bug in some systems where
29667 a double slash is not allowed.
29668 (default_assembly_name_resolver): Use g_concat_dir_and_file
29669 (mono_assembly_open): ditto.
29671 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
29673 * metadata.c (mono_metadata_signature_equal): impl.
29675 * *: void is now a realy MonoType (instead of using NULL)
29677 * metadata.c (do_mono_metadata_parse_type): use
29678 mono_metadata_parse_type to parse void value.
29680 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
29682 * metadata.c, metadata.h: in the signature and method header store
29683 only the space required for holding the loca vars and incoming arguments.
29685 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
29687 * metadata.c (do_mono_metadata_parse_type): treat void like any
29688 other type (instead of assigning NULL);
29690 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
29692 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
29694 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
29696 * image.c (do_mono_image_open): added a cache for arrays.
29698 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
29700 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
29701 decode a single column from a row in a metadata table and changes
29702 to take advantage of it in the typedef locator (gives a nice speed up).
29703 Store offset info for function params.
29705 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
29707 * image.h (MONO_IMAGE_IS_CORLIB): removed
29709 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
29711 * assembly.c: how could mono_assembly_close () had ever worked?
29712 * metadata.c, metadata.h: provide offset info for local vars.
29713 Implement mono_type_size () to take care of alignment as well
29714 as size (it was mono_field_type_size in cli/class.c before).
29716 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
29718 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
29720 * assembly.h (CORLIB_NAME): set to corlib.dll
29722 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
29724 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
29726 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
29727 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
29728 tokentype.h: massive namespace cleanup.
29730 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
29732 * metadata.h, metadata.c: decode exception clauses when parsing method header.
29734 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
29736 * metadata.c (mono_metadata_free_type): added check for type !=
29737 NULL (void) before calling mono_metadata_free_type()
29739 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
29741 * metadata.h, row_indexes.h: added header with enumerations to use
29742 to index in the columns from tables in metadata and to decode coded
29743 tokens: we should start using this instead of embedding magic numbers
29746 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
29748 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
29749 Move metadata_t info from cli_image_info_t to MonoImage, where
29750 it's easily accessible. Changed all the uses accordingly.
29751 Added the method and class caches to MonoImage.
29752 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
29753 and mono_metadata_decode_value () signature to be more consistent
29754 with the other parse functions (and simplify code). Taken advantage
29755 of zero-length array allocation with GCC. Removed reduntant (and
29756 wrong) MonoFieldType struct and use MonoParam instead. Changed
29757 mono_metadata_parse_field_type () to use common code for parsing.
29758 Added mono_metadata_typedef_from_field () and
29759 mono_metadata_typedef_from_method () to lookup a typedef index from a
29760 field or method token.
29761 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
29763 2001-07-23 Miguel de Icaza <miguel@ximian.com>
29765 * metadata.c (mono_metadata_parse_field_type): Implement.
29766 (do_mono_metadata_parse_type): Split engine from
29767 mono_metadata_parse_type, so that we can create smaller structures
29768 for things that just have one pointer to the MonoType (look at
29771 2001-07-20 Miguel de Icaza <miguel@ximian.com>
29773 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
29774 as Jan Gray found out, it is incorrect.
29776 2001-07-18 Miguel de Icaza <miguel@ximian.com>
29778 * assembly.c: Implement asssembly loading. This loads an image
29779 and loads all the referenced assemblies. Come to think of it, we
29780 could always do lazy loading of the assemblies.
29782 * image.c (mono_image_open): Keep loaded images in a hashtable.
29784 * image.h (MonoImage): Add reference count.
29786 2001-07-17 Miguel de Icaza <miguel@ximian.com>
29788 * assembly.c (mono_assembly_open): Keep track of the file name in
29789 case the assembly has no ASSEMBLY table.
29791 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
29794 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
29796 * metadata.c, metadata.h: decode local vars in method header
29797 parse function. Change callers accordingly.
29799 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
29801 * metadata.h, cil-coff.h: protect against multiple inclusion.
29802 Added some new structures to hold information decoded from metadata:
29803 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
29804 and relevant decoding/free functions.
29805 * metadata.c: implement decoding functions. Add warning for out of bounds
29806 index in mono_metadata_locate(). Implement mono_get_method () to retreive
29807 all the info about a method signature and invocation. Remove check on
29808 uninitialized local var in parse_mh() and fix memory leak.
29810 2001-07-12 Miguel de Icaza <miguel@ximian.com>
29812 * metadata.h: More macros.
29814 * tokentype.h: New file.
29816 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
29818 * assembly.c: added a consistency check and initialize
29819 some structures with g_new0().
29820 * metadata.c: fixed a couple more bugs in table size computation
29821 and add other checks for out-of bound access to metadata.
29823 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
29825 * metatada.c: fix bugs computing table sizes. Spew a
29826 warning when index in string heap is out of bounds.
29828 2001-07-04 Miguel de Icaza <miguel@ximian.com>
29830 * metadata.h: Add a couple of macros to manipulate tokens.
29832 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
29834 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
29835 cli_section_tables).
29837 2001-07-01 Miguel de Icaza <miguel@ximian.com>
29839 * metadata.c (mono_metadata_user_string): New function, provides
29840 access to the UserString heap.
29842 2001-06-27 Miguel de Icaza <miguel@ximian.com>
29844 * metadata.c: Add inline documentation.
29846 2001-06-26 Miguel de Icaza <miguel@ximian.com>
29848 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
29851 2001-06-22 Miguel de Icaza <miguel@ximian.com>
29853 * typeattr.h: New file, TypeAttribute flags.
29855 2001-06-21 Miguel de Icaza <miguel@ximian.com>
29857 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
29858 mono_assembly_ensure_section): Section loading code.
29859 (load_section_tables): Load the sections.
29861 * mono/metadata/metadata.c (mono_metadata_locate_token,
29862 mono_metadata_locate): Functions to locate the information
29863 definition given a token or a table and an index.
29864 (mono_metadata_compute_table_bases): New.
29865 (compute_size): New function to compute the sizes of the various
29868 * mono/metadata/metadata.h: Finish listing the different index
29871 * mono/metadata/pedump.c: Improve to dump new information.
29873 2001-06-19 Miguel de Icaza <miguel@ximian.com>
29875 * mono/metadata/metadata.c: Entered all the tables matching
29878 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2