2009-02-16 Zoltan Varga <vargaz@gmail.com>
[mono-debugger.git] / mono / metadata / ChangeLog
blobc3929be43ca2ab621809720655f99d2d88c3f83c
1 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3         * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
4         (mono_domain_alloc0): Ditto.
6 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
8         * loader.c (method_from_memberref): Don't abort if the array
9         method is not found. A regular loader failure is more informative
10         and correct.
12         Fixes #474271.
14 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
16         *loader.c: Guard MonoImage::method_cache/methodref_cache
17         using the image lock instead of the loader lock.
19         * metadata.h: Add comments about which fields are protected by
20         the image lock.
22 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
24         * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
26         * generic-sharing.c (mono_method_construct_object_context): Remove the
27         wrapper_type == NONE assert, it is not needed.
29 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
31         * reflection.c (clear_cached_object): New helper function.
32         (mono_method_clear_object): New function to clear the cached reflection
33         objects for a dynamic method.
35         * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
36         Partly fixes # 463323.
37         
38 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
40         * class.c:
41         * loader.c:
42         * reflection.c: Remove all explicit uses of MonoImage::property_hash.
44 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
46         * image.c: Add mono_image_property_(lookup,insert,remove) functions that
47         take the image lock instead of the loader lock.
49         * metadata-internals.h: Export new functions.
51 2009-02-12  Miguel de Icaza  <miguel@novell.com>
53         * domain.c (app_config_parse): Remove another use of stat that is
54         not necessary as g_file_get_contents already does the presence
55         check. 
57 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
59         * cominterop.c icall-def.h: Fix the DISABLE_COM build.
61         * marshal.c: Move the bstr handling code to cominterop.c.
63         * marshal.c: Remove some COM interop code missed previously.
65 2009-02-12  Miguel de Icaza  <miguel@novell.com>
67         More Paolo patches from the Wii port:
68         
69         * security.c: Remove ves_icall_System_Environment_get_UserName
70         from here.
72         * icall.c: And put ves_icall_System_Environment_get_UserName
73         here. 
75         * appdomain.c (mono_set_private_bin_path_from_config): Remove
76         redundant call to stat that was only used to test for the file
77         existence.   Patch from Paolo.
79         * gc.c (run_finalize): If COM is disabled, do not link in
80         mono_marshal_free_ccw.
82         * generic-sharing.c: Use alloca.h here as well.
84 2009-02-13 Rodrigo Kumpera  <rkumpera@novell.com>
86         * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
88 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
90         * cominterop.c cominterop.h: New files.
92         * marshal.c: Move the COM interop related code to cominterop.c. Make a few
93         function/typedefs which are needed by cominterop.c global.
95 2009-02-12  Mark Probst  <mark.probst@gmail.com>
97         * generic-sharing.c: Don't take the loader lock to guard image
98         mempool allocs.
100 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
102         * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
103         called without the loader lock which is required to guard MonoImage:tokens.
105 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
107         * class.c:
108         * metadata.c:
109         * method-builder.c:
110         * marshal.c:
111         * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
113 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
115         * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
116         Rework the code to use regular mono_image_alloc/0.
118         * loader.c: Rework the code to use regular mono_image_alloc/0.
120         * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
122 2009-02-12  Bill Holmes  <billholmes54@gmail.com>
124         * object-internals.h : Fixing a typo in the 
125           MonoReflectionComVisibleAttribute struct.
127         * marshal.c (cominterop_com_visible): Check the implemented 
128           interfaces for ComImport.
130         * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls 
131           assume that bools should be treated as VARIANTBOOLs.
133         * marshal.c (emit_marshal_boolean): Adding cases for 
134           MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
136         * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to 
137           emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
139         * marshal.c (cominterop_get_ccw): For COM calls assume that bools
140           should be treated as VARIANTBOOLs.    
142         Code is contributed under MIT/X11 license.
144 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
146         * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
147         allocation with the image lock.
149 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
151         This patch is the last of a series to remove explicit reference of MonoImage::mempool
152         and use mono_image_alloc set of functions instead. This time we finish with reflection.c
154         * object.c: Add mono_string_to_utf8_image.
156         * object-internals.h: Export mono_string_to_utf8_image.
158         * reflection.c: Rework all explicit references to the the image mempool to go thought
159         the mono_image_alloc set of functions.
161 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
163         This patch is the third of a series to remove explicit reference of MonoImage::mempool
164         and use mono_image_alloc set of functions instead. This time we finish with marshal.c
165         and generics-sharing.c.
167         * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
168         as first argument. Note that this function remains broken as it doesn't perform locking around the
169         mempool allocation.
171         * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
173         * image.c: Add g_slist_append_image.
175         * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
176         the supplied image for allocation. Move code into mono_metadata_field_info_full.
178         * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
179         Fix all related code to do the same.
181         * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
183         * metadata-internals.h: Fix the signatures.
185 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
187         This patch is the second of a series to remove explicit reference of MonoImage::mempool
188         and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
189         and similar to work using MonoImage.
191         * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
192         MonoMemPool.
194         * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
196         * class.c (mono_metadata_signature_deep_dup): Same.
198         * class.c (inflate_generic_type): Same.
200         * class.c (mono_class_inflate_generic_type_with_mempool): Same.
202         * metadata.c (mono_metadata_signature_dup_full): Same.
204         * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from 
205         mono_metadata_signature_dup_full.
207         * metadata.c (mono_metadata_type_dup): Same.
209         * marshal.c: Pass the image to calls to mono_metadata_type_dup.
211         * reflection.c: Same.
213         * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
215         * metadata-internals.h: Fix the signatures.
217         * class-internals.h: Same.
219 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
221         This patch is the first of a series to remove explicit reference of MonoImage::mempool
222         and use mono_image_alloc set of functions instead. 
224         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
225         Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
226         of a MonoMemPool.
228         * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
230         * class.c (g_list_prepend_mempool): Removed.
232         * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
234         * image.c: Add g_list_prepend_image.
236         * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
238         * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
241 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
243         * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
244         mono_image_unlock.
246         * image.c (mono_image_init): Init the lock field.
248         * image.c (mono_image_init): Cleanup the lock field.
250         * image.c: Add mono_image_(un)lock functions.
252 2009-02-11  Mark Probst  <mark.probst@gmail.com>
254         * class.c, class-internals.h: mono_method_get_context_general()
255         combines the functionality of mono_method_get_context() and
256         mini_method_get_context().
258         * generic-sharing.c, domain-internals.h:
259         mono_method_construct_object_context() and
260         mono_domain_lookup_shared_generic() moved from mini.
262         * icall.c (ves_icall_InternalInvoke): Handle the case where the
263         method doesn't have the correct instantiation because it's shared
264         generic code.  Fixes #473999.
266 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
268         * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
270         * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
271         
272 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
274         * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
276         * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
278         * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
279         and recheck the cache for dups after it.
281         * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
283         Fixes one of the deadlocks found in #473150.
285 2009-02-11  Bill Holmes  <billholmes54@gmail.com>
287         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
288           For Win32, add additional break conditions for accept.
290         Code is contributed under MIT/X11 license.
292 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
294         * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
295         lazily initialize the native wrapper cache.
296         (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
297         cache, since they are different from the normal wrappers.
299         * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
301         * metadata-internals.h (struct _MonoImage): Add a new wrapper for
302         AOT compiled native wrappers.
304 2009-02-09  Geoff Norton  <gnorton@novell.com>
306         * appdomain.h:
307         * security-core-clr.c: Allow enabling core-clr from the embedding
308         API.
310 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
312         * socket-io.c: when requesting all the local ips, if there are no
313         interfaces up and running, MS returns 127.0.0.1.
315 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
317         * mono-perfcounters-def.h: processor time is an inverse time.
318         Fixes bug #468625.
320 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
322         * socket-io.c: an empty host name returns the list of local IPs.
323         Fixes bug #386637 part 1/2.
325 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
327         * verify.c (mono_class_interface_implements_interface): Call
328         mono_class_setup_interfaces ().
329         (merge_stacks): Ditto.
331 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
333         * class.c (mono_class_setup_interfaces): New function to lazily initalize
334         klass->interfaces.
335         (mono_generic_class_get_class): Don't initalize klass->interfaces.
336         (mono_generic_class_get_class): Ditto.
338 2009-02-06  U-QUACK\miguel  <miguel@quack>
340         * icall-defs.h: Include also the Encrypt/Decrypt string methods as
341         they live in security.c
343         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
344         another bit from Paolo's code.
346 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
348         * object.c (build_imt_slots): Add a small optimization to avoid inflating
349         methods which will be discarded by add_imt_builder_entry ().
351         * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
352         need to be boxed.
354         * loader.c: Add a statistics for the size of the memberref signature cache.
355         
356         * loader.c (find_cached_memberref_sig): New helper function.
357         (cache_memberref_sig): Ditto.
359         * loader.c: Cache the result of parsing memberref signatures, since otherwise
360         they will be parsed again for every generic instantiation, leading to unbounded
361         memory growth.
363 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
365         * loader.c (mono_get_method_from_token): Avoid creating class for the generic
366         parameters of generic methods.
368         * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
369         after the original method is copied to the inflated method.
370         (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
372         * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
373         field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
375         * class.c metadata.c: Update after the changes above.
377 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
379         * metadata-verify.c: Simplified error handling and added
380         section table validation.
382 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
384         * class-internals.h (MonoClassExt): New structure containing rarely used
385         fields of MonoClass.
386         (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
387         through a new 'ext' field.
389         * class.c (mono_class_alloc_ext): New helper function to allocate 
390         class->ext.
392         * class.c metadata.c reflection.c: Update after MonoClass structure changes.
394 2009-02-05  Mark Probst  <mark.probst@gmail.com>
396         * object.c (mono_object_get_virtual_method): Properly inflate
397         generic methods.  Fixes #472692.
399 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
401         * class.c (mono_class_create_from_typedef): The CLR supports SystemF
402         recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
403         for the parent type, the created type must be ready to be used on a generic
404         instantiation.
405         We fill this_arg/byval_arg if the parent is a generic instance to make sure
406         we won't have duplicated entries in generic_inst_cache.
408         Fixes #469553.
410 2009-02-05  Miguel De Icaza  <miguel@novell.com>
412         * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
413         replace with plain BSD per the comments on the bug MONO77637.
415 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
417         * class.c (mono_class_get_generic_class): New accessor function.
418         (mono_class_get_generic_container): Ditto.
420         * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
421         fields, similar to the ones in MonoMethod.
423         * class.c (mono_generic_class_get_class): Set klass->is_inflated.
424         (mono_class_create_from_typedef): Set klass->is_generic if needed.
426         * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
427         
428         * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
429         the same information as element_class->byval_arg.
431         * class.c reflection.c: Remove references to class->byval_arg.
433         * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing 
434         klass->enum_basetype directly.
436         * verify.c metadata.c object.c icall.c reflection.c: Use 
437         mono_class_enum_basetype () instead of accessing klass->enum_basetype 
438         directly.
440 2009-02-04  Miguel de Icaza  <miguel@novell.com>
442         * icall-def.h: Remove internal calls for sockets when
443         DISABLE_SOCKET is defined, file system writing features when the
444         OS only support reading and not writing data and Policy support if
445         the Policy is disabled.
446         
447         * image.c (do_mono_image_open): Apply Paolo's patches for using
448         mono_file_map_ APIs here.
450         * assembly.c: Add support for platforms to avoid prefix
451         auto-detection. 
453 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
455         * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
456         warning.
458         * class.c (mono_class_inflate_generic_class): New helper function.
460         * class.c: Use mono_class_inflate_generic_class in a few places. Add
461         statistics for inflated methods/classes.
463         * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
465         * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
466         the call is made from Delegate.CreateDelegate () for the invoke method of
467         a delegate.
469         * loader.c: Add a statistics for the memory occupied by inflated signatures.
471         * metadata.c (mono_metadata_signature_size): New helper function.
473         * class.c (mono_class_get_method_from_name_flags): Add an optimization for
474         generic instances.
476         * metadata.c (inflated_method_in_image): Avoid calling 
477         mono_method_signature () if the method does not already have a signature.
479 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
481         * verify.c (is_compatible_boxed_valuetype): When checking if the boxed 
482         valuetype is compatible with target type, check by inheritance as a
483         VT is not really compatible with System.ValueType, for example.
485         * verify.c (do_invoke_method): Improve error message.
487         * verify.c (do_box_value): If boxing a nullable, use the type argument
488         on stack instead.
490         * verify.c (do_newobj): Improve error message.  
492         Fixes #469549.
494 2009-02-03  Miguel de Icaza  <miguel@novell.com>
496         * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
498 2009-02-03  Mark Probst  <mark.probst@gmail.com>
500         * generic-sharing.c: Don't hold domain lock when calling
501         instantiate_other_info().  Fixes #471958.
503         * domain-internals.h, loader.c: Describe locking policy of domain
504         lock vs loader lock.
506 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
508         * verify.c (mono_delegate_signature_equal): Make it possible to check
509         first-arg-bound delegates to static method.
511         * verify.c (verify_delegate_compatibility): Correctly verify delegates to
512         static methods with the first arg bound.
514         Fixes #469529.
516 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
518         * verify.c: Added stack_slot_full_name to provide decent and more meanfull
519         errors.
521         * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
522         under strict mode. Any type, when boxed can be seen as a reference type.
524         Fixes #469528.
526 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
528         * object.h: The lower bound of an array is a signed integer value.
529         Introduce mono_array_lower_bound_t typedef. It should be used instead of
530         gint32 as under MONO_BIG_ARRAYS it will be a gint64.
532         * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
533         calculate the upper bound.
534         
535         Fixes #471252.
537 2009-02-02  Miguel de Icaza  <miguel@novell.com>
539         From Paolo's work, refactored, cleared up:
540         
541         * threadpool.c, icall.c: ifdef code that requires a working socket
542         stack.
544         * metadata.c (mono_metadata_field_info): Do not attempt to return
545         a value from a function declared as void.
547         * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
548         from the console stack.
550         * assembly.c: use strrchr instead of rindex.
552         * class.c, object.c, marshal.c, icall.c, reflection.c: include
553         alloca.h on systems that have it.
555         * environment.c: Avoid code that uses stuff from
556         HAVE_SYS_UTSNAME_H
557         
558         * appdomain.c: Include sys/time.h.
560         * console-io.c: include sys/ioctl.h if it is available.
562 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
564         * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
566         * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
567         the method builder.
569         * marshal.c: Set mb->skip_visibility instead of setting it on the method
570         after it was created and cached, as the later is not thread safe.
571         
572 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
574         * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
575         called while the debugging module is not initialized. Fixes #471669.
577 2009-02-02 Rodrigo Kumpera  <rkumpera@novell.com>
579         * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
581         Fixes #471255.
583 2009-02-02  Mark Probst  <mark.probst@gmail.com>
585         * generic-sharing.c (lookup_or_register_other_info): Make sure the
586         loader lock is not taken while the templates lock is held.  Fixes
587         #471089.
589 2009-02-02  Mark Probst  <mark.probst@gmail.com>
591         * metadata.c (type_in_image): Added a check to fix a monodis
592         crash.
594 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
596         * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
597         nullable arguments.
599         * object.c (mono_runtime_invoke_array): Ditto.
600         
601         * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
602         freeing wrappers of dynamic methods.
604         * loader.c (mono_free_method): Call it. Fixes #463323.
605         
606         * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
607         methods taking vtype/byref arguments, to fix yet another bug caused by
608         the sharing of runtime invoke wrappers. Partly fixes #471259.
610 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
612         * debug-mono-symfile.c (check_line): Return NULL instead of returning
613         <first file in file table>:1 when the IL offset does not have an associated
614         line number.
616 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
618         * mono-debug.c (mono_debug_lookup_locals): New function to return local
619         variable info for a method.
621         * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
622         
623 2009-01-30  Jb Evain  <jbevain@novell.com>
625         * pedump.c: reuse code from monodis to make sure pedump honors
626         MONO_PATH, which is needed to verify net_2_1 assemblies.
628 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
630         * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
631         there is no line number info.
633 2009-01-29  Raja R Harinath  <harinath@hurrynot.org>
635         Avoid some MonoType allocations
636         * reflection.c (mono_reflection_initialize_generic_parameter):
637         Reuse MonoType from param->pklass rather than allocating one.
638         (mono_dynamic_image_free): Update to changes.
640 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
642         Rearrange some code to improve consistency
643         * reflection.c (mono_reflection_setup_generic_class): Move body ...
644         (mono_reflection_initialize_generic_parameter): ... here.
646 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
648         * generic-sharing.c (has_constraints): Enable gshared for methods/classes
649         with type constraints as an experiment.
651         * boehm-gc.c (on_gc_notification): Update mono_stats.
653 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
655         Avoid some allocations
656         * class-internals.h (_MonoGenericInst::type_argv): Convert from
657         pointer to tail array to avoid extra allocation.
658         * metadata.c (free_generic_inst): Update to changes.
659         (mono_metadata_get_generic_inst): Likewise.  Use alloca instead of
660         on-stack struct.
662 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
664         * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
665         return TRUE if the two type objects are the same.
667 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
669         * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
670         (mono_class_native_size): Use klass->marshal_info->min_align instead of
671         klass->min_align, since klass->min_align contains the managed alignment,
672         while the native alignment can be different, like for longs on x86.
673         Fixes #469135.
675         * class-internals.h (MonoMarshalType): Add a min_align field.
677 2009-01-26 Rodrigo Kumpera  <rkumpera@novell.com>
679         * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
680         the 1.0 format.
682 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
684         * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
685         some comments about the usage of the used_regs field.
687         * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
688         Fixes #469217.
690 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
692         * appdomain.c: return NULL instead of throwing FileNotFoundException
693         when LoadAssembly() fails.
695 2009-01-23  Mark Probst  <mark.probst@gmail.com>
697         * metadata.c (mono_metadata_generic_param_equal): Only compare the
698         image if the owner is NULL.  Fixes the AOT failures.
700 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
702         * metadata.c (mono_metadata_load_generic_params): Initialize the 
703         MonoGenericParam structure using memset so the image field is initialized
704         as well.
706 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
708         * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
709         a plain store.
711 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
713         * class.c (mono_class_setup_vtable_general): In the generic instance
714         optimization, set method->slot for abstract virtual methods. Fixes part of
715         #467834.
717 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
719         * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
720         which signals that the unloading has started but all appdomain services must
721         remain operational.
723         * appdomain.c (mono_domain_unload): The initial state for unloading now
724         is unloading_start and we switch to unloading after the managed call to
725         AppDomain::DomainUnload has finished.
727         The new unloading state has to be created because managed code in the
728         DomainUnload event can depend on things like the threadpool still working.
729         The domain must remain fully functional while the event executes.
731         This shown as an issue due to Process::WaitForExit, which waits for
732         async reads of stdout and stderr to complete. Since those are processed
733         in the threadpool the code deadlocks because the DomainUnload callback 
734         waits for the async read finished event, which should have been set by a
735         threadpool job but has been discarded due to the domain been in unload
736         state.
738 2009-01-21  Mark Probst  <mark.probst@gmail.com>
740         * metadata.c (mono_metadata_generic_param_equal): Owner as well as
741         image must match.
743 2009-01-21  Mark Probst  <mark.probst@gmail.com>
745         * reflection.c (resolve_object): For fields, inflate the class and
746         then get the field in the inflated class.
748 2009-01-20  Mark Probst  <mark.probst@gmail.com>
750         * object-internals.h (struct _MonoException): Added a comment
751         explaining the new use of trace_ips.
753 2009-01-20  Mark Probst  <mark.probst@gmail.com>
755         * generic-sharing.c (inflate_other_data): Inflate array methods
756         correctly.
758         * loader.c, class-internals.h: Rename search_in_array_class() to
759         mono_method_search_in_array_class() and make it non-static.
761 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
763         * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
764         Hopefully fixes #458168.
766 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
768         * object.c (mono_raise_exception): Remove call to InterlockedIncrement
769         as it is performed elsewhere.
771         Code is contributed under MIT/X11 license
773 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
775         * mono-perfcounters-def.h: Add counters for asp.net requests total and
776         requests queued.
777         * object.c (mono_raise_exception): Increment the exceptions total
778         counter when an exception is thrown.
779         * class-internals.h: Add a location for storing the total number of
780         asp.net requests served.
781         * mono-perfcounters.c: Implement update support for asp.net counters
782         from the class libraries. Implement read support for asp.net counters
783         and exceptions total counter.
785 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
787         * loader.c (search_in_array_class): Call mono_class_setup_methods () before
788         accessing klass->methods. Fixes #467385.
790 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
792         * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
793         for byval arguments without an [Out] attribute. Fixes #467212.
795         * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com). 
796         Fix compilation under android.
797         
798         * sgen-gc.c: Instead of scanning gray objects after all roots have been 
799         processed, scan them directly after they are copied, to achieve better locality
800         and cache usage.
802         * socket-io.c: Applied patch from Koushik Dutta
803         (koush@koushikdutta.com). Disable IPV6 when running under android.
805 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
807         * icall.c (ves_icall_InternalExecute): Add write barriers.
809         * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
810         the GC code.
812         * sgen-gc.c: Implement write barriers in IL code.
814 2009-01-17  Geoff Norton  <gnorton@novell.com>
816         * image.c: Avoid trying to walk the reference table of dynamic assemblies.
818 2009-01-17  Geoff Norton  <gnorton@novell.com>
820         * image.c: When unloading the image->references table, there can be gaps
821         in it.  Ensure that we iterate every entry to avoid leaking assembly references
822         when unloading an appdomain.
824 2009-01-16  Zoltan Varga  <vargaz@gmail.com>
826         * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
827         speed up ptr-in-nursery checks.
829         * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
830         threads_lock () to prevent deadlocks.
832         * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
833         does not need to be scanned during minor collections, since writes to it
834         must use write barriers.
836 2009-01-15 Rodrigo Kumpera  <rkumpera@novell.com>
838         * metadata-verify.c: Add pe nt header verification.
839         
840 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
842         * gc.c: Fix a few warnings when using SGEN.
844 2009-01-14 Rodrigo Kumpera  <rkumpera@novell.com>
846         * metadata-verify.c: Add pe optional header verification.
848 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
850         * sgen-gc.c: Add support for user defined marker functions, used by
851         MonoGHashTable to avoid registering a GC root for every hash node.
853 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
855         * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
856         non-pinned roots into separate hashes to avoid having to traverse them
857         in functions which are only interested in one kind.
859 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
861         * metadata-verify.c: Add pe header machine field verification.
862         
863 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
865         * metadata-verify.c: Add pe header size verification.
867 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
869         * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
870         using the GC, they don't contain references.
872         * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
874 2009-01-13  Geoff Norton  <gnorton@novell.com>
876         * appdomain.c|h: Expose mono_domain_unload to the embedding api so that 
877         AppDomains created on the native side can be cleaned up on the native side.
879 2009-01-13  Geoff Norton  <gnorton@novell.com>
881         * appdomain.c: Ensure that we call mono_context_init for the embedding api
882         as well as the managed api.
884 2009-01-13  Geoff Norton  <gnorton@novell.com>
886         * appdomain.h|c: New API for creating a MonoDomain in the embedding api
887         with a MonoAppDomain initialized against it.
889 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
891         * reflection.c (MOVING_GC_REGISTER): Fix a warning.
892         
893         * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
895         * marshal.c: Avoid setting the exception clauses after a method has been entered 
896         into the wrapper caches. Fixes #465700.
898         * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
899         method builder.
900         (mono_mb_create_method): Set the clauses from the method builder.
902 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
904         * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
905         Patch from Makoto Kishimoto.
907 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
909         * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by 
910         encoding them as ROOT_DESC_COMPLEX.
911         (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
913 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
915         * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
916         no longer point to the nursery.
918         * sgen-gc.c: Add a few comments/FIXMEs.
919         
920         * sgen-gc.c: Implement scanning of the alloc_pinned objects.
922         * marshal.c (mono_marshal_get_synchronized_wrapper): Make the 
923         initialization of the various _method variables thread safe. Fixes
924         #465377.
926 2009-01-12  Mark Probst  <mark.probst@gmail.com>
928         * domain.c, domain-internals.h: Remove the shared_generics_hash
929         and its lookup functions.
931 2009-01-12  Bill Holmes  <billholmes54@gmail.com>
933         * socket-io.c:  Fixing the MSVC build. 
935         Code is contributed under MIT/X11 license.
937 2009-01-12 Rodrigo Kumpera  <rkumpera@novell.com>
939         * metadata-verify.c: Add pe header watermark verification.
941 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
943         * metadata-verify.c: Add lfanew verification.
945 2009-01-12  Jb Evain  <jbevain@novell.com>
947         * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
948         METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
950 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
952         * socket-io.c: Fix the build.
954         * environment.c: Fix an #ifdef.
956 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
958         * threadpool.c (async_invoke_thread): Handle the wait function returning
959         WAIT_IO_COMPLETION as well.
960         (async_invoke_io_thread): Ditto.
962 2009-01-09  Bill Holmes  <billholmes54@gmail.com>
964         * threads.c: Fixing the Windows build.
966         Code is contributed under MIT/X11 license.
968 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
970         * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
971         interrupt a wait.
972         (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
973         the thread to wait again.
975 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
977         * metadata-verify.c: Initial skeleton of the metadata verifier.
979         * pedump.c: Add support for the metadata verifier.
981         * verify-internal.h: Export the whole assembly metadata verifier function.
983 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
985         * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
987 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
989         * Makefile.am: Upgrade dtrace-prelink.sh location.
991 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
993         * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
994         well. Otherwise the shutdown deadlock that happens on unix will can happen
995         as well.
996         If the main thread code finishes too fast it's possible that the finalizer
997         thread won't have executed yet, won't record itself as the finalizer thread
998         and the shutdown sequence will wait on it forever.
1000 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
1002         * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
1003         with MSVC.
1005 2009-01-08  Miguel de Icaza  <miguel@novell.com>
1007         * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
1008         Robert Jordan for pointing this out.
1010 2009-01-08  Christian Prochnow  <cproch@seculogix.de>
1012         * icall.c
1013         * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
1014         ves_icall_System_IO_DriveInfo_GetDriveType.
1016 2009-01-07  Miguel de Icaza  <miguel@novell.com>
1018         * icall.c: Wrap calls to mono_strtod in CriticalSection
1019         invocations when using eglib, to work around #464316.
1021 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
1023         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
1024         return value of GetCurrentDirectory to never access unitialized memory.
1026 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
1028         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
1029         return value of GetCurrentDirectory and expand the buffer if needed.
1031         Fixes #459094.
1033 2009-10-07 Tom Hindle  <tom_hindle@sil.org>
1035         * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) : 
1036           Adding a call to mono_init_com_types.
1038         Code is contributed under MIT/X11 license.
1040 2009-01-07  Geoff Norton  <gnorton@novell.com>
1042         * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on 
1043         darwin.  Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
1044         ai_canonname can be null in some cases on darwin, where the runtime assumes it will 
1045         be the value of the ip buffer.
1047 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
1049         * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
1050         interfaces_packed here.
1052         Fixes part of #463294.
1054 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
1056         * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
1058         Fixes part of #463294.
1060 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
1062         * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
1063         is a boxed complex as well.
1065         Fixes part of #463294.
1067 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
1069         * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
1070         control if a methodspec should be created for the generic method definition from external assemblies.
1071         Caching of methodspec is done using the handleref hash table.
1073         Fixes #462592.
1075 2009-01-05 Rodrigo Kumpera  <rkumpera@novell.com>
1077         * loader.c (find_method): When searching the interfaces of a class
1078         check the transitive closure of implemented interfaces.
1080         Fixes #463303.
1082 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
1084         * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
1085         
1086 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
1088         * class.c (get_implicit_generic_array_interfaces): Extract valuetype
1089         interfaces calculation to fill_valuetype_array_derived_types.
1091         * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
1092         ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
1093         for example.
1095         * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
1096         interfaces for valuetypes if needed.    
1098         * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
1099         for their basetype as well. Types are array expanded if rank is > 0.
1101         Fixes #400716.
1103 2008-12-30  Bill Holmes  <billholmes54@gmail.com>
1105         * socket-io.h : Changing the signature of
1106           ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
1107           the blocking state.
1109         * icall-def.h :  Changing the signature of
1110           System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
1112         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
1113           For Windows only.  Avoid blocking when calling accept by
1114           querying for a connection via select.  The loop also queries
1115           the thread state every 1000 micro seconds for the thread
1116           stop state.  This will avoid the process hanging on shutdown
1117           when using a TcpChannel that is never connected to.
1119         Code is contributed under MIT/X11 license.
1121 2008-12-30  Marek Safar  <marek.safar@gmail.com>
1123         * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
1125 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
1127         * class.c (get_implicit_generic_array_interfaces): Extract common
1128         code to a helper function making it a lot easier on the eyes.
1130 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
1132         * class.c (get_implicit_generic_array_interfaces): If the internal
1133         enumerator is an interface inflate System.Object instead of itself.
1135         Fixes #461261.
1137 2008-12-24 Rodrigo Kumpera  <rkumpera@novell.com>
1139         * object.c (mono_runtime_invoke_array): Don't assert with
1140         byref nullable types.
1142         * marshal.c (mono_marshal_get_runtime_invoke): To handle
1143         byref nullables we unbox the object and store it on the
1144         stack. 
1145         We can't use the boxed object since it is the T of Nullable<T>
1146         and the boxed representation of a nullable it's underlying type
1147         or null.
1148         We could cheat and create a boxed nullable and use the same
1149         machinery of other byref VTs but this feels like a hack and
1150         using the stack has the bonus of reducing heap pressure.
1152         Fixes #461941.
1154 2008-12-23 Rodrigo Kumpera  <rkumpera@novell.com>
1156         * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
1157         return value.
1159         Fixes #461867.
1161 2008-12-19  Bill Holmes  <billholmes54@gmail.com>
1163         * icall-def.h : Adding an internal call definition for 
1164           System.Environment.internalBroadcastSettingChange.
1166         * icall.c : Adding a Windows only implementation to broadcast a 
1167           WM_SETTINGCHANGE when an environment variable has changed.
1169         Code is contributed under MIT/X11 license.
1171 2008-12-19  Mark Probst  <mark.probst@gmail.com>
1173         * class.c, class-internals.h: Made
1174         mono_class_has_parent_and_ignore_generics() non-static.
1176 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
1178         * image.c: deal with the mmap failing when loading an image.
1180 2008-12-17  Geoff Norton  <gnorton@novell.com>
1182         * threadpool.c: Ensure that the io_queue_lock is initialized
1183         in all circumstances, as we always attempt to cleanup against it.
1185 2008-12-17  Miguel de Icaza  <miguel@novell.com>
1187         * icall.c (ves_icall_System_Environment_get_Platform): For
1188         compatibility reasons for existing client code we will keep
1189         returning 4 for a while.   
1191         For how long will depend on the documentation being updated, and
1192         for us to give client code a chance to be updated.
1194         This reverts the original decison on #433108 since we did not
1195         catch roughly 33 instances of the broken code in our own source
1196         code base, we did not catch failures on the buildbots, and QA did
1197         not bring this as a problem.
1199         Only today I found some customer's code breaking due to our own
1200         class libraries not being fully updated and tracked it down to
1201         this change.  I am reverting it because if we could not even get
1202         our story straight in our own code base, how can we hope that our
1203         end user code be fixed?
1205         As of this morning, our Wiki page that documents how to detect
1206         Unix had not been fixed.    
1208 2008-12-16  Zoltan Varga  <vargaz@gmail.com>
1210         * metadata.c (inflated_method_in_image): Add a workaround for #458168.
1212         * class.c (mono_class_get_fields): Handle loading errors.
1214 2008-12-12 Mark Mason <mmason@upwardaccess.com>
1216         * 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.
1217         
1218 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
1220         * mono-perfcounters.c: avoid warning.
1222 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
1224         * reflection.c (ensure_runtime_vtable): Work on generic instances and
1225         make sure all interfaces have MonoClass::interface_id set.
1227         * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
1228         method table is property set.
1230 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
1232         * class.c: New function mono_class_setup_interface_id that setup
1233         MonoClass::interface_id if needed.
1235         * class-internals.h: Export new function.
1237 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
1239         * class.c: Add code to sanity check the vtable after setup_vtable_general
1240         has done it's work.
1242 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1244         * icall.c: make Assembly.GetExecutingAssembly work properly when
1245         reflection is used to invoke the method.
1246         Bug #321781 fixed.
1248 2008-12-11  Mark Probst  <mark.probst@gmail.com>
1250         * metadata/generic-sharing.c: Look for constraints in all type
1251         arguments, not just the first one.
1253 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1255         * appdomain.c: return the correct CodeBase for an Assembly instance
1256         that was loaded from the shadow-copy directories.
1257         Bug #458190 fixed.
1259 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
1261         * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
1263         * sgen-gc.c (check_object): New debugging helper function.
1265         * object.c: Fix calls to mono_value_copy_array ().
1267 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
1269         * class.c (mono_class_setup_fields): If working on an inflated class
1270         first check if the generic definition did init with success.
1272         Fixes #445361.
1274 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
1276         pedump.c (main): Fix a warning.
1278 2008-12-10  Bill Holmes  <billholmes54@gmail.com>
1280         * object-internals.h : Adding a definition for 
1281           MonoReflectionComVisibleAttribute.
1283         * marshal.c (cominterop_com_visible) :  Method added to check the 
1284           ComVisible attribute of a class.
1286         * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :  
1287           cominterop_raise_hr_exception added to consolidate common code 
1288           to raise hr exceptions.
1290         * marshal.c (cominterop_can_support_dispatch) :  Method added to determine 
1291           if a managed class should support IDispatch.
1293         * marshal.c 
1294           (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :  
1295           Added additional checks for managed object when getting 
1296           an IDispatch interface.
1298         Code is contributed under MIT/X11 license.
1300 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
1302         pedump.c (main): Handle mono_get_method () returning NULL. 
1304 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
1306         * marshal.h: Fix a warning.
1308 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
1310         * marshal.c : Adding cominterop_release_all_rcws to release all
1311           runtime callable wrappers held by the runtime.
1313         * marshal.h : Adding declaration for cominterop_release_all_rcws.
1314           
1315         Code is contributed under MIT/X11 license.
1317 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
1319         * metadata.c (mono_image_alloc_lock): New helper function.
1320         (mono_image_alloc0_lock): Ditto.
1322         * metadata.c: Use the alloc_lock () helper functions for allocating
1323         memory from the image mempool.
1325 2008-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
1327         * class.c (mono_class_from_generic_parameter): Document it's
1328         locking behavior. Fix double checked locking here, we stored in
1329         param->pklass a partially initialized MonoClass and no membar was used.
1331 2008-12-05  Marek Habersack  <mhabersack@novell.com>
1333         * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
1334         (3) functions are present in the C library use them to do the
1335         job. If they are absent, make sure that the sum of int_part and
1336         dec_part is rounded before returning. This is necessary due to the
1337         division of dec_part by the power of 10 before the final addition
1338         is performed - if the result is not rounded in some cases it will
1339         yield invalid results.
1341 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
1343         * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
1344         wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR 
1345         instruction instead of a pointer constant.
1347 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
1349         * loader.c (mono_method_get_header): Do most of the work outside the
1350         loader lock, to avoid assembly load hook deadlocks.
1352         * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
1353         (mono_metadata_parse_type_full): Ditto.
1355 2008-12-02 Rodrigo Kumpera  <rkumpera@novell.com>
1357         * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
1358         Make the stack depth fixed. Ensure proper argument passing to the backtrace
1359         funtions. Finally, use a lock to produce well ordered output.
1361         The lock looks silly, as all calls to the corlib mempool should be guarded
1362         with the loader lock, but for some reason this fact doesn't help. 
1364         * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
1366 2008-12-02  Mark Probst  <mark.probst@gmail.com>
1368         * socket-io.c: 64 bit big-endian fixes.
1370 2008-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
1372         * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
1373         targets that require strict compatibility between the types.
1375         * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
1376         to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
1377         Kill the strict argument and create a new one valuetype_must_be_boxed.
1379         * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
1380         state that all valuetypes must be boxed.
1382         Fixes #448560.
1384 2008-11-29  Kornél Pál  <kornelpal@gmail.com>
1386         * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
1387         IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
1389         Contributed under MIT/X11 license.
1391 2008-11-28 Rodrigo Kumpera  <rkumpera@novell.com>
1393         * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
1394         the inflate_generic_type machinery should handle it.
1396         This avoids a crash when the field's flags is zero and it's type is
1397         a primitive.
1398         What happens is that mono_metadata_parse_type_full will see that opt_attrs
1399         is zero and will return one of the cached built-in primitive types. Since
1400         those types live in read-only memory, the code that copies it crashes.  
1402 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1404         * object.c: Don't put function descriptors into generalized IMT
1405         thunks.
1407 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1409         * class.c: Enable generic code sharing on PPC64.
1411 2008-11-27  Mark Probst  <mark.probst@gmail.com>
1413         * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
1414         from mini/mini.c.
1416         * generic-sharing.c: Allocate the method template slists from the
1417         image mempool so it doesn't leak.
1419 2008-11-27 Rodrigo Kumpera  <rkumpera@novell.com>
1421         * class.c (generic_array_methods): Release the linked list.
1423 2008-11-27  Mark Probst  <mark.probst@gmail.com>
1425         * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
1426         invocation to g_utf16_to_utf8().
1428 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1430         * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
1431         arguments on big endian archs.
1433 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1435         * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
1436         the type name (test added in corlib).
1438 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1440         * pedump.c: initialize perf. counters. Fixes a segv.
1442 2008-11-25  Martin Baulig  <martin@ximian.com>
1444         * mono-debug-debugger.c
1445         (mono_debugger_runtime_invoke): Return the exception object if an
1446         exception was thrown.  Visual Studio displays the exception object
1447         in the locals window.
1449 2008-11-24  Mark Probst  <mark.probst@gmail.com>
1451         * mini-trampolines.c (mono_delegate_trampoline): Don't return a
1452         ftnptr.
1454 2008-11-24  Mark Probst  <mark.probst@gmail.com>
1456         * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
1457         MONO_TYPE_U are sizeof (gpointer), too.
1459 2008-11-24  Mark Probst  <mark.probst@gmail.com>
1461         * marshal.c (mono_type_native_stack_size): Fixed size and
1462         alignment for reference types.
1464 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1466         * class.c (mono_class_generic_sharing_enabled): Disable generic
1467         code sharing for PPC64.
1469 2008-11-21 Rodrigo Kumpera  <rkumpera@novell.com>
1471         * icall.c (mono_method_get_equivalent_method): Make sure
1472         method->klass->methods is inited before looping over it.
1474 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1476         * object.c: when calling ExecuteAssembly in a newly created domain,
1477         the configuration file and application base are already set up.
1478         Bug #446353 take 2 fixed.
1480 2008-11-20  Zoltan Varga  <vargaz@gmail.com>
1482         * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
1483         Fixes #444715. Fix a warning.
1485 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
1487         * appdomain.c: write the full path of the assembly to the .ini file
1488         created when "shadow-copying"
1489         Bug #446353 fixed.
1491 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1493         * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
1494         if signature==FALSE.
1496 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
1498         * marshal.h : Fix the cygwin build.
1499            marshal.c:12442: undefined reference to `_IID_IMarshal'
1500           
1501         Code is contributed under MIT/X11 license.
1503 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
1505         * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
1506           free threaded marshaler when QueryInterface is called on a COM callable
1507           wrapper requesting the IMarshal interface.
1508           
1509         Code is contributed under MIT/X11 license.
1511 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1513         * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
1515         * reflection.c (mono_type_get_object): Special case the very common
1516         void type.
1518         * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
1519         hold typeof(void).
1521 2008-11-13  Bill Holmes  <billholmes54@gmail.com>
1523         * process.h : Adding method declaration for
1524           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1525           
1526         * process.c : Adding implementation for
1527           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1528           
1529         * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
1530           to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
1532         Code is contributed under MIT/X11 license.
1534 2008-11-10  Rodrigo Kumpera  <rkumpera@novell.com>
1536         * appdomain.c (unload_thread_main): Clean up threadpool by
1537         calling mono_thread_pool_remove_domain_jobs.
1539         * domain-internals.h (struct _MonoDomain): Add new fields to
1540         help coordinate the cleanup of the threadpool.
1542         * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
1543         that cleans up the threadpool of all jobs associated with an appdomain.
1544         It does that by cleaning up the queues and making sure all active
1545         threads are accounted.
1547         * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
1548         unloaded or in the process of. Take this is such way that there is
1549         no race condition between another thread starting the unload and the
1550         current thread acknowledging it.
1552         * threadpool.c (async_invoke_thread): Same.
1554         * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
1555         firing the new thread.
1557         * threadpool.c (start_tpthread): Same.
1559         * theadpool.c (append_job): Increment threadpool_jobs before queueing.
1561         * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
1563 2008-11-06  Jonathan Chambers  <joncham@gmail.com>
1565         * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle): 
1566         Add support for DuplicateHandle.
1567         
1568         * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
1569         Add support for DuplicateHandle.
1570         
1571         * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
1572         Add support for DuplicateHandle.
1574         Code is contributed under MIT/X11 license.
1576 2008-11-06  Mark Probst  <mark.probst@gmail.com>
1578         * class-internals.h: Make min_align into a whole byte.
1580         * class.c: Set min_align for SIMD types to 16.
1582 2008-11-05  Geoff Norton  <gnorton@novell.com>
1584         * attach.c: Default the attacher to enabled for all cases including
1585         embedded.
1587 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1589         * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
1590         change r117650.
1592 2008-11-04  Mark Probst  <mark.probst@gmail.com>
1594         * monitor.c, monitor.h: New function for querying offsets of
1595         members of MonoThreadsSync.
1597 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
1599         * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
1600         to speed up this function and to avoid the boundless memory growth caused by
1601         the signature_dup () calls.
1603 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
1605         * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
1606         wrapper.
1608         * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
1609         by 1 bit.
1611         * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
1613 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
1615         * appdomain.c:
1616         * domain-internals.h: made mono_set_private_bin_path_from_config()
1617         "internal".
1618         * object.c: call the above function after setting the configuration
1619         file path for the root domain.
1620         Fixes bug #314478.
1622 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
1624         * assembly.c: when the assembly is loaded from an absolute path, end
1625         basedir with a directory separator.
1626         Bug #440781 fixed.
1628 2008-10-30  Mark Probst  <mark.probst@gmail.com>
1630         * monitor.c (mono_monitor_get_fast_enter_method): If
1631         CompareExchange is not available, don't create the fastpath
1632         instead of asserting.  (The method is missing in the 1.1 profile.)
1634 2008-10-30  Mark Probst  <mark.probst@gmail.com>
1636         * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
1638         * monitor.c, monitor.h: Code for generating Monitor.Enter and
1639         Monitor.Exit IL fastpaths.
1641 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
1643         * class.c (mono_class_create_from_typedef): Added Vector2ul.
1645 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
1647         * class.c (mono_class_create_from_typedef): Added Vector2l.
1649 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
1651         * class.c (mono_class_create_from_typedef): Added Vector2d.
1653 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1655         * appdomain.c: translate \ into / for cache_path.
1656         * domain-internals.h: new mono_is_shadow_copy_enabled().
1657         * icall.c: (fill_reflection_assembly_name) do the same path
1658         manipulations that get_code_base does.
1659         (get_code_base) use mono_is_shadow_copy_enabled.
1661 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1663         * appdomain.c: shadow-copied assemblies go to CachePath +
1664         ApplicationName when both are set. DynamicBase has nothing to do with
1665         shadow copies.
1666         Bug #406877 fixed.
1668 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
1670         * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
1671         STANDALONESIG table.
1673         * metadata-internals.h (struct _MonoDynamicImage): Add cache for
1674         standalone signatures.
1676         * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature 
1677         comparison code: instead of comparing the signatures using a custom
1678         equals function, transform them to a common signature and compare that. This
1679         works better with AOT.
1681 2008-10-25  Zoltan Varga  <vargaz@gmail.com>
1683         * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
1685         * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
1686         call for generic instances.
1687         (mono_class_setup_properties): Call setup_properties () before accessing
1688         gklass->properties.
1690         * class.c (mono_class_get_virtual_methods): New helper function to iterate
1691         over the virtual methods of a class using metadata if possible, avoiding the
1692         creation of MonoMethod's for non-virtual methods.
1693         
1694         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
1695         get_virtual_methods () to iterate over the virtual methods of classes.
1697 2008-10-25  Martin Baulig  <martin@ximian.com>
1699         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
1701 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
1703         * class.c (mono_class_create_from_typedef): Added Vector4i.
1705 2008-10-24  Mark Probst  <mark.probst@gmail.com>
1707         * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
1708         ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
1709         special-casing applies to eliminate the call completely.
1711 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
1713         * class.c (mono_class_create_from_typedef): Added Vector8s.
1715 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
1717         * class.c (mono_class_create_from_typedef): Added Vector16sb.
1719 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
1721         * icall.c: get rid of annoying warning.
1723 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
1725         * threadpool.c: in 1.x, if you change the background status of the
1726         threadpool thread, it's not reset.
1727         Remove unnecessary calls to SetState.
1729 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1731         * threadpool.c: asynchronously create a set of idle threads upon first
1732         use of the threadpool. SetMinThreads will now start the appropriate
1733         number of idle threads if they are not already running. The default is
1734         1 threadpool thread per CPU. Increased the maximum number of threads
1735         per CPU to 10.
1737 2008-10-22  Martin Baulig  <martin@ximian.com>
1739         Revert r116521 from Zoltan, it breaks the debugger:
1741         * class.c (mono_class_get_virtual_methods): New helper function to iterate
1742         over the virtual methods of a class using metadata if possible, avoiding the
1743         creation of MonoMethod's for non-virtual methods.
1744         
1745         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
1746         get_virtual_methods () to iterate over the virtual methods of classes.
1748 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1750         * threads.c: when creating a threadpool thread, set its state to
1751         'background'.
1752         * threadpool.c: reset the background state of a threadpool thread
1753         after finishing each work item
1754         Bug #437888 fixed.
1756 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
1758         * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
1759         
1760         * class.c (mono_class_setup_vtable_general): Add an optimized version for
1761         generic instances which works by inflating the methods in the container
1762         class's vtable.
1764         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
1765         variant which doesn't make a copy if no inflation was done.
1766         (mono_class_setup_fields): Use it.
1768         * metadata.c (mono_metadata_get_shared_type): New helper function to
1769         return a shared instance of a given MonoType.
1771         * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
1772         a copy of most non-generic types.
1774 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1776         * threadpool.c: remove one more GetSystemInfo () call.
1778 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
1780         * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
1781         use the code in mono-proclib.h to get processor information.
1783 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
1785         * appdomain.c: fixed the logic that determines whether assemblies in a
1786         directory are "shadow-copied" or not. Bug #433483 fixed.
1788 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
1790         * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
1791         warning.
1793 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
1795         * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
1796         returning a vtype.
1798         * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
1799         reflection.c: Use mono_field_get_name () for accessing a field's name.
1801         * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
1802         class.c
1804         * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
1805         field.
1807         * loader.c (find_method_in_class): Reenable the metadata optimization by
1808         not using it for generic instances.
1810         * class-internals.h (MonoFieldDefaultValue): Extract the rarely used 
1811         data/def_type fields from MonoClassField into a separate structure.
1812         (struct MonoClassField): Remove data/def_type fields.
1813         (struct _MonoClass): Add a 'field_def_values' array to store the default
1814         values/RVA for fields.
1816         * class.c reflection.c: Update after the changes.
1817         
1818         * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
1819         for accessing field->data.
1821         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
1823         * loader.c (find_method_in_class): Revert the last change for now as
1824         it breaks Mono.C5 unit tests.
1826         * class-internals.h (struct _MonoDynamicGenericClass): Add fields
1827         'field_generic_types' and 'field_objects' which contain the information
1828         previously stored in MonoInflatedField.
1829         (MonoInflatedField): Delete.
1830         (struct _MonoClassField): Delete 'generic_info' field.
1832         * reflection.c: Store the information which was previously in 
1833         field->generic_info in MonoDynamicGenericClass instead.
1835         * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
1836         MonoClassField changes.
1838 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
1840         * marshal.c, method-builder.c: get rid of wrapper_hash and instead
1841         store the value inside the data array of the MonoMethodWrapper.
1842         This saves memory, is faster and fixes the lifetime issues (methods
1843         were never removed from the hash previously). May also fix bug#436996.
1845 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
1847         * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic 
1848         generic instances, compute the type from the generic definition instead of
1849         looking in field->generic_info.
1851         * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
1852         for inflated fields, the only user was get_fieldref_token () which no
1853         longer needs it.
1855         * class.c (mono_class_init): Revert the last change as it seems to cause
1856         crashes.
1858         * class-internals.h (struct _MonoClassField): Reorder fields to save 4
1859         bytes on 64 bit platforms.
1861         * object.c (mono_class_create_runtime_vtable): Fix a warning.
1862         
1863         * object.c (mono_class_create_runtime_vtable): Don't initalize
1864         field->data/field->def_type here, it is done lazily by 
1865         mono_class_get_field_default_value ().
1867         * icall.c (ves_icall_get_enum_info): Call 
1868         mono_class_get_field_default_value () instead of directly accessing
1869         field->data and field->def_type.
1871         * object.c (get_default_field_value): Ditto.
1873         * class.c (mono_field_get_data): Ditto.
1874         
1875         * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
1876         call for generic instances.
1878         * loader.c (find_method_in_class): If klass != from_class, then inflate
1879         the method with the context of from_class, since the caller assumes this.
1881 2008-10-20  Zoltan Varga  <vargaz@gmail.com>
1883         * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
1884         for accessing method->slot.
1886 2008-10-20  Cedric Vivier  <cedricv@neonux.com>
1888         * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
1890 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
1892         * class.c (mono_method_get_vtable_index): Use
1893         mono_method_get_vtable_slot () for accessing method->slot.
1895         * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
1896         accessing klass->methods.
1898         * class.c (mono_method_get_vtable_slot): New helper function.
1899         (mono_class_get_vtable_entry): Ditto.
1900         (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
1901         accessing method->slot.
1903         * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
1904         method to get_inflated_method ().
1906         * class.c (mono_class_get_inflated_method): New helper method to obtain
1907         a method of an inflated class without calling setup_methods ().
1908         (mono_class_get_cctor): Use get_inflated_method.
1910         * generic-sharing.c (mono_class_get_method_generic): Ditto.
1911         
1912         * marshal.c image.c: Lazily create all the marshal caches.
1914         * image.c (mono_image_init): Move initialization of runtime_invoke
1915         caches to marshal.c.
1917         * marshal.c (get_cache): New helper function to lazily initialize a 
1918         wrapper cache.
1919         (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
1921         * debug-helpers.c (mono_method_full_name): Include generic arguments.
1923 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
1925         * loader.c: fixed check for interface type.
1927 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1929         * appdomain.c: check for NULL setup before it's referenced.
1932 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1934         * class.c: remove the unused old vtable setup code.
1936 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1938         * class.c: don't depend on interface order in
1939         setup_interface_offsets (bug #435777).
1940         * reflection.c: sort the InterfaceImpl table (patch from
1941         Jb Evain  <jbevain@novell.com>).
1943 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
1945         * assembly.c (mono_assembly_open_full): Avoid loading images while holding
1946         the low level assemblies lock.
1948 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
1950         * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
1951         object.c, reflection.c, socket-io.c, threads.c: introduced
1952         mono_framework_version () to return the major framewrok version,
1953         changed the code that was using more complex patterns to use it.
1954         Return the correct value for PlatformID for OSX.
1956 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
1958         * icall-def.h, process.h, process.c: added an icall to get info about
1959         processes using mono-proclib.
1961 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
1963         * mono-perfcounters.c: use the mono-proclib functions to
1964         access process information.
1966 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1968         * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
1969         monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
1970         reflection.c: remove rawbuffer usage: mmap support is more sanely
1971         provided by utils/mono-mmap.
1973 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
1975         * gc.c: use posix semaphores when possible so that
1976         mono_gc_finalize_notify() is signal safe.
1978 2008-10-11  Zoltan Varga  <vargaz@gmail.com>
1980         * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
1981         #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
1982         be #ifdef-ed out, the linker will remove the rest.
1984         * marshal.c: Implement DISABLE_COM.
1986         * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
1988 2008-10-11  Miguel de Icaza  <miguel@novell.com>
1990         * locales.c (string_invariant_compare_char): Optimization: do not
1991         call g_unichar_type unless we actually need the information.
1993 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1995         * object.c, class-internals.h: Also create remoting trampolines
1996         for generic methods.  Pass the domain to the remoting trampoline
1997         creation function, too.
1999 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
2001         * class.c (mono_class_init): Fix+re-enable the finalize optimization.
2003 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2005         * class.c (mono_class_create_from_typedef): Vector4u was renamed to
2006         Vector4ui.
2008 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
2010         * assembly.c:
2011         * locales.c: remove the use of g_strdown. Fixes bug #322313.
2013 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2015         * assembly.c: in mono_assembly_load_friends() take the assemblies lock
2016         for the least possible amount of time (extending the fix in r113458).
2018 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2020         * class.c (mono_class_create_from_typedef): Retrofit to new type names.
2022 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2024         * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
2025         as possible simd intrinsic types.
2026         Optimized the test to check for the common prefix first.
2028 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
2030         * class.c: back out part of a broken optimization committed on
2031         May 23th (bug #433908).
2033 2008-10-09  Mark Probst  <mark.probst@gmail.com>
2035         * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
2036         Win32.  Should fix #432388 for most cases until we have the new
2037         profiler on Win32.
2039 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
2041         * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
2042         instead of using inst->id so the hash is stable for AOT.
2044 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
2046         * appdomain.c:
2047         * icall.c: create a .ini file for shadow-copied assemblies that
2048         contains the location of the original assembly. Use this to return the
2049         proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
2050         Also fix the number of '/' for windows when returning the CodeBase.
2051         Fixes bug #430920.
2053 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
2055         * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
2057         Code is contributed under MIT/X11 license.
2059 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
2061         * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
2062           if if the class vtable needs initialized.
2064         Code is contributed under MIT/X11 license.
2066 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
2068         * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) : 
2069           Adding default MonoMarshalSpecs for COM methods.  OBJECT->STRUCT,
2070           STRING->BSTR, and CLASS->INTERFACE.
2072         Code is contributed under MIT/X11 license.
2074 2008-10-07  Marek Habersack  <mhabersack@novell.com>
2076         * sysmath.h: changed the declaration of the
2077         ves_icall_System_Math_Round2 icall by adding an extra
2078         away_from_zero parameter.
2080         * sysmath.c (ves_icall_System_Math_Round2): added support for
2081         away from zero rounding. The icall now takes an extra boolean
2082         parameter to signal that away from zero operation is requested.
2084 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2086         * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
2087         the delegate klass so it can work with full-aot.
2088         (mono_marshal_get_delegate_end_invoke): Ditto.
2089         (mono_marshal_get_delegate_invoke): Ditto.
2091 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
2093         * gc.c, attach.h, attach.c: remove a bad pattern:
2094         add_finalizer_callback () is not implemented correctly, it can't
2095         without adding more overhead to the finalizer loop and it's not
2096         even needed, since we know exactly what we need to call, so there is
2097         no need to do so through an expensive function pointer.
2099 2008-10-04  Zoltan Varga  <vargaz@gmail.com>
2101         * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
2102         for the no-gc case.
2103         * attach.c (mono_attach_init): Remove the #ifdef.
2105 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
2107         * attach.c (mono_attach_init): Don't use
2108         mono_gc_add_finalizer_thread_callback when compiling without GC.
2109         Fixes #432306.
2110         
2111         Code is contributed under MIT/X11 license.
2113 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
2115         * class.c (mono_class_create_from_typedef): Remove the 
2116         #ifndef DISABLE_SIMD stuff.
2118 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
2120         * class-internals.h (MonoClass): Added simd_type bit field.
2122         * class.c (mono_class_create_from_typedef): Check if type is a simd
2123         intrinsic.
2125 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2127         * object.c (mono_method_add_generic_virtual_invocation): Only add
2128         instantiations to the thunk whose count is at least as large as
2129         the threshold.
2131 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2133         * icall.c: changed the Type of the exception thrown when trying to
2134         invoke a constructor on an abstract class. Part of the fix for bug
2135         #324185.
2137 2008-10-02  Mark Probst  <mark.probst@gmail.com>
2139         * class.c, class-internals.h (mono_method_get_vtable_index): New
2140         function which returns the index into the vtable and properly
2141         handles inflated virtual generic methods.
2143 2008-10-01  Mark Probst  <mark.probst@gmail.com>
2145         * object.c, domain.c, object-internals.h, domain-internals.h:
2146         Generalize IMT thunk machinery to also handle thunks for virtual
2147         generic method invokes.  When a virtual generic method is invoked
2148         more than a number of times we insert it into the thunk so that it
2149         can be called without lookup in unmanaged code.
2151         * generic-sharing.c, class-internals.h: Fetching a
2152         MonoGenericInst* for a method from an (M)RGCTX.
2154 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
2156         * marshal.c (emit_marshal_string): Applied a variant of a patch by
2157         tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
2158         marshalling. Fixes #431304.
2160 2008-10-01  Bill Holmes  <billholmes54@gmail.com>
2162         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
2163           handle when ref is specified without In or Out.
2165         Code is contributed under MIT/X11 license.
2167 2008-09-30  Mark Probst  <mark.probst@gmail.com>
2169         * loader.c (mono_get_method_constrained): Don't expand method with
2170         the class's context, because it's already a method of that class.
2172 2008-09-30  Atsushi Enomoto  <atsushi@ximian.com>
2174         * attach.c : should be correct build fix.
2176 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
2178         * attach.c: Fix the previous change.
2180 2008-09-29  Atsushi Enomoto  <atsushi@ximian.com>
2182         * attach.c : quick w32 build fix.
2184 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2186         * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
2187         crashes MonoDevelop: #430455.
2189 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
2191         * domain-internals.h (struct _MonoDomain): Move most fields used only by
2192         the JIT do MonoJitDomainInfo in ../mini/mini.h.
2194         * domain.c: Remove initialization/cleanup of the removed fields.
2196 2008-09-27  Mark Probst  <mark.probst@gmail.com>
2198         * class.c (mono_class_generic_sharing_enabled): Enable generic
2199         code sharing for PPC.
2201 2008-09-26  Bill Holmes  <billholmes54@gmail.com>
2203         * attach.c : Fixing the Windows builds.
2205         Code is contributed under MIT/X11 license.
2207 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
2209         * class.c (mono_class_generic_sharing_enabled): Experimentally change 
2210         the default generic sharing mode to 'all'.
2212 2008-09-25  Mark Probst  <mark.probst@gmail.com>
2214         * generic-sharing.c, class-internals.h: New function for checking
2215         whether a method needs a static RGCTX invoke wrapper.  A few
2216         funtions moved from mini/generic-sharing.c.
2218         * icall.c: New function used.
2220 2008-09-25  Mark Probst  <mark.probst@gmail.com>
2222         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
2223         Static RGCTX invoke wrapping applies to value type methods, too.
2225         * class.c (mono_class_setup_vtable_general): In generic-shared
2226         value types, wrap methods with a static RGCTX invoke wrapper.
2228 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
2230         * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
2231         osx build.
2233 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
2235         * gc.c (mono_gc_add_finalizer_thread_callback): New function to
2236         register a callback which is called when the finalizer thread is woken
2237         up.
2238         (finalizer_thread): Call the callback if it exists.
2240         * attach.h attach.c: New files, implementing the attach mechanism.
2242         * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
2243         
2244         * object.c (mono_object_get_virtual_method): Fix an assertion introduced
2245         by the previous change.
2247 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2249         * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
2250         loader.c, marshal.c, metadata-internals.h, metadata.c,
2251         method-builder.c, object.c, reflection.c: introduced specific functions
2252         to allocate from the domain and image mempools and cleaned up most of
2253         the code to use them (still missing a few in reflection.c).
2254         Keep the loader bytes counter updated.
2256 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
2258         * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
2259         loader-related counters.
2261 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
2263         * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
2264         added more MS-compatible counters.
2266 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
2268         * class.c (mono_class_setup_fields): Call setup_fields before accessing
2269         class->blittable. Fixes #428217.
2271 2008-09-21  Zoltan Varga  <vargaz@gmail.com>
2273         * reflection.c (mono_image_get_field_on_inst_token): Call 
2274         field_encode_signature () since that handles custom modifiers too.
2275         Fixes #424663.
2277 2008-09-20  Zoltan Varga  <vargaz@gmail.com>
2279         * reflection.c (add_custom_modifiers): New helper function to merge custom
2280         modifiers stored in objects to a MonoType.
2281         (fieldref_encode_signature): Encode custom modifiers.
2282         (mono_image_get_generic_field_token): Call add_custom_modifiers ().
2283         (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
2285 2008-09-19  Kornél Pál  <kornelpal@gmail.com>
2287         * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
2288         calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
2289         64-bit IL only images because imports are not resolved for IL only images.
2290         Special thanks to Bill Holmes for finding this bug and testing the patch.
2291         Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
2293         Contributed under MIT/X11 license.
2295 2008-09-19  Miguel de Icaza  <miguel@novell.com>
2297         * mono-config.c (dllmap_start): Add support for the bits keyword
2298         on dllentry and dllmap to easily detect 32 vs 64 bit systems.
2300 2008-09-19  Mark Probst  <mark.probst@gmail.com>
2302         * reflection.c (inflate_mono_method): When the class the method is
2303         to be inflated for is itself not inflated, just return the method.
2305 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
2307         * mono-perfcounters.c: use more user friendly process instance names.
2309 2008-09-18  Bill Holmes  <billholmes54@gmail.com>
2311         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
2312           handle "[in] ref" and "[in][out] ref" cases.
2314         * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
2315           to mono_mb_create_method.  This was causing problems calling native to
2316           managed passing Variants by value.
2318         Code is contributed under MIT/X11 license.
2320 2008-09-18  Zoltan Varga  <vargaz@gmail.com>
2322         * class.c (can_access_internals): Call mono_assembly_load_friends ()
2323         before accessing the friend_assembly_names field.
2325         * assembly.c (mono_assembly_load_friends): Make this callable multiple
2326         times.
2327         (mono_assembly_load_from_full): Avoid calling load_friends (), it is
2328         called lazily when it is needed.
2330         * metadata-internals.h (struct _MonoAssembly): Add 
2331         'friend_assembly_names_inited' flag.
2333 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
2335         * mono-perfcounters-def.h: fix the types of a few counters.
2336         * mono-perfcounters.c: implemented the instance names getter
2337         and a few bugfixes.
2339 2008-09-18  Atsushi Enomoot  <atsushi@ximian.com>
2341         * culture-info-table.h : regenerated.
2343 2008-09-17  Robert Jordan  <robertj@gmx.net>
2345         * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
2346         context bound objects. Fixes #415577.
2348         Code is contributed under MIT/X11 license.
2350 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
2352         * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
2353         implementation (bug #423582).
2355 2008-09-16  Zoltan Varga  <vargaz@gmail.com>
2357         * object.c (mono_object_get_virtual_method): Handle the case method->slot
2358         is not set. Fixes #426309.
2360 2008-09-16  Jb Evain  <jbevain@novell.com>
2362         * class.c (mono_class_from_name): fix the exported type look up
2363         when the type is defined in a referenced assembly.
2365 2008-09-16  Jb Evain  <jbevain@novell.com>
2367         * reflection.c (mono_image_fill_export_table_from_type_forwarders):
2368         increment the next index counter on each iteration to make that work
2369         for more than one type forwarder. Unmanaged part to fix #422929.
2371 2008-09-15  Mark Probst  <mark.probst@gmail.com>
2373         * object-internals.h: enum ComInterfaceType in
2374         MonoInterfaceTypeAttribute is guint32, not guint16.
2376 2008-09-12  Mark Probst  <mark.probst@gmail.com>
2378         * cil-coff.h, image.c, reflection.c: Endianness fixes in image
2379         writing code.
2381 2008-09-11  Mark Probst  <mark.probst@gmail.com>
2383         * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
2384         not gboolean.
2386 2008-09-11  Mark Probst  <mark.probst@gmail.com>
2388         * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
2389         Endianness fixes for MonoSymbolFileOffsetTable.
2391 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
2393         * process.c (complete_path) : Removing quotes from the 
2394           input path.  The glib file routines do not handle file paths
2395           that have quotes around them.
2397         Code is contributed under MIT/X11 license.
2399 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
2401         * socket-io.h : Adding a comment to provide locations where 
2402           changes to MonoSocketAsyncResult need to be synced.
2404         Code is contributed under MIT/X11 license.
2406 2008-09-10  Zoltan Varga  <vargaz@gmail.com>
2408         * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out 
2409         parameters as well. Fixes #425001.
2411 2008-09-08  Miguel de Icaza  <miguel@novell.com>
2413         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
2414         windows build.
2416 2008-09-07  Miguel de Icaza  <miguel@novell.com>
2418         * console-io.c: Add support for tracking the window size if it
2419         changes.
2421         The setup is very simple: the TtySetup function will now return a
2422         pointer to a location in memory that tracks the current console
2423         size.  The managed code checks its current value every time its
2424         queried against the last value set, and updates accordingly.
2426         With this setup we can work with multiple consoles, and we do not
2427         require to poke into managed code from a signal handler.
2429         Additionally, the environment for COLUMNS and LINES is now handled
2430         in unmanaged code.
2432         (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
2434 2008-09-07  Mark Probst  <mark.probst@gmail.com>
2436         * marshal.c (mono_type_native_stack_size): Treat
2437         MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
2439 2008-09-04  Jb Evain  <jbevain@novell.com>
2441         * class.c (mono_class_is_assignable_from): fix assignability of nullables
2442         to nullables.
2444 2008-09-03 Rodrigo Kumpera  <rkumpera@novell.com>
2446         * verify.c (verify_type_compatibility_full): Revert change
2447         to allow converting a native int to unmanaged pointer be verifiable
2448         under non-strict mode.
2449         It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
2451         * verify.c: Added some TODOs.
2453 2008-09-02  Bill Holmes  <billholmes54@gmail.com>
2455         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
2456           ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
2457           Changed to use GlobalAlloc for the memory returned on Windows platforms.
2459         Code is contributed under MIT/X11 license.
2461 2008-09-02  Jb Evain  <jbevain@novell.com>
2463         * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
2465 2008-09-02 Rodrigo Kumpera  <rkumpera@novell.com>
2467         reflection.c (typebuilder_setup_fields): Handle classes with
2468         explicit size.
2470 2008-09-01 Rodrigo Kumpera  <rkumpera@novell.com>
2472         class.c (mono_class_setup_events): Add memory barrier due to
2473         double checked locking.
2474         
2475         class.c (mono_class_setup_properties): Same.
2477 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
2479         * class.c (mono_class_is_assignable_from): Fix the build.
2480         
2481         * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
2482         before accessing klass->interface_bitmap. Fixes #421744.
2484 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
2486         * appdomain.c (mono_runtime_set_no_exec): New internal function setting
2487         the runtime into no-exec mode, useful when running the AOT compiler.
2489         * appdomain.c gc.c object.c: Avoid executing managed code when running
2490         in no-exec mode.
2491         
2492         * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
2494         * reflection.c (_mono_reflection_get_type_from_info): Handle the 
2495         special case when the mono_assembly_loaded () returns NULL because the 
2496         search hook is not installed.
2498 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
2500         * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
2501         crashes in bstr marshalling on linux.
2503 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
2505         * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
2506         with more than one parameter.
2508 2008-08-24  Miguel de Icaza  <miguel@novell.com>
2510         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
2511         start/stop flow control as well when turning off ICANON (allows
2512         C-s and C-q to be read by Console.ReadKey).
2514 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
2516         * class.c (mono_class_init): Move the initialization of nested classes
2517         into mono_class_get_nested_types (). Fixes #418433.
2519         * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
2520         flag.
2522         * class.c reflection.c icall.c: Use mono_class_get_nested_types () for 
2523         iterating tough the nested classes of a class.
2525 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
2527         * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
2528         on arm.
2530 2008-08-22  Miguel de Icaza  <miguel@novell.com>
2532         * console-io.c (sigcont_handler): Support signal chaining for
2533         SIGCONT.
2535         (console_set_signal_handlers): Use best practices with sigaction,
2536         clear the structure before using it. 
2538 2008-08-22  Robert Jordan  <robertj@gmx.net>
2540         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
2541         Fix the Windows build.
2543 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
2545         * class.c (mono_class_generic_sharing_enabled): Make the default
2546         sharing mode 'corlib'.
2548 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
2550         * console-io.c (console_set_signal_handlers): Fix a warning.
2552         * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
2553         method normally, the JIT will take care of avoiding recursion.
2555 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2557         * console-io.c : Fixing builds for platforms that do not have <termios.h>.
2559         Code is contributed under MIT/X11 license.
2561 2008-08-20  Miguel de Icaza  <miguel@novell.com>
2563         * console-io.c (sigcont_handler): We need to restore the entire
2564         termios state, not only the original settings, as things like echo
2565         can be controlled after this (Booish exposes this issue with its
2566         own ReadLine implementation).
2568         Additionally, we need to set the terminal back into keypad_xmit
2569         mode.
2570         
2571         (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
2572         string as a paramter as well.   Otherwise we get different
2573         keyboard sequences.
2575 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
2577         * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
2578         delegates with byref out parameter passing. Fixes #351520.
2580         * debug-helpers.c (mono_context_get_desc): New helper function to stringify
2581         a generic context.
2582         (mono_type_get_desc): Add the type arguments for GENERICINST.
2583         (mono_method_full_name): Stringify the class name using mono_type_full_name
2584         so it picks up generic arguments.
2586 2008-08-19  Gert Driesen  <drieseng@users.sourceforge.net>
2588         * console-io.c: Removed debug output.
2590 2008-08-19 Rodrigo Kumpera  <rkumpera@novell.com>
2592         reflection.c (mono_reflection_create_runtime_class): Alloc
2593         the nested classes linked list using the dynamic image mempool.
2594         Fixes leak in corlib compilation.
2596 2008-08-19  Miguel de Icaza  <miguel@novell.com>
2598         * console-io.c: Fix incredibly annoying behavior on the console
2599         after resuming execution after control-z.   This affected every
2600         console application.
2602 2008-08-18 Rodrigo Kumpera  <rkumpera@novell.com>
2604         * mempool-internals.h: Header for mono private mempool functions. The first
2605         two function are for allocating glib linked lists using pools.
2607         * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
2609         * Makefile.am: Added mempool-internals.h.
2611 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
2613         * domain.c (mono_domain_create): Call the JIT domain hook if installed.
2614         (mono_domain_free): Ditto.
2616         * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
2617         be used by the JIT to store its domain-specific information, instead of putting
2618         it directly into MonoDomain.
2620         * domain.c (mono_install_create_domain_hook): New helper function to install
2621         a hook which initializes domain->runtime_info.
2623         * domain.c (mono_install_free_domain_hook): Ditto.
2624         
2625 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
2627         * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
2628         asserting if the ares parameter is null.
2630         * mono-perfcounters.c: Fix warnings.
2632         * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
2633         is not needed, don't check for interruptions either.
2634         (mono_marshal_get_delegate_end_invoke): Ditto.
2636 2008-08-15  Marek Habersack  <mhabersack@novell.com>
2638         * mono-perfcounters.c (predef_readonly_counter): added support for
2639         reading the ASP.NET Requests Queued counter from another process.
2641 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2643         * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
2644         MonoImage to simplify the AOT code.
2646 2008-08-10  Zoltan Varga  <vargaz@gmail.com>
2648         * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
2649         marshalling. Fixes #416078.
2651 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2652         
2653         * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
2654         it is set, looking up the icall address is deferred to the JIT, since 
2655         in embedded scenarios, the icall might not be registered in the runtime
2656         doing the AOT compilation. Backported from the 2.0 branch.
2658 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2660         * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
2661         Fixes #415621.
2663 2008-08-05  Marek Habersack  <mhabersack@novell.com>
2665         * Makefile.am: added support for cross-compilation.
2667 2008-08-04  Zoltan Varga  <vargaz@gmail.com>
2669         * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
2671 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
2673         * mono-perfcounters.c: jitted methods and jitted bytes counters.
2675 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
2677         * class-internals.h, icall-def.h, mono-perfcounters-def.h,
2678         mono-perfcounters.c: performance counters implementation.
2680 2008-07-31  Zoltan Varga  <vargaz@gmail.com>
2682         * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
2683         to gpointer, letting the AOT code decide what to store in it.
2685 2008-07-31  Bill Holmes  <billholmes54@gmail.com>
2687         * marshal.c (cominterop_get_native_wrapper) : Adding a call to 
2688           mono_class_setup_methods if the methods are not initialized.
2690         Code is contributed under MIT/X11 license.
2692 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
2694         * verify.c: Remove some debug code I commited by accident.
2696         * verify.c (mono_method_is_valid_in_context): Change the return value
2697         to make possible to distinguish between invalid and unverifiable.
2699         * verify.c (verifier_load_method): Don't return NULL for unverifiable
2700         methods.
2702 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
2704         * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
2705         constraints. Fixes regression in gtest-253.
2707 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
2709         * verify.c (mono_verifier_verify_class): Don't allow generic types
2710         with explicit layout.
2712         * verify.c (mono_method_verify): Check locals and argument types.
2714 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
2716         * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
2717         wait if the thread is in StopRequested state.
2719         * class.c (mono_class_from_name): Refactor the module searching code into
2720         a separate function so it can be reused in the AOT case too.
2722 2008-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
2724         * verify.c (mono_type_is_valid_in_context): Improve the error message.
2725         Check both the type and it's generic type definition for loader errors.
2726         
2727         * verify.c (mono_method_is_valid_in_context): Don't generate another
2728         error when a type errors occur, this leads to the wrong exception been
2729         thrown.
2731 2008-07-28  Dick Porter  <dick@ximian.com>
2733         * icall-def.h
2734         * process.c
2735         (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
2736         New internal calls to duplicate and close a process handle.
2738 2008-07-27  Andreas Färber  <andreas.faerber@web.de>
2740         * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
2742 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2744         * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
2746 2008-07-27  Robert Jordan  <robertj@gmx.net>
2748         * class.c (mono_class_init): Don't compute class.has_finalize for
2749         valuetypes. Fixes #412477.
2751 2008-07-25 Rodrigo Kumpera  <rkumpera@novell.com>
2753         * verify.c: Implement constraint equivalence checking.
2754         This is required when a generic parameter is used as
2755         argument to a constrained one.
2757         Fixes #410637.
2759 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2761         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2763         * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
2765         * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
2766         synch with managed object layout.
2768 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
2770         * verify.c (do_branch_op): Handle valuetypes and generic
2771         arguments properly.
2773         * verify.c (do_cmp_op): Same.
2775         Fixes #410383.
2777 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2779         * generic-sharing.c: Fix memory leaks.
2781         * class.c, class-internals.h: Make
2782         mono_class_inflate_generic_type_with_mempool() non-static.
2784 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
2786         * pedump.c (dump_verify_info): Dump full class name.
2788 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2790         * generic-sharing.c: Removed some old code that didn't do anything.
2792 2008-07-24  Massimiliano Mantione  <massi@ximian.com>
2793         * profiler.c: Added runtime_initialized_event,
2794         mono_profiler_install_runtime_initialized and
2795         mono_profiler_runtime_initialized. This new hook tells the profiler
2796         when the runtime is sufficiently initialized to be able to call
2797         mono_thread_attach on the root appdomain.
2798         * profiler.h, profiler-private.h: Likewise.
2800 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
2802         * verify.c (do_cast): Do boxing for generic arguments as well.
2804         * class.c (is_nesting_type): Drop generic instantiations before
2805         checking for nesting.
2807         * class.c (can_access_instantiation): Allow access to generic
2808         arguments.
2810 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
2812         * verify.c (verify_class_for_overlapping_reference_fields):
2813         On some cases, the field size might be zero, guard against that.
2814         Fix the explicit layout check to work as expected.
2816 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2818         * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling 
2819         mono_thread_resume () during shutdown, since the thread we want to abort
2820         might be suspended.
2822 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2824         * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a 
2825         warning.
2827         * debug-mono-symfile.c: Fix a warning.
2829         * mono-perfcounters.c (get_cpu_times): Fix a warning.
2831         * object.c (mono_class_vtable): Check if exception_type is set, and return
2832         NULL as defined by the function comments.
2834 2008-07-22  Mark Probst  <mark.probst@gmail.com>
2836         * mempool.c: Use malloc for every single mempool allocation if the
2837         configure option is set.  This makes it easier to track mempool
2838         allocations with tools like Valgrind.
2840 2008-07-22  Jb Evain  <jbevain@novell.com>
2842         * reflection.c (create_dynamic_mono_image): emit the same
2843         metadata version that SL2 does when creating a SL2 image.
2845 2008-07-21 Rodrigo Kumpera  <rkumpera@novell.com>
2847         * icall-def.h:
2848         * icall.c: New icall System.Enum:get_hashcode. This function
2849         avoids the overhead of boxing the enum to the underlying type.
2851 2008-07-21  Mark Probst  <mark.probst@gmail.com>
2853         * reflection.c (mono_method_get_object): Don't let static RGCTX
2854         invoke wrappers get into MonoReflectionMethods.
2856 2008-07-17 Rodrigo Kumpera  <rkumpera@novell.com>
2858         * object-internals.h:
2859         * object.c: New mono_runtime_class_init_full function
2860         that makes throwing the exception optinal.
2862         * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
2863         for the case where the exception object is supplied.
2865 2008-07-16  Kornél Pál  <kornelpal@gmail.com>
2867         * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
2868         old ld versions.
2870         Contributed under MIT/X11 license.
2872 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
2874         * string-icalls.c (ves_icall_System_String_InternalSplit):
2875         Optimize array allocation by caching the MonoClass of the
2876         array type.
2878         * icall.c (ves_icall_Type_GetMethodsByName): Same.
2880         * reflection.c (mono_param_get_objects): Same.
2882 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
2884         * icall-def.h:
2885         * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
2886         It inflates the given type using the class context.
2888 2008-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
2890         * object.c (mono_class_try_get_vtable): New function. Tries to fetch
2891         the vtable if it already exists.
2893         * object-internals.h: Add mono_class_try_get_vtable as part of the
2894         internal API.
2896         * reflection.c (mono_type_get_object): Use the MonoObject from the
2897         vtable when possible. Reduces locking contention on reflection heavy
2898         code.
2900 2008-07-15  Zoltan Varga  <vargaz@gmail.com>
2902         * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
2903         g_bit_nth_msf () since that macro is not implemented in eglib.
2905 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
2907         * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
2908         on platforms which do not support it.
2910 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2912         * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
2914 2008-07-11  Martin Baulig  <martin@ximian.com>
2916         * mono-debug-debugger.h
2917         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
2919         * mono-debug-debugger.c
2920         (_mono_debugger_interruption_request): New global volatile variable.
2921         (mono_debugger_check_interruption): New public function.
2923         * threads.c
2924         (mono_thread_current_check_pending_interrupt): Call
2925         mono_debugger_check_interruption().
2926         (mono_thread_interruption_checkpoint_request): Likewise.
2928 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
2930         * verify.c: Add more type checks for loaded types. Verify the result
2931         handle from ldtoken.
2933 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
2935         * loader.c (field_from_memberref): Don't crash if the field
2936         wasn't found.
2938 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
2940         * verify.c: Verify if type and method instantiations
2941         don't have invalid VAR or MVAR arguments.
2943 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
2945         * verify.c: Fix double free of function pointer list.
2947 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
2949         * object.c (mono_string_to_utf8): Comment the new code as it
2950         breaks under eglib.
2952 2008-07-08 Rodrigo Kumpera  <rkumpera@novell.com>
2954         * object.c (mono_string_to_utf8): Avoid allocating a temp array.
2956 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
2958         * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
2959           is not throw too many times.
2961         Code is contributed under MIT/X11 license.
2963 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2965         * mono-debug.c (mono_debug_find_method): Allow this to be called even when
2966         debugging is turned off.
2968 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
2970         * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
2972 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2974         * class-internals.h, class.c: Added new generic sharing option:
2975         Share only stuff in System.Collections.Generic, which is now the
2976         default.
2978 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2980         * generic-sharing.c, class-internals.h: New function for getting a
2981         generic method in a generic class given the corresponding method
2982         for a different instantiation of the class.  Partly refactored
2983         from mini-trampolines.c.
2985         * class.c: Make sure generic methods have a class_inst if they are
2986         part of a generic class.
2988         * metadata.c (mono_type_stack_size_internal): Handle type
2989         variables.
2991 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2993         * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
2994         Signifies whether information on the this/vtable/mrgctx variable
2995         is available.
2997 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2999         * object.c, object-internals.h, icall.c: New function
3000         mono_delegate_ctor_with_method(), which does the same as
3001         mono_delegate_ctor(), but takes an explicit method argument
3002         instead of taking the method from the jit info.
3004         * marshal.c: When creating a delegate with an inflated method take
3005         the "this" argument as the target class for the castclass.
3007 2008-07-03  Mark Probst  <mark.probst@gmail.com>
3009         * domain.c (mono_jit_info_table_find): Fixed a bug that caused
3010         mono_jit_info_table_find() to perform very badly in some cases.
3012 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
3014         * icall.c (type_from_typename): Handle 'string'.
3016         * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
3017         wrappers into the wrapper_hash, since the key is not a MonoMethod.
3019 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
3021         * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
3023         * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
3024         number of available managed allocator types.
3026         * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
3027         (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
3029 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
3031         * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
3032         which is a low level lock protecting just the 'jit_code_hash' hash table.
3034         * domain.c: Initialize+cleanup jit_code_hash_lock.
3035         
3036 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
3038         * coree.c (mono_load_coree): Set coree_module_handle global variable only
3039         after initialization.
3041         * coree.h: Make MonoFixupExe internal.
3043         Contributed under MIT/X11 license.
3045 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
3047         * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
3048         because that is platform independent. Check NumberOfRvaAndSizes in PE32
3049         as well.
3050         (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
3051         image being loaded is a CLI image and _CorValidateImage gets called.
3053         * coree.h: Add MonoLoadImage.
3055         * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
3056         instead of LoadLibrary.
3058         Contributed under MIT/X11 license.
3060 2008-06-29 Rodrigo Kumpera  <rkumpera@novell.com>
3062         * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
3063         for any primitive type.
3065 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
3067         * object.c (mono_array_new_specific): Optimize this and the other allocation
3068         functions a bit.
3069         
3070         * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
3071         domains too if mono_dont_free_domains is set.
3073         * domain-internals.h (mono_dont_free_domains): New internal option controlling
3074         whenever to free appdomain data after it has been unloaded.
3076         * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
3077         
3078 2008-06-28  Zoltan Varga  <vargaz@gmail.com>
3080         * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
3081         (mono_method_get_equivalent_method): Fix a warning.
3083         * object.c (mono_message_init): Avoid looking up array types for each call.
3085 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
3087         * object.c (mono_message_invoke): Avoid looking up the object[] type for each
3088         call.
3090         * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
3091         even more.
3093         * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
3094         each iteration.
3096         * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
3097         fields of an enum.
3099 2008-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
3101         * object.c (mono_value_box): Fix boxing of nullables.
3103 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
3105         * assembly.c (mono_set_rootdir): Use __ImageBase instead of
3106         mono_module_handle that is defined by the linker; no initialization required.
3107         * coree.h: Remove mono_module_handle, add __ImageBase, update
3108         mono_image_open_from_module_handle.
3109         * coree.c (_CorValidateImage): Convert platform independent PE32 images to
3110         PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
3111         (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
3112         memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
3113         to 4 GB away from image base address. IA64 version is not tested but was very
3114         easy to implement and should work if we ever need it.
3115         * domain.c (mono_init_internal): Avoid system error message boxes.
3116         * image.c (mono_image_open_from_module_handle): Replace ref_count argument
3117         with has_entry_point. Handle do_mono_image_load fauilre correctly.
3118         (mono_image_open_full, mono_image_close): Use has_entry_point instead of
3119         coff_attributes that is a more reliable way to detect if _CorDllMain was called.
3120         * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
3122         Contributed under MIT/X11 license.
3124 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
3126         * class.c, class-internals.h: Export mono_class_get_generic_type_definition
3127         as part of the private mono API.
3128         
3129         * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
3130         Do proper argument checking for methods that belong to generic classes.
3131         Do proper type resolution for GMFH/2.
3132         Fixes #377324.
3133         
3134 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
3136         * verify.c (do_switch): Fix a memory corruption bug with
3137         the jump index is out of bound.
3139 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
3141         * verify.c: Disable debug code.
3143 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
3145         * reflection.c (mono_image_get_methodbuilder_token): Use
3146         mono_image_get_methodspec_token_for_generic_method_definition
3147         instead of mono_image_get_memberref_token. We cache more memberef
3148         entries now.
3150 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
3152         * verify.c: Inflate exception clause types.
3153         Fixes #402606.
3154         
3155 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
3157         * reflection.c (mono_image_get_methodbuilder_token): Don't leak
3158         name.
3160         * reflection.c (mono_image_get_ctorbuilder_token): Same.
3162         * reflection.c (mono_image_create_method_token): Same.
3164 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
3166         * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
3167         It does the same as mono_image_get_methodref_token but works on
3168         MethodBuilder.
3170         * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
3171         and always generate a methodspec. This follows the old behavior and fixes
3172         the regressions in System.Core. 
3174 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
3176         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where 
3177         don't event mono_class_get () succeeds. Fixes #402182.
3179 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
3181         * metadata-internals.h: Added MonoDynamicImage::methodspec
3182         hashtable to store methodspec tokens created for MethodBuilders.
3184         * reflection.c (mono_image_get_methodbuilder_token): Encode generic
3185         MethodBuilders as open instantiations if a methodspec was requested.
3187         * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
3189         * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
3191         * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
3193         Fixes bug #349190.
3195 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
3197         * loader.c (method_from_methodspec): Avoid crashing if the
3198         method lookup fails.
3200 2008-06-20  Dick Porter  <dick@ximian.com>
3202         * socket-io.c (get_socket_assembly): Cope with Moonlight network
3203         classes being in a different assembly.  Fixes bug 399184.
3205 2008-06-20  Zoltan Varga  <vargaz@gmail.com>
3207         * loader.c (mono_loader_init): Make this callable multiple times.
3208         (mono_dllmap_insert): Call mono_loader_init () so this works even before
3209         the runtime is initialized. Fixes #401755.
3211 2008-06-19  Dick Porter  <dick@ximian.com>
3213         * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
3214         Fixes bug 349688.
3216 2008-06-19  Dick Porter  <dick@ximian.com>
3218         * socket-io.c:
3219         * icall-def.h: Implement Socket generic Send() and Receive()
3220         methods.  Fixes bug 395168.
3222 2008-06-19  Kornél Pál  <kornelpal@gmail.com>
3224         * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
3226         Contributed under MIT/X11 license.
3228 2008-06-18  Martin Baulig  <martin@ximian.com>
3230         * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
3231         `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
3232         set to 80.0.  The debugger <-> runtime interface is now frozen as
3233         well.   
3235         * mono-debug.c
3236         (mono_debug_debugger_version): Bump to 4.
3238 2008-06-18  Martin Baulig  <martin@ximian.com>
3240         * debug-mono-symfile.c
3241         (load_symfile): Don't check the minor version.
3243         * debug-mono-symfile.h: Bump the version number to 50.0.
3245 2008-06-18  Martin Baulig  <martin@ximian.com>
3247         * debug-mono-symfile.c
3248         (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
3249         minimum required version.
3251 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
3253         * reflection.c (mono_custom_attrs_from_property): Fix support for
3254         retriveving cattrs of dynamic inflated generic types.
3256         * reflection.c (mono_custom_attrs_from_event): Same.
3258         * reflection.c (mono_custom_attrs_from_field): Same;
3260         * reflection.c (typebuilder_setup_events): Same cattrs of events.
3262         * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
3263         Moved to metadata.c.
3265         * metadata.c: New functions to retrive the equivalent field, event
3266         of property from the generic type definition.
3268         * metadata-internals.h: Added new functions from metadata.c.
3270 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
3272         * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
3273         to cached in a mempool is used.
3275         * metadata.c (free_generic_class): In some situations field generic_info type
3276         is not properly dup'ed and leads to double free'ing.
3278         Fixes #400643.
3280 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3282         * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
3283         this arguments (will be needed later for generic methods).
3284         Collect stats.
3286 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3288         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
3289         Create a static RGCTX invoke wrapper for methods which require it.
3291 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3293         * object.c, class-internals.h: New function for checking whether
3294         an individual field is special static.
3296 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
3298         * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
3299         linear search since the table is sorted.
3301         * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
3302         Fixes #324180.
3304 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
3306         * appdomain.c (unload_thread_main): Applied patch from Tim Howard 
3307         (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
3309         * gc.c (mono_domain_finalize): Allow an infinite timeout.
3311         * threads.c (mono_threads_abort_appdomain_threads): Ditto.
3312         
3313         * threads.c (mono_thread_request_interruption): Get rid of locking, use
3314         InterlockedCompareExchange to query and modify 
3315         thread->interruption_requested.
3317         * object-internals.h (struct _MonoThread): Change interruption_requested
3318         to a gint32 so it can be modified by atomic operations. Add 
3319         'critical_region_level' from the managed side, change small_id to a guint32,
3320         add new set of 'unused' fields.
3322         * appdomain.c: Bump corlib version.
3324 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3326         * class.c (mono_class_from_name): Search modules as well. Fixes
3327         #322332.
3329 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3331         * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
3332         templates.  Templates are generalized with an additional type_argc
3333         argument.  RGCTX templates have type_argc==0, MRGCTX templates
3334         have type_argc>0.
3336         * domain-internals.h, domain.c: New hash table for looking up
3337         MRGCTXs.
3339         * metadata.c, metadata-internals.h: Rename hash and equal
3340         functions for MonoGenericInst's and make them public.
3342         * class-internals.h: New data structures for the MRGCTX.  Macros
3343         for distinguishing slots in the RGCTX and the MRGCTX.
3345 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3347         * object.c (mono_method_get_imt_slot): Put the same methods of
3348         different instantiations of the same generic interface in the same
3349         IMT slots, to make generic sharing simpler.
3351 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
3353         * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
3355         * metadata.c (mono_metadata_field_info_with_mempool): Added.
3356         This function works just like mono_metadata_field_info, but
3357         accept a mempool as argument to be used allocating memory.
3359         * marshal.c (mono_marshal_load_type_info): Use new function
3360         to load marshal data into image mempool.
3362 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
3364         * class.c (mono_class_inflate_generic_type_with_mempool):
3365         This function allows to inflate a generic type using
3366         a mempool.
3368         * class.c (inflate_generic_type): Take a mempool as argument
3369         and use it to do type dup'ing.
3371         * class.c (mono_class_setup_fields): Field type for generic
3372         generic classes are allocated from the image mempool.
3374         * metadata.c (free_generic_class): Inflated field type is
3375         now allocated in the image mempool.
3377 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
3379         * threads.c (thread_cleanup): Free MonoThread::name.
3381 2008-06-12  Marek Habersack  <mhabersack@novell.com>
3383         * appdomain.c (ensure_directory_exists): avoid unnecessary
3384         mkdir(2) calls when the shadow directory already exists.
3385         (mono_make_shadow_copy): copy also satellite assemblies from the
3386         private bin directories.
3388 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
3390         * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
3391         
3392         * threads.c (mono_thread_get_stack_bounds): Align the stack address to
3393         a page boundary. Fixes #396219.
3395 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
3397         * marshal.c (mono_marshal_load_type_info): Add a memory barrier
3398         due to double-checked locking.
3400 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
3402         * assembly.c (build_assembly_name): Release memory on failure.
3404         * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
3406 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
3408         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
3409         memory on failure.
3411 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
3413         * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
3414         memory on failure.
3416 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
3418         * loader.c (field_from_memberref): Check if field signature type is equal
3419         to the non-inflated type of the field. Fixes #398980.
3421 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
3423         * assembly.c (mono_assembly_load_from_full): Call 
3424         mono_assembly_load_friends () outside the assemblies lock, since it can
3425         acquire the loader lock. Fixes #323696.
3427         * reflection.c (resolve_object): Inflate the inst with the context for
3428         FieldOnTypeBuilderInst. Fixes #399010.
3430 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
3432         * reflection.c (mono_image_get_field_on_inst_token): Don't
3433         inflate the field to encode it's signature. If it's a
3434         VAR or MVAR it should stay that way in the signature.
3435         Fixes #399047.
3437 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
3439         * reflection.c (resolve_object): Release memory of inflated types.
3441 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
3443         * loader.c (mono_method_get_signature_full): Remove assert about
3444         loading a methodspec to a generic method. We have such methods, such as
3445         System.Threading.Interlocked::CompareExchange<T>.
3446         This assert was removed since it crashes the verifier when it checks
3447         methods calling CompareExchange<T>.
3449 2008-06-10  Marek Safar  <marek.safar@gmail.com>
3451         * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
3452         of Type array and not MonoType.
3454 2008-06-10  Marek Habersack  <mhabersack@novell.com>
3456         * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
3457         <lupus@ximian.com>
3459 2008-06-10  Martin Baulig  <martin@ximian.com>
3461         * debug-mono-symfile.h
3462         (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6.  There were no
3463         changes to the file format, but we were generating incorrect
3464         source file indices in the line number table due to a bug, which
3465         made backtraces report an incorrect source file.
3467 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
3469         * mono-debug.c: Moved mono_debug_free_method_jit_info from
3470         mini/debug-mini.c to here.
3472         * mono-debug.c (il_offset_from_address): Free memory from find_method.
3474         * mono-debug.h: Export mono_debug_free_method_jit_info, users should
3475         use it to release structs returned by mono_debug_find_method.
3477 2008-06-10  Zoltan Varga  <vargaz@gmail.com>
3479         * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
3480         since it needs to set method->slot for all interface methods.
3482 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
3484         * class-internals.h: Forgot to add.
3486 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
3488         * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
3490         * reflection.c (lookup_custom_attr): Added a MonoImage argument.
3491         Lookup the custom attributes from property_hash.
3493         * reflection.c (mono_save_custom_attrs): Save the custom attributes
3494         in property_hash. Allocate all data using the image mempool.
3496         * reflection.c: Removed dynamic_custom_attrs. Changed all checks
3497         for dynamic_custom_attrs to checks if the image is dynamic.
3499 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3501         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
3502         assemblies array.
3503         
3504         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
3505         runtime functions while holding the domain assemblies lock.
3507 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
3509         * verify.c: Reapplied the last bit of the reverted changes.
3511 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
3513         * verify.c: Reapplied more of the reverted changes.
3515 2008-06-09  Martin Baulig  <martin@ximian.com>
3517         * debug-mono-symfile.c (load_symfile): Check the major version
3518         first; if it's wrong, don't print the minor version in the error message.
3520 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3522         * appdomain.c (set_domain_search_path): Make this use the domain assemblies
3523         lock instead of the domain lock to avoid deadlocks, since the thread might
3524         already hold the loader lock.
3526         * threads.c (start_wrapper): Call mono_monitor_init_tls ().
3527         (mono_thread_attach): Ditto.
3529         * monitor.c: Use a TLS variable for holding the current thread id instead
3530         of calling pthread_self ().
3531         (mono_monitor_init_tls): New internal function to initialize the TLS
3532         variable.
3533         (mono_monitor_try_enter_internal): Put the owner == id check after the
3534         owner == 0 check.
3536         * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
3537         missed optimizations when using gcc-4.3.
3539 2008-06-08 Rodrigo Kumpera  <rkumpera@novell.com>
3541         * reflection.c (mono_dynamic_image_free): Free the memory
3542         used by MonoGenericParam in MonoDynamicImage::gen_param.
3544         * reflection.c (mono_reflection_setup_generic_class): Allocate
3545         container from mempool.
3547         * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
3548         container from mempool.
3550 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3552         * threads.c (mono_set_pending_exception): New internal function to set the
3553         pending exception of the current thread.
3554         (mono_thread_get_and_clear_pending_exception): Check for 
3555         thread->pending_exception as well.
3557         * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
3559         * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
3560         it can trigger a collection.
3562 2008-06-06  Martin Baulig  <martin@ximian.com>
3564         Merged the `debugger-kahalo' branch.
3566         * mono-debug.h
3567         (MONO_DEBUGGER_VERSION): Bumped to 72.
3569         * debug-mono-symfile.h
3570         (MonoSymbolFileMethodIndexEntry): Removed.
3571         (MonoSymbolFileMethodEntry): New public typedef.
3572         (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
3573         (MonoSymbolFileSourceEntry): Remove everything except `index' and
3574         `data_offset'.
3575         (MonoSymbolFileMethodEntry): Removed.
3576         (MonoSymbolFileLexicalBlockEntry): Removed.
3577         (MonoSymbolFileLineNumberEntry): Removed.
3578         (MonoDebugLexicalBlockEntry): Removed.
3579         (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
3580         removed `num_il_offsets' and `il_offsets'.
3581         (MonoSymbolFile): Replace `version' with `major_version' and
3582         `minor_version'.
3583         (MONO_SYMBOL_FILE_VERSION): Replace with
3584         `MONO_SYMBOL_FILE_MAJOR_VERSION' and
3585         `MONO_SYMBOL_FILE_MINOR_VERSION'.
3587         * debug-mono-symfile.c
3588         (mono_debug_symfile_lookup_location): Add support for the new line
3589         number table format.
3591 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
3593         * metadata.c (free_generic_class): Release the inflated
3594         MonoClass of dynamic generic classes if it's not a generic
3595         type definition.
3597 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
3599         * verify.c: Reapplied more of the reverted changes.
3601 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
3603         * reflection.c (lookup_custom_attr): Clean the cached flag or
3604         nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
3605         for SRE types.
3607 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
3609         * verify.c: Reapplied a small part of the reverted changes.
3611 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3613         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3615         * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was 
3616         previously in managed code.
3617         (mono_monitor_exit): Ditto.
3618         (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
3620         * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
3621         the managed definition.
3623 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
3625         * verify.c: Revert changes to see if it helps with weird buildbot crashes.
3627 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3629         * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
3630         
3631         * monitor.c: Add some micro optimizations.
3633         * icall.c (type_from_typename): Handle 'bool'.
3635 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
3637         * verify.c: Implement constructor verification per P III 1.8.1.4.
3638         Fixes #396716.
3640 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3642         * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
3643         holding the assemblies lock here too.
3645 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
3647         * verify.c: Kill stack_top function.
3649 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
3651         * verify.c: Kill stack_get function.
3653 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
3655         * verify.c (mono_method_verify): Last change broke the build. Fixed.
3657 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
3659         * verify.c (verify_type_compatibility_full): Make SZARRAY checks
3660         more reliable.
3662         * verify.c (mono_method_verify): Inflate params and locals to avoid
3663         mismatch when checking for compatibility.
3665 2008-06-05  Jonathan Chambers  <joncham@gmail.com>
3667         * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
3668         Length prefix should be size in bytes. Fix bug #339530.
3669         
3670         * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
3671         Length prefix should be size in bytes. Fix bug #339530.
3673         Code is contributed under MIT/X11 license.
3675 2008-06-05  Bill Holmes <billholmes54@gmail.com>
3677         * decimal.c:  Adding MSVC implementation to my_g_bit_nth_msf.
3679         Contributed under MIT/X11 license.
3681 2008-06-05  Martin Baulig  <martin@ximian.com>
3683         * mono-debug-debugger.c
3684         (mono_debugger_check_breakpoints): Reflect latest runtime changes.
3686 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
3688         * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
3689         while holding the assemblies lock to prevent deadlocks. Handle the case
3690         where the search hook returns NULL but the assembly was still loaded.
3691         Fixes #323696.
3693         * appdomain.c (set_domain_search_path): Acquire the domain lock since we
3694         modify domain state.
3696 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
3698         * boehm-gc.c: Add DTrace probes gc-{begin,end}.
3699         * Makefile.am (pedump_LDADD): Post-process object files and
3700         add dtrace-generated object file, if necessary.
3702         Code is contributed under MIT/X11 license.
3704 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
3706         * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
3708 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
3710         * class.c (mono_type_get_full): Add a work-around for generic type definitions.
3712 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3714         * threads.c: Try to free everything from the delayed free table
3715         when shutting down threads, and set the variable to NULL after the
3716         table is freed so that calling
3717         mono_thread_hazardous_try_free_all() when shutting down the root
3718         domain doesn't crash.
3720 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
3722         * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
3723         the caller if resulting type was inflated.
3725         * class.c (mono_class_create_from_typespec): Free the MonoType if it
3726         was inflated.
3728         * class.c (mono_type_get_full): Free the MonoType if it was inflated.
3731 2008-06-04  Zoltan Varga  <vargaz@gmail.com>
3733         * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
3734         class library tests.
3736         * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume 
3737         (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
3738         #396989.
3740 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3742         * domain.c, domain-internals.h: The JIT infos are now freed by the
3743         JIT info table code.  They are freed immediately if there only a
3744         single JIT info table in circulation.  If there is more, the free
3745         is delayed via a queue.
3747         * threads.c, threads-types.h: New hazard pointer function for
3748         freeing all freeable delayed items in one sitting.
3750 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
3752         * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
3754         * reflection.c (typebuilder_setup_properties): Same.
3756         * reflection.c (typebuilder_setup_events): Same.
3758 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
3760         * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
3761         and use it for allocating memory.
3763         * reflection.c (mono_marshal_spec_from_builder): Same.
3765         * reflection.c: Change code to use new signatures.
3767         * metadata.c (mono_metadata_type_dup): Add a FIXME note.
3769 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3771         * decimal.c (rescale128): Put back one line which was accidently commented
3772         out.
3773         
3774         * decimal.c (rescale128): Disable the code added by the last patch, as it seems
3775         to cause crashes.
3777 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
3779         * reflection.c (mono_reflection_generic_class_initialize): Name must
3780         be always malloc'ed so we can free it later on. Do this for field, property
3781         and event.
3783         * metadata.c (free_generic_class): Free field, property and event names.
3785 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
3787         * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
3788         instead of g_memdup.
3790         * reflection.c (typebuilder_setup_fields): Same.
3792 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3794         * decimal.c (rescale128): Optimize this function a bit more.
3796 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
3798         * metadata.c (free_generic_class): Release some memory from
3799         SRE generic classes.
3801 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
3803         * reflection.c (mono_image_get_generic_field_token): No reference
3804         to name is kept, free it.
3806         * reflection.c (mono_reflection_generic_class_initialize): Free
3807         more memory of the inflated field.
3809 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3811         * decimal.c (mono_decimalDiv): Moved equality checks here from managed
3812         code.
3814 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
3816         * reflection.c (mono_dynamic_image_free): Release memory used by
3817         MonoDynamicImage::array_methods elements.
3819         * reflection.c (assembly_add_win32_resources): Release memory after
3820         encoding.
3822 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
3824         * decimal.c (log2_32): Use an optimized version for this function too.
3825         
3826         * decimal.c (log2_64): Fix this on 32 bit machines.
3828 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
3830         * class.c (mono_dup_array_type): Implement allocation using a mempool.
3832         * class.c (mono_metadata_signature_deep_dup): Same.
3834         * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
3835         a mempool.
3837         * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
3839         * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
3841         * metadata-internals.h: Added mono_metadata_signature_dup_full.
3843         * class-internals.h: Update signatures to take a MonoMemPool.
3845 2008-06-02  Dick Porter  <dick@ximian.com>
3847         * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage): 
3848         * icall-def.h: Add
3849         System.ComponentModel.Win32Exception.W32ErrorMessage, using the
3850         FormatMessage API to get the error text.  Fixes bug 321827.
3852 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
3854         * decimal.c: Add some micro optimizations to make decimal operations faster.
3856 2008-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
3858         * reflection.c (method_encode_clauses): Take a mempool
3859         as parameter and use it to allocate the clause array.
3861         * reflection.c (mono_image_get_field_on_inst_token): Free
3862         the inflated type after encoding it.
3864         * reflection.c (mono_dynamic_image_free): Free each element
3865         of MonoDynamicImage::gen_params.
3867         * reflection.c (reflection_methodbuilder_to_mono_method):
3868         Allocate the generic param array from the mempool.
3869         Allocate signature params from the mempool.
3871         * reflection.c (mono_reflection_generic_class_initialize):
3872         Free inflated fields after been used.
3874 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
3876         * icall.c: Reapply the memory leak fixes as they no
3877         longer make mono crash.
3879 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
3881         * reflection.c (mono_type_get_object): Don't store the suplied
3882         MonoType with type_hash. A caller which pass a type that
3883         was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
3884         might end with a pointer to freed memory.
3885         The solution is to use byval_arg or this_arg from the associated
3886         MonoClass of the supplied type.
3888 2008-05-29  Zoltan Varga  <vargaz@gmail.com>
3890         * icall.c: Revert the rest of the last change as it breaks the build too.
3892 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
3894         * icall.c: Revert a leak fix as it's breaking the build.
3896 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
3898         * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
3900 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
3902         * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
3904 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
3906         * icall.c: Fix some memory leaks.
3908 2008-05-29  Dick Porter  <dick@ximian.com>
3910         * threadpool.c (mono_thread_pool_remove_socket): Always remove the
3911         async socket operations from the pending list when a socket
3912         closes.  Leaving it until the threadpool services the event
3913         exposes a race condition when a socket descriptor is reused.
3914         Fixes bug 377589.
3916 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
3918         * object.c: Fix negative index check for array alocation.
3920 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
3922         * icall.c, marshal.c: Delegate wrappers should skip visibility.
3923         This check is performed by the verifier for IL created delegates
3924         and by Delegate::CreateDelegate for programatically created ones.
3925         Fixes #372406.
3927 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
3929         * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
3930         Fix code to use mono_array_size_t instead of int.
3932         Based on patch by Luis F. Ortiz.
3933         Contributed under X11 license.
3934         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3936 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
3938         * icall.c: Added ves_icall_System_Array_GetLongLength and
3939         ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
3940         arrays.
3942         * icall.h: Export both new functions.
3944         Based on patch by Luis F. Ortiz.
3945         Contributed under X11 license.
3946         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3948 2008-05-28  Martin Baulig  <martin@ximian.com>
3950         The debugger now requires exactly r103463.
3952         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
3953         This version is not supported by the debugger, wait for 72.
3955 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
3957         * object.h: Changed array related functions to use
3958         mono_array_size_t instead of guint32. Forgot to commit this file.
3960         Patch by Luis F. Ortiz.
3961         Contributed under X11 license.
3962         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3965 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
3967         * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
3968         don't define it. Use the number literal instead.
3970 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
3972         * icall.c: Changed array related functions to use
3973         mono_array_size_t instead of guint32.
3975         * icall.c (ves_icall_System_Array_GetLength): Check for length
3976         overflow under MONO_BIG_ARRAYS.
3978         Based on patch by Luis F. Ortiz.
3979         Contributed under X11 license.
3980         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3982 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
3984         * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
3986         Based on patch by Luis F. Ortiz.
3987         Contributed under X11 license.
3988         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3990 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
3992         * object.c, object.h: Changed array related functions to use
3993         mono_array_size_t instead of guint32.
3995         Patch by Luis F. Ortiz.
3996         Contributed under X11 license.
3997         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3999 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
4001         * object.h: Introduced mono_array_size_t typedef. This must be used
4002         in all places an array length is expected. This is 64bits wide if
4003         MONO_BIG_ARRAYS is enabled.
4005         Patch by Luis F. Ortiz.
4006         Contributed under X11 license.
4007         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4009 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
4011         * security-manager.c class.c: Set the class exception info by calling
4012         mono_class_set_failure ().
4014         * class.c (mono_class_get_exception_data): New accessor function.
4015         (mono_class_set_failure): Store exception_data in the property hash.
4017         * class-internals.h (struct _MonoClass): Store 'exception_data' outside
4018         the struct as a property.
4020         * loader.c (mono_get_method_full): Store the lookup result for method
4021         tokens in method_cache, the others in methodref_cache to decrease the memory
4022         usage of hash tables.
4024         * image.c (mono_image_close): Destroy method_cache and methodref_cache.
4025         (mono_image_init): method_cache is lazy inited now.
4027         * metadata-internals.h (struct _MonoImage): Change method_cache to
4028         a MonoValueHashTable, add a separate methodref_cache.
4030 2008-05-27  Eyal Alaluf <eyala@mainsoft.com>
4032         * number-formatter.h: Fix tables to avoid arithemtic overflow in
4033           Double.ToString as exposed by Bug #383531.
4035 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
4037         * number-formatter.h: Make some tables static.
4039         * class.c (mono_method_set_generic_container): New accessor function.
4040         (mono_method_get_generic_container): Ditto.
4042         * class-internals.h (struct _MonoMethod): Remove rarely used 
4043         'generic_container' field, store it in the property hash instead. Add 
4044         'is_generic' boolean field instead.
4046         * image.c (mono_image_init): Initialize property_hash.
4047         (mono_image_close): Destroy property_hash.
4049         * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
4050         hold rarely used fields of runtime structures belonging to this image.
4052         * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
4053         to get/set method->generic_container.
4055         * loader.c (mono_get_method_from_token): Avoid loading the method header for
4056         generic methods.
4058 2008-05-25  Zoltan Varga  <vargaz@gmail.com>
4060         * class.c (mono_class_inflate_generic_method_full): Don't increase
4061         mono_stats.inflated_method_count for methods found in the cache.
4063         * threads.c (mono_thread_request_interruption): Add a comment about 
4064         QueueUserAPC ().
4066 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
4068         * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
4069         interface_offsets_packed table.
4070         
4071         * class.c (mono_class_init): Remove some dead code.
4073         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
4074         mono_class_setup_vtable () when CAS is active to detect security problems.
4076 2008-05-23 Rodrigo Kumpera  <rkumpera@novell.com>
4078         * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
4080         * verify.c (mono_delegate_signature_equal): Don't compar number of generic
4081         parameters as it's irrelevant for delegate checking.
4083 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
4085         * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
4087         * class.c (mono_class_init): Control the creation of a generic vtable using
4088         a global which is true by default, but set to false by the runtime startup code.
4089         
4090         * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
4091         Disabled for now since it breaks the embedding API.
4092         Move the setup of class->methods for arrays to mono_class_setup_methods ().
4093         (mono_class_setup_methods): Add a memory barrier.
4095         * object.c (mono_class_create_runtime_vtable): Add code to handle the case
4096         when mono_class_init () doesn't compute the generic vtable.
4097         
4098 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
4099         * profiler.c: Added mono_profiler_install_statistical_call_chain,
4100         mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
4101         to support call chains (backtrace) in the stat profiler.
4102         * profiler.c, profiler-private.h: Likewise.
4104 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4106         * generic-sharing.c: Init generic class when a method of it is
4107         requested via a runtime generic context.
4109 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
4111         * class.c (mono_class_init): Add a comment about trying to avoid calling this.
4113         * reflection.c (mono_type_get_object): Add a FIXME.
4115         * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
4117         * class.c (mono_class_get_method_by_index): New helper function, returning an
4118         entry in the class->methods array.
4120 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
4122         * class.c (mono_class_init): Only do the array optimization for szarrays. 
4123         Avoid creating a generic vtable for generic instances as well.
4124         (mono_class_get_method_from_name_flags): Don't search in the metadata for
4125         generic instances.
4127 2008-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
4129         * loader.c (mono_get_method_constrained): Inflate the signature
4130         with class context. Fix #325283.
4132 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
4134         * object.c (mono_class_create_runtime_vtable): Add a comment.
4136         * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
4137         where needed.
4138         (setup_interface_offsets): Handle the case when this is called twice for arrays.
4139         (mono_class_setup_vtable_general): Add an assert.
4140         (mono_class_init): Avoid creating a generic vtable for arrays.
4142         * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
4143         here, let mono_class_init () do that.
4145         * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
4146         interfaces in mscorlib.
4148         * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
4149         interfaces. Add some comments.
4150         (mono_class_init): Call mono_class_setup_methods () here since it is no
4151         longer called by mono_class_setup_vtable ().
4153         * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
4154         not set in class->vtable.
4155         (mono_class_create_runtime_vtable): Reenable the disabled code.
4157         * object.c (mono_class_create_runtime_vtable): Disable the last change for
4158         now as it causes some test failures.
4160         * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
4161         if using the vtable trampoline. Also remove some strange code which put the
4162         generic methods themselves into the vtable slots. Remove the AOT init_vtable
4163         stuff as it is no longer needed.
4165 2008-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
4167         * pedump.c: Give make --verify all option check code as well.
4168         Using --verify code won't check for metadata now.
4170 2008-05-19  Martin Baulig  <martin@ximian.com>
4172         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
4174         * mono-debug.c
4175         (_mono_debug_using_mono_debugger): New global variable; it's set
4176         directly by the debugger, so mono_debug_using_mono_debugger() also
4177         works after attaching.
4179 2008-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
4181         * object.c (mono_class_create_runtime_vtable): Use memory barriers
4182         as we do double checked locking on MonoClass::runtime_info and
4183         MonoClassRuntimeInfo::domain_vtables.
4185 2008-05-18  Zoltan Varga  <vargaz@gmail.com>
4187         * debug-helpers.c (print_field_value): Fix a warning.
4189 2008-05-16  Zoltan Varga  <vargaz@gmail.com>
4191         * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
4192         set in the AOT case.
4194 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
4196         * class.c (mono_class_setup_vtable_general): Use memory barriers
4197         as we do double checked locking on MonoClass::vtable.
4199 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
4201         * reflection.c (resolve_object): Inflate only if the generic context
4202         is not null. Fixes #389886.
4204 2008-05-15  Jonathan Chambers  <joncham@gmail.com>
4206         * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
4207         instead of g_free.
4209         Code is contributed under MIT/X11 license.
4211 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
4213         * class.c: Revert unrelated change.
4215 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
4217         * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
4218         a generic instantiation, use mono_class_from_mono_type instead of playing
4219         with MonoType directly.
4221 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
4223         * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
4224         checks must ignore generic instantiations, so mono_class_has_parent is not
4225         suitable. Fixes #390128.
4227 2008-05-14  Zoltan Varga  <vargaz@gmail.com>
4229         * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
4230         it to avoid registering tokens during metadata generation. Fixes #390023.
4232 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
4234         * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
4235         consistent.
4237         Contributed under MIT/X11 license.
4239 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
4241         * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
4242         even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
4243         to fixup the EXE image.
4244         (mono_cleanup): Use mono_close_exe_image.
4245         (mono_close_exe_image): New function.
4246         * image.c: Include "marshal.h".
4247         (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
4248         (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
4249         counting when the image is loaded outside of mono_image_open_full. Set status
4250         based on GetLastError.
4251         * coree.c: Include required headers. Add init_from_coree.
4252         (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
4253         mono_assembly_open only when the image has vtfixups. Set init_from_coree.
4254         (_CorExeMain): Set init_from_coree.
4255         (CorExitProcess): Only call ExitProcess for now.
4256         (CorBindToRuntimeEx): New stub implementation.
4257         (CorBindToRuntime): New function.
4258         (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
4259         (MonoFixupExe): ILONLY executables require no fixups.
4260         (mono_set_act_ctx): New function to set activation context.
4261         (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.  
4262         * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
4263         Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
4264         mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
4265         as MONO_INTERNAL.
4266         * domain-internals.h: Add mono_close_exe_image.
4268         Contributed under MIT/X11 license.
4270 2008-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
4272         * metadata.c (mono_metadata_compute_size): Correctly calculate field
4273         size for generic param and event tables. Fixes #388977.
4275 2008-05-13  Zoltan Varga  <vargaz@gmail.com>
4277         * loader.c (mono_method_signature): Use memory barriers because of the double
4278         checked locking pattern.
4280         * threads.c (remove_and_abort_threads): Stop and wait for threads which are
4281         aborting or aborted as well. Fixes #376391.
4282         
4283         * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
4284         existing runtime state in the Suspend handler during shutdown.
4286 2008-05-12  Zoltan Varga  <vargaz@gmail.com>
4288         * threads.c (mono_thread_request_interruption): Add some FIXMEs.
4290         * threads.c (mono_thread_suspend_all_other_threads): Add support for threads 
4291         which are starting up or shutting down.
4293         * threads.c (mono_threads_set_shutting_down): Don't return a value since
4294         this function never returns if the runtime is already shutting down.
4296         * icall.c (ves_icall_System_Environment_Exit): Update after 
4297         mono_threads_set_shutting_down () signature change.
4298         
4299 2008-05-09 Rodrigo Kumpera  <rkumpera@novell.com>
4301         * class.c: Added can_access_instantiation to verify if the instantiation
4302         is visible. Fix access check for nested types as they returned TRUE
4303         before doing type and generic instantiation visibility checks.
4305 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
4307         * reflection.c (mono_reflection_create_generic_class): The created type
4308         must have a different container from its TypeBuilder. Otherwise they
4309         will end sharing generic arguments, which is wrong.
4311         Due to the sharing, making a generic instance of the created type using
4312         the TypeBuider generic arguments resulted in the generic type definition
4313         been returned, which is wrong as well.
4315         As a bonus the code was leaking the type_params array. This memory should
4316         be allocated from the image mempool.
4318         This fixes bug #354047.
4320 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
4322         * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
4323         to here         as they are now used in assembly.c new code.
4324         Added a skipverification flag to MonoAssembly.
4325         New internal function mono_assembly_has_skip_verification.
4327         * assembly.c: New function mono_assembly_has_skip_verification. It checks
4328         if an assembly has a version 2.0 SkipVerification security attribute. Fixes
4329         part of #387274.
4331 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
4333         * object.c (mono_object_get_virtual_method): Inflate the resulting method if
4334         needed. Fixes #387034.
4336         * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
4338 2008-05-06  Miguel de Icaza  <miguel@novell.com>
4340         * assembly.c (mono_assembly_load_reference): Prevent crash while
4341         disassembling Silverlight 2.0 executables while we still do not
4342         have GACed libraries.
4344 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
4346         * reflection.c: Special case generic type definitions as well. Fixes #383444.
4348 2008-05-06  Zoltan Varga  <vargaz@gmail.com>
4350         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
4351         of the dynamic case. Fixes #387404.
4353 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
4355         *verify.c (mono_verifier_is_class_full_trust): If under
4356         verify_all and the verifier mode was not set, only
4357         gac and corlib types are fulltrust. This makes --verify-all
4358         usable to detect unverifiable code, which is the expected
4359         use case.
4361 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
4363         * verify.h: Ops, commited the header with debug
4364         enabled.
4366 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
4368         * verify.c (merge_stack): Use the new value on unverifiable
4369         stack merges.
4371         * verify.c (verify_type_compatibility_full): Comparison
4372         of nullable types can't use mono_class_is_assignable_from.
4374         * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
4375         that makes all verification errors be reported.
4377         * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
4378         mono_method_verify.
4380 2008-05-05  Robert Jordan  <robertj@gmx.net>
4382         * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
4383         support for value types. See #386415.
4385         * object.c: comments.
4387         Code is contributed under MIT/X11 license.
4389 2008-05-05  Martin Baulig  <martin@ximian.com>
4391         * debug-mono-symfile.h
4392         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
4393         for old pre-terrania symbol files.
4395 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4397         * mono-config.c: Add ppc64 architecture.
4399         Code is contributed under MIT/X11 license.
4401 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4403         * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
4404           PPC64 uses function descriptors as well.
4406         Code is contributed under MIT/X11 license.
4408 2008-05-04  Zoltan Varga  <vargaz@gmail.com>
4410         * object.c (compute_class_bitmap): Ignore literal static fields.
4412         * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
4413         var has an invalid format.
4414         (describe_ptr): Add some sanity checks for the vtable.
4415         (add_nursery_frag): Clear unused nursery fragments.
4416         (major_collection): Clear all remaining nursery fragments.
4418 2008-05-03  Robert Jordan  <robertj@gmx.net>
4420         * image.c, metadata-internals.h: add thunk_invoke_cache.
4422         * marshal.c, marshal.h: implement
4423         mono_marshal_get_thunk_invoke_wrapper ().
4425         * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
4427         Code is contributed under MIT/X11 license.
4429 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
4431         * verify.c (do_leave): Empty the stack.
4433 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
4435         * class.c (mono_class_is_assignable_from): Variance
4436         doesn't work between reference and value types. For example,
4437         given type C<T+>, C<int32> is not assignable to C<object>.
4438         Break the argument checking loop on first error. 
4440 2008-05-02  Atsushi Enomoto  <atsushi@ximian.com>
4442         * icall.c : base64_to_byte_array() needs some more strict
4443           check for sequence of '=' characters. Patch by Santa
4444           Marta (http://deee.g.hatena.ne.jp/santamarta).
4446           Contributed under MIT/X11 license.
4447           (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
4449 2008-05-02  Jonathan Chambers  <joncham@gmail.com>
4451         * domain.c: Disable LoadLibrary support to fix Win32 build.
4453         Code is contributed under MIT/X11 license.
4455 2008-05-02  Zoltan Varga  <vargaz@gmail.com>
4457         * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
4458         to help with cache behaviour.
4460 2008-05-01  Miguel de Icaza  <miguel@novell.com>
4462         * appdomain.c (mono_domain_from_appdomain): Add new accessor
4463         method. 
4465 2008-05-01  Zoltan Varga  <vargaz@gmail.com>
4467         * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
4469 2008-05-01  Dick Porter  <dick@ximian.com>
4471         * process.c (process_get_fileversion): Only pass 16 bits of
4472         language ID to VerLanguageName.  Fixes bug 381204.
4474 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
4476         * verify.c (mono_method_verify): Fix the comparison
4477         operator for code bounds check.
4479 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
4481         * verify.c (mono_method_verify): Check the bounds of
4482         all access of the code array.
4484 2008-04-29  Kornél Pál  <kornelpal@gmail.com>
4486         * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
4488 2008-04-28  Zoltan Varga  <vargaz@gmail.com>
4490         * image.c (mono_image_strong_name_position): Fix return value when the rva is
4491         not valid.
4493 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
4495         * loader.c (mono_get_method_from_token, mono_method_signature): Add
4496         support for METHOD_IMPL_ATTRIBUTE_NATIVE.
4497         * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
4498         fixup main EXE images when using mono.exe for mixed-mode assembly support.
4499         * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
4500         mono_runtime_load.
4501         * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
4502         runtime initialization from metadata.
4503         * assembly.c: Remove obsolete ceGetModuleFileNameA.
4504         (mono_set_rootdir): Use mono_get_module_file_name.
4505         (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
4506         handles.
4507         * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
4508         * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
4509         * image.c (mono_cli_rva_image_map): Use MonoImage instead of
4510         MonoCLIImageInfo. Add support for module handles.
4511         (load_cli_header): Update mono_cli_rva_image_map signature.
4512         (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
4513         (mono_image_strong_name_position): Use mono_cli_rva_image_map.
4514         (mono_image_rva_map): Add support for module handles.
4515         (mono_image_ensure_section_idx): Add support for module handles.
4516         (mono_image_close): Add support for module handles.
4517         (do_load_header): Add support for module handles.
4518         (mono_image_open_from_module_handle): New function for internal use.
4519         (mono_image_open_full): Load normal images using LoadLibrary on Windows.
4520         (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
4521         (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
4522         handles.
4523         (mono_image_fixup_vtable): New function for mixed-mode assembly support.
4524         * image.h: Add mono_image_fixup_vtable.
4525         * coree.c: New file for mscoree.dll functions and mixed-mode assembly
4526         support.
4527         * coree.h: New file.
4528         * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
4529         unsupported native code.
4530         (mono_marshal_set_callconv_from_modopt): New function splitted from
4531         mono_marshal_get_managed_wrapper.
4532         (mono_marshal_get_managed_wrapper): Use
4533         mono_marshal_set_callconv_from_modopt.
4534         (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
4535         * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
4536         * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
4537         that results in a deadlock when the runtime is loaded in _CorDllMain.
4538         * Makefile.am: Add coree.c and coree.h.
4540         Contributed under MIT/X11 license.
4542 2008-04-28  Mark Probst  <mark.probst@gmail.com>
4544         * generic-sharing.c: Search for type arguments in array element
4545         types as well.
4547 2008-04-28  Mark Probst  <mark.probst@gmail.com>
4549         * class-internals.h, generic-sharing.c: New, small runtime generic context.
4551         * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
4553         * object.c: Don't setup the RGCTX when the vtable is created,
4554         because we're setting it up lazily now.
4556 2008-04-26  Zoltan Varga  <vargaz@gmail.com>
4558         * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix 
4559         64 bit support.
4561 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
4563         * verify.c (verify_class_for_overlapping_reference_fields): 
4564         If class is under fulltrust allow reference types to overllap
4565         if they have the same RVA.
4567 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
4569         * pedump.c: Added new flag valid-only, that makes the verifier
4570         behaves just like --security=validil. It won't fail type load
4571         due to unverifiable restrictions.
4573 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
4575         * class-internals.h (struct MonoMethod): Added a verification_success
4576         field to cache verifier executions. Reduced MonoMethod:slot size by
4577         one bit.
4579 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
4581         * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
4582         instead of a 'vt' argument to save an indirection and to allow these to be used
4583         for valuetypes.
4584         (scan_vtype): New helper function to scan an area using a gc descriptor.
4585         (mono_gc_wbarrier_value_copy): Implement this.
4586         (handle_remset): Add support for REMSET_VTYPE.
4587         (find_in_remset_loc): Ditto.
4588         (mono_gc_base_init): Allow some debugging options to be controlled through the
4589         use of the MONO_GC_DEBUG env variable.
4590         (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
4591         (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
4593 2008-04-23  Martin Baulig  <martin@ximian.com>
4595         * domain.c (mono_domain_create): Move the call to
4596         mono_debug_domain_create() down, after allocating the domain id.
4598 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
4600         verify.c (verify_class_for_overlapping_reference_fields): Skip
4601         static fields while verifying for overlapping fields as they
4602         don't matter at all.
4604 2008-04-23  Marek Habersack  <mhabersack@novell.com>
4606         * domain-internals.h: added a declaration of
4607         mono_make_shadow_copy.
4609         * assembly.c (mono_assembly_open_full): shadow copying of
4610         assemblies moved to here, so that all the assemblies within the
4611         application domain's private binary directories can be
4612         processed. Fixes bug #380546
4614         * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
4615         mono_make_shadow_copy and made non-static. The decision whether
4616         to shadow-copy an assembly is made based on its location - it's
4617         copied if it's in one of the private application domain binary
4618         directories and its different to the target file in the shadow
4619         directory. Fixes bug #380546
4621 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
4623         * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
4625         * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
4626         types.
4628         * reflection.c (mono_image_create_token): Handle 
4629         Method/ConstructorOnTypeBuilderInst.
4630         (resolve_object): Ditto.
4631         (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
4632         so it can be called from resolve_object. Also handle the case when the inflated
4633         class already has its methods setup.
4635 2008-04-21  Martin Baulig  <martin@ximian.com>
4637         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
4639 2008-04-20  Geoff Norton  <gnorton@novell.com>
4641         * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
4642         pointer dereference.
4644 2008-04-15  Marek Habersack  <mhabersack@novell.com>
4646         * appdomain.c (try_load_from): if IOMAP is in effect, call the
4647         portability API to look up the assembly file. Fixes behavior in
4648         situations when the application has a bin/ directory, but the
4649         assembly search patch refers to Bin/ (and thus the requested file
4650         name is Bin/SomeLibrary.dll). Fixes bug #379888
4652 2008-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
4654         verify.c (mono_type_is_generic_argument): Extracted this check
4655         from a dozen places to here.
4657         verify.c: Fixed all issues related to boxing generic arguments
4658         and their constraints.
4660 2008-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
4662         verify.c (mono_class_interface_implements_interface): Fix win32 build.
4664 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
4666         * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
4667         isn't finished yet. Fixes #363447.
4669 2008-04-13  Zoltan Varga  <vargaz@gmail.com>
4671         * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
4672         Fixes #346419.
4674 2008-04-13  Jb Evain  <jbevain@novell.com>
4676         * domain.c: update the 2.1 profile versions.
4677         Merged from the Moonlight 2 branch.
4679 2008-04-12  Zoltan Varga  <vargaz@gmail.com>
4681         * assembly.c (mono_assembly_load_from_full): Do the check for loading other
4682         mscorlibs for the non-refonly case as well.
4684         * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
4685         in mono_assembly_load_from_full (). Fixes #378924.
4687 2008-04-11  Geoff Norton  <gnorton@novell.com>
4689         * icall.c: The global extern environ doesn't exist on Mac.  We
4690         need to call NSGetEnviron instead.
4692 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
4694         verify.c: Add generic method constraint verification.
4696 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
4698         class.c (mono_class_inflate_generic_method_full): Add a long
4699         explanation to the is_mb_open hack. Remove the FIXME.
4701 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
4703         * verify.c (mono_method_verify): Mark all unknown opcodes
4704         as invalid. Mark jmp as unverifiable.
4706 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
4708         * verify.c: Add code to do type constraint verification on class instances.
4710         * verify.c (mono_verifier_verify_class): Use the type constraint 
4711         verification code.
4713 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
4715         * class.c (mono_class_get_field_default_value): Don't pass cindex
4716         as hint to mono_metadata_get_constant_index. The local is not initialized
4717         and should contain garbage most of the time. This could only work
4718         with a lot of luck.
4720 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
4722         * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
4724 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
4726         * class-internals.h: Add generic_param_token to MonoClass::sizes union.
4728         * class.c (mono_class_from_generic_parameter): Save the token of the
4729         generic param in MonoClass::sizes.generic_param_token.
4731         * reflection.c (mono_custom_attrs_from_class): If the class type is
4732         VAR or MVAR retrieve the attributes of the generic param.
4734 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
4736         * class.c (mono_class_init): Do class verification if the verifier
4737         is enabled.
4739 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
4741         * verify-internal.h: Added mono_verifier_verify_class.
4743         * verify.c: Added mono_verifier_verify_class. It checks for
4744         classes with explicit layout that have overlapping reference fields.
4746         * pedump.c: Init the verifier state prior to verification. Fixed
4747         command line arguments.
4749 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
4751         * Makefile.am: Added verify-internals.h, hopefully fix the build.
4753 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4755         * verify-internals.h: Fix a warning.
4757 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
4759         * verify-internals.h: New header with the verifier configuration
4760         extracted from mini.c.
4762         * verify.c: Implemented the new functions exported by verify-internals.h.
4764 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
4766         * verify.c: Add proper verification of ckfinite.
4768 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
4770         * verify.c (do_conversion): Improved error message to something
4771         more meanfull.
4773         * verify.c (check_is_valid_type_for_field_ops): Fix to work
4774         with primitive types.
4776 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
4778         * verify.c: Added tail prefix checking. Marked icall
4779         as unverifible.
4781 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
4783         * verify.c: Fix the detection of branches to the middle
4784         of an instruction.
4786 2008-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
4788         * verify.c: Implemented verification of volatile. and
4789         unaligned. prefix. Check if a type is valid after retrieving it.
4791 2008-04-01  Dick Porter  <dick@ximian.com>
4793         * process.c (process_get_fileversion): If there's no string block,
4794         set the file language to en_US.  Fixes the other new part of bug
4795         374600.
4797 2008-03-29 Rodrigo Kumpera  <rkumpera@novell.com>
4799         * class.c: New functions mono_method_can_access_field_full and
4800         mono_method_can_access_method_full. They perform type visibility
4801         and type site check.
4803         * class-internal.h: Added exported functions.
4805         * verify.c: Use new functions to implement proper visibility checks.
4807 2008-03-29  Zoltan Varga  <vargaz@gmail.com>
4809         * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
4811 2008-03-28  Dick Porter  <dick@ximian.com>
4813         * process.c (process_get_fileversion): Use the first language ID
4814         we see, rather than insisting on an invariant language.  Fixes bug
4815         374600.
4817 2008-03-28  Zoltan Varga  <vargaz@gmail.com>
4819         * reflection.c (calc_section_size): Use add_stream_zero to align the size of
4820         the streams to fix reading of invalid memory later.
4822         * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
4823         to ease debugging.
4825 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
4827         * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
4828         (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
4830 2008-03-26  Massimiliano Mantione  <massi@ximian.com>
4831         * threads.h: Added MonoThreadManageCallback type and
4832         mono_thread_set_manage_callback prototype
4833         * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
4834         (used to store the mono_thread_manage callback).
4835         * threads.c: Added mono_thread_set_manage_callback, and handle
4836         "MonoThread->manage_callback" in build_wait_tids.
4838 2008-03-26  Dick Porter  <dick@ximian.com>
4840         * process.c (process_get_fileversion): Set FileVersionInfo strings
4841         to Empty when the resource doesn't have the particular info.
4842         Fixes bug 355717.
4844 2008-03-25 Rodrigo Kumpera  <rkumpera@novell.com>
4846         * verify.c (mono_method_verify): Proper prefix validation.
4848 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
4850         * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
4851         itself in a separate argument instead of throwing them. Fixes #373448.
4853         * appdomain.c: Bump corlib version.
4855 2008-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
4857         * verify.c: Implemented readonly prefix and verify controled mutability pointers.
4859 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
4861         * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
4862         version macros.
4864 2008-03-20  Mark Probst  <mark.probst@gmail.com>
4866         * generic-sharing.c, class-internals.h: Code for putting
4867         reflection types into the runtime generic context.
4869 2008-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
4871         * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
4872         Fixes #340662. 
4875 2008-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
4877         * verify.c (VerifyContext): Added instruction prefix data to the struct.
4879         * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
4881         * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
4883         * verify.c (do_cast): Let the result value keep the boxed status.
4885         * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
4887 2008-03-17  Jb Evain  <jbevain@novell.com>
4889         * reflection.c: when running on a 2.0 runtime, emit
4890         unconditionally the #~ header version as 2.0, and the
4891         CLI header version as 2.5, for symmetry's sake with csc.
4893 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
4895         * class.c: Remove the unused cache_interface_offsets stuff.
4897         * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
4898         profiler.c: Fix warnings.
4900 2008-03-16  Mark Probst  <mark.probst@gmail.com>
4902         * generic-sharing.c, class-internals.h: Support for putting
4903         methods into the runtime generic context.
4905 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
4907         * class.c (mono_class_setup_fields): Ignore calls made to this function for
4908         classes which are generic instances of not-yet finished typebuilders. Fixes
4909         #351172.
4911         * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
4913 2008-03-15  Zoltan Varga  <vargaz@gmail.com>
4915         * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
4917         * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
4918         field, replace it with a hash table in MonoDynamicImage.
4920         * reflection.c (inflate_mono_method): Access the generic definition object from
4921         image->generic_def_objects instead of imethod->reflection_info.
4923         * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto. 
4925         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
4926         
4927         * image.c (mono_image_close): Move the dynamic image freeing code to a separate
4928         function in reflection.c so it is easier to keep in sync with the dynamic image
4929         creation code.
4931         * reflection.c (mono_dynamic_image_free): New internal function, extracted from
4932         mono_image_close ().
4934 2008-03-15  Mark Probst  <mark.probst@gmail.com>
4936         * class.c (mono_class_generic_sharing_enabled): Disable generic
4937         sharing for all architectures except AMD64 and x86 to fix build.
4939 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
4941         * verify.c: Use the generic definition MonoGenericContext when available.
4942         Remove code for checking generics instance compatibility in favor of
4943         mono_class_is_assignable_from.
4945 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4947         * marshal.c, marshal.h, metadata-internals.h, image.c,
4948         wrapper-types.h: New wrapper for invoking a shared static method
4949         without having to pass the runtime generic context argument.
4951 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
4953         * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
4955 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4957         * reflection.c (mono_image_get_field_on_inst_token): Add caching.
4958         
4959         * reflection.c (mono_image_get_field_on_inst_token): New helper function to
4960         create a token from a FieldOnTypeBuilderInst.
4961         (mono_image_create_token): Handle FieldOnTypeBuilderInst.
4962         (resolve_object): Ditto.
4964         * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
4965         mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
4967 2008-03-14  Martin Baulig  <martin@ximian.com>
4969         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
4971         * debug-mono-symfile.h
4972         (MONO_SYMBOL_FILE_VERSION): Bump to 41.
4973         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
4975 2008-03-10  Martin Baulig  <martin@ximian.com>
4977         * debug-mono-symfile.h
4978         (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
4979         `lexical_block_table_offset'.
4980         (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
4981         `lexical_blocks'.
4982         (MonoSymbolFile): Added `version'.
4984         * mono-debug.h
4985         (MonoDebugLexicalBlockEntry): Removed.
4986         (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
4987         `lexical_blocks'.
4989         * mono-debug.c (mono_debug_add_method): Don't compute lexical
4990         blocks here; the debugger now does this internally.
4992 2008-02-27  Martin Baulig  <martin@ximian.com>
4994         * object.c (mono_runtime_exec_main): Call
4995         `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
4996         `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
4998 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
5000         * verify.c (verify_type_compatibility_full): Allow native int to be converted
5001         to native pointer in non-strict mode. Required to "(IntPtr)null" work.
5003 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
5005         * verify.c (verify_ldftn_delegate): Accept a sealed type when using
5006         ldftn with a virtual method.
5008 2008-03-13  Geoff Norton  <gnorton@novell.com>
5010         * decimal.c:  Only include memory.h if the platform has it.
5012 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
5014         * assembly.c, class.c, metadata-internals.h: make sure public key
5015         tokesns are compared in a case-insensitive way. Also, all
5016         the lookups in the GAC use a lowercase public key token
5017         (gaacutil already does the lowercasing on install). Fixes
5018         bug #369541.
5020 2008-03-11 Rodrigo Kumpera  <rkumpera@novell.com>
5022         * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
5023         and return value.
5025 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
5027         * image.c: when someone loads a mscorlib from a file, return the
5028         currently loaded mscorlib (fixes bug #369253).
5030 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
5032         * class.c: handle types with no parents by forcing them to have
5033         System.Object as a parent and marking them as broken (this currently
5034         allows the first part of bug #369173 to work as well, likely because
5035         we don't check for typeload exceptions everywhere yet).
5037 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
5039         * class.c: more complete check that types belong to corlib
5040         (fixes second part of bug #369173).
5042 2007-03-10  Bill Holmes  <billholmes54@gmail.com>
5044         * generic-sharing.c:  Including glib.h for the MSVC builds to define
5045           "inline" to "__inline" before including mono-membar.h.
5046           
5047         * mono-perfcounters.c:  Adding HAVE_SYS_TIME_H check for MSVC builds.
5048           Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for 
5049           MSVC builds.
5051         Contributed under MIT/X11 license.
5053 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
5055         * verify.c (do_invoke_method): Remove return type validation.
5057         * verify.c (do_ret): Do return type validation at return site instead of
5058         call site.
5060 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
5062         * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
5064         * verify.c: Some todos cleaned and improved a few error messages.
5066 2008-03-08  Zoltan Varga  <vargaz@gmail.com>
5068         * class.c (mono_class_setup_mono_type): Improve the test for corlib.
5070 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
5072         * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
5073         system types correctly.
5075         * exception.h exception.c (mono_exception_from_token_two_strings): New helper
5076         function.
5078 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
5080         * assembly.c (build_assembly_name): Fix a warning.
5082 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5084         * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
5085         the called function takes an object type argument. Fixes storing or
5086         valuetypes across remoting as well as reducing memory usage.
5087         * image.c, metadata-internals.h: remove now unused ldfld_remote and
5088         stfld_remote wrapper caches.
5090 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
5092         * icall.c (mono_lookup_internal_call): Update the exception message when an icall
5093         is not found.
5095         * reflection.c (mono_image_register_token): New helper function to save
5096         a token->object mapping.        
5098         * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
5099         managed code.
5101         * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
5102         one dimension arrays. Fixes #367670.
5103         (mono_reflection_get_type_internal): Ditto.
5105 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
5107         * marshal.c: mono_load_remote_field_new() always returns object.
5108         so use the proper signature (fixes bug #366445).
5110 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
5111         
5112         * class-internals.h (MonoMethod): Remove unused uses_this flag, 
5113         add an 'inline_failure' flag instead.
5115 2008-03-04  Mark Probst  <mark.probst@gmail.com>
5117         * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
5118         with a new structure, MonoGenericJitInfo, in the MonoJitInfo.  It
5119         contains the location of "this", used for exception handling.
5121 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
5123         * class.c (mono_class_layout_fields): Set the min alignment of small structs to
5124         their size on all platforms for perf reasons.
5126 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
5128         * reflection.h: Move mono_reflection_is_valid_dynamic_token to
5129         object-internal.h
5131         * object-internal.h: Same.
5133 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
5135         * reflection.h: Fix the build I just broke.
5137 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
5139         * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
5140         Test if a token is valid, this remove explicit usage of 
5141         MonoDynamicImage::tokens from the verifier code.
5143         * reflection.h: Added mono_reflection_is_valid_dynamic_token.
5145         * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
5146         instead of direct access to MonoDynamicImage::tokens.
5148 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
5150         * verify.c (token_bounds_check): Fix the build I just broke.
5152 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
5154         * verify.c (token_bounds_check): Fix bounds check for dynamic images.
5156         * verify.c (verifier_load_method): Fixed the errors message.
5158         * verify.c (mono_method_verify): Fixed a debug message.
5160 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
5162         * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
5163         mono-perfcounters.h, class-internals.h: support for predefined
5164         writable counters, query of categories and counters, bugfixes.
5166 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
5168         * verify.c (do_refanytype): Verify the refanytype opcode.
5170         * verify.c (mono_method_verify): Use do_refanytype.
5172 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
5174         * verify.c (do_mkrefany): Verify the mkrefany opcode.
5176         * verify.c (mono_method_verify): Use do_mkrefany.
5178 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
5180         * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
5181         mono-perfcounters.c, mono-perfcounters.h: basic performance counter
5182         implementation.
5184 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
5186         * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
5187         the type load exception.
5189 2008-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
5191         * verify.c: Added a few FIXME for method signatures
5193         * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
5194         of mono_method_get_signature and get vararg call working. Removed unused
5195         checks for return value.
5197         * verify.c (do_refanyval): Verify the refanyval opcode.
5199         * verify.c (mono_method_verify): Implemented verification of arglist and
5200         use do_refanyval.
5202 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
5204         * class.c (mono_class_setup_methods): Move the check for synchronized methods on
5205         vtypes to marshal.c.
5207         * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
5208         it works for AOT as well.
5210 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
5212         * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
5213         with mono_msec_ticks () which is monotonic and doesn't cause bugs when
5214         the system time is adjusted.
5216 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
5218         * icall.c, icall-def.h: use the new time functions (fixes the
5219         non-monotonic behaviour of TickCount).
5221 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
5223         * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
5224         it breaks the build.
5225         
5226         * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
5227         cattr is not finished yet.
5229 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
5231         * verify.c: Proper token validation for field, method and type.
5233 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
5235         * loader.c (field_from_memberref): Generate a loader error if the type is not found.
5237         * loader.c (method_from_memberref): Generate type load error instead of method missing
5238         if the type is not found.
5240 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
5242         * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
5243         some of the conversions caused the generation of a marshal directive exception.
5245 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
5247         verify.c: Report which exception should be thrown by the JIT.
5248         Added a lot of FIXME notes.
5250 2008-02-22  Mark Probst  <mark.probst@gmail.com>
5252         * generic-sharing.c: Runtime generic context slots are not
5253         instantiated on init anymore.  Instead, provide function to do the
5254         instantiating on demand.
5256         * class-internals.h: Added vtable to runtime generic context.
5257         Macros for encoding direct and indirect slot offsets in one
5258         guint32.
5260 2008-02-21  Mark Probst  <mark.probst@gmail.com>
5262         * object.c, generic-sharing.c: Moved some generic sharing code
5263         from object.c to generic-sharing.c.
5265         * generic-sharing.c: Added support for extensible runtime generic
5266         context.
5268         * metadata-internals.h: Two new hash tables in MonoImage for
5269         extensible runtime generic context support.
5271         * domain.c: Unregister generic vtables upon domain unloading.
5273         * image.c: Destroy new hash tables upon image unloading.
5275         * metadata.c: Unregister generic subclasses upon image unloading.
5277         * class-internals.h: New data structure for runtime generic
5278         context template.  New fields in the runtime generic context for
5279         extensible part.
5281         * Makefile.am: Added generic-sharing.c.
5283 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
5285         icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
5286         there is a pending loader exception, raise it.
5288         icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
5289         same.
5291         icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): 
5292         same.
5294         Fixes #363450.
5296 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
5298         * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
5300         * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
5301         
5302         * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
5303         ref-only requests for compatibility with MS.
5305 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5307         * reflection.c (mono_custom_attrs_from_method): Don't silently
5308         return an empty list for generic method instances.
5309         (mono_custom_attrs_from_param): Likewise.
5311 2008-02-20  Rodrigo Kumpera  <rkumpera@novell.com>
5312             Raja R Harinath  <harinath@hurrynot.org>
5314         Fix #354757
5315         * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
5316         * class.c (mono_class_inflate_generic_method_full): Initialize it
5317         when a fully-open method is instantiated.
5318         * metadata.c (inflated_method_equal, inflated_method_hash): Update
5319         to new field.
5320         * reflection.c (inflate_mono_method): Don't create a temporary context.
5322 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5324         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
5325         Compute correct value, to prepare for imethod->reflection_info going away.
5327 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
5329         * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
5331 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
5333         * verify.c: Implement skip visibility flag.
5335 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
5337         * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
5338         which contains an extra field to tell the kind of exception that should be thrown.
5340         * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
5342 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5344         * loader.c (mono_method_get_param_names): Initialize 'klass' after
5345         'method' is updated.
5347 2008-02-11  Zoltan Varga  <vargaz@gmail.com>
5349         * class.c (mono_class_layout_fields): Set class->min_align for classes using
5350         explicit layout as well. Fixes #360375.
5352 2008-02-11  Geoff Norton  <gnorton@novell.com>
5354         * loader.c: Guard and dereference against inflated generic methods
5356 2008-02-10  Gert Driesen  <drieseng@users.sourceforge.net>
5358         * class.c: Include Retargetable spec in assembly name.
5359         * assembly.c: Always include PublicKeyToken spec in assembly name
5360         (with value "null" if assembly is not signed), and include
5361         Retargetable spec.
5362         * icall-def.h: Added icall for Assembly.get_fullname.
5363         * icall.c: Added icall returning the fullname of an assembly.
5365 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
5367         * class.c (mono_class_setup_vtable_general): Add a missing call to
5368         mono_class_setup_methods () which is needed in the AOT case.
5370 2008-02-08 Rodrigo Kumpera  <rkumpera@novell.com>
5372         * verify.c (mono_type_get_stack_name): Added. Return the name for the
5373         stack type of the given MonoType.
5375         * verify.c (verify_type_compatibility_full): Handle the void type.
5377         * verify.c (is_compatible_boxed_valuetype): Changed to fit the
5378         way stack merging works.
5380         * verify.c (store_local): Improved verification message.
5382         * verify.c (do_branch_op): If the merging is invalid, the method
5383         is unverifiable and not invalid. Improved error message.
5385         * verify.c (merge_stacks): Properly merge a boxed valuetype and
5386         a reference type diferent than System.Object. Improved error
5387         message.
5389 2008-02-07 Rodrigo Kumpera  <rkumpera@novell.com>
5391         * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
5393         * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
5394         type of an enum even if the argument is byref.
5396         * verify.c: Replace all explicit uses of enumtype and enum_basetype
5397         to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
5399         * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
5401         *verify.c (verify_type_compatibility_full): Make enum types
5402         compatible with their base types.
5404         * verify.c (is_compatible_boxed_valuetype): Added. Check if both
5405         types are compatible for the special case of a boxed valuetype and
5406         System.Object.
5408         * verify.c (verify_stack_type_compatibility): The function
5409         is_compatible_boxed_valuetype was extracted from here.
5411         * verify.c (push_arg): Only set ctx->has_this_store if the method
5412         is not static.
5414         * verify.c (do_ldelem): Fixed a typo in an error message and added
5415         strict check for mixing int32 and native int as the array type
5416         and ldelem type.
5418         * verify.c (merge_stacks): Consider boxed valuetypes in the
5419         compatibility checks.
5421 2008-02-07  Massimiliano Mantione  <massi@ximian.com>
5422         * profiler.h: (MonoGCEvent): Added start-stop the world events.
5424 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
5425         *class.c: use_new_interface_vtable_code: renamed the env var to have
5426         a "MONO_" prefix, and fix the logic to enable it by default.
5428 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
5429         *class.c:
5430         mono_class_setup_vtable_general: rewrote the way in which interface
5431         methods are added to vtables. Makes bug-77127.exe pass, and hopefully
5432         makes the code more maintainable.
5433         For now the old code is still there, and can be activated setting
5434         the env var "USE_NEW_INTERFACE_VTABLE_CODE".
5436 2008-02-06 Rodrigo Kumpera  <rkumpera@novell.com>
5438         * verify.c: guarded some debug functions around and #ifdef.
5440         * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
5442 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
5444         * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
5445         changes for now since they seem to break too many things.
5447 2008-02-05  Mark Probst  <mark.probst@gmail.com>
5449         * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
5450         mono_marshal_find_nonzero_bit_offset): Added macro and function
5451         for finding the byte- and bit-offset of a bitfield within a
5452         struct.
5454 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
5456         * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
5457         (mono_marshal_get_struct_to_ptr): Ditto.
5459         * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of 
5460         cctor_signature.
5462 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
5464         * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
5465         between methods for non-corlib types.
5467 2008-02-02  Geoff Norton  <gnorton@novell.com>
5469         * loader.c (mono_method_get_param_names): Populate the parameter name for 
5470         generic parameters as well. (Fixes #342536)
5472 2008-01-31 Rodrigo Kumpera  <rkumpera@novell.com>
5474         * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
5476         * verify.c (do_invoke_method): Fix for calling with byref structs.
5478         * verify.c (do_cast): push a boxed value type based on the type token and not
5479         the type of stack.
5481 2008-01-31  William Holmes  <billholmes54@gmail.com>
5483         * process.c (process_module_string_read): Check the size returned form 
5484           VerQueryValue to avoid out of memory exception. 
5486 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
5488         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
5489         Handle properly modules which are not in the moduleref table. Fixes
5490         #356938.
5492 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
5494         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
5495         the dynamic case which is now in managed code.
5496         (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
5498         * marshal.c (mono_string_to_bstr): Fix a warning.
5499         (init_com_provider_ms): Ditto.
5501         * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
5503         * exception.c (mono_get_exception_out_of_memory): New helper function.
5505 2008-01-28  Jonathan Chambers  <joncham@gmail.com>
5507         * marshal.c: Add support for BSTR marshalling
5508         using other COM systems.
5510         Code is contributed under MIT/X11 license.
5512 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
5514         * object.c (mono_runtime_invoke_array): reverted previous
5515         commit as it breaks the build.
5517 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
5519         * object.c (mono_runtime_invoke_array): Verify arguments for
5520         invalid types. Fixes #348522.
5522 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
5524         * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
5525         non-final virtual calls using call. 
5527         * verify.c (do_invoke): fixed some TODOs.
5529         * verify.c (push_arg): set has_this_store for "ldarga 0".
5531 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
5533         * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
5534         which belong to an inflated class. Fixes #356531.
5536 2008-01-26  Robert Jordan  <robertj@gmx.net>
5538         * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
5539         which resort to FindFirstFile when a certain error condition
5540         (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
5541         Code is contributed under MIT/X11 license.
5543 2008-01-24  Jonathan Chambers  <joncham@gmail.com>
5545         * marshal.c (emit_marshal_string): Fix out string marshalling
5546         to use specified encoding. Fixes #323900.
5548         Code is contributed under MIT/X11 license.
5550 2008-01-24  Raja R Harinath  <harinath@hurrynot.org>
5552         * class.c (mono_class_inflate_generic_method_full): Don't modify
5553         iresult->context after cache check.
5555 2008-01-23  Zoltan Varga  <vargaz@gmail.com>
5557         * class.c (mono_class_inflate_generic_method_full): Change the
5558         struct assignments to memcpy for better visibility and add some comments.
5560 2008-01-23  Dick Porter  <dick@ximian.com>
5562         * threads.c (mono_threads_set_shutting_down): Simplify shutdown
5563         procedure, and make it work on windows.
5565 2008-01-22  Zoltan Varga  <vargaz@gmail.com>
5567         * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
5568         a MonoReflectionTypeBuilder since it is always of that type.
5570         * reflection.c (mono_type_get_object): Remove an unneccesary check.     
5572         * reflection.c (mono_generic_class_get_object): Simplify this a bit.
5574         * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
5575         
5576         * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
5578         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
5580         * reflection.c (mono_reflection_create_runtime_class): Remove already created
5581         instantiations from the type cache.
5583 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
5585         * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
5587         * verify.c (do_unbox_value): push a controled mutability managed pointer.
5589 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
5591         * verify.c (do_ldstr): added, verifies if the #US token is valid.
5593         * verify.c (mono_method_verify): removed old TODO
5595 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
5597         * verify.c (do_newobj): add visibility check.
5599 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
5601         * verify.c (do_load_function_ptr): add visibility check.
5603 2008-01-21  Massimiliano Mantione  <massi@ximian.com>
5604         *class.c:
5605         mono_generic_class_get_class: hook profiler events.
5606         mono_field_get_offset: added to support heap-shot in the new profiler.
5607         *class.h: exported mono_field_get_offset.
5608         * reflection.c:
5609         mono_reflection_setup_internal_class: hook profiler events.
5611 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
5613         * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
5614         argument here too and use it to avoid checking for pending exceptions if 
5615         possible.
5617 2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>
5619         * assembly.c (build_assembly_name): add arg for passing the assembly
5620         flags. Do not consider a PublicKey with value "null" valid.
5621         (mono_assembly_name_parse_full): added boolean argument that will be
5622         set if the assembly name contains a PublicKeyToken spec. Added support
5623         for the Retargetable spec for which only Yes or No are allowed as valid
5624         value. Consider assembly name invalid if Retargetable spec is set, but
5625         either version, culture or public key (token) are not specified.
5626         * metadata-internals.h: sync signature of mono_assembly_name_parse_full
5627         with implementation in assembly.c.
5628         * icall.c (fill_reflection_assembly_name): also copy assembly flags
5629         from MonoAssemblyName.
5630         (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
5631         introduced argument for mono_assembly_name_parse_full to know if the
5632         assembly name has a PublicKeyToken spec, and if it has instruct
5633         fill_reflection_assembly_name to use default value for keyToken (if
5634         PublicKeyToken is null).
5636 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
5638         * verify.c (mono_method_verify): fixed ovf ops with
5639         float values. They are unverifiable now.
5641 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
5643         * class.c (set_failure_from_loader_error): add BadImageException to the
5644         list of exceptions that can cause a type to fail to load.
5646         * class.c (mono_class_get_exception_for_failure): same.
5648 2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
5650         * verify.c (in_any_exception_block): added, check if offset
5651         is part of any exception handling clause.
5653         * verify.c (get_stack_type): added VAR and MVAR types.
5655         * verify.c (do_stobj): better error messages.
5657         * verify.c (do_cpobj): added, check cpobj.
5659         * verify.c (do_initobj): added, check initobj.
5661         * verify.c (do_sizeof): added, check sizeof.
5663         * verify.c (do_localloc): added, check localloc.
5665         * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
5667 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
5669         * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
5670         save_lmf/restore_lmf opcodes.
5672         * threads.c (mono_threads_install_notify_pending_exc): New function to
5673         install a callback notifying the JIT there is a pending exception on a thread.
5674         (mono_thread_request_interruption): Call the new callback.
5675         (mono_thread_get_and_clear_pending_exception): New function to return the
5676         exception pending on a thread.
5678         * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
5679         to turn off checking for pending exceptions.
5680         (mono_marshal_get_native_wrapper): Ditto.
5682 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5684         * threads-types.h: Get rid of the unnecessary extern declarations.
5686 2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>
5688         * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
5689         return field from parent class if not private.
5690         (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
5691         returns fields from parent class if they are not private.
5692         (method_nonpublic): added function to determine if a given method
5693         should be considered non-public. Returns false for private methods
5694         on parent class, and internal methods from parent on the 1.0 profile.
5695         (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
5696         use method_nonpublic function to determine whether method should be
5697         returned.
5698         (property_accessor_public): use newly introduced method_nonpublic
5699         function to determine whether accessor is non-public. 
5700         (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
5701         event from parent class if not private. Only return static event if
5702         Static flag is set, and only return static event from parent class if
5703         FlattenHierarchy flag is set.
5704         (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
5705         include non-private events from parent class.
5707 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5709         * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
5710         warning.
5712 2008-01-16  Wade Berrier <wberrier@novell.com>
5714         * security.c: Add assembly.h header to appease some warnings
5716 2008-01-16  Dick Porter  <dick@ximian.com>
5718         * process.c (process_module_string_read): Remove trailing null
5719         when saving string.
5721 2008-01-16  Mark Probst  <mark.probst@gmail.com>
5723         * class-internals.h: A new data structure describing the layout of
5724         a runtime generic context (MonoRuntimeGenericContextTemplate).
5726         * metadata-internals.h: Added a hash table to MonoDomain that maps
5727         from open generic classes to their runtime generic context
5728         templates.
5730         * object.c: Building of the runtime generic context, including
5731         proper handling of generic type arguments of superclasses.
5732         Building of the runtime generic context according to the template.
5734 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
5736         * class.c (mono_class_setup_fields): Set field.count for generic instances.
5737         Fixes #350856.
5739         * image.c (do_mono_image_open): Pass TRUE as last_exists to 
5740         mono_portability_find_file (). Fixes #325466.
5741         (mono_image_get_public_key): Fix a warning.
5743 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
5745         * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
5746         Fixes #353550.
5747         (mono_class_from_name_case): Ditto.
5749 2008-01-13  Eyal Alaluf <eyala@mainsoft.com>
5751         * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
5752           common storage for the tables used in the System/NumberFormatter class.
5754 2008-01-13  Zoltan Varga  <vargaz@gmail.com>
5756         * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
5758 2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
5760         * verify.c (get_boxable_mono_type): check if the token is valid.
5762         * verify.c (set_stack_value): changed to add an error if an
5763         invalid type is set on stack. Changed all callers due to signature change.
5765         * verify.c (do_stobj): implement stobj validation.
5767 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
5769         * reflection.c (reflection_methodbuilder_to_mono_method): No need to
5770         set container->is_method, it was set earlier.
5772         * metadata.c (type_in_image): Handle MVARs which belong to not finished
5773         generic methods.
5775         * reflection.c (mono_reflection_initialize_generic_parameter): Set
5776         is_method of the generic container to TRUE for methods.
5778 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
5780         * metadata.c (type_in_image): Handle type parameters properly.
5782         * class-internals.h (MonoGenericParam): Add an 'image' argument to track
5783         memory ownership of this structure.
5785 2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
5787         * verify.c (get_boxable_mono_type): make typedref types been just
5788         unverifiable. check for void type.
5790         * verify.c (do_unbox_any): added, verify opcode unbox.any.
5792         * verify.c (do_load_function_ptr): accept method spec tokens.
5794 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
5796         * marshal.c (mono_class_native_size): Always set *align even if this is called
5797         recursively.
5799 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
5801         * verify.c (mono_verify_corlib): Remove this as it was not used and was 
5802         out-of-date.
5804 2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
5806         * verify.c: removed some old unused tables. A huge bunch of small fixes
5807         to things found while testing the verifier with mono basic.
5809         * verify.c (dump_stack_value): dump null literal flag to.
5811         * verify.c (verify_type_compatibility_full): fix comparison
5812         for types that have a generic super type.
5814         * verify.c (verify_stack_type_compatibility): fix compatibility
5815         between null literals and reference types. fix compatibility between
5816         boxed valuetypes and object. fix corner case test for enums.
5818         * verify.c (do_cmp_op): proper verification of cgt.un in case
5819         of reference types.
5821         * verify.c (do_invoke_method): fix error message.
5823         * verify.c (do_store_indirect
5825         * verify.c (check_is_valid_type_for_field_ops): proper verification
5826         of managed pointers to valuetypes and boxed valuetypes. proper verification
5827         of null literals.
5829         * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
5830         allow token to be a reference type.
5832         * verify.c (do_cast): proper handling of boxes valuetypes.
5834         * verify.c (do_stelem): proper handling of storing a boxed valuetype
5835         in object[].
5837         * verify.c (mono_method_verify): pass the opcode to do_cmp_op
5838         to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
5839         fixed the decoding of unbox_any
5841 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
5843         * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
5845 2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
5847         * verify.c (do_newobj): do delegate verification.
5849         * verify.c (verify_delegate_compatibility): perform delegate
5850         verification.
5852         * verify.c (verify_ldftn_delegate): perform tests related to
5853         ldftn delegates.
5855         * verify.c (mono_delegate_signature_equal): perform the
5856         slightly diferent signature comparison required by delegates.
5858         * metadata.c (mono_metadata_type_equal_full): added and exported
5859         as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
5860         allows signature only comparison.
5862         * metadata-internal.h (mono_metadata_type_equal_full): added and exported
5863         as MONO_INTERNAL.
5865 2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
5867         * verify.c: added a bunch of stack_slot_* functions to
5868         make access to stack slot type easier. This is required to
5869         allow optional flags, like null literal, boxed value and
5870         this pointer.
5871         All access paths to IlStackDesc::stype have been changed 
5872         to use these new funcions.
5873         Removed a bunch of unused functions and cleared all warnings.
5874         This patch introduces the usage of the this pointer and 
5875         boxed value flags.
5877 2008-01-07  Zoltan Varga  <vargaz@gmail.com>
5879         * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
5881 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
5883         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
5884         match managed version.
5886         * appdomain.c: Bump corlib version.
5887         
5888         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
5889         argument.
5891 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
5893         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
5894         Set public key token to zero-length byte array if assembly is not
5895         strongnamed.
5897 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
5899         * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
5900         writing a vtype array elem.
5902 2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
5904         * assembly.c (build_assembly_name): return FALSE if length of token is
5905         not 16 (if not "null").
5906         (mono_assembly_name_parse_full): return FALSE if value of version,
5907         culture, token or key is 0.
5908         * icall.c (fill_reflection_assembly_name): add boolean arguments to
5909         specify whether public key and public key token must be set to default
5910         value (zero-length byte array) if not available. Set versioncompat to
5911         SameMachine. If public key is available or the default is set, then
5912         set PublicKey flag.
5913         (ves_icall_System_Reflection_Assembly_FillName): if no public key
5914         is available, use empty byte array as default value. On the 2.0
5915         profile, use default value for public key token if not set.
5916         (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
5917         profile, use default value for public key if not set. On the 2.0
5918         profile, use default value for public key token if not set.
5919         (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
5920         default values for public key and public key token.
5922 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
5924         * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
5925         field to keep it in synch with the managed object.
5927         * marshal.c (emit_marshal_object): Add support for byref marshalling of
5928         delegates. Fixes #351520.
5930         * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
5931         contains defined memory.
5932         
5933         * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
5935         * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
5936         
5937         * sgen-gc.c (check_consistency): New helper function to do a consistency check
5938         of the GC data structures.
5940         * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
5942         * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
5943         
5944         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
5945         barrier.
5946         (mono_array_clone_in_domain): Ditto.
5947         (mono_array_clone_in_domain): Ditto.
5949         * threads.c (start_wrapper): Register the thread start argument as a GC root.
5950         (cache_culture): Use a write barrier.
5952         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
5953         (ves_icall_get_property_info): Ditto.
5955         * object.h (MONO_STRUCT_SETREF): New macro.
5957         * class-internals.h (MonoStats): Add some GC statistics.
5959         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
5961 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
5963         * exception.c (mono_exception_from_name_two_strings):
5964         Break from loop after method is found.
5966 2008-01-04  Dick Porter  <dick@ximian.com>
5968         * process.c (process_module_string_read): Rename variable to
5969         reflect correct usage, after fixing bug 345972.
5971 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
5973         * verify.c (mono_type_create_fnptr_from_mono_method): 
5974         created a MonoType function pointer instance to be used during
5975         verification. The verifier releases this memory at end.
5977         * verify.c (mono_method_is_constructor): extracted repeated
5978         checks for constructor into a single class.
5980         * verify.c (do_push_field): use new extracted method
5981         for constructor check.
5983         * verify.c (do_newobj): same.
5985         * verify.c (do_ldftn): renamed to do_load_function_ptr
5986         and make it verify ldvirtftn too.
5988         * verify.c (mono_method_verify: proper verification
5989         of ldvirtftn. release created MonoMethod instances.
5991 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
5993         * verify.c (token_bounds_check): added.
5995         * verify.c (do_ldftn): added.
5997         * verify.c (mono_method_verify): proper verificartion of ldftn.
5999 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
6001         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
6002         than the table row count. It's the resposibility of the caller to
6003         make the bounds check and raise the correct error.
6005         * metadata.c (mono_metadata_decode_row_col): Same.
6007         * loader.c (mono_get_method_from_token): perform bounds check
6008         on token for methoddef table.
6010 2007-12-29  Miguel de Icaza  <miguel@novell.com>
6012         * icall.c
6013         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
6014         assert into a negative result, the managed code already coped with
6015         that.
6017         Some folks on Windows reported this error. 
6019 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
6021         * appdomain.c: Bump corlib version.
6022         * icall.c:
6023         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
6024         CultureInfo.CreateCulture to create CultureInfo for name.
6025         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
6026         create CultureInfo for name. Fixes bug #347174.
6028 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
6030         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
6031         flags.
6033         * verify.c (is_valid_branch_instruction): allow branching to the
6034         first instruction of the protected block.
6036         * verify.c (is_valid_cmp_branch_instruction): same.
6038         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
6039         avoid double initialization.
6041         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
6042         detect which cases the eval stack should just be copied.
6044         * verify.c (mono_method_verify): check if the eval stack
6045         is empty when entering a protected block.
6047 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
6049         * verify.c: added is_clause_in_range, is_clause_inside_range,
6050         is_clause_nested and verify_clause_relationship. They perform
6051         the verifications stated in P1 12.4.2.7.
6053         * verify.c (mono_method_verify): remove some unused variables,
6054         add the new exception clause checks, add instruction border
6055         checks for protected block start/end, improved some error 
6056         messages and fixed a bug in the way invalid instruction access
6057         is detected.
6059 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
6061         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
6062         from GC 7.0 if available.
6064         * object.c: Remove an unused define.
6065         
6066         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
6068         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
6070         * null-gc.c (mono_gc_make_descr_for_array): Implement.
6072         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
6074         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
6075         to take the same arguments as the other make_descr functions.
6077         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
6079         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
6080         directly.
6082         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
6083         mini.c.
6085         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
6086         call to boehm-gc.c.
6088         * boehm-gc.c (mono_gc_register_root): Fix a warning.
6090         * null-gc.c (mono_gc_register_root): Fix a warning.
6092         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
6094         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
6095         (mono_gc_base_init): Call GC_init ().
6097         * null-gc.c: Define mono_gc_register_root () as a no-op.
6099         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
6101 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
6103         * verify.c: add prototype for merge_stacks at top
6105         * verify.c (do_switch): added.
6107         * verify.c (merge_stacks): on some cases the stack merging
6108         was not happening properly. Unequal stack sizes at merge
6109         points should be invalid.
6111         * verify.c (mono_method_verify): added more debug info on stack state.
6112         verify switch properly.
6114 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
6116         * method-builder.h: New file, moved the mono_mb_ declarations here from 
6117         marshal.h.
6119         * boehm-gc.c marshal.c: Include method-builder.h.
6121         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
6123         * marshal.c: Remove some code which is now in method-builder.c.
6125 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
6127         * method-builder.c: New file, extraction of the method builder functionality 
6128         from marshal.c.
6130         * marshal.c: Move the mb functions into method-builder.c.
6132         * marshal.h marshal.c: Export some mono_mb_... functions.
6134         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
6136         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
6137         the caller.
6139         * class.c (mono_class_get_full): Check the token type in the dynamic case.
6141         * loader.c (mono_field_from_token): Ditto.      
6143         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
6144         type as well.
6145         
6146         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
6147         Fixes #342565.
6149         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
6150         a helper function for setting it.
6152         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
6154         
6155         * assembly.c: Significally simplify code now that referenced assemblies are 
6156         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
6158         * threads.h: Don't include  the internal threads-types.h header file. Fixes
6159         #349952.
6161 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
6163         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
6164         instructions that were target of branches or are at protected block boundaries.
6166         * verify.c (in_same_block): handle filter clauses.
6168         * verify.c (is_valid_branch_instruction): added. checks the target of
6169         instructions br or brtrue/false.
6171         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
6172         binary branch instructions such as beq and bge.
6174         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
6175         and made it pin the instruction as been part of the exception block.
6177         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
6178         of in_same_block.
6180         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
6181         of in_same_block.
6183         * verify.c (do_ret): ret from a protected block is unverifiable and
6184         not invalid.
6186         * verify.c (do_static_branch): verify br and br.s instructions.
6188         * verify.c (merge_stacks): add extra param to support detection
6189         of branches in the middle of instructions.
6190         
6191         * verify.c (mono_method_verify): verify branches and exception blocks
6192         that target the middle of instructions. Proper verification of br and br.s.
6194 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
6196         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
6197         skip_visibility field.
6198         (reflection_methodbuilder_from_dynamic_method): Ditto.
6200         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
6201         registrations. Fixes #348193.
6203         * threads.h: Move the internal mono_thread_get_pending_exception () to
6204         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
6206 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
6208         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
6209         icall registration. Fixes #348193.
6211         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
6212         for corlib classes into object. Fixes #349621.
6214 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
6216         * icall.c (property_accessor_nonpublic): new function to determine
6217         whether an accessor allows a property to be considered non-public.
6218         Returns false for private accessor(s) from parent class, and internal
6219         accessor(s) from parent on 2.0 profile (and higher).
6220         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
6221         to determine whether property should be included if NonPublic flag
6222         is set. Fixes bug #349078.
6224 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
6226         * verify.c (init_stack_with_value): added.
6228         * verify.c (mono_method_verify): extracted common
6229         code for exception initialization into init_stack_with_value.
6231         * verify.c (mono_method_verify): initialize the exception
6232         for handler clauses as well.
6234         * verify.c (mono_method_verify): fix the exception clause
6235         ordering rules, it should use handler end offset and not
6236         start offset.
6238 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
6240         * rawbuffer.c: remove useless warning.
6242 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
6244         * threads.h, threads-types.h: move functions to the correct header
6245         (fixes bug#349952).
6247 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
6249         * verify.c (mono_method_verify): proper verification
6250         of exception handling clauses ranges and fallthru in
6251         and out of protected blocks.
6253 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
6255         * verify.c (mono_method_verify): fixed compilation issue.
6257 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
6259         * verify.c (mono_method_verify): a printf slipped in, changed
6260         to use verifier debug macro.
6262 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
6264         * verify.c (is_correct_leave): check for filter clauses.
6266         * verify.c (do_filter): added.
6268         * verify.c (mono_method_verify): property verification of leave.
6271 2007-12-18  Mark Probst  <mark.probst@gmail.com>
6273         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
6274         Win32 build, until we figure out how to do the proper thing on
6275         Win32.
6277 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
6279         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
6280         by the previous patch.
6281         
6282         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
6283         the assembly resolve handler for refonly assemblies.
6285 2007-12-17  Mark Probst  <mark.probst@gmail.com>
6287         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
6288         Make sure only one thread is allowed to commence shutdown, and
6289         don't allow new threads to be started once shutdown is in
6290         progress.
6292 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
6294         * verify.c (is_correct_endfilter): added.
6296         * verify.c (is_unverifiable_endfilter): added.
6298         * verify.c (do_endfilter): added.
6300         * verify.c (mono_method_verify): property verification of endfilter
6301         and fixed a corner case or endfinally.
6303 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
6305         * verify.h: new flags to support fail fast of unverifiable code and
6306         do non-strict verification. Non-strict verification is required to
6307         have MS runtime compatibility. There are a huge amount of unverifiable
6308         code that it accepts as verifiable. The strict mode verifies the code
6309         as the specs says.
6310         Non-strict mode will be required in cases where code needs to be
6311         accepted as verifiable but fails under strict mode.
6313         * pedump.c: added support to fail fast and non-strict verification.
6315         * verify.c: added support for both fail fast and non-strict verification.
6317 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
6319         * verify.c (is_correct_endfinally): added.
6321         * verify.c (mono_method_verify): property verification of endfinally.
6323 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
6325         * verify.c (in_any_block): check for filter clauses.
6327         * verify.c (is_correct_rethrow): added.
6329         * verify.c (mono_method_verify): property verification of rethrow.
6331         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
6333 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
6335         * verify.c (do_throw): added.
6337         * verify.c (mono_method_verify): property verification of throw
6339 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
6341         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
6342         assemblies. Fixes #346425.
6344 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
6346         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
6347         FieldBuilders.
6349         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
6351         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
6352         prevent asserts when this is called with a token which might not be valid.
6354         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
6355         lookup_dynamic_token_class with valid_token == FALSE.
6357         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
6359         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
6361         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
6362         
6363 2007-12-10  Mark Probst  <mark.probst@gmail.com>
6365         * gc.c: Don't delay threadpool thread finalization unless Mono is
6366         shutting down.
6368 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6370         * threads.c: turn an assert into a non-fatal warning.
6372 2007-12-09  Robert Jordan  <robertj@gmx.net>
6374         * icall.c (GetVirtualMethod): Add missing argument validation.
6376 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
6378         * verify.c (do_cast): added.
6380         * verify.c (mono_method_verify): property verification of castclass and isinst.
6383 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
6385         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
6387         * verify.c (do_stelem): added.
6389         * verify.c (mono_method_verify): property verification of stelem.X.
6391 2007-12-07  Mark Probst  <mark.probst@gmail.com>
6393         * class.c, class-internals.h: Introduce an environment variable
6394         (MONO_GENERIC_SHARING) through which the extent of generic code
6395         sharing can be controlled (share all classes, share only corlib
6396         classes, or share nothing).
6398         * object.c: Only create runtime generic context for classes for
6399         which sharing is enabled.
6401 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
6403         * verify.c (do_ldelem): refactor it to work with ldelem.any.
6405         * verify.c (mono_method_verify): property verification of ldelem.any.
6407 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
6409         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
6410         added ldelem.X opcodes.
6412         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
6414         * verify.c: proper verification of ldelem.X 
6416 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
6418         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
6420 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6422         * verify.c (mono_method_verify): null literal requires special handling,
6423         the value pushed on stack need to be flagged as so.
6425         * verify.c (do_ldelema): Verify ldelema properly.
6427 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6429         * verify.c: Verify ldlen properly.
6431 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
6433         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
6434         to the target object's type. Fixes #346160.
6436 2007-12-05  Dick Porter  <dick@ximian.com>
6438         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
6439         Solaris needs the same workaround as BSD-derived systems.  Fixes
6440         bug 323524, patch by Burkhard Linke
6441         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
6443 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
6445         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
6446         handle to use when error dialog is shown; otherwise, update mask
6447         to show no error dialog when an error occurs.
6449 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
6451         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
6453         * class.c (mono_class_get_field_default_value): New helper function to initialize
6454         field->def_type and field->data.
6456 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
6458         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
6459         the general one.
6461         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
6463         * marshal.c: Avoid depending on delegate->method_info being set.
6465         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
6466         
6467         * object.c (mono_delegate_ctor): Set delegate->method.
6469         * object-internals.h (struct _MonoDelegate): Add 'method' field.
6471         * appdomain.c: Bump corlib version.
6473 2007-11-27  Raja R Harinath  <harinath@gmail.com>
6475         * metadata.c (mono_generic_inst_equal_full): Short-circuit
6476         equality check if we're comparing canonicalized MonoGenericInsts.
6478 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
6480         * class.c (generic_array_methods): Call mono_class_setup_methods () before
6481         accessing class->methods.
6483 2007-11-22  Dick Porter  <dick@ximian.com>
6485         * threads.c: Ensure that the synch_cs is set before trying to use
6486         it.
6488 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
6490         * profiler.c: r89126 broke the statistial profiler, unbreak.
6492 2007-11-22  Martin Baulig  <martin@ximian.com>
6494         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
6496         * mono-debug.c
6497         (mono_debug_debugger_version): Bump to 3.
6498         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
6499         -> mono_debugger_class_initialized().
6501         * mono-debug-debugger.c
6502         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
6504         * class.c
6505         (mono_debugger_start_class_init_func): Removed.
6506         (mono_debugger_class_loaded_methods_func): Added.
6507         (mono_class_setup_methods): Call it here.
6509 2007-11-22  Martin Baulig  <martin@ximian.com>
6511         * mono-debug.c
6512         (mono_debug_add_delegate_trampoline): New public method.
6513         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
6515         * mono-debug.h
6516         (MonoSymbolTable): Added `global_data_table'.
6517         (MonoDebuggerTypeKind): Removed.
6519 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
6521         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
6522         these methods.
6524         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6525         
6526 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
6528         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
6530 2007-11-20  Martin Baulig  <martin@ximian.com>
6532         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
6534         * mono-debug-debugger.c
6535         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
6536         (mono_debugger_remove_breakpoint): Likewise.
6537         (mono_debugger_check_breakpoints): Likewise.
6538         (mono_debugger_register_class_init_callback): New public method.
6539         (mono_debugger_remove_class_init_callback): Likewise.
6540         (mono_debugger_add_type): Likewise.
6542         * mono-debug-debugger.h
6543         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
6545 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
6547         * class.c: more interface implementations needed for the
6548         array enumerator (fixes bug #341112).
6550 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
6552         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
6553         fix ParamName of ArgumentNullExceptions.
6555 2007-11-17  Miguel de Icaza  <miguel@novell.com>
6557         * reflection.c (mono_reflection_encode_sighelper): Generate the
6558         modopts and modreqs.   I have a useless test that crashes monodis,
6559         but that shows the code working.
6561 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
6563         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
6564         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
6566 2007-11-15  Dick Porter  <dick@ximian.com>
6568         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
6569         When joining a thread, it's the thread that's calling Join that
6570         gets WaitSleepJoin state not the target.  Fixes the standalone
6571         test case in bug 334740, and hopefully the whole bug too.
6573 2007-11-15  Dick Porter  <dick@ximian.com>
6575         * process.c: Read file version info from the files pointed at by
6576         process modules, not the current process.  Fixes bug 315969.
6578         Use windows typedef names in some places to fix warnings on the
6579         windows build.
6581 2007-11-15  Mark Probst  <mark.probst@gmail.com>
6583         * image.c, metadata-internals.h: Added a generic_class_cache hash
6584         to MonoImage for looking up generic classes when sharing generics.
6586 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6588         * sgen-gc.c: warning cleanups.
6590 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
6592         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
6593         inherited properties.
6595 2007-11-14  Mark Probst  <mark.probst@gmail.com>
6597         * object.c, class-internals.h: Added more information to the
6598         runtime generic context.
6600 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
6602         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
6603         instead of just the target method. Generalize the abstract method handling to
6604         handle any non-static method.
6606         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
6607         mono_marshal_get_delegate_invoke () signature change.
6609 2007-11-13  Mark Probst  <mark.probst@gmail.com>
6611         * class.c, class-internals.h: Made
6612         mono_type_get_basic_type_from_generic () public.  Fixed member
6613         access check for shared generics.
6615         * loader.c: Don't insert field into field cache if it's part of a
6616         non-inflated generic class.
6618         * domain.c, domain-internals.h: The generic sharing context is now
6619         part of the jit info data structure.  Added two accessor
6620         functions.
6622 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
6624         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
6625         the array Get/Set/Address methods, since the JIT inlines them.
6627         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
6629         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
6630         (mono_image_init): Initialize runtime_invoke_direct_cache.      
6632         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
6633         mono_marshal_get_delegate_invoke signature change.
6635         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
6636         an additional argument. Add support for invoking abstract methods.
6638         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
6640         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
6642 2007-11-09  Mark Probst  <mark.probst@gmail.com>
6644         * class.c: Do field layout for open generic classes as well.
6646 2007-11-09  Mark Probst  <mark.probst@gmail.com>
6648         * gc.c, gc-internal.h: Don't finalize threadpool threads with
6649         other objects, because the threadpool is still around.  Put them
6650         in a list instead and after finalizing all other objects in the
6651         root domain shut down the thread pool and then finalize the
6652         threads.  Fixes bug #337383.
6654         * threads.c, thread-types.h: New mono_thread_create_internal()
6655         function for marking a thread with the threadpool flag before it
6656         started.  Set synch_cs to NULL after freeing it.
6658         * threadpool.c: Mark threadpool threads before they start.
6660 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6662         * reflection.h, reflection.c: don't export random functions
6663         and lazy load dbnull and missing objects.
6665 2007-11-07  Jonathan Chambers <joncham@gmail.com>
6667         * class.c: Initialize COM types if COM interfaces
6668         are present (not just COM classes).
6669         
6670         Code is contributed under MIT/X11 license.
6672 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
6673         * reflection.c:
6674         create_dynamic_mono_image: hook module profiler events (dynamic case).
6675         mono_image_basic_init: hook assembly profiler events (dynamic case).
6677 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
6678         * profiler.c:
6679         simple_appdomain_unload: completely terminate the profiler
6680         instead of only processing the statistical samples.
6681         simple_shutdown: make sure this is really called exactly once,
6682         even in multithreaded applications, and always listen to
6683         appdomain events.
6684         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
6685         here, the "[un]load" functions will do it.
6686         Fixes bugs #333791 and #325261.
6688 2007-11-07  Geoff Norton  <gnorton@novell.com>
6690         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
6691         rather than depend on __APPLE__.
6693 2007-11-07  Mark Probst  <mark.probst@gmail.com>
6695         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
6697 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
6699         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
6700         UTF16 MonoString. Fix the crash from bug #335488
6702 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
6704         * marshal.c: Correct (for non-Win32 OS) length != size in 
6705         mono_string_from_bstr. Fix #339530.
6707 2007-11-06  Geoff Norton  <gnorton@novell.com>
6709         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
6710         to succeed
6712 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
6714         * process.c: Added run-time GetProcessId API detection for Windows.
6716 2007-11-04  Miguel de Icaza  <miguel@novell.com>
6718         * reflection.c  (mono_param_get_objects): If a parameter has the
6719         attribute [System.Runtime.InteropServices.Optional] we should
6720         set the DefaultValue of the ParameterInfo to be
6721         System.Reflection.Missing instead of DBNull.
6723         See bug #339013.
6725         (mono_get_reflection_missing_object): New method,
6726         returns the System.Reflection.Missing.Value singleton instance.
6728 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
6730         * culture-info-table.h : regenerated.
6732 2007-11-02  Jonathan Chambers <joncham@gmail.com>
6734         * icall.c: Use GetEnvironmentStrings on windows
6735         so we are using the same environment block as 
6736         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
6737         #333740.
6738         
6739         Code is contributed under MIT/X11 license.
6741 2007-10-31  Martin Baulig  <martin@ximian.com>
6743         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
6745         * mono-debug-debugger.h
6746         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
6748 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
6750         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
6751         classes.
6753 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
6755         * culture-info-table.h : regenerated.
6757 2007-10-30  Robert Jordan  <robertj@gmx.net>
6759         * icall-def.h, icall.c:
6760         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
6762         Code is contributed under MIT/X11 license.
6764 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
6766         * class.c (mono_class_setup_vtable): Find the inflated methods in the
6767         inflated class instead of inflating them again.
6768         
6769         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
6770         dynamic case.
6772         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
6773         Call setup_supertypes () after klass->parent is set.
6774         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
6776         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
6777         for inflated instances of not yet created dynamic generic classes.
6778         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
6779         times from inflated_method.
6780         (methodbuilder_to_mono_method): Ditto.
6782 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
6784         * gc.c: code cleanup and removed old untested option of not creating the
6785         finalizer thread.
6787 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
6789         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
6790         creating a jump trampoline for dynamic methods.
6792 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
6794         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
6795         generic TypeBuilders when called from another method of the same type (bug #335131).
6798 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
6800         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
6801         doesn't seem to work perfectly.
6802         
6803         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
6804         called multiple times.
6805         (methodbuilder_to_mono_method): Ditto.
6806         (resolve_object): Inflate FieldBuilder's.
6808 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6810         * string-icalls.c, string-icalls.h, appdomain.c: patch from
6811         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
6812         RemoveEmptyEntries in the string.Split implementation (bug #322375).
6814 2007-10-26  Dick Porter  <dick@ximian.com>
6816         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
6817         Thread initialisation changes
6819 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
6821         * verify.c: fix compatibility check between arrays and System.Array
6823 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
6825         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
6826         too. Fixes #336999.
6828 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
6830         * object.c (mono_value_box): Use typed allocation here.
6832 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
6834         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
6835         trampoline instead of compiling the method right away.
6837         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
6839 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
6841         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
6842         related fields for dynamic classes. Fixes #334493.
6844 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
6846         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
6847         
6848         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
6850         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
6851         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
6853         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
6855         * reflection.c (create_generic_typespec): Initialize klass->generic_container
6856         if needed.
6857         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
6859 2007-10-18  Jonathan Chambers <joncham@gmail.com>
6861         * marshal.c: Use correct key when removing item
6862         from ccw_hash.
6863         
6864         Code is contributed under MIT/X11 license.
6866 2007-10-17  William Holmes  <billholmes54@gmail.com>
6868         *marshal.c: Adding a case to marshal booleans to U1
6870         Code is contributed under MIT/X11 license.
6872 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
6874         * class.c (mono_class_from_name): Search the modules compromising dynamic
6875         assemblies. Fixes #331601.
6877 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
6879         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
6880         exception if the type name contains an assembly component. Fixes #334203.
6882         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
6883         modules inside dynamic assemblies. Fixes #334200.
6884         
6885         * reflection.c: Set image->public_key and image->public_key_length;
6887         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
6888         fields.
6890         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
6891         
6892 2007-10-16  Mark Probst  <mark.probst@gmail.com>
6894         * metadata.c: Implemented correct comparing of generic classes.
6895         An inflated generic class can be equal to a non-inflated one if it
6896         is inflated with generic type variables as type arguments.  Fixes
6897         bug #333798.
6899 2007-10-15  Dick Porter  <dick@ximian.com>
6901         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
6902         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
6903         81646.
6905         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
6906         instead of a monitor lock.  This means that monitor_try_enter and
6907         co can set the thread state safely.
6908         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
6909         thread_interrupt_requested, so interrupt actually works.
6911         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
6912         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
6913         state accessor function
6915 2007-10-15  Martin Baulig  <martin@ximian.com>
6917         * mono-debug.h
6918         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
6919         the debugger with the current runtime.
6921 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6923         * object.c, object-internals.h: added the ability to set a single
6924         trampoline for all the slots in a vtable.
6926 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6928         * marshal.c: deal with a possible race condition during multicast
6929         delegate invocation.
6931 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6933         * class.c: ensure value type methods don't have the synchronized
6934         flag set.
6936 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6938         * string-icalls.c, string-icalls.h: reverted unapproved patch that
6939         breaks the build.
6941 2007-10-11  Joel Reed  <joelwreed@comcast.com>
6943         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
6944         to take an options parameter so that empty entries can be removed during
6945         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
6947 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6949         * marshal.c: make sure we don't store the signature from a dynamic
6950         method into the runtime invoke cache (bug #327189).
6952 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
6954         * marshal.c: make sure the wrapper methods are properly initialized.
6956 2007-10-11  Mark Probst  <mark.probst@gmail.com>
6958         * metadata.c, metadata-internals.h: Generalized
6959         mono_type_stack_size() to mono_type_stack_size_internal() which
6960         takes an additional argument specifying whether it allows open
6961         types.
6963 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6965         * verify.c (do_invoke_method): handle typedbyref params
6966         correctly and check for unverifiable return values.
6968         * verify.c (do_newobj): fix a warning.
6970 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
6972         * verify.c: don't tread typedbyref as allways unverifable,
6973         so uses, like (ld/st)loc.0 are valid. verify for the cases
6974         that it matters, like boxing related operations.
6976 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
6978         * verify.c: add verification of the newobj opcode. verification
6979         of delegate instantation still missing due ldftn and virldftn not
6980         pushing the function type on stack
6982 2007-10-08  Mark Probst  <mark.probst@gmail.com>
6984         * class-internals.h: Runtime generic context data structure
6985         definition.
6987         * object.c: Initialization of runtime generic context at runtime
6988         vtable creation time.
6990 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
6991         * class.c (mono_class_create_from_typedef,
6992         mono_class_from_generic_parameter, mono_ptr_class_get,
6993         mono_fnptr_class_get, mono_bounded_array_class_get)
6994         * domain.c (mono_domain_create, mono_domain_free)
6995         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
6996         * image.c (do_mono_image_load, mono_image_close):
6997         Hooked up load-unload profiler events.
6999 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7001         * domain.c: track statistics about the actual amount of native code
7002         allocated.
7004 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7006         * class.c: the valuetype enumerators don't have the additional
7007         supertypes interfaces.
7009 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7011         * class.c: need more interfaces setup for the IEnumerator<T>
7012         object created for arrays (tests/ienumerator-interfaces.2.cs).
7014 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
7016         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
7018 2007-10-05  Alp Toker  <alp@atoker.com>
7020         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
7021         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
7022         #315863.
7024 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
7026         * verify.c (verify_type_compatibility_full): verification of
7027         compatibility improved, validates correctly non-strict checks between
7028         native int and I4 types different than (unsigned)int32.
7030         * verify.c (do_store_indirect): added, do all verification of
7031         ldind.X opcodes. 
7033         * verify.c (get_load_indirect_mono_type): renamed to
7034         get_indirect_op_mono_type, as it now returns the MonoType for 
7035         ldind.X and stind.X opcodes.
7037 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
7039         * reflection.c: Fix the encoding of generic type definition for
7040         TypeBuilders.
7042         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
7043         mono_image_typedef_or_ref but allows to specify if typespec lookups should
7044         be made. Typespec check is done prior to typeref cache lookup.
7046         * reflection.c (mono_image_typedef_or_ref): now just delegate to
7047         mono_image_typedef_or_ref_full.
7049         * reflection.c (encode_generic_class): encode the generic class
7050         directly instead of calling encode_type.
7052         * reflection.c (encode_type): encode the generic type definition
7053         MonoClass as a generic instantiation.
7055         * reflection.c (create_typespec): cache typespec tokens in
7056         the assembly->typespec cache. Don't create typespec for a generic
7057         instance MonoClass. Create typespec for the generic type defintion.
7059         * reflection.c (create_generic_typespec): encode the generic
7060         class directly instead of calling encode_type.
7062         * reflection.c (mono_image_create_token): encode the generic
7063         type definition not using a typespec for MonoType instances.
7066 2007-10-04  Raja R Harinath  <rharinath@novell.com>
7068         Fix #328812
7069         * class.c (mono_image_init_name_cache): Don't return nested
7070         'protected internal' classes.
7071         (mono_class_from_name_case): Likewise.
7073 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
7075         * icall-def.h, icall.c : get_bundled_machine_config() is now the
7076           common function used by both DefaultConfig in System.dll and
7077           InternalConfigurationHost in System.Configuration.dll.
7079 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7081         * class.c: automatically add to vectors only a few essential explicit
7082         generic interfaces. The rest of the interfaces that arrays should
7083         provide are currently implicitly added (but still not lazily, see the
7084         design in the discussion of bug#325495 for the details of what is
7085         needed for that). Additionally, implicit interfaces are assigned the
7086         same vtable slot as the explicit interfaces (as they are compatible):
7087         this enables huge memory savings since we don't need to instantiate
7088         as many memthods and as large vtables anymore. Also, Since
7089         GetEnumerator<T> returns an instance of a type that is required to
7090         support a similarly large set of interfaces as arrays, we add
7091         implicit interfaces and interface offset sharing support to those
7092         types, too. This change adds all the required interfaces so that
7093         the anonarray.cs test case in the bug report works (we don't add
7094         all the interfaces to arrays of arrays 3-level deep and more because
7095         of the memory requirements explained in the bug and since they are much
7096         less common: the lazy-loading support will enabled them to work, too).
7098 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
7100         * verify.c (merge_stacks): major clean up, all type compatibility
7101         checks are done by verify_type_compatibility. This fix my earlier lack
7102         of understanding of the CLR type system and merge_stacks no longer looks
7103         scary.
7105         * verify.c: fixed some bad spelling.
7107 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
7109         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
7110         a given stack slock.
7111         
7112         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
7113         verify_type_compatibility_full. This removed a near indentical function and fixed
7114         handling of Int32 and IntPtr across all opcodes.
7116 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7118         * class.c: only vectors have the additional generic interfaces.
7120 2007-10-01  Jonathan Chambers <joncham@gmail.com>
7122         * mono-config.c: Use g_strcasecmp instead of
7123         strcasecmp like everywhere else to fix
7124         compilation with MSVC.
7125         
7126         Code is contributed under MIT/X11 license.
7128 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7130         * object.c, object-internals.h: refactored the IMT code to enable
7131         building a single slot at a time and lazily creating the IMT trampolines
7132         and thunks.
7134 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
7136         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
7138         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
7139         Fixes #328501.
7140         
7141 2007-09-29  Raja R Harinath  <harinath@gmail.com>
7143         * loader.c (method_from_methodspec): Rearrange to avoid
7144         un-necessary exposition.  Don't assert out if the method's
7145         declaring type is a generic type definition.
7147 2007-09-28  Martin Baulig  <martin@ximian.com>
7149         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
7151 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
7153         * class-internals.h: optimize field layout of MonoClass to
7154         requires less cachelines at runtime and save a few bytes on 64 bit
7155         systems.
7157 2007-09-28  Jb Evain  <jbevain@novell.com>
7159         * reflection.c: when encoding type names in custom attributes,
7160         if the type is a closed generic type, its generic arguments
7161         have to be serialized as AssemblyQualifiedName, so that when
7162         they are deserialized, it's possible to re-create them properly.
7163         Fixes #329450.
7166 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7168         * object.c, class-internals.h: added delegate-creation counter.
7170 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7172         * class.c: cleanup of the code that synthetizes interfaces for
7173         arrays in 2.0: saves quit a bit of corlib mempool memory.
7174         Code to fix bug #325495 ifdeffed out for now until the issues
7175         with memory usage and O(n^2) behaviour are fixed.
7177 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7179         * marshal.c: when possible, do not duplicate the name of the methods
7180         in the method builder and in the generated MonoMethod.
7182 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
7183         * verify.c: added support for type checking ldind_* opcodes.
7185 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
7187         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
7188         which is used to distinguish the fully open instantiation of a TypeBuilder
7189         with the rest. This temporary hack is required to restore the property that
7190         the fully open instantiation is the same type of the generic type definition.
7192         * class-internals.h (mono_generic_class_is_generic_type_definition):
7193         new function as part of the internal API.
7195         * class.c (inflate_generic_type): return NULL when the generic inst is
7196         fully open. The fully open generic type is now the same as the generic type
7197         definition for non TypeBuilder types.
7199         * class.c (mono_generic_class_get_class): removed assert since it is
7200         no longer valid, gklass->cached_class can point to the generic type definition.
7202         * class.c (mono_generic_class_is_generic_type_definition): new.
7204         * metadata.c (mono_generic_class_hash): added is_tb_open field
7205         to the hash calculation.
7207         * metadata.c (free_generic_class): if the generic class is associated
7208         with the generic type definition, its field will come from the mempool and
7209         must not be freed.
7211         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
7212         new, this function identifies the corner case of a TypeBuilder fully open
7213         instantiation.
7215         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
7216         for lookup. Set gclass->cached_class to be the container class in case of
7217         the fully open instantiation of non TypeBuilder types.
7219         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
7220         to compare generic classes.
7222         * reflection.c (method_encode_methodspec): remove assert that
7223         no longer is valid.
7225         * reflection.c (mono_reflection_generic_class_initialize): add
7226         an aditional assert to ensure the proper type is used.
7228 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
7230         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
7231         to enjoy it.
7233 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
7235         * verify.c (push_arg): Fixed support for ldarga
7236         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
7237         MonoType used as first arg in case of instance calls.
7239 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
7241         * verify.c: Support for verifying VAR and MVAR types, 
7243 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
7245         * icall.c (ves_icall_get_property_info): Set the reflected type of the
7246         accessors correctly.
7248 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7250         * threads.c: support OSX and other systems in
7251         mono_thread_get_stack_bounds (bug #328026).
7253 2007-09-25  Martin Baulig  <martin@ximian.com>
7255         * mono-debug.h
7256         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
7258 2007-09-24  Martin Baulig  <martin@ximian.com>
7260         * mono-debug.h
7261         (MonoDebugClassEntry): Moved the definition of this struct into
7262         mono-debug.c to make it private.
7264         * mono-debug.c
7265         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
7266         type table per symbol file, we don't need to store the symfile id
7267         any longer.
7269 2007-09-24  Martin Baulig  <martin@ximian.com>
7271         Create one type table per symbol file, since a `MonoClass *' gets
7272         invalid when its image is unloaded.
7274         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
7275         (MonoDebugHandle): Added `type_table'.
7277 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
7279         * mempool.c, mempool.h: added mono_mempool_new_size () API
7280         to be able to specify a smaller initial size for the pool.
7281         Adjusted the code to slowly increase pool size before using
7282         the previous default size.
7283         * image.c: use a small initial size for image mempools.
7285 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
7287         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
7288         Fixes ##320990.
7290         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
7291         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
7293 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
7295         * metadata.c (mono_type_create_from_typespec): Remove an invalid
7296         free. Fixes #327438.
7298 2007-09-21  Raja R Harinath  <harinath@gmail.com>
7300         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
7301         generic instantiations, etc.
7302         <MONO_TYPE_ARRAY>: Likewise.
7304 2007-09-21  Martin Baulig  <martin@ximian.com>
7306         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
7307         these structs were never defined.
7308         (MonoDebugHandle): Removed the `_priv' field, it was never used.
7310 2007-09-21  Martin Baulig  <martin@ximian.com>
7312         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
7314 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
7316         * image.c: removed the guid hash tables: we can get the same info
7317         without the additional memory usage hit (partially fixes also bug #327052).
7319 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
7321         * profiler.h, profiler-private.h, profiler.c: add a new profiler
7322         event to handle unloading methods. After the event is called, the
7323         corresponding MonoMethod* must be considered invalid.
7324         * loader.c (mono_free_method): call the new mono_profiler_method_free
7325         event.
7327 2007-09-20  Mark Probst  <mark.probst@gmail.com>
7329         * domain-internals.h: New flag in MonoJitInfo which marks shared
7330         generic methods.  New hash table (shared_generics_hash) in
7331         MonoDomain to keep track of shared generic methods.  Prototypes
7332         for functions to register and lookup shared generic methods.
7334         * domain.c: Support for registering and looking up shared generic
7335         methods via a hash table (shared_generics_hash) in MonoDomain.
7337         * class-internals.h: New exception to signal failure of shared
7338         compilation of a generic method.  New counters for generics
7339         sharing in MonoStats.
7341 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
7343         * image.c, metadata-internals.h: don't keep a file descriptor open
7344         for loaded assemblies (bug#325988).
7346 2007-09-19  Raja R Harinath  <rharinath@novell.com>
7348         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
7349         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
7350         use the corresponding datatypes.
7351         (type_in_image): Update to changes.
7352         (CleanForImageUserData): Simplify.
7353         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
7354         Avoid quadratic behaviour in handling the "stolen" list by
7355         separating the filter predicate out, and by prepending the stolen
7356         items rather than appending them.
7357         (steal_ginst_in_image): Likewise.
7358         (mono_metadata_clean_for_image): Update to changes.
7360 2007-09-19  Martin Baulig  <martin@ximian.com>
7362         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
7364 2007-09-19  Martin Baulig  <martin@ximian.com>
7366         * mono-debug.c (mono_debug_cleanup): Don't call
7367         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
7369 2007-09-19  Raja R Harinath  <harinath@gmail.com>
7371         Fix crash on 'make run-test' in mcs/errors
7372         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
7373         Avoid more potential allocations in mono_class_from_mono_type.
7374         (ginst_in_image): Update to changes.
7375         (gclass_in_image): Rearrange slightly.
7377 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
7379         * class.c (mono_class_init): Move the code that sets up class->methods to 
7380         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
7382         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
7383         canonical instance of an inflated generic signature.
7384         (mono_type_create_from_typespec): Remove an invalid free.
7386         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
7388 2007-09-18  Marek Habersack  <mhabersack@novell.com>
7390         * domain-internals.h: added a declaration of the
7391         mono_assembly_load_full_nosearch internal function.
7393         * assembly.c (mono_assembly_load_with_partial_name): use
7394         mono_try_assembly_resolve return value properly.
7395         (mono_assembly_load_full_nosearch): copied the function body from
7396         mono_assembly_load_full, without the code to invoke assembly
7397         search hooks.
7398         (mono_assembly_load_full): calls the above new function and if the
7399         assembly is not resolved, invokes the search hooks.
7401         * appdomain.c (mono_runtime_init): restore the global postload
7402         assembly search handlers.
7404 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
7406         * class.c (mono_class_init): Make sure class->methods and class->properties
7407         are never NULL in the generics case.
7409         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
7411 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
7413         * metadata.c (free_generic_class): Disable some code to fix the build.
7415         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
7417         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
7418         from the image mempool.
7420         * metadata.c (free_generic_class): Free more data from the inflated class.
7422         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
7424         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
7425         mempool.
7426         (mono_type_create_from_typespec): Ditto.
7428         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
7429         MonoImage to the caller.
7430         (mono_init_internal): Save the opened image in a global variable.
7431         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
7433         * reflection.c (resolve_object): Fix a leak.
7435         * metadata.c: Fix the freeing of data in the generics caches.
7436         
7437         * metadata.c (free_generic_inst): Comment this out to fix the build.
7438         (free_generic_class): Ditto.
7440         * metadata.c: Free cached generic methods, instantinations and classes when
7441         they are removed from the caches.
7442         (mono_metadata_free_type): Free the type itself.
7444         * class.c: Free the result of mono_class_inflate_generic_type () in a few
7445         places.
7447 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
7449         * boehm-gc.c: restrict managed allocs to __thread supporting
7450         architectures.
7452 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
7454         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
7455         (mono_generic_class_get_class): Fix a leak.
7457         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
7458         mono_metadata_free_type ().
7459         (mono_metadata_inflate_generic_inst): Fix a leak.
7461 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7463         * mono-debug.c (free_header_data): Fix a leak missed earlier.
7465         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
7466         mempool.
7468         * mono-debug.c (mono_debug_close_image): Fix call to 
7469         g_hash_table_remove ().
7471 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
7473         * icall-def.h: redirect all the string ctor to the managed
7474         CreateString () methods.
7475         * string-icalls.c, string-icalls.h: removed dead code for string
7476         ctors and icalls.
7478 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7480         * mono-debug.c: Fix memory leaks.
7482 2007-09-14  Jonathan Chambers <joncham@gmail.com>
7484         * threads-types.h: Implement mono_hazard_pointer_set and 
7485         mono_hazard_pointer_clear macros using do/while(0) to fix
7486         compilation with MSVC.
7487         
7488         Code is contributed under MIT/X11 license.
7490 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7492         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
7493         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
7495 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7497         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
7498         icalls.
7500 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7502         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
7503         managed-code allocated as well.
7505 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
7507         * class.c (mono_class_is_assignable_from): Add support for generic variance.
7509 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
7511         * boehm-gc.c: fixed the build after the AOT changes.
7513 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
7515         * wrapper-types.h: Add an ALLOC wrapper type.
7517         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
7518         reference managed allocator methods.
7520 2007-09-12  Marek Safar  <marek.safar@gmail.com>
7522         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
7523         of Type array and not MonoType, a fix suggested by Hari.
7524         
7525 2007-09-12  Jonathan Chambers <joncham@gmail.com>
7527         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
7528         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
7529         
7530         Code is contributed under MIT/X11 license.
7532 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
7534         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
7536 2007-09-12  Marek Habersack  <mhabersack@novell.com>
7538         * image.c (do_mono_image_open): if assembly file fails to open and
7539         MONO_IOMAP is in effect, try to find the path in a
7540         case-insensitive way.
7542         * appdomain.c (mono_runtime_init): do not install postload hooks -
7543         tests show that MS.NET doesn't use anything of that sort to
7544         trigger the AppDomain.AssemblyResolve event.
7545         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
7546         made non-static.
7547         (mono_runtime_init): init portability helpers here.
7549         * assembly.c (mono_assembly_load_with_partial_name): if other   
7550         attempts fail, trigger the AppDomain.AssemblyResolve event handler
7551         to resolve the assembly.
7553         * domain-internals.h: added mono_try_assembly_resolve and marked
7554         it as internal.
7556 2007-09-11  Jb Evain  <jbevain@novell.com>
7558         * object-internals.h (MonoReflectionDynamicMethod): add
7559         a `MonoReflectionType *owner` field. The owner is used
7560         * reflection.c:
7561         (mono_reflection_create_dynamic_method): use the owner of the dynamic
7562         method as the class declaring the dynamic method.
7563         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
7564         dynamic method to the declaring type of the methodbuilder.
7566 2007-09-11  Mark Probst  <mark.probst@gmail.com>
7568         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
7569         rules for calling methods via reflection.
7571 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
7573         * reflection.c (resolve_object): Add support for MonoGenericClass. 
7574         Inflate MonoType's.
7576 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
7578         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
7579         provide a managed method that does fast allocations without needing
7580         a managed->unmanaged transition. Boehm GC implementation currently
7581         enabled for ptrfree objects on sane architectures.
7583 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
7585         * marshal.c, marshal.h: exported a couple of useful functions and
7586         added mono_mb_get_label () to easily handle backward branches.
7588 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
7590         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
7592 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
7594         * loader.c (find_method): Fixed the regression introduced while
7595         fixing bug #81466.
7597 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
7599         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
7600         well.
7601         
7602         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
7603         icall.c reflection.c: Pass a MonoGenericContext argument to 
7604         mono_lookup_dynamic_token ().
7606         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
7607         #82744.
7608         
7609 2007-09-09  Robert Jordan  <robertj@gmx.net>
7611         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
7612         for generic methods.
7614         * object.c (mono_object_get_virtual_method): Handle generic methods.
7615         Fixes bug #78882.
7617         Code is contributed under MIT/X11 license.
7619 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
7621         * image.c: fix locking in mono_image_load_file_for_image ().
7623 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
7625         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
7626         used only as a cache: added an icall to fill it.
7628 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
7630         * reflection.h: exposed mono_reflection_free_type_info
7631         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
7632         since mono_reflection_bind_generic_parameters makes a copy of it.
7633         * reflection.c (free_type_info): subinfos should be freed.
7634         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
7635         made non static.
7636         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
7637         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
7638         this fixes #82695 and #81726.
7639    
7641 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
7643         * process.h, process.c:  added support for user profile/info in
7644           ProcessStartInfo. For now only Windows works.
7646 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7648         * metadata.c: consider the generic arguments when comparing
7649         signatures (bug #82614).
7651 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7653         * cil-coff.h, image.c: updated assembly loader to cope with the
7654         PE32+ 64 bit file format.
7656 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7658         * assembly.c, class.c, domain.c, loader.c: remove useless
7659         inclusion of cil-coff.h.
7661 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
7663         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
7664         if interface is marked with CoClassAttribute. 
7665    
7666         Code is contributed under MIT/X11 license.
7668 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
7670         * sgen-gc.c: ensure no object from the to space is copied again or finalized
7671         if it's seen twice in major collections.
7673 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7675         * sgen-gc.c: big objects are not copied to the gray area, but they
7676         need to be considered for scanning, too, if they are brought alive
7677         by an object ready for finalizations or a survived one.
7679 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7681         * sgen-gc.c: properly account the number of disappearing links when
7682         they are nullified.
7684 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
7686         * sgen-gc.c: share the code to scan the registered roots between the
7687         different types of collections.
7689 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
7691         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
7693 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
7695         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
7696         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
7698 2007-08-28  Mark Probst  <mark.probst@gmail.com>
7700         * security-manager.c (mono_security_manager_get_methods):
7701         LinkDemandSecurityException now has 2 arguments instead of 3.
7703 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
7705         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
7706         platforms which need it.
7708 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7710         * sgen-gc.c: unregister thread data structures with a pthread_key_t
7711         dtor.
7713 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
7715         * threads.c: free the thread static data on thread exit.
7717 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
7719         * class.c: walk the hierarchy to find the generic definition for
7720         a class (fixes runtime part of bug #82498).
7722 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
7724         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
7725         ...
7727         * image.c (mono_image_close): Here. Hopefully fixes #82510.
7729 2007-08-24  Mark Probst  <mark.probst@gmail.com>
7731         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
7733 2007-08-24  Robert Jordan  <robertj@gmx.net>
7735         * appdomain.c: don't perform the ':'->';' substitution on Win32.
7737 2007-08-24  Jb Evain  <jbevain@novell.com>
7739         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
7740         for byref types.
7742 2007-08-24  Mark Probst  <mark.probst@gmail.com>
7744         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
7745         #82286.
7747 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
7749         * assembly.c: Fix a warning.
7750         
7751 2007-08-23  Marek Habersack  <mhabersack@novell.com>
7753         * appdomain.c: parse the <runtime> section looking for the probing
7754         element with the 'privatePath' attribute, which sets additional
7755         directories in which the runtime should look for assemblies.
7757 2007-08-23  Robert Jordan  <robertj@gmx.net>
7759         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
7760         Fixes #82499.
7762 2007-08-23  Martin Baulig  <martin@ximian.com>
7764         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
7765         _mono_debug_init_corlib() and remove it from the header file.
7767 2007-08-23  Martin Baulig  <martin@ximian.com>
7769         * mono-debug-debugger.c
7770         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
7771         don't notify the debugger about it.
7773         * mono-debug-debugger.h
7774         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
7776 2007-08-23  Robert Jordan  <robertj@gmx.net>
7778         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
7779         Code is contributed under MIT/X11 license.
7781 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7783         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
7785 2007-08-22  Martin Baulig  <martin@ximian.com>
7787         * mono-debug.c: Store debugging info on a per-domain basis and
7788         free it on domain unload.  Add support for unloading symbol files.
7790         * mono-debug.h
7791         (MonoDebugList): New typedef.
7792         (MonoSymbolTable):
7793         - add `data_tables and `type_table'.
7794         - replace 'symbol_files' and `num_symbol_files' with a
7795           `MonoDebugList *'.
7796         (mono_debug_data_table): Removed.
7797         (mono_debug_list_add): New public function.
7798         (mono_debug_list_remove): New public function.
7799         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
7800         (mono_debug_init_2_memory): Renamed into
7801         mono_debug_open_image_from_memory().
7802         (mono_debug_close_image): New public function.
7803         (mono_debug_domain_create): Likewise.
7804         (mono_debug_domain_unload): Likewise.
7805         (MONO_DEBUGGER_VERSION): Bump to 60.
7807         * mono-debug-debugger.h
7808         (MonoDebuggerEvent):
7809         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
7810         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
7811         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
7812         - rename `THREAD_CREATED' and `THREAD_EXITED' into
7813           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
7814         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
7815           meaning.
7816         (mono_debugger_add_symbol_file): Removed.
7817         (mono_debugger_add_type): Removed.
7818         (mono_debugger_lookup_type): Removed.
7819         (mono_debugger_lookup_assembly): Removed.
7821         * domain.c
7822         (mono_domain_create): Call mono_debug_domain_create().
7823         (mono_init_internal): Call mono_debug_init_corlib().
7825         * assembly.c
7826         (mono_assembly_close): Call mono_debug_close_image().
7828 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
7830         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
7831         mmap call.
7833 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
7835         * sgen-gc.c: ensure section->pin_queue_end is initialized
7836         correctly when non pinning objects in the section have been found.
7838 2007-08-22  Marek Habersack  <mhabersack@novell.com>
7840         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
7841         containing a list of directories separated by ':'. MSDN docs say
7842         the directories should be separated with ';'. Part of a bugfix for
7843         bug #81446
7845 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
7847         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
7848         it should MonoType and not MonoClass.
7850 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
7852         * culture-info-table.h : regenerated.
7854 2007-08-20  William Holmes  <billholmes54@gmail.com>
7856         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
7857          to call ReplaceFile Kernel32 on windows or in io-layer.
7858         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
7859         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
7860          as an internal call.
7862         Code is contributed under MIT/X11 license.
7864 2007-08-20  Jb Evain  <jbevain@novell.com>
7866         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
7867         and MONO_EXCEPTION_FIELD_ACCESS.
7869         * debug-helpers.[c|h]: new mono_field_full_name function.
7871 2007-08-20  Mark Probst  <mark.probst@gmail.com>
7873         * class.c: Removed class_security_level() and moved it to
7874         security-core-clr.c.
7876         * security-core-clr.c, security-core-clr.h: class_security_level()
7877         is now public and renamed to mono_security_core_clr_class_level().
7878         It also looks for security attributes in the classes a class is
7879         nested in.
7881 2007-08-20  Mark Probst  <mark.probst@gmail.com>
7883         * security-core-clr.c, security-core-clr.h: CoreCLR security
7884         utility functions.
7886         * Makefile.am: Added security-core-clr.[ch].
7888         * security-manager.c, security-manager.h: Functions and enum for
7889         setting and getting the security mode.
7891         * class.c: CoreCLR security checks.
7893 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7895         * icall-def.h, process.c, process.h: implemented icall to get
7896         user/system processor times.
7898 2007-08-17  Mark Probst  <mark.probst@gmail.com>
7900         * domain.c, threads.c, class-internals.h, domain-internals.h: New
7901         reader-lock-free jit_info_table.
7903 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
7905         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
7907         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
7909         * object-internals.h (MonoException): Add missing _data member.
7911 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
7913         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
7914         checking that only methods with matching qname or fqname are picked
7915         from implemented interfaces.
7917 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
7919         * verify.c (do_newarr):added, do type verification of
7920         newarr ops, push the right value on the eval stack.
7921         * verify.c (mono_method_verify): use do_newarr
7924 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
7926         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
7927         factored the common code into get_boxable_mono_type, which
7928         is now using mono_type_get_full, this fixed byref related tests.
7930 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
7932         * class.c: added mono_type_get_full, this function has the same
7933         behavior of mono_class_get_full but the returned MonoType has
7934         all metadata of the associated token in case of a typespec token.
7935         * class.c: added mono_type_retrieve_from_typespec, used by 
7936         mono_type_get_full to retrieve the token type.
7937         * class.c (mono_class_create_from_typespec): changed to use
7938         mono_type_retrieve_from_typespec.
7939         * class.c (mono_ldtoken): changed to use mono_type_get_full
7940         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
7941         * class-internals.h: exported mono_type_get_full for internal use.
7943 2007-08-16  Jb Evain  <jbevain@novell.com>
7945         * domain.c (supported_runtimes): add entry for
7946         the 'moonlight' runtime version.
7948 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
7950         * verify.c (mono_method_verify): small typo sliped in.  
7952 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
7954         * verify.c (do_unbox_value): added, do type verification of
7955         unboxing ops
7956         * verify.c (mono_method_verify): use do_unbox_value
7959 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
7961         * verify.c (dump_stack_value): fixed typo, was printing string
7962         instead of object on stack.
7963         * verify.c (do_box_value): moved the byref check up as it leads
7964         to invalid code and should be done earlier.
7965         * verify.c: improved error messages for and ldobj
7967 2007-08-15  William Holmes  <billholmes54@gmail.com>
7969         * marshal.c (emit_marshal_custom): Omit the call to 
7970           marshal_native_to_managed when calling native to managed 
7971           and the argument is specified as an out argument.
7973         Code is contributed under MIT/X11 license.
7975 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
7977         * verify.c: fixed the type checks for generics, function pointers and vectors.
7978         Added type verification for ldobj and ldtoken. The verifier
7979         would segfault if header or signature of a method contained references
7980         to non-existant types.
7982 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
7984         * marshal.c (cominterop_get_ccw): Patch from
7985         Bill Holmes to no walk up interface hierarchy. 
7986         All parent methods should be present in the interface for COM.
7987    
7988         Code is contributed under MIT/X11 license.
7990 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
7992         * marshal.c (emit_marshal_com_interface): Patch from
7993         Bill Holmes to handle COM Interfaces as return values
7994         for native->managed calls.
7995    
7996         Code is contributed under MIT/X11 license.
7998 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
8000         * marshal.c (cominterop_get_idispatch_for_object): Implement
8001         for runtime callable wrappers.
8002    
8003         Code is contributed under MIT/X11 license.
8005 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
8007         * pedump.c (main): changed from mono_init to mono_init_from_assembly
8008         so 2.0 types are accessible
8011 2007-08-13  Miguel de Icaza  <miguel@novell.com>
8013         * domain.c (mono_init_internal): Call mono_assembly_load_friends
8014         once we load mscorlib.   Due to the order in which we initialize,
8015         the mono_assembly_load_full routine that loads mscorlib did not
8016         load friends.   We now load it once we load the
8017         mono_defaults.internals_visible_class class. 
8019         * assembly.c: Expose the mono_load_friend_assemblies method.
8021 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
8023         * verify.c: improved the handling of boxing, better
8024         type checking for unary ops and conversion. Fix bug
8025         regarding managed pointer compatibility checking
8027 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
8029         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
8031         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
8033 2007-08-09  Raja R Harinath  <rharinath@novell.com>
8035         * reflection.c (dup_type): Remove.
8036         * class.c (dup_type): Remove.
8037         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
8038         instead of the dodgy 'dup_type'.
8039         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
8040         handle the case where 'dup_type' needed the second argument.
8042 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
8044         * domain.c: Fix a warning.
8046 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
8048         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
8049         checking that methods with the same fqname are not overridden
8050         with a method from an ancestor.
8052 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
8054         * threads.c (free_thread_static_data_helper): Avoid a crash if
8055         thread->static_data is not yet set.
8057 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
8059         * marshal.c: Use correct image when emitting
8060         native wrapper for COM calls.
8061    
8062         Code is contributed under MIT/X11 license.
8064 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
8066         * icall-def.h, security.c, security.h :
8067           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
8069 2007-08-07  Martin Baulig  <martin@ximian.com>
8071         * mono-debug-debugger.h
8072         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
8074         * domain.c (mono_domain_free): Call
8075         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
8077 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
8079         * verify.c (check_underflow, check_overflow): error message now returns IL offset
8080         * verify.c (in_same_block): code should test if either offset is inside the clauses
8081         * verify.c (mono_method_verify): push the exception into the eval stack of exception
8082         and filter blocks
8084 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
8086         * image.c (mono_image_close): Fix a leak.
8088         * object.c (mono_runtime_invoke_array): Avoid using alloca.
8090         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
8092 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8094         * domain.c, threads.c, threads-types.h: fix memory retention issue
8095         with thread static variables not being cleared on domain unload.
8096         Reuse thread static slots after domain unload.
8098 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
8100         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
8101         nullable type.
8103         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
8104         now done in mono_runtime_invoke_array.
8106         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
8107         receiver is a nullable type.
8109         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
8110         generic parameter.
8112 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
8114         * marshal.c: Implement COM Objects as return type for 
8115         managed->unmanaged calls. Added Release calls for COM Object
8116         out/return values in managed->unmanaged calls.
8118         Code is contributed under MIT/X11 license.
8120 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
8122         * threads.h, threads-type.h: move the hazard pointer declarations
8123         to the private header.
8125 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8127         * file-io.c, appdomain.c: memory leak fixes.
8129 2007-08-02  Dick Porter  <dick@ximian.com>
8131         * socket-io.c
8132         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
8133         SO_REUSEADDR setting into io-layer/sockets.c.
8135 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
8137         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
8138         from Object when called on a generic parameter. Fixes #82211.
8140 2007-08-01  Dick Porter  <dick@ximian.com>
8142         * file-io.c (convert_share): Test FileShare values bit-by-bit.
8143         Fixes bug 79250 yet again.
8145 2007-07-30  Martin Baulig  <martin@ximian.com>
8147         Merged the `debugger-dublin' branch.
8149         * mono-debug.h
8150         (MonoDebugDataTable): New typedef.
8151         (MonoDebugMethodAddressList): New typedef.
8152         (MonoDebugWrapperData): Removed.
8153         (MonoDebugSymbolTable): Removed `current_data_table',
8154         `current_data_table_size', `current_data_table_offset'.
8155         (MonoDebugDataItemType): Moved into mono-debug.c.
8156         (MonoDebugMethodJitInfo): Remove `address'.
8157         (mono_debug_data_table): New global variable.
8158         (mono_debug_lookup_method_addresses): New public function.
8159         (mono_debug_find_method): Take a `MonoMethod *', not a
8160         `MonoDebugMethodInfo *'.
8162         * mono-debug.c: Drop support for the old symbol tables.
8164 2007-06-28  Martin Baulig  <martin@ximian.com>
8166         * mono-debug.c (mono_debug_debugger_version): New public variable.
8168 2007-07-31  William Holmes  <billholmes54@gmail.com>
8170         * metadata.c Changed mono_type_create_from_typespec to not insert
8171           the type into the hash map until after
8172           do_mono_metadata_parse_type has completed.
8173         Fixes Bug #82194
8174         Code is contributed under MIT/X11 license.
8176 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
8178         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
8179         generic parameter. Fixes #82211.
8181 2007-07-27  Jb Evain  <jbevain@novell.com>
8183         * pedump.c (dump_metadata, dump_metadata_header): dump
8184         versions contained in the metadata header.
8186 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
8188         * threads.c: register small_id_table with the GC.
8190 2007-07-27  Mark Probst  <mark.probst@gmail.com>
8192         * threads.c, threads.h, class-internals.h, object-internals.h:
8193         Hazard pointers, to be used by lock-free parallel algorithms.
8195 2007-07-26  Dick Porter  <dick@ximian.com>
8197         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
8198         routine on non-windows platforms, as I've not managed to think of
8199         a non-kludgy way of doing this.  Finishes off bug 78739.
8201 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
8203         * object.c: properly setup interface_bitmap in proxy vtables.
8205 2007-07-25  Marek Habersack  <mhabersack@novell.com>
8207         * appdomain.c (get_shadow_assembly_location): do not use TickCount
8208         to create unique shadow copy target directories, use the domain's
8209         serial number instead. Each domain gets a unique target directory
8210         that way.
8212         * domain.c (mono_domain_create): added code to increment domain
8213         shadow copy serial number and cache the value in the current
8214         domain structure.
8216         * domain-internals.h (struct _MonoDomain): added a new field -
8217         shadow_serial to hold the serial number used in generation of
8218         shadow-copy directories. This is to make sure that the directory
8219         name is unique for each and every domain created. We avoid a race
8220         condition with overriding assemblies already in use by other app
8221         domains.
8223 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
8225         * class.c (mono_bounded_array_class_get): fixed memory leak when 
8226         binding generic parameters.
8228 2007-07-24  Raja R Harinath  <rharinath@novell.com>
8230         * metadata.c (do_mono_metadata_parse_generic_class): Use
8231         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
8232         error.
8234 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8236         * loader.c, class-internals.h, reflection.c: removed the per-method
8237         generics hashtable: we use the global one through the call of
8238         mono_class_inflate_generic_method ().
8240 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8242         * class.c, metadata.c, class-internals.h: introduce yet another
8243         generics global cache for inflated methods (fixes 98% of the perf
8244         issue in bug #81806).
8246 2007-07-23  Raja R Harinath  <rharinath@novell.com>
8248         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
8249         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
8250         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
8251         return a MonoGenericInst containing (a copy) of those types.
8252         (mono_metadata_inflate_generic_inst): Update to changes.
8253         (mono_metadata_parse_generic_inst): Likewise.
8254         (mono_get_shared_generic_inst): Likewise.
8255         * reflection.c (mono_class_bind_generic_parameters): Likewise.
8256         (mono_reflection_bind_generic_method_parameters): Likewise.
8257         * metadata-internals.h: Likewise.
8258         * icall.c (free_generic_context): Kill.
8259         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
8261         * reflection.c (reflection_methodbuilder_to_mono_method): Use
8262         mono_metadata_type_dup.
8263         * marshal.c (mono_mb_create_method): Likewise.
8265         * metadata.c (mono_metadata_type_dup): Rename from
8266         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
8267         MonoImage.  Handle a few more cases, esp. when no mempool is given.
8268         * marshal.c, metadata-internals.h: Update to changes.
8270 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
8272         * class.c: fixed a small leak for array classes and removed warning.
8274 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
8276         * loader.c (mono_method_get_param_token): Make this work on generic methods.
8277         Return 0x8000000 for return parameters. Fixes #82161.
8279 2007-07-21  Marek Habersack  <grendello@gmail.com>
8281         * appdomain.c (get_shadow_assembly_location): append the current
8282         ticks value to the path. Avoids overwriting the same assemblies by
8283         several threads at the same time.
8285 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
8286         and Raja R Harinath  <rharinath@novell.com>
8288         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
8289         Simplify slightly.
8290         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
8291         property for testing if a method is a generic method definition.
8293 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
8295         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
8297 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
8299         * verify.c: used function from private branch, reverted to the one in class.h 
8301 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
8303         * verify.c: a typo slipped in and the code wont compile
8305 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
8307         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
8308         disabled box instruction as it is doing the wrong thing
8309         improved stack dump messages, now it is easier to debug type related issues
8312 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
8314         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
8316 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
8318         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
8319         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
8320         grouped with class and valuetype. This change will simply 
8321         the code as it should be handled just like unmanaged pointers.
8323 2007-07-19  Mark Probst  <mark.probst@gmail.com>
8325         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
8327 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
8329         * verify.c: several stack merge issues fixed, reference comparisons now
8330         check the type size. strict type check now works correctly.
8331         added more uses of IS_MANAGED_POINTER macro.
8332         fixed issues pointed by running the test suite against .net.
8333         
8335 2007-07-19  Mark Probst  <mark.probst@gmail.com>
8337         * class.c, loader.c, class-internals.h: Removed the
8338         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
8339         defines.
8341         * icall.c: Better error checking in some internal reflection
8342         methods.
8344 2007-07-18  William Holmes  <billholmes54@gmail.com>
8346         * filewatcher.c : removed unused variable 'filename' in 
8347           ves_icall_System_IO_FSW_SupportsFSW
8349 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8351         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
8352         obsolete, removed.
8354 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
8356         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
8357         
8358         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
8360 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
8362         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
8363         Implement generics support.
8364         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
8366         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
8367         type_args and method_args arguments.
8368         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
8369         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
8370         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
8372 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
8374         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
8375           It adds a rootimage parameter to mono_reflection_get_type_internal,
8376           adds new function mono_reflection_get_type_with_rootimage and use
8377           the rootimage to resolve the types instead of the current image
8379 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
8381         * culture-info-table.h: Forgot to update after r78304.
8383 2007-07-13  Raja R Harinath  <rharinath@novell.com>
8385         * class.c (mono_class_is_open_constructed_type)
8386         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
8388 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
8390         * class.c (mono_bounded_array_class_get):  method fails if used with
8391         an incomplete TypeBuilder enum (no basetype field), fixed it by 
8392         avoiding calculating the size for such array as it cannot be instantiated.
8393         Fix bug #82015
8395 2007-07-12  Raja R Harinath  <rharinath@novell.com>
8397         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
8398         field.
8399         * metadata.c, reflection.c: Update to changes.
8401 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
8403         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
8404         mono_class_is_valid_enum, they are used to valide a enum when loading.
8405         * reflection.c: used new functions to throw TypeLoadException when and
8406         invalid enum is build with TypeBuilder. Fixes #82018
8407   
8408 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
8410         * object.c: forgot commit of mono_class_setup_methods () to access
8411         iface->methods.
8412         * object-internals.h: added a few more handy fields to
8413         MonoIMTCheckItem.
8415 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8417         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
8418         iface->methods.
8420 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
8422         * class-internals.h, object-internals.h, object.c: IMT-based
8423         interface invocation core from Massimiliano Mantione
8424         (massi@ximian.com) with a reworked arch-specific interface,
8425         bsearch implementation and a few bugfixes and memory savings by me.
8427 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
8429         * class.c (mono_class_create_from_typedef): mono would segfault if 
8430         an enum did not have a __value field. It now throws a TypeLoadException
8431         for such cases. Fix bug #82022
8433 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8435         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
8437 2007-07-09  Mark Probst  <mark.probst@gmail.com>
8439         * class.c (mono_class_init): If a class is already inited but has
8440         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
8442 2007-07-09  Mark Probst  <mark.probst@gmail.com>
8444         * class.c: Properly handle the case of an unimplemented interface
8445         method.  Fixes: 81673.
8447 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8449         * class-internals.h, object.c: cleanup patch from massi: use
8450         MonoVTable->interface_bitmap since the vtable interfaces offset array
8451         is going away.
8453 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8455         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
8456         GetMDStreamVersion icall instead.
8458 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8460         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
8461         not use mono_dl_build_path() with a full library name: makes
8462         fallbacks to libgaim and libfam work.
8464 2007-07-06  William Holmes  <billholmes54@gmail.com>
8466         * assembly.c: Added a continue statement in probe_for_partial_name when
8467          parse_assembly_directory_name fails.  Fixes : 82002
8469 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
8471         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
8472         and added a verification  for TYPEDBYREF.
8473         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
8474         make native int interchangeable with int32 and some small cleanup and formating.
8475         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
8476         handle byref of byref.
8477         * verify.c (push_local): handle byref of byref.
8478         * verify.c (do_binop): invalid mix of values is unverifiable
8479         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
8480         added visibility checks
8481         * verify.c (field related method): added visibility checks
8482         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
8484 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
8486         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
8487         string.
8489 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8491         * profiler.c (mono_profiler_load): Fix an off-by-one error.
8493         * marshal.c (emit_marshal_string): When returning a string from managed code,
8494         allways make a copy even for unicode strings. Fixes #81990.
8496 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
8498         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
8499         of byref generic inst types (bug #81997).
8501 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
8503         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
8504         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
8506 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
8508         * marshal.c (emit_marshal_string): Add support for unicode strings in
8509         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
8511 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
8513         * verify.c: field load/store are now verified, missing only access checks now
8515 2007-06-28  Martin Baulig  <martin@ximian.com>
8517         * mono-debug.c (mono_debug_debugger_version): New public variable.
8519 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
8521         * locales.c: When constructing DateTimeFormat or NumberFormat for
8522         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
8523         MonoCultureInfo contructed from the current locale is always
8524         read-only and has UseUserOverride set to true. All MonoCultureInfo
8525         instances returned for GetCultures have both IsReadOnly and
8526         UseUserOverride set to true. Fixes part of bug #81930.
8528 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
8530        * icall-def.h: Update System.__ComObject icalls
8531        * marshal.c: Avoid managed transition (and object creation)
8532        when looking up COM interface in RCW.
8533        * marshal.h: Ditto.
8534        
8535        Code is contributed under MIT/X11 license.
8537 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
8539         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
8540         to avoid crashes during assembly unloading.
8542 2007-06-22  Raja R Harinath  <rharinath@novell.com>
8544         Fix MethodInfo.IsGenericMethodDefinition
8545         * reflection.c (mono_reflection_bind_generic_method_parameters):
8546         Rearrange code to ensure we always uses a generic method definition.
8547         * class.c (mono_class_inflate_generic_method_full): Set
8548         'generic_container' field only for generic method definitions.
8549         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
8550         Use presense of 'generic_container' field as indication of being a
8551         generic method definition.
8553 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
8555         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8557         * object-internals.h: Reflect changes in the layout of the managed Delegate
8558         class.
8559         
8560         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
8561         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
8562         runtime memory used by the dynamic method. Fixes #77146.
8564 2007-06-21  Dick Porter  <dick@ximian.com>
8566         * file-io.h: 
8567         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
8568         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
8569         81767.
8571 2007-06-21  Raja R Harinath  <rharinath@novell.com>
8573         * reflection.c (method_encode_methodspec): Add a tripwire.
8574         * class.c (inflate_generic_type): The fully open generic type is
8575         not the same as the generic type definition.
8577 2007-06-21  Martin Baulig  <martin@ximian.com>
8579         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
8581         * mono-debug-debugger.h
8582         (MonoDebuggerBreakpointInfo): Removed.
8583         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
8584         (mono_debugger_remove_breakpoint): Likewise.
8585         (mono_debugger_breakpoint_callback): Likewise.
8586         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
8588 2007-06-21  Raja R Harinath  <rharinath@novell.com>
8590         * metadata.c (mono_metadata_lookup_generic_class): The fully open
8591         generic type is not the same as the generic type definition.
8592         * class.c (mono_generic_class_get_class): Likewise.
8594 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
8596         * icall.c: The second argument to 
8597         System.Reflection.MethodBase.GetMethodFromHandleInternalType
8598         is a MonoType not a MonoClass.
8600 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
8602         * verify.c: support for function pointers in the verifier
8604 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
8606         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
8608 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
8610         * assembly.c: removed Mono.Data.SqliteClient from the list of
8611         forward-compatible assemblies as it breaks the ABI (bug #81899).
8613 2007-06-19  Raja R Harinath  <rharinath@novell.com>
8615         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
8616         lookup/update with the loader lock.
8617         * reflection.c (mono_class_bind_generic_parameters): No need to
8618         protect mono_metadata_lookup_* with the loader lock.
8619         * class.c (inflate_generic_type): Likewise.
8620         
8621         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
8622         on a generic instantiated type.
8624 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
8626         *verify.c: produce meanfull error messages on verification error
8627         *verify.c: fixed some cases of verification errors reported as validation errors
8628         *pedump.c: fixed the error name array, now it shows validation errors properly
8629         *verify.h: fixed the contant that should be used for verification errors
8631 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8633         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
8634         for bug #77596, 81858 and 80743 (generics data structures on domain
8635         unload).
8637 2007-06-15  Raja R Harinath  <rharinath@novell.com>
8639         Avoid allocating 'MonoGenericContext' on the heap.
8640         * class-internals (_MonoMethodInflated::context): Make field
8641         inline, not a pointer.
8642         * loader.c (method_from_methodspec): Allocate 'new_context' on the
8643         stack.  Use the context embedded within the inflated method as the
8644         hash key, rather than 'new_context'.
8645         * class.c (inflate_generic_context): Simplify.  Return a struct
8646         rather than allocating on the heap.
8647         (mono_class_inflate_generic_method_full): Update to changes.  Now,
8648         doesn't salt away a copy of the context -- simplifying the
8649         lifetime rules of a 'MonoGenericContext *'.
8650         (mono_method_get_context): Return pointer to embedded context.
8651         (setup_generic_array_ifaces): Allocate temporary context on stack.
8652         * reflection.c (inflate_mono_method): Likewise.
8653         (mono_reflection_bind_generic_method_parameters): Likewise.
8654         Use the context embedded within the inflated method as the hash key.
8656         Avoid a source of allocation of 'MonoGenericContext'.
8657         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
8658         and 'cached_context' fields into embedded 'MonoGenericContext' field.
8659         * class.c: Update to changes.
8660         (mono_generic_class_get_context): Simplify drastically.  Now just
8661         returns a pointer to the field.
8662         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
8663         argument as a const pointer.
8664         (mono_metadata_generic_context_equal): Likewise.
8665         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
8666         Update to changes.
8668 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
8670         * verify.c improved the handling of brtrue/brfalse, factored out common code
8672 2007-06-14  Raja R Harinath  <rharinath@novell.com>
8674         Kill MonoGenericMethod.
8675         * class-internals.h (MonoGenericContext::method_inst): Rename from
8676         'gmethod' and convert to a MonoGenericInst.
8677         (MonoGenericMethod): Remove.
8678         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
8679         * loader.c (method_from_methodspec): Update to changes.  Use a
8680         MonoGenericContext as the key to the hashtable.
8681         * metadata.c (mono_metadata_generic_context_equal): Rename from 
8682         'mono_metadata_generic_method_equal' and take MonoGenericContext.
8683         (mono_metadata_generic_context_hash): Likewise from
8684         'mono_metadata_generic_method_hash'.  Change hash function.
8685         (mono_metadata_load_generic_params): Update to changes.
8686         (mono_get_shared_generic_method): Remove.
8687         * metadata-internals.h (mono_get_shared_generic_method): Remove.
8688         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
8689         (inflate_generic_context): Likewise.
8690         (mono_class_inflate_generic_method_full): Likewise.
8691         (setup_generic_array_ifaces): Likewise.
8692         (mono_class_create_from_typespec): Likewise.
8693         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
8694         (method_encode_methodspec): Update callsite.
8695         (reflection_methodbuilder_to_mono_method): Update to changes.
8696         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
8697         MonoGenericContext as the key to the hashtable.
8698         (inflate_mono_method): Update to changes.
8700         * class-internals.h (MonoGenericMethod::container): Remove.
8701         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
8703 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
8705         * profiler-private.h, profiler.c, profiler.h: added API to profile
8706         exception events.
8708 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
8710         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
8712 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
8714         * verify.c: method invocation is now validated, now we verify parameter types on stack.
8715         Fixed overflow and underflow not aborting the verification process.
8717 2007-06-13  Mark Probst  <mark.probst@gmail.com>
8719         * class-internals.h (MonoStats): Added stats entries for dynamic
8720         code allocations.
8722 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
8724         * loader.c (mono_free_method): Free header->locals and header->clauses.
8726         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
8727         dynamic case.
8729         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
8731         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
8733 2007-06-12  Raja R Harinath  <rharinath@novell.com>
8735         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
8736         the tables.
8738 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
8740         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
8742 2007-06-11  Raja R Harinath  <harinath@gmail.com>
8744         MonoGenericMethod on a diet
8745         * class-internals.h (_MonoMethodInflated::reflection_info): Move
8746         here ...
8747         (_MonoGenericMethod::reflection_info): ... from here.
8748         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
8749         Update to changes.
8750         * reflection.c (inflate_mono_method): Likewise.
8751         (mono_reflection_bind_generic_method_parameters): Likewise.
8753 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
8755         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
8756         *verify.c: factored long ldarg forms to share code with short forms
8758 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
8760         *verify.c: fixed code formating factored some duplicate code
8761         into a new function
8763         *verify.h: fixed binary incompatibility introduced earlier
8765         *pedump.c: fixed formating
8767 2007-06-11  Raja R Harinath  <harinath@gmail.com>
8769         Fix assertion when disassembling Mono.C5.dll
8770         * loader.c (method_from_methodspec): Avoid inflating a method
8771         twice with the same context.  If the methodref is inflated, use
8772         the declaring method instead.
8774         * class.c (mono_class_from_generic_parameter): Fix case similar to
8775         bug #81830 handled below, but for method containers.
8777 2007-06-10  Raja R Harinath  <harinath@gmail.com>
8779         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
8780         get_shared_generic_class.  Directly inflate the instance.
8781         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
8782         (inflate_generic_class): Delete.
8783         (get_shared_generic_class): Delete.  Move setting of
8784         'cached_class' and 'cached_context' ...
8785         * metadata.c (mono_metadata_lookup_generic_class): ... here.
8787         * metadata.c (mono_metadata_lookup_generic_class): Change
8788         signature to take the components of a MonoGenericClass rather than
8789         an allocated MonoGenericClass.  Change semantics to be intern-like.
8790         * reflection.c (mono_class_bind_generic_parameters): Update to
8791         changes.  Make locking region tighter.
8792         * class.c (inflate_generic_class): Update to changes.
8793         (get_shared_generic_class): Likewise.
8794         * metadata-internals.h: Likewise.
8796         * reflection.c (mono_class_bind_generic_parameters): Take and
8797         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
8798         (mono_reflection_bind_generic_parameters): Use
8799         'mono_class_bind_generic_parameters' rather than duplicate the code.
8800         * class.c (mono_bounded_array_class_get): Update to changes.
8801         * object-internals.h: Likewise.
8803         * reflection.c (mono_class_bind_generic_parameters): Only support
8804         parameterizing generic type definitions.  Remove support for other
8805         open types.
8807 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
8809         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
8811         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
8812         in the dynamic case.
8814 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
8816         * threads.c: When cleaning up thread, reset the Background bit.
8817         Fixes bug #81720.
8819 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
8821        * metadata.c: Move variable declarations to top of scope.
8822        * verify.c: Move variable declarations to top of scope.
8824        Code is contributed under MIT/X11 license.
8826 2007-06-08  Raja R Harinath  <rharinath@novell.com>
8828         * reflection.c (mono_class_bind_generic_parameters): Replace
8829         open-coded loop with mono_metadata_inflate_generic_inst.
8831         * class.c (get_shared_generic_class): Don't call
8832         mono_get_shared_generic_inst.  Use the container's own
8833         'class_inst'.
8835         * metadata.c (mono_metadata_load_generic_params): Move
8836         initialization of 'context' field here from ...
8837         * class.c (mono_class_create_from_typedef): ... here, and ...
8838         * loader.c (mono_get_method_from_token): ... here.
8840         * class.c (get_shared_generic_class): Rename from
8841         mono_get_shared_generic_class and make static.
8842         (mono_get_shared_generic_inst): Move to metadata.c.
8843         * loader.c (mono_get_shared_generic_method): Likewise.
8844         * class-internals.h, metadata-internals.h: Update to changes.
8846         Fix #81830
8847         * class.c (mono_class_from_generic_parameter): Don't assume a
8848         generic container owner exists.  Generic containers from monodis
8849         don't have any.
8851 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
8853         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
8854         * verify.h: new typedefs to returns the non-verifiable status
8855         * verify.c: initial implementation of generics, stack merging and object compatibility check
8857 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8859         * class.c, image.c, class-internals.h (MonoImage): class_cache is
8860         a MonoInternalHashTable again (fixed bug in internal hash table
8861         code).
8863 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8865         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
8866         MonoInternalHashTable again (fixed bug in internal hash table
8867         code).
8869 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8871         * class.c, image.c, class-internals.h, domain.c,
8872         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
8873         changes.  Have to figure out what makes them break the SWF
8874         regression.
8876 2007-06-04  Mark Probst  <mark.probst@gmail.com>
8878         * class.c, image.c, class-internals.h (MonoImage): class_cache is
8879         a MonoInternalHashTable now.
8881 2007-06-04  Mark Probst  <mark.probst@gmail.com>
8883         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
8884         MonoInternalHashTable now.
8886 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
8888         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
8889         invoke_impl code.
8891         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
8893         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
8894         dependent trampoline.
8896         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8898         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
8900 2007-05-29  Robert Jordan  <robertj@gmx.net>
8902         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
8904 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
8906         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
8908 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
8910        * marshal.c: Fix interface lookup loops for
8911        cominterop_get_com_slot_for_method and 
8912        cominterop_get_method_interface. Only need to lookup
8913        if type is a class, else use interface type method is on.
8915        Code is contributed under MIT/X11 license.
8917 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
8919         * reflection.c: HasSecurity can be present even if no specially 
8920         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
8921         SecurityAttribute). Fix CAS regression tests on buildbot.
8923 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
8925        * appdomain.c: Add configure checks for header files.
8926        * image.c: Add configure checks for header files.
8927        * file-io.c: Add configure checks for header files.
8928        * debug-mono-symfile.c: Add configure checks for header files.
8929        * threadpool.c: Add configure checks for header files.
8930        * console-io.c: Add configure checks for header files.
8931        * profiler.c: Add configure checks for header files.
8932        * rawbuffer.c: Add configure checks for header files.
8933        * icall.c: Add configure checks for header files.
8934        * rand.c: Add configure checks for header files.
8935        * socket-io.c: Add configure checks for header files.
8937        Code is contributed under MIT/X11 license.
8939 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
8941         * reflection.c (mono_custom_attrs_from_builders): Remove the 
8942         assertion as it breaks the build.
8943         
8944         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
8946         * reflection.c (lookup_custom_attr): Make a copy here too.
8948         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
8949         dynamic images.
8951         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
8952         images.
8954         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
8955         info.
8957 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
8959         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
8960         (load_cattr_value): Ditto.
8962 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
8964         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
8966 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
8968         * threads.c: In "start_wrapper", set apartment_state to MTA if
8969         apartment_state is Unknown and we're running on 2.0 profile or
8970         higher.
8971         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
8972         to main method, then set apartment_state to Unknown on 1.0 profile,
8973         and MTA on 2.0 profile.
8975 2007-05-16  Jb Evain  <jb@nurv.fr>
8977         * class-internals.h (MonoDefaults): Add an attribute_class and
8978           customattribute_data_class.
8979         * domain.c (mono_init_internal): Populate them.
8980         * reflection.c: Use them to remove duplicates. Make a vew
8981         MonoClass variables `static'.
8983 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
8985         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
8986         step in implementing IMT, so that all isinst checks now can go
8987         through the bitmap.
8988         This was needed because vtables for TransparentProxy need to look
8989         like the vtable of the "target" class, so they need to point to
8990         its interface bitmap directly.
8992         * object.c: inside "mono_class_create_runtime_vtable" and
8993         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
8995 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
8997         * object-internals.h
8998           culture-info.h : added territory field in MonoCulture and
8999           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
9000         * locales.c : fill territory field above too.
9001         * culture-info-table.h : regenerated.
9003 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
9005         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
9006         Fixes #81599.
9008 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
9010         * object.c: Always initialize apartment, even if 
9011         there is no custom attributes on entry point.
9012         
9013         Code is contributed under MIT/X11 license.
9015 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
9017         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
9018         * metadata.c: If no encoding is set, check for unicode
9019         on class.
9020         
9021         Code is contributed under MIT/X11 license.
9023 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
9025         * threads.c: Handle if mono_thread_current returns NULL 
9026         
9027         Code is contributed under MIT/X11 license.
9029 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
9031         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
9032         in start_wrapper. Added mono_thread_init_apartment_state and
9033         mono_thread_cleanup_apartment_state.
9034         * object.c: Initialize thread apartment state on main thread
9035         by checking for STAThreadAttribute on entry point.
9036         * object-internals.h: Add apartment_state field to MonoThread.
9037         * threads-types.h: Add unmanaged definition of 
9038         System.Threading.ApartmentState, MonoThreadApartmentState.
9039         
9040         Code is contributed under MIT/X11 license.
9041         
9042 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
9044         * class.c: Fix windows build.
9045         * class-internals.h: Fix windows build.
9046         
9047         Code is contributed under MIT/X11 license.
9049 2007-05-08  Robert Jordan  <robertj@gmx.net>
9051         * process.c (CreateProcess_internal):
9052         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
9053         .CreateNoWindow was specified. Fixes #81496.
9055 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
9057         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
9058         step in implementing IMT, replaced it with two compact arrays
9059         (interfaces_packed and interface_offsets_packed) and a bitmap that
9060         is used for isinst checks (interface_bitmap).
9062         * class.c: (compare_interface_ids): compare function to pass to
9063         bsearch when looking for an interface with a given id.
9064         (mono_class_interface_offset): reimplemented using bsearch on
9065         interfaces_packed, getting the offset from interface_offsets_packed.
9066         (print_implemented_interfaces): utility debugging function.
9067         (setup_interface_offsets): reworked to initialize interfaces_packed,
9068         interface_offsets_packed and interface_bitmap.
9070         * object.c: replaced all accesses to "MonoClass.interface_offsets"
9071         with uses of interfaces_packed and interface_offsets_packed.
9073 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
9075         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
9076         mono_class_interface_offset prototype to wrap all accesses to
9077         "MonoClass.interface_offsets".
9079         * class.c: Implemented mono_class_interface_offset, and wrapped all
9080         accesses to "MonoClass.interface_offsets".
9082         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
9083         "MonoClass.interface_offsets".
9085 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
9087         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
9088         GetMethodFromHandle overloads (bug #78637).
9090 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
9092         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
9093         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
9095 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
9097         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
9098         #81498.
9100         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
9101         gracefully.
9102         (mono_custom_attrs_from_index): Ditto.
9104         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
9105         Fixes #81501.
9107 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
9109         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
9110         is now allocated from a mempool.
9112 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
9114         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
9115         caller holds threads_lock, leading to deadlocks. Fixes #81476.
9117 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
9119         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
9120         mono_loader_clear_error () too late. Fixes #81463.
9122 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
9124         * culture-info-table.h : regenerated.
9126 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
9128         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
9129         is missing.
9131 2007-04-25  Dick Porter  <dick@ximian.com>
9133         * Makefile.am: Put the mingw enforced-optimisation back into the
9134         PLATFORM_WIN32 section.
9136 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
9138         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
9139         patch.
9141         * image.c (mono_image_load_module): New API function to load a module reference.
9143         * image.c (load_modules): Load modules lazily. Fixes #80812.
9145         * class.c (mono_class_from_typeref): Use mono_image_load_module.
9146         
9147         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
9149         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
9150         to mono_image_load_module_dynamic.
9152 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
9154         * marshal.c: Fix calling convention for CCW on non-windows
9155         platforms. STDCALL on windows, CDECL everywhere else to work 
9156         with XPCOM and MainWin COM.
9157         
9158         Code is contributed under MIT/X11 license.
9160 2007-04-23  Martin Baulig  <martin@ximian.com>
9162         Fix #80969.
9164         * loader.c
9165         (method_from_memberref): Added `gboolean *used_context' argument.
9166         (mono_get_method_from_token): Likewise.
9167         (mono_get_method_full): Don't insert the method in the cache when
9168         `used_context' is true.
9170 2007-04-23  Raja R Harinath  <rharinath@novell.com>
9172         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
9174         * reflection.c (mono_reflection_bind_generic_parameters): Don't
9175         create new MonoTypes for returned types.
9176         * class.c (mono_generic_class_get_class): Export mono-internal.
9177         * class-internals.h: Update to changes.
9179 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
9181         * threadpool.c, threadpool.h, icall-def.h: patch from
9182         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
9184 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
9186         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
9187         
9188         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
9190         * threads.c (mono_thread_get_stack_bounds): New helper function.
9192         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
9193         Correctly compute stack bounds when attaching. Fixes #81394.
9195 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
9197         * reflection.c: fix handling of doubles in custom attributes
9198         for the arm-fpa format (bug #81368).
9200 2007-04-18  Raja R Harinath  <rharinath@novell.com>
9202         * reflection.c (assembly_add_win32_resources): Mildly relax an
9203         bounds check to let the end pointer point just past the end of the
9204         allocated buffer.  (may fix #81384)
9206 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
9208         * culture-info-table.h : regenerated.
9210 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
9212         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
9213         the thread is aborted early.
9215 2007-04-05  Dick Porter  <dick@ximian.com>
9217         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
9218         FindFirstFile()/FindNextFile() to find entries.  This lets the
9219         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
9220         81038.
9222         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
9223         the parameters of
9224         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
9226 2007-04-04  Martin Baulig  <martin@ximian.com>
9228         * debug-helpers.c
9229         (mono_method_desc_full_match): Add support for nested classes.
9231 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
9233         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
9235 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
9237         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
9238         waiting for too many threads.
9240 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
9242         * environment.c: Fix return value check on uname so we can get the 
9243         executing version on Solaris operating systems.
9245 2007-03-28  Jb Evain  <jbevain@gmail.com>
9247         * class.c (mono_type_get_name_recurse): Complete the
9248         fix for the creation of assembly qualified names for
9249         pointer types. Fixes #81208.
9251 2007-03-27  Dick Porter  <dick@ximian.com>
9253         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
9254         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
9255         changed.
9257         * threads.c
9258         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
9259         the value of ReleaseMutex().
9261 2007-03-27  Dick Porter  <dick@ximian.com>
9263         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
9264         in little-endian order, not network endian, so must be converted
9265         to host endian here.  Fixes bug 80593.
9267 2007-03-22  Jb Evain  <jbevain@gmail.com>
9269         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
9270         qualified names for pointer types. Fixes #81208.
9272 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
9274         * marshal.c: Add support for PreserveSigAttribute. 
9275         
9276         Code is contributed under MIT/X11 license.
9278 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
9280         * process.c: Fix endianness issues. Fixes #81126.
9282         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
9283         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
9285         * image.c (mono_image_lookup_resource): Make this work on big-endian
9286         machines.Change API contract so the caller needs to free the return value.
9287         
9288         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
9289         API change.
9290         
9291 2007-03-14  Martin Baulig  <martin@ximian.com>
9293         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
9294         mono_type_get_desc() as well.
9296 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9298         * icall.c:  Fix environ access in VS.  
9299         
9300 2007-03-13  Alp Toker  <alp@atoker.com>
9302         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
9303         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
9304         #63841.
9306 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
9308         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
9309         circular references among dynamic methods. Fixes #81091.
9311         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
9313 2007-03-09  Martin Baulig  <martin@ximian.com>
9315         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
9317 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
9319         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
9320         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
9321         
9322         Code is contributed under MIT/X11 license.
9323         
9324 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
9326         * loader.c: Reapply patch for bug #79424.
9328 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
9330         * metadata.c (mono_type_to_unmanaged): Only convert object to
9331         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
9333 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
9335         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
9336         (and incorrectly set) is_reference field from MonoGenericInst.
9338 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
9340         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
9341         a little earlier.
9343         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
9345         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
9347 2007-03-05  Miguel de Icaza  <miguel@novell.com>
9349         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
9350         FileOptions.1 value to mean "temporary", map that to
9351         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
9353         Fixes 80688
9355 2007-03-03  Marek Habersack  <mhabersack@novell.com>
9357         * appdomain.c: implement MS .Net style shadow copying. Copies of
9358         the assemblies are made in a subdirectory of the dynamic base
9359         directory, the assembly names are preserved.
9360         Copy .mdb and .config files along with the assemblies being shadowed.
9362 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
9364         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
9365         (emit_marshal_handleref): Ditto.
9367         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
9368         on Visual C++. Fixes #80671.
9370 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9372         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
9373         for clone operations.
9375 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
9377         * marshal.c: Fix warnings.
9379 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
9381         * loader.c: allow case-insensitive matching of the dll name
9382         in dllmap handling when prefixed with "i:".
9384 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
9386         * threads.c: Fix #ifdef for dummy_apc function for VS.
9388 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9390         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
9392 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
9393         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
9394         giving precedence to the methods with a fully qualified name
9395         (InterfaceName.MethodName) when building the interface sections
9396         of the vtable.
9398 2007-02-16  Dick Porter  <dick@ximian.com>
9400         * threadpool.c (append_job): Fix fast-path array handling, so it's
9401         less likely the array will grow exponentially when the load is
9402         heavy.
9404 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9406         * metadata-internals.h, loader.c: fix dllmap lookup order
9407         for non-function maps, too, and prepare for fallback code.
9409 2007-02-12  Robert Jordan  <robertj@gmx.net>
9411         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
9412         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
9413         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
9414         GlobalFree. Fixes a part of bug #77075.
9416 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
9418         * loader.c: implemented typedef parent in field memberref.
9420 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
9422         * marshal.c: Fix warnings and remember to call Release on
9423         IUnknown of RCW.
9424         
9425         Code is contributed under MIT/X11 license.
9427 2007-02-10  Miguel de Icaza  <miguel@novell.com>
9429         * class-internals.h: Add MonoHandleRef definition, and
9430         handleref_class to mono_defaults. 
9432         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
9433         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
9435         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
9436         (do nothing on this stage)
9437         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
9438         (emit_marshal_handleref): New method, used for argument handling
9439         of HandleRefs. 
9441 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
9443         * class.c (mono_class_setup_parent): Lazily init com types.
9444         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
9445         init com types.
9446         * object.c (mono_remote_class_vtable): Lazily init com types.
9447         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
9448         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
9449         * domain-internals.h: Expose mono_init_com_types.
9450         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
9451         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
9452         Add support for COM Callable Wrapper marshalling.
9453         * marshal.h: Add icall definitions.
9454         * gc.c: Handle freeing of CCWs in finalizer code.
9455         
9456         Code is contributed under MIT/X11 license.
9458 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
9460         * reflection.c: changed all the signature encoding code to use
9461         a variable-sized buffer.
9463 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9465         * marshal.c: locking fixes: never take the loader lock
9466         or other runtime locks when holding the marshal lock
9467         (fixes bug#80664).
9469 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
9471         * marshal.c: make the delegate function pointer mapping
9472         work for the moving GC.
9474 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
9476         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
9477         for bug #80618.
9479 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9481         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
9482         gmodule.
9484 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9486         * threadpool.c: made the code moving-GC safe.
9488 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
9490         * assembly.c, boehm-gc.c, class-internals.h, class.c,
9491         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
9492         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
9493         warning cleanup.
9494         * reflection.c: warning cleanup, some threading and moving GC fixes.
9496 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
9498         * class.c, loader.c: create the needed Set/Get/Address array methods
9499         as well as the .ctors in mono_class_init (), fixes bug #80567.
9501 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
9503         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
9504         we doesn't decrease its alignment. Should fix the sparc build.
9506 2007-01-24  Dick Porter  <dick@ximian.com>
9508         * socket-io.c
9509         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9510         Create the returned object if we need to ignore an unsupported
9511         socket option.  Fixes a segfault reported by Atsushi.
9513 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
9515         * class.c, object.c: restrict GC-tracked fields to
9516         UIntPtr fields used inside corlib, so we provide better
9517         type info to the GC and also allow broken packing as in
9518         bug #80580.
9520 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
9522         * sgen-gc.c: removed duplicated function.
9524 2007-01-19  Miguel de Icaza  <miguel@novell.com>
9526         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
9527         value that means that the value is not supported, but that we
9528         should not return a failure, but instead report this as a
9529         successful operation.
9531 2007-01-19  Raja R Harinath  <rharinath@novell.com>
9533         Fix tests/bug79956.2.il
9534         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
9535         (mono_generic_class_get_class): If the generic definition in an
9536         enum, copy over other fields related to it.
9538 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9540         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
9541         genericinst enums (bug #79215).
9543 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
9544         * class.c: Fix bug 80307.
9546 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
9548         * image.c: if the file table is not present, try to load
9549         all the modules, since we don't have info about them
9550         having or not metadata (bug #80517).
9551         * assembly.c: allow mono_assembly_load_references () to
9552         work for netmodules.
9554 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9556         * image.c, metadata-internals.h, object.c: execute module
9557         cctors when running on the 2 runtime if present (bug #80487).
9559 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
9561         * icall.c: optimized InitializeArray() on bigendian.
9563 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
9565         * icall.c: fix for the broken ARM FPA double format.
9567 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9569         * icall.c: handle endian issues for r4 and r8 types, too, in
9570         the InitializeArray() icall.
9572 2007-01-15  Miguel de Icaza  <miguel@novell.com>
9574         * loader.c (mono_loader_error_prepare_exception): Clear the error
9575         once we have extracted the information from it, do this before we
9576         call into the JIT's class loading mechanisms.
9578         * object.c (mono_class_create_runtime_vtable): Do not clear the
9579         loader error before calling mono_class_get_exception_for_failure
9580         as the loader error is needed inside
9581         mono_class_get_exception_for_failure to throw the error (thinko).
9583         Fixes #80521
9584         
9585 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9587         * reflection.c: align fields rva data so it's faster to load at
9588         runtime.
9590 2007-01-12  Raja R Harinath  <rharinath@novell.com>
9592         Prepare to simplify GenericMethod handling.
9593         * class-internals.h (mono_method_get_context): New accessor function.
9594         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
9595         rather than directly accessing '->context' field.
9597         * class-internals.h (_MonoGenericParam.method): Move ...
9598         (_MonoGenericContainer): ... here.  Add into union with klass field.
9599         * class.c, icall.c, loader.c, metadata.c, reflection.c:
9600         Update to changes.
9602 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
9604         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
9605         the wrapper type enum and reduce relocations.
9607 2007-01-12  Raja R Harinath  <rharinath@novell.com>
9609         * reflection.c (inflate_mono_method): Reuse method instantiation
9610         from the generic method, if available.
9612 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
9614         * marshal.c (emit_marshal_variant): Fix conv_arg
9615         type in last commit, based on whether parameter is byref.
9616         
9617 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
9619         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
9620         marshalling.
9621         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
9622         MONO_TYPE_OBJECT back for VARIANT support.
9624 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
9626         * marshal.c, marshal.h, icall-def.h: Implement 
9627         Marshal.ReAllocCoTaskMem.
9629 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
9631         * marshal.c: memory retention fixes: use the proper
9632         image cache for runtime_invoke method lookups.
9634 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9636         * mempool.c: added code to help debug mempool allocations.
9638 2007-01-11  Dick Porter  <dick@ximian.com>
9640         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
9641         support (experimenting with faking it with IP_MTU_DISCOVER for
9642         systems that don't have IP_DONTFRAGMENT.)
9643         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
9644         icall.
9646         * icall-def.h: new System.Net.Sockets.Disconnect icall.
9648         * socket-io.h: Add new fields to MonoSocketAsyncResult
9649         corresponding to the new ones in Socket.cs.
9651 2007-01-11  Raja R Harinath  <rharinath@novell.com>
9653         Fix IronPython regression mentioned in #80249
9654         * metadata.c (do_mono_metadata_parse_generic_class): Clear
9655         'cached_context' field, since it may have been initialized as a
9656         side-effect of metadata parsing.
9658         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
9659         (_MonoGenericClass.cached_class): Move here and rename from lone
9660         remaining field of ...
9661         (_MonoInflatedGenericClass): ... this.  Remove.
9662         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
9663         to changes.
9665         Fix mcs/tests/test-128.cs regression.
9666         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
9667         2007-01-10 change below.
9668         [MONO_TYPE_OBJECT]: Recurse into array case.
9670 2007-01-11  Raja R Harinath  <harinath@gmail.com>
9672         * class-internals.h (mono_get_inflated_generic_class): Remove.
9673         * class.c (mono_get_inflated_generic_class): Remove.
9674         (mono_generic_class_get_class): Rename from
9675         mono_class_create_generic.
9676         (mono_class_from_mono_type) [GENERICINST]: Use it.
9677         * reflection.c, metadata.c: Update to changes.  Use
9678         'mono_class_from_mono_type'.
9680 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
9682         * reflection.c: use passed type when encoding an array element
9683         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
9685 2007-01-09  Robert Jordan  <robertj@gmx.net>
9687         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
9688         result arguments (someDelegate.EndInvoke (unrelatedAres)).
9689         Fixes bug #80392.
9691 2007-01-09  Raja R Harinath  <rharinath@novell.com>
9693         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
9695         * object.c (set_value): Avoid aliasing between type->data.klass
9696         and type->data.generic_class.
9698         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
9700 2007-01-08  Raja R Harinath  <rharinath@novell.com>
9702         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
9703         between type->data.klass and type->data.generic_class.
9705 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
9707         * marshal.c: In MS.NET, StringBuilder objects are not copied by
9708         value in out parameters.
9710 2007-01-08  Raja R Harinath  <rharinath@novell.com>
9712         Simplify invariant for MonoGenericClass::klass field.
9713         * class.c (mono_class_create_generic): Verify 'klass' is null.
9714         * metadata.c (do_mono_metadata_parse_generic_class): Don't
9715         initialize 'klass' field.
9717 2007-01-05  Raja R Harinath  <rharinath@novell.com>
9719         Ongoing work to avoid redundant data and simplify invariants.
9720         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
9721         'generic_class', and change type to a GenericInst.
9722         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
9723         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
9725 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
9727         * class.c : skip io-layer under PLATFORM_WIN32.
9729 2007-01-03  Tor Lillqvist  <tml@novell.com>
9731         Fix #80305: In a bundled executable, look in the bundled exe
9732         assembly to determine the runtime version. Add the possibility to
9733         bundle also the machine.config file.
9734         
9735         * assembly.c (mono_assembly_open_from_bundle): Make
9736         non-static. Allow being called even if we have no bundled
9737         assemblies, and return NULL right away in that case.
9739         * domain-internals.h: Declare mono_assembly_open_from_bundle()
9740         here.
9742         * domain.c (app_config_parse): Take an assembly exe file name as
9743         parameter instead of a config file name. Check for a bundled
9744         config file for that assembly by calling
9745         mono_config_string_for_assembly_file() (see below) before looking
9746         for one in the file system.
9747         (get_runtimes_from_exe): Corrsponding change to call of
9748         app_config_parse().
9749         (get_runtimes_from_exe): Check for bundled assembly exe file first
9750         by calling mono_assembly_open_from_bundle(). If no bundled
9751         assembly exe file is found, call mono_image_open() as before to
9752         look it up in the file system.
9754         * mono-config.c: Add variable bundled_machinec_onfig.
9755         (mono_config_string_for_assembly_file): New function.
9756         (mono_config_for_assembly): Move code snippet that looks for a
9757         bundled assembly .config file into the above new function. Call
9758         it.
9759         (mono_register_machine_config, mono_get_machine_config): New
9760         functions to set and retrieve
9762         * assembly.h: Declare mono_register_machine_config().
9764         * mono-config.h: Declare mono_get_machine_config() and
9765         mono_config_string_for_assembly_file().
9767         * icall.c: No declaration of environ necessary on Win32. It is
9768         declared (as a macro expanding to a function call) in stdlib.h.
9769         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
9770         New internal mono function. Returns the value of
9771         mono_get_machine_config() as a Mono string.
9773         * icall-def.h: Add get_bundled_machine_config().
9775 2007-01-04  Raja R Harinath  <rharinath@novell.com>
9777         Remove redundant field
9778         * class-internals.h (_MonoGenericContext.container): Remove field.
9779         * loader.c (mono_method_get_signature_full): Don't parse a
9780         "container" for a signature parse when the signature is inflated
9781         immediately.
9782         (method_from_methodspec): Likewise, for a generic_inst.
9783         * class.c, metadata.c, reflection.c: Update to changes.
9785 2006-01-04  Raja R Harinath  <rharinath@novell.com>
9787         * class-internals.h (_MonoGenericClass): Rename 'context' field to
9788         'cached_context', and change semantics -- it starts off NULL, and
9789         is initialized on demand.
9790         * class.c (mono_generic_class_get_context): New accessor to
9791         replace 'context' field accesses.
9792         (mono_class_get_context): New helper.
9793         (*): Update to changes.
9794         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
9796 2007-01-03  Miguel de Icaza  <miguel@novell.com>
9798         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
9799         before the memcpy.   Fixes Marshal2 regression.
9801 2007-01-02  Jb Evain  <jbevain@gmail.com>
9803         * blob.h: add a MONO_TYPE_ENUM definition
9804         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
9805         fix the encoding of arrays of enums in custom attributes.
9807         Fixes #79666.
9809 2007-01-01  Miguel de Icaza  <miguel@novell.com>
9811         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
9812         string is null terminated, but only cut the string short if it
9813         overflows the buffer.   
9814         
9815         (mono_string_to_byvalstr): Also fix this routine.   The code here
9816         was not properly terminating a string (it was only terminated
9817         because of the previous catch-all memset). 
9819         I left the memset, because I do not know if applications expect
9820         the runtime to clear this region. 
9822         Fixes #79944.
9824         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
9825         Clear the error before returning to unmanaged code to prevent the
9826         runtime from being confused later on (fixes  80420).
9827         (ves_icall_type_from_name): Always call mono_loader_clear_error
9828         after parsing a type that could have failed.
9829         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
9831         * loader.c (mono_loader_clear_error): Fix indentation.
9833 2006-12-28  Martin Baulig  <martin@ximian.com>
9835         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
9837 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9839         * reflection.c: patch from Rolf Bjarne Kvinge to fix
9840         getting a token for an EnumBuilder.
9842 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
9844         * reflection.c: be more careful in case resource generation
9845         fails to create the data array.
9847 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9849         * sgen-gc.c: write barrier for clone and fix unregister handles.
9851 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9853         * reflection.c: some fixes needed in the generics code for the moving GC.
9855 2006-12-22  Robert Jordan  <robertj@gmx.net>
9857         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
9858         account. Fixes bug #80299.
9860 2006-12-21  Raja R Harinath  <rharinath@novell.com>
9862         Fix WaitHandle usage in delegates.
9863         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
9864         * object.c (mono_wait_handle_new): Use the property set method to
9865         initialize the handle.
9866         (mono_wait_handle_get_handle): New.
9867         * threadpool.c (mono_async_invoke): Use it.
9868         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
9869         Likewise.
9870         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
9872 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
9874         * marshal.c (emit_marshal): Call emit_marshal_variant and
9875         emit_marshal_com_interface when applicable.
9876         (emit_marshal_variant, emit_marshal_com_interface): Add
9877         methods for this case and remove if's from emit_marshal_object.
9878         
9879 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
9881         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
9883 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
9885         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
9886         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
9887         and GlobalFree on Windows. Remove FIXME.
9889 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9891         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
9892         implementation for managed objects.
9894 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9896         * object.c: implemented code to be used for checking
9897         that no reference field overlaps with non-references.
9899 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9901         * threadpool.c: fix queue code to be compatible with the
9902         moving GC.
9904 2006-12-18  Miguel de Icaza  <miguel@novell.com>
9906         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
9907         in structures by throwing ArgumentNullException.
9909         (emit_marshal_safehandle): Also when they are null parameters.
9911         (emit_marshal_safehandle): Add support for ref
9912         SafeHandles parameters
9914 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9916         * profiler.c: updated to use the mono-dl API instead of
9917         gmodule.
9919 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9921         * profiler.c: updated to use the mono-dl dynamic loading
9922         API instead of gmodule.
9924 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9926         * profiler.c: use readlink, older versions of glib don't have
9927         g_file_read_link ().
9929 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9931         * profiler.c: try to detect the path to mono if libc fails to provide
9932         a useful name (bug #80286).
9934 2006-12-16  Raja R Harinath  <rharinath@novell.com>
9936         Fix #80242
9937         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
9938         instance, use the generic type definition instead.
9939         (ves_icall_Type_GetNestedTypes): Likewise.
9940         * class.c (mono_class_create_generic): Always set the
9941         nested_classes of a generic instance to NULL, even if the generic
9942         type definition has nested types.
9944 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
9946         * marshal.c (mono_string_from_bstr): Revert previous Windows change
9947         and fix on Linux.
9948         
9949 2006-12-15  Miguel de Icaza  <miguel@novell.com>
9951         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
9952         my arguments were in the wrong order.   I also fixed the Windows
9953         version which seems to have had the same issue.
9955         (mono_free_bstr): On Unix, this is g_free.
9956         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
9957         conversions (for the tests in corlib to pass).
9959 2006-12-14  Miguel de Icaza  <miguel@novell.com>
9961         * marshal.c (emit_ptr_to_object_conv): For now, ignore
9962         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
9963         exception if a ref SafeHandle in a struct has changed).
9964         
9965         (emit_struct_conv): Do not perform layout checks for classes
9966         derived from SafeHandle, as those are specially handled. 
9968         (emit_object_to_ptr_conv): Add support for
9969         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
9971         (emit_marshal_safehandle): Implement conversion of return values
9972         of safehandles (MARSHAL_ACTION_CONV_RESULT).
9973         
9974         * threads.c: WaitHandle now is compiled with two different handles
9975         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
9976         for 2.0.
9977         
9978         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
9979         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
9980         these routines to cope with both kinds of fields.
9982 2006-12-12  Miguel de Icaza  <miguel@novell.com>
9984         * metadata.c (mono_type_to_unmanaged): Handle the case where
9985         type->data.klass is a SafeHandle, and in that case, return the
9986         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
9987         MONO_MARSHAL_CONV_SAFEHANDLE. 
9989 2006-12-11  Miguel de Icaza  <miguel@novell.com>
9991         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
9992         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
9993         calling emit_marshal_object.
9995         (emit_marshal_safehandle): Implement marshalling of
9996         SafeHandle parameters (no ref support yet).
9998         (MarshalAction): Document the defines as I implement
9999         them for SafeHandle.
10001         (emit_marshal_object): indentation police.
10003         * class-internals.h: Define MonoSafeHandle.
10004         Add safehandle_class to MonoDefaults type.
10006         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
10007         list of classes to check for fields. 
10009         * domain.c (mono_init_internal): Add SafeHandle to the list of
10010         mono_defaults loaded.
10012 2006-12-15  Raja R Harinath  <rharinath@novell.com>
10014         Fix #80253
10015         * reflection.c (mono_reflection_bind_generic_parameters): If the
10016         generic type definition is a type builder, ensure that it is fully
10017         initialized before instantiating it.  Kill some dead code.
10019 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10021         * object.c: clear the loader_error () before loading
10022         more metadata stuff (bug #80258).
10024 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
10026         * icall.c, icall-defs.h: type modifiers icalls for
10027         parameters and properties.
10029 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
10031         * object.c, icall.c: fixed warnings.
10033 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10035         * marshal.c: fixed a couple of leaks and coding style in a few places.
10037 2006-12-08  Dick Porter  <dick@ximian.com>
10039         * process.c: Cope with NULL ProcessStartInfo arguments on windows
10040         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
10041         80173.
10043 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
10045         * process.c: ProcessStartInfo may have only filename set and
10046         arguments can be NULL.
10048 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
10050         * icall.c: fix leak found by Robert Jordan.
10052 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10054         * marshal.c, marshal.h: generate managed method to access an element
10055         of a multi-dimensional array.
10057 2006-11-30  Paolo Molaro (lupus@ximian.com)
10059         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
10061 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10063         * icall.c: back out GetFields () fix until the serialization code is
10064         fixed to not depend on the incorrect behaviour.
10066 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
10068         * profiler.c: provide defaults if none are set.
10070 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
10072         * Makefile.am, attrdefs.h: new public header file with
10073         constants for attributes for use by embedders.
10075 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
10077         * icall.c: GetFields () fix for bug #80064.
10079 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
10081         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
10082         removed long unused icalls.
10084 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
10085   
10086         * marshal.c: 
10087                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
10088                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
10089                 can be generated without a delegate class.
10090                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
10091         
10092         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
10094 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10096         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
10097         #80069.
10099 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10101         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
10102         icall-def.h: added icalls needed by System.GC.
10104 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
10106         * loader.c: ensure the class in catch clauses is handled
10107         correctly for generics methods (fixes bug#79980).
10109 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
10111         * monitor.h, monitor.c: added mono_locks_dump () function
10112         to help debug deadlocks involving managed locks.
10114 2006-11-13  Dick Porter  <dick@ximian.com>
10116         * file-io.c (get_file_attributes): If the file is a symlink try
10117         and get the stat data for the target, but also add the
10118         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
10119         the specs for the windows symlink support, but will probably have
10120         to be reworked when I have test data from a vista machine.  Fixes
10121         bug 79887.
10123 2006-11-13  Dick Porter  <dick@ximian.com>
10125         * gc.c (mono_domain_finalize): 
10126         * marshal.c (mono_delegate_begin_invoke): 
10127         * threadpool.c (socket_io_init, mono_thread_pool_init)
10128         (mono_thread_pool_finish): 
10129         * monitor.c (mono_monitor_try_enter_internal): 
10130         * threads.c (mono_thread_resume, mono_thread_init)
10131         (mono_thread_suspend_all_other_threads)
10132         (mono_thread_execute_interruption): 
10133         * appdomain.c (mono_domain_unload): Check for NULL error returns
10134         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
10135         75733.
10137 2006-11-11  Miguel de Icaza  <miguel@novell.com>
10139         * process.c
10140         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
10141         Only close the handle if the value of the handle is not
10142         INVALID_HANDLE_VALUE.  This just makes the process a bit more
10143         robust.
10145         Improvement for #75733, so that we do not run into this problem. 
10147         
10148         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
10149         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
10150         internal variables.  Fixes #79462 
10151         
10153 2006-11-09  Dick Porter  <dick@ximian.com>
10155         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
10156         Use poll() not select().  Fixes bug 79397.
10158 2006-11-09  Raja R Harinath  <rharinath@novell.com>
10160         Fix #79872
10161         * assembly.c (mono_assembly_load_from_full): Check that the given
10162         image has an assembly manifest.
10164 2006-11-09  Ankit Jain  <jankit@novell.com>
10166         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
10167         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
10168         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
10170 2006-11-07  Dick Porter  <dick@ximian.com>
10172         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
10173         Put the old resolver behaviour back for pre-2.0 profiles.
10175 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
10177         * threadpool.c: precise GC and locking fixes.
10179 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
10181         * class.c: don't load types that have an explicit unaligned
10182         managed reference. Provide better info in the TypeLoad exception.
10183         Part of the fix for bug #79744.
10184         * object.c: use the correct check for class type load issues.
10186 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
10188         * class.c: enforce alignment of fields with managed references
10189         even when Pack=1 is forced by the user (bug #77788).
10191 2006-11-03  Dick Porter  <dick@ximian.com>
10193         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
10194         If the address reverse lookup fails, return it as the hostname
10195         anyway.  Fixes bug 79721.
10197 2006-11-03  Dick Porter  <dick@ximian.com>
10199         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
10200         Fix build on Windows.
10202 2006-11-02  Dick Porter  <dick@ximian.com>
10204         * icall-def.h: 
10205         * object-internals.h: 
10206         * exception.c (mono_get_exception_thread_interrupted): 
10207         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
10208         Fixes bug 74525.
10210         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
10211         Check for pending Thread.Interrupt.
10213 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
10214         * loader.c: Fixed bug 79684.
10216 2006-10-27  Dick Porter  <dick@ximian.com>
10218         * file-io.c (get_file_attributes): Force symlinks to directories
10219         to be returned as a regular file.  Fixes bug 79733.
10220 2006-10-26  Dick Porter  <dick@ximian.com>
10222         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
10223         CreateFile to open a directory then we need to set the
10224         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
10226 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
10228         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
10229         friends.
10231 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10233         * sgengc.c: small cleanup of timer code.
10235 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
10237         * sgen-gc.c: fix some warnings and start adding support for
10238         complete object removal on domain unload.
10240 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
10242         * assembly.c: build_assembly_name should not consider a version
10243         number without build or revision number invalid. Fixes bug #79715.
10245 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
10247         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
10248         call kernel32 function OutputDebugString directly.
10249         
10250         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
10251         
10252 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
10254         * reflection.c: small cleanup, using a function to insert a MonoString
10255         in the string heap.
10257 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
10259         * reflection.c: moving GC fixes.
10261 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
10263         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
10264         all the objects with finalizers belonging to an unloading appdomain.
10266 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
10268         * sgen-gc.c: added ability to allocate even when the nursery is fully
10269         pinned and fixed a couple of bugs.
10271 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
10273         * threads.h: Revert the last change for now.
10275         * threads.h (mono_thread_get_pending_exception): Rename this to
10276         mono_thread_get_undeniable_exception ().
10278 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
10280         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
10281         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
10282         when fname does not refer to valid assembly. This result in a more
10283         meaningful error message.
10284         * exception.c: added mono_get_exception_bad_image_format2 which 
10285         constructs a BadImageFormatException using the ctor taking a custom
10286         message and the file name. Passing in a NULL msg results in a default
10287         message.
10288         * exception.h: define mono_get_exception_bad_image_format2 function.
10289         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
10290         when file name pointed to an invalid IL image. Use 
10291         mono_get_exception_file_not_found2 to construct FileNotFoundException,
10292         as this results in a more meaningful error message.
10294 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
10296         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
10297         #79465.
10299 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
10301         * metadata.c (mono_type_size): Change the align parameter to guint32 for
10302         consistency with the other _size functions.
10303         (mono_type_stack_size): Ditto.
10305         * class.c object.c icall.c: Fix warnings caused by the above change.
10307         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
10309         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
10311         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
10313 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
10315         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
10316         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
10317         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
10318         threadpool.h, threads-types.h: mark more internal functions.
10320 2006-10-11  Dick Porter  <dick@ximian.com>
10322         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
10323         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
10324         reproduce the bug even before applying the fix.)
10326 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
10328         * reflection.c: allow retrieving attributes for arguments in generic
10329         methods (bug #79241).
10331 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
10333         * debug-mono-symfile.c: properly check fopen () result (found by
10334         coverity).
10336 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
10338         * reflection.c: make error message clearer and fixed two
10339         issuelets found by Coverity.
10341 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
10343         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
10345 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
10347         * object-internals.h, gc-internal.h, profiler-private.h:
10348         mark internal functions.
10350 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
10352         * reflection.c: put data in the text section.
10353         * icall.c: recognize more types in type_from_typename ().
10354         * process.c, marshal.c: added some GC FIXMEs.
10356 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
10358         * loader.c: check for NULL before initializing.
10360 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
10362         * gc.c (finalizer_thread): Use a non-alertable wait here.
10364         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
10365         until the correct solution is found.
10367 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
10369         * reflection.c (mono_module_get_object): Avoid an assert when operating on
10370         modules with no metadata. Fixes #79596.
10372         * image.c (load_metadata_ptrs): Put back the error message when
10373         the #- heap is encountered since the support is not complete yet.
10375 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
10377         * gc.c: do not allow the user to SuppressFinalize () a
10378         delegate because it would leak the trampoline if present.
10380 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
10382         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
10383         PropertyPtr table.
10385 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
10387         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
10389         * metadata.c (mono_metadata_get_param_attrs): Ditto.
10391         * row-indexes.h: Add definitions for *Ptr tables.
10393         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
10395         * metadata.c (mono_metadata_translate_token_index): New helper function to
10396         translate table indexes used in uncompressed metadata.
10397         (mono_metadata_decode_table_row): Ditto.
10398         (mono_metadata_decode_table_row_col): Ditto.
10400         * metadata.c: Add table schema for *Ptr tables.
10402         * class.c loader.c: Use the new helper function to access the affected metadata
10403         tables.
10404         
10405         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
10406         #38532.
10407         
10408 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
10410         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
10411         sequences which can be unbounded in size. Fixes #79583.
10413 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
10415         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
10416         static initialization.
10418         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
10420         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
10422         * domain.c (mono_domain_free): Free up type_init_exception_hash.
10424         * object.c (mono_runtime_class_init): Implement correct semantics when a static
10425         ctor fails, i.e. throw the same exception on subsequent accesses.
10426         
10427 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
10429         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
10430         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
10431         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
10432         Handle marshalling of interfaces and VARIANTs contained in structs.
10433         
10434         Code is contributed under MIT/X11 license.
10435         
10436 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
10438         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
10439         
10440         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
10441         mempool.
10443 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10445         * console-io.c: ignore previous SIGINT handler.
10447 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
10449         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
10450         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
10451         #79460, #79461, #79485.
10453         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
10455         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
10456         #79217.
10458 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
10460         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
10461         could be generated from it.
10463 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
10465         * rand.c: fix read loop to correctly handle EINTR.
10467 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10469         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
10470         internal calls are defined to keep methods closer to the declaring
10471         type and allow a significant reduction in runtime relocations and
10472         memory usage.
10474 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
10476         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
10477         exception message to have FileNotFoundException use the default
10478         assembly load error message. Fixes bug #79426.
10479         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
10481 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10483         * threadpool.c: (start_thread_or_queue) use the root domain when
10484         creating the thread instead of the async object one.
10486 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
10488         * class.c, object.c, class-internals.h, reflection.c:
10489         for arrays, store element_size inside MonoClass (speedup
10490         for array object creation).
10492 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
10494         * icall.c: fixed CodeBase to use the file name and not the module
10495         name (bug #79365).
10497 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
10499         * mono-debug.c, mono-debug.h: export find_method as
10500         mono_debug_find_method ().
10502 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
10504         * debug-helpers.c, class-internals.h: added a few functions useful
10505         when debugging under gdb.
10507 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10509         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
10510         characters that need special handling.
10512 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
10514         * mono-config.c: make the os/cpu specification more flexible,
10515         allowing lists and negation.
10517 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
10519         * marshal.c: COM Interop fixes. Handle case where method->klass.
10520         is interface. Handle BSTR/MonoString when null. Use CDECL as 
10521         calling convention on non-windows platforms. This is for
10522         compatibility with XPCOM and MainWin COM.
10523         
10524         Code is contributed under MIT/X11 license.
10525         
10527 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
10529         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
10530         correctly. Fixes #79217.
10532         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
10534 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
10536         * mono-config.c: allow both an os and cpu attribute for dllmap
10537         and dllentry elemnets to enable a single config file to be used
10538         for multiple architectures.
10540 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
10542         * loader.c: MonoLoaderError was cleared too soon on load failure.
10543         Fixes bug #79424.
10545 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
10547         * icall.c: use the defining class vtable when accessing a
10548         static field, not a pobblibly derived class.
10550 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
10552         * icall.c string-icalls.c: Remove references to unicode.h.
10554         * unicode.h unicode.c Makefile.am: Remove these unused source files.
10556         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
10558         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
10559         indicating the image where custom marshaller types should be looked up.
10560         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
10561         custom marshallers, instead of corlib. Fixes #79425.
10563 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
10565         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
10567 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
10569         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
10570         Implement Environment.ProcessorCount.
10571         
10572         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
10573         Implement Environment.ProcessorCount.
10574         
10575         * icall.c: 
10576         Add Environment.ProcessorCount icall.
10577         
10578         Patch by Jason McFall.
10580 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10582         * assembly.c: don't append .exe/.dll when the filename already contains
10583         one of those extensions.
10585 2006-09-12  Martin Baulig  <martin@ximian.com>
10587         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
10588         to array interfaces.
10590 2006-09-11  Martin Baulig  <martin@ximian.com>
10592         * reflection.c (mono_image_build_metadata): Create the
10593         MethodImpl's after emitting all types and methods, so we don't
10594         need another fixup pass for them.
10596 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
10598         * class.c (mono_class_from_name_case): Fix regression introduced by the last
10599         change.
10601 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
10603         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
10604         unload.
10606 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
10608         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
10609         args is not set. Fixes #78926.
10611 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
10613         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
10615         * image.c (load_class_names): Move this to class.c, and rename it to 
10616         'mono_image_init_name_cache'.
10617         (load_modules): Fix a warning.
10619         * class.c icall.c image.c: Initialize image->name_cache lazily.
10621         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
10622         on its name using information in the AOT file.
10624         * class.c (mono_class_from_name): Use the new hook function.
10626 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
10628         * reflection.c (mono_param_get_objects): Handle enum default parameter values
10629         correctly.
10631         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
10632         Fixes #79289.
10633         
10634 2006-09-06  Martin Baulig  <martin@ximian.com>
10636         * icall.c (mono_lookup_internal_call): Small fix.
10638 2006-09-05  Raja R Harinath  <rharinath@novell.com>
10640         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
10641         double g_free.
10643 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
10645         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
10646         when --debug is specified.
10648 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
10650         * class.c (setup_generic_array_ifaces): Fix a warning.
10652 2006-09-04  Miguel de Icaza  <miguel@novell.com>
10654         * Temporarily remove the patch to assemly.c that checks the
10655         assembly versions as it breaks our gacutil.
10657 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
10659         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
10661         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
10662         a net 1.0 runtime.
10664         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
10665         created using the default ctor. Fixes #79152.
10666         (mono_string_builder_to_utf16): Ditto.
10668 2006-09-01  Martin Baulig  <martin@ximian.com>
10670         Fix handling of the generic array interfaces.
10672         * class-internals.h
10673         (MonoDefaults): Removed `generic_array_class' and added
10674         `generic_ilist' class.
10676         * class.c
10677         (mono_bounded_array_class_get): Add the new generic array interfaces.
10678         (setup_generic_array_ifaces): New static method; create vtable
10679         entries for each method in the generic array interfaces.
10681         * metadata.c
10682         (select_container): Allow "parent-less" generic methods.
10684         * marshal.c
10685         (mono_marshal_get_generic_array_helper): New public method.
10687         * icall.c
10688         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
10689         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
10690         moved the interncall into System.Array.
10692 2006-09-01  Raja R Harinath  <rharinath@novell.com>
10694         A few more cases of avoiding work on types with ->byref set.
10695         Has the real fix for #79238
10696         * icall.c (is_generic_parameter): New helper.
10697         (ves_icall_Type_GetGenericParameterPosition): Use it.
10698         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
10699         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
10700         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
10701         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
10702         reference types.
10703         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
10704         reference types.
10705         (ves_icall_Type_get_IsGenericInstance): Likewise.
10706         (ves_icall_Type_get_IsGenericType): Likewise.
10708 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
10710         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
10711         class if possible.
10713         * mempool.h (mono_mempool_get_allocated): New helper function.
10715         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
10716         change.
10718         * mempool.c: Fix warnings and the calculation of stats.
10720         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
10722         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
10724         * loader.c (mono_get_method_from_token): Update method_count stat.
10726         * class-internals.h (MonoStats): Add some stats.
10728 2006-08-31 Robert Jordan  <robertj@gmx.net>
10730         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
10731         with managed variants.
10732         All code is contributed under the MIT/X11 license.
10733         
10734 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
10736         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
10737         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
10739         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
10741         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
10742         with cycles in classes.
10744         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
10746         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
10747         missing a [MarshalAs] directive. Fixes #79203.
10749         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
10750         klass->marshal_info. Fixes #79217.
10752 2006-08-30  Martin Baulig  <martin@ximian.com>
10754         Committing a patch from Joachim Ante <joe@otee.dk>:
10755         Add support for binary data symbol stores.
10757         * debug-mono-symfile.c
10758         (mono_debug_open_mono_symbol_file): Renamed into
10759         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
10760         arguments.
10762         * mono-debug.c
10763         (mono_debug_open_image): Added `raw_contents' and `size' args.
10764         (mono_debug_init_2_memory): New public function.
10766 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
10768         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
10770 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10772         * appdomain.c: implement support for ShadowCopyFiles.
10774 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
10776         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
10777         when value is NULL (and should remove CID #51).
10779 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10781         * image.c: moved 2 functions to ../utils.
10783 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10785         * gc.c: cope with the target object of a GC handle being NULL
10786         (bug #78877).
10788 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10790         * class.c: recursively check parent's explicit implementations
10791         of interface methods (fixes bug #79125).
10793 2006-08-19  Miguel de Icaza  <miguel@novell.com>
10795         * filewatcher.c: Avoid warnings when building, do not redefine
10796         constants that are defined.
10798         Remove warnings.
10800 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10802         * image.c: don't fail when the link points to an absolute path.
10804 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
10806         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
10807         Fix CID #3.
10809 2006-08-17  Miguel de Icaza  <miguel@novell.com>
10811         * image.c (full_path): A new method used to obtain the actual path
10812         of an assembly even in the presence of symbolic links.  
10814         This is necessary for the case where we are running a binary that
10815         has been GACed, but we are using the "published" path name
10816         ($prefix/mono/1.0/blah.exe) which happens to point to the real
10817         file in the GAC.
10819         This was the source of the failure for the `xsp' command with the
10820         recent AppDomain changes, as far as the runtime was concerned,
10821         there were two different assemblies: $prefix/mono/1.0/blah.exe and
10822         $prefix/mono/gac/blah/version/blah.exe.
10824         (do_mono_image_open): use full path
10826 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
10828         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
10830 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
10832         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
10833         domain_id is supplied. Fix CID #241 and corlib's unit tests.
10835 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
10837         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
10838         small structures. Fixes #78990.
10840 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
10842         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
10844         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
10846 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10848         * appdomain.c:
10849         * marshal.c: don't load all the assemblies from a domain into newly
10850         created ones. The new domains might have different rules and load
10851         assemblies from different locations. Fixes bug #76757.
10853         Patch by Lluis. Conflicts resolved by Brian Crowell.
10855 2006-08-16  Alp Toker  <alp@atoker.com>
10857         * socket-io.c: First half of the fix for #79084.
10858         Set sa_size to the length of the content, not that of the struct.
10859         Don't add NULL suffix to the content, this should be done in
10860         managed code if needed.
10862 2006-08-14  Raja R Harinath  <rharinath@novell.com>
10864         Fix part of #79012
10865         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
10866         mono_metadata_parse_type returns NULL.
10868 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
10870         * normalization-tables.h : new file for string normalization data.
10871         * locales.c, locales.h, icall.c :
10872           added load_normalization_resource() for string normalization,
10873           and icall as well.
10874         * Makefile.am : added normalization-tables.h to the sources.
10876 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
10878         * marshal.c: Add more helper functions to reduce code duplication and use them
10879         everywhere.
10881 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
10883         * marshal.c: Fix non-x86 stdcall warnings.
10884         
10885         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
10886         them everywhere.
10888 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
10890         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
10891         type check on multi-dimensional arrays. Fixes #79000.
10893 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
10895         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
10896         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
10897         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
10898         * class-internals.h: add is_com_object to class structure.
10899         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
10900         null checks to COM object marshalling. Fix .ctor call on RCW.
10901         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
10902         
10903         All code is contributed under the MIT/X11 license.
10905 2006-08-09  Dick Porter  <dick@ximian.com>
10907         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
10908         racing mono_monitor_allocator_lock() somewhere, so don't delete
10909         the critical section for now.  Found by running and exiting
10910         monodevelop.
10912 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
10914         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
10915         (ves_icall_System_ComObject_FindInterface): Ditto.
10916         (ves_icall_System_ComObject_CacheInterface): Ditto.
10918         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
10919         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
10921 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10923         * threadpool.c: treat pipes from process asynchronous reads as sockets
10924         when reading from them, so we get select/poll or epoll to wait for
10925         data.
10927 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
10929         * loader.c: Fix a typo (CID #233) in the null check.
10931 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
10933         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
10934         Hopefully fixes #78949.
10935         
10936         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
10937         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
10938         bytes. Fixes #78972.
10940 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10942         * filewatcher.c: we need to set errno here.
10944 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10946         * filewatcher.c: let Win32Exception get the error value.
10948 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10950         * filewatcher.c: translate errno into win32 errors for Win32Exception
10951         to know what happened.
10953 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
10955         * threadpool.c: Fix more warnings.
10957         * assembly.c (search_loaded): Fix warnings.
10959         * threadpool.c (mono_thread_pool_finish): Fix warnings.
10960         (mono_async_invoke): Ditto.
10962 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
10964         * object.c (mono_remote_class_vtable): Need to create proxy vtable
10965         entries for __ComObject type in addition to ComImport types.
10966         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
10967         about hash table.
10968         
10969         All code is contributed under the MIT/X11 license.
10971 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
10973         * image.c: avoid tentative loading of modulerefs that contain
10974         no metadata (P/Invoke library names).
10976 2006-07-28  Dick Porter  <dick@ximian.com>
10978         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
10979         mono_loader_lock() somewhere, so don't delete the critical section
10980         for now.  Found by running and exiting monodevelop.
10982 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10984         * filewatcher.c: define the inotify syscalls when we're building on
10985         linux and have sys/syscall.h. The build system might not have support
10986         for inotify but the target system might have it.
10988 2006-07-26  Miguel de Icaza  <miguel@novell.com>
10990         * domain.c: Documentation updates.
10992         * loader.c (mono_free_method): Do not release the method
10993         information if we are being profiled, as profilers will use this
10994         information at shut down to present some data to the user.
10996         This is needed so that the profiler does not crash, as the
10997         profiler tends to keep MonoMethods around, and they might become
10998         invalid if we free these.
11000         (mono_get_method_constrained): Return the original CIL stream
11001         method as well, so verification can be performed against it.
11003 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11005         * filewatcher.[ch]: support for inotify file system watcher.
11006         * icall.c: add new internal calls for the inotify file system watcher.
11008 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11010         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
11011         #78888.
11013 2006-07-20  Dick Porter  <dick@ximian.com>
11015         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
11016         warning.
11018 2006-07-20  Dick Porter  <dick@ximian.com>
11020         * threads.c (start_wrapper): Do the thread cleanup while we still
11021         hold a reference to its object.  Fixes bug 78123.
11023 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
11025         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
11026         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
11027           "managed-to-managed".
11028         * icall.c: Redirect string constructors that take sbyte* to
11029           ves_icall_System_String_ctor_RedirectToCreateString.
11030         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
11031           to CreateString () methods with matching signature.
11032         * reflection.c: Use original security informations for
11033           MONO_WRAPPER_MANAGED_TO_MANAGED.
11034         * security-manager.c: Use original security informations for
11035           MONO_WRAPPER_MANAGED_TO_MANAGED.
11036         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
11037           that is a placeholder and only its address should be used.
11038         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
11039           that is a placeholder and only its address should be used.
11041 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
11043         Begin implementing COM Interop.
11044         * appdomain.c: Increment corlib version.
11045         * class.c: Set ComImport classes' parent to __ComObject.
11046         * loader.c: Mark cominterop methods as such.
11047         * domain.c: Add __ComObject class to MonoDefaults structure.
11048         * image.c: Add 2 hashtables to the image for COM Interop related methods
11049         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
11050         using the mempool allocator
11051         
11052         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
11053         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
11054         declaration for mono_metadata_type_dup_mp.
11055         
11056         * debug-helpers.c: Added strings for two additional wrapper types
11057         * object.c: Create proxy objects for ComImport classes
11058         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
11059         and added __ComObject class to MonoDefaults structure.
11060         
11061         * object-internals.h: Finish MonoRealProxy definition, and add definition of
11062         MonoComInteropProxy and MonoComObject.
11063         
11064         * marshal.c: Added support for COM Interop
11065         (signature_cominterop): Converts managed signature to corresponding
11066         unmanaged COM signature.
11067         (cominterop_get_function_pointer): gets unmanaged function pointer via
11068         COM object vtable
11069         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
11070         (cominterop_get_method_interface): returns interface type that method is defined on
11071         (mono_mb_emit_cominterop_call): emits native call to function pointer
11072         gotten from vtable
11073         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
11074         that matches signature of unmanaged function.
11075         (cominterop_get_native_wrapper): wrapper around adjusted method call.
11076         (cominterop_get_invoke): forwards call from proxy to __ComObject
11077         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
11078         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
11079         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
11080         
11081         * marshal.h: Added Marshal icall declarations.
11082         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
11083         so we can access them in finalizer
11084         
11085 2006-07-14  Dick Porter  <dick@ximian.com>
11087         * object.c (mono_type_initialization_cleanup): Fix a race
11088         condition by temporarily commenting out the critical section
11089         deletion.
11091 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
11093         * reflection.c (create_custom_attr): Fix some warnings.
11094         (create_custom_attr_data): Ditto.
11095         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
11096         types. Fixes #78855.
11098 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
11100         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
11102         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
11104 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
11106         * reflection.c (resolve_object): Add support for DynamicMethod.
11108         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
11109         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
11111 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
11113         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
11114         don't leak GPtrArray's pdata has we have no use (nor free) for it.
11116 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
11118         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
11119         Fixes #77888.
11121 2006-06-30  Raja R Harinath  <rharinath@novell.com>
11123         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
11124         slightly: remove a shadow local variable.
11126 2006-06-29  Raja R Harinath  <rharinath@novell.com>
11128         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
11129         definition that introduces the virtual function slot.
11130         Also fix Coverity #105.
11132 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
11134         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
11135         for dynamic assemblies. Fixes #78724.
11137 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
11139         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
11140         Fixes #78722.
11142 2006-06-21  Martin Baulig  <martin@ximian.com>
11144         * reflection.c
11145         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
11146         fixes #76484.
11148 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
11150         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
11152 2006-06-20  Raja R Harinath  <rharinath@novell.com>
11154         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
11155         nor TYPEREFs.
11156         * class.c (mono_class_create_from_typespec): Add 'context' argument.
11157         Inflate result if necessary.
11158         (mono_class_get_full): Remove old version.  Rename from
11159         'mono_class_get' and add 'context' argument.  Pass it to
11160         ..._create_from_typespec.
11161         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
11162         (mono_ldtoken): Revert change below.
11164 2006-06-20  Martin Baulig  <martin@ximian.com>
11166         * class.c (mono_ldtoken): Don't pass the generic context to
11167         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
11169 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
11171         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
11172         and later freeing it. Fixes #78638.
11174 2006-06-15  Miguel de Icaza  <miguel@novell.com>
11176         * icall.c (mono_class_get_throw): Revert over-zealous error
11177         throwing, the caller for mono_class_get_throw will cope with
11178         errors when classes are not properly initialized already.
11180         The code still copes with loader exceptions though.
11182         Fixes the regression in reftype1 and reftype3 from the CAS tests.
11183         
11184 2006-06-14  Miguel de Icaza  <miguel@novell.com>
11186         Fixes the `make run1' version of RuntimeAbort (to be commited,
11187         source is in Bugzilla).
11188         
11189         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
11190         FALSE on class loading failure instead of returning true.
11192         * class.c (mono_class_create_from_typedef): It is possible for
11193         mono_metadata_interfaces_from_typedef_full to fail if a class is
11194         not found, cope with this.
11195         
11197 2006-06-14  Dick Porter  <dick@ximian.com>
11199         * socket-io.c: 
11200         * process.c: Fix a bunch of signed/unsigned warnings from gcc
11201         4.1.1
11203 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
11205         * culture-info-table.h : oops, forgot to make it nsync with r61548.
11207 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
11209         * icall.c: Another fix for building mono in Visual Studio.
11211 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
11213         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
11214         
11215 2006-06-09  Martin Baulig  <martin@ximian.com>
11217         * debug-mono-symfile.c: Put this back and really fix it this
11218         time. Sorry for all the trouble.
11220 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
11222         * icall.c (mono_class_get_throw): Fix a warning.
11223         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
11224         ReflectionTypeLoadException if needed. Fixes #78606.
11226         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
11227         (mono_class_init): Ditto.
11229         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
11230         ref_only exceptions.
11231         (mono_loader_clear_error): Make this work even if there is no error.
11233 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
11235         * object-internals.h marshal.c marshal.h icall.c: Implement method 
11236         Marshal.GetComSlotForMethodInfo using internal call.
11238 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
11240         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
11241         a function for signalling it.
11243         * class.c (mono_class_from_typeref): Use the new kind of loader error when
11244         a referenced assembly is not found.
11246         * loader.c (mono_loader_error_prepare_exception): Add support for 
11247         LOADER_ERROR_ASSEMBLY. Fix formatting.
11249 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
11251         * domain.c appdomain.c class-internals.h marshal.c: Add support 
11252         for VARIANT marshalling on windows and increment corlib version
11253         since Variant struct was added.
11255 2006-06-03  Miguel de Icaza  <miguel@novell.com>
11257         * debug-mono-symfile.c: Revert Martin's previous patch which broke
11258         stack trace line information:
11260         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
11261         (Martin) when looking up B which is between A and C, return A not C.
11263         Bug is #78573.
11265         Thanks to Alexander Olk for tracking this down.
11267 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
11269         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
11270         
11271         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
11272         avoid clobbering its value.
11273         (mono_string_to_lpstr): Fix a warning on windows.
11275 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
11277         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
11279         * reflection.c loader.c: Removed references to 'dummy' flag.
11281         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
11283         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
11284         it gets GC tracking.
11286         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
11287         GC tracking.
11288         
11289         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
11291         * marshal.c threadpool.c: Update callers of mono_async_result_new.
11293         * appdomain.c: Bump corlib version.
11295 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
11297         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
11298         CEE_STIND_REF when working with object references.
11300 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
11302         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
11303         Fixes #78539.
11305 2006-05-30  Miguel de Icaza  <miguel@novell.com>
11307         * loader.c (method_from_memberref): Fix argument value for
11308         mono_loader_set_error_method_load (I was passing the MonoClass
11309         instead of the class name char *).
11311 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
11313         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
11314         CEE_STIND_REF when working with object references.
11316 2006-05-30  Martin Baulig  <martin@ximian.com>
11318         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
11319         mono_method_full_name() change and replace the ':' with a '.'
11320         here.
11322 2006-05-30  Martin Baulig  <martin@ximian.com>
11324         * debug-mono-symfile.c
11325         (mono_debug_symfile_lookup_location): Fix the algorithm:
11326         when looking up B which is between A and C, return A not C.
11328 2006-05-29  Martin Baulig  <martin@ximian.com>
11330         * mono-debug.h
11331         (MonoDebugMethodInfo): Make the typedef public.
11332         (MonoDebugSourceLocation): New public struct.
11334         * mono-debug.c
11335         (mono_debug_source_location_from_address): Removed.
11336         (mono_debug_source_location_from_il_offset): Removed.
11337         (mono_debug_il_offset_from_address): Removed.
11338         (mono_debug_address_from_il_offset): Removed.
11339         (mono_debug_lookup_method): New public function.
11340         (mono_debug_lookup_source_location): New public function; replaces
11341         the old mono_debug_source_location_from_*() functions; see the
11342         inline documentation.
11343         (mono_debug_free_source_location): New public function.
11344         (mono_debug_print_stack_frame): New public function; see the
11345         inline documentation.
11347         * debug-mono-symfile.c
11348         (mono_debug_find_source_location): Renamed into
11349         mono_debug_symfile_lookup_location(); only take a
11350         `MonoDebugMethodInfo *' and an `offset' argument; added inline
11351         documentation.
11352         (mono_debug_find_method): Renamed into
11353         mono_debug_symfile_lookup_method().
11355 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
11357         * assembly.c (mono_assembly_open_full): Dont overwrite the status
11358         returned by mono_image_open_full ().
11360         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
11361         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
11362         #78517.
11364         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
11365         #78518.
11367 2006-05-27  Miguel de Icaza  <miguel@novell.com>
11369         * class.c (mono_class_from_typeref): handle missing images
11370         earlier, deals with bug #78418.   Refactor code; 
11372         Fix a warning introduced in my previous commit (some stale code
11373         from before I revisited my patch).
11375         * class.c (mono_class_create_from_typedef): On failure, remove the
11376         class from the MonoImage->class_cache as the class is not
11377         initialized;   Fixes the leak pointed out by Paolo.
11379 2006-05-25  Dick Porter  <dick@ximian.com>
11381         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
11382         DeleteCriticalSections until I figure out which one may still be
11383         sometimes locked when mono_thread_cleanup is called.
11385 2006-05-24  Dick Porter  <dick@ximian.com>
11387         * threads.c (mono_thread_cleanup): Move the threading cleanup out
11388         of mono_thread_manage and back into its own function, so it can be
11389         called after the finalizer thread has finished.
11391         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
11393 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
11395         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
11396         Fixes #78495.
11398         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
11399         with non-blittable elements.
11400         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
11402 2006-05-24  Martin Baulig  <martin@ximian.com>
11404         * mono-debug-debugger.h (MonoDebuggerEvent): Added
11405         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
11407         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
11408         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
11409         `mono_debugger_event_handler' to NULL.
11411 2006-05-24  Martin Baulig  <martin@ximian.com>
11413         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
11415 2006-05-24  Martin Baulig  <martin@ximian.com>
11417         * mono-debug-debugger.h
11418         (mono_debugger_create_notification_function): Added
11419         `MonoCodeManager *' argument.
11421 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
11423         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
11425 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
11427         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
11428         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
11429         implementation.
11431 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
11433         * icall.c: precise GC support: objects can't be stored in unmanaged
11434         memory anymore, even if they are kept alive by other references: since
11435         they can move the GC needs to be able to always find them.
11437 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11439         * object.c: precise GC support for static fields. Support
11440         for moving GCs: write barriers and pinned allocation for interned
11441         strings.
11443 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
11445         * domain.c, domain-internals.h: precise GC support for the MonoDomain
11446         structure.
11448 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11450         * class.c, gc.c: sgen and precise GC updates.
11452 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
11454         * marshal.h, marshal.c: added write barrier wrapper and precise type
11455         fixes.
11457 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
11459         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
11460         support.
11462 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
11464         * reflection.c: precise and sgen GC updates.
11466 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
11468         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
11470 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
11472         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
11474 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
11476         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
11477         MONO_TYPE_OBJECT. Fixes #78462.
11479 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
11481         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
11482         and blittable types.
11484 2006-05-17  Miguel de Icaza  <miguel@novell.com>
11486         * class.c (mono_class_get_exception_for_failure): Implement parts
11487         of a TODO: if the loader error is set (instead of the class
11488         error), we return a Loader exception that can be properly thrown
11489         elsewhere.
11491         This was exposed by some Winforms 2.0 code that I tried to run
11492         (Atsushi pointed me to it).
11494 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
11496         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
11497         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
11498         
11499         * marshal.c (emit_marshal_vtype): Add limited support for 
11500         UnmanagedType.LPStruct. Fixes #78427.
11502         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
11503         Applied a patch from kangaroo to fix #77523.
11505 2006-05-17  Martin Baulig  <martin@ximian.com>
11507         * threads.c
11508         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
11509         (debugger_thread_created): Removed.
11510         (debugger_thread_exited): Removed.
11512 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
11514         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11516         * object-internals.h (MonoReflectionResource): Sync with managed version.
11518 2006-05-12  Wade Berrier <wberrier@novell.com>
11520         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
11522 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
11524         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
11525         functions try to allocate from the image mempool.
11527 2006-05-12  Dick Porter  <dick@ximian.com>
11529         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
11531 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
11533         * object.c: The FieldGetter and FieldSetter methods require the full
11534         name of the class, not only the name. Fixes bug #78277.
11536 2006-05-11  Miguel de Icaza  <miguel@novell.com>
11538         * loader.c (method_from_memberref): Do not pass the NULL klass to
11539         mono_loader_set_error_() methods.  Pass the non-NULL value
11540         (class). 
11542 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
11544         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
11545         (mono_assembly_close): Null out assembly->image->references after freeing it.
11547         * image.c (mono_image_close): Free image->references.
11548         
11549         * reflection.c (mono_image_basic_init): Fix a small memory leak.
11551 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
11553         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
11554         before checking if it's NULL (g_assert).
11556 2006-05-10  Martin Baulig  <martin@ximian.com>
11558         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
11559         I thought I already killed that two months ago, but now it somehow reappeared.
11561 2006-05-10  Martin Baulig  <martin@ximian.com>
11563         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
11565 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
11567         * reflection.c: Allocate memory for dynamically created methods in the image
11568         mempools.
11570 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
11572         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
11573         don't use the ad pointer before checking if it's NULL (g_assert).
11575 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
11577         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
11578         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
11580         * marshal.c: Allocate all signatures from mempools.
11582         * marshal.c: Allocate some more signatures from mempools.
11584 2006-05-09  Miguel de Icaza  <miguel@novell.com>
11586         * object.c (mono_load_remote_field): The code used to provide a
11587         temporary variable for returning results if the user did not
11588         provide a result pointer.  But our temporary variable was allocted
11589         on the satck.
11591         Fix calling code to always pass a result area.   Coverity ID 103.
11593 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
11595         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
11596         value, not the old. Fixes #78312.
11597         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
11599         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
11600         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
11601         per-image cache.
11603         * assembly.c (mono_assembly_close): Free image->references.
11605         * assembly.c (mono_assembly_names_equal): Fix a warning.
11606         (mono_assemblies_cleanup): Cleanup more global data.
11608         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
11610         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
11611         ptr_cache and image->modules.
11613         * image.c (mono_image_init): Allocate array_cache lazily.
11614         
11615 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11617         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
11618         behavior was changed recently and has bad side effects.
11620 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
11622         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
11623         
11624         * assembly.c (mono_assembly_close): Remove a debug printf.
11626         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
11628         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
11629         to also allow for temporary references between mono_image_open ()/close ().
11631         * domain.c (get_runtimes_from_exe): Add a FIXME.        
11633 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
11635         * marshal.c: Fix support for dynamic methods.
11637         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
11639         * marshal.c (mono_marshal_cleanup): New cleanup function.
11641         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
11642         image mempools.
11644         * class.c (mono_class_init): Fix leaking class->nested_classes.
11646         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
11648         * image.c (mono_image_init): Initialize the new cashes.
11650         * image.c (mono_image_close): Destroy the new cashes.
11652         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
11654         * mempool.c (mono_mempool_strdup): New helper function.
11656         * class-internals.h: Add prototype for mono_loader_unlock ().
11658         * domain.c (mono_jit_info_table_find): Fix a warning.
11659         (mono_debugger_check_runtime_version): Ditto.
11661         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
11662         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
11663         functions to these modules.
11665         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
11666         metadata modules.
11667         
11668         * marshal.c (mono_free_bstr): Fix a warning.
11670         * assembly.c (mono_assembly_open_full): Fix another small leak.
11672         * object.c: Fix some unload leaks in the remoting code.
11674         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
11675         function.
11677         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
11679         * reflection.c: Fix some unload leaks in dynamic assemblies.
11681 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
11683         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
11684         * marshal.h: Add BSTR support on Win32
11685         * icall.c: Add BSTR icalls
11686         * metadata.h: Add BSTR enums
11688 2006-04-28  Miguel de Icaza  <miguel@novell.com>
11690         Work to catch the crash from #76795 and turn it into an
11691         exception.   As I stubbed out pieces of the VisualBasic support,
11692         I found a number of places where the code was failing and I added
11693         checks to those places. 
11694         
11695         * metadata.c (do_mono_metadata_parse_generic_class): Make this
11696         function return a status code.  If we fail to parse the signature
11697         from mono_metadata_parse_generic_inst, return FALSE.
11699         * loader.c (mono_get_method_from_token): If we fail to load the
11700         method (mono_class_get) return NULL.   
11702         * (method_from_memberref): Return NULL if we are unable to parse
11703         the method signature
11705         (mono_loader_error_prepare_exception): Since we now use the
11706         loader_error flag internally to stop processing, and obtaining
11707         exceptions that might be thrown will walk this code path the
11708         proper way of going from a MonoLoaderError into a
11709         MonoException was convoluted.   This new routine encapsulates the
11710         process of turning the error into an exception and *clearing* the
11711         error afterwards.
11712         
11713 2006-04-27  Miguel de Icaza  <miguel@novell.com>
11715         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
11716         with missing assemblies), and to cope with:
11718                 * Missing fieldref from a non-existing assembly.
11719                 * Missing methodref from a non-existing assembly.
11721         The first batch of work to address *some* of the issues from 76661.
11722         
11723         * object.c (mono_class_create_runtime_vtable): If we fail to
11724         initialize the class raise the exception here. 
11726         * metadata.c (mono_class_get_overrides_full): If any methods fail
11727         to load return the failure to the caller.
11729         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
11730         flagging assemblies that failed to load.   
11732         Do not crash if we are unable to load the assembly.
11734         (mono_assembly_close): Do nothing with REFERENCE_MISSING
11735         assemblies. 
11737         * loader.c (mono_loader_set_error_type_load): Change the
11738         convention to always pass unallocated strings, so we make our own
11739         copies (I know our own code had duplicated strings before, but
11740         this keeps the normal conventions).
11741         (method_from_memberref): Call mono_loader_set_error_method_load
11742         for all possible failures of loading the class. 
11743         Remove assert, turn into a loader error.
11745         (mono_loader_error_to_exception): Move this routine from mini
11746         (mini_loader_error_to_exception) there was no need to have that in
11747         mini. 
11749         * class.c (mono_class_from_typeref): If we were not able to load
11750         the assembly with mono_assembly_load_reference, call the
11751         mono_loader_set_error_type_load to register the problem.
11753         (mono_class_setup_fields): If we fail to load the type from
11754         mono_metadata_parse_type_full, call mono_class_set_failure and
11755         break from the loop.
11757         If class->exception_type is set, we do not layout the fields as
11758         that might crash the runtime, and instead return (from breaking
11759         from the previous loop).
11761         (mono_class_setup_vtable): This now returns a boolean indicating
11762         whether the table was properly setup.   The decision is driven by
11763         mono_class_get_overrides_full which might run into non-existing
11764         methods. 
11765         
11766         (mono_class_init): Returns TRUE on success or FALSE if there was a
11767         problem in loading the type (incorrect assemblies, missing
11768         assemblies, methods, etc).
11770         When we call mono_class_setup_fields we also check for a potential
11771         error inside this call (either a class exception or a general
11772         loader exception).
11774         (mono_class_create_from_typedef): If the parent fails to load
11775         (calling mono_class_get_full) return NULL.
11776         
11777         ** Important **
11779         calls to mono_metadata_parse_type_full should be checked
11780         everywhere and set the mono_class_set_failure
11781         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
11783         The current patch checks the places where my manually constructed
11784         tests show the errors are showing up, but we should do it
11785         everywhere. 
11787         ** Important2 **
11789         mono_class_init return values should be tested everywhere, like
11790         the previous case this is something that we should audit
11791         everywhere and not only on the cases exposed by the tests I
11792         created. 
11794 2006-04-26  Miguel de Icaza  <miguel@novell.com>
11796         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
11797         boolean parameter and instead pass the information on `options'
11798         parameter (FileOptions).
11800         * icall.c: Register the new signature for MonoIO.Open.
11802         * debug-helpers.c (dis_one): Trying to understand how coverity
11803         works.  Fix Run 5, item 78.
11805 2006-04-26  Dick Porter  <dick@ximian.com>
11807         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
11808         dereference.
11810 2006-04-25  Martin Baulig  <martin@ximian.com>
11812         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
11814         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
11815         debugger_thread_created().
11816         (debugger_gc_push_all_stacks): Don't handle the main thread in any
11817         special way.
11818         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
11819         (mono_debugger_finalize_threads): New function; undo the effects
11820         of mono_debugger_init_threads().
11821         (mono_debugger_create_all_threads): Removed.
11823 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
11825         * image.c (mono_image_close): Tidy up trace messages.
11827         * assembly.c (mono_assembly_close): Ditto.
11829         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
11830         no longer references an already freed assembly. Fixes #78168.
11832 2006-04-21  Dick Porter  <dick@ximian.com>
11834         * threads.c (mono_thread_detach): Fix reference counting when
11835         detaching threads.
11837 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
11839         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
11840         #78155.
11842 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
11844         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
11845         (mono_type_to_stind): Ditto.
11847         * marshal.c: Use the new helper functions to simplify code.
11849         * image.c (mono_image_close): Add some code for help debug assembly unloading
11850         problems.
11852         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
11853         image mempool.
11855         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
11856         assembly was already loaded in another appdomain. Fixes #78083.
11858 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
11860         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
11861         referenced assemblies.
11862         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
11864         * domain.c (mono_domain_free): Add a trace message.
11866         * appdomain.c (add_assemblies_to_domain): Ditto.        
11868         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
11869         field.  
11871 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
11873         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
11875 2006-04-12  Martin Baulig  <martin@ximian.com>
11877         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
11878         `USE_INCLUDED_LIBGC'.   
11880 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
11882         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
11883         the patch contains ../ and a small directory name later. Hopefully fixes
11884         #78035.
11886 2006-04-10  Martin Baulig  <martin@ximian.com>
11888         Clean up the debugger's thread-handling code.
11890         The debugger's thread-handling code has been moved from
11891         ../mini/debug-debugger.c to threads.c.  We now iterate directly
11892         over the `threads' hash, keep track of exiting threads and also
11893         use proper locking.
11895         We can now debug XSP and XSP based applications with the debugger.
11897         * object-internals.h (MonoThread): Added `gpointer end_stack'.
11899         * threads.h
11900         (MonoThreadCallbacks): Removed; this was only used by the debugger.
11901         (mono_install_thread_callbacks): Likewise.      
11903         * threads.c (mono_thread_callbacks): Removed.
11904         (debugger_thread_created, debugger_thread_exited): New static functions.
11905         (start_wrapper): Call debugger_thread_created().
11906         (thread_cleanup): Call debugger_thread_exited().
11907         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
11908         (mono_debugger_init_threads): New public function.
11909         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
11910         iterate directly over the `threads' hash and also use proper locking.
11912         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
11914         * mono-debug-debugger.h
11915         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
11917 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
11919         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
11920         argument type=array. Fixes #78057.
11922 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
11924         * culture-info-table.h : regenerated. Fixed bug #69652.
11926 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
11928         * loader.c metadata.c: Reapply a variant r59116.
11929         
11930         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
11932         * class.c (mono_class_setup_interface_offsets): New internal function.
11934         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
11935         interfaces too. Fixes #77398.
11937         * reflection.c (encode_cattr_value): Add support for 
11938         parameter type=object, argument type=array.
11939         (load_cattr_value): Ditto. Fixes #77916.
11941         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
11942         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
11944         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
11945         a byval char array and CharSet is Ansi.
11947         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
11949 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
11951         * metadata.c: Add some locking comments.
11952         
11953         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
11954         mempool.
11955         (mono_metadata_free_method_signature): Don't free the signature itself.
11957         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
11959         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
11960         reference the same MonoImage.
11961         (mono_assembly_load_from_full): Add an assert.
11963 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
11965         * image.c (mono_image_close): Don't put the image we are about to free into the
11966         loaded_images_guid_hash.
11968         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
11969         to reduce code duplication.
11971         * marshal.c: Register the native functions called by this module as icalls, to
11972         somewhat centralize the creation of MonoMethodSignature's.
11974         * loader.c (mono_method_signature): Add a cache for method signatures.
11976         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
11977         the parameter attributes of a method.
11978         (mono_metadata_parse_method_signature_full): Refactored the computation of
11979         parameter attributes into a separate function. Also avoid one allocation in
11980         most cases.
11982         * assembly.c (mono_assembly_close): Ditto.
11984         * image.c (mono_image_close): Log trace messages with INFO level.
11986         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
11988         * image.c reflection.c: Correct reference counting of image modules.
11989         
11990         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
11991         of this function from the image mempool.
11992         
11993         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
11994         to allow more cached types to be used.
11996         * mono-debug.c (mono_debug_add_method): Appled patch from
11997         David S. Miller  <davem@sunset.davemloft.net>: Access 
11998         minfo->lexical_blocks[] entry elements using read32().
12000 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
12002         * loader.c (mono_free_method): No longer free the method header for non-dynamic
12003         methods as it is allocated from the mempool.
12005         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
12006         image mempool.
12008         * metadata-internals.h: Add comments describing the reference counting scheme
12009         used for MonoImage and MonoAssembly.
12011         * image.c assembly.c reflection.c: Rework reference counting of images and 
12012         assemblies so they are freed when the runtime is shut down. Free some 
12013         additional memory structures when an image is unloaded.
12014         
12015 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
12017         * class.c loader.c reflection.c: Allocate more data structures in
12018         the image mempool.
12020 2006-03-31  Miguel de Icaza  <miguel@novell.com>
12022         * icall.c
12023         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
12024         build on pre glib 2.4 systems.
12026 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
12028         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
12030         * icall.c: Fix some warnings.
12032 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
12034         * culture-info-table.h : regenerated.
12036 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
12038         * threads.c, object-internals.h, verify.c: changed the culture caching
12039         code to use a normal MonoArray for storage so the GC can keep track of
12040         them easily. Fixed bits of the cache logic, too and simplified the
12041         code.
12043 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
12045         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
12046         thread for non-Boehm GCs.
12048 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
12050         * domain.c, object.c, domain-internals.h: reduce the amount of memory
12051         needed to keep track of the data for static fields.
12053 2006-03-29  Raja R Harinath  <rharinath@novell.com>
12055         Fix #75172
12056         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
12057         for interface classes.  Use 'num_methods' instead.
12058         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
12059         before using '->vtable_size' field.
12061 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
12063         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
12064         doesn't contain managed pointers, so use a normal hashtable.
12066 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
12068         * reflection.c, class-internals.h, domain.c: fixed handling of types
12069         used as values for objects in custom attributes (bug #77915):
12071 2006-03-24  Martin Baulig  <martin@ximian.com>
12073         * class.c (mono_class_setup_fields): Added support for generic
12074         instances; fixes #77580.
12076 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12078         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
12080 2006-03-24  Dick Porter  <dick@ximian.com>
12082         * file-io.c (get_file_attributes): More stat macro breakage.
12083         Fixes bug 77759.
12085 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
12087         * profiler.c: added the file=filename option in the default profiler
12088         to output the profile data to filename.
12090 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12092         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
12093         bug #77877.
12095 2006-03-22  Martin Baulig  <martin@ximian.com>
12097         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
12098         allocated `MonoClassField *' in `fb->handle'.
12100 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12102         * class.c, image.c, metadata-internals.h: implemented new mechanism to
12103         allocate interface ID to save memory and allow better ID reuse on
12104         appdomain unload. setup_generic_vtable () removal from Martin.
12106 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
12108         * object.h, appdomain.c, domain.c, exception.c, icall.c,
12109         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
12110         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
12111         write barriers for reference stores with managed objects accessed with
12112         C structures in the runtime and in embedding programs.
12114 2006-03-20  Raja R Harinath  <rharinath@novell.com>
12116         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
12117         'interface_id' and 'max_interface_id' fields of MonoClasses
12118         representing open generic types.
12120 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
12122         * object.h, object.c, icall.c: added functions to deal with
12123         storing valuetypes that contain references in managed objects.
12124         * reflection.c, string-icalls.c, threads.c, marshal.c: small
12125         fixes and comments around uses of mono_array_addr ().
12127 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
12129         * object.h, icall.c, monitor.c: object.GetHashCode ()
12130         implementation that supports the moving garbage collector.
12132 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12134         * icall.c, threads-types.h, threads.c: implemented finalizer for
12135         LocalDataStoreSlot.
12137 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
12139         * metadata.c (mono_type_size): Add a fixme.
12140         (mono_type_stack_size): Ditto.
12142         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
12143         'type_forwarders' field.
12145         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
12146         attribute from net 2.0.
12148         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
12149         from class.c.
12151         * class.c (mono_class_setup_fields): Fix a warning.
12152         
12153         * class.c (mono_class_from_name): Add support for assemblyref entries
12154         in the EXPORTEDTYPE table.
12156         * reflection.c: Add support for handling type forwarders under net 2.0.
12158         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
12159         
12160 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
12162         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
12163         overwriting entries in ModuleBuild->types, also clean up the code
12164         a little. Fixes #77774.
12166 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12168         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
12169         load friend assembly info when present.
12171 2006-03-14  Raja R Harinath  <rharinath@novell.com>
12173         Fix crasher on gtest-158.cs.
12174         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
12175         the return value if the MonoClass we want is yet in an
12176         inconsistent state.
12177         * class.c (mono_class_create_from_typedef): Add an comment
12178         explaining an order dependency between mono_class_setup_parent and
12179         mono_class_setup_mono_type.
12181 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
12183         * class.c: documentation updates and events bug fix.
12185 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
12187         * class.c: some cleanup, locking fixes.
12189 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12191         * class.c: fix the generics code to setup nested
12192         type info to the instantiated type (bug #77770).
12194 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
12196         * marshal.c: fixed a few type correctness issues.
12198 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12200         * loader.c: the Set/Get/Addrtess array methods should be public.
12202 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
12204         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
12205         
12206         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
12207         info->wrapper.
12209 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
12211         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
12213         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
12215         * mempool.c (mono_mempool_alloc): Speed this up a bit.
12216         (mono_mempool_alloc0): Ditto.
12218 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12220         * socket-io.c:
12221         (create_object_from_sockaddr): it was allocating 4 extra bytes
12222         for the AF_UNIX data. Fixes bug #77747.
12224 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
12226         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
12228 2006-03-09  Dick Porter  <dick@ximian.com>
12230         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
12231         Fixes bug 76966 again.
12233 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
12235         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
12236         names from r57532
12237         * appdomain.c: Bumped corlib version to 48 (due to r57532)
12239 2006-03-07  Martin Baulig  <martin@ximian.com>
12241         * object.c
12242         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
12244 2006-03-07  Martin Baulig  <martin@ximian.com>
12246         * class.c
12247         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
12248         regression introduced in r56970; see gtest-252.cs.
12250         * loader.c (mono_get_method_constrained): Correctly handle generic
12251         methods; see gtest-253.cs.
12253 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
12255         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
12257 2006-03-04  Martin Baulig  <martin@ximian.com>
12259         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
12260         compute the parent type at runtime, just like we're already doing
12261         it for interfaces.
12263         * reflection.c
12264         (mono_reflection_bind_generic_parameters): Don't compute the
12265         parent type anymore.
12267         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
12269 2006-03-04  Martin Baulig  <martin@ximian.com>
12271         * mono-debug-debugger.h
12272         (mono_debugger_create_notification_function): Allocate memory at
12273         runtime and return a pointer to it.
12275 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
12277         * assembly.c: Fix windows build.
12278         
12279         * assembly.c: Fix build.
12281         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
12283         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
12284         
12285 2006-03-03  Dick Porter  <dick@ximian.com>
12287         * process.c
12288         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
12289         Check parameters before dereferencing them.  Fixes Aaron's part of
12290         bug 77393.
12292 2006-03-03  Raja R Harinath  <rharinath@novell.com>
12294         Fix performance regression.
12295         * loader.c (find_method_in_class): Add 'from_class' argument.
12296         Rename 'klass' argument to 'in_class'.  The signature is compared
12297         against the method in 'in_class', and the corresponding method is
12298         returned from 'from_class'.
12299         (find_method): Walk both 'in_class' and 'from_class' in parallel.
12300         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
12301         type definition and generic instantiation in parallel.
12302         (mono_get_method_constrained): Update to changes.
12304 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12306         * threads.c: make sure the domain is correct, too when doing
12307         mono_thread_attach ().
12309 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
12311         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
12312         windows. Fixes #77683.
12314 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12316         * object.h, *: introduced specific way to set elements of an array
12317         of references to be used as write barrier. Still need to audit the
12318         uses of mono_array_addr.
12320 2006-03-01  Miguel de Icaza  <miguel@novell.com>
12322         * object-internals.h: New field to cache the assmebly name, patch
12323         from Tambet Ingo (tambet@ximian.com)
12325 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
12327         * decimal.h, class-internals.h, metadata-internals.h,
12328         file-io.h: mark a few function declarations as internal, to
12329         reduce the number of PLT entries.
12331 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12333         * file-io.c: fix typo in warning message.
12335 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
12337         * loader.c: on unix, lookup the "*A" version of a function
12338         if charset is auto as a second option before failing.
12340 2006-02-28  Raja R Harinath  <rharinath@novell.com>
12342         * class.h (mono_class_inflate_generic_method): Revert to two
12343         argument version.
12344         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
12345         (mono_class_inflate_generic_method_full): Add.
12346         * class.c (mono_class_inflate_generic_method_full): Rename from
12347         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
12348         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
12349         * loader.c, reflection.c: Update to changes.
12351 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
12353         * icall.c: const fixes and small improvements.
12355 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12357         * threadpool.c: for asynchronous connect(), enable the same workaround
12358         for BSD 6 as for the Mac. Fixes bug #77637.
12360 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
12362         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
12363         formatted classes. Fixes #77524.
12365 2006-02-24  Raja R Harinath  <rharinath@novell.com>
12367         * class.c (inflate_generic_type): Add a couple more
12368         micro-optimizations.
12369         (inflate_generic_context): Don't use the 'gmethod' from
12370         'inflate_with'.
12371         (mono_class_inflate_generic_method): If the method has generic
12372         parameters, but the passed-in context doesn't have a 'gmethod',
12373         create one.  Use the possibly simplified generic instantiation
12374         from the declaring class instead of the one passed in.
12376 2006-02-24  Raja R Harinath  <harinath@gmail.com>
12378         Make generic method signature and method header handling lazy.
12379         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
12380         (inflate_generic_header): Likewise.
12381         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
12382         parameter to avoid inflating types.
12383         (mono_get_inflated_method): Empty out.
12384         * class.h (mono_class_inflate_generic_method): Update to changes.
12385         * loader.c (mono_get_method_from_token): Don't parse signature for
12386         generic methods, nor methods of generic classes.
12387         (mono_method_signature): Rename from 'mono_method_signature'.
12388         Inflate signature on demand.
12389         (mono_method_get_header): Inflate method header on demand.
12390         * reflection.c: Update to changes.
12392 2006-02-23  Raja R Harinath  <rharinath@novell.com>
12394         * metadata.c (mono_metadata_inflate_generic_inst): If the
12395         instantiation is closed, don't bother expanding it in the new
12396         context.
12397         * class.c (inflate_generic_class): If the generic instantiation
12398         doesn't change after inflation, return the argument itself.
12399         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
12400         Add bounds checks.
12401         (inflate_generic_context): If neither the generic class nor the
12402         generic method instantiations change, return the original context.
12403         * reflection.c (mono_method_get_object): Do
12404         'mono_get_inflated_method' before accessing the ->klass field.
12405         (inflate_mono_method): Don't create a MonoGenericMethod unless
12406         necessary.
12407         (inflate_method): Don't pass a constructed type as the declaring
12408         type of a methodbuilder.
12410 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
12412         * object.c: fix memory overwrite.
12414 2006-02-22  Dick Porter  <dick@ximian.com>
12416         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
12417         it doesn't work any more.
12418         (mono_threads_request_thread_dump): Fix unused variable warnings.
12420 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12422         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
12423         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
12424         the public header file.
12426 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
12428         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
12430 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12432         * class-internals.h, object.c: reduce the size of MonoVTable
12433         and store the interface_offsets array at negative offsets.
12435 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
12437         * metadata.c: tweak table descriptors data structures to reduce
12438         size and runtime relocations.
12440 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12442         * marshal.c: fix some types and opcodes to be type-safe
12443         in marshaling wrappers.
12445 2006-02-21  Ankit Jain  <jankit@novell.com>
12447         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
12449 2006-02-21  Raja R Harinath  <rharinath@novell.com>
12451         * metadata.c (get_constraints): Relax debugging checks for monodis.
12453 2006-02-21  Ankit Jain  <jankit@novell.com>
12455         * metadata.c (mono_metadata_load_generic_params): Move the code
12456         checking for ambiguous generic params from here to mono/dis/get.c
12457         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
12459 2006-02-21  Raja R Harinath  <harinath@gmail.com>
12461         Fix assertion triggered when compiling nemerle.
12462         * class.c (mono_get_shared_generic_inst): Rename from
12463         get_shared_inst and make non-static.
12464         * loader.c (mono_get_shared_generic_method): New.  Used to create
12465         the MonoGenericContext-equivalent of a MonoGenericContainer.
12466         (mono_get_method_from_token): Initialize the 'context' field of
12467         the created MonoGenericContainer.
12468         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
12469         * metadata.c (get_constraints): Add sanity check.
12470         * class-internals.h: Add new internal methods.
12472         * reflection.c (verify_safe_for_managed_space): New sanity check.
12473         Currently checks that owner-less generic parameters aren't allowed
12474         in managed space.
12475         (mono_type_get_object): Use it.
12476         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
12477         that are now in mono_type_get_object.
12478         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
12480 2006-02-19  Raja R Harinath  <harinath@gmail.com>
12482         * metadata.c (mono_type_create_from_typespec): Rename from
12483         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
12484         argument and caching of types in the generic container.
12485         (unwrap_arrays, find_generic_param): Remove.
12486         * metadata-internals.h: Update.
12487         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
12489 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
12491         * class.c (mono_class_get_exception_for_failure): Fix a warning.
12493         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
12494         return values. Fixes #77581.
12496         * class.c (mono_fnptr_class_get): Switch name and name_space.
12498         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
12499         classes and add support for [In, Out] attributes.
12500         (mono_marshal_free_asany): Ditto. Fixes #77524.
12502 2006-02-18  Raja R Harinath  <harinath@gmail.com>
12504         * class.c (mono_class_from_generic_parameter): Make more robust to
12505         incomplete MonoGenericContainers from monodis.
12507 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
12509         * class-internals.h: added some more exception types.
12510         * class.c, metadata.c: added a few checks to handle missing
12511         types.
12513 2006-02-17  Raja R Harinath  <rharinath@novell.com>
12515         Use owner-less generic-params some more.
12516         * class.c (my_mono_class_from_generic_parameter): Remove.
12517         (mono_class_from_generic_parameter): Handle null image,
12518         param->name and param->owner.
12519         (mono_class_from_mono_type): Update.
12520         (mono_class_create_from_typespec): Remove 'container' parameter.
12521         If that parameter is non-null, the result is always inflated by
12522         'mono_class_get_full' anyway.
12523         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
12524         parameter.
12525         (mono_class_get_full): Update.
12527         * class.c (inflate_generic_type) [GENERICINST]: If the generic
12528         instance is not open, don't bother inflating.
12529         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
12530         parse metadata for inflated classes.
12531         (_mono_class_get): Change GenericContext* parameter to
12532         GenericContainer*.
12533         (mono_class_create_from_typespec): Likewise.  Simplify, and
12534         implement trivially.  All the cases are handled in
12535         mono_class_from_mono_type.  Don't inflate returned class.
12536         (mono_class_get_full): Delegate GENERICINST optimization to
12537         inflate_generic_type.
12538         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
12540 2006-02-16  Dick Porter  <dick@ximian.com>
12542         * socket-io.c (create_object_from_sockaddr): Fix typo.
12543         (create_sockaddr_from_object): Check array lengths before
12544         potentially accessing items off the end.
12545         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
12546         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
12547         (ves_icall_System_Net_Sockets_Socket_Send_internal)
12548         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
12549         length checks to avoid wraparound overflows.
12550         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
12551         contents of the array of sockets
12552         (hostent_to_IPHostEntry2)
12553         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
12554         Check return value of inet_ntop ().
12555         (addrinfo_to_IPHostEntry): Fix typo
12557 2006-02-16  Raja R Harinath  <rharinath@novell.com>
12559         Type metadata parsing doesn't use generic-instantiation information.
12560         * metadata.c (mono_metadata_parse_array_full): Change
12561         MonoGenericContext* parameter to MonoGenericContainer*.
12562         (mono_metadata_parse_type_full): Likewise.
12563         (mono_type_create_from_typespec_full): Likewise.
12564         (mono_metadata_parse_mh_full): Likewise.
12565         (mono_metadata_parse_generic_inst): Likewise.
12566         (do_mono_metadata_parse_generic_class): Likewise.
12567         (do_mono_metadata_parse_type): Likewise.
12568         * metadata-internals.h: Update to changes.
12569         * class.c (mono_class_find_enum_basetype): Likewise.
12570         (mono_class_setup_fields): Likewise.
12571         (mono_class_create_from_typespec): Likewise.
12572         * loader.c (method_from_methodspec): Likewise.
12573         (mono_get_method_from_token): Likewise.
12574         (mono_method_get_header): Likewise.
12576 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12578         * marshal.c: handle additional GENERICINST case (patch from
12579         Thong Nguyen <tum@veridicus.com>).
12580         Fix a few cases where LDIND_I/STIND_I was used for references.
12582 2006-02-16  Raja R Harinath  <rharinath@novell.com>
12584         * reflection.c (mono_reflection_get_token): Remove unused variable.
12586 2006-02-16  Martin Baulig  <martin@ximian.com>
12588         * reflection.c (mono_reflection_get_token): Add support for fields
12589         in instantiated generic types.
12591         * icall.c
12592         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
12594 2006-02-15  Martin Baulig  <martin@ximian.com>
12596         * icall.c
12597         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
12598         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
12599         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
12600         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
12602 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
12604         * class.c, metadata.c, metadata.h, object.c, icall.c,
12605         marshal.c: changed mono_type_get_underlying_type () to do
12606         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
12607         Fixed handling of instantiated generic valuetypes (bug #75479).
12609 2006-02-15  Raja R Harinath  <rharinath@novell.com>
12611         * metadata.c (mono_metadata_decode_signed_value): Simplify.
12612         Delegate to mono_metadata_decode_value, and work on the returned value.
12614         * icall.c (ves_icall_MonoType_GetGenericArguments):
12615         Add consistency check here too.
12616         
12617 2006-02-15  Ankit Jain  <jankit@novell.com>
12619         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
12620         char/short etc.
12622 2006-02-15  Ankit Jain  <jankit@novell.com>
12624         * metadata.c (mono_metadata_decode_signed_value): New function to decode
12625         signed values, used only for representing lower bounds of arrays.
12626         (mono_metadata_parse_array_full): Use new
12627         mono_metadata_decode_signed_value to decode lower bounds.
12629 2006-02-14  Martin Baulig  <martin@ximian.com>
12631         * reflection.c
12632         (mono_reflection_get_token): Support "MonoGenericMethod" and
12633         "MonoGenericCMethod" and allow generic instances / methods.
12635 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
12637         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
12638         to obtain the terminal size using an ioctl.
12640         * object.c (mono_nullable_init): Revert this as nullable reference
12641         types are not valid.
12642         (mono_nullable_box): Ditto.
12644 2006-02-09  Dick Porter  <dick@ximian.com>
12646         * threads.c (mono_thread_detach): Drop a reference to the thread
12647         we're detaching.
12649 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
12651         * object.c (mono_nullable_init): Handle nullable reference types.
12652         (mono_nullable_box): Ditto. Fixes #77446.
12654 2006-02-07  Martin Baulig  <martin@ximian.com>
12656         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
12658 2006-02-07  Ankit Jain  <jankit@novell.com>
12660         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
12661         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
12662         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
12663         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
12664         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
12665         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
12667 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
12669         * class.c (mono_class_create_generic): Set type_token as well.
12671         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
12672         compatible with MS.
12674 2006-02-02  Martin Baulig  <martin@ximian.com>
12676         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
12677         has never been used so far.
12679 2006-02-02  Martin Baulig  <martin@ximian.com>
12681         * mono-debug-debugger.h: Changed comment at the top of this file;
12682         the header is not installed, but it's safe to #include it from
12683         within the JIT.
12685         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
12686         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
12688 2006-02-02  Martin Baulig  <martin@ximian.com>
12690         * mono-debug.h
12691         (MonoSymbolTable): Removed the `metadata_info' field.
12693         * mono-debug.c
12694         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
12696         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
12697         (mono_debugger_add_builtin_types): Removed.
12698         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
12699         (mono_debugger_create_notification_function): We now operate on a
12700         pre-allocated area; take a `gpointer' and return `void'.
12702         * mono-debug-debugger.c
12703         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
12704         (mono_debugger_add_builtin_types): Removed.
12706 2006-02-02  Martin Baulig  <martin@ximian.com>
12708         * threads.c (mono_debugger_create_all_threads): New public method.
12710 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
12712         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
12713         breaks on several platforms.
12715 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
12717         * assembly.c: the VS.NET build doesn't supply default values for
12718         MONO_ASSEMBLIES and MONO_CFG_DIR.
12720 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
12722         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
12723         helper function.
12725         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
12727         * loader.c (method_from_memberref): Fix a warning.
12729         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
12731         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
12732         with explicit layout. Fixes #77433.
12734 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
12736         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
12737         max_interface_id is initialized before using it. Fixes #77398.
12738         (ves_icall_Type_GetInterfaces): Ditto.
12740 2006-01-30  Raja R Harinath  <rharinath@novell.com>
12742         * metadata.c (mono_metadata_parse_method_signature_full): Don't
12743         allocate memory for parameter attributes when parsing memberref
12744         signatures.
12745         * loader.c (mono_loader_set_error_method_load): Don't warn.
12746         (method_from_memberref): Ensure MissingMethodException gets thrown
12747         if method is not found.  Make warning more informative.
12749 2006-01-29  Raja R Harinath  <harinath@gmail.com>
12751         Fix #77397
12752         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
12753         return true if is byref.
12754         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
12755         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
12756         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
12758 2006-01-27  Raja R Harinath  <rharinath@novell.com>
12760         Fix tests/find-method.2.il
12761         * loader.c (find_method, find_method_in_class): Remove is_inflated
12762         argument.  Revert 2006-01-18 change.
12763         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
12764         is generic, search for method in its generic definition.
12765         * class.c (mono_class_setup_vtable_general): Print generic
12766         arguments of generic types in debugging printf.
12768 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
12770         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
12772         * threads.c (mono_threads_request_thread_dump): New helper function.
12774 2006-01-25  Raja R Harinath  <rharinath@novell.com>
12776         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
12778 2006-01-25  Ankit Jain  <jankit@novell.com>
12780         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
12781         move definition to ..
12782         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
12783         
12784 2006-01-25  Ankit Jain  <jankit@novell.com>
12785             Raja R Harinath  <rharinath@novell.com>
12787         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
12788         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
12789         as necessary.
12791 2006-01-25  Martin Baulig  <martin@ximian.com>
12793         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
12794         `MonoDebuggerThread' into debug-debugger.c.
12796 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12798         * profiler.c: fix printing of data.
12800 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
12802         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
12803           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
12805 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
12807         * object.c: fix deadlock related to string interning.
12809 2006-01-23  Martin Baulig  <martin@ximian.com>
12811         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
12813         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
12815 2006-01-23  Martin Baulig  <martin@ximian.com>
12817         * mono-debug.h: Moved the prototypes of some functions which are
12818         used by the JIT here from mono-debug-debugger.h.
12820 2006-01-21  Martin Baulig  <martin@ximian.com>
12822         * Makefile.am: Don't install mono-debug-debugger.h.
12824 2006-01-21  Martin Baulig  <martin@ximian.com>
12826         * mono-debug-debugger.h: Enforce the private status of this header
12827         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
12828         Moved some stuff from mono-debugger-jit-wrapper.h here.
12830 2006-01-20  Raja R Harinath  <rharinath@novell.com>
12832         * class.c (mono_class_from_typeref): Add a sanity test to help
12833         catch lack of assembly load/search hooks.
12835 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
12837         * marshal.c (emit_struct_conv): Relax the fields with same offset
12838         check even more. Fixes #77230.
12840 2006-01-18  Martin Baulig  <martin@ximian.com>
12842         * loader.c (find_method_in_class): Added `gboolean is_inflated'
12843         argument; if false, we compare the uninstantiated signatures.
12844         (method_from_memberref): Compare the uninstantiated signatures;
12845         fixes #76417.
12847 2006-01-18  Robert Jordan  <robertj@gmx.net>
12849         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
12850         Clear the weak link. Fixes bug #77170.
12852         * gc.c (mono_gchandle_free):
12853         Reflect *-gc.c changes (tiny optimization).
12855 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
12857         * metadata.c (mono_metadata_signature_dup): Applied patch from
12858         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
12859         Fixes #77288.
12861 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
12863         * marshal.c (emit_struct_conv): Allow fields with the same offset when
12864         marshalling from native to managed code. Fixes #77230.
12866 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12868         * threadpool.c: fix problem (Mac only) when more than one asynchronous
12869         connect. Fixes bug #77020.
12871 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
12873         * class.c: fixed id assignement for nested interfaces (bug #77275).
12874         Added also better info for --print-vtable debugging.
12876 2006-01-12  Martin Baulig  <martin@ximian.com>
12878         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
12879         interfaces on-the-fly; fixes #76625.
12881         * class-internals.h
12882         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
12883         don't need that anymore.
12885 2006-01-12  Miguel de Icaza  <miguel@novell.com>
12887         * socket-io.c
12888         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
12889         To avoid initing the nested_classes when not needed I turned the
12890         PeerCredData as a toplevel internal class, as it has to be shared
12891         anyways. 
12893         Fixes the CASA issue.
12895 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
12897         * domain.c: Accessors for MonoJitInfo
12899         * profiler-private.h: Add jitinfo to the end jit hook
12901         * profiler.[ch]: Define new hooks, called after jitting which give
12902         the MonoJitInfo that was compiled
12904 2006-01-10  Martin Baulig  <martin@ximian.com>
12906         * class.c (mono_class_setup_events): Add support for generic
12907         classes; fixes #76440.
12909 2006-01-06  Raja R Harinath  <rharinath@novell.com>
12911         Fix #77160.
12912         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
12913         on passed-in method.
12915 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
12917         * object.c (mono_runtime_invoke_array): Add Nullable support.
12919         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
12921 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
12923         * file-io.c: Don't consider sockets as directory and avoid an endless
12924         loop. Fix bug #76966.
12926 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
12928         * object.c (mono_nullable_init): New helper function.
12929         (mono_nullable_box): Ditto.
12931         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
12933         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
12935         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
12936         
12937 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
12939         * class.c (mono_class_is_assignable_from): Make T assignable to 
12940         Nullable<T>.
12942 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
12944         * appdomain.c: Bump corlib version to 46.
12945         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
12946         serialization purpose) and changed ves_icall_System_Reflection_
12947         Assembly_get_code_base signature to accept a boolean (to escape, or 
12948         not, the assembly code base).
12950 2005-12-23  Dick Porter  <dick@ximian.com>
12952         * icall.c: 
12953         * threads-types.h: 
12954         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
12955         CreateEvent icall now returns "created" boolean parameter.
12957 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
12959         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
12960         #76967.
12962         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
12963         when attr_klass is an interface. Fixes #77045.
12965 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
12967         * marshal.c (emit_struct_conv): Fix previous patch.
12968         
12969         * marshal.c (emit_struct_conv): Add a check for fields with the same
12970         offset.
12972 2005-12-20  Raja R Harinath  <rharinath@novell.com>
12974         Fix regression in Mono.C5.
12975         * class.c (mono_class_create_generic): If 'klass' is an interface
12976         set up the interface offsets.
12977         (mono_class_is_assignable_from): Don't throw away generic arguments.
12979 2005-12-19  Raja R Harinath  <rharinath@novell.com>
12981         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
12982         type parameters.
12984 2005-12-15  Raja R Harinath  <rharinath@novell.com>
12986         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
12987         dead store.
12988         (do_mono_metadata_parse_generic_class): Don't pass the current
12989         generic context when parsing the type being instantiated: it
12990         cannot use it, anyway.
12992         * loader.c (method_from_memberref): Don't inflate a signature if
12993         it doesn't contain any type parameters.
12995 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
12997         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
12999 2005-12-14  Martin Baulig  <martin@ximian.com>
13001         * class.c
13002         (mono_type_get_name_recurse): Don't return null for type
13003         parameters and open generic classes.
13004         (mono_class_setup_methods): Don't exclude generic instances.
13005         (mono_get_unique_iid): Use different IDs for different
13006         instantiations of the same generic type.
13007         (mono_class_setup_vtable): Only use setup_generic_vtable() for
13008         open generic instances; create a normal vtable for closed generic
13009         instances.
13010         (mono_class_setup_vtable_general): We're now also called for
13011         closed generic instances.
13013         * reflection.c
13014         (mono_reflection_bind_generic_parameters): Correctly use
13015         mono_metadata_lookup_generic_inst() everywhere.
13017 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
13019         * object.c (mono_class_create_runtime_vtable): Call 
13020         mono_class_setup_vtable ().
13022         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
13023         function.
13024         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
13025         #76959.
13027         * loader.c (mono_loader_set_error_type_load): Print the type load
13028         warnings to the console so they are more visible to the user.
13029         (mono_loader_set_error_method_load): Ditto.
13031         * reflection.c (ensure_runtime_vtable): Revert the last change as it
13032         is still broken.
13033         
13034         * reflection.c (ensure_runtime_vtable): Fix build.
13036         * reflection.c (ensure_runtime_vtable): Disable an optimization which
13037         doesn't work in all cases.
13039 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
13041         * object.c (mono_array_new_full): Treat a single dimensional array
13042         with 0 lower bounds as an szarray. Fixes #76973.
13044         * reflection.c (custom_attr_visible): Really fix this.
13046 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
13048         * reflection.c (custom_attr_visible): Allow nested public attributes
13049         as well.
13051         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
13052         interface check.
13054 2005-12-12  Raja R Harinath  <harinath@gmail.com>
13056         * class.c (set_generic_param_owner): Delete.
13057         (mono_class_create_from_typedef): Don't set ->owner field of
13058         generic parameters to "param containers" of enclosing classes.
13059         * reflection.c (mono_reflection_initialize_generic_parameter):
13060         Likewise.
13062 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
13064         * reflection.c (custom_attr_visible): Fix build.
13066 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
13068         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
13069         private attributes.
13070         
13071         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
13072         handling of null parameter defaults.
13074 2005-12-09  Raja R Harinath  <rharinath@novell.com>
13076         * class.c (mono_class_from_generic_parameter): Don't set
13077         klass->generic_container.
13078         (my_mono_class_from_generic_parameter): Likewise.
13080 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
13082         * reflection.c (load_public_key): Fix a warning.
13083         (method_encode_code): Fix unaligned accesses.
13085 2005-12-07  Martin Baulig  <martin@ximian.com>
13087         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
13089         * reflection.c
13090         (write_generic_param_entry): Encode our custom attrs.
13092         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
13094 2005-12-07  Martin Baulig  <martin@ximian.com>
13096         * reflection.c (encode_new_constraint): Removed; we don't use the
13097         `NewConstraintAttribute' anymore.
13099 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
13101         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
13102         not fire a TypeResolve event when Assembly.GetType () is called.
13104 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
13106         Beginning of support for nullable types in the runtime. Parts of
13107         this patch are from Martin.
13109         * appdomain.c (MONO_CORLIB_VERSION): Bump
13111         * domain.c (mono_init_internal): get the nullable type
13113         * class.c (mono_class_is_nullable): New method
13114         (mono_class_get_nullable_param): New mehod
13115         (mono_class_create_generic): In types T? set cast_class to T
13117         * class-internals.h (MonoDefaults): new nullable default class
13118         (mono_class_get_nullable_param, mono_class_get_nullable_param):
13119         new methods.
13121 2005-12-05  Raja R Harinath  <rharinath@novell.com>
13123         * metadata.c (select_container): New.  Refactor code to select the
13124         appropriate GenericContainer given the type of generic parameter
13125         we are looking for.
13126         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
13127         not a MonoGenericContext.  Use select_container.  Update parameters.
13128         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
13129         and MONO_TYPE_MVAR.
13130         (unwrap_arrays): Remove duplicate tests.
13131         (find_generic_param): Rename from 'has_same_context'.  Now walks a
13132         generic instantiated class to find any arguments that are generic
13133         parameters.
13134         (mono_type_create_from_typespec_full): Use find_generic_param to
13135         avoid evicting some generic instantiations from the typespec
13136         cache.
13138 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
13140         * reflection.c: fixed writing of doubles on ARM FPA.
13142 2005-12-02  Robert Jordan  <robertj@gmx.net>
13144         * icall.c: Fixed EventInfo.ReflectedType (#76829).
13146 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13148         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
13149         least on SUSE 10 they are not the same (on debian, they are just the
13150         same thing).
13152 2005-12-01  Raja R Harinath  <rharinath@novell.com>
13154         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
13155         DeclaringType for VARs and MVARs.
13156         * class.c (set_generic_param_owner): Fix initialization of owner
13157         fields.
13159 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
13161         * icall.c: fixed Enum.ToObject() to correctly convert the values.
13163 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13165         * threadpool.c: workaround for a bug that shows up on the Mac:
13166         select()+connect() on a blocking socket is not like it should
13167         be, so we proceed to connect() in that case, wasting the I/O
13168         threadpool thread until connect succeedes. Fixes bug #75436.
13170 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13172         * threadpool.c: fix typo when setting file descriptor states.
13174 2005-11-28  Raja R Harinath  <rharinath@novell.com>
13176         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
13177         * metadata.c (mono_metadata_parse_method_signature_full): Don't
13178         create a temporary signature container.
13179         (mono_metadata_parse_generic_param): Update to changes.
13180         (mono_type_create_from_typespec_full): Update to changes.
13181         * loader.c (method_from_memberref): Don't use a
13182         MonoGenericContainer while parsing a memberref signature.
13183         (method_from_methodspec): Remove dead-store of the 'container'
13184         variable.  It's overwritten before use.
13186         * metadata.c (mono_type_create_from_typespec_full): Make debugging
13187         checks tighter.
13188         (mono_metadata_parse_generic_param): Likewise.
13189         * loader.c (find_method_in_class): Does not need a
13190         MonoGenericContainer.  Use 'mono_method_signature' rather than
13191         'mono_method_signature_full'.
13192         (find_method, mono_get_method_constrained, method_from_memberref):
13193         Update to changes.
13195         * metadata.c (mono_type_create_from_typespec_full): Ensure that
13196         owner-less generic-parameters are never evicted from the typespec
13197         cache.
13199         * loader.c (method_from_memberref): Don't use the current context
13200         when parsing signatures.
13201         (method_from_methodspec, mono_get_method_from_token): Update to changes.
13203         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
13204         side-effects in g_assert.
13205         * loader.c (mono_get_method_from_token): Resolve klass earlier so
13206         that we don't potentially lose information.
13208 2005-11-26  Dick Porter  <dick@ximian.com>
13210         * icall.c:
13211         * threads.c: icalls to implement basic (ie, not named)
13212         System.Threading.Semaphore.
13214 2005-11-24  Dick Porter  <dick@ximian.com>
13216         * process.c
13217         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
13218         Use GetProcessId() if it's available.
13220 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
13222         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
13224 2005-11-23  Raja R Harinath  <rharinath@novell.com>
13225             Ankit Jain  <jankit@novell.com>
13227         * loader.c (mono_get_method_from_token): Initialize 'method' field
13228         of all generic parameters before parsing the signature.  Remove
13229         code that "fixed"-up MVAR references.
13231 2005-11-23  Ankit Jain  <jankit@novell.com>
13233         * metadata.c (mono_metadata_has_generic_params):
13234         (mono_metadata_load_generic_param_constraints):
13235         (mono_metadata_load_generic_params): Move duplicate code ...
13236         (mono_metadata_get_generic_param_row): ... here. Returns the
13237         first row-id in GenericParam table for a given owner (token).
13238         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
13239         prototype.
13241 2005-11-23  Raja R Harinath  <rharinath@novell.com>
13242             Ankit Jain  <jankit@novell.com>
13244         * metadata.c (mono_metadata_class_equal): Pass signature_only when
13245         comparing VARs too.
13246         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
13247         type->data.generic_param only if the type is an MVAR.
13248         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
13249         leak owner-less VARs and MVARs into managed space.
13251 2005-11-21  Martin Baulig  <martin@ximian.com>
13253         * class-internals.h
13254         (MonoMethod): Moved the `generic_container' here from
13255         `MonoMethodNormal' since we now also need it for
13256         `MonoMethodPInvoke';
13257         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
13258         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
13259         an union containing both `MonoMethodNormal' and
13260         `MonoMethodPInvoke'.
13262         * loader.c
13263         (mono_get_method_from_token): Allow implementing generic methods
13264         as interncalls.
13266         * threads.c
13267         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
13268         icall.
13270 2005-11-17  Dick Porter  <dick@ximian.com>
13272         * icall.c: 
13273         * process.h: 
13274         * process.c: Split the Process Start_internal icall into
13275         ShellExecuteEx_internal and CreateProcess_internal, which are
13276         called depending on whether UseShellExecute is true.  Fixes bug
13277         76670.
13279         * appdomain.c (MONO_CORLIB_VERSION): Incremented
13281 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
13283         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
13284         'msize' parameters, use the information in 'mspec' instead.
13285         (emit_object_to_ptr_conv): Ditto.
13287         * marshal.c (emit_struct_conv): Handle explicit layout structs with
13288         fields out of order. Fixes #76733.
13290 2005-11-17  Ankit Jain  <jankit@novell.com>
13292         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
13294 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
13296         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
13297           bug #76575.
13299 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
13301         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
13302         for types with non-auto layout. Fixes #76717.
13304 2005-11-16  Ankit Jain  <jankit@novell.com>
13306         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
13307         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
13308         if generic_context is null.
13309           (mono_metadata_generic_param_equal): param->owner can be null.
13310           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
13311         null.
13313 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
13315         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
13316         the correct value.
13318 2005-11-15  Martin Baulig  <martin@ximian.com>
13320         * object.c (set_value): Use mono_class_from_mono_type() instead of
13321         the hack for generic instances; fixes #76136.
13323 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
13325         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
13326         fields.
13328         * image.c (load_metadata_ptrs): Initialize the new fields.
13330         * reflection.c (create_dynamic_mono_image): Ditto.
13332         * reflection.c (build_compressed_metadata): Use the new fields.
13334         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
13335         icall.
13337         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
13338         icall.
13339         
13340 2005-11-15  Ankit Jain  <jankit@novell.com>
13341             Raja R Harinath  <harinath@gmail.com>
13343         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
13344         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
13345         new per-generic_container cache if the cached MonoType's context matches
13346         the current context.
13347           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
13348         to the expected context.
13349           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
13351 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
13353         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
13354         we changed the signature of an icall.
13355         * icall.c: Modify to mono_double_ParseImpl return true/false 
13356         depending on the success, instead of throwing the exception. This will
13357         help us in Double.TryParse methods.
13358         
13359 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
13361         * marshal.c (emit_marshal_object): Throw an exception when
13362         marshalling 'object' instead of crashing. Fixes #76696.
13364 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
13366         * class-internals.h: Add prototype for mono_type_get_full_name ().
13368 2005-11-11  Dick Porter  <dick@ximian.com>
13370         * threads.c (mono_thread_manage): Make sure the main thread has
13371         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
13373 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
13375         * loader.c (mono_loader_set_error_type_load): Log a warning to the
13376         console about the missing type.
13377         (mono_loader_set_error_method_load): Ditto.
13379 2005-11-09  Miguel de Icaza  <miguel@novell.com>
13381         * mono-config.c (mono_get_config_dir): Set the system defaults if
13382         none is specified.
13384         * assembly.c (mono_set_dirs): New API entry point to set the
13385         assembly and the config directory in one call
13387 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
13389         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
13390         the ftnptr was created from a delegate in a domain other than the
13391         current domain. Fixes #75377.
13393         * exception.h exception.c: Add mono_get_exception_not_supported ().
13395 2005-11-08  Martin Baulig  <martin@ximian.com>
13397         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
13399 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
13401         * security-manager.h: Added definitions to deal with strongname key 
13402         pairs bigger (and smaller) than 1024 bits.
13403         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
13404         adjust wrt the public key length being used.
13406 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
13408         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
13409           Windows build (r51396-51397).
13411 2005-11-03  Martin Baulig  <martin@ximian.com>
13413         * class.c (mono_class_setup_vtable_general): Also add generic
13414         methods to the vtable; fixes #76581.
13416 2005-11-01  Miguel de Icaza  <miguel@novell.com>
13418         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
13419         sure that we lookup GetString method from the System.Text.Encoding
13420         class, not the derived class or we get an empty method.
13422         Fixed class #76612.
13424 2005-10-25  Miguel de Icaza  <miguel@novell.com>
13426         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
13427         if it has been previously set (embedders). 
13429         Make mono_set_rootdir available also on Unix.
13431 005-10-24  Robert Jordan  <robertj@gmx.net>
13433         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
13435 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
13437         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
13438         only calls which are made to native code use this flag.
13440         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
13442 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
13444         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
13445         Add support for FieldBuilders.
13447 2005-10-29  Martin Baulig  <martin@ximian.com>
13449         * mono-debug.c
13450         (mono_debug_using_mono_debugger): New public method; returns
13451         whether we're running inside the debugger.
13453 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
13455         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
13456         for Method/Constructor/FieldBuilders.
13458 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
13460         * reflection.c (module_add_cattrs): Save custom attributes for global methods
13461         and fields as well.
13463 2005-10-26  Martin Baulig  <martin@ximian.com>
13465         * mono-debug-debugger.c
13466         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
13468 2005-10-24  Raja R Harinath  <harinath@gmail.com>
13470         * icall.c (base64_to_byte_array): Don't pass an out-of-range
13471         integer to isspace.
13473 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
13475         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
13476         when passing valuetypes byref. Fixes #76502.
13478 2005-10-19  Jackson Harper  <jackson@ximian.com>
13480         * profiler.c: Don't put a . in front of types that are not in a
13481         namespace.
13483 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
13485         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
13487 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
13489         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
13490         #76436.
13491         (mono_marshal_get_ldflda_wrapper): Fix a warning.
13493 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
13495         * assembly.c metadata-internals.h icall.c: Define an additional
13496         parameter for mono_assembly_name_parse_full, so we can avoid creating
13497         S.R.AssemblyName.Version when no version info wasn't passed.
13498         
13499 2005-10-09  Miguel de Icaza  <miguel@novell.com>
13501         * class.c (mono_type_get_full_name): Reimplement method that was
13502         removed. 
13504         * image.c: Some docs
13506 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
13508         * profiler.c (output_newobj_profile): Fix printing of Total memory
13509         on x86.
13511 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
13513         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
13515 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
13517         * threads.c: remove debug output.
13519 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
13521         * threads.c (mono_thread_manage): Fix crashes if more than 64
13522         threads need to be aborted. Hopefully fixes #75899.
13524         * assembly.c (mono_stringify_assembly_name): New helper function.
13526         * class.c: Use mono_stringify_assembly_name instead of the similar
13527         static function.
13529         * assembly.h assembly.c: Add support for calling a postload search 
13530         hook if an assembly cannot be loaded.
13532         * appdomain.c: Register new search hooks which call the AssemblyResolve
13533         events in AppDomain. Fixes #75231
13535 2005-10-07  Martin Baulig  <martin@ximian.com>
13537         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
13538         methods without debug info.
13540 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
13542         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
13543         wrappers.
13545 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13547         * file-io.c: now that we return symlinks, use lstat and, when the file
13548         is a symbolic link, stat, to get the file attributes. Also avoid the
13549         conversion to/from utf16/external.
13551 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
13553         * class.c (mono_class_layout_fields): Compute klass->has_references
13554         correctly if an embedded valuetype is not yet initialized. Fixes
13555         #76331.
13557 2005-10-04  Martin Baulig  <martin@ximian.com>
13559         * metadata.c
13560         (mono_metadata_load_generic_param_constraints): New public
13561         function; splitted the constraints loading out from
13562         mono_metadata_load_generic_params().
13564         * class.c (mono_class_create_from_typedef): Call
13565         mono_metadata_load_generic_param_constraints() after setting up
13566         the type and creating our parent; fixes #75329.
13568 2005-10-04  Martin Baulig  <martin@ximian.com>
13570         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
13571         non-dynamic parent classes.
13573 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
13575         * file-io.c : win32 build fix (ETXTBSY seems not found).
13577 2005-10-04  Martin Baulig  <martin@ximian.com>
13579         * reflection.c
13580         (mono_image_get_methodspec_token): Make the cache actually work;
13581         fixes #75974.
13583 2005-10-04  Martin Baulig  <martin@ximian.com>
13585         * class.c (mono_class_name_from_token): Removed the unneccessary
13586         `MonoGenericContext *' argument.
13588 2005-10-04  Martin Baulig  <martin@ximian.com>
13590         * loader.c
13591         (method_from_methodspec): Make the caching work again; fixes the
13592         performance regression from #76262.
13594 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13596         * file-io.c:
13597         * file-io.h:
13598         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
13599         GetFileSystemEntries that performs the same work but without going
13600         into io-layer, locking, etc.
13602 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
13604         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
13605         ThreadState_Stopped as well. Fixes #76047.
13607 2005-09-29  Martin Baulig  <martin@ximian.com>
13609         * class.c
13610         (inflate_generic_context): If the new context has a `gmethod', set
13611         its `container' that that gmethod's `container'.
13613         * metadata.c
13614         (mono_metadata_parse_generic_param): Simplify things;
13615         `generic_container = generic_context->container;' is just fine.
13617         * loader.c (method_from_methodspec): Code cleanups.
13619 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13621         * decimal.c: fix warning (and let gcc generate correct
13622         code on ARM with optimizations).
13624 2005-09-28  Martin Baulig  <martin@ximian.com>
13626         * loader.c
13627         (method_from_memberref): Added `MonoGenericContext *class_context'
13628         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
13629         (method_from_methodspec): If we're a memberref, use the enclosing
13630         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
13632 2005-09-28  Martin Baulig  <martin@ximian.com>
13634         * object.c (mono_runtime_invoke_array): Added support for
13635         MONO_TYPE_GENERICINST; fixes #75917.
13637 2005-09-27  Martin Baulig  <martin@ximian.com>
13639         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
13640         `k->byval_arg.type' to determine the actual type.
13642         * loader.c (method_from_methodspec): Removed some hacks.
13644 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
13646         * class-internals.h (mono_field_is_deleted): Do the test for
13647         rtspecialname before we check the actual name of the field. This
13648         prevents us from dereferencing a pointer into the string table,
13649         saving us from accessing a few pages
13651         * *.c: Replace the use of {Enter,Leave}CriticalSection with
13652         macros. This will allow a deadlock debugger to easily be plugged
13653         in.
13655 2005-09-27  Martin Baulig  <martin@ximian.com>
13657         * loader.c (method_from_methodspec): Create a "signature"
13658         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
13660 2005-09-27  Martin Baulig  <martin@ximian.com>
13662         * class.c
13663         (inflate_generic_class): Correctly set the new context's
13664         container.
13666         * loader.c
13667         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
13668         instead of a `MonoGenericContext *'.
13669         (mono_method_signature_full): Take a `MonoGenericContainer *'
13670         instead of a `MonoGenericContext *'.
13672         * metadata.c
13673         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
13674         instead of a `MonoGenericContext *'.
13675         (mono_metadata_parse_method_signature_full): Likewise.
13677 2005-09-26  Martin Baulig  <martin@ximian.com>
13679         * class.c
13680         (mono_class_from_generic_parameter): Set `klass->generic_container'
13681         (mono_class_from_generic_parameter): Likewise.
13682         (mono_bounded_array_class_get): We inherit the generic container
13683         from the element class.
13685         * loader.c
13686         (find_method, find_method_in_class): Take a `MonoGenericContext *'
13687         argument rather than computing it here.
13688         (method_from_memberref): Correctly set the generic context before
13689         parsing the signature.  Fixes #75681.
13691 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
13693         * object.c (mono_class_has_special_static_fields): Fix warnings.
13695 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
13697         * assembly.c: Add parse_public_key function, to
13698         par the public keys. Also added mono_assembly_name_parse_full,
13699         to define it the parsed key should be freed or not.
13700         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
13701         to parse a long format assembly name.
13702         * metadata-internals.h: Keep mono_assembly_name_parse_full as
13703         private, since calling it to preserve the key requires
13704         freeing it manually.
13705         
13706 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
13708         * locales.c : removed HAVE_ICU part.
13710 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
13712         * object.c (mono_class_create_runtime_vtable): Avoid calling 
13713         field_is_special_static if the klass has no special static fields.
13715         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
13716         (MonoCachedClassInfo): Likewise.
13718         * object.c (mono_class_has_special_static_fields): New helper function.
13720 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
13722         * class.c (mono_class_create_from_typedef): Don't call 
13723         interfaces_from_typedef_full for enums.
13724         (mono_class_create_from_typedef): Compute the base types of enums directly
13725         without calling mono_class_setup_fields ().
13726         (mono_class_find_enum_basetype): New helper function.
13728         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
13729         one place inside the string heap.
13730         
13731 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
13733         * class.c: locking fixes, code cleanups, some docs added.
13734         Allocate some data structures in the image mempool.
13736 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
13738         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
13739         the example code.
13740         
13741 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
13743         * class-internals.h, class.c, reflection.c: reduce memory taken by
13744         MonoClass.
13746 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
13748         * metadata.c, metadata.h, loader.h: documentation updates, code and
13749         API cleanups.
13751 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
13753         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
13754         the example code.
13756         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
13757         page faults caused by the runtime while reading metadata.
13759 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13761         * socket-io.c: the field names were changed 3 months ago and no one
13762         realized until bug #76077 got filed!
13764 2005-09-20  Martin Baulig  <martin@ximian.com>
13766         * icall.c (assembly_icalls): Removed some unused debugger icalls.
13768 2005-09-20  Martin Baulig  <martin@ximian.com>
13770         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
13771         write the rank into the class entry.
13773 2005-09-20  Martin Baulig  <martin@ximian.com>
13775         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
13777 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
13779         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13781         * icall.c (custom_attrs_defined_internal): New icall.
13783         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
13784         function.
13785         (mono_custom_attrs_construct_by_type): New helper function.
13787 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
13789         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
13790         terminate the resulting string. Fixes #76123.
13792 2005-09-16  Martin Baulig  <martin@ximian.com>
13794         * mono-debug.c
13795         (mono_debug_add_method): Ignore inflated methods for the moment.
13797 2005-09-14  Martin Baulig  <martin@ximian.com>
13799         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
13801 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
13803         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
13804         return a success/failure indication.
13805         (mono_metadata_interfaces_from_typedef_full): Ditto.
13806         (get_constraints): Ditto.
13808 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
13810         * marshal.c (emit_marshal_array): Fix handling of null arrays.
13811         
13812         * marshal.c (emit_marshal_array): Add support for returning string
13813         arrays from delegates. Fixes #76063.
13815         * marshal.c: Use the emit_ldloc/stloc macros where possible.
13817 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
13819         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
13820         icall.
13822 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
13824         * reflection.c icall.c: Fix after mono_get_exception_type_load
13825         signature change.
13827         * assembly.c (mono_assembly_get_assemblyref): New helper function.
13828         (mono_assembly_load_reference): Use the new helper.
13830         * class-internals.h (MonoLoaderError): New structure containing 
13831         information about type loading errors.
13833         * class-internals.h loader.c: Add APIs to store per-thread loader
13834         error information.
13836         * loader.c class.c: Set the loader error if needed.
13838         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
13840 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
13842         * decimal.c: fixed to handle the broken ARM fp format.
13844 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
13846         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
13847         broken.
13849 2005-09-06  Martin Baulig  <martin@ximian.com>
13851         * domain.c (supported_runtimes): Added v2.0.50727.
13853 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
13855         * culture-info.h: reduce the size of some structures.
13857 2005-09-05  Martin Baulig  <martin@ximian.com>
13859         Reflect latest API changes in the August CTP.
13861         * icall.c
13862         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
13863         ("MonoType.HasGenericArguments"): Removed.
13864         ("MonoMethod.BindGenericParameters"): Renamed to
13865         "MakeGenericMethod".
13866         ("MethodBuilder.BindGenericParameters"): Renamed to
13867         "MakeGenericMethod".    
13869 2005-09-05  Martin Baulig  <martin@ximian.com>
13871         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
13873 2005-09-05  Martin Baulig  <martin@ximian.com>
13875         Applying a patch from Michal Moskal <malekith@nemerle.org>.
13877         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
13878         generic_container is non-NULL.
13880 2005-09-05  Martin Baulig  <martin@ximian.com>
13882         Applying a patch from Michal Moskal <malekith@nemerle.org>.
13884         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
13886 2005-08-29  Michal Moskal  <malekith@nemerle.org>
13888         * reflection.c (encode_locals,
13889         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
13890         for large generic types.
13892 2005-09-05  Martin Baulig  <martin@ximian.com>
13894         Applying a patch from Michal Moskal <malekith@nemerle.org>.
13896         * class.c (mono_dup_array_type): New public method.
13897         (mono_metadata_signature_deep_dup): New public method.
13898         (dup_type): Correctly duplicate array and function types.
13900 2005-09-05  Martin Baulig  <martin@ximian.com>
13902         Applying a patch from Michal Moskal <malekith@nemerle.org>.
13904         * reflection.c (get_default_param_value_blobs): Handle generic types
13905         and generic methods.
13907 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
13909         * class.c: Fixed error reporting (method/class were inversed) for 
13910         inheritance demands.
13911         * security-manager.c|h: Added the AppDomain when calling the managed
13912         System.Security.SecurityManager.InheritanceDemand method.
13914 2005-09-01  Raja R Harinath  <rharinath@novell.com>
13916         * reflection.c (encode_marshal_blob): 'marshaltype' and
13917         'marshaltyperef' are alternate sources for the custom marshaler
13918         name.
13920 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
13922         * class.c: fix creation of array classes with rank == 1
13923         (patch by Ankit Jain <jankit@novell.com>).
13925 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
13927         * object.c: fix check for creating the bound data for arrays vs
13928         szarrays.
13930 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13932         * object.c: configuration file name is now based on the executable name,
13933         not the image name. Fixes bug #75931.
13935 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
13937         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
13938         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
13940 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
13942         * rand.c: Use wincrypt.h instead of WinCrypt.h.
13944 2005-08-24  Ankit Jain  <jankit@novell.com>
13945             Raja R Harinath  <rharinath@novell.com>
13947         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
13948           called by it recursively.
13949           (mono_class_init): Remove special case in pending_init handling, since it's
13950           superseded by the fix to mono_class_from_typeref.
13952 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
13954         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
13955         BROKEN_THREAD_START stuff.
13957 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
13959         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
13960         trampoline.
13962         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
13963         
13964         * object.c (mono_delegate_ctor): Replace the original function address with
13965         a delegate trampoline.
13967 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
13969         * icall.c: add boolean argument to base64_to_byte_array and 
13970         InternalFromBase64String to control whether a whitespace-only string
13971         is allowed (or should casue a FormatException to be thrown). We need
13972         this as the behavior has changed between MS.NET 1.x and 2.0, and we
13973         to match the MS behaviour in both profiles.
13974         * appdomain.c: Bump corlib version.
13976 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
13978         This patch implements a big portion of publisher policy
13979         support, used to bind assembly versions and redirect
13980         one assembly from version A to version B.
13982         * assembly.c:
13983         New GSList loaded_assembly_bindings, for storing the cached
13984         assembly bindings.
13985         (assembly_binding_maps_name): New static function for checking if a 
13986         assembly binding information maps an assembly name.
13987         (mono_assembly_binding_info_free): New function for freeing
13988         assembly binding information resources.
13989         (get_publisher_policy_info): New static function for retrieving 
13990         assembly binding information from a MonoImage.
13991         (compare_versions): New static function for comparing an assembly
13992         binding information data and the version of an assembly name.
13993         (check_policy_versions): New static function for checking if an
13994         assembly binding info mapping an assembly name is valid for it.
13995         (mono_assembly_load_publisher_policy): New static function for
13996         loading the 'policy.major.minor.MyAssembly' image for an assembly
13997         with an assembly name 'aname'.
13998         (mono_assembly_bind_version): New static function for updating
13999         assembly redirection.
14000         (mono_assembly_apply_binding): New static function for applying
14001         assembly binding.
14002         (search_binding_loaded): New static function for searching 
14003         loaded assembly binding infos in the cache domain.
14004         (mono_assembly_load_full): Don't apply assembly binding for
14005         reflection only assemblies.
14007         * metadata-internals.h: Add MonoAssemblyBindingInfo,
14008         which contains information about assembly binding. Also
14009         declare signature for mono_config_parse_publisher_policy ()
14010         function, used to retrieve pub policy info.
14011         
14012         * mono-config.c:
14013         (publisher_policy_start): New static function used to parse publisher 
14014         policy config files.
14015         (publisher_policy_parser): New static MonoParseHandler containing 
14016         the functions used when parsing config files.
14017         (mono_config_parse_publisher_policy): New function for parsing
14018         publisher policy files.
14019         
14020 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
14022         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
14024         * marshal.c (mono_delegate_free_ftnptr): Ditto.
14026         * object.c (mono_get_addr_from_ftnptr): New helper function.
14028         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
14030         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14032 2005-08-19  Dick Porter  <dick@ximian.com>
14034         * threads.c, threads.h, appdomain.c, appdomain.h,
14035         profiler-private.h, monitor.c, object.c, object-internals.h,
14036         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
14037         store the thread ID, so it can hold a 64 bit value if needed.
14039 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
14041         * reflection.c (mono_reflection_create_dynamic_method): Store the
14042         handle class into the method references as well so ldtoken works in
14043         dynamic methods.
14045         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
14046         types.
14048 2005-08-19  Ankit Jain <jankit@novell.com>
14050         Fix #75847.
14051         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
14052           here rather than using the method signature of a arbitrary function
14053           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
14054           two arguments.
14055           Hack done with Harinath.
14057 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14059         * threadpool.c: disable printing stack traces when we get a exception
14060         in a threadpool thread. I need to do more testing to figure out which
14061         cases actually print this. Fixes bug #75828.
14063 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14065         * icall.c: there might be ignored whitespace after the last '='. This
14066         fixes length computation and bug #75840.
14068 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
14070         * assembly.c (mono_assembly_load_full): Consider .exe extension as
14071         well. Fixes #75809.
14073         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
14074         #75784.
14075         
14076         * reflection.c (create_custom_attr_data): Ditto.
14078 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
14080         * locales.c, culture-info.h : removed RegionLCIDMap.
14081         * culture-info-tables.h : regenerated.
14083 2005-08-16  Martin Baulig  <martin@ximian.com>
14085         * class.c (mono_type_get_name_recurse): Small fix.
14087 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
14089         * locales.c : indentation fixie.
14091 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
14093         * object-internals.h,
14094           locales.h,
14095           locales.c,
14096           culture-info.h,
14097           icall.c : added RegionInfo table support.
14098         * culture-info-table.h : regenerated for region support.
14100 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
14102         * reflection.c (resolve_object): handle all kinds of MonoMethod
14103         including generic ones
14105 2005-08-12  Ankit Jain <jankit@novell.com>
14107         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
14108           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
14110 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
14112         * process.c: Don't close a thread handle when it's NULL. This is a
14113         workaround for bug #75733.
14115 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
14117         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
14119 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
14121         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
14123 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14125         * threadpool.c: if a work item in the thread pool has a callback that
14126         catches a exception, don't propagate it after invoking the callback.
14127         Fixes bug #75336.
14129 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
14131         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
14133         * class-internals.h (MonoCachedClassInfo): Add some new fields.
14135         * class.c (mono_class_init): Load field info lazily in the AOT case.    
14137         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
14139 2005-08-03  Ankit Jain  <jankit@novell.com>
14141         Fix #75683.
14142         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
14143           PInvoke calling convention is 0.
14145 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
14147         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
14148         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
14150 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
14152         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
14153         to handle threads not started by the GC (patch by Michael Meeks
14154         <michael.meeks@novell.com>).
14156 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
14158         * reflection.c: Make buffer used in emitting types larger for some
14159         big generic types (patch by Michal Moskal).
14161 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
14163         * mono-debug.c: Fix some (not all) alignment problems.
14165 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
14167         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
14168         Invoke mono_image_load_from_data_full passing the refonly
14169         parameter.
14171         * assembly.c
14172         (mono_assembly_open_from_bundle): Add the refonly argument, 
14173         in order to pass it to other methods it calls to.
14174         (do_mono_assembly_open): Add the refonly argument, in order 
14175         to pass it to other methods it calls to.
14176         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
14177         the refonly parameter to it.
14179         * image.c: Add loaded_images_refonly_hash and
14180         loaded_images_refonly_guid_hash to cache the reflection
14181         only loaded images.
14182         (mono_images_init): Initialize the hash tables used for
14183         caching the reflection only images.
14184         (load_modules): Invoke mono_image_open_full passing the refonly
14185         parameter to load the modules the correct way.
14186         (build_guid_table): Add the refonly argument, to re-build the 
14187         correct hash table.
14188         (do_mono_image_open): Added the refonly argument, in order to
14189         define it for the loaded image.
14190         (mono_image_loaded_full): New function, which receives an
14191         additional parameter to look for the image in the refonly or
14192         non-refonly section.
14193         (mono_image_loaded): Updated, using mono_image_loaded_full.
14194         (mono_image_loaded_by_guid_full): The same case that happens
14195         with mono_image_loaded_full.
14196         (mono_image_loaded_by_guid): Likewise.
14197         (register_image): Use the ref_only variable inside MonoImage
14198         to decide in which hash table store the current image.
14199         (mono_image_open_from_data_full): Rename
14200         mono_image_open_from_data to mono_image_open_from_data_full,
14201         adding the refonly argument, to define the ref_only variable 
14202         inside MonoImage.
14203         (mono_image_open_from_data): Return 
14204         mono_image_open_from_data_full.
14205         (mono_image_open_full): Rename mono_image_open to
14206         mono_image_open_full, receiving the new refonly argument,
14207         to pass it to inner methods.
14208         (mono_pe_file_open): Update this function, to open
14209         a MonoImage as a non-refonly image.
14210         (mono_image_close): Use the refonly variable inside
14211         MonoImage to remove the image from the correct caches.
14213         * image.h: Add the signatures of mono_image_open_full,
14214         mono_image_open_from_data_full, mono_image_loaded_full,
14215         mono_image_loaded_by_guid_full.
14217         * metadata-internals.h: Add the ref_only field to 
14218         MonoImage.
14219         
14220 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
14222         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
14223         Fix the last behavior, which used to load the assemblies and
14224         extract MonoReflectionAssemblyName information, instead of
14225         extract it from the metadata tables. Needed for Reflection
14226         Only assemblies.
14227         
14228 2005-07-29  Martin Baulig  <martin@ximian.com>
14230         * mono-debug-debugger.c
14231         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
14232         not initialized.
14234         * mono-debug.c
14235         (mono_debug_address_from_il_offset): Check whether we have
14236         debugging support before attempting to take the lock.
14237         (mono_debug_source_location_from_address): Likewise.
14238         (mono_debug_source_location_from_il_offset): Likewise.
14239         (mono_debug_il_offset_from_address): Likewise.
14240         (mono_debug_address_from_il_offset): Likewise.
14242 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
14244         * class.c (mono_class_from_name_case): Add support for dynamic images.
14245         Fixes #75650.
14247         * object.c (mono_class_compute_gc_descriptor): Add a workaround
14248         for #75479.
14250 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
14251         
14252         * reflection.c (mono_method_get_object): Fix warning.
14254 2005-07-28  Martin Baulig  <martin@ximian.com>
14256         * mono-debug.c
14257         (mono_debug_add_wrapper): Also write the wrapper type.
14259 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
14261         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
14262         
14263         * class.c (mono_class_init): Avoid reading nested classes if the AOT
14264         data indicates the class has none.
14266 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
14268         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
14269         loader lock with the debugger lock. Prevents deadlocks for beagle.
14271         Beagle can now run on an smp box for a weekend without any
14272         issues. Woohoo!
14274 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
14276         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
14277         in a module. Fixes #75629.
14279 2005-07-26  Martin Baulig  <martin@ximian.com>
14281         * mono-debug.c (mono_debug_add_wrapper): New static method.
14282         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
14283         interncall or a wrapper.
14285         * mono-debug.h (MonoDebugWrapperData): New public typedef.
14286         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
14287         (MONO_DEBUGGER_VERSION): Bump to 51.
14289         * mono-debug-debugger.c
14290         (mono_debugger_add_type): Removed this empty function.
14291         (mono_debugger_add_method): Likewise.
14293 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
14295         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
14296         before accessing method->slot.
14298 2005-07-21  Jb Evain  <jbevain@gmail.com>
14300         * reflection.c (method_encode_clauses/class): Handle filters clauses.
14301         Fixes #75010.
14303 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
14305         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
14306         #75587.
14308 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
14310         * image.h image.c: Add mono_image_get_guid () API function.
14312 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
14314         There were issues when multiple threads tried to load
14315         assemblies. A deadlock was created between assemblies_mutex and
14316         mono_domain_assemblies_lock. This fixes the issue by making the
14317         assembly ref counting be lock free. See bug 75586.
14318         
14319         * image.c (mono_image_close): The add ref function here was using
14320         Interlocked operations while the unref was using a mutex and a
14321         --. I don't think this was ever a bug that would be exposed in a
14322         non-pendantic way (ie, by an embedder doing a ref on one thread
14323         and an unref on another), but for the sake of correctness, this is
14324         now Interlocked.
14326         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
14327         (mono_assembly_load_reference): Call mono_assembly_addref rather
14328         than touching the refcount ourselves.
14329         (mono_assembly_close): Use InterlockedDecrement to unref the
14330         assembly. Don't acquire the lock unless it is actually needed.
14332 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
14334         * class.c (mono_class_layout_fields): Fix calculation of has_references
14335         for generic types.
14337 2005-07-12  Martin Baulig  <martin@ximian.com>
14339         Applying a patch from Michal Moskal <malekith@nemerle.org>.
14341         * metadata.c
14342         (mono_type_hash): Provide better hashing for generic instances.
14343         (mono_generic_inst_hash): Improve hashing.
14344         (mono_generic_class_hash): Likewise.
14346         * reflection.c (mymono_metadata_type_hash): Improve hashing for
14347         generic instances.
14349 2005-07-12  Martin Baulig  <martin@ximian.com>
14351         * reflection.c (mono_reflection_create_runtime_class): Remove the
14352         hack for generic type definitions and non-`Run' assemblies.
14353         (mono_reflection_bind_generic_parameters): Also use
14354         `klass->wastypebuilder' to check for TypeBuilders.
14356 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
14358         * class.c (mono_class_layout_fields): Fix calculation of has_references
14359         for generic types.
14361         * class.c (inflate_generic_class): Fix a leak.
14362         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
14363         for generic types.
14365 2005-07-11  Martin Baulig  <martin@ximian.com>
14367         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
14368         on error.
14370 2005-07-11  Martin Baulig  <martin@ximian.com>
14372         * loader.c (find_method): Also lookup in
14373         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
14375 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
14377         * appdomain.c (mono_domain_unload): Don't free the error message
14378         before passing it to mono_get_exception_...
14380         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
14381         
14382 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
14384         * threads.c: try to better guess an available RT signal (bug #75387).
14386 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
14388         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
14389         and CACHE_OBJECT.
14391 2005-07-07  Martin Baulig  <martin@ximian.com>
14393         * class.c (mono_type_get_name_full): Return NULL for
14394         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
14395         fixes #75408.
14397 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
14399         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
14400         exit the appdomain as well being aborted.
14402         * threadpool.c: Create all threadpool threads inside the root appdomain, and
14403         change back to the root domain after calling managed code. This enables
14404         appdomains using threadpools to be unloaded.
14406 2005-07-07  Martin Baulig  <martin@ximian.com>
14408         * class-internals.h
14409         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
14410         into `MonoDynamicGenericClass' since we only need it for dynamic
14411         types.
14413         * reflection.c (mono_class_bind_generic_parameters): We don't need
14414         to compute the `parent' here.
14416 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
14418         * culture-info-table.h : regenerated.
14420 2005-07-06  Martin Baulig  <martin@ximian.com>
14422         * icall.c
14423         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
14425         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
14427 2005-07-06  Martin Baulig  <martin@ximian.com>
14429         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
14430         we're doing a signature-only comparision; fixes #74945.
14432 2005-07-06  Martin Baulig  <martin@ximian.com>
14434         * class-internals.h (MonoGenericClass): Moved some things out into
14435         a new `MonoInflatedGenericClass' type.  
14436         (MonoInflatedGenericClass): New type; the `klass' of a
14437         `MonoGenericClass' is now computed lazyly in
14438         mono_get_inflated_generic_class().      
14440         * class.c (mono_get_inflated_generic_class): New public function.
14441         (mono_class_inflate_generic_method): Removed the unused
14442         `MonoClass *' argument.
14443         (setup_generic_vtable): Don't call mono_get_inflated_method() on
14444         all the methods.
14445         (mono_class_create_generic): Make this static and merge it with
14446         mono_class_create_generic_2(); we're now called automatically from
14447         mono_get_inflated_generic_class().
14449         * loader.c (mono_method_signature): Call
14450         mono_get_inflated_method() here.
14452 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
14454         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
14455         type of fields with RVA.
14457         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
14458         for this pseudo class.
14459         (my_mono_class_from_generic_parameter): Likewise.
14460         (mono_class_init): Allow interfaces to have cctors.
14462 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
14464         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
14465         lazily for AOT methods.
14467 2005-07-05  Martin Baulig  <martin@ximian.com>
14469         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
14470         returns FALSE for a successful match, not TRUE.
14472 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
14474         * loader.c (mono_method_get_index): Optimize this a bit.
14476 2005-07-04  Martin Baulig  <martin@ximian.com>
14478         * class.c
14479         (class_compute_field_layout): Move the check for generic type
14480         definitions into mono_class_layout_fields().  Fixes #74684.
14481         (mono_class_from_generic_parameter): Correctly compute
14482         `klass->parent'; fixes #75457.
14484         * reflection.c (register_assembly, register_module): Make sure
14485         `domain->rejobject_hash' is already created.
14487 2005-07-02  Martin Baulig  <martin@ximian.com>
14489         * class-internals.h
14490         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
14491         `MonoDynamicGenericClass'.      
14493 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
14495         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
14496         returned by a field getter is null, since null is a valid value.
14498 2005-07-01  Martin Baulig  <martin@ximian.com>
14500         * reflection.c (mono_reflection_generic_class_initialize): Update
14501         the `dgclass->fields [i].parent' to the correct class.
14502         (mono_image_get_fieldref_token): Use the declaring type, not the
14503         reflected type.
14505 2005-07-01  Martin Baulig  <martin@ximian.com>
14507         * loader.c (find_method): Also look in the interfaces; fixes #75429.
14509 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
14511         * threads.c (thread_cleanup): assert that thread != NULL
14512         (wait_for_tids_or_state_change): We were using the wrong variable
14513         when accessing wait->threads. `i' was always out of the bounds of
14514         the array.
14516 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14518         * loader.c: map user32 and kernel32 to libMonoSupportW
14520 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
14522         * appdomain.c (unload_thread_main): Mark this as WINAPI.
14524 2005-06-28  Martin Baulig  <martin@ximian.com>
14526         * loader.c (method_from_methodspec): Fix #75334.
14528 2005-06-28  Martin Baulig  <martin@ximian.com>
14530         Fix #74953 - Arrays now implement the generic IList<T> interface
14531         on the 2.0 platform.
14533         * class-internals.h (MonoDefaults): Added `generic_array_class'.
14535         * reflection.c (mono_class_bind_generic_parameters): New public
14536         function; similar to mono_reflection_bind_generic_parameters(),
14537         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
14539         * domain.c (mono_init_internal): Try to initialize.
14540         `mono_defaults.generic_array_class' here; this'll only succeed if
14541         we're using the 2.0 corlib.
14543         * icall.c
14544         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
14545         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
14546         (mono_lookup_internal_call): Added support for nested classes.
14548         * loader.c
14549         (mono_get_method_from_token): Set `result->signature->pinvoke' if
14550         we're an interncall and have generic arguments.
14552         * class.c
14553         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
14554         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
14555         instance of System.Array.InternalArray<T> for arrays, so they
14556         implement the generic IList<T> interface.
14558 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
14560         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
14561         (chastamar@yahoo.com). Fixes #75374.    
14563 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
14565         * culture-info-table.h: regenerated.
14567 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14569         * icall.c: handle spaces correctly for base64 strings.
14571 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
14573         * *.c: Kill some warnings.
14575 2005-06-23  Duncan Mak  <duncan@novell.com>
14577         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
14578         that this builds on Solaris 10 (x86).
14580 2005-06-23  Martin Baulig  <martin@ximian.com>
14582         * class.c
14583         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
14584         generic type definitions.
14586 2005-06-23  Martin Baulig  <martin@ximian.com>
14588         Fix #75331.
14590         * metadata.c (mono_class_get_overrides): Renamed to
14591         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
14592         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
14593         pass it to mono_get_method_full().
14595 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
14597         * reflection.c (mono_reflection_create_runtime_class): take the
14598         mono_domain_lock in this method. Prevents deadlocks
14600 2005-06-22  Martin Baulig  <martin@ximian.com>
14602         * loader.c (method_from_methodspec): Fix #75330.
14604 2005-06-22  Martin Baulig  <martin@ximian.com>
14606         * reflection.c (type_get_qualified_name): Use
14607         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
14608         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
14609         argument; use it if we don't have an assembly name.
14611 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
14613         * object.c: In mono_message_init, set "copy out" flag for in
14614         parameters with the [Out] flag.
14616 2005-06-21  Martin Baulig  <martin@ximian.com>
14618         * class.c
14619         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
14620         and MONO_TYPE_PTR.
14622 2005-06-21  Martin Baulig  <martin@ximian.com>
14624         * class.c (mono_class_init): Don't initialize `class->fields' for
14625         generic instances since they're initialized again in
14626         compute_field_layout(). 
14627         (compute_field_layout): Set the field's `generic_info' here; fix
14628         #75320. 
14630 2005-06-21  Martin Baulig  <martin@ximian.com>
14632         * class-internals.h
14633         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
14635         * metadata.c (mono_metadata_generic_method_equal): Also
14636         distinguish the `generic_class'; fixes #75334.
14638 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14640         * domain.c:
14641         * appdomain.c:
14642         * domain-internals.h:
14643         * reflection.c: 'domain_assemblies' field is now protected by its own
14644         lock. Don't call into managed code to run the AssemblyLoad event if we
14645         now there are no registered delegates for it.
14647 2005-06-20  Martin Baulig  <martin@ximian.com>
14649         * class.c (mono_class_is_assignable_from): Use a custom version of
14650         mono_class_has_parent() to make things work for generic instances;
14651         fix #75300.
14653 2005-06-20  Martin Baulig  <martin@ximian.com>
14655         * loader.c (method_from_methodspec): Apply a patch from
14656         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
14658 2005-06-20  Martin Baulig  <martin@ximian.com>
14660         * class.c (mono_class_init): Reverted Zoltan's last change; it
14661         breaks generics.
14663 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
14665         * threads.c (wait_for_tids_or_state_change): Add missing locking.
14667 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14669         * socket-io.c: fix the index in the socket array for writable/error
14670         sockets. Fixes bug #75306.
14672 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
14674         * class.c (mono_class_init): Allow interfaces to have static ctors.
14676 2005-06-17  Martin Baulig  <martin@ximian.com>
14678         * loader.c (method_from_methodspec): Use `context->container' when
14679         parsing the `gmethod->inst'.
14681 2005-06-17  Martin Baulig  <martin@ximian.com>
14683         * class.c (mono_type_get_name_recurse): Don't add the assembly
14684         name for type arguments.
14686 2005-06-15  Martin Baulig  <martin@ximian.com>
14688         * reflection.c (mono_image_get_inflated_method_token): Encode
14689         correct klass; fixes #75260.
14691 2005-06-13 Michal Moskal <malekith@nemerle.org>
14693         * icall.c: Make GetCorrespondingMethod/Constructor take
14694         MonoReflectionMethod method not MonoMethod. Removed
14695         MonoType.GetCorrespondingField, and make
14696         MonoGenericType.GetCorrespondingField take name not
14697         MonoClassField.
14699 2005-06-13  Michal Moskal <malekith@nemerle.org>
14701         * reflection.c (field_encode_signature, encode_locals):
14702          Make sizes of buffers for types larger (for big generic types).
14703          (create_generic_typespec,
14704          mono_reflection_sighelper_get_signature_local,
14705          mono_reflection_sighelper_get_signature_field):
14706          Add asserts for too small buffers.
14708 2005-06-15  Martin Baulig  <martin@ximian.com>
14710         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
14711         if our parent is not a dynamic type.
14713 2005-06-15  Martin Baulig  <martin@ximian.com>
14715         * class-internals.h (MonoTypeNameFormat): New enum.
14717         * class.c
14718         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
14719         (mono_type_get_full_name): Removed.
14720         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
14721         argument instead of the boolean's.
14723         * icall.c (ves_icall_System_MonoType_getFullName):
14724         Added `gboolean assembly_qualified'.    
14726         * reflection.h
14727         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
14729         * reflection.c (mono_reflection_parse_type): Parse the new type
14730         name format.
14732 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14734         * icall.c: no need to convert from utf16 to utf8 and then back again
14735         after the call to GetLogicalDrives.
14737 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14739         * icall.c: frombase64. Fix problems exposed by new tests.
14741 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14743         * icall.c: added internal calls for converting char [] and strings in
14744         base64 into byte [].
14746 2005-06-10  Martin Baulig  <martin@ximian.com>
14748         * class.c (mono_class_create_generic_2): Read the nested classes
14749         from the metadata rather than from `gklass->nested_classes' since
14750         `gklass' might not be initialized yet.
14752 2005-06-09  Duncan Mak  <duncan@novell.com>
14754         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
14755         all public headers. Fixes #74919.
14757 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
14759         * domain.c: The key for proxy_vtable_hash is now a pointer
14760         array. Added new GHashFunc and GCompareFunc functions for this.
14762         * class.h: The list of interfaces in MonoRemoteClass is known in
14763         advance and can't grow (we create a new MonoRemoteClass if needed),
14764         so now the interface array can be allocated together with
14765         MonoRemoteClass.
14766         
14767         * object.c: Added a new method create_remote_class_key.
14768         Fixed mono_remote_class so it does not depend on
14769         mono_upgrade_remote_class.
14770         Removed extend_interface_array.
14771         Added new method clone_remote_class(), which makes a copy of a remote
14772         class and adds a new interface or class to it.
14773         mono_upgrade_remote_class() now creates a new remote class (or gets
14774         it from the cache) if an vtable upgrade is needed. In this way
14775         we make sure that other objects sharing the same remote class
14776         don't get the new vtable with unwanted interfaces.
14777         
14778         * object-internals.h:
14779         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
14780         
14781         * marshal.c: Track changes in mono_upgrade_remote_class().
14783 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
14784         * icall.c: Add runtime methods for obtaining members of inflated
14785         class, which were created from supplied non-inflated members. It
14786         is used in internal Get{Method,Constructor,Field} methods in
14787         System.Type
14789 2005-06-09  Martin Baulig  <martin@ximian.com>
14791         * reflection.c
14792         (mono_reflection_bind_generic_method_parameters): Fix #75169.
14794 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
14795         * reflection.c (mono_image_basic_init): Define
14796         Version in MonoDynamicAssembly. 
14797         
14798 2005-06-08  Martin Baulig  <martin@ximian.com>
14800         Fix #75136.
14802         * loader.c
14803         (mono_method_signature_full): New public method; takes a
14804         `MonoGenericContext *'.
14805         (find_method): Use mono_method_signature_full() and pass the
14806         klass'es context to it.
14808         * class.c (mono_class_is_inflated_method): Use
14809         mono_method_signature_full() and pass the context to it.
14811 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
14813         * object.c: add proper locking in mono_remote_class_vtable(),
14814         fixes possible memory corruption.
14816 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
14818         * marshal.c (mono_remoting_marshal_init): set
14819         initialized after initialization.
14821 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
14823         * locales.c : hush.
14825 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
14827         * object.c (extend_interface_array): fix really silly
14828         memory corrupting / comparison bug.
14830 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
14832         * reflection.c: Functions added to support the creation
14833         of CustomAttributeData, which includes Attribute data
14834         used by ReflectionOnly methods.
14836         * reflection.h:  mono_reflection_get_custom_attrs_data and
14837          mono_custom_attrs_data_construct added (functions exposed).
14839          * icall.c: Added mono_reflection_get_custom_attrs_data
14840          as icall.
14841         
14842 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
14844         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
14845         lupus's request.
14847 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
14849         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
14851         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
14852         dynamic DllImportAttribute.
14854         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
14855         dynamic DllImportAttribute.
14857         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
14858         Fixes #75162.
14860 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14862         * threads.c: avoid segfault when an unstarted thread is aborted.
14864 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
14866         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
14867         Returns the name and version of the runtime for reporting.
14869 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14871         * appdomain.c: bump corlib version.
14872         * object-internals.h: new field in MonoReflectionAssembly.
14874 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14876         * object-internals.h: Carlos forgot to add this field.
14878 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
14880         * icall.c: Added create_version to create instances
14881         of Version of MonoReflectionAssemblyName. This change helps
14882         the AssemblyName tests to keep running fine.
14883         
14884 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
14885   
14886         * object.c (mono_method_return_message_restore): A somehow less
14887         intrusive fix for #75138.
14889 2005-06-03  Raja R Harinath  <rharinath@novell.com>
14891         * object.c (mono_method_return_message_restore): Fix computation
14892         of expected number of out args.
14894 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
14896         * reflection.c (mono_image_get_method_info): Fix the case when the
14897         charset is empty.
14899 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
14901         * object.c: Added missing null check in
14902           mono_method_return_message_restore.
14904 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
14906         * reflection.c (mono_image_get_method_info): Handle the case when
14907         dllentry is empty.
14909 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
14911         * object.c: When creating the vtable for a proxy, take into account
14912         all inherited interfaces, not only the ones registered in
14913         iclass->interfaces. This fixs bug #74996.
14914         Also, in mono_method_return_message_restore, verify that the array
14915         of out args has the expected lengh.
14917 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14919         * socket-io.c: update the timeout in Poll when the call is interrupte.
14921 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14923         * socket-io.c: support abort/suspend in Select_internal after last
14924         change.
14926 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14928         * threadpool.c: remove warning.
14930 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14932         * icall.c:
14933         * socket-io.[ch]: Select_internal uses poll() now when available, thus
14934         removing the 1024 limit from select(). Runtime part of the fix for
14935         bug #71203.
14937 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14939         * socket-io.c: when resolving the addresses for the same
14940         host returned by gethostname(), get the local IPs from the interface
14941         list. Loopback addresses are discarded if the are interfaces up with
14942         non-loopback ones. Fixes bug #63265.
14944 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
14946         * appdomain.c, verify.c, object-internals.h, reflection.c:
14947         bumped corlib number to 36, and added new extra_flags field
14948         to ReflectionMethodBuilder and friends.  Fixes #75060.
14950 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
14952         * gc.c: register a new weak link only if the object is non-null
14953         (fixes bug#75047).
14955 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
14957         * culture-info.h : short time pattern too.
14959 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
14961         * culture-info.h : expand long time pattern string length.
14963 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
14965         * culture-info-table.h : update (more French date format; #72788).
14967 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
14969         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
14970         the method is static. Fixes #75029.
14972 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
14974         * reflection.c: Update the table_idx field of method builders after
14975         saving the module, since it can change. This is a workaround for
14976         bug #74914. 
14978 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
14980         * culture-info-table.h : update (additional French date format).
14982 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
14984         * icall.c (ves_icall_type_Equals): Revert last change.
14985         
14986         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
14988         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
14990 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
14992         * class-internals.h: Added executioncontext_class field to 
14993         MonoDefaults structure.
14994         * domain.c: Cache System.Threading.ExecutionContext class in 
14995         mono_defaults.
14996         * object.c: Capture the ExecutionContext for asynchroneous calls in
14997          mono_async_result_new.
14998         * object-internals.h: Added execution_context and original_context 
14999         fields to MonoAsyncResult. Added execution_context to MonoThread.
15000         * security-manager.c|.h: Added mono_get_context_capture_method to 
15001         return the capture method (if required by the security manager or by
15002         the framework version used).
15003         * threadpool.c: Apply capture (if present) ExecutionContext in 
15004         mono_async_invoke and revert to original context after it completes.
15006 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
15008         * culture-info-table.h : updated (real hacky solution for zh-CHT).
15010 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
15012         * culture-info-table.h : zh-CHT related workaround.
15014 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
15016         * marshal.c (emit_marshal_custom): Add some error checking and call the
15017         methods in the ICustomMarshaler interface. Fixes #74875.
15018         
15019         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
15020         native->managed wrappers.
15022 2005-05-12  Martin Baulig  <martin@ximian.com>
15024         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
15025         here and use the loader lock.
15027         * mono-debug.c: Properly lock when the debugger is not attached.
15028         (mono_debug_init): Release the initial lock if we're not running
15029         in the debugger.
15031 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
15033         * marshal.c (emit_marshal_custom): Pass through NULL values without
15034         calling the custom marshalling routines.
15036         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
15037         conversion in structures. Fixes #74882.
15039 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
15041         * culture-info-table.h : zh-* cultures were missing.
15043 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
15045         * threads.c: Added a new event background_change_event which is signaled
15046         when a thread changes its background mode.
15047         Moved here several checks previously done in managed code. The checks
15048         require the thread lock, and using the thread lock in managed code
15049         can result in deadlocks.
15050         Merged Start_internal and Thread_internal into a single method. Now 
15051         Thread_internal does all work of creating and starting a thread.
15052         Added icalls for setting and getting the state of the object. Moved from
15053         managed code to avoid locking there.
15054         Added wait_for_tids_or_state_change() which is called instad of
15055         wait_for_tids when waiting for non-backround threads to end. This method
15056         will return if one of the threads ends or the background_change_event
15057         is signaled.
15058         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
15059         the background mode. This method signals the background_change_event
15060         event.
15061         * icall.c:
15062         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
15063         removed Start_internal.
15064         
15065 2005-05-11  Martin Baulig  <martin@ximian.com>
15067         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
15068         to order of some fields to get proper alignment on 64-bit machines.
15070 2005-05-11  Martin Baulig  <martin@ximian.com>
15072         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
15073         changes as they're broken and completely fuck up the debugger.
15075         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
15077 2005-05-10  Martin Baulig  <martin@ximian.com>
15079         * reflection.c (mono_reflection_generic_class_initialize): Don't
15080         call mono_class_setup_parent() here.
15082 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15084         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
15085         send/receive timeout use an integer in milliseconds. We were using a
15086         struct timeval.
15088 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15090         * locales.c:
15091         (internal_get_cultures): reserve the first slot of the array for the
15092         InvariantCulture, which will be filled in managed code.
15094 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
15096         * reflection.c (mono_image_fill_module_table): Initialize the
15097         GENERATION field as well.
15099 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15101         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
15102         Monitor.Enter on the object.
15104 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
15106         * threads.c: Enable the wait for running threads when exiting.
15107         * icall.c: Suspend all threads before exiting.
15109 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
15111         * assembly.c (mono_assembly_load_reference): Fix warning.
15113 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15115         * threadpool.c: changed the default number of threads per cpu. From now
15116         on, the default will be 20 + (5 * number of cpus) instead of 50.
15118 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
15120         * loader.c (mono_method_get_signature_full): Add locking here.
15122 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
15124         * appdomain.c: Moved methods for parsing and freeing assembly
15125         names to assembly.c.
15126         * assembly.c, domain-internals.h: Created public methods for parsing
15127         assembly names. Fixed mono_assembly_load_with_partial_name:
15128         it now finds the best match, taking into account the version,
15129         token and culture specified in the partial name. Also return
15130         the latest version if no version information is specified.
15132 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
15134         * threadpool.c: replace check for SocketAsyncCall class.
15136 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15138         * threadpool-internals.h:
15139         * Makefile.am: added threadpool-internals.h
15141         * threadpool.c: call mono_unhandled_exception on exceptions not handled
15142         that happen in threadpool threads (tested on MS).
15143         (mono_thread_pool_remove_socket): new function that dispatch any pending
15144         AIO call on a socket that is closing. By now only epoll really needs it,
15145         as select/poll wake up when the socket closes.
15148         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
15150 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
15152         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
15154 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
15156         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
15158 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
15160         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
15161         has an abort request, convert it into a suspend request.
15163 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
15165         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
15166         warning for the usage of `UnmanagedFunctionPointerAttribute' which
15167         is not supported yet.
15169 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15171         * image.c: register assemblies loaded from data (bundles) in the loaded
15172         assemblies hash. Fixes bug #74772.
15174 2005-04-29  Martin Baulig  <martin@ximian.com>
15176         * class.c (mono_type_get_name_recurse): Update to the new naming
15177         schema from the latest .NET 2.x beta2.
15178         (mono_class_setup_vtable_general): If we're a generic instance,
15179         copy the vtable from our generic type definition and inflate all
15180         the methods in it.
15182         * loader.c (find_method): Update to the new naming schema from the
15183         latest .NET 2.x beta2.
15185 2005-04-29  Raja R Harinath  <harinath@gmail.com>
15187         * class.c (mono_class_init): Add a mono_loader_unlock to the
15188         #74734 fix.
15190 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
15192         * icall.c (ves_icall_System_Environment_Exit): Remove the 
15193         suspend_all_other_threads () call for the time being, since it can hang.
15195         * threads.c (mono_thread_manage): Similarly, disable the waiting for
15196         the background threads to exit, since it can also hang.
15198         * class.c (mono_class_init): Applied patch from Ankit Jain 
15199         (radical@gmail.com). Avoid pending init errors when a field refers
15200         to a nested class using a typeref. Fixes #74734.
15202         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
15203         this for dynamic modules.
15205 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15207         * threads.c: don't wait for threads that are in the process of aborting
15208         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
15209         and waiting for background threads to finish. This makes xsp and
15210         mod-mono-server exit without random length delays and/or hangs.
15212 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15214         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
15216 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
15218         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
15219         dynamic types to prevent infinite loops. Fixes #74727.
15221         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
15222         ..._is_assignable_to.
15224 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
15226         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
15228 2005-04-25  Martin Baulig  <martin@ximian.com>
15230         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
15232         * domain.c
15233         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
15235         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
15237         * reflection.c (build_compressed_metadata): Set metadata header
15238         version to 2.0.
15240 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
15242         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
15243         number into an integral and a decimal part. Fixes #70473.
15245         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
15247 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
15249         * culture-info-table.h : reflected the latest locale-builder output.
15251 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15253         * threadpool.c: check for SuspendRequested too when deciding if
15254         mono_thread_interruption_checkpoint should be called.
15256 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15258         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
15259         * threads.c: remove interruption_mutex and use Interlocked instead. When
15260         suspending all the threads, wait for all the suspended events at once.
15261         If we're shutting down and get an APC that is going to be queued,
15262         call mono_thread_execute_interruption immediately, as the thread might
15263         be sleeping on a pthread condition or mutex.
15265         * icall.c: call mono_runtime_set_shutting_down before suspending the
15266         threads.
15268         Fixes bug #74693. And now xsp is happier when exiting.
15270 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
15272         * loader.c (mono_stack_walk): Fix #74690.
15274 2005-04-22  Martin Baulig  <martin@ximian.com>
15276         * mono-debug.h (MonoDebugMethodJitInfo): Added
15277         `MonoDebugMethodJitInfo *jit'.
15279         * mono-debug.c (mono_debug_read_method): Cache the
15280         MonoDebugMethodJitInfo in `address->jit'.
15281         (mono_debug_free_method_jit_info): New public method.
15283 2005-04-22  Martin Baulig  <martin@ximian.com>
15285         * class.c (mono_class_is_assignable_from): Disallow
15286         type parameter -> interface.
15288 2005-04-21  Dick Porter  <dick@ximian.com>
15290         * threads.c (mono_thread_create): Turn an assertion into an error.
15292 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
15294         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
15295         
15296         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
15297         Fix some gcc 4.0 warnings.
15299 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
15301         * file-io.c: fix alt dir separator char on unix systems
15302         and cleanup (fixes bug #71214).
15304 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
15306         * marshal.c: Use CALLVIRT instead of CALL when dispatching
15307         a call to a remote domain, since the method may be an
15308         interface method in the client domain. This fixes bug #74192.
15310 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15312         * threadpool.c: recv/send are now performed before going back to managed
15313         code to save one transition.
15315 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15317         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
15319         * metadata/threadpool.c: removed hack to workaround the bug above.
15321         Fixes bug #74618.
15323 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
15325         * reflection.c reflection.h: Fix handling of parameter defaults in
15326         dynamic methods. Also fixes handling of parameter attributes.
15327         Fixes #74609.
15329         * mono-debug.c (mono_debug_close_image): Fix warning.
15331 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15333         * socket-io.h: replaced old unused field with new 'blocking'.
15334         * threadpool.c: restore socket blocking state on windows(tm).
15336 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
15338         * icall.c: don't return the codebase in the AssemblyName[] returned by
15339         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
15340         * object-internals.h: Removed FIXME (fields were presents) and fixed
15341         versioncompat declaration.
15343 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15345         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
15346         not closed, so don't cleanup when it happens.
15348 2005-04-13  Chris Toshok  <toshok@ximian.com>
15350         * mono-debug-debugger.h: change prototype for
15351         mono_debugger_lookup_type.
15353         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
15354         this function, although it should probably be named
15355         mono_debugger_init_type.
15357 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15359         * threadpool.c: fix non-AIO case.
15361 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
15363         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
15364         the built-in profiler to measure just JIT compilation times.
15366 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15368         * threadpool.c: the epollfd might be closed by another thread at
15369         any time, so ignore EBADF at treat it as a "we're closing" sign.
15371 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15373         * threadpool.c: release the semaphores with a count equals to the number
15374         of working threads in both IO and regular pools. Fixed typo that messed
15375         up the count of IO pool threads. Don't initialize the pipe handles if
15376         we're using epoll.
15378 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15380         * threadpool.c: some systems don't like a NULL when deleting the socket
15381         from epoll.
15383 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15385         * threadpool.c: fix semaphore allocation.
15387 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15389         * threadpool.c: added epoll() based implementation for asynchronous IO
15390         that is used instead of the default poll() when available.
15391         It can be disabled by setting MONO_DISABLE_AIO.
15393 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15395         * threadpool.c: windows needs 'closesocket' and instead of returning
15396         0 when the stream is closed while in select, it returns -1. Fixes bug
15397         #74573.
15399 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
15401         * class.c (class_compute_field_layout): Fix the regression caused by
15402         the previous try.
15404 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15406         * threadpool.c: separate pool for socket async. IO.
15407         * threadpool.h: mono_max_worker_threads is not a global any more.
15409 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
15411         * class.c (class_compute_field_layout): Fix #74549.
15413 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15415         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
15416         use 2 connected sockets instead.
15418 2005-04-08  Miguel de Icaza  <miguel@novell.com>
15420         * mono-config.c: Add new entry point for mkbundle
15421         mono_config_parse_memory. 
15423 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15425         * threadpool.c: removed another unused function.
15427 2005-04-08  Ankit Jain  <radical@corewars.org>
15429         * reflection.c (get_default_param_value_blobs): Add 'types'
15430         parameter to get the types encoded in the constant table.
15431         (mono_param_get_objects): Use the type from the constant table,
15432         not the type of the parameter, when creating default values.
15433         Handle null default values correctly.
15435 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15437         * file-io.c:
15438         * file-io.h:
15439         * threadpool.c:
15440         * threadpool.h:
15441         * icall.c:
15442         * socket-io.c: removed dead code for async IO.
15444 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15446         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
15448         * threadpool.c: intercept socket async. calls and pass them to a thread
15449         that is polling and dispatching the job items to the threadpool as
15450         socket become ready. Fixes bugs #71217, #71933.
15452         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
15453         between char and short/ushort arrays.
15455         * socket-io.c: remove dead code.
15457 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
15459         * locales.c,
15460           icall.c : removed InternalToUpper_Comp() and
15461           InternalToLower_Comp().
15463 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
15465         * char-conversions.h : The tables were incorrectly generated. Should
15466           be generated against invariant culture.
15468 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
15470         * object.c (mono_runtime_invoke_array): Fix return value when 
15471         passing pre-created valuetype objects to ctors.
15473         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
15474         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
15475         Fixes #74338.
15477 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
15479         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
15480         only used with --security and hides the wrong corlib version error.
15482 2005-03-30  Joshua Tauberer  <tauberer@for.net>
15484         * class.c: Changed mono_class_name_from_token so that types
15485         outside of a namespace don't have an initial period.  Improved
15486         the g_warning message used in _mono_class_get when loading
15487         fails.
15488         * assembly.c: In mono_assembly_load_reference, when an assembly
15489         can't be found, "No such file or directory" is misleading and
15490         unhelpful because a few paths were checked for the presence of
15491         the assembly.  When that happens (ENOENT), display a nicer
15492         message indicating the directories that were searched.  In all
15493         cases, the warning is made easier to read for non-hackers.
15495 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
15497         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
15498         project/solution.
15499         * appdomain.h|domain.c: Removed inline from functions.
15500         * appdomain.c: Reduced warnings when compiling on windows.
15501         * icall.c: Fixed output_debug declaration to gunichar2*.
15502         * mono-config.c: Reduced warnings when compiling on windows.
15503         * rand.c: Added missing "windows.h". Added missing return value.
15504         * rawbuffer.c: Added missing winsock2.h for windows.
15505         * sysmath.h: Added mono-compiler.h header to allow/ease 
15506         compilation with non-GCC compilers.
15507         * threads.c: Fixed declarations to compile with VS.NET C compiler.
15508         Removed cast warnings.
15510         Adapted from the work of J Lothian (for VC6).
15512 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
15514         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
15515         from default_path.
15517 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
15519         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
15520         the 2.0 profile.
15522 2005-03-27  Raja R Harinath  <harinath@gmail.com>
15524         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
15525         has to be in $(exec_prefix).  $(prefix) is for arch-independent
15526         stuff, and it would probably use $(prefix)/share rather than
15527         $(prefix)/lib.
15529 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15531         * console-io.c: added 2 includes that might be missing.
15533 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
15535         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
15536         profile.
15538         * reflection.c (create_custom_attr): Allocate the params array using
15539         alloca so it gets GC tracking.
15541 2005-03-23  Chris Toshok  <toshok@ximian.com>
15543         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
15544         out some spew.
15546 2005-03-24  Raja R Harinath  <rharinath@novell.com>
15548         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
15549         changes to pick up any changes in prefix, etc.
15551 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
15553         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
15554         
15555         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
15556         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
15558 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
15560         * class-internals.h object-internals.h class.c reflection.c: Extend the
15561         mono_lookup_dynamic_token () function to return the class of the
15562         token as well. 
15564         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
15565         well. Fixes #73848.
15567 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
15569         * security-manager.c: Skip inheritance checks for intra-corlib
15570         class inheritance and method overrides. This skips a lot of checks
15571         and (anyway) permissions cannot work until corlib is loaded.
15573 2005-03-23  Martin Baulig  <martin@ximian.com>
15575         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
15576         MONO_TYPE_GENERICINST.  
15578 2005-03-23  Martin Baulig  <martin@ximian.com>
15580         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
15582 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15584         * class.c: added locking comments to some functions.
15585         Cache the interface offsets arrays (saves about 20 KB
15586         of runtime memory in a typical app).
15587         Reduce the time overhead in mono_class_setup_supertypes ().
15589 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
15591         * icall.c: speedup and fix leaks in GetMethodsByName and
15592         GetPropertiesByName.
15594 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
15596         * reflection.c: some locking fixes.
15598 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
15600         * metadata.c: added missing break in case statement.
15602 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
15604         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
15605         typedbyref return values. Fixes #73941.
15607 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
15609         * security-manager.c|h: Added demandunmanaged method and 
15610         suppressunmanagedcodesecurity class to MonoSecurityManager.
15611         Renamed aptc class to allowpartiallytrustedcallers.
15613 2005-03-17  Martin Baulig  <martin@ximian.com>
15615         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
15617 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15619         * file-io.c: disabled file async. IO using aio_*. It uses the
15620         threadpool now. Workaround for bug #73718.
15622 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
15624         * assembly.h, mono-config.c: added code to deal with bundled configs
15625         for bundled assemblies.
15627 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
15629         * *.c, private.h: cleanup, removing old private.h header file.
15631 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
15633         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
15634         and throw_on_unmappable_char attributes.
15636 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
15638         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
15639         _ProcessName_internal.
15641 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
15643         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
15644         #73631.
15646         * icall.c threads.c threads-types.h: Remove slothash icalls as they
15647         are no longer used.
15649 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
15651         * object.c (compute_class_bitmap): Add support for generics. Fixes
15652         #73527.
15654 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
15656         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
15658 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15660         * filewatcher.c: commented out the code for windows watcher, as we don't
15661         use it (we use the managed implementation instead).
15663 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
15665         * object-internals.h (MonoThread): Remove 'unused1' field.
15667         * appdomain.c: Bump corlib version.
15669         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
15671         * reflection.c (mono_reflection_create_runtime_class): Remove the
15672         AssemblyBuilder.Save optimization since it causes too many problems.
15674 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
15676         * exception.c|h: Added mono_get_exception_reflection_type_load to
15677         create a ReflectionTypeLoadException object.
15678         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
15679         to return NULL is a InheritanceDemand fails during reflection. Updated
15680         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
15681         ReflectionTypeLoadException if an InheritanceDemand fails during 
15682         reflection. Added icall mapping for GetLinkDemandSecurity.
15683         * security-manager.c|h: Added ves_icall_System_Security_
15684         SecurityManager_GetLinkDemandSecurity internal call to return the
15685         class and methods permissions set for a LinkDemand. Removed unused
15686         fields in MonoSecurityManager.
15688 2005-03-10  Martin Baulig  <martin@ximian.com>
15690         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
15691         it's a generic instance.
15693 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
15695         * reflection.c (mono_get_object_from_blob): Applied patch from
15696         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
15698         * class.c (mono_class_is_assignable_from): Another try at fixing 
15699         #73469 without breaking anything.
15701 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
15703         * class.c: (mono_class_is_assignable_from): Revert the last changes
15704         since they don't work with generics.
15705         
15706         * class.c (mono_class_is_assignable_from): Fix build bustage.
15708         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
15709         the managed IsAssignableFrom method. Fixes #73469.
15711         * reflection.c (mono_reflection_call_is_assignable_from): New helper
15712         function.
15714 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
15716         * object.c (mono_load_remote_field_new): Fix returning uninitialized
15717         memory when the remoting callback does not sets the out arguments.
15718         Fixes #73007.
15720         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
15721         by mistake.
15723         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
15725         * object-internals.h (MonoStackFrame): Sync with managed object layout.
15727         * appdomain.c: Bump corlib version.
15729 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
15731         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
15732         function.
15734         * threads.c (mono_thread_attach): Detect threads which are not started
15735         by the GC pthread wrappers.
15737 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
15739         * icall.c: Added new icall for RNG.
15740         * rand.c|h: Added new icall to open the RNG. This allows to share a 
15741         single handle on Linux to access /dev/urandom and fix #73183.
15743 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
15745         * object.c: setting the new vtable in a transparent proxy object must
15746         not change the GC descriptor.
15748 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15750         * object.c: fixed compilation without GCJ support.
15751         * reflection.c: for runtime-created types ensure klass->has_references
15752         is correct (bug #73215).
15754 2005-03-02  Martin Baulig  <martin@ximian.com>
15756         * class.c (mono_class_is_assignable_from): Make this work if
15757         `oklass' is a generic instance; fixes #72831.
15759 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
15761         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
15762         with hasthis set.
15763         
15764         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
15766         * marshal.c: Reorganize native->managed marshalling code to also use
15767         the emit_marshal_... functions.
15769 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
15771         * object.c: typed allocs have issues with bitmap sizes > 30,
15772         so check for max_set >= 30.
15774 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
15776         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
15777         managed code. Fixes #73012.
15779         * metadata.h (MonoMarshalSpec): Add elem_mult field.
15781         * metadata.c reflection.c: Load/Emit elem_mult as well.
15782         
15783         * metadata.h (MonoMarshalSpec): Add comment.
15785         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
15787         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
15788         num_elem to -1 if not given.
15790         * object-internals.h (MonoReflectionMarshal): Add has_size field.
15792         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
15793         given values.
15795 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
15797         * null-gc.c (mono_gc_free_fixed): Was not compilable.
15799 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
15801         * reflection.c (encode_marshal_blob): Encode param_num field as well.
15803         * object-internals.h (MonoReflectionMarshal): Add param_num field.
15805 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
15807         * object.c: generalized the reference bitmap creation
15808         and added hooks for the new GC.
15809         * class-internals.c: removed the gc_bitmap field from MonoClass.
15811 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15813         * domain.c: help the compiler to produce better code
15814         in mono_jit_info_table_find ().
15816 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
15818         * object.c: make all allocations look typed.
15820 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15822         * socket-io.c: load Mono.Posix if it's not loaded already
15823         (fixes bug#73033).
15825 2005-02-24  Martin Baulig  <martin@ximian.com>
15827         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
15828         * reflection.c (dup_type): Likewise.
15830 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
15832         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
15833         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
15835 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15837         * domain.c, threads.c, object-internals.h: make the critical thread
15838         local vars use the fast access mode (even when we're compiled in
15839         a lib). Provide accessors to be used by the jit during codegen.
15841 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15843         * appdomain.c: Changed hook functios behavior to include
15844         support for the reflection only assemblies. Some icalls were changed
15845         to support the mentioned assemblies too. Signatures of static methods
15846         try_assembly_resolve and real_load now have an additional parameter:
15847         refonly.
15849         * assembly.c: General changes to mono_assembly_ methods to support
15850         reflection only api. Functions mono_assembly_open, mono_assembly_load,
15851         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
15852         suffix, to support an additional gbool parameter to specify whether
15853         the assembli is reflection only or not. Created some new hook functions 
15854         to add support for reflection only assemblies. Signatures of static 
15855         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
15856         have now an additional parameter: refonly.
15858         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
15859         indicating whether the assembly is reflection only or not.
15861         * exception.c: Add mono_get_exception_invalid_operation.
15863         * icall.c: Throw an InvalidOperationException when trying to invoke
15864         a property/method/event, or trying to set/get the value of a field.
15865         Also add an icall to retrieve the ref_only flag to the
15866         MonoReflectionAssembly.
15868 2005-02-23  Chris Toshok  <toshok@ximian.com>
15870         Part of fix for #72827.
15871         * mono-debug.c (mono_debug_add_method): add lexical block data to
15872         the info we write.  Kind of a hack at the moment - we copy the
15873         lexical block info from the MonoDebugMethodInfo to the
15874         MonoDebugMethodJitInfo here, before writing it.
15875         (mono_debug_read_method): read the lexical block info.
15877         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
15879         * debug-mono-symfile.h: add lexical block support.
15881         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
15882         support.
15884 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
15886         * loader.c (mono_lookup_pinvoke_call): Fix warning.
15888         * object.c (mono_runtime_free_method): Call mono_free_method () and
15889         put the TODOs there.
15891         * loader.c (mono_free_method): Free up most memory allocated for 
15892         dynamic methods.
15894 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15896         * reflection.c: properly flag a Type argument to a
15897         named custom attr value (bug #72248).
15899 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15901         * reflection.c: reduce code duplication in named custom
15902         attribute encoding.
15904 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
15906         * reflection.c: properly encode custom attrs of type object
15907         (bug #72649).
15909 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
15911         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
15913 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
15915         * socket-io.c: load System.dll if it's not loaded already
15916         (bug #72850 and #70477).
15918 2005-02-21  Martin Baulig  <martin@ximian.com>
15920         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
15921         generic instances.
15923 2005-02-21  Martin Baulig  <martin@ximian.com>
15925         * reflection.c (mono_image_build_metadata): We also need to
15926         "fixup" the MethodImpl table after we computed the final method
15927         indices.  Call fixup_methodimpl() to do that.
15928         (fixup_methodimpl): New private method.
15930 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
15932         * assembly.c: special case mscorlib.dll (bug#72536),
15933         patch from Carlos Alberto Cortez.
15935 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
15937         * threads-types.h threads.c: Fix build bustage.
15939         * threads.c: Use a union for long<->double conversions.
15941         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
15942         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
15944         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
15945         containing the checkpoint call with NOT_TAKEN.
15946         
15947         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
15948         checkpoint before pushing the arguments, so they won't have to be
15949         spilled to stack.
15951 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15953         * domain.c, assembly.c, domain-internals.h: make some data
15954         const and relocation-free.
15956 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
15958         * object.c, appdomain.c, class-internals.h: introduce the
15959         MonoClassRuntimeInfo structure to hold the info needed to
15960         use a class at runtime. Made mono_class_vtable() lock-free
15961         for all the appdomains.
15963 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
15965         * metadata-internals.h, image.c: introduce a per-image mempool to
15966         be used for memory that has the same lifetime as the image.
15968 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
15970         * domain.c: In mono_init_internal(), instead of selecting the first
15971         runtime version supported by an executable, get a list of all
15972         supported versions and select the one for which an mscorlib exists
15973         (since even if the runtime supports a given version, it doesn't mean
15974         that the framework for that version is installed).
15975         Modified get_runtimes_from_exe to support this behavior.
15976         In supported_runtimes, added information about additional system
15977         assembly versions.
15978         
15979         * assembly.c: Added support for more than one system assembly version
15980         per runtime version. Updated the assembly list.
15981         In mono_assembly_remap_version, removed the initial version check,
15982         since we don't know to which version we need to compare until we
15983         get the version set on which the assembly is based.
15984         Moved the code for loading corlib into the new method
15985         mono_assembly_load_corlib(), so it can be used by the initialization
15986         code.
15987         
15988         * domain-internals.h: Updated data structures and added declaration
15989         for mono_assembly_load_corlib.
15991 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
15993         * reflection.c (resolve_object): Fix the creation of the signature in 
15994         the SignatureHelper case.
15996         * assembly.c (mono_assembly_remap_version): Fix binary search.
15997         
15998 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
16000         * class.c: Added inheritance check when a method is overloaded (from a
16001         virtual method or when implementing an interface) and when a class is
16002         inherited. Added functions to set a failure for a class and to 
16003         retreive the exception from a failure.
16004         * class-internals.h: Added fields to MonoClass to keep the exception
16005         information status for inheritance (or other exceptions) to be thrown
16006         later (i.e. not at load time).
16007         * object.c: Throw the inheritance SecurityException when a type is to 
16008         be created with either class or method inheritance violations.
16009         * reflection.c|h: Fix when getting declsec from a class. Removed 
16010         unrequired code for class. Improved sanity in parameter naming.
16011         * security-manager.c|h: Added functions to check for class and method
16012         inheritance.
16014 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
16016         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
16017         and has_finalize in dynamic types as well.
16019 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
16021         * culture-info-table.h : fixed currency format for en-GB (and so on).
16023 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
16025         * gc.c: ensure the GC handles never have 0 as a value.
16027 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
16029         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
16030         a pointer to a struct to unmanaged code. Fixes #72625.
16032 2005-02-16  Martin Baulig  <martin@ximian.com>
16034         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
16036 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
16038         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
16040 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
16042         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
16044         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
16045         UnmanagedFunctionPointerAttribute, use it for determining calling convention
16046         etc. Fixes #71471.
16048         * reflection.c (mono_custom_attrs_get_attr): New helper function.
16050         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
16052 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
16054         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
16055         changes to make the current context a field in MonoThread.
16057 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
16059         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
16060         the last change.
16061         
16062         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
16063         extracted from mono_marshal_get_native_wrapper.
16065         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
16066         to create wrappers around native functions.
16068         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
16069         delegates for arbitrary function pointers. Fixes #71472.
16071 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
16073         * threads.c: cleaned up the code a little.
16075 2005-02-15  Martin Baulig  <martin@ximian.com>
16077         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
16078         the data table.
16080         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
16081         allocate larger chunks if needed.
16083 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
16085         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
16086         in by mistake.
16088 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
16090         * domain.c: keep the domains in an array and ensure the domain ids
16091         are kept small, so they can be used as indexes to domain-specific data
16092         with a small memory overhead.
16094 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
16096         * icall.c: Handle byref types in Type icalls. Fixes #72544.
16098 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
16100         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
16102 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
16104         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
16106         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
16107         values.
16109         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
16110         
16111 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
16113         * domain-internals.h: add the hashtable here.
16115         * class-internals.h: Remove `info' from MonoMethod
16117         * domain.c: Add a new hashtable, jit_trampoline_hash
16119 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16121         * object.c: don't set the value of static fields
16122         (fixes bug#72494).
16124 2005-02-11  Martin Baulig  <martin@ximian.com>
16126         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
16127         (mono_debug_add_method): Silently ignore the method if it's too big.
16128         (mono_debug_add_type): Likewise.
16130 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
16132         * threads.c, appdomain.c: remove #ifdefs from the code.
16134 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
16136         * metadata-internals.h: Added flags to MonoAssembly to cache the most
16137         common security informations. This allows us to stay in unmanaged code
16138         when doing LinkDemand and it's special cases (except for the first 
16139         time for initialization). The flags a very much used with --security.
16140         * reflection.c|h: Added code to get declarative security attributes 
16141         for LinkDemand and InheritanceDemand. This required to refactor the
16142         existing code for Demand.
16143         * security-manager.c|h: Added new method fields for the special cases
16144         of LinkDemand.
16146 2005-02-10  Martin Baulig  <martin@ximian.com>
16148         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
16149         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
16151 2005-02-10  Martin Baulig  <martin@ximian.com>
16153         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
16154         debugging code; this is almost a complete rewrite.
16156         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
16158 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16160         * domain.c, object.h: expose mono_string_equal () and 
16161         mono_string_hash ().
16162         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
16163         it's implemented in managed code.
16165 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16167         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
16168         lo leak objects between appdomains.
16170 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16172         * assembly.c: old compilers compilation fix from 
16173         robertj@gmx.net (Robert Jordan).
16175 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
16177         * class-internals.h: Little reminder for the future.
16179         * debug-helpers.c: Fix up wrapper_type_names
16181 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16183         * image.c, metadata-internals.h: when loading an image from a file,
16184         mmap all of it and use the same codepaths as when using a
16185         in-memory image: the code is simpler and we use less memory
16186         (both writable and readonly).
16188 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
16190         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
16191         API to alloc runtime data structures that need to be tracked by the
16192         GC and contain pointers.
16193         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
16194         make the code more readable and eventually use a different GC.
16196 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
16198         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
16199         for out arguments.
16200         
16201 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
16203         * object.c: In release_type_locks(), don't release the cctor lock
16204         if it has already been released. This fixes a crash in the
16205         thread5 test.
16207 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16209         * gc.c, marshal.c, icall.c: register a delegate for finalization
16210         only when the native function pointer has been allocated for it.
16212 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16214         * object.c: cleaned up some code, allocate objects that are
16215         pointer free with the atomic malloc variant. Allocate memory
16216         for static data from the mempool if it's pointer-free.
16217         Allocate the bounds array at the end of the array data, when needed.
16218         * object-internals.h, object.h: move a private function in a private
16219         header.
16220         * class.c: handle missing case in tracking references in fields.
16222 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
16224         * class.c, class-internals.h: keep track if a type has
16225         reference fields in either the instance or static fields.
16227 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
16229         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
16230         and renamed to MonoRuntimeInfo. Added fields to store the expected
16231         framework assembly version. Changed mono_get_framework_version and
16232         mono_get_runtime_version for a single mono_get_runtime_info method.
16233         
16234         * assembly.c: Added method to remap system assembly versions to the
16235         current executing runtime version. Removed old mapping code.
16236         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
16237         
16238         * icall.c, reflection.c: Track api changes.
16240 2005-02-06  Miguel de Icaza  <miguel@novell.com>
16242         * loader.c (method_from_memberref): Improve error reporting,
16243         produce the class name instead of the typeref/typedef index. 
16245 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
16247         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
16249 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
16251         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
16252         stdcall and charset name mangling.  Reorganize the code and add
16253         some tracing stuff.
16255 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
16257         * monodiet.c: More iters!
16259         * marshal.c: Iter usage.
16261         * icall.c: Iter usage.
16263         * object.c: Use iters.
16265         * debug-helpers.c: More iters
16267 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
16269         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
16270         under win32.
16272 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
16274         * mono-debug-debugger.c: use iters
16276         * class.c, class-internals.h: mono_class_setup_events is static
16277         now
16279         * All callers: use iters
16281 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
16283         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
16284         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
16286 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
16288         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
16290         * marshal.h: Add prototypes for ldfld/stfld_remote.
16292         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
16293         this is called during startup.
16294         
16295 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
16297         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
16298         MonoThreadsSync struct private in monitor.c. Changed the way
16299         MonoThreadsSync is allocated so it's faster and there is no
16300         need to keep track of it with a finalizer and it uses less memory.
16301         This also finally allows us to allocate mono objects as ptrfree when
16302         there are no reference fields.
16304 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
16306         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
16307         disappearing link to the GC interface and use them to simplify
16308         the gchandles code.
16310 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
16312         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
16313         stfld_remote which call mono_load/store_field_new. This allows methods
16314         calling ldfld/stfld wrappers to be AOTed.
16316         * console-io.c: Include sys/filio.h under solaris.
16317         
16318         * console-io.c: Include curses.h if needed correctly.
16320 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
16321         
16322         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
16323         method->klass as well.
16325         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
16327         * class.c (mono_class_init): Switch on lazy initialization of 
16328         methods.
16330         * class.c (mono_class_get_finalizer): Handle the case when the 
16331         finalizer is inherited.
16333 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16335         * console-io.c: <curses.h> is needed by term.h on solaris.
16337 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
16339         * icall.c, class-internals.h, monodiet.c, class.c: Remove
16340         mono_class_setup_properties where possible. Remove this ftn from
16341         the header file, and make it static.
16343 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
16345         * loader.c: Add missing setup_... call.
16347         * class.c: Add missing setup_... calls.
16349         * class.c (mono_class_init): Switch on lazy initialization of 
16350         the generic vtable.
16351         
16352         * class.c (mono_class_init): Fix generics broken by the recent changes.
16354         * monodiet.c (handle_type): Add missing setup_... calls.
16356         * class.c: Back out garbage in previous patch.
16357         
16358         * class.c: Add missing setup_... calls.
16360         * class.c (mono_class_get_method_from_name_flags): Avoid calling
16361         mono_class_setup_methods () if possible.
16363         * class-internals.h (MonoClass): Add 'has_cctor' flag.
16365         * class-internals.h (MonoCachedClassInfo): New structure.
16367         * class.c: Initialize properties and events fields of MonoClass lazily.
16369         * class.c: Add infrastructure for lazily initializing the methods and
16370         vtable fields of MonoClass. Not yet used.
16372         * class.c (mono_class_get_finalizer): New helper function.
16374         * class.c: Add infrastructure for loading some class related data from
16375         an AOT file.
16377         * object.c: Add infrastructure for initializing the vtable from data
16378         in the AOT file.
16380         * gc.c (run_finalize): Use mono_class_get_finalizer ().
16382         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
16383         appropriate initialization function before accessing parts of the
16384         MonoClass structure.
16386         * marshal.c: Fix warnings.
16387         
16388         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
16390         * mono-debug-debugger.c (get_exception_message): Use 
16391         mono_class_get_method_from_name_flags ().
16393 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
16395         * reflection.c, appdomain.c: Replace a few manual searches that
16396         Zoltan missed. (Paolo approved this part of my initial patch).
16398 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
16400         * profiler.c: disable recording statistical events at report time.
16402 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16404         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
16405         to byteswap arrays of enum values, too (bug #72080).
16407 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
16409         * appdomain.c (set_domain_search_path): Allow this to be called if
16410         domain->setup is not yet set.
16412         * loader.c (mono_method_get_index): New helper function.
16414         * loader.c reflection.c: Use mono_method_get_index ().
16416         * class.c (mono_class_get_method_from_name_flags): New helper method.
16418         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
16419         this.
16421         * class.c (mono_class_get_cctor): New helper method.
16423         * string-icalls.c object.c class.c marshal.c reflection.c: Use
16424         mono_class_get_method () to look up methods.
16426 2005-02-01  Miguel de Icaza  <miguel@novell.com>
16428         * console-io.c: Fix the build, this should work on Windows.
16430 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
16432         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
16433         be set to null to keep things valid
16435 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16437         * icall.c: added Console 2.0 icalls.
16438         * Makefile.am: added console-io.[ch]
16439         * console-io.[ch]: internal calls for Console 2.0 API.
16441 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16443         * class.c: make sure we consider all the interfaces
16444         when calculating max_interface_id (bug found by
16445         Jeroen Frijters running ikvm).
16447 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
16449         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
16450         valuetype fields to null.
16452         * object.c (set_value): Ditto. Fixes #71669.    
16454 2005-01-31  Martin Baulig  <martin@ximian.com>
16456         * metadata.c (mono_metadata_has_generic_params): New public
16457         function; checks whether something is a generic method.
16459 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16461         * appdomain.c: fix infinite recursion when adding assemblies.
16463 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
16465         * object.c: Fix small typo to return all items for Environment.
16466         GetCommandLineArgs.
16468 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16470         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
16471         reflection.c: more domain and assembly-unload related fixes
16472         and memory leaks plugs.
16474 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
16476         * 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.
16478 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
16480         * loader.c (mono_method_signature): Make this method lazy
16481         (mono_get_method_from_token): Don't computate the signature here.
16483         Doing this saves quite a bit of memory. I got 90 kb on starting up
16484         monodoc. It should also save some disk reads on startup.
16486         * *: MonoMethod->signature might be NULL now. You *MUST* use
16487         mono_method_signature.
16489 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
16491         * object.c (mono_runtime_get_main_args): Return an array from the
16492         current domain here. Fixes #71938.
16494 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
16496         * monitor.c: formatting changes to comply with the
16497         mono coding style and remove #ifdefs from the code.
16499 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
16501         * metadata.c, private.h: remove some unneeded data
16502         and use a more compact representation for table schemas.
16504 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16506         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
16507         to get a better distribution in hash tables.
16508         * *.c: use mono_aligned_addr_hash() where appropriate.
16509         * assembly.c: make var static.
16511 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
16513         * domain-internals.h: Put MonoJitInfo on a diet.
16515         * domain.c: Fix a warning.
16517 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16519         * gc.c: rework the gc handles code to reuse handles
16520         when freed.
16522 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
16524         * domain.c: fixed long standing bug in mono_string_equal() which
16525         was brought to light with the ldstr changes.
16527 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
16529         * reflection.c: Remove warning by adding missing include for marshal.h
16531 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16533         * domain.c, object.c: change the ldstr_table to hold
16534         MonoString* as keys: makes the runtime isinterned lookup
16535         faster and simplifies memory management.
16537 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
16539         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
16540         possible to add imperative security checks before calling the icall.
16541         * reflection.c: Return security attributes on the original MonoMethod
16542         (and not the wrapped one). This fix permissions on icalls.
16544 2005-01-25  Dick Porter  <dick@ximian.com>
16546         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
16547         the check for mktime() support actually test the mktime() return
16548         value.  "Fixes" bug 71682, though the output is still different to
16549         MS.
16551 2005-01-25  Martin Baulig  <martin@ximian.com>
16553         * class.c (mono_class_is_assignable_from): Make this work for
16554         generic instances.
16556 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
16558         * marshal.c (mono_string_utf8_to_builder)
16559         (mono_string_builder_to_utf16): We might not have ownership of the
16560         string. In thise case, we need to create a new buffer.
16562         * object-internals.h (mono_stringbuilder_capacity): sb->str might
16563         be null, in which case, use the default capacity.
16565 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16567         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
16568         GC events to the profiler.
16570 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
16572         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
16573         if you don't want the GC to run.
16575 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
16577         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
16578         start providing a GC API and keeping different implementations in
16579         their own file.
16580         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
16582 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
16584         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
16585         mmap rather than allocating a huge buffer.
16586         (mono_debug_close_mono_symbol_file): Free the buffer allocated
16587         above.
16589 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
16591         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
16592         and CheckExecutionRights.
16593         * reflection.c|h: Keep the index of the declarative security to be 
16594         used, instead of the pointer, when AOT compiler is used. Also add 
16595         class initialization when requesting demands.
16596         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
16597         CheckExecutionRights. Both properties are now FALSE by default, and
16598         unmodifiable, unless the --security option is used.
16600 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16602         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
16603         reflection.c: properly refcount images and assemblies, many leaks fixed.
16605 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16607         * threadpool.c: increase the timeout for threads in the thread pool to
16608         10s.  Fixes bug #67159.
16610 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
16612         * class-internals.h: Sun's compiler insists on explicit
16613         signed on bit fields to handle then correctly.
16615 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
16617         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
16618         Make the size of the array fit only the number of invalid path
16619         chars that we have.
16621         * class.c (_mono_class_get): Improve the error reporting when a
16622         class referenced is not found, to assist debugging. 
16624 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
16626         * threads.c: fix off-by-one error.
16627         * domain.c: free data allocated in the domain.
16629 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
16631         * reflection.c (mono_method_body_get_object): Fill out exception info
16632         as well.
16634         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
16635         structure.
16636         
16637 2005-01-19  Martin Baulig  <martin@ximian.com>
16639         * loader.c (mono_get_method_constrained): Make this work again.
16641 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
16643         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
16644         guint16 to match the managed side.
16646         * reflection.c (mono_reflection_body_get_object): Fill out local
16647         variables array.
16649         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
16650         as well.
16652         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
16653         'local_var_sig_token'.
16655 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
16657         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
16658         System.Drawing.
16660         * reflection.c (mono_method_body_get_object): Handle abstract and
16661         runtime methods.
16663 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
16665         * marshal.c, loader.c, class-internals.h, reflection.c:
16666         store the emthod data for a wrapper in an array instead of a list.
16668 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
16670         * marshal.c: change the code to allocate memory more
16671         conservatively for method wrappers.
16673 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16675         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
16676         fields from MonoClass to the marshal info structure where they belong.
16678 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16680         * class.c, object.c, class-internals.h, marshal.c: rearrange
16681         some fields and tweak some types to lower memory usage.
16683 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
16685         * threads.c (signal_thread_state_change): Handle the case when the
16686         target thread is the current thread.
16688         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
16690         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
16691         emit_ptr_to_object_conv. 
16693         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
16694         marshalling. Fixes #71352.
16696 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16698         * metadata.h, blob.h: move table enum to blob.h so it can be included
16699         in any header.
16700         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
16701         cut the size of MonoImage/MonoDynamicImage.
16703 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
16705         * profiler.c (mono_profiler_install_simple): Fix default arguments.
16707 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
16709         * reflection.c, reflection.h, icall.c: add a function to check
16710         if an attribute type is defined for a metadata object.
16712 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
16714         * object-internals.h: Added some needed fields from StringBuilder class.
16715         * marshal.c: Set the maxCapacity when creating a StringBuilder.
16717 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
16719         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
16720         threads before shutting down the runtime.
16722         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
16724 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
16726         * object-internal.h, threads.c: implement stacksize and 
16727         parameterized thread start functionality (requires
16728         matching corlib). Marked broken code for later removal.
16730 2005-01-12  Martin Baulig  <martin@ximian.com>
16732         * class-internals.h (MonoGenericClass): Moved the `initialized'
16733         flag to MonoDynamicGenericClass, removed `init_pending'.
16734         (MonoGenericInst): Added `is_reference' flag.
16736 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
16738         * reflection.c (mono_image_create_pefile): Only set the pe_offset
16739         inside the MSDOS header. Fixes #71201.
16741         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
16742         gc thread.
16743         (mono_domain_finalize): Ditto.
16745 2005-01-12  Martin Baulig  <martin@ximian.com>
16747         * class.c (mono_get_shared_generic_class): Use the cache for
16748         non-dynamic generic classes.
16750         * class-internals.h (mono_class_create_generic_2): Removed
16751         function prototype, this function is now static inside class.c.
16753         * class.c (mono_class_create_generic_2): Made this static, only
16754         call it from mono_class_init() and mono_class_setup_parent().
16755         (collect_implemented_interfaces_aux): Call mono_class_init() on
16756         the interfaces we collect.
16757         (mono_class_setup_vtable): Call mono_class_init (class->parent).
16759 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
16761         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
16762         it a real thread handle.
16764         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
16765         MonoJitExceptionInfo, since each catch clause needs its own variable.
16766         
16767 2005-01-11  Dick Porter  <dick@ximian.com>
16769         * image.c (mono_pe_file_open): New variant on mono_image_open()
16770         that does not set up the CLI metadata; used for FileVersionInfo so
16771         it can get the data for windows binaries too.
16772         
16773         * process.c (process_read_string_block): Don't read off the end of
16774         the StringTable block.
16776         These both fix bug 70766.
16778 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
16780         * gc.c: set some fields to NULL at GC cleanup time.
16781         * threads.c: if we quit the main thread, call exit ().
16783 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
16785         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
16787 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
16789         * threads.h, threads.c, object.c: added accessor and settor for
16790         main_thread. Handle it specially when exiting from it: wait
16791         for other foreground threads to exit.
16793 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
16795         * process.c, verify.c: remove some bloat.
16797 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
16799         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
16800         the calling convention to cdecl under win32.
16802 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
16804         * object.c (mono_object_get_size): New function to get the size of
16805         an object instance.
16807         * profiler.c (simple_allocation): Use above.
16809 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
16811         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
16812         ves_icall_System_AppDomain_getRootDomain (as it's not required to
16813         get an appdomain by it's id and we can't assume the root's id is 0).
16814         * domain-internals.h: Change the function prototype to match.
16815         * icall.c: Change the icall table for AppDomain.
16817 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
16819         * locales.c (string_invariant_compare_char): Only compute
16820         GUnicodeTypes in the case where we need them.  Test for ordinality
16821         first and return if so.
16823         From the commit:
16825                 /*
16826                  * FIXME: here we must use the information from c1type and c2type
16827                  * to find out the proper collation, even on the InvariantCulture, the
16828                  * sorting is not done by computing the unicode values, but their
16829                  * actual sort order.
16830                  */
16832 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16834         * loader.c: for P/Invoke methods, allow the "Internal" shared
16835         library name to refer to the calling process symbol namespace.
16837 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
16839         * Makefile.am: Add the security manager to the build.
16840         * security-manager.c|h: New. Initialization of the security manager.
16842 2005-01-07  Dick Porter  <dick@ximian.com>
16844         * threads.c: 
16845         * monitor.c: Update thread state during Monitor and WaitHandle
16846         waits.  Fixes bug 71031.
16848 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
16850         * reflection.c (property_encode_signature): Correctly handle when the
16851         property has no methods.
16853 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
16855         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
16856         
16857         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
16858         fields from mb, not rmb. Fixes #71017.
16860         * marshal.c (emit_ptr_to_str_conv): Add support for 
16861         ByValTStr -> string conversion. Fixes #71015.
16863         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
16865         * mempool.c (mono_mempool_contains_addr): New helper function.
16867 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
16869         * metadata.c (mono_metadata_compute_size): Fix size calculation of
16870         HasSematics encoded fields.
16871         
16872         * metadata.c (mono_type_to_unmanaged): Improve error message for 
16873         invalid string marshalling.
16875         * metadata.c: Fix warnings.
16876         
16877 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16879         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
16880         profiler support.
16882 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
16884         * domain.c object.c domain-internals.h: Revert part of r38077 since the
16885         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
16886         tests.
16888 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
16890         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
16891         so methods containing these can be AOTed.
16893 2005-01-03  Martin Baulig  <martin@ximian.com>
16895         * loader.c (find_method): Removed the hack for generic instances.
16896         (method_from_memberref): If our parent is a generic instance, pass
16897         its generic type definition to find_method() and then inflate the
16898         method.
16899         (mono_get_method_constrained): Pass the generic type definition to
16900         find_method() and inflate the method later.
16902         * class-internals.h (MonoStats): Added `generic_class_count'.
16904         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
16905         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
16907         * reflection.c (mono_custom_attrs_from_params): Don't ignore
16908         generic type definitions.
16910 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
16912         * loader.c icall.c: Fix warnings.
16914 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
16916         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
16917         blittable types. Fixes #70864.
16919 2004-12-29  Martin Baulig  <martin@ximian.com>
16921         * icall.c
16922         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
16924         * reflection.c (mono_method_get_object): Create a
16925         "System.Reflection.MonoGenericMethod" for inflated methods; don't
16926         call mono_get_inflated_method().
16928         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
16930 2004-12-27  Martin Baulig  <martin@ximian.com>
16932         * class-internals.h (MonoMethod): Added `is_inflated' flag.
16933         (MonoMethodInflated): Added `inflated' field.
16935         * class.c (mono_class_inflate_generic_method): Don't really
16936         inflate the method here; just set the `is_inflated' flag in the
16937         MonoMethod.
16938         (mono_class_get_inflated_method): Actually inflate the method here
16939         if it's not already inflated; we use the MonoMethodInflated's new
16940         `inflated' field as a cache.
16942 2004-12-26  Martin Baulig  <martin@ximian.com>
16944         * class.c
16945         (inflate_generic_class): Moved some code out of inflate_generic_type().
16946         (mono_class_inflate_generic_method): If we're already inflated,
16947         inflate the context and use the declaring method; ie. make sure
16948         the declaring method of an inflated method is always the generic
16949         method definition.
16950         (mono_class_create_from_typedef): Create
16951         `class->generic_container->context->gclass'.
16953 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
16955         * metadata-internals.h, marshal.c, reflection.c: More
16956         MonoGHashTable->GHashTable.
16958         * domain-internals.h, class.c: Change MonoGHashTable's into
16959         GHashTables for some cases where no gc stuff is used
16961         All users: update apis
16963 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
16965         * metadata.c (builtin_types): Make this `const'. Makes this get
16966         put into the shareable section.
16967         (mono_metadata_init): Casts to make gcc happy.
16969 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
16971         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
16973 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
16975         * icall.c: Added an internal call to retrieve the position and length
16976         of assembly-level declarative security attributes (RequestMinimum, 
16977         RequestOptional and RequestRefuse). This is used by the Assembly class
16978         to re-create the corresponding permission sets.
16980 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
16982         * marshal.c: fix the stelemref wrapper to be type correct
16983         (and faster).
16985 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
16987         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
16988         to do key & 0x7fffffff. Hashtable already does this. It just
16989         results in longer code.
16991 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
16993         * appdomain.c: Bump corlib version.
16994         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
16995         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
16996         * reflection.c|h: Add functions to get declarative security infos
16997         (blob position and length) for assemblies, classes and methods.
16999 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
17001         * reflection.c: sort the constant table (bug #70693).
17003 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
17005         * object-internals.h, threads.c, domain.c: add accessors for
17006         the MonoThread and MonoDomain tls keys.
17008 2004-12-18  Martin Baulig  <martin@ximian.com>
17010         * class.c (inflate_generic_type): If we're inflating a generic
17011         instance, set `ngclass->context->container = context->container';
17012         ie. the container we inflated into.
17014         * metadata.c (mono_metadata_parse_generic_param): Reflect above
17015         inflate_generic_type() changes.
17017 2004-12-17  Martin Baulig  <martin@ximian.com>
17019         * class-internals.h
17020         (MonoGenericClass): Replaced `MonoType *generic_type' with
17021         `MonoClass *generic_class'.  Removed `dynamic_info'; if
17022         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
17023         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
17025 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
17027         * exception.c (mono_exception_from_token): New helper function.
17029 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
17031         * assembly.c (mono_assembly_load_with_partial_name): Call 
17032         mono_assembly_loaded before invoking the preload hooks. Fixes
17033         #70564.
17035         * object-internals.h (MonoThread): Change culture_info and 
17036         ui_culture_info into an array.
17038         * threads.c: Cache culture info objects from more than one appdomain.
17040         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
17041         current UI culture.
17043 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17045         * threads.h threads.c appdomain.c: Clear the culture_info field of
17046         all threads during unloading if they point to an object in the dying
17047         appdomain.
17049 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
17051         * culture-info.h (TextInfoEntry): New struct
17052         * object-internals.h: sync with managed
17053         * locales.c: fill the `text_info_data' field
17054         * culture-info-tables.h: update
17056 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17058         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
17059         collector.
17061 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
17063         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
17064         (ves_icall_ModuleBuilder_getMethodToken): Ditto
17066 2004-12-12  Martin Baulig  <martin@ximian.com>
17068         * mono-debug-debugger.c (write_type): If we're an enum and the
17069         builtin types have already been initialized, call mono_class_init().
17071 2004-12-11  Martin Baulig  <martin@ximian.com>
17073         * metadata.c (mono_metadata_load_generic_params): Added
17074         `MonoGenericContainer *parent_container' argument; automatically
17075         compute `container->is_method'; pass the correct owner to
17076         get_constraints().      
17078         * reflection.c (compare_genericparam): Sort the GenericParam table
17079         according to increasing owners. 
17081 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
17083         * profiler.c: allow disabling the default profiler.
17085 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
17087         * decimal.c, icall.c: allow disabling System.Decimal support.
17089 2004-12-09  Marek Safar <marek.safar@seznam.cz>
17091         * reflection.c: Add support for null attribute arguments.
17093 2004-12-09  Martin Baulig  <martin@ximian.com>
17095         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
17096         names to get rid of compiler warnings.
17098 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17100         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
17101         mono_marshal_load_type_info (). Fixes #69625.
17102         (mono_marshal_get_ptr_to_struct): Likewise.
17104 2004-12-08  Martin Baulig  <martin@ximian.com>
17106         * mono-debug.h: Bumped version number to 47.
17108         * mono-debug-debugger.c
17109         (mono_debugger_event_handler, mono_debugger_event): Take two
17110         guint64 arguments insteed of a gpointer and a guint32.  
17112 2004-12-08  Martin Baulig  <martin@ximian.com>
17114         * debug-mono-symfile.h
17115         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
17116         `address' to `native_offset'.
17118 2004-12-08  Martin Baulig  <martin@ximian.com>
17120         * class.c (mono_class_create_from_typespec): Only inflate if we
17121         either have `context->gclass' or `context->gmethod'.
17123 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17125         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
17127         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
17129         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
17131         * reflection.c (mono_assembly_get_object): Remove the workaround put
17132         in for the release.
17133         
17134         * appdomain.c: Use the corlib_internal field from MonoAssembly.
17136         * appdomain.c: Bump corlib version.
17138         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
17139         be visible in other appdomains.
17141 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
17143         * threads.c: Interlocked inc and dec for longs were messed up,
17144         use a KISS based impl for this. Fixes 70234
17146 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
17148         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
17150 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
17152         * icall.c: fix to follow policy not to allow struct
17153         arguments in icalls.
17155 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17157         * process.c: make the patch that handles spaces in file paths work
17158         on mono/windows too.
17160 2004-12-06  Martin Baulig  <martin@ximian.com>
17162         * class.c (mono_class_create_generic): Call
17163         mono_class_setup_supertypes() if we're dynamic.
17164         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
17166 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
17168         * object-internals.h: Add new fields to MonoThread.
17170         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17172         * icall.c threads-types.h threads.c: Add new icalls.
17174         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
17176         * object-internals.h (MonoReflectionAssembly): Sync object layout with
17177         managed side.
17179         * appdomain.c: Bump corlib version.
17181         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
17182         internal assemblies. Fixes #69181.
17184 2004-12-05  Martin Baulig  <martin@ximian.com>
17186         * class.c (mono_class_inflate_generic_signature): Make this a
17187         no-op if `context' is NULL or we don't have any type parameters;
17188         also copy `sentinelpos'.        
17190 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
17192         * image.c: Add unbox_wrapper_cache.
17194         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
17196         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
17197         function generator.
17198         
17199         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
17200         Fixes #70173.
17202         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
17203         
17204 2004-12-04  Martin Baulig  <martin@ximian.com>
17206         * loader.c (mono_method_get_signature_full): New public function;
17207         like mono_method_get_signature(), but with an additional
17208         `MonoGenericContext *' argument.
17210         * class.c (mono_class_inflate_generic_signature): Formerly known
17211         as inflate_generic_signature(); make this public.
17213 2004-12-04  Martin Baulig  <martin@ximian.com>
17215         * metadata.c
17216         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
17217         instead of a `MonoGenericContainer *'.  
17218         (mono_metadata_parse_array_full): Likewise.
17219         (mono_metadata_parse_signature_full): Likewise.
17220         (mono_metadata_parse_method_signature_full): Likewise.
17221         (mono_metadata_parse_generic_inst): Likewise.
17222         (mono_metadata_parse_generic_param): Likewise.
17223         (mono_metadata_parse_mh_full): Likewise.
17224         (mono_type_create_from_typespec_full): Likewise.
17226 2004-12-03  Martin Baulig  <martin@ximian.com>
17228         * class-internals.h (MonoGenericContainer): Replaced the
17229         `MonoGenericContext * pointer with a `MonoGenericContext'
17230         structure and made it the first element.
17232 2004-12-03  Martin Baulig  <martin@ximian.com>
17234         * class.c
17235         (inflate_generic_type): Set the `context->container' when creating
17236         a new MonoGenericContext.
17237         (mono_class_inflate_generic_method): Likewise.
17238         (mono_class_create_from_typespec): Just use `context->container'
17239         to get the container.
17241         * loader.c (method_from_methodspec): Set `context->parent' from
17242         `context->container' - and if that's a method container, use its
17243         parent.  Also set the `context->container' when creating a new
17244         MonoGenericContext.
17245         (mono_get_method_from_token): Use just `context->container' to get
17246         the container.
17248         * metadata.c (do_mono_metadata_parse_generic_class): Also set
17249         `gclass->context->container'.
17251         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
17252         the `context->container' when creating a new MonoGenericContext.
17254 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
17256         * reflection.c (compare_genericparam): Sort params with identical
17257         owner by their number. Fixes gen-111 on sparc.
17259 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
17261         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
17262         around the domain changes.
17264         * appdomain.c (mono_domain_unload): Handle the case when the thread
17265         calling Unload is itself being aborted during unloading. Fixes #70022.
17267         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
17269         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
17270         checkpoint_func as an icall so it gets a wrapper.
17271         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
17272         in the cross-appdomain wrappers too.
17274         * threads.c (mono_thread_has_appdomain_ref): Make this public.
17276         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
17278         * reflection.c: Fix some memory leaks.
17279         
17280 2004-12-02  Martin Baulig  <martin@ximian.com>
17282         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
17284         * metadata.c (generic_class_cache): New static hashtable.
17285         (mono_metadata_lookup_generic_class): New public method.
17287 2004-12-02  Martin Baulig  <martin@ximian.com>
17289         * class.c (mono_class_create_from_typedef): Call
17290         mono_class_setup_parent() and mono_class_create_mono_type() before
17291         parsing the interfaces.
17293 2004-12-02  Martin Baulig  <martin@ximian.com>
17295         * metadata.c (generic_inst_cache): New static hashtable.
17296         (mono_metadata_lookup_generic_inst): New public function.
17297         (mono_metadata_inflate_generic_inst): New public function.
17298         (mono_metadata_parse_generic_inst): New public function.
17299         (do_mono_metadata_parse_generic_class): Use the new
17300         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
17301         since this'll also use the cache.
17303         * reflection.c (mono_reflection_bind_generic_method_parameters):
17304         Use mono_metadata_lookup_generic_inst() to use the new cache.
17306         * class.c (inflate_mono_type): Use
17307         mono_metadata_inflate_generic_inst() to inflate a generic
17308         instance; this'll also use the new cache.
17310         * loader.c (method_from_methodspec): Use
17311         mono_metadata_parse_generic_inst() and
17312         mono_metadata_inflate_generic_inst() rather than parsing it
17313         manually, so we can use the new cache.
17315 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
17317         * threads.c (wait_for_tids): Do not incorrectly free threads when 
17318         the wait times out.
17320 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17322         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
17323         iter->args based on whether parameters are passed in registers (i.e.
17324         MONO_ARCH_REGPARMS is defined)
17326 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
17328         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
17329         the exception message. Fixes #70070.
17330         (method_from_methodspec): Fix warnings.
17332 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17334         * process.c: (complete_path) return the path quoted
17336 2004-12-01  Martin Baulig  <martin@ximian.com>
17338         * class-internals.h (MonoGenericInst): New structure.
17339         (MonoGenericClass): Replaced `type_argc', `type_argv' and
17340         `is_open' with `MonoGenericInst *inst'.
17341         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
17342         `is_open' with `MonoGenericInst *inst'.
17344 2004-11-30  Martin Baulig  <martin@ximian.com>
17346         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
17348         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
17349         to `generic_class_cache'.
17351         * metadata.c
17352         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
17353         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
17354         (mono_generic_inst_is_valuetype): Renamed to
17355         mono_generic_class_is_valuetype().
17357         * class-internals.h
17358         (MonoGenericInst): Renamed to MonoGenericClass.
17359         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
17360         (MonoClass): Renamed `generic_inst' to `generic_class'.
17361         (MonoGenericContext): Renamed `ginst' to `gclass'.
17363         * object-internals.h
17364         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
17366         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
17367         mono_reflection_generic_class_initialize().
17369         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
17370         now known as "System.Reflection.MonoGenericClass".
17371         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
17373 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
17375         * class-internals.h: Added a flag field to MonoClass to cache the
17376         declarative security attributes actions associated with the class.
17377         * domain-internals.h: Added booleans to MonoJitInfo to cache the
17378         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
17379         applicable to the JITted method.
17380         * reflection.c|h: Added functions to extract (as flags) which security
17381         actions are available (declaratively) for a method, class or assembly.
17382         * metadata.c|h: Added functions to search the declarative security
17383         table in the metadata.
17384         
17385 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
17387         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
17388         EXPORTEDTYPES are already in the class name cache, so there is no
17389         need to add extra code here to look at them. Just removes a bit of
17390         cruft.
17392         (ves_icall_System_Environment_get_TickCount): No need for #if
17393         WINDOWS. We already have the code in io-layer.
17395 2004-11-28  Martin Baulig  <martin@ximian.com>
17397         * loader.c
17398         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
17399         Fixes gen-112.cs.
17401 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
17403         * assembly.c (do_mono_assembly_open): Instead of having a
17404         conditional WITH_BUNDLE, incorporate support for bundles here, by
17405         having a global `bundles' variable holding a pointer to the actual
17406         bundles. 
17408         (mono_register_bundled_assemblies): New API call used by the
17409         bundle code. 
17411         See mkbundle.1 for details.
17412         
17413 2004-11-27  Martin Baulig  <martin@ximian.com>
17415         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
17416         the vtable for generic methods.
17418 2004-11-26  Martin Baulig  <martin@ximian.com>
17420         * metadata.c
17421         (mono_metadata_generic_method_hash): New public function.
17422         (mono_metadata_generic_method_equal): Likewise.
17424         * class-internals.h
17425         (MonoGenericContainer): Added `GHashTable *method_hash'.
17427         * reflection.c (ReflectionMethodBuilder): Added
17428         `MonoGenericContainer *generic_container'.
17429         (reflection_methodbuilder_to_mono_method): Don't create a new
17430         MonoGenericContainer each time we're called.
17431         (mono_reflection_bind_generic_method_parameters): Use
17432         `container->method_hash' to cache the results so we don't create a
17433         different method if we're called several times with the same
17434         arguments.
17436         * loader.c (method_from_methodspec): Use the new
17437         `container->method_hash' here, too.
17439 2004-11-26  Martin Baulig  <martin@ximian.com>
17441         * class.c (inflate_generic_signature): Correctly compute
17442         `res->has_type_parameters'.
17443         (mono_class_vtable): Use the `has_type_parameters' flag to
17444         determine whether we're a generic method.
17446         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
17448 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
17450         * object.c (mono_runtime_run_main): Fix a small memory leak.
17452 2004-11-25  Martin Baulig  <martin@ximian.com>
17454         * class.c (set_generic_param_owner): Fixed the loop.
17456 2004-11-25  Martin Baulig  <martin@ximian.com>
17458         * object.c (mono_class_vtable): Don't create any JIT wrappers for
17459         generic methods.
17461 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
17463         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
17464         names. Fixes #69787.
17466 2004-11-24  Martin Baulig  <martin@ximian.com>
17468         * class.c (mono_class_create_generic_2): If we don't have a
17469         `ginst->parent', inflate `gklass->parent' to get our parent.
17471 2004-11-24  Martin Baulig  <martin@ximian.com>
17473         * reflection.c (compare_genericparam): Correctly sort the
17474         GenericParam table; fixes #69779.
17476 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
17478         * reflection.c: When writing a PE file, don't create a huge
17479         buffer in memory. Just write the arrays we have to the file.
17480         This reduces memory usage.
17482         * metadata-internals.h: MonoDynamicStream pefile is no longer used
17483         globally.
17485 2004-11-17  Martin Baulig  <martin@ximian.com>
17487         * class.c (mono_class_init): Don't setup `class->parent' for
17488         dynamic instances; moved this to mono_class_generic_2().
17489         (mono_class_create_generic): Also set `klass->inited' for dynamic
17490         generic instances.
17491         (mono_class_create_generic_2): Don't do anything for dynamic
17492         generic instances.  Set `klass->parent' here and also call
17493         mono_class_setup_parent() here. 
17495         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
17496         `MonoType *parent' argument; set `ginst->parent' before calling
17497         mono_class_create_generic_2(), so we set the correct parent.
17499 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
17501         * reflection.c: allow getting attributes from ModuleBuilder
17502         (used by ikvm).
17504 2004-11-17  Martin Baulig  <martin@ximian.com>
17506         * class.c (mono_class_create_from_typedef): If a type parameter is
17507         inherited from an outer class, set its owner to that class.
17509 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
17511         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
17512           for (int*) written size. This fixes bug #69592.
17514 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
17516         * icall.c: Added IsAuthenticodePresnet internal call.
17517         * image.c|h: New function that check a MonoImage for an Authenticode
17518         signature in the certificate PE data directory.
17519         * security.c|h: New internal call to ask the runtime if an 
17520         Authenticode signature seems referenced in the PE header.
17522 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
17524         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
17526         * reflection.c (mono_image_create_pefile): Free the assembly streams
17527         after writing out the assembly file.
17529         * object.c (mono_runtime_run_main): Fix small memory leak.
17531         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
17532         property access modifiers. Fixes #69389.
17534 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17536         * domain.c, object.c, object-internals.h, domain-internals.h,
17537         object.h, marshal.c: keep dynamic code info per domain.
17539 2004-11-15  Martin Baulig  <martin@ximian.com>
17541         * class.c (mono_type_get_name_recurse): Put type arguments in
17542         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
17543         see bug #68387.
17545 2004-11-15  Martin Baulig  <martin@ximian.com>
17547         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
17548         (mono_class_setup_vtable): When computing `the_cname' for a
17549         generic instance, don't include the namespace since we'd otherwise
17550         add it twice.
17552 2004-11-15  Martin Baulig  <martin@ximian.com>
17554         * class.c (mono_class_create_generic): Changed return type to void.
17555         (mono_class_create_generic_2): New public function; setup
17556         `class->method', `class->field' and `class->interfaces' here
17557         instead of in mono_class_init().
17559         * class.h (mono_class_create_generic): Moved to class-internals.h.
17561 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
17563         * reflection.c (mono_image_create_pefile): take a file HANDLE.
17564         rather than writing to memory, write to this file. Right now,
17565         we are just writting into a buffer, and copying that. However
17566         we can avoid the buffer later.
17568         (mono_dynamic_stream_reset): new function
17570         * icall.c, object-internals.h: update for the above.
17572 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
17574         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
17575         have been using gc'd memory. First it is slower, unlikely
17576         the comment in the source code said, secondly, it increases
17577         our footprint to do it in the gc.
17579         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
17580         the method so that it does not have to copy to managed code.
17582 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
17584         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
17586 2004-11-12  Martin Baulig  <martin@localhost>
17588         * reflection.c (mono_image_create_token): Allow generic method
17589         definitions here, since they may appear in an `.override'; see
17590         gen-98/gen-99 for an example.
17592 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
17594         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
17595         #69365.
17597         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
17598         descriptive.
17600 2004-11-11  Martin Baulig  <martin@ximian.com>
17602         * class.c (mono_class_setup_vtable): In an explicit interface
17603         implementation, the method name now includes the arity.
17605 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
17607         * object.c (mono_array_full_copy): Fix warning.
17609 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
17611         * appdomain.c: Removed look_for_method_by_name(). Use the new method
17612         mono_class_get_method_from_name() instead.
17613         
17614         * class-internals.h: Added two new types of wrappers. 
17615         Added MonoRemotingTarget enum. Added new trampoline function type, which
17616         takes an additional MonoRemotingTarget value as parameter, so it is
17617         possible to request a trampoline for a specific target.
17618         
17619         * class.c: Added new mono_class_get_method_from_name() method.
17620         
17621         * class.h: In MonoRemoteClass, we can have now to vtables, one for
17622         general remoting sinks and one specific for cross domain calls.
17623         
17624         * debug-helpers.c: Added new wrapper names.
17625         
17626         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
17627         of a remote class.
17628         
17629         * image.c: Porperly delete value objects form the remoting invoke hashtable.
17630         
17631         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
17632         with several other methods (mono_marshal_get_xappdomain_dispatch,
17633         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
17634         and others) can generate a fast remoting wrapper for cross domain calls.
17635         More information can be found in docs/remoting.
17636         Other changes: Removed mono_find_method_by_name, and used
17637         mono_class_get_method_from_name instead.
17638         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
17639         is stored in the remoting invoke hashtable.
17640         
17641         * marshal.h: published the new method for getting the xdomain wrapper,
17642         and also added a method for getting the adequate wrapper for a given
17643         method and target.
17644         
17645         * object-internals.h, object.c: Added a couple of methods for capying and
17646         cloning arrays.
17647         Modified mono_install_remoting_trampoline, which takes the new remoting
17648         trampoline that has a remoting target as parameter.
17649         mono_class_proxy_vtable now also takes a remoting target as parameter, and
17650         will return the most suitable vtable for the target.
17651         Added mono_remote_class_vtable, which returns the vtable of a remote class
17652         (which can be the normal remoting vtable or the xdomain vtable).
17653         
17654         * threads.c: the xdomain invoke and dispatch wrappers must also be
17655         protected against interruptions.
17657 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17659         * icall.c: use memmove in BlockCopyInternal when the source and
17660         destination arrays are the same.
17662 2004-11-09  Martin Baulig  <martin@ximian.com>
17664         * class-internals.h (MonoGenericContainer): Removed `method' and
17665         `signature', replaced them with `is_method' and `is_signature'
17666         flags.  Added `context'.
17668         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
17669         instead of a `MonoGenericContainer *'.
17671         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
17672         for dynamic type parameters.
17673         (mono_metadata_load_generic_params): Setup `container->context'.
17675         * reflection.c (mono_reflection_setup_generic_class): Setup
17676         `tb->generic_container->context'.
17677         (do_mono_reflection_bind_generic_parameters): Use
17678         mono_class_inflate_generic_type() to correctly inflate types,
17679         rather than using our own hack just for MONO_TYPE_VAR.
17681 2004-11-09  Martin Baulig  <martin@ximian.com>
17683         * class.c (mono_class_inflate_generic_method): Small fix; don't
17684         crash here.
17686         * icall.c
17687         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
17688         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
17689         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
17690         (ves_icall_Type_BindGenericParameters): Likewise.
17691         (ves_icall_Type_get_IsGenericInstance): Likewise.
17692         (ves_icall_Type_GetGenericParameterPosition): Likewise.
17693         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
17694         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
17695         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
17697 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
17699         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
17700         assembly versions and public key tokens. Fixes #69113.
17702 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
17704         * metadata.c: fix bug introduced with the type cache changes
17705         on 2004-11-06.
17707 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
17709         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
17710         the MonoClass pointer instead of the token in exception clauses.
17711         * reflection.c: updates for the above and make the code not depend
17712         on the structure of MonoExceptionClause.
17714 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
17716         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
17717         Add support for dynamic assemblies. Fixes #69114.
17719         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
17721 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
17723         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
17724         since most only those methods use it. the code member of
17725         MonoMethodPInvoke was dead, so that can be removed too. Also,
17726         remove inline_count (again, not used), and move slot so that it
17727         can share bits with some other flags. This saves 8 bytes in the
17728         structure and gives us about 50 kb back for mcs helloworld.cs
17730         * *.[ch]: Do naming changes for the above.
17732         * loader.c (mono_method_get_header): Lazily init the header
17733         on first access.
17734         (mono_get_method_from_token): don't init the header here
17735         (mono_free_method): the header may never be allocated
17737         Overall, this saves 150 kb of unmanaged allocations
17738         for mcs helloworld.cs. That accounts for 10% of the unmanaged
17739         memory at runtime.
17740         
17741         * loader.c, loader.h (mono_method_get_header): new accessor.
17743         * *.[ch]: use the above method. Prepares us to lazily load
17744         the header.
17746         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
17747         three warnings, which are actual bugs (see 69206).
17749         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
17750         unused. Saves a cool 4 bytes / method.
17752 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
17754         * metadata.c (builtin_types): Add types for System.Object here.
17755         (mono_metadata_parse_type_full): Cache MonoType*'s that are
17756         for a class or valuetype from klass->this_arg or klass->byval_arg.
17758         On mcs for a hello world, this gets us down from 21836 MonoType's
17759         to 14560.
17761         (mono_metadata_free_type): Account for the above change.
17763 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
17765         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
17766         exception instead of asserting if name is null.
17767         (ves_icall_System_AppDomain_GetData): Ditto.
17769 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
17771         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
17772         EnumBuilder.
17774         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
17775         Return NULL when the domain does not have entry_assembly set.
17777         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
17778         Add a 'resource_modules' argument.
17779         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
17781         * reflection.c (mono_reflection_create_runtime_class): Move setting
17782         of wastypebuilder here, so mono_get_type_object () returns a MonoType
17783         for enums too.
17785         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
17786         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
17787         Throw an ArgumentNullException if 'ptr' is null.
17789         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
17790         assemblies here. Fixes #69020.
17792 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
17794         * reflection.c (build_compressed_metadata): Fix the previous patch for
17795         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
17796         the stack.
17798 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
17800         * assembly.c (mono_assembly_names_equal): Allow a match if one of
17801         the cultures is false. Fixes #69090.
17803         * reflection.c (build_compressed_metadata): Fix invalid memory read 
17804         detected by valgrind.
17805         
17806         * reflection.c (mono_reflection_get_type): Avoid triggering a 
17807         TypeResolve multiple times for the same type. Fixes #65577.
17809 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
17811         * marshal.c: Avoid using ldftn to call managed functions. It is
17812         much slower than just a call.
17814         * reflection.c (mono_module_get_object): free the basename we
17815         allocate here from glib.
17816         
17817         * reflection.c (ensure_runtime_vtable): make sure to free
17818         overrides.  Also, we were allocating an array of MonoMethod not an
17819         array of MonoMethod*.
17821         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
17823         * image.c (mono_image_close): free image->guid here.
17825 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
17827         * reflection.c: Fix some spec conformance issues with the PE file
17828         structures so mcs compiled apps run on the Net 2.0 beta.
17830 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
17832         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
17833         Implement this. Fixes #67264.
17835         * debug-helpers.h debug-helpers.c marshal.c: Move 
17836         mono_find_method_by_name to debug-helpers.c.
17838 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
17840         * object.c (mono_release_type_locks): type_initialization_hash is
17841         a GHashTable.
17843         * reflection.c object.c object-internals.h: Fix warnings.
17845         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
17846         without accessors. Fixes #61561.
17848         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
17849         application base from the root domain if not set. Fixes #65641.
17850         (mono_runtime_init): Fix warning.
17852 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17854         * appdomain.c: call mono_thread_pool_init.
17855         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
17856         of worker threads based on the number of CPUs and the environment
17857         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
17858         for non-windows (windows) systems.
17860 2004-10-27  Chris Toshok  <toshok@ximian.com>
17862         * mono-debug-debugger.c (write_class): don't call mono_class_init
17863         here, as even with the check for (!klass->init_pending), we get
17864         into a situation where we're hitting cycles in class
17865         initialization.  Fixes #68816.
17867 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
17869         * image.c: Avoid overwriting values in the loaded_images_hash when an
17870         assembly is loaded multiple times. Fixes #61152.
17872         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
17873         so multiple satellite assemblies for the same name can be loaded.
17874         Fixes #68259.
17876         * mono_domain_assembly_preload: Actually return the loaded assembly, 
17877         not NULL.
17879         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
17880         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
17882         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
17883         pending finalizers are not invoked after the appdomain has been 
17884         unloaded. Fixes #67862.
17886 2004-10-22  Martin Baulig  <martin@ximian.com>
17888         * mono-debug-debugger.c
17889         (mono_debugger_runtime_invoke): Don't box valuetypes.
17891 2004-10-22  Chris Toshok  <toshok@ximian.com>
17893         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
17894         don't hide private methods.
17896 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
17898         * icall.c: Allows the runtime to "share" (when known) the public key
17899         token of an assembly. This avoid the need to recalculate the token 
17900         (from the public key) in managed code.
17902 2004-10-21  Chris Toshok  <toshok@ximian.com>
17904         * debug-helpers.c (append_class_name): argh, revert last patch.
17905         
17906 2004-10-21  Chris Toshok  <toshok@ximian.com>
17908         * debug-helpers.c (append_class_name): use '+' as the delimiter,
17909         not '/', so that it matches what the debugger uses to look up
17910         methods.
17912 2004-10-21  Martin Baulig  <martin@ximian.com>
17914         * mono-debug-debugger.c (mono_debugger_throw_exception): New
17915         public method; this is called each time an exception is thrown and
17916         allows the debugger to use exception catch points.
17918 2004-10-21  Martin Baulig  <martin@ximian.com>
17920         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
17921         the stack pointer and the exception object in some struct and pass
17922         that to the debugger.
17924 2004-10-21  Chris Toshok  <toshok@ximian.com>
17926         * mono-debug-debugger.c (do_write_class): add instance/static
17927         event support.  We don't expose "raise" or "other" yet.
17928         (event_is_static): new method.
17930 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
17932         * mono-debug-debugger.c
17933         (mono_debugger_handle_exception): Remove
17934         bogus return value for fussy compilers.
17936 2004-10-20  Martin Baulig  <martin@ximian.com>
17938         * mono-debug-debugger.c
17939         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
17940         (mono_debugger_handled_exception): Likewise.
17942 2004-10-20  Martin Baulig  <martin@ximian.com>
17944         * mono-debug-debugger.h (MonoDebuggerEvent): Added
17945         MONO_DEBUGGER_EVENT_EXCEPTION.
17947         * mono-debug-debugger.c (mono_debugger_handle_exception): New
17948         public function to send the debugger a notification for an
17949         exception and inform it about a catch/finally clause.
17951 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
17953         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
17954         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
17955         fix 2.95 build. 
17957         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
17959 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
17961         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
17962         marshalled as [In,Out]. Fixes #58325.
17964 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
17966         * reflection.c (mono_method_body_get_object): Implement some fields.
17968 2004-10-12  Martin Baulig  <martin@ximian.com>
17970         * reflection.c (mono_reflection_bind_generic_parameters): Small
17971         fix, correctly retrieve our parent from a generic instance.
17973 2004-10-12  Martin Baulig  <martin@ximian.com>
17975         * metadata.c (mono_metadata_generic_param_equal): We always have
17976         an owner.
17978         * class.c
17979         (mono_class_from_generic_parameter): We need to have an owner.
17980         (my_mono_class_from_generic_parameter): Likewise.
17982         * reflection.c (mono_reflection_setup_generic_class): Renamed to
17983         mono_reflection_create_generic_class() and added a new
17984         mono_reflection_setup_generic_class().  
17985         (mono_reflection_initialize_generic_param): If we're a nested
17986         generic type and inherited from the containing class, set our
17987         owner to the outer class.
17989 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
17991         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
17993         * reflection.c (mono_method_body_get_object): New function to create
17994         a MethodBody object.
17996         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
17998 2004-10-11  Martin Baulig  <martin@ximian.com>
18000         * metadata.c (_mono_metadata_type_equal): Renamed to
18001         do_mono_metadata_type_equal() and made static.
18003 2004-10-11  Martin Baulig  <martin@ximian.com>
18005         * appdomain.c: Bump corlib version number to 28.
18007 2004-10-10  Martin Baulig  <martin@ximian.com>
18009         * class-internals.h
18010         (MonoGenericInst): Added `MonoGenericContainer *container'.
18011         (MonoGenericMethod): Likewise.
18012         (MonoGenericContext): Likewise.
18013         (MonoGenericParam): Added `MonoGenericContainer *owner'.
18015         * metadata.c
18016         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
18017         (do_mono_metadata_parse_generic_inst): Likewise.
18018         (mono_metadata_parse_type_full): New public method.  This is the actual
18019         mono_metadata_parse_type() implementation - with an additional
18020         `MonoGenericContainer *' argument.
18021         (mono_metadata_parse_array_full): Likewise.
18022         (mono_metadata_parse_signature_full): Likewise.
18023         (mono_metadata_parse_method_signature_full): Likewise.
18024         (mono_metadata_parse_mh_full): Likewise.
18025         (mono_type_create_from_typespec): Likewise.
18026         (mono_metadata_interfaces_from_typedef_full): New public method;
18027         this is similar to the other _full() methods, but we take a
18028         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
18029         (mono_metadata_parse_generic_param): Take an additional
18030         `MonoGenericContainer *' argument and lookup the MonoGenericParam
18031         from that container.
18032         (mono_metadata_generic_param_equal): New static method to compare
18033         two type parameters.
18034         (_mono_metadata_type_equal): New static method; takes an
18035         additional `gboolean signature_only' argument - if true, we don't
18036         compare the owners of generic parameters.
18037         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
18038         with a TRUE argument - do a signature-only comparision.
18040         * loader.c: Use the new _full() methods and pass the
18041         MonoGenericContainer to them.
18043         * object-internals.h (MonoReflectionTypeBuilder): Added
18044         `MonoGenericContainer *generic_container' field.
18045         (MonoReflectionMethodBuilder): Likewise.
18047 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
18049         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
18050         case initial images of dynamic assemblies.
18052         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
18054         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
18056         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
18057         length of event->other array.
18058         (typebuilder_setup_events): Ditto.
18060         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
18061         'assembly_by_name' and add an 'assemblies' list.
18063         * assembly.h assembly.c: Add a new search hook for determining whenever
18064         an assembly is already loaded. Use this instead of searching in the
18065         loaded_assemblies list.
18067         * domain.c appdomain.c: Implement the new search hook so loaded 
18068         assemblies are now scoped by appdomain. Fixes #67727.
18070 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
18072         * threads.c (mono_thread_attach): Initialize synch_lock field so
18073         mono_thread_detach works again.
18075         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
18076         'lib' too. Fixes #63130.
18078 2004-10-06  Jackson Harper  <jackson@ximian.com>
18080         * culture-info-tables.h: regenerated.
18082 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
18084         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
18085         implemented by other interfaces in the result. Fixes #65764.
18086         
18087         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
18088         Handle unloadable modules without crashing.
18090         * image.c (load_modules): Revert the previous patch since modules must
18091         have a fixed index inside the array.
18092         
18093         * image.c (load_modules): Don't include native modules in the modules
18094         array.
18096 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
18098         * reflection.h: Add param_defaults field.
18100         * reflection.c: Add support for parameter defaults in dynamic methods.
18101         Fixes #64595.
18103         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
18104         an empty string when a type has no namespace. Fixes #64230.
18106 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
18108         * tabledefs.h: Added "internal" security actions to support non-CAS
18109         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
18110         Note: they do not seems to be used anymore in 2.0 (new metadata format)
18112 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
18114         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
18115         constructor of abstract class. Fixes #61689.
18117 2004-10-04  Martin Baulig  <martin@ximian.com>
18119         * class-internals.h (MonoGenericContainer): New type.
18120         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
18121         `MonoGenericContainer *generic_container'.
18122         (MonoClass): Replaced `gen_params' and `num_gen_params' with
18123         `MonoGenericContainer *generic_container'.
18125         * metadata.c (mono_metadata_load_generic_params): Return a
18126         `MonoGenericContainer *' instead of a `MonoGenericParam *';
18127         removed the `num' argument.
18129 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
18131         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
18132         for dynamic images.
18134         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
18135         machine fields.
18137         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
18139         * reflection.c: Save pe_kind and machine values into the generated
18140         image file.
18142         * appdomain.c: Bump corlib version number.
18144         * object-internals.h: Reorganize layout of LocalBuilder.
18146         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
18147         New helper function.
18149         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
18150         created MonoType for dynamic types. Fixes #66180.
18152 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
18154         * threadpool.c: the ares hashtable needs a critical section around it.
18155         this prevents some nasty segfaults
18157 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
18159         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
18160         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
18161         bug 67324).
18162         
18163 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
18165         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
18166         
18167 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
18169         * image.c: Always canonicalize image file names, to avoid loading
18170         the same assembly twice when referenced using a relative path.
18172 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
18174         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
18176         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
18178         * marshal.c: Fix warnings.
18180 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
18182         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
18183         attempting to marshal the delegate_trampoline as the method_addr.
18184         This patch has a static hashtable of marshalled delegates so that 
18185         we can map delegate_trampoline addresses back to delegates.  This
18186         allows a delegate passed to managed code to be passed back into native
18187         code.  Fixes #67039
18189 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
18191         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
18193         * reflection.c (method_encode_code): Align method headers properly.
18194         Fixes #66025.
18196 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
18198         * marshal.c: In the runtime invoke wrapper, reset the abort
18199         exception if it is cached. This avoids the automatic rethrowal of 
18200         the exception after the catch of the wrapper. Also check for pending
18201         interruptions before calling the managed method. This is done using
18202         the new method emit_thread_force_interrupt_checkpoint, since the
18203         normal checkpoint method is ignored when running the invoke wrapper.
18204         * object.c: If the abort exception is rethrown, set the abort_exc
18205         field of the thread, so it will be rethrown aftere every catch.
18206         * threadpool.c: Only run an interruption checkpoint if what has been
18207         requested is a stop of the thread (aborts will be ignored).
18208         * threads.c: By default, a thread will now never be interrumped while
18209         running the runtime invoke wrapper (this ensures that runtime_invoke
18210         will always return to the caller if an exception pointer is provided).
18211         There is a new special method mono_thread_force_interruption_checkpoint()
18212         to force an interruption checkpoint even if running a protected
18213         wrapper, which is used by the same runtime invoke wrapper to do a check
18214         at a safe point.
18216 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
18218         * object.c, object-internals.h: Implemented mono_release_type_locks,
18219         which releases the cctor locks held by a thread.
18220         * threads.c, threads.h: In thread_cleanup, release cctor locks held
18221         by a thread. Added mono_thread_exit() method to be used to safely stop
18222         a thread.
18224 2004-09-28  Raja R Harinath  <rharinath@novell.com>
18226         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
18227         Move null check before dereference.  Avoid indexing beyond the end
18228         of the 'modules' array.
18230 2004-09-28  Raja R Harinath  <rharinath@novell.com>
18232         * metadata-internals.h (MonoImage): Add module_count field.
18233         * image.c (load_modules): Set image->module_count.
18234         (mono_image_load_file_for_image): Use image->module_count.
18235         * reflection.c (mono_image_load_module): Append to image->modules array 
18236         of dynamic assembly.
18237         (mono_module_get_object): Fix loop to actually increment index.
18238         Use image->module_count.
18239         * assembly.c (mono_assembly_load_references): Use image->module_count.
18240         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
18241         Likewise.
18243 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
18245         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
18246         Avoid assert on generic types.
18248 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
18250         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
18252         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
18254         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
18255         function to convert a MarshalSpec structure to its managed counterpart.
18257         * reflection.c: Fix warnings.
18258         
18259         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
18260         field.
18262         * icall.c (mono_create_icall_signature): Fix build.
18264 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
18266         * icall.c: Add MakePointType icall.
18268         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
18269         warnings.
18271 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18273         * threadpool.c: reuse allocated slots in the queue.
18275 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
18277         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
18279         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
18281         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
18282         previous change.
18284         * tabledefs.h: Add constants for pinvoke attributes BestFit and
18285         ThrowOnUnmappableChar.
18287         * icall.c (ves_icall_Type_GetPacking): New icall.
18289 2004-09-24  Martin Baulig  <martin@ximian.com>
18291         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
18293 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18295         * appdomain.c:
18296         (mono_domain_set): allow setting a domain that is being unloaded.
18297         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
18298         being unloaded.
18300 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
18302         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
18303         the GetCustomAttributes icall.
18305 2004-09-23  Martin Baulig  <martin@ximian.com>
18307         * object-internals.h (MonoReflectionGenericParam): Replaced
18308         'has_ctor_constraint', `has_reference_type' and `has_value_type'
18309         with `guint32 attrs'.
18311 2004-09-23  Martin Baulig  <martin@ximian.com>
18313         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
18315 2004-09-23  Martin Baulig  <martin@ximian.com>
18317         * object-internals.h (GenericParameterAttributes): New enum.
18319 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
18321         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
18322         
18323         * class.c (init_events): Fill out event->other field.
18325         * class.c: Fix warnings.
18327         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
18329 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
18331         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
18332         walk which doesn't supply the IL offset.
18334 2004-09-22  Martin Baulig  <martin@ximian.com>
18336         * reflection.c (mono_reflection_setup_internal_class): If we're
18337         System.ValueType, System.Object or System.Enum, set
18338         `klass->instance_size' and create the vtable.
18339         (mono_reflection_create_internal_class): If we're an enum type,
18340         get the base class from our current corlib.
18342 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
18344         * reflection.h (MonoResolveTokenError): New type.
18346         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
18347         icall.
18349         * icall.c: Add an 'error' argument to the ResolveToken icalls.
18351 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
18353         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
18354         Support also calling constructors, but only for already allocated objects.
18356 2004-09-17  Geoff Norton <gnorton@customerdna.com>
18358         * reflection.c (type_get_qualified_name): If the klass is null
18359         return the typename to avoid a NullRefEx.
18360         (encode_cattr_value): Get the qualified name of the boxed type,
18361         not the underlying enumtype.  Fixes #62984.
18363 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
18365         * marshal.c: Fix problems with previous checkin.
18367 2004-09-21    <vargaz@freemail.hu>
18369         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
18370         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
18372         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
18374 2004-09-21  Geoff Norton <gnorton@customerdna.com>
18376         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
18377         should only return a type for pointers, arrays, and passbyref types.
18378         Fixes bug #63841.
18380 2004-09-21  Martin Baulig  <martin@ximian.com>
18382         * domain.c (mono_debugger_check_runtime_version): New public
18383         function.
18385         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
18387 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
18389         * reflection.c: Added missing sort to the declarative security 
18390         attributes table. MS implementation stops seeing the attributes if the
18391         token number regress in the table (as shown by ildasm and permview).
18393 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
18395         * object-internals.h (MonoReflectionModule): Add 'token' field.
18396         
18397         * reflection.c (mono_reflection_get_token): Add support for Module
18398         and Assembly.
18399         (mono_module_get_object): Set 'token' field.
18400         (mono_module_file_get_object): Set 'token' field.
18402         * icall.c: Add new Assembly and Module icalls.
18404         * appdomain.c: Bump corlib version.
18406 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
18408         * loader.h loader.c class.h class.c: Add helper functions for obtaining
18409         tokens of metadata objects.
18411         * reflection.h reflection.c (mono_reflection_get_token): New function
18412         to obtain the token of a metadata object.
18414         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
18416 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
18418         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
18419         
18420         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
18422 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
18424         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
18425         * object-internals.h: Added 3 MonoArray* members to MonoReflection
18426         AssemblyBuilder to access the permissions set in the class lib.
18427         * reflection.c: Added security attributes encoding step in 
18428         mono_image_build_metadata.
18429         * tabledefs.h: Added new security actions defined in 2.0:
18430         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
18432 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
18434         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
18435         macro parameter.
18437 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
18439         * locales.c: nullify the ICU_collator member of CompareInfo when it is
18440           finalized. There where random SIGSEVs at program termination, when
18441           an object being finalized was trying to do a string comparison and
18442           the current culture was already finalized.
18444 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18446         * threads.c: call thread_cleanup before finishing the thread if we get
18447         there.
18449 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
18451         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
18452         assemblies from the parent. Fixes #65665.
18454 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
18456         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
18457         modifiers.
18459 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
18461         * reflection.h: add prototype for mono_get_dbnull_object
18462         * reflection.c: add prototypes for get_default_param_value_blobs 
18463         and mono_get_object_from_blob for fussier compilers
18465 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
18467         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
18468         false deadlock checks in class initialization.
18470 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
18472         * image.c (mono_image_addref): Fix comment.
18474         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
18475         possible.
18477 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
18479         * reflection.c (mono_param_get_objects): Modified to return
18480         ParameterInfo.DefaultValue object.
18482         (get_default_param_value_blobs):
18483         (mono_get_object_from_blob):
18484         (mono_get_dbnull_object): New helper routines. 
18486         * object.c (mono_get_constant_value_from_blob): New helper routine
18487         carved out from get_default_field_value ()
18489         * object-internals.h (mono_get_constant_value_from_blob): Added
18490         function declaration.
18492 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
18494         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
18495         referenced assemblies. Fixes #62135.
18497         * exception.h exception.c (mono_get_exception_file_not_found2): New
18498         helper function.
18500 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
18502         * class.h class.c: Add mono_type_get_underlying_type ().
18504 2004-09-09  Geoff Norton <gnorton@customerndna.com>
18506         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
18507         Fix GetTypes() to support dynamically created assemblies.
18509 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
18511         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
18512         
18513         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
18514         previous patch.
18516         * reflection.h reflection.c loader.c: Allow dynamic construction of
18517         pinvoke methods. Fixes #65571.
18518         
18519         * reflection.c (mono_reflection_get_type): Revert previous change since
18520         it causes regressions.
18522 2004-09-08  Martin Baulig  <martin@ximian.com>
18524         * class.c (class_compute_field_layout): Don't call
18525         mono_class_layout_fields() for open generic instances.
18527 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
18528         * threads.c appdomain.c: fix typo in GC macro
18530 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18532         * threads.c: don't call mono_thread_detach() in start_wrapper(),
18533         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
18535 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
18537         * image.c (mono_image_close): Applied patch from 
18538         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
18539         assembly is loaded multiple times from data.
18540         
18541         * image.c (mono_image_open): Fix warning.
18543 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
18545         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
18546         once. Fixes #58334.
18547         
18548         * reflection.c (mono_reflection_create_runtime_class): Initialize
18549         klass->nested_classes. Fixes #61224.
18551 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
18553         * threads.c: sched_yield() on exit, to allow threads to quit.
18555 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
18557         * object.c (mono_unhandled_exception): Remove leftover debug code.
18559 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
18561         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
18563 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
18565         * marshal.c (emit_marshal_array): Really null terminate string arrays.
18566         
18567         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
18569 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18571         * marshal.c (emit_marshal_array): Null terminate string arrays.
18572         
18573         * marshal.c (raise_auto_layout_exception): Fix warning.
18575         * reflection.c (mono_param_get_objects): Initialize the default value
18576         with DBNull.Value, not null. Fixes #62123.
18578 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
18580         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
18581         throw an exception with a cute explanation.
18583 2004-09-06  Dick Porter  <dick@ximian.com>
18585         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
18586         Close the new process's thread handle, as we don't use it.  The
18587         handle stays around forever otherwise.
18589 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18591         * object.c (arith_overflow): Fix warning.
18593         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
18594         calling conventions in method refs. Fixes #65352.
18596         * reflection.c: Fix warnings.
18598 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
18600         * icall.c: Add a new icall for Array.Clear
18602 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
18604         * object.c: When allocating an array, we have to throw
18605         an overflow exception if any of the lengths are < 0.
18607 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18609         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
18610         properly. Also move implementation of string array marshalling to 
18611         managed code. Fixes #42316.
18613 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18615         * assembly.c: provide more information when loading an assembly fails.
18617 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18619         * filewatcher.c: don't expect the development fam package to be
18620         installed.
18622 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
18624         * marshal.c: Make a copy of the signature cookie since it will be
18625         freed by the caller.
18626         
18627         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
18629         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
18631         * metadata.c (mono_metadata_free_marshal_spec): New function to free
18632         marshal specs.
18634         * marshal.c: More refactoring.
18635         
18636         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
18637         smaller functions.
18639 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
18641         * object.c: In mono_message_invoke, fill the output parameter array after
18642           calling the managed method (it was done before the call). This fixes
18643           bug #59299.
18645 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18647         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
18648         as well.
18650 2004-09-02  Martin Baulig  <martin@ximian.com>
18652         * class.c (mono_class_instance_size): Don't allow generic type
18653         definitions or open generic instances.
18654         (mono_class_array_element_size): If we're a value type, call
18655         mono_class_instance_size() on the original class.
18657         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
18658         handle generic instances.
18660         * mono-debug-debugger.c (write_type): Handle generic instances
18661         like classes.
18663 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18665         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
18666         the allocation request fails. Fixes #65089.
18668         * object.c (mono_runtime_free_method): Do not call mono_free_method.
18669         
18670         * object.c (mono_runtime_free_method): New function to free a dynamic
18671         method.
18673         * marshal.c (mono_delegate_free_ftnptr): New function to free the
18674         delegate trampoline.
18676         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
18677         with hasthis as dynamic,
18679         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
18681         * domain.c (mono_jit_info_table_remove): New function to remove an
18682         entry from the jit info table.
18684         * class-internals.h (MonoMethod): Add 'dynamic' field.
18686         * loader.c: Fix warnings.
18688 2004-09-01  Martin Baulig  <martin@ximian.com>
18690         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
18691         instead of mono_debugger_lock() because the latter one is a no-op
18692         unless running in the debugger.
18694 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
18696         * class.c (class_compute_field_layout): Classes with auto-layout or
18697         reference fields are not blittable.
18698         
18699 2004-09-01  Dick Porter  <dick@ximian.com>
18701         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
18702         mono_image_get_filename() to get the assembly location.
18704         * icall.c:
18705         * metadata.h: Fix compile warnings
18707 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
18709         * class.c (class_compute_field_layout): System.Object is blittable.
18711         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
18712         as in/out. Fixes #59909.
18714 2004-09-01  Martin Baulig  <martin@ximian.com>
18716         * metadata.h (MONO_TYPE_ISREFERENCE): Call
18717         mono_metadata_generic_inst_is_valuetype() if we're a generic
18718         instance to check whether our underlying type is a reference type.
18720 2004-09-01  Martin Baulig  <martin@ximian.com>
18722         * metadata.c (mono_type_size): If we're a generic instance, call
18723         mono_class_value_size() for value types.
18725 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
18727         * marshal.c: Implement more custom marshalling functionality. Fixes
18728         #64915.
18730 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
18732         * mono-debug.c, debug-mono-symfile.c: add some locking love.
18734 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
18736         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
18738         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
18740         * icall.c: Fix some warnings.
18742         * threads.c (abort_appdomain_thread): Fix unref errors.
18743         (mono_thread_current): Fix THREAD_DEBUG define.
18745 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
18747         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
18749         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
18751 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
18753         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
18754         string arrays.
18756 2004-08-28  Martin Baulig  <martin@ximian.com>
18758         * metadata.c
18759         (mono_metadata_generic_inst_is_valuetype): New public function.
18761         * metadata.h (MONO_TYPE_ISSTRUCT): Call
18762         mono_metadata_generic_inst_is_valuetype() if we're a generic
18763         instance to check whether our underlying type is a valuetype.
18765 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
18767         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
18768         #63768.
18770 2004-08-25  Martin Baulig  <martin@ximian.com>
18772         * loader.c (mono_get_method_from_token): Abstract methods can also
18773         be generic and thus have type parameters.
18775         * metadata-internals.h
18776         (MonoDynamicImage): Added `GPtrArray *gen_params'.
18778         * reflection.c (mono_image_get_generic_param_info): Don't create a
18779         metadata row, just add an entry to the `gen_params' array.
18780         (build_compressed_metadata): Sort the `gen_params' array and then
18781         actually create the metadata.
18783 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18785         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
18787 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
18789         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
18791 2004-08-24  Martin Baulig  <martin@ximian.com>
18793         * class.cs (mono_class_is_subclass_of): Like an interface, a
18794         generic instance also derives from System.Object.
18796 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
18798         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
18799         custom modifiers to be in any order. Fixes #61990.
18801 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
18803         * object.c: Register mono_object_new_fast icall.
18804         
18805         * object.c (mono_class_get_allocation_ftn): Return to calling
18806         mono_object_new_fast, since it seems faster to compute the object 
18807         size in unmanaged code than passing it as a parameter.
18809         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
18811         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
18812         this function with Boehm as the oom handler, so we don't have to check
18813         the result of GC_malloc.
18815         * object.c: Remove checks for oom.
18817         * object.h object.c (mono_class_get_allocation_ftn): New function to
18818         return the icall which can be used to allocate an instance of a given
18819         class. 
18821         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
18823         * class-internals.h: Add 'enabled' field.
18825 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
18827         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
18829 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
18830         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
18831         value 0x0010.
18833 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
18835         * appdomain.c: use the Tls function for appdomain too,
18836         at Zoltan's request. Actually return in mono_context_get
18838         * appdomain.c, profiler.c, threads.c: use __thread
18840 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
18842         * appdomain.c threads.c: Call GC_CreateThread on windows.
18844         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
18845         multiple libraries since this don't work on windows.
18847 2004-08-18  Martin Baulig  <martin@ximian.com>
18849         * class-internals.h
18850         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
18851         MonoMethodHeader.
18853         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
18854         MonoMethodNormal since we also need it for abstract and interface
18855         methods.
18857         * reflection.c
18858         (build_compressed_metadata): Sort the GenericParam table.
18859         (mono_image_create_token): Added `gboolean create_methodspec'
18860         argument; this is false when generating a MethodImpl token.
18861         (reflection_methodbuilder_to_mono_method): Abstract and interface
18862         methods may also have generic parameters.
18864 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
18866         * appdomain.c: thread local alloc
18868 2004-08-17  Martin Baulig  <martin@ximian.com>
18870         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
18872         * icall.c
18873         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
18874         argument.
18876         * class.c (mono_type_get_full_name): New public function.
18877         (mono_type_get_name): Don't include the type arguments.
18879 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
18881         * Makefile.am: Build static versions of libmetadata and libmonoruntime
18882         for inclusion into the mono executable.
18884 2004-08-16  Martin Baulig  <martin@ximian.com>
18886         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
18887         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
18889 2004-08-14  Martin Baulig  <martin@ximian.com>
18891         * class.c (dup_type): Also copy the `byref' field.
18893 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
18895         * reflection.c (create_dynamic_mono_image): Revert the last change 
18896         since it breaks bootstrap.
18898 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18900         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
18902         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
18903         not free them with g_free.
18905 2004-08-11  Martin Baulig  <martin@ximian.com>
18907         * reflection.c (mono_reflection_setup_internal_class): Also call
18908         mono_class_setup_mono_type() if we already have a `tb->type.type'.
18910 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
18912         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
18913         called during default (first) AppDomain creation. Keep track of
18914         Evidence when loading assemblies.
18916 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
18918         * opcodes.c, opcodes.h: reduce runtime relocations.
18920 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
18922         * culture-info.h, locales.c: fixes and chages to sue the new
18923         optimized format of the locale data.
18924         * culture-info-tables.h: regenerated.
18926 2004-08-06  Geoff Norton <gnorton@customerdna.com>
18927         
18928         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
18930 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
18932         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
18933         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
18934         * domain-internals.h: icall declaration.
18935         * icall.c: icall registration.
18936         * object-internals.h: New fields in MonoAssembly for CAS.
18938 2004-08-05  Duncan Mak  <duncan@ximian.com>
18940         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
18941         CEE_LDELEM_ANY.
18943 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
18945         * reflection.c: fix to deal with object[] arrays in custom ctors
18946         (bug #62550).
18948 2004-08-05  Martin Baulig  <martin@ximian.com>
18950         * class.c (mono_class_array_element_size): Added support for
18951         generic instances and correctly handle "recursive" types.
18953 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18955         * assembly.c: Fix warnings.
18957 2004-08-04  Martin Baulig  <martin@ximian.com>
18959         * class.c
18960         (mono_type_get_name_recurse): Added `gboolean include_arity'
18961         argument specifying whether or not we should include the generic
18962         arity in the type name.
18963         (_mono_type_get_name): New static function.
18964         (mono_class_setup_vtable): If we're a generic instance, don't
18965         include the generic arity in the names of explicit method
18966         implementations.        
18968 2004-08-03  Martin Baulig  <martin@ximian.com>
18970         * class.c (mono_type_get_name_recurse): Enclose the generic type
18971         arguments in `<', '>'.
18973 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
18975         * gc.c: make GC warning messages use the trace API, they are just
18976         noise to most of the users.
18978 2004-08-03  Martin Baulig  <martin@ximian.com>
18980         * debug-mono-symfile.c (read_string): Correctly read the string.
18982 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
18984         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
18985         
18986         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
18987         icalls.
18988         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
18990 2004-07-30  Martin Baulig  <martin@ximian.com>
18992         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
18993         Reflect latest symbol writer changes.   
18995 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
18997         * object.c: always create an object if null is passed
18998         to Invoke() where a valuetype is expected.
19000 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
19002         * marshal.c (mono_marshal_init): make managed
19003         signatures match native ones better for 64bits.
19005 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19007         * appdomain.c: hack to build correctly the private bin path on windows.
19008         Fixes bug #61991.
19010 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
19012         * assembly.c: Load mscorlib from the correct framework directory
19013           (mono/<version>/mscorlib.dll).
19014         * appdomain.h: Added prototypes for new functions.
19015         * internals.h: Added some prototypes.
19016         * domain.c: When initializing the runtime, get from the executable and
19017           the configuration files the runtime version that the app supports.
19018           Added support methods for reading app.exe.config. Added list of versions
19019           supported by the JIT. Added two new methods: mono_init_from_assembly,
19020           which initializes the runtime and determines the required version from
19021           the provided exe file, and mono_init_version, which initializes
19022           the runtime using the provided version.
19023         * icall.c: Get machine.config from version-specific directory.
19024         * reflection.c: When generating an image, embed the version number
19025           of the current runtime.
19027 2004-07-28  Dick Porter  <dick@ximian.com>
19029         * socket-io.c
19030         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
19031         returned sockaddr size before creating the remote address object.
19032         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
19033         61608.
19035 2004-07-28  Dick Porter  <dick@ximian.com>
19037         * locales.c (string_invariant_compare_char): Fix invariant char
19038         compares between upper and lower cases.  Fixes bug 61458.
19040 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
19041         
19042         * marshal.c: actually cache stelem.ref wrappers.
19043         
19044 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19046         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
19047         sections and remove the mono_cli_rva_map () function.
19049 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19051         * debug-mono-symfile.c: fix one more endianess issue, from a patch
19052         by Geoff Norton (<gnorton@customerdna.com>).
19054 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
19056         * class.c: fix class loads for pointer types (typeof(int) !=
19057         typeof(int*)).
19059 2004-07-27  Martin Baulig  <martin@ximian.com>
19061         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
19062         reading the debugging information from an external ".mdb" file.
19064 2004-07-24  Martin Baulig  <martin@ximian.com>
19066         * reflection.c (mono_image_get_type_info): Only write a class
19067         layout entry if we actually have a size or a packing size.
19069 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
19071         * reflection.c (type_get_fully_qualified_name): 
19072         insert cast to get type checking of ?: with non-gcc compilers
19074 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
19076         * rand.c: use g_getenv for both lookups of
19077         MONO_EGD_SOCKET
19079 2004-07-17  Martin Baulig  <martin@ximian.com>
19081         * reflection.c (mono_reflection_bind_generic_method_parameters):
19082         Set `gmethod->reflection_info'.
19084 2004-07-17  Martin Baulig  <martin@ximian.com>
19086         * class.c (mono_class_create_from_typedef): Insert the newly
19087         created class into the hash table before computing the interfaces
19088         since we could be called recursively.
19090 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
19092         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
19093         function to implement stelem.ref in managed code
19094         * class-internals.h, debug-helpers.c: a new wrapper type
19095         for the above.
19097 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
19099         * gc.c: allow GC handles to work even when no GC is compiled in.
19100         Fix part of bug #61134 (GetAddrOfPinnedObject).
19102 2004-07-13  Peter Williams  <peter@newton.cx>
19104         * process.c (complete_path): Make sure we don't attempt to execute
19105         directories.
19107 2004-07-12  Geoff Norton <gnorton@customerdna.com>
19109         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
19110           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
19111           and will add/subtract the hour if needed
19113 2004-07-12  Martin Baulig  <martin@ximian.com>
19115         * reflection.c (mono_field_get_object): If we have
19116         `field->generic_info', take the attributes from
19117         `field->generic_info->generic_type'.    
19119 2004-07-12  Martin Baulig  <martin@ximian.com>
19121         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
19122         This function must be called before initializing the runtime.
19123         (mono_debug_init_1): New function; call this after initializing
19124         the runtime, but before loading the assembly.  It tells the
19125         debugger to load corlib and the builtin types.
19127         * mono-debug-debugger.c: Did some larger changes in the debugging
19128         code; support recursive class declarations, make sure we actually
19129         add all classes.
19131 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19133         * debug-helpers.c: undo my previous patch and fixed the real issue in
19134         ../mini/exceptions-x86.c
19136 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19138         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
19139         when no HOME env. variable was set and a NullRef was thrown in a .cctor
19140         called from other .cctors.
19142 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
19144         * loader.c: Removed the mono_loader_wine_init hack now that we are
19145         doing a managed version of Windows.Forms.
19147 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
19149         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
19150         threadpool.c, threads.c: remove static data from rootset.
19152 2004-07-09  Dick Porter  <dick@ximian.com>
19154         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
19155         Don't do any more processing if the matched length was 0.  It was
19156         increasing the size of the string before.  Fixes bug 61167.
19158 2004-07-09  Dick Porter  <dick@ximian.com>
19160         * socket-io.h:
19161         * socket-io.c
19162         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
19163         Add support for SO_PEERCRED if its available.
19165 2004-07-09  Peter Bartok <pbartok@novell.com>
19166         * loader.c: winelib.exe.so error message is now only displayed if
19167         MONO_DEBUG is set. To help us avoid questions when people are trying
19168         out the new Managed.Windows.Forms.
19170 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
19172         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
19173         for isinst and castclass wrappers.
19175         * class-internals.h icall.c: Move registration and lookup of JIT icalls
19176         to libmetadata from the JIT, so they could be used by the marshalling
19177         code and the interpreter.
19179         * marshal.c: Register marshalling related JIT icalls here instead of
19180         in mini.c. Use CEE_MONO_ICALL instead of the family of 
19181         CEE_MONO_PROC<x> opcodes to call marshalling functions.
19183         * metadata.h: Remove unneeded marshalling conversions.
19185         * opcodes.c: Update for new opcodes.
19186         
19187 2004-07-08  Martin Baulig  <martin@ximian.com>
19189         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
19190         (mono_debug_get_domain_data): Make this function static.
19192 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
19194         * gc.c, object.h: add nice GC handle API for embedders.
19196 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
19198         * reflection.c: more changes for the new api
19200         * object.c: When we reflect on a field w/ a constant value, it
19201         will not have a memory location, so we must access metadata. Also,
19202         allow easier reading of strings so that we can read them from
19203         the constant data.
19205         * class.c (mono_class_layout_fields): no need for literal fields here.
19207         * class-internals.h: api changes for const fields
19209         * icall.c (ves_icall_get_enum_info): use new apis for const fields
19211 2004-07-06  Martin Baulig  <martin@ximian.com>
19213         * mono-debug.h: Increment version number to 44.
19215         * mono-debug.c (mono_debug_add_wrapper): The second argument is
19216         now a gpointer, rewrote this whole method.
19218         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
19219         function.  Add information about the wrapper in a new "misc table".
19221         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
19222         for the new misc table.
19224 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
19226         * metadata-internals.h image.c: Add a cache for helper signatures.
19228         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
19230 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
19232         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
19233         delegates from a delegate. Fixes #61033.
19234         
19235         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
19236         marshalling of stringbuilder arrays. Fixes #59900.
19238 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
19240         * icall.c: Add EnumBuilder:setup_enum_type icall.
19242 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
19244         * icall.c: Added a new icall for the property version of
19245         OffsetOfStringData.
19247 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
19249         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
19250         it has a constant size across platforms.
19252         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
19253         stack trace.
19255 2004-06-29  Martin Baulig  <martin@ximian.com>
19257         * mono-debug.c (mono_debug_add_method): Protect the whole function
19258         in mono_debugger_lock(), not just parts of it.
19260 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19262         * reflection.c: make sure padding bytes in heaps are zeroed.
19264 2004-06-24  David Waite  <mass@akuma.org>
19266         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
19267         image.c, loader.c, locales.c, marshal.c, metadata.c,
19268         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
19269         string-icalls.c, threads.c: change to C90-style comments from C99 /
19270         C++ -style
19272 2004-06-24  Dick Porter  <dick@ximian.com>
19274         * threads.c
19275         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
19276         return createdNew.  Fixes bug 60412.
19278         * threads-types.h: 
19279         * icall.c: Add createdNew parameter to CreateMutex icall
19281 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19283         * reflection.c, object-internals.h: save default value in params.
19285 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19287         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
19288         no need to build a new path combining that with the application base.
19289         Fixes bug #60442.
19291 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19293         * reflection.c: fixed minor standard compliance issues.
19295 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
19297         * reflection.c: fixed issue with encoding some custom attributes
19298         (arrays in properties and fields, bug #60411).
19300 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19302         * reflection.c: fix start address when copying the public key token.
19304 2004-06-23  Martin Baulig  <martin@ximian.com>
19306         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
19307         the `exc' object in a static object to put it into the GC's root set.
19309 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19311         * reflection.c: make mono_reflection_setup_internal_class ()
19312         callable a second time to setup a new parent class.
19314 2004-06-23  Dick Porter  <dick@ximian.com>
19316         * threads.c: Check for WAIT_IO_COMPLETION return values.
19318 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
19320         * appdomain.c: Removed the g_free on the public key token. Now copy 
19321         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
19322         * assembly.c: Added public key token string value when loading 
19323         assemblies. Fix bug #60439.
19324         * icall.c: Added missing informations (like public key) in 
19325         GetReferencedAssemblies. Fix #60519.
19326         * image.h: Changed definition for public key token from const char*
19327         public_tok_value to guchar public_key_token [17];
19328         * reflection.c: Updated for changes to public key token.
19330 2004-06-22  Lluis Sanchez Gual
19332         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
19333         for the field in base classes.
19335 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
19337         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
19338         mark headers as not supported, they are installed only for use by the
19339         debugger.
19341 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
19343         * *.c, *.h: avoid namespace pollution in public headers.
19345 2004-06-21  Martin Baulig  <martin@ximian.com>
19347         * exception.c (mono_get_exception_security): It's in
19348         "System.Security", not in "System".
19350         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
19351         the exception classes.
19353 2004-06-21  Martin Baulig  <martin@ximian.com>
19355         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
19356         Protect the exception object from being finalized.
19358 2004-06-21  Martin Baulig  <martin@ximian.com>
19360         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
19361         public function.
19363 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
19365         * reflection.c: Load the assembly in mono_reflection_type_from_name,
19366         if it was not loaded before. Fix parts of #60439.
19368 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
19370         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
19371         code that was broken since Ben's change: wrappers are now
19372         dependent on the method signature only again.
19374 2004-06-21  Martin Baulig  <martin@ximian.com>
19376         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
19377         added interface support.
19379 2004-06-21  Martin Baulig  <martin@ximian.com>
19381         * class.c (mono_vtable_get_static_field_data): New public method.
19383 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
19385         * filewatcher.c : Windows build fix to be compliant with API changes.
19387 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19389         * class.h, class.c: more accessors.
19390         * metadata.h, metadata.c: prepare for hiding MonoType and
19391         MonoMethodSignature: people should use the accessors from now on
19392         outside of the tree.
19394 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19396         * *.c, *.h: more API cleanups.
19398 2004-06-18  Jackson Harper  <jackson@ximian.com>
19400         * assembly.c: Trace loading assemblies.
19401         * loader.c: Trace loading native libraries.
19402         * mono-config.c: Trace loading config files.
19403         
19404 2004-06-18  Dick Porter  <dick@ximian.com>
19406         * locales.c: Tell ICU the lengths of strings, it can cope with
19407         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
19409 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19411         * image.c: swapped name/filename;
19413 2004-06-18  Martin Baulig  <martin@ximian.com>
19415         * mono-debug-debugger.c (write_class): Write the parent class at
19416         the end of the header.
19418 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
19420         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
19422 2004-06-17  Raja R Harinath  <rharinath@novell.com>
19424         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
19425         (bundle_obj): New conditional define.
19426         (BUILT_SOURCES): Remove.
19427         ($(bundle_srcs)): Make parallel-make safe.
19428         (libmonoruntime_la_LIBADD): Make unconditional.
19429         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
19430         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
19432 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
19434         * culture-info-tables.h: It was inconsistent with the latest
19435           supp info files.
19437 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
19439         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
19440         be loaded.
19442         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
19443         with gcc 2.95.
19445 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19447         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
19448         cleaned up public header threads.h.
19450 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19452         * Makefile.am, *.c, *.h: more API cleanups.
19454 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19456         * Makefile.am: removed monosn from compilation.
19457         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
19458         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
19459         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
19460         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
19461         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
19462         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
19464 2004-06-15  Jackson Harper  <jackson@ximian.com>
19466         * assembly.c: Make locales lower case when searching the GAC for
19467         assemblies. gacutil will always make locales lowercase when
19468         installing so this effectively makes them case insensitive.
19469         
19470 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
19472         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
19473         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
19474           parameter which allows to choose whether the wait can be interrupted or 
19475           not. Also added the method mono_monitor_enter(), which locks the monitor
19476           using an infinite wait and without allowing interruption.
19477           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
19478           interrupted.
19479         * object.h: Added new fields in MonoThread. suspend_event holds the event
19480           used to susped/resume the thread. synch_lock is the lock object to use for
19481           modifying the thread state.
19482         * threads.c: Use the new synch_lock object for locking, instead of "this",
19483           which can generate deadlocks.
19484           Moved thread state change in Thread.Sleep and Thread.Join from managed
19485           to unmanaged code. This avoids a deadlock when the thread was suspended
19486           just after acquiring the thread lock.
19487           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
19488           Implemented Thread.Suspend using an event instead of ThreadSuspend,
19489           which is not fully implemented in the io-layer.
19490         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
19492 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
19494         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
19495         threads-types.h: more API cleanups.
19497 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19499         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
19500         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
19501         threadpool.c, threads.c: first pass at the exported API cleanup.
19503 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19505         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
19507 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19509         * icall.c: added internalGetHome.
19511 2004-06-14  Dick Porter  <dick@ximian.com>
19513         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
19514         possible to return successfully when '.' or '..' were the only
19515         entries in a directory, but were skipped.  The MonoIOStat was not
19516         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
19517         Fixes bug 59574.
19519 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19521         * reflection.c: make binaries run on .Net 1.1 by default.
19523 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19525         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
19527 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
19529         * marshal.c: keep track of struct size with explicit layout
19530         (bug #59979).
19532 2004-06-12  Martin Baulig  <martin@ximian.com>
19534         * mono-debug-debugger.c: Comment out a debugging g_message().
19536 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
19538         * reflection.c, reflection.h: do not free custom attrs that are cached.
19539         * icall.c: use braces to make code clearer.
19541 2004-06-11  Martin Baulig  <martin@ximian.com>
19543         * class.h (MonoInflatedField): New type.
19544         (MonoClassField): Replaced `MonoType *generic_type' with
19545         `MonoInflatedField *generic_info'.
19547         * icall.c
19548         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
19550 2004-06-11  Martin Baulig  <martin@ximian.com>
19552         * reflection.c (mono_image_create_method_token): Correctly encode
19553         varargs methods.
19555 2004-06-11  Martin Baulig  <martin@ximian.com>
19557         * metadata.c (mono_metadata_parse_method_signature): When parsing
19558         a MethodDef which has VarArgs, also set sentinelpos if we don't
19559         have any parameters.
19561 2004-06-11  Martin Baulig  <martin@ximian.com>
19563         * verify.c (mono_method_verify): In CEE_CALL, use
19564         mono_method_get_signature() to get the method's signature, unless
19565         we're a PInvoke method.
19567 2004-06-10  Jackson Harper  <jackson@ximian.com>
19569         * assembly.c: Use <path>/lib/mono/gac for the extra paths
19570         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
19571         logical name as the supplied path is just a prefix to the gac not
19572         the direct path to it.
19573         
19574 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
19576         * reflection.c: make the token for a created method match
19577         the token of the MethodBuilder it was created from
19578         (IKVM requires this behaviour now).
19580 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
19582         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
19583         reflection.c, socket-io.c: leak fixes.
19585 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19587         * icall.c: handle sentinel pos in vararg methods in position different
19588         from 0.
19590 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19592         * culture-info-tables.h: freshly generated.
19594 2004-06-09  Martin Baulig  <martin@ximian.com>
19596         * loader.c (mono_get_method_constrained): Call `mono_class_init
19597         (constrained_class)'.   
19599 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
19601         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
19602         any methods. Fixes #59629.
19604 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
19606         * culture-info-tables.h: reflecting locale-builder updates.
19608 2004-06-08  Dick Porter  <dick@ximian.com>
19610         * object.h:
19611         * locales.c: Fixed compile warnings, including a real bug in
19612         CompareInfo_internal_compare.
19613         
19614 2004-06-08  Dick Porter  <dick@ximian.com>
19616         * locales.c
19617         (ves_icall_System_Globalization_CompareInfo_internal_index):
19618         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
19619         Double-check the resuls of usearches, because ICU currently
19620         ignores most of the collator settings here.  Fixes bug 59720.
19621         
19622 2004-06-08  Dick Porter  <dick@ximian.com>
19624         * locales.c
19625         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
19626         Fix memory leak and segfault-causing typo.  No idea how this one
19627         lasted so long without being noticed.
19629 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
19631         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
19632         any methods. Fixes #59629.
19634 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19636         * assembly.c:
19637         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
19638         own the critical section before). Removed dead code (that's done
19639         in the preload hook).
19641         (mono_assembly_load_with_partial_name): call the preload hook.
19643 2004-06-08  Martin Baulig  <martin@ximian.com>
19645         * metadata.c (mono_metadata_signature_alloc): Default
19646         `sentinelpos' to -1.
19648         * reflection.c (mono_image_get_array_token): Likewise.
19650 2004-06-08  Martin Baulig  <martin@ximian.com>
19652         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
19654         * metadata.c (mono_metadata_parse_method_signature): When parsing
19655         a MethodDef which has VarArgs, set sentinelpos.
19657         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
19658         `gint16' since we're using -1 for non-varargs methods.
19660         * reflection.c
19661         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
19662         (method_encode_signature): Added varargs support.
19663         (method_builder_encode_signature): Likewise.
19664         (mono_image_get_varargs_method_token): New static method.
19665         (mono_image_create_method_token): New public method; this is
19666         called via an icall instead of mono_image_create_token() when
19667         calling a varargs method.       
19669 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
19671         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
19673 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
19675         * culture-info-tables.h : Reflecting the latest locale-builder that
19676           fixed empty array representation ({} to {0}).
19678 2004-06-07  Jackson Harper  <jackson@ximian.com>
19680         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
19681         looking up extra gac paths. This allows MONO_GAC_PATH to act
19682         exactly like a prefix.
19683         
19684 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
19686         * reflection.c (mono_reflection_type_from_name): Make a copy of the
19687         type name before modifying it. Fixes #59405.
19689 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
19691         * culture-info.h: added fields for "all datetime patterns".
19692         * locales.c: (  ves_icall_System_Globalization_CultureInfo
19693           _construct_datetime_format ()): fill xxx_patterns fields.
19694         * object.h: added fields for "all datetime patterns" to
19695           MonoDateTimeFormatInfo.
19696         * culture-info-tables.h: reflecting locale-builder updates.
19698 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
19700         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
19701         the event has no add and remove methods. Fixes #59629.
19703 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
19705         * object.c: Fixed possible integer overflow when allocating large
19706         strings.
19708 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
19710         * culture-info-tables.h: reflecting locale-builder updates.
19712 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
19714         * culture-info-tables.h: reflecting locale-builder updates.
19716 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
19718         * culture-info-tables.h: reflecting locale-builder updates.
19720 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
19722         * threads.c: Made Thread.Sleep abortable.
19724 2004-06-02  Martin Baulig  <martin@ximian.com>
19726         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
19728         * debug-mono-symfile.h: Bumped symbol file version number to 37.
19730 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
19732         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
19734 2004-05-30  Jackson Harper  <jackson@ximian.com>
19736         * reflection.c: Do not hardcode assembly versions or public key
19737         tokens anymore. All of this except the corlib section was dead
19738         code anyways.
19739         
19740 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
19742         * object.c (mono_runtime_invoke_array): Automatically create boxed
19743         objects for byref valuetypes if needed. Fixes #59300.
19744         
19745         * object.c (mono_method_return_message_restore): Handle 
19746         MONO_TYPE_OBJECT as well.
19748 2004-05-28  Jackson Harper  <jackson@ximian.com>
19750         * reflection.c: The modified type encoding was causing build
19751         problems. Reverted for now.
19752         
19753 2004-05-28  Jackson Harper  <jackson@ximian.com>
19755         * reflection.c/h: Take an assembly ref so that we dont create
19756         fully qualified names when encoding types in the same assembly as
19757         the custom attribute being emitted.
19758         * appdomain.c: Increment version number.
19759         
19760 2004-05-26  Duncan Mak  <duncan@ximian.com>
19762         * icall.c
19763         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19764         Set the full version number (major, minor, build, revision).
19766 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
19768         * marshal.c (emit_struct_conv): increment src/dst after blit
19769         (mono_marshal_get_managed_wrapper,
19770         mono_marshal_get_native_wrapper): make sure we have marshalling
19771         info before marshalling params (info computation affects
19772         blittable)
19774         * class.c (class_compute_field_layout): correctly deal with
19775         blittable
19776         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
19777         value types (as per what windows dows by default)
19778         (mono_class_setup_mono_type): System.ValueType is blittable
19779         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
19780         blittable
19782         * marshal.c (mono_marshal_load_type_info): flag types  as
19783         non-blittable if the native layout doesn't match the managed
19784         layout
19786 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19788         * appdomain.c: don't add stuff in the private search path that is
19789         above the application base. If application base is not set, there's
19790         no private search path.
19792 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
19794         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
19795         byref struct arguments in native->managed marshalling.
19797 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
19799         * marshal.c (mono_marshal_get_runtime_invoke): correctly
19800         cache methods using signature (special case for methods
19801         that are value type or string class)
19802         
19803         * image.c (mono_image_close): clean up allocated GSList's
19804         in runtime_invoke_cache.
19806 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19808         * mono-config.c: set the correct path for mono_cfg_dir on windows when
19809         there's no MONO_CFG_DIR environment variable defined.
19811 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19813         * threads.c: windows version must be >= 0x0500 to include OpenThread.
19815 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
19817         * threadpool.c: Really wait for 500ms after the async call, even if the wait
19818           is interrumped.
19819         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
19820           before waiting for it, and call CloseHandle after the wait to unref it.
19821           This will make sure that handles are not disposed too early.
19823 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19825         * appdomain.c:
19826         * appdomain.h:
19827         * icall.c: removed
19828         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
19829         needed now.
19831         * object.c: se the application_base only for the domain that runs
19832         Main. Fixes bug #59216,
19834 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19836         * appdomain.c:
19837         * object.c: only the domain in which Main is run have
19838         SetupInformation.ConfigurationFile set, so moved a few lines from
19839         appdomain.c to object.c.
19841 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19843         * appdomain.c: we tried to load [name].(dll|exe), but according
19844         to bug #57710, we must also try [culture]/[name].(dll|exe) and
19845         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
19846         There's a test case attached to bug #58922.
19848 2004-05-27  Dick Porter  <dick@ximian.com>
19850         * icall.c:
19851         * file-io.c: Implemented icalls for locking and unlocking regions
19852         in a file.
19853         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
19854         FALSE on error (fixes both compiler warning and real bug.)
19856 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
19858         * culture-info-tables.h: reflecting locale-builder updates.
19860           (Added missing ChangeLog entry for 05/26)
19862 2004-05-27  Jackson Harper  <jackson@ximian.com>
19864         * locales.c: Fix some cut and paste errors.
19865         
19866 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19868         * mono-config.c: set the correct path for config. directory on windows.
19870 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
19872         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
19873           on win32.
19875 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19877         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
19878         from pinvoke functions.
19879         
19880         * marshal.c (mono_ftnptr_to_delegate): Implement this.
19882 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
19884         * culture-info-tables.h: reflecting locale-builder updates.
19886 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19888         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
19889         #59086.
19891 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
19893         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
19894         * icall.c: Modified icalls for RNG.
19895         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
19896         Windows (CryptoAPI).
19898 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
19900         * locales.c: Fix build.
19902 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
19904         * culture-info-tables.h: reflecting locale-builder updates.
19906 2004-05-25  Jackson Harper  <jackson@ximian.com>
19908         * locales.c: When creating the current culture use the $LANGs
19909         specific culture. So DateTimeFormat and NumberFormat entries are created.
19910         
19911 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
19913         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
19914         a char array as parameter.
19916 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
19918         * image.c: In mono_image_open(), always use an absolute path name to
19919           look for already loaded images.
19921 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
19923         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
19924         missing in the windows build (like older cygwin include files).
19926 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
19928         * icall.c: Fixed check for possible integer overflow in Buffer_
19929         BlockCopy icall. Replaced comments style // by /* */.
19931 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
19933         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
19934         
19935         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
19936         check after MONO_VTADDR. Fixes pinvoke2.exe.
19938         * marshal.h marshal.c metadata.h: Add beginnings of support for
19939         ftnptr -> delegate marshalling.
19941 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
19943         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
19944         * threads.c: Fix warnings.
19946 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
19948         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
19949         * icall.c: Registered icalls for Suspend and Resume.
19950         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
19951           Thread.Abort.
19952         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
19953         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
19954         * process.c: Use WaitForSingleObjectEx.
19955         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
19956           checkpoints.
19957         * threads.c, threads.h: Make use of new Ex wait methods. Improved
19958           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
19959           for Suspend and Resume. Added new mono_thread_stop, used for stoping
19960           background threads. Added basic support for Abort in Windows.
19961           Start new threads using a managed delegate invoke wrapper. This wrapper
19962           has an interruption checkpoint that is needed since an interruption
19963           can be requested before the thread leaves the unmanaged code that starts 
19964           the thread.
19965         * marshal.c: Added interruption checkpoint after every native call, and
19966           also before managed calls for wrappers called from unmanaged code to
19967           go into managed code.
19968         * object.h: Added new field in MonoThread to keep track of interruption
19969           requests.
19971 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
19973         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
19974         calls.
19976 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19978         * appdomain.c:
19979         * assembly.c:
19980         * gc.c:
19981         * locales.c:
19982         * mono-config.c:
19983         * rand.c: getenv -> g_getenv (windows!)
19985         * process.c: complete_path is also used on non-windows platforms.
19987 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19989         * icall.c: new signature for Process_Start.
19991         * process.[ch]: new signature for Process_Start. If we're on windows
19992         and UseShellExecute is false, we have to search for the program by
19993         ourselves if we don't get a full path.
19995 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
19997         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
19998         marshalling and call CleanUpNativeData if needed. Fixes #58646.
20000 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20002         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
20003         Fixes bug #58373.
20005 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20007         * process.c: use double quotes to quote program name and arguments on
20008         windows. Fixes bug #58575.
20010 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20012         * file-io.c: don't return "." and ".." when using windows Find*File.
20014 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
20016         * marshal.c: Don't pass wrappers to message init because method 
20017         addressed used to lookup metadata. part of remoting[2|3] fix.
20019 2004-05-15  Jackson Harper  <jackson@ximian.com>
20021         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
20022         path is essentially the same as MONO_PATH except that it points to
20023         GACs instead of lib directories.
20024         * loader.h: The user gac is gone so we dont need function to
20025         enable/disable it.
20026         * mono-config.c: user gac option is now gone.
20027         
20028 2004-05-15  Jackson Harper  <jackson@ximian.com>
20030         * culture-info.h: Make defines more consistent, add calendar data
20031         to the culture info table.
20032         * culture-info-tables.h: Add basic calendar data. Basically
20033         everyone gets default gregorian until all the data is
20034         updated.
20035         * locales.c: Use the new consistent defines. Set calendar data for
20036         culture info objects.
20037         * object.h: add a field for calendar data to CultureInfo
20038         
20039 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
20041         * image.c: image->runtime_invoke_cache is keyed on signatures now.
20042         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
20043         a signature.
20044         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
20045         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
20046         an extra param that is the pointer of the method to invoke. The IL for
20047         the invoke method is no longer specific to the method, but to the
20048         signature of the method. Thus, we can share the same code for multiple
20049         methods. This reduces the number of methods that have to be compiled.
20051 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
20053         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
20055         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20057         * icall.c: Optimize Buffer.BlockCopy.
20059 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20061         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
20062         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
20063         quote). Changed them to "MMMM yyyy".
20065 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
20067         * rand.c
20068         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
20070 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
20072         * reflection.h: Updated after changes to managed structures.
20074         * appdomain.c: Bump corlib version.
20076 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20078         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
20079         windows.
20081 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20083         * Makefile.am: link to ../os/libmonoos.la on windows.
20085         * assembly.c:
20086                 -If MONO_DEBUG, warn about non-existing directories in
20087                 MONO_PATH.
20088                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
20089                 compile time variable.
20090                 -Removed init_default_path and call mono_set_rootdir from
20091                 libmonoos.a instead (windows only).
20093         * assembly.h: declare mono_assembly_getrootdir().
20095         * domain.c:
20096         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
20098         * loader.c: s/getenv/g_getenv/
20100 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
20102         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
20104         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
20106         * metadata.h: Add new marshalling conversions.
20108         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
20109         function.
20111         * reflection.c (mono_reflection_get_type): Lookup the type in all
20112         modules of a multi-module assembly. Fixes #58291.
20114 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
20116         * threads.c: Before aborting a background, set the StopRequested
20117         state.  This avoids throwing the Abort exception.
20118         In mono_thread_manage, don't continue with the shutdown until all
20119         aborted threads have actually stopped.
20121 2004-05-10  Jackson Harper  <jackson@ximian.com>
20123         * locales.c: Remove the modifier from culture names.
20124         
20125 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20127         * Makefile.am: monosn is not installed any more. It has been deprecated
20128         in favor of sn.
20130 2004-05-07  Jackson Harper  <jackson@ximian.com>
20132         * locales.c
20133         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
20134         Fix array construction, add bailout if the length is 0.
20136 2004-05-07  Dick Porter  <dick@ximian.com>
20138         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
20139         machine doesn't have a DNS entry.  Patch by Urs Muff
20140         (umuff@quark.com), fixes bug 57928.
20142 2004-05-06  Jackson Harper  <jackson@ximian.com>
20144         * reflection.c: Handle null PublicTokens properly. alloc mem for
20145         assembly names culture so we dont crash when freeing it.
20146         
20147 2004-05-06  Jackson Harper  <jackson@ximian.com>
20149         * assembly.c: Check the usergac when loading with partial names.
20150         
20151 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
20153         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
20154         does nothing for now (not required for Linux/Windows) but the class
20155         library can call it (and a newer or modified runtime could need it).
20156         * icall.c: Registred icall.
20158 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20160         * loader.c: prints a message on module loading error we set MONO_DEBUG
20161         environment variable.
20163 2004-05-05  Jackson Harper  <jackson@ximian.com>
20165         * appdomain.c: Handle PublicKeyToken=null properly.
20166         
20167 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
20169         * environment.c|h: Added icall ves_icall_System_Environment_
20170         GetOSVersionString to get the current OS version as a string.
20171         * icall.c: Registred icall.
20173 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
20175         * object.c: in mono_object_get_virtual_method(), take into account that
20176         non-virtual methods don't have a slot in the vtable. Check needed when
20177         the object is a proxy.
20179 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
20181         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
20182         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
20184         * object.c (mono_class_compute_gc_descriptor): Fix warning.
20186         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
20187         passed when a valuetype is expected.
20189         * object.c (mono_unhandled_exception): Only set the exit code if the
20190         exception happens in the main thread. Fixes thread5.exe.
20192         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
20193         invalid names. Fixes #58047.
20195 2004-05-03  Jackson Harper  <jackson@ximian.com>
20197         * assembly.c: This line was committed accidently and is unneeded.
20198         
20199 2004-05-03  Jackson Harper  <jackson@ximian.com>
20201         * icall.c: Add new icall for Assembly::LoadWithPartialName
20202         * assembly.c/.h: new function that probes the GAC to load partial
20203         assembly names by Paolo Molaro.
20204         
20205 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20207         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
20208         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
20209         (type_get_fully_qualified_name): Added PublicKeyToken when building a
20210         full type name.
20212 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20214         * appdomain.c: fixed check for 'neutral' culture and removed warning.
20215         * reflection.c: fix bug when parsing a full type name and Version is not
20216         the last thing in the string.
20218 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
20220         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
20221         crashes when it is freed.
20223 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20225         * assembly.c: print the compat warning to stderr.
20227 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
20229         * assembly.c (mono_assembly_load_references): Add a compatibility
20230         hack to run old applications that might be still referencing the
20231         3300-based assemblies, only do this for System.xxx.
20233 2004-05-01  Jackson Harper  <jackson@ximian.com>
20235         * appdomain.c: If the culture is neutral we set it to "".
20236         
20237 2004-04-29  Jackson Harper  <jackson@ximian.com>
20239         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
20241 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
20243         * string-icalls.c: added low overhead function for copying chars
20244         * icall.c: added needed icall for the above function
20246 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20248         * icall.c: fix return value of get_global_assembly_cache.  Implemented
20249         Environment.GetLogicalDrives.
20251 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
20253         * rand.c: try and talk to egd or prngd
20254         for random bytes if opening devices fail.
20256 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
20258         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
20259         alignment for the type using the native alignment of its members 
20260         instead of using klass->min_align.
20262         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
20264 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20266         * file-io.c:
20267         * socket-io.c: added check for sys/aio.h.
20269 2004-04-28  Dick Porter  <dick@ximian.com>
20271         * threads.c: Don't abort a thread thats already aborting, when
20272         terminating everything.
20274 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20276         * icall.c: added 2 new async calls for Socket.
20278         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
20279         IO on *nix systems.
20281         * threadpool.c: removed unused variable.
20283 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
20285         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
20287 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
20289         * locales.c: put back string_invariant_tolower () and
20290         string_invariant_toupper ().
20292 2004-04-26 David Waite <mass@akuma.org>
20294         * file-io.h:
20295         * socket-io.h:
20296         * threads.h:
20297         * unicode.h: remove comma from end of enumeration declarations
20299 2004-04-26 David Waite <mass@akuma.org>
20301         * debug-mono-symfile.h:
20302         * decimal.c:
20303         * mono_debug.h:
20304         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
20307 2004-04-26  Jackson Harper  <jackson@ximian.com>
20309         * appdomain.c: Increment version number.
20310         
20311 2004-04-26  Jackson Harper  <jackson@ximian.com>
20313         * appdomain.c: Set assembly references public token value when
20314         PublicKeyToken is specified, not the hash_value. Free public token
20315         values when free assembly name data. Previously the public key
20316         token was hex decoded, however we are using hex encoded public key
20317         tokens, so this is not neccasary.
20318         * assembly.c: Lookup assemblies in the gac if their public token
20319         value is set. Add function to allow enabling user gac
20320         lookups. Specify whether or not the assembly was loaded from the
20321         GAC. Compare full assembly names when checking the cache for
20322         assemblies (Temporarily disabled see comment in code). Remove
20323         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
20324         specifies trace-loader they get extra info to stdout on the
20325         loading of assemblies.
20326         * image.h: Add a field for an assembly references public token
20327         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
20328         whether an assembly has been loaded from the GAC.
20329         * image.c: Remove a corlib -> mscorlib name mapping.
20330         * loader.h: Add function to enable/disable the user gac.
20331         * mono-config.c: Check if the usergac is enabled in the config
20332         file.
20333         * icall.c: New icall to determine whether or not an assembly has
20334         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
20335         * tabldefs.h: Add constant for assemblyref flag that specifies a
20336         full public key is used instead of a public token.
20337         * reflection.c: Remove mscorlib -> corlib mappings. Set
20338         PublicTokenValue instead of hash value. This value is a hex
20339         string so it does not need to be expanded.
20341 2004-04-26  Martin Baulig  <martin@ximian.com>
20343         * mono-debug-debugger.c (mono_debugger_initialize): Set
20344         `mono_debugger_initialized' before calling mono_debug_lock().
20346 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
20348         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
20349           InternalToUpper/InternalToLower.
20350         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
20351           removed invariant culture shortcut.  This is now done in managed code.
20352         * locales.c: (string_invariant_toupper/tolower) removed.
20354 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20356         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
20357         Added Poll internal call.
20359         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
20360         call for Poll. Select was too heavy for polling a single socket.
20362         * threadpool.[ch]: added mono_threadpool_cleanup.
20363         * threads.c: use it. Don't use Thread_Abort on windows.
20365 2004-04-23  Martin Baulig  <martin@ximian.com>
20367         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
20369 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
20371         * icall.c: Registred new icalls for key pair protection and added an
20372         icall for Environment.GetFolderPath on Windows.
20373         * security.c|h: Added new icalls for key pair protection.
20375 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20377         * socket-io.c: don't display the non-supported family warning for known
20378         families. Now this is not displayed on windows when checking support
20379         for IPv4/IPv6.
20381 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20383         * class.c: don't display the layout warning for static fields.
20385 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
20387         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
20388         * locales.c, locales.h: Added new icalls for culture-specific
20389         Char.ToLower and Char.ToUpper.
20391 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20393         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
20394         by David Waite.
20396 2004-04-20  Martin Baulig  <martin@ximian.com>
20398         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
20399         of the type name before passing it to mono_reflection_type_from_name().
20401 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
20403         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
20404         encodings here. Fixes #56965.
20406 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
20408         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
20409         fix test on strstr result not that I can see anything that
20410         relies on the result.
20412 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
20414         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
20415         Fixes #57081.
20417         * marshal.c (mono_marshal_get_string_encoding): New helper function.
20419         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
20420         function to determine which marshalling to use for strings. Fixes
20421         #56965.
20423         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
20425         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
20427 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
20429         * icall.c: #include mono-config.h
20431 2004-04-15  Jackson Harper  <jackson@ximian.com>
20433         * culture-info-tables.h: Fix date formats for en-US culture.
20434         
20435 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
20437         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
20438         ThreadPool.SetMinThreads.
20439         * threadpool.c: Implemented ThreadPool.GetMinThreads and
20440         ThreadPool.SetMinThreads.
20442 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
20444         * mono-config.c: also load the .config file in the directory
20445         where the assembly was found.
20447 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
20449         * assembly.c: load per-assembly config files.
20450         * icall.c: decrapified code to get the config dir and moved to
20451         mono-config.c.
20452         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
20453         per-assembly config files. When doing a dll map lookup give precedence
20454         to the per-assembly data.
20456 2004-04-14  Martin Baulig  <martin@ximian.com>
20458         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
20459         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
20460         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
20462         * mono-debugger-debugger.c: While the debugger is locked, remember
20463         whether the symbol tables have changes and send one single
20464         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
20466 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
20468         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
20470         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
20471         function.
20473         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
20474         account when marshalling string arrays. Fixes #56965.
20476 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
20478         * icall.c: Add new icalls mapping for security.
20479         * security.c|h: Add internal calls for WindowsIdentity,
20480         WindowsImpersonationContext and WindowsPrincipal.
20482 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
20484         * class.c: Added comment to ensure the System.MonoDummy class
20485         is removed when no longer necessary
20487 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
20489         * appdomain.c: Pass arguments to the bootstraping exceptions to
20490         minimize JITed methods at boot
20492         * metadata.c (mono_exception_from_name_two_strings): Allow for the
20493         second string to be null.
20495         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
20496         Change the protocol to minimize the JIT methods at startup.  Now
20497         it Returns the internal codepage, if the value of "int_code_page"
20498         is 1 at entry, and we can not compute a suitable code page
20499         number, returns the code page as a string.
20501 2004-04-13  Jackson Harper  <jackson@ximian.com>
20503         * culture-info-tables.h: Fix number of decimal digits for all
20504         english locales.
20506 2004-04-13  Jackson Harper  <jackson@ximian.com>
20508         * icall.c: Clairfy out of sync error message. It is not always
20509         your corlib that is out of sync.
20511 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
20513         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
20514         properties when only the set accessor is overriden. Fixes #55874.
20516 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
20518         * assembly.c (mono_assembly_load_references): Make this thread safe.
20519         Fixes #56327.
20521 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
20523         * monosn.c: Add missing initialization calls.
20525 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
20527         * locales.c:
20528         ves_icall_System_Globalization_CultureInfo_construct_number_format
20529         Fix g_assert so it compiles on fussier compilers re int/ptr
20530         mismatch
20532 2004-04-08  Dick Porter  <dick@ximian.com>
20534         * socket-io.h:
20535         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
20536         53992.  Also rearrange the code so that the internal calls return
20537         an error value and exceptions are thrown from managed code.
20539         * icall.c: Add type info to the socket icalls.
20541 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20543         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
20544         owes me a beer.
20546 2004-04-07  Martin Baulig  <martin@ximian.com>
20548         * class.c (mono_class_from_generic_parameter): Don't default
20549         `klass->parent' to `mono_defaults.object_type'.
20551 2004-04-07  Martin Baulig  <martin@ximian.com>
20553         * reflection.c (mono_reflection_initialize_generic_parameter): Set
20554         `param->pklass->reflection_info'.       
20556 2004-04-07  Jackson Harper  <jackson@ximian.com>
20558         * culture-info-tables.h: Fix date separator symbol.
20559         
20560 2004-04-07  Martin Baulig  <martin@ximian.com>
20562         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
20563         from System.Type to System.MonoType.
20565 2004-04-07  Martin Baulig  <martin@ximian.com>
20567         * reflection.h
20568         (MonoReflectionGenericParam): Added `has_reference_type' and
20569         `has_value_type' fields.
20571         * reflection.c (mono_image_get_generic_param_info): Encode the
20572         correct flags if we have the `class' or `struct' constraint.
20574 2004-04-07  Martin Baulig  <martin@ximian.com>
20576         * reflection.h
20577         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
20579 2004-04-07  Jackson Harper  <jackson@ximian.com>
20581         * appdomain.c: Revert extra patches, just wanted to bump the
20582         version number.
20583         
20584 2004-04-07  Jackson Harper  <jackson@ximian.com>
20586         * Makefile.am: Add culture-info private headers.
20587         * icall.c: Add new icalls for contructing locales.
20588         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
20589         * locales.h: Declare new culture info construction methods.
20590         * object.h: Add new fields used to avoid the CultureMap to
20591         MonoCultureInfo.
20592         * culture-info.h: Definition of structs used in the culture info
20593         tables.
20594         * culture-info-tables.h: Autogenerated tables that contain culture
20595         info data. This file was generated with the locale-builder tool.
20596         * appdomain.c: Incement corlib version number.
20597         
20598 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
20600         * appdomain.c: (mono_runtime_init) move mono_thread_init
20601         to before mono_object_new calls so critical sections
20602         are initialized before use.
20604 2004-04-07  Martin Baulig  <martin@ximian.com>
20606         * icall.c
20607         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
20608         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
20609         (ves_icall_MonoGenericParam_initialize): Removed.
20610         (monogenericparam_icalls): Removed.
20611         (generictypeparambuilder_icalls): Added new table for
20612         System.Reflection.Emit.GenericTypeParameterBuilder.
20614         * reflection.c
20615         (mono_reflection_define_generic_parameter): Removed.
20616         (mono_reflection_initialize_generic_parameter): This is now called
20617         from GenericTypeParameterBuilder's .ctor.
20619 2004-04-06  Martin Baulig  <martin@ximian.com>
20621         * class.c (mono_class_init): Don't inflate nested classes in a
20622         generic instance.
20623         (mono_type_get_name_recurse): Include the generic arguments for
20624         generic instances and generic type declarations.
20625         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
20626         (_mono_class_get_instantiation_name): Removed.
20627         (mono_class_create_generic): Always use `gklass->name' as our name.
20629         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
20631         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
20632         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
20633         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
20634         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
20635         closed generic methods here.
20637         * reflection.c
20638         (mono_reflection_generic_inst_get_nested_types): Removed.
20639         (inflate_mono_method): Copy the generic parameters from the
20640         MonoMethodHeader into out MonoGenericMethod.
20642 2004-04-06  Martin Baulig  <martin@ximian.com>
20644         * row-indexes.h
20645         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
20647         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
20649         * reflection.c (build_compressed_metadata): If we have any entries
20650         in the GenericParam, MethodSpec or GenericParamConstraint tables,
20651         set the header version to 1.1.
20653 2004-04-06  Martin Baulig  <martin@ximian.com>
20655         * class.c (mono_class_init): If we're a generic instance,
20656         initialize our nested classes, too.
20657         (_mono_class_get_instantiation_name): Deal with the new `!%d'
20658         suffix. 
20660 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20662         * process.c: quote the argument passed to the shell on windows.
20664 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
20666         * threads.c (mono_alloc_special_static_data): Allow this to be
20667         called during startup.
20669 2004-04-02  Martin Baulig  <martin@ximian.com>
20671         * icall.c
20672         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
20674 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
20676         * icall.c: Fix build.
20678 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
20680         * Makefile.am: Added security.c|h.
20681         * icall.c: Added icall for get_UserName;
20682         * security.c: New file for security related icalls. Added function
20683         get_UserName for System.Environment (fix #56144).
20684         * security.h: New. Header file for security.c
20686 2004-04-02  Dick Porter  <dick@ximian.com>
20688         * icall.c: Deleted the icalls that were obsoleted some time ago
20689         by the ICU string code, and which were mixed into the icall
20690         rearranging.  Fixes bug 55969.
20692         * string-icalls.h: 
20693         * string-icalls.c: Deleted the code that those icalls reference.
20695 2004-04-01  Martin Baulig  <martin@ximian.com>
20697         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
20699         * class.c (mono_class_from_generic_parameter): Don't set 
20700         TYPE_ATTRIBUTE_INTERFACE.
20701         (my_mono_class_from_generic_parameter): Likewise.
20703 2004-04-01  Martin Baulig  <martin@ximian.com>
20705         * loader.c (find_method): Added an optional `MonoClass *ic'
20706         argument to search in a specific interface.
20707         (mono_get_method_constrained): New public function.
20709 2004-04-01  Martin Baulig  <martin@ximian.com>
20711         * reflection.c (mono_image_get_generic_field_token): Use the
20712         `handleref' cache here.
20714 2004-04-01  Martin Baulig  <martin@ximian.com>
20716         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
20718         * reflection.c (create_generic_typespec): Use the `typespec' hash
20719         here, not the `typeref' one.    
20721 2004-04-01  Martin Baulig  <martin@ximian.com>
20723         * class.c (mono_class_inflate_generic_type): Moved the
20724         functionality into a new static inflate_generic_type() which
20725         returns NULL if it didn't do anything.  Only increment the
20726         `mono_stats.inflated_type_count' if we actually inflated
20727         something.
20728         (mono_class_get_full): Check the classes type to see whether we
20729         need to inflate it; also inflate MONO_TYPE_(M)VAR.
20731 2004-04-01  Jackson Harper  <jackson@ximian.com>
20733         * reflection.c: Set culture for assembly references.
20734         
20735 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20737         * reflection.[ch], icall.[ch], Fix support for pinning variables.
20739 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20741         * assembly.c:
20742         (do_mono_assembly_open): the critical section also covers
20743         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
20745 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20747         * threads.c:
20748         (mono_manage_threads): abort the background threads when finishing.
20749         Fixes bug #47232.
20751 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20753         * gc.c: only close the done_event handle if there was no timeout.
20754         C-ified comments.
20756 2004-03-30  Martin Baulig  <martin@ximian.com>
20758         * icall.c (icall_entries): It's called "System.Activator", not
20759         "System.Activation".    
20761 2004-03-30  Martin Baulig  <martin@ximian.com>
20763         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
20764         (mono_class_create_from_typespec): Likewise.
20766 2004-03-30  Martin Baulig  <martin@ximian.com>
20768         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
20769         `has_ctor_constraint' and `initialized'.
20771 2004-03-30  Martin Baulig  <martin@ximian.com>
20773         * reflection.c (encode_new_constraint): New static function to add
20774         the constructor constraint attribute to a type parameter.
20775         (encode_constraints): Call encode_new_constraint() if necessary.
20777         * reflection.h
20778         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
20780         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
20781         
20782 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
20784         * reflection.c, icall.c: add support for pinning variables. 
20786 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
20788         * marshal.c (mono_marshal_get_managed_wrapper):
20789         init bool local with zero rather than null.
20791 2004-03-29  Martin Baulig  <martin@ximian.com>
20793         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
20794         the "official" behavior here.
20795         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
20797 2004-03-29  Martin Baulig  <martin@ximian.com>
20799         * icall.c: Reflect latest API changes.
20801 2004-03-29  Martin Baulig  <martin@ximian.com>
20803         * loader.c (mono_get_method_from_token): Also call
20804         mono_metadata_load_generic_params () for abstract and interface
20805         methods; replace the type arguments in the method signature with
20806         the ones which are loaded from the metadata.
20808 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
20810         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
20811         of the lock is not the current thread. MS.NET don't do it, in spite of
20812         what the documentation says. See bug #56157.
20814 2004-03-28  Martin Baulig  <martin@ximian.com>
20816         * class.c (mono_class_init): Don't call init_properties() and
20817         init_events() for generic instances; set `prop->parent' when
20818         inflating properties.
20820         * reflection.c (mono_generic_inst_get_object): Call
20821         `mono_class_init (ginst->klass)'.
20822         (mono_type_get_object): Only create a MonoGenericInst if your
20823         generic type is a TypeBuilder.
20824         (do_mono_reflection_bind_generic_parameters): Only set
20825         `ginst->is_dynamic' if our generic type is a TypeBuilder.
20827 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
20829         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
20830         Fixes #56091.
20832 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20834         * icall.c: added Kill_internal icall.
20835         * process.[ch]: added Kill_internal icall.
20837 2004-03-25  Martin Baulig  <martin@ximian.com>
20839         * class.h (MonoStats): Added `generic_instance_count',
20840         `inflated_method_count', `inflated_type_count' and
20841         `generics_metadata_size'.       
20843 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20845         * reflection.c: no warnings now.
20847 2004-03-25  Martin Baulig  <martin@ximian.com>
20849         * class.c (mono_class_get_full): New public function; does a
20850         mono_class_get(), but also takes a `MonoGenericContext *'.
20852         * loader.c (mono_field_from_memberref): Renamed to
20853         `field_from_memberref', made static and added `MonoGenericContext *'
20854         argument.
20855         (mono_field_from_token): Added `MonoGenericInst *' argument.
20856         (method_from_memberef): Likewise.
20857         (mono_get_method_from_token): Likewise.
20858         (mono_get_method_full): New public function; does a
20859         mono_get_method(), but also takes a `MonoGenericContext *'.
20861         * verify.c (mono_method_verify): Get the method's generic context
20862         and pass it to mono_field_from_token(), mono_get_method_full() and
20863         mono_class_get_full().
20865 2004-03-25  Martin Baulig  <martin@ximian.com>
20867         * class.c (mono_class_inflate_generic_type): Take a
20868         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
20869         `MonoGenericMethod *'.
20871 2004-03-25  Martin Baulig  <martin@ximian.com>
20873         * loader.h (MonoMethodInflated): Store the MonoGenericContext
20874         instead of the MonoGenericMethod here.
20876 2004-03-25  Martin Baulig  <martin@ximian.com>
20878         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
20879         each time we create a new MonoGenericInst, we also create a new
20880         context which points back to us.
20882         * class.c (inflate_method): Use `ginst->context' instead of
20883         creating a new context.
20885         * loader.c (method_from_memberref): Use
20886         `klass->generic_inst->context' instead of creating a new context.
20888 2004-03-25  Martin Baulig  <martin@ximian.com>
20890         * class.h (MonoGenericContext): New struct.
20891         (MonoGenericMethod): Removed `generic_inst'.
20893         * class.c (mono_class_inflate_generic_method): Take a
20894         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
20896 2004-03-25  Martin Baulig  <martin@ximian.com>
20898         * loader.h (MonoMethodInflated): New typedef.
20900         * metadata.h (MonoMethodSignature): Removed `gen_method', make
20901         `generic_param_count' consume just 30 bits, added `is_inflated'
20902         and `has_type_parameters' flags (one bit each).
20904         * class.c (mono_class_inflate_generic_method): Create a
20905         MonoMethodInflated instead of a MonoMethodNormal and set
20906         `is_inflated' in the method signature.
20908         * class.h (MonoGenericMethod): Removed `generic_method'.
20910 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
20912         * image.c: Make sure the name of a MonoImage is always an absolute path.
20913           This fixes bug #54415.
20915 2004-03-24  Martin Baulig  <martin@ximian.com>
20917         * class.c (mono_class_setup_vtable): If we're a generic instance,
20918         use our generic type's vtable size.
20920 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
20922         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
20923         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
20924         problems.
20926 2004-03-23  Martin Baulig  <martin@ximian.com>
20928         * class.h (MonoDynamicGenericInst): Added `int count_events' and
20929         `MonoEvent *events'.
20931         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
20932         (typebuilder_icalls): Added "get_event_info"; calls
20933         mono_reflection_event_builder_get_event_info(). 
20935         * reflection.c (mono_reflection_generic_inst_initialize): Added
20936         `MonoArray *events'.
20937         (mono_reflection_event_builder_get_event_info): New function.
20939 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
20941         * object.h: add mono_type_initialization_init
20943         * object.c (mono_runtime_class_init): 
20944         implement class constructor synchronization rules
20945         to cope with threading issues.  
20946         add mono_type_initialization_init
20948         * appdomain.c (mono_runtime_init): call 
20949         mono_type_initialization_init
20951         * class.h: removing initializing field from MonoVTable
20953 2004-03-23  Martin Baulig  <martin@ximian.com>
20955         * class.c (my_mono_class_from_generic_parameter): Use
20956         `param->name' if it's not NULL. 
20958 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
20960         * class.c: do not insert non-virtual methods in the vtable.
20961         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
20962         that means the method is non-virtual. This never would have
20963         happened before.
20965 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
20967         * profiler.c: Added lock for accessing coverage_hash.
20969 2004-03-22  Martin Baulig  <martin@ximian.com>
20971         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
20972         `method->method->signature->generic_param_count != 0' to make it
20973         work for interface methods.
20975 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20977         * process.c: quote the string passed to the shell using g_shell_quote.
20979 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20981         * threads.c:
20982         (mono_threads_manage): don't remove the finalizer thread and self
20983         from the threads hash table so that mono_thread_manage can be called
20984         more than once.
20986 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20988         * process.c: quote the arguments when UseShellExecute is true. Fixes
20989         bug #55790.
20991 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20993         * threads.c: set mono_thread_detach as a cleanup routine for every
20994         thread. This way it's always executed upon thread termination, either
20995         aborted or finished normally. No more xsp hangs!
20997 2004-03-17  Martin Baulig  <martin@ximian.com>
20999         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
21000         `int count_nested' and a `MonoType **nested'.
21002         * reflection.c (mono_reflection_bind_generic_parameters): Moved
21003         most of the functionality into a new static
21004         do_mono_reflection_bind_generic_parameters() and don't take a
21005         `MonoType *nested_in' argument any more.  Don't compute nested
21006         types here.
21007         (mono_reflection_generic_inst_get_nested_types): New public method
21008         to get nested types.
21010         * class.c (mono_class_create_generic): Set `klass->nested_in' if
21011         we're a nested class.
21013         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
21014         mono_reflection_generic_inst_get_nested_types() to compute the
21015         nested types.
21017 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
21019         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
21020         descriptive error message under windows.
21021         
21022 2004-03-17  Martin Baulig  <martin@ximian.com>
21024         * class.c (dup_type): Added `const MonoType *original' argument;
21025         copy the attrs from the original type.
21027 2004-03-17  Martin Baulig  <martin@ximian.com>
21029         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
21030         `m->generic_inst_cache' here.
21032 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
21034         * exception.h exception.c: Add stack_overflow_exception.
21036 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21038         * threadpool.c:
21039         (overlapped_callback): call SetEvent *after* invoking the callback.
21040         No need to call CloseHandle.
21042 2004-03-16  Martin Baulig  <martin@ximian.com>
21044         * reflection.c (mono_image_get_fieldref_token): Take a
21045         `MonoReflectionField *' instead of a `MonoClassField *' and a
21046         `MonoClass *'; store the `MonoReflectionField *' in the hash.
21048 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21050         * appdomain.c: don't add the culture to the filename we're looking for
21051         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
21053 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21055         * locales.c: don't ignore symbols when doing case insensitive compares.
21056         Thanks Dick! Fixes bug #54046.
21058         * threads.c: surround 'threads' usage with enter/leave in
21059         mono_thread_manage.
21061 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
21063         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
21064         implicitly marshalled as [Out]. Fixes #55450.
21066         (mono_marshal_get_runtime_invoke): Zero out the result if there is
21067         an exception.
21069 2004-03-16  Martin Baulig  <martin@ximian.com>
21071         * class.c (mono_class_from_generic_parameter): Use the actual
21072         parameter name. 
21074 2004-03-16  Martin Baulig  <martin@ximian.com>
21076         * reflection.c (type_get_signature_size): New static function.
21077         Compues the size of the type in a method signature.
21078         (method_get_signature_size): New static function; calls
21079         type_get_signature_size() to compute the actual size of the
21080         method's signature.
21081         (method_encode_signature): Use method_get_signature_size() to get
21082         the signature's size rather than using `nparams * 10'.
21084 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21086         * file-io.h: define here WapiOverlapped on windows. I don't want the
21087         regular OVERLAPPED one.
21089         * file-io.c:
21090         * threadpool.c: somehow, BindIoCompletionCallback is not found.
21091         Disabling AIO on windows.
21093 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21095         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
21096         bug #55385.
21098 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21100         * appdomain.c: upgraded corlib version.
21102         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
21103         and BeginWrite. Allow opening files for asynchrnous operations.
21105         * file-io.h: new struct that maps FileStreamAsyncResult.
21106         * icall.c: added new icalls.
21107         * process.[ch]: support setting child process environment variables
21108         and use the SHELL or COMSPEC when UseShellExecute is true.
21110         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
21111         callback for async. IO is here and also BindHandle.
21113         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
21114         from here.
21116 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
21118         * reflection.c (create_custom_attr): Allow len == 0.
21120         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
21121         computation on big-endian machines.
21123 2004-03-13  Martin Baulig  <martin@ximian.com>
21125         * class.h (MonoGenericInst): Added `int count_ifaces'.
21127         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
21128         `ginst->count_ifaces' instead `klass->interface_count' since we
21129         may get called before the vtable is created.
21131         * loader.c (mono_method_get_param_names): If we're a generic
21132         instance, return and don't initialize the class.
21134         * reflection.c (mono_reflection_setup_generic_class): Don't call
21135         ensure_runtime_vtable().
21136         (mono_reflection_bind_generic_parameters): Set
21137         `ginst->count_ifaces'.
21139 2004-03-11  Jackson Harper <jackson@ximian.com>
21141         * icall.c:
21142         * unicode.c:
21143         * unicode.h: Remove unused System.Char icalls.
21144         
21145 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
21147         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
21148         code when we P/Invoke the first library in Windows.Forms, instead
21149         of when we first open the assembly.
21151         * assembly.c: Drop the lookup from here.
21153 2004-03-10  Martin Baulig  <martin@ximian.com>
21155         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
21156         class for properties, fields and events.  Finally fixes #54945.
21158 2004-03-10  Martin Baulig  <martin@ximian.com>
21160         * metadata.c (mono_metadata_class_equal): New static function;
21161         checks whether two generic instances or two generic parameters are
21162         equal.
21163         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
21164         compare classes.        
21166 2004-03-10  Martin Baulig  <martin@ximian.com>
21168         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
21170         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
21171         argument and write it into the `reflection_info' field.
21173         * icall.c
21174         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
21175         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
21177 2004-03-09  Jackson Harper  <jackson@ximian.com>
21179         * char-conversions.h: use 8 bits for numeric data its all we need
21180         * icall.c: numeric data is only 8 bits now.
21182 2004-03-09  Martin Baulig  <martin@ximian.com>
21184         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
21186         * class.c (init_properties, init_events): Initialize the new
21187         `parent' field.
21189         * reflection.c (typebuilder_setup_properties): Likewise.
21190         (typebuilder_setup_events): Likewise.
21192         * reflection.h (MonoEventInfo): Replaced `parent with
21193         `declaring_type' and `reflected_type'.
21195         * icall.c (ves_icall_get_property_info): Distinguish between
21196         declaring and reflected type.
21197         (ves_icall_get_event_info): Likewise.
21199 2004-03-09  Martin Baulig  <martin@ximian.com>
21201         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
21202         (ves_icall_Type_GetField): Correctly set field->klass.
21204 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
21206         * loader.h: Fix warning.
21208 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
21210         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
21211         library routine if present.  Notice that it will still continue
21212         executing even if its missing, for those working on the Gtk#
21213         edition of Windows.Forms.
21215         * assembly.c (do_mono_assembly_open): If loading the
21216         System.Windows.Forms call mono_loader_wini_init.
21218 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
21220         * class.h: Added MonoRemoteClass struct.
21221         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
21222         function for MonoStrings.
21223         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
21224         Added internal call for getting the proxy type.
21225         * marshal.c: Get the type of transparent proxies from its remote_class.
21226         Added methods that generate the IL for type checks and casts:
21227         mono_marshal_get_isinst, mono_marshal_get_castclass, 
21228         mono_marshal_get_proxy_cancast.
21229         * marshal.h: Declaration of the previous new methods.
21230         * object.c: Added new moethods for creating and updating MonoRemoteClass
21231         instances: mono_remote_class, mono_upgrade_remote_class, 
21232         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
21233         * verify.c: FIx transparent_proxy_fields layout.
21234         * appdomain.c: Bump corlib version.
21236 2004-03-04  Jackson Harper  <jackson@ximian.com>
21238         * icall.c: Add icall to access char conversion tables.
21239         * char-conversions.h: Character conversion tables.
21240         * Makefile.am: Add char-conversions.h private header file.
21241         
21242 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
21244         * appdomain.c (unload_thread_main): Increase unloading timeout to
21245         10 sec as a temporary workaround for Nant problems.
21247 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
21249         * gc.c: Add checks for GC_enable and GC_disable.
21251         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
21252         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
21253         (bug #54988).
21254         
21255 2004-02-27  Martin Baulig  <martin@ximian.com>
21257         * reflection.c (mono_reflection_bind_generic_parameters): Take a
21258         `MonoReflectionType *' instead of a `MonoType *'.
21260 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
21262         * gc.c (run_finalize): Avoid finalizing the object representing the
21263         finalizer thread.
21264         (finalizer_thread): Fix warning.
21266 2004-02-25  Martin Baulig  <martin@ximian.com>
21268         * class.c (_mono_class_get_instantiation_name): Added `int offset'
21269         argument for nested types.
21270         (mono_class_create_generic): Added support for nested generictypes.
21272         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
21273         `GList *nested'.
21275         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
21277         * reflection.c (method_encode_signature): Increase the minimum
21278         value of `size' from 10 to 11.
21279         (mono_reflection_bind_generic_parameters): Take `int type_argc'
21280         and `MonoType **types' arguments instead of the `MonoArray
21281         *types'; added `MonoType *nested_in'.  Recursively instantiate
21282         nested classes. 
21284 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
21286         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
21287         stack_overflow_ex members which are used by exception handling.
21289         * appdomain.c (mono_runtime_init): Initialize the new members.
21291         * gc.c (mono_gc_enable): New helper function.
21292         * gc.c (mono_gc_disable): New helper function.
21294 2004-02-23  Martin Baulig  <martin@ximian.com>
21296         * icall.c: I must have been really stupid - make it actually work
21297         this time ;-)
21299 2004-02-23  Martin Baulig  <martin@ximian.com>
21301         * loader.c (method_from_memberref): Only inflate the method if
21302         it's in another klass.
21304 2004-02-23  Martin Baulig  <martin@ximian.com>
21306         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
21307         (mono_class_init): If we're a generic instance and an interface,
21308         compute `class->interface_id'; also create `class->interfaces'
21309         here and inflate them.
21311         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
21312         `ginst->is_open'.
21313         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
21315         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
21317 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
21319         * reflection.c (method_encode_code): Improved the error message
21320         generated by the exception.
21322 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21324         * icall.c: Martin did not do what he said in the ChangeLog for
21325         2004-02-18, but put back the changes for properties and events.
21326         Commenting those changes out again and adding comment to bug #54518.
21327         
21328         * process.c: removed warning.
21330 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
21332         * marshal.c (emit_struct_conv): Print an error message instead of
21333         asserting when a type does not have the StructLayout attribute.
21335 2004-02-20  Martin Baulig  <martin@ximian.com>
21337         * reflection.c (mono_type_get_object): Also use the cache for
21338         generic instances.
21339         (mono_reflection_bind_generic_parameters): Always compute
21340         `ginst->ifaces'.        
21342 2004-02-20  Martin Baulig  <martin@ximian.com>
21344         * class.h (MonoGenericMethod): Removed `klass'.
21346         * class.c (mono_class_inflate_generic_method): Added `MonoClass
21347         *klass' argument.
21349 2004-02-20  Martin Baulig  <martin@ximian.com>
21351         * reflection.c (method_encode_methodspec): Actually use the
21352         uninflated signature for the memberref.
21354 2004-02-20  Martin Baulig  <martin@ximian.com>
21356         * class.h (MonoGenericMethod): Removed `declaring'.
21358         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
21359         is NULL, compute it here.
21361 2004-02-20  Martin Baulig  <martin@ximian.com>
21363         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
21365         * metadata.c (mono_metadata_generic_inst_hash): New method.
21366         (mono_metadata_generic_inst_equal): New method.
21368         * reflection.c (mono_reflection_bind_generic_parameters): Use the
21369         `klass->image->generic_inst_cache' cache to avoid creating
21370         duplicate MonoGenericInst's.
21372         * class.c (mono_class_inflate_generic_type): Use the cache.
21374 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
21376         * object.c: fixed gc descriptor calculation for embedded valuetypes.
21378 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21380         * icall.c: added Socket.WSAIoctl icall.
21382         * socket-io.[ch]: implemented
21383         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
21385 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
21387         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
21389 2004-02-18  Urs C Muff  <umuff@quark.com>
21391         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
21392         this work on PPC and other big-endian architectures.
21394         * debug-mono-symfile.h: Prepended the names of all the `guint32'
21395         fields with an underscore to make sure they're only accessed by
21396         the read32() macro.
21398 2004-02-18  Martin Baulig  <martin@ximian.com>
21400         * icall.c: Put the klass->refclass changes back for methods and
21401         fields, but not for properties and events.  We're currently not
21402         distinguishing between DeclaringType and ReflectedType for
21403         properties and events, that's what caused the regressions.
21405 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21407         * object.c:
21408         (mono_async_result_new): the handle can be NULL.
21410         * threadpool.c: Use an event instead of a semaphore, don't initialize
21411         it until needed. This saves quite a few semaphores from being created
21412         when using the threadpool.
21414 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
21416         * object.c (mono_string_is_interned_lookup): Fix interning of long
21417         strings. Fixes #54473.
21419         * domain.c (ldstr_equal): Optimize if the two strings are equal.
21421         * icall.c: Revert the klass->refclass changes since they introduce
21422         regressions (bug #54518).
21424 2004-02-18  Martin Baulig  <martin@ximian.com>
21426         * class.c (mono_class_init): If we're a generic instance and don't
21427         come from a TypeBuilder, inflate our members here.
21428         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
21429         (mono_class_create_generic): New public method.
21430         (mono_class_initialize_generic): Removed.
21431         (get_instantiation_name): Renamed to
21432         _mono_class_get_instantiation_name() and made it public.
21434 2004-02-18  Martin Baulig  <martin@ximian.com>
21436         * class.c (mono_class_inflate_generic_type): Clear the new
21437         instance's `nginst->klass' when inflating a generic instance.
21438         (mono_class_is_subclass_of): Added (basic) support for generic
21439         instances.
21441 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
21443         * appdomain.h, domain.c: use a MonoCodeManager instead of a
21444         MonoMempool to hold compiled native code.
21446 2004-02-17  Martin Baulig  <martin@ximian.com>
21448         * class.h (MonoDynamicGenericInst): Added `count_properties' and
21449         `properties'.
21451         * reflection.c (mono_reflection_generic_inst_initialize): Added
21452         `MonoArray *properties' argument.
21454         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
21456 2004-02-17  Martin Baulig  <martin@ximian.com>
21458         * icall.c (ves_icall_Type_GetFields): Renamed to
21459         ves_icall_Type_GetFields_internal() and added a
21460         `MonoReflectionType *rtype' argument; pass it to
21461         mono_field_get_object() to set the field's "reflected" type.
21462         (ves_icall_Type_GetConstructors): Likewise.
21463         (ves_icall_Type_GetEvents): Likewise.
21464         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
21465         argument; pass it to mono_method_get_object() to set the method's
21466         "reflected" type.       
21468 2004-02-17  Martin Baulig  <martin@ximian.com>
21470         * class.h (MonoDynamicGenericInst): New type.
21471         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
21473         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
21474         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
21475         (ves_icall_MonoGenericInst_GetFields): New interncall.
21477         * class.c (mono_class_from_generic): Don't call
21478         mono_class_initialize_generic() if this is a dynamic instance;
21479         ie. it's being created from a TypeBuilder.
21480         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
21481         `class->byval_arg.type'.
21483         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
21484         to `inflate_method' and made static.
21485         (mono_reflection_inflate_field): Removed.
21486         (mono_reflection_generic_inst_initialize): New public method.
21488         * reflection.h (MonoReflectionGenericInst): Removed `methods',
21489         `ctors' and `fields'; added `initialized'.
21491 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
21493         * debug-helpers.c (mono_method_full_name): Fix output for empty
21494         namespaces.
21496 2004-02-12  Martin Baulig  <martin@ximian.com>
21498         * class.h (MonoClassField): Added `MonoType *generic_type'.
21500         * reflection.c (mono_image_get_fieldref_token): Added support for
21501         instantiated generic types.
21502         (field_encode_inflated_field): Removed.
21503         (mono_image_get_inflated_field_token): Removed.
21504         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
21506         * reflection.h (MonoReflectionInflatedField): Removed.
21508 2004-02-12  Martin Baulig  <martin@ximian.com>
21510         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
21511         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
21513         * reflection.c (mono_image_get_methodspec_token): Take a
21514         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
21515         (mono_image_create_token): Check whether we have a
21516         `method->signature->gen_method' and call
21517         mono_image_get_methodspec_token() if appropriate.
21518         (inflated_method_get_object): Removed.
21519         (mono_reflection_bind_generic_method_parameters): Return a
21520         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
21521         (mono_reflection_inflate_method_or_ctor): Likewise.
21523         * reflection.h (MonoReflectionInflatedMethod): Removed.
21525 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
21527         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
21528         for custom valuetype marshalling.
21530         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
21532 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21534         * icall.c: fixed WSAGetLastError_internal name.
21536 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
21538         * threads.c (mono_thread_attach): Allow this to be called multiple
21539         times for a thread.
21540         
21541         * threads.c (build_wait_tids): Do not wait for ourselves.
21543         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
21544         appdomain list is empty.
21546         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
21547         memory returned by mono_string_builder_to_utf16, since it points into
21548         managed memory. Thanks to Bernie Solomon for noticing this.
21550         * icall.c: Add AppDomainSetup icalls.
21552         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
21554         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
21555         types.
21557         * reflection.c (reflection_methodbuilder_to_mono_method): Save
21558         custom attributes to the method_aux struct. Also fix array indexes etc.
21560         * loader.c (mono_method_get_param_names): Make dynamic case work again.
21561         
21562 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
21564         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
21565         (both static and runtime) and reduce startup time.
21567 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
21569         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
21570         AsAny marshalling conversion instead of crashing.
21572         * marshal.c: Fix warnings.
21574 2004-02-09  Martin Baulig  <martin@ximian.com>
21576         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
21578         * reflection.h (MonoReflectionInflatedMethod): Removed the
21579         `declaring' field, it's now in the unmanaged MonoGenericMethod.
21581         * reflection.c (method_encode_methodspec): Removed the `method'
21582         argument; we get it from `gmethod->declaring'.
21583         (inflated_method_get_object): Removed the `declaring' argument.
21585 2004-02-09  Martin Baulig  <martin@ximian.com>
21587         * class.h (MonoGenericMethod): New type.
21588         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
21589         `generic_method'.
21591         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
21592         a `MonoGenericMethod *gen_method' one.
21594         * class.c (mono_class_inflate_generic_type): Take an additional
21595         `MonoGenericMethod * argument.  This is only non-NULL if we're
21596         inflating types for a generic method.   
21597         (mono_class_inflate_generic_signature): Renamed to
21598         inflate_generic_signature() and made static; take a
21599         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
21600         (inflate_generic_header): Take a `MonoGenericMethod *' argument
21601         instead of a `MonoGenericInst *' one.
21602         (mono_class_inflate_generic_method): Likewise.
21604         * reflection.c (encode_generic_method_sig): Take a
21605         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
21606         (method_encode_methodspec): Likewise.
21607         (inflated_method_get_object): Likewise. 
21609         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
21610         field with a `MonoGenericMethod *gmethod' one.  
21612 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
21614         * class.h (mono_class_has_parent): add parens to expansion
21615         so you can ! this.
21617 2004-02-08  Martin Baulig  <martin@ximian.com>
21619         * image.h (MonoImage): Removed `generics_cache'.
21621         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
21622         instead of a `MonoType *' argument; removed the `inflate_methods'
21623         argument.  Don't inflate methods here.
21625         * loader.c (find_method): If it's a generic instance, call
21626         mono_class_init() on the `sclass->generic_inst->generic_type'.
21628         * metadata.c (mono_type_size): Make this work on uninitialized
21629         generic instances; call it on the `ginst->generic_type's class.
21631         * reflection.c (mono_reflection_bind_generic_parameters): Call
21632         mono_class_from_generic() to create the `ginst->klass'.
21634 2004-02-08  Martin Baulig  <martin@ximian.com>
21636         * class.h (MonoClass): Changed type of `generic_inst' from
21637         `MonoType *' to `MonoGenericInst *'.
21639 2004-02-08  Martin Baulig  <martin@ximian.com>
21641         * icall.c (ves_icall_Type_BindGenericParameters): Just call
21642         mono_type_get_object(), this is now creating a `MonoGenericInst'
21643         for MONO_TYPE_GENERICINST.
21644         (ves_icall_MonoGenericInst_GetParentType): Likewise.
21645         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
21647         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
21648         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
21649         (inflated_method_get_object): Added `MonoClass *refclass' argument.
21650         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
21651         and reflected type.
21653         * reflection.h (MonoReflectionInflatedMethod): Removed
21654         `declaring_type' and `reflected_type'.
21656 2004-02-08  Martin Baulig  <martin@ximian.com>
21658         * class.h (MonoGenericInst): Added `MonoType *parent' and
21659         `MonoType **ifaces'.
21661         * reflection.h (MonoReflectionGenericInst): Removed `klass',
21662         `parent' and `interfaces'.
21664         * reflection.c (mono_reflection_bind_generic_parameters): Take a
21665         `MonoType *' argument and return a `MonoType *'.
21667         * icall.c
21668         (ves_icall_MonoGenericInst_GetParentType): New interncall.
21669         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
21671 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
21673         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
21674         valuetype marshalling.
21676 2004-02-06  Martin Baulig  <martin@ximian.com>
21678         * class.c
21679         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
21680         (my_mono_class_from_generic_parameter): Likewise.
21682 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
21684         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
21685         contents of the symbol files lazily.
21687         * object.h (MonoThread): Add 'name' and 'name_len' fields.
21689         * threads.h threads.c icall.c: New icalls for getting and setting the
21690         threads name.
21692 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
21694         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
21695         Raise an exception when the domain is not found.
21697 2004-02-03  Martin Baulig  <martin@ximian.com>
21699         * reflection.c (mono_image_get_methodspec_token): Use the
21700         uninflated signature; fixes gen-33.
21702 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
21704         * gc.c threads.c: Make the finalizer thread a normal managed thread so
21705         the finalizer code can use thread functionality.
21707         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
21708         the finalizer thread.
21710         * threads.c: Make some functions more robust.
21712         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
21714         * metadata.h: Add new marshalling conventions.
21716         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
21717         stringbuilder marshalling. Fixes #53700.
21719         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
21721         * reflection.c (mono_image_get_type_info): Save declarative security
21722         info.
21724         * reflection.c (mono_image_get_field_info): Handle uninitialized 
21725         unmanaged fields as well.
21727         * appdomain.c: Bump corlib version.
21729 2004-02-01  Martin Baulig  <martin@ximian.com>
21731         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
21732         method type arguments.  
21734 2004-01-30  Duncan Mak  <duncan@ximian.com>
21736         * marshal.h: Add prototype for
21737         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
21738         and
21739         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
21740         fix the build.
21742 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
21744         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
21745         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
21747 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
21749         * marshal.c (mono_marshal_get_native_wrapper): Add support for
21750         custom marshalling of valuetypes.
21752         * marshal.c: Fix some warnings.
21754 2004-01-29  Martin Baulig  <martin@ximian.com>
21756         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
21757         for generic method parameters.
21759         * reflection.c (method_encode_methodspec): Write the uninflated
21760         signature into the methodspec table.
21761         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
21762         is always the uninflated method.
21763         (reflection_methodbuilder_to_mono_method): Copy the generic
21764         parameters from the MethodBuilder into `header->gen_params'.
21766 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
21768         * class.c (mono_class_from_generic_parameter): Fix warning.
21770 2004-01-27  Martin Baulig  <martin@ximian.com>
21772         * class.c (mono_class_from_generic_parameter): Don't create
21773         `klass->methods' here.  
21775 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
21777         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
21778         extension since it does not work with libraries named lib<FOO>.dll.so.
21780 2004-01-25  Martin Baulig  <martin@ximian.com>
21782         * class.c (mono_class_inflate_generic_type): Added support for
21783         MONO_TYPE_GENERICINST.
21785         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
21786         inflate methods on open constructed types.      
21788 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21790         * object.c: fire ProcessExit event in the root AppDomain after running
21791         Main. Fixes bug #53299.
21793 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
21795         * socket-io.c: include the new socket-wrappers.h header.
21796         Use the wrappers instead of the unix socket functions to make the code
21797         more clear.
21799 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
21801         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
21803         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
21804         Fixes #22532.
21806 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
21808         * reflection.c (mono_image_create_pefile): Handle the case when the
21809         entry point is not a MethodBuilder.
21811         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
21812         field to ReflectionMethod since it is not allways a builder.
21814         * reflection.c (type_get_fully_qualified_name): New helper function to
21815         return the fully qualified name of a type.
21817         * reflection.c (encode_marshal_blob): Always emit the fully qualified
21818         type name for custom marshallers.
21820         * reflection.c (mono_marshal_spec_from_builder): Ditto.
21822         * class.c (mono_class_setup_vtable): If a parent class already 
21823         implements an interface, use the implementing methods from that class.
21824         Fixes #53148.
21826 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21828         * threadpool.c: just return instead of ExitThread to allow for thread
21829         clean up earlier.
21831 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
21833         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
21834         when closing resource modules.
21836         * reflection.c (mono_image_create_pefile): Handle the case when the
21837         entry point is not a MethodBuilder.
21839         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
21840         field to ReflectionMethod since it is not allways a builder.
21842 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
21844         * marshal.c (mono_marshal_get_managed_wrapper): 
21845         mono_marshal_alloc takes native int so CONV_I
21846         the arg for 64bits.
21848 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
21850         * reflection.c (fixup_cattrs): New function to fixup the methoddef
21851         tokens in the cattr table. Fixes #53108.
21853 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21855         * loader.c: don't trim ".dll" before looking up in the config file.
21856         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
21858 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
21860         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
21861         Return the module which contains the resource as well.
21862         (ves_icall_System_Reflection_Module_Close): New icall.
21864         * appdomain.c: Bump corlib version number.
21866         * image.c (mono_image_addref): New public function.
21868         * assembly.c: Call mono_image_addref.
21870         * reflection.c (mono_module_get_object): Increase reference count of 
21871         the image.
21873         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
21874         Fixes #22532.
21876         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
21877         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
21878         proper exceptions on DllImport problems.
21880 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
21882         * class.c, metadata.c: eliminate CSIZE macro.
21884 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
21886         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
21887         * object.h: Added async_callback field in MonoAsyncResult.
21888         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
21889         * verify.c: Added async_callback in MonoAsyncResult layout.
21891 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
21893         * reflection.c (mono_reflection_get_custom_attrs): Add support
21894         for Modules.
21896 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
21898         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
21899         marshalling.
21900         (mono_marshal_method_from_wrapper): Add null pointer check.
21902 2004-01-16  Martin Baulig  <martin@ximian.com>
21904         * debug-mono-symfile.h: Set version number to 36 and reflect
21905         latest symbol writer changes.
21907 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
21909         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
21910         multi-dimensional arrays.
21911         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
21912         (mono_class_from_mono_type): Use bounded_array_class_get.
21913         
21914         * class.c (mono_bounded_array_class_get): New function which takes
21915         a 'bounded' bool argument to distinguish vectors from one dimensional
21916         arrays.
21918         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
21919         bounded_array_class_get if the array has bounds.
21921         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
21922         Search modules loaded using AssemblyBuilder:AddModule as well.
21924 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21926         * appdomain.c: increased corlib version.
21927         * filewatcher.c: removed g_print.
21928         * icall.c:
21929         (get_property_info): only allocate what is actually requested.
21930         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
21932 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21934         * Makefile.am: added filewatcher.[ch]
21935         * filewatcher.[ch]: FileSystemWatcher runtime support.
21936         * icall.c: added new FSW icalls.
21938 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
21940         * string-icalls.c: fix stringbuilder regression as suggested by
21941         Iain McCoy <iain@mccoy.id.au>.
21943 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
21945         * process.c (process_read_stringtable_block): Recognize '007f' as
21946         a language neutral stringtable block.
21948 2004-01-12  Patrik Torstensson
21950         * object.h (MonoStringBuilder) : Changed layout to support our
21951         new stringbuilder class.
21952         * marshal.c: Change marshalling to support the new layout of 
21953         string builder.
21954         * appdomain.c: increased version number because new layout of
21955         string builder.
21957 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
21959         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
21960         assembly name as an string instead of an AssemblyName, since it is
21961         easier to extract info from it.
21963         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
21964         the culture subdirectories too. Fixes #52231.
21966 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21968         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
21969         It takes 2 new parameters with an optional name for the method to look
21970         for and case ignoring info.
21972         * threadpool.c: removed unused variable.
21974 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21976         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
21977         It takes 2 new parameters with an optional name for the property to look
21978         for and case ignoring info.
21979         Fixes bug #52753.
21981 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
21983         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
21984         Fix #52451.
21986 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21988         * appdomain.c:
21989         * assembly.c: escape the uri before passing it to g_filename_from_uri.
21990         Fixes bug #52630.
21992 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
21994         * reflection.c: Add support for more than one unmanaged resource.
21996         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
21997         in field->def_value, as done in all other cases.
21999         * reflection.c (mono_reflection_get_custom_attrs): Add support for
22000         TypeBuilders.
22002         * reflection.c (mono_reflection_create_runtime_class): Remove 
22003         errorneous assignment to klass->element_class, since it is already
22004         done in mono_reflection_setup_internal_class.
22006 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22008         * gc.c: added missing LeaveCriticalSection.
22009         * icall.c: indented a couple of lines.
22010         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
22011         if we call EndInvoke inside a callback. Fixes bug #52601.
22013 2004-01-07  Martin Baulig  <martin@ximian.com>
22015         * mono-debug-debugger.h
22016         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
22018 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
22020         * appdomain.c: Use messages in NotImplementedException.
22022         * exception.c (mono_get_exception_not_implemented): Now this takes
22023         a message argument.
22025         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
22026         exception instead of g_asserting an aborting when something is not
22027         implemented.
22029         Add some inline docs.
22031 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
22033         * reflection.h: Update after changes to object layout.
22035         * reflection.c: Implement saving of unmanaged aka win32 resources.
22037         * appdomain.c: Bump version number.
22039         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
22040         Handle missing domains gracefully.
22042 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
22044         * file-io.c : On Windows, there are much more invalid_path_chars.
22046 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
22048         * class.h, object.c: prepare for GetType () speedup.
22050 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
22052         * profiler.c: workaround for --profile null reference exception on
22053           cygwin. Patch by Patrik Torstensson.
22055 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
22057         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
22058         make work for unaligned access.
22060 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
22062         * class.c: small cleanup (class->fields [i] -> field).
22063         * image.c: check address of metadata is valid.
22065 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
22067         * assembly.h assembly.c (mono_assembly_loaded): New public function to
22068         search the list of loaded assemblies.
22070         * reflection.c (mono_reflection_type_from_name): Use 
22071         mono_assembly_loaded instead of mono_image_loaded.
22073         * reflection.c: Fix warnings.
22075 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
22077         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
22078         is dynamic. This is needed since an assembly can contain both dynamic and
22079         non-dynamic images.
22081         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
22082         assembly->dynamic.
22084         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
22086         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
22087         to store modules loaded using AddModule.
22089         * reflection.c (mono_image_fill_file_table): Generalize this so it works
22090         on Modules.
22092         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
22094         * reflection.c (mono_image_fill_export_table_from_module): New function to
22095         fill out the EXPORTEDTYPES table from a module.
22097         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
22098         into a separate function. Also handle loaded non-dynamic modules.
22100         * reflection.c (mono_image_basic_init): Fix memory allocation.
22102         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
22104         * assembly.c (mono_assembly_load_references): Make this public.
22106 2003-12-19  Martin Baulig  <martin@ximian.com>
22108         * class.c (mono_class_initialize_generic): Made this static, take
22109         a `MonoGenericInst *' instead of a `MonoClass *'.
22110         (mono_class_from_generic): Call mono_class_initialize_generic()
22111         unless we're already initialized or being called from
22112         do_mono_metadata_parse_generic_inst().
22114         * class.h (MonoGenericInst): Added `initialized' and
22115         `init_pending' flags.
22117         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
22118         `mono_class_init (gklass)' or mono_class_initialize_generic()
22119         here; set `generic_inst->init_pending' while parsing the
22120         `type_argv'.
22122 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
22124         * locales.c: include string.h for memxxx prototypes
22126 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
22128         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
22129         constructor when accessing literal fields.
22131 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
22133         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
22135         * reflection.c (assembly_add_resource_manifest): New function to fill
22136         the MANIFESTRESOURCE table.
22138         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
22140         * reflection.h: Update to changes in class layout.
22142         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
22143         Reenable call to mono_runtime_is_shutting_down ().
22145         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
22146         determine if the runtime is shutting down.
22148 2003-12-16  Jackson Harper <jackson@ximian.com>
22150         * icall.c: comment out call to mono_runtime_is_shutting_down to
22151         fix build.
22152         
22153 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
22155         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
22156         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
22158 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
22160         * reflection.c: move definition of swap_with_size
22161         to before its first call
22163 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
22165         * appdomain.c (mono_runtime_is_shutting_down): New public function.
22167         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
22168         icall.
22170         * object.c: Fix warnings.
22172         * icall.c (ves_icall_Type_Get...): Only consider inherited static
22173         members if FlattenHierarchy is set.
22175         * reflection.c (mono_image_add_decl_security): New function to emit
22176         declarative security.
22178         * reflection.h reflection.c: Add support for declarative security.
22180         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
22181         
22182 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
22184         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
22185         
22186         * appdomain.c verify.c: Moved corlib version checking into its own
22187         function in appdomain.c since it needs to create vtables etc.
22189 2003-12-13  Patrik Torstensson <p@rxc.se>
22191         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
22192         instead of unwrapped server.
22194 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
22196         * verify.c (check_corlib): Fix field index.
22198 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
22200         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
22201         GetGacPath icall.
22203 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
22205         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
22206         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
22207         cope with sizeof(size_t) != sizeof(guint32).
22209 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22211         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
22212         in case of failure.
22214 2003-12-10  Mark Crichton <crichton@gimp.org>
22216         * icall.c: removed the GetNonZeroBytes.  We now handle this case
22217         in managed code.
22219         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
22221 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
22223         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
22224         marked as deleted.
22226 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
22228         * verify.c (check_corlib): Handle the case when the version field is 
22229         initialized by a static constructor.
22231 2003-12-08  Patrik Torstensson  <p@rxc.se>
22233     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
22235 2003-12-08  Martin Baulig  <martin@ximian.com>
22237         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
22238         a MonoReflectionGenericParameter, also take the parameter index
22239         and name as arguments.
22240         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
22241         (ves_icall_MonoGenericParam_initialize): New interncall.
22242         (ves_icall_Type_make_byref_type): New interncall.
22244         * reflection.h (MonoReflectionGenericParam): Derive from
22245         MonoReflectionType, not just from MonoObject.  Added `refobj' and
22246         `index' fields.
22248         * reflection.c (mono_reflection_define_generic_parameter): Create
22249         and return a new MonoReflectionGenericParam; don't initialize the
22250         constraints here.
22251         (mono_reflection_initialize_generic_parameter): New public method;
22252         initializes the constraints and creates the `param->pklass'.
22254 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
22256         * reflection.h reflection.c: Use the new fields 'num_types', 
22257         'num_fields' and 'num_methods' to track the number of types etc.
22259         * verify.c (check_corlib): Check corlib version number.
22261 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
22263         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
22264         function works on all methods.
22266 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
22268         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
22269         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
22270         the custom_type_info flag of the transparent proxy.
22271         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
22272         objects that supports IRemotingTypeInfo.
22273         * object.h: Added custom_type_info field in transparent proxy.
22275 2003-12-06  Martin Baulig  <martin@ximian.com>
22277         * class.c (mono_class_create_from_generic): Removed.
22278         (mono_class_from_generic): Check `ginst->klass' before doing
22279         anything else.  This is important to fully support "recursive"
22280         generic types.
22282         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
22283         empty `generic_inst->klass' before doing anything else.
22285 2003-12-06  Dick Porter  <dick@ximian.com>
22287         * verify.c: 
22288         * object.h:
22289         * icall.c:
22290         * locales.c: Use C structs to access class fields.  Don't do a
22291         conversion between MonoString and UChar because both are
22292         platform-endian UTF-16.  Compare now takes startindex and count
22293         parameters.  Add a char overload for IndexOf.  Speed up the
22294         invariant string IndexOf.
22296 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
22298         * Makefile.am (monosn_LDADD): Fix parallel build.
22300 2003-12-04  Martin Baulig  <martin@ximian.com>
22302         * icall.c
22303         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
22304         (ves_icall_Type_make_array_type): New interncall.       
22306 2003-12-04  Martin Baulig  <martin@ximian.com>
22308         * locales.c: also change it in the !HAVE_ICU case.
22310 2003-12-04  Dick Porter  <dick@ximian.com>
22312         * icall.c:
22313         * locales.c: construct_compareinfo is now in CompareInfo, not
22314         CultureInfo.
22316 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
22318         * image.c (mono_image_load_file_for_image): Cache loaded images in the
22319         image->files array.
22321         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
22322         table as well.
22324         * assembly.c (mono_assembly_load_references): Only load references
22325         once.
22327         * class.c (mono_class_from_name): Avoid linear search of the 
22328         EXPORTEDTYPE table.
22330         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
22332 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
22334         * image.h (MonoImage): Add 'field_cache' field.
22336         * loader.c (mono_field_from_token): Cache field lookups.
22337         
22338         * reflection.c (mono_module_get_object): Fix name property.
22340         * icall.c (ves_icall_get_enum_info): Update after changes to 
22341         mono_metadata_get_constant_index ().
22343         * icall.c: Get rid of get_type_info icall, use a separate icall for
22344         each type property to avoid needless memory allocations. Fixes #51514.
22346         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
22347         to avoid needless binary searches.
22349         * class.c (class_compute_field_layout): Move the initialization of
22350         field->def_value to mono_class_vtable ().
22352         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
22353         non-corlib types.
22355         * object.c (mono_object_allocate): Make it inline.
22357         * object.c (mono_object_allocate_spec): Make it inline.
22358         
22359 2003-12-02  Dick Porter  <dick@ximian.com>
22361         * locales.c (create_NumberFormat): NumberFormatInfo construction.
22362         Patch by Mohammad DAMT (mdamt@cdl2000.com).
22364 2003-12-01  Dick Porter  <dick@ximian.com>
22366         * threads.c: Fix signature and call in CreateMutex and
22367         CreateEvent.
22369 2003-12-01  Dick Porter  <dick@ximian.com>
22371         * icall.c: 
22372         * locales.c: Implement string compares and searching
22374         * object.h: Add extra Thread field
22376 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
22378         * reflection.c (fixup_method): Add support for MonoCMethod.
22380 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
22382         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
22384         * reflection.c (assembly_name_to_aname): Allow extra characters in
22385         assembly names. Fixes #51468.
22387 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
22389         * exception.c (mono_exception_from_name_domain): New helper function.
22391         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
22392         exception object in the correct domain.
22394         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
22395         formatting + make a copy a the input data.
22397         * loader.c (mono_get_method_from_token): Methods which contain
22398         native code do not have entries in the ImplMap.
22400         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
22401         Thanks to Gonzalo for spotting this.
22402         
22403         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
22404         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
22406         * assembly.h (mono_assembly_load_from): Split the second part of 
22407         assembly loading into a new public function.
22409         * exception.h (mono_get_exception_bad_image_format): New function.
22411 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
22413         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
22414         Enumerate all modules inside a dynamic assembly. Fixes #51293.
22415         
22416         * icall.c: Add new icall for creating dynamic methods.
22418         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
22420         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
22422         * reflection.c (mono_reflection_create_dynamic_method): New icall to
22423         create a dynamic method.
22425         * reflection.c (resolve_object): New helper function.
22427         * reflection.c: Generalize ReflectionMethodBuilder and the functions
22428         which manipulate it so they can also work on dynamic methods.
22430         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
22431         creating the MonoReflectionMethodAux structure if it is not needed.
22432         
22433         * reflection.h verify.c: Update after changes to object layout.
22435         * reflection.c (method_builder_encode_signature): Fix compilation on
22436         gcc 2.95.x.
22438 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
22440         * appdomain.h: Added support for context static fields. Added static_data
22441           field to MonoAppContext and renamed thread_static_fields to a more
22442           generic special_static_fields in MonoAppDomain, since it can now contain
22443           context static fields.
22444         * domain.c: Updated hashtable name.
22445         * object.c: Replaced field_is_thread_static() for a more generic
22446           field_is_special_static() which also checks for context static attribute.
22447           In mono_class_vtable(), added support for static context fields.
22448         * threads.c: Changed methods that manage thread static fields to more
22449           generic methods so they can be reused both for thread and context static
22450           data.
22451         * threads.h: Declared some new methods.
22453 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
22455         * reflection.h: Update after changes to the managed types.
22457         * reflection.c (encode_custom_modifiers): New helper function.
22459         * reflection.c (method_encode_signature): Emit custom modifiers.
22461         * reflection.c (field_encode_signature): Emit custom modifiers.
22463 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
22465         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
22467         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
22468         implementation.
22470         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
22471         icall.
22473         * object.c (mono_field_get_value_object): New function.
22475         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
22476         specific.
22478 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
22480         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
22481         return a preallocated out-of-memory exception instance.
22483         * object.c (out_of_memory): Use the new function.
22485         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
22486         flag is before the custom modifiers. Fixes #49802.
22488 2003-11-16  Martin Baulig  <martin@ximian.com>
22490         * class.c (mono_class_is_open_constructed_type): Implemented the
22491         MONO_TYPE_GENERICINST case.
22493 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
22495         * assembly.c (mono_assembly_fill_assembly_name): New function to
22496         fill out the MonoAssemblyName structure.
22497         (mono_assembly_open): Use the new function.
22499         * icall.c (fill_reflection_assembly_name): New helper function.
22501         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
22502         new function.
22504         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
22506 2003-11-15  Martin Baulig  <martin@ximian.com>
22508         * class.c (mono_class_is_open_constructed_type): New public
22509         function; checks whether a type is an open constructed type,
22510         ie. whether it still contains type parameters.
22511         (mono_class_inflate_generic_type): If we're a type parameter and
22512         the inflated type is also a MONO_TYPE_(M)VAR, return the original
22513         type.
22515         * class.h (MonoGenericInst): Added `guint32 is_open'.
22517         * loader.c (method_from_methodspec): Check whether we're an open
22518         or closed constructed type and set `ginst->is_open'.
22520         * reflection.c (mono_reflection_bind_generic_parameters): Check
22521         whether we're an open or closed constructed type and set
22522         `ginst->is_open'.
22523         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
22524         from open constructed types.
22526 2003-11-15  Martin Baulig  <martin@ximian.com>
22528         * reflection.c (mono_reflection_bind_generic_parameters): If we're
22529         a generic instance (instead of a generic type declaration) with
22530         unbound generic parameters, bind them to our actual types.
22532 2003-11-14  Martin Baulig  <martin@ximian.com>
22534         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
22536         * reflection.c (mono_reflection_bind_generic_parameters): If we're
22537         an interface type, populate `res->interfaces' with instantiated
22538         versions of all the interfaces we inherit.
22540 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
22542         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
22543         when MONO_PATH is set but doesn't contain the install dir.
22545 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22547         * icall.c:
22548         (ves_icall_Type_GetInterfaces): don't return an interface twice when
22549         it's also implemented in base classes. Fixes bug #50927.
22551 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
22553         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
22554         if this method is called from a finalizer. Fixes #50913.
22556 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
22558         * threads.c: Implement VolatileRead/VolatileWrite
22560         * icall.c: Add new icalls for VolatileRead/VolatileWrite
22562 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
22564         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
22565         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
22566         2.95.3.
22568         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
22569         from Peter Ross (pro@missioncriticalit.com).
22570         
22571 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
22573         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
22575 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
22577         * assembly.c (mono_assembly_load_references): Disable check because it
22578         triggers on older corlibs which lots of people have.
22580 2003-11-12  Jackson Harper  <jackson@ximian.com>
22582         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
22583         load corlib.dll if mscorlib.dll is not found.
22584         * assembly.h: Remove corlib name define.
22585         * class.c:
22586         * domain.c:
22587         * image.c: Change corlib name to mscorlib.
22588         
22589 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
22591         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
22593 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
22595         * appdomain.h: Added loader_optimization here to sync with the C#
22596         code, and add disallow_binding_redirects field.
22598 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
22600         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
22602         * reflection.c (mono_image_build_metadata): Fix crash on modules
22603         with no types.
22605         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
22607         * icall.c (ves_icall_get_method_info): Return callingConvention as
22608         well.
22610         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
22611         namespaces from the EXPORTEDTYPE table as well.
22613         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
22614         from all modules inside the assembly.
22615         
22616 2003-11-11  Martin Baulig  <martin@ximian.com>
22618         * reflection.c (mono_reflection_bind_generic_parameters): Make
22619         this work for interfaces.
22621 2003-11-11  Martin Baulig  <martin@ximian.com>
22623         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
22625 2003-11-11  Martin Baulig  <martin@ximian.com>
22627         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
22628         "MonoInflatedMethod" and "MonoInflatedCtor".
22630 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
22632         * reflection.c (resolution_scope_from_image): Use the assembly table
22633         from the manifest module, since other modules don't have it.
22635         * debug-helpers.c (mono_type_full_name): New helper function.
22637         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
22639         * image.c (mono_image_load_file_for_image): New public function which
22640         is a replacement for the load_file_for_image in class.c.
22642         * assembly.c (mono_assembly_load_module): A wrapper for the function
22643         above which does assembly association and reference loading too.
22645         * class.c (mono_class_from_name): Call mono_assembly_load_module.
22647 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22649         * appdomain.c: not all of the attributes for the full assembly name
22650         are required and the order doesn't matter. Fixes bug #50787.
22652 2003-11-10  Dick Porter  <dick@ximian.com>
22654         * locales.c: Use platform-endian UTF16
22656 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
22658         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
22659         
22660 2003-11-10  Martin Baulig  <martin@ximian.com>
22662         * metadata.c
22663         (mono_metadata_load_generic_params): Make this actually work.
22665         * reflection.c (mono_reflection_bind_generic_parameters): If our
22666         parent is a generic instance, pass all the `types' to it, no
22667         matter whether it has the same number of type parameters or not.
22669 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
22671         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
22673         * assembly.c (mono_assembly_load_references): Move the image<->assembly
22674         assignment code to this function so it gets called recursively for all
22675         modules.
22677         * image.c (load_modules): Remove the assembly assignment since it is
22678         now done by mono_assembly_load_references.
22679         
22680         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
22681         Add 'module' argument.
22682         (mono_module_get_types): New helper function.
22683         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
22685 2003-11-08  Martin Baulig  <martin@ximian.com>
22687         * class.c (mono_class_inflate_generic_method): Interface method
22688         don't have a header.
22690         * reflection.c (mono_image_get_methodspec_token): Take an
22691         additional `MonoGenericInst *' argument instead of reading it from
22692         the header; this is necessary to support interfaces.
22693         (mono_image_create_token): Pass the `MonoGenericInst *' from the
22694         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
22695         (inflated_method_get_object): Take an additional `MonoGenericInst *'
22696         argument.
22698         * reflection.h (MonoReflectionInflatedMethod): Added
22699         `MonoGenericInst *ginst'.
22701 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
22703         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
22705 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
22707         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
22709 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
22711         * reflection.c 
22712         (reflection_methodbuilder_from_method_builder):
22713         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
22714         initialize a ReflectionMethodBuilder structure.
22715         (mono_image_get_methodbuilder_token):
22716         (mono_image_get_ctorbuilder_token): New functions to emit memberref
22717         tokens which point to types in another module inside the same assembly.
22719         * reflection.c: Use the new helper functions.
22720         
22721         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
22723         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
22724         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
22726         * reflection.c (resolution_scope_from_image): Emit a moduleref if
22727         neccesary.
22729         * reflection.c (mono_image_build_metadata): Emit metadata only for the
22730         current module. Emit the manifest only for the main module.
22732         * reflection.c (mono_image_create_token): Add assertion when a 
22733         memberref needs to be created.
22735         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
22737         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
22738         larger buffer for the custom attribute blob. Fixes #50637.
22739         
22740 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22742         * threadpool.c: notify listener on async processing handles after
22743         invoking the async callback. Thanks to Zoltan.
22745 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
22747         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
22748         avoid code duplication.
22750         * reflection.h (MonoDynamicImage): New type which is currently unused,
22751         but will be used through the ref.emit code in place of 
22752         MonoDynamicAssembly.
22754         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
22755         object layout.
22757         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
22758         a MonoDynamicImage instead of just a MonoImage.
22759         
22760         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
22761         icalls to ModuleBuilder but keep their semantics, so they will work
22762         with moduleb->assemblyb. This will change later.
22763         
22764 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
22766         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
22767         object layout.
22769         * reflection.c (mono_image_build_metadata): Avoid creation of a default
22770         main module, since it is now done by the managed code.
22772 2003-11-03  Martin Baulig  <martin@ximian.com>
22774         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
22775         `ginst->klass' here.
22776         (method_encode_methodspec): Don't use the `ginst->generic_method's
22777         klass if it's a generic instance, use `ginst->klass' in this case.
22779 2003-11-03  Martin Baulig  <martin@ximian.com>
22781         * reflection.c (mono_image_get_generic_method_param_info):
22782         Removed, use mono_image_get_generic_param_info() instead.
22783         (mono_image_get_type_info): Write the GenericParam table before
22784         the Method table.  This is neccessary because in the GenericParam
22785         table, type parameters of the class (ie. '!0' etc.) must come
22786         before the ones from its generic methods (ie. '!!0' etc).
22788 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
22790         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
22792 2003-11-02  Martin Baulig  <martin@ximian.com>
22794         * reflection.c (create_generic_typespec): Take a
22795         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
22796         the generic parameters from it.
22798 2003-11-02  Martin Baulig  <martin@ximian.com>
22800         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
22801         instead of a `MonoClassField *' since we just need the type.
22802         (create_generic_typespec): New static function.  Creates a
22803         TypeSpec token for a generic type declaration.
22804         (mono_image_get_generic_field_token): New static function.
22805         (mono_image_create_token): If we're a FieldBuilder in a generic
22806         type declaration, call mono_image_get_generic_field_token() to get
22807         the token.
22809 2003-11-02  Martin Baulig  <martin@ximian.com>
22811         * reflection.h
22812         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
22813         `MonoReflectionGenericInst *declaring_type' and
22814         `MonoReflectionGenericInst *reflected_type' fields.
22816         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
22817         `MonoReflectionGenericInst *declaring_type' and a
22818         `MonoReflectionGenericInst *reflected_type' argument instead of a
22819         single `MonoReflectionGenericInst *type' one.  Set
22820         `res->declaring_type' and `res->reflected_type' from them.
22821         (mono_reflection_inflate_field): Likewise.      
22823 2003-11-02  Martin Baulig  <martin@ximian.com>
22825         * class.c (mono_class_setup_vtable): Don't store generic methods
22826         in the vtable.  
22828 2003-11-02  Martin Baulig  <martin@ximian.com>
22830         * reflection.h (MonoReflectionGenericInst): Added
22831         `MonoReflectionType *declaring_type'.
22833         * reflection.c (mono_reflection_bind_generic_parameters): Use
22834         `if (tb->parent)' instead of `klass->parent'.
22836 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
22838         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
22839         with an empty ASSEMBLY table.
22841         * reflection.c (mono_image_build_metadata): Avoid using the same loop
22842         variable in the inner and outer loops.
22844 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
22846         * metadata.h (mono_metadata_make_token): Put parentheses around macro
22847         argument.
22849         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
22850         
22851         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
22852         icalls. Instead, do everything in managed code. This is needed since
22853         it is hard to restore the original domain etc. in unmanaged code in the
22854         presence of undeniable exceptions.
22856         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
22857         New icalls to push and pop appdomain refs.
22859 2003-10-31  Martin Baulig  <martin@ximian.com>
22861         * class.c (inflate_generic_type): Renamed to
22862         mono_class_inflate_generic_type() and made it public.
22864         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
22865         New interncall.
22867         * loader.c (mono_field_from_memberref): Also set the retklass for
22868         typespecs.
22870         * fielder.c (mono_image_get_inflated_field_token): New static
22871         method; creates a metadata token for an inflated field.
22872         (mono_image_create_token, fixup_method): Added support for
22873         "MonoInflatedField".
22874         (fieldbuilder_to_mono_class_field): New static function.
22875         (mono_reflection_inflate_field): New public function.
22877         * reflection.h
22878         (MonoReflectionGenericInst): Added `MonoArray *fields'.
22879         (MonoReflectionInflatedField): New typedef.     
22881 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
22883         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
22884         for Solaris and other platforms without s6_addr16
22886 2003-10-30  Martin Baulig  <martin@ximian.com>
22888         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
22889         argument instead of two.
22890         (mono_class_inflate_generic_signature): Likewise.
22891         (inflate_generic_header): Likewise.
22892         (mono_class_inflate_generic_method): Likewise.  In addition, if
22893         `ginst->klass' is set, it becomes the new `method->klass'.
22895         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
22896         field.
22898         * reflection.c (encode_generic_method_sig): Write a 0xa as the
22899         first byte. [FIXME]
22900         (method_encode_methodspec): If we have generic parameters, create
22901         a MethodSpec instead of a MethodRef.
22902         (fixup_method): Added support for "MonoInflatedMethod" and
22903         "MonoInflatedCtor".
22904         (mono_image_create_token): Added support for "MonoInflatedMethod"
22905         and "MonoInflatedCtor".
22906         (inflated_method_get_object): New static function; returns a
22907         managed "System.Reflection.MonoInflatedMethod" object.
22908         (mono_reflection_bind_generic_method_parameters): Return a
22909         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
22910         (mono_reflection_inflate_method_or_ctor): Likewise.
22911         (mono_image_get_generic_method_param_info): Initialize unused
22912         fields to zero.
22913         (mono_image_get_generic_param_info): Likewise.
22915         * reflection.h (MonoReflectionInflatedMethod): New public
22916         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
22917         "S.R.MonoInflatedCtor" classes.
22919         * loader.c (method_from_memberref): If we're a TypeSpec and it
22920         resolves to a generic instance, inflate the method.
22922 2003-10-28  Dick Porter  <dick@ximian.com>
22924         * object.c (mono_runtime_run_main): Convert command-line arguments
22925         into utf8, falling back to the user's locale encoding to do so.
22927 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
22929         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
22930         at this time.
22932         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
22934         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
22935         up icalls at method definition time. Partially fixes #33569.
22937 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
22939         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
22940         marshalling of arrays. Fixes #50116.
22942         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
22944         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
22945         points to a vtable in the dying appdomain.
22947         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
22948         listeners into unmanaged code inside the lock.
22950         * object.c (mono_class_vtable): Turn off typed allocation in non-root
22951         domains and add some comments.
22953 2003-10-25  Martin Baulig  <martin@ximian.com>
22955         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
22957         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
22959         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
22960         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
22961         currently parsing.  Create the generic class and store it in
22962         `generic_inst->klass' before parsing the type arguments.  This is
22963         required to support "recursive" definitions; see mcs/tests/gen-23.cs
22964         for an example.
22965         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
22966         to support recursive typespec entries.
22968         * class.c (mono_class_setup_parent): If our parent is a generic
22969         instance, we may get called before it has its name set.
22970         (mono_class_from_generic): Splitted into
22971         mono_class_create_from_generic() and mono_class_initialize_generic().
22973 2003-10-25  Martin Baulig  <martin@ximian.com>
22975         * icall.c (ves_icall_Type_BindGenericParameters): Return a
22976         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
22977         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
22978         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
22980         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
22981         (create_typespec): Likewise.
22982         (mono_reflection_bind_generic_parameters): Return a
22983         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
22984         (mono_reflection_inflate_method_or_ctor): New public function.
22986         * reflection.h (MonoReflectionGenericInst): New typedef.        
22988 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
22990         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
22991         inside the domain lock. Fixes #49993.
22992         
22993         * object.c (mono_class_vtable): When typed allocation is used, 
22994         allocate vtables in the GC heap instead of in the mempool, since the
22995         vtables contain GC descriptors which are used by the collector even
22996         after the domain owning the mempool is unloaded.
22998         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
23000         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
23001         reflect what it does. Also invalidate mempools instead of freeing
23002         them if a define is set.
23004         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
23005         of the appdomain.
23006         
23007         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
23008         hold the finalizable objects in this domain.
23010         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
23011         appdomain.
23013         * appdomain.c (mono_domain_set): New function to set the current
23014         appdomain, but only if it is not being unloaded.
23016         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
23017         appdomain which is being unloaded.
23018         
23019         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
23020         unloading of the root appdomain.
23022         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
23023         icall to execute a method in another appdomain. Intended as a 
23024         replacement for InternalSetDomain, which can confuse the code 
23025         generation in the JIT.
23027         * appdomain.c (mono_domain_is_unloading): New function to determine
23028         whenever an appdomain is unloading.
23030         * appdomain.c (mono_domain_unload): New function to correctly unload
23031         an appdomain.
23033         * assembly.c (mono_assembly_load_references): Check that an assembly
23034         does not references itself.
23036         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
23037         domain manually, it asks the finalizer thread to do it, then waits for
23038         the result. Also added a timeout.
23040         * icall.c: Register the new icalls.
23042         * threads.h threads.c: Export the mono_gc_stop_world and 
23043         mono_gc_start_world functions.
23044         
23045         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
23046         function to fill out the mempool with 0x2a.
23048 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
23050         * reflection.h (MonoReflectionMethodAux): New structure to store
23051         information which is rarely used, thus is not in the MonoMethod
23052         structure.
23054         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
23055         store the aux info.
23057         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
23058         and marshalling info into the aux structure.
23060         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
23061         from the aux structure.
23063         * loader.c (mono_method_get_param_names): Retrieve the param names from
23064         the aux structure.
23065         
23066 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
23068         * exception.h exception.c: Add AppDomainUnloadedException && fix 
23069         warning.
23071 2003-10-21  Dick Porter  <dick@ximian.com>
23073         * socket-io.c
23074         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
23075         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
23077 2003-10-21  Martin Baulig  <martin@ximian.com>
23079         * reflection.c (mono_reflection_bind_generic_parameters):
23080         `klass->parent' is NULL for interfaces.
23082 2003-10-21  Martin Baulig  <martin@ximian.com>
23084         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
23086 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
23088         * exception.c (mono_exception_from_name_msg): New helper function for
23089         creating exceptions and initializing their message field.
23091         * exception.c: Simplify functions using the new helper.
23093         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
23094         New function.
23096         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
23097         mono_raise_exception, since otherwise gcc doesn't generate the function
23098         epilog for raise_exception, confusing the stack unwinding in the JIT.
23099         Fixes #45043.
23101         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
23102         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
23103         Fixes #49499.
23105 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23107         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
23108         utf8.
23110 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
23112         * icall.c: Removed GetUninitializedObject method because
23113           AllocateUninitializedClassInstance does the same.
23115 2003-10-18  Martin Baulig  <martin@ximian.com>
23117         * class.c (inflate_generic_signature): Renamed to
23118         mono_class_inflate_generic_signature() and made it public.
23119         (my_mono_class_from_generic_parameter): New static function; if we
23120         don't already have the generic parameter's MonoClass, create a
23121         very simple one which is just used internally in the runtime and
23122         not passed back to managed code.
23124         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
23126         * metadata.h (MonoMethodSignature): Moved the
23127         `MonoGenericParam *gen_params' to the MonoMethodHeader.
23128         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
23130         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
23131         ves_icall_MonoMethod_GetGenericArguments(); this is now an
23132         interncall on the MonoMethod class, not on MethodInfo.
23133         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
23134         calling mono_reflection_bind_generic_method_parameters() directly.
23136         * loader.c (mono_method_get_signature): If this is a MethodSpec;
23137         return the already computed `method->signature'.
23138         (method_from_methodspec): New static function to load a method
23139         from a MethodSpec entry.
23140         (mono_get_method_from_token): Call the new method_from_methodspec()
23141         for MethodSpec tokens.  
23142         (mono_get_method_from_token): If we're a generic method, load the
23143         type parameters.
23145         * reflection.c (mono_image_get_memberref_token): Allow
23146         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
23147         table.
23148         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
23149         (mono_image_create_token): First check whether it's a generic
23150         method (so we'd need to create a MethodSpec), then do the other
23151         two alternatives.
23152         (mono_reflection_bind_generic_method_parameters): Return a
23153         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
23154         called directly from the interncall.
23156 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
23158         * reflection.c (load_public_key): Move loading of the public key
23159         into managed code.
23161         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
23163         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
23164         fields.
23166         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
23167         culture, hash_alg and public_key. Fixes #49555.
23169 2003-10-17  Martin Baulig  <martin@ximian.com>
23171         * class.h (MonoGenericInst): Moved this declaration here and added
23172         `MonoMethod *generic_method'.
23174         * icall.c
23175         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
23176         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
23178         * metadata.c (mono_metadata_type_equal): Two types of
23179         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
23180         index; ie. don't compare the address of the `MonoGenericParam'
23181         structure.
23182         (mono_metadata_load_generic_params): Removed the `MonoMethod
23183         *method' argument.
23185         * metadata.h (MonoGenericInst): Moved declaration to class.h.
23186         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
23188         * reflection.c (method_encode_signature): Encode the number of
23189         generic parameters.
23190         (encode_generic_method_sig): New static function.
23191         (method_encode_methodspec): New static function; creates an entry
23192         in the MethodSpec table for a generic method.
23193         (mono_image_get_methodspec_token): New static function.
23194         (mono_image_create_token): Call mono_image_get_methodspec_token()
23195         for generic methods.
23196         (mono_reflection_bind_generic_method_parameters): New public
23197         function.  Instantiates a generic method.
23199 2003-10-16  Martin Baulig  <martin@ximian.com>
23201         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
23202         *gen_params' here from MonoMethodHeader.
23204         * metadata.c (mono_metadata_parse_method_signature): If we have
23205         generic parameters, initialize `method->gen_params' and then set
23206         the correct `type->data.generic_param' in all the parameters.
23208 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
23210         * threads.c (mono_threads_get_default_stacksize): New function to 
23211         return the default stacksize.
23213         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
23214         termination of the finalizer thread, since the previous method had
23215         race conditions. Fixes #49628.
23217         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
23218         as for the other managed threads.
23220 2003-10-16  Martin Baulig  <martin@ximian.com>
23222         * class.c (inflate_generic_signature): Copy `generic_param_count'
23223         and `gen_params'.
23225         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
23226         New interncall.
23228         * metadata.c (mono_metadata_parse_method_signature): Actually set
23229         the `method->generic_param_count' here.
23230         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
23232 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
23234         * object.h: Add a new field to TypedRef to simplify the implementation
23235         of the REFANY opcodes in the JIT.
23237         * icall.c: Make use of the new field.
23239         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
23240         dynamically.
23242 2003-10-15  Martin Baulig  <martin@ximian.com>
23244         * class.c (mono_class_from_gen_param): Renamed to
23245         mono_class_from_generic_parameter() and moved most of the
23246         functionality from mono_reflection_define_generic_parameter()
23247         here; ie. we create a "real" class here.
23248         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
23249         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
23250         previously been called.
23252         * class.h (MonoGenericParam): Moved the declaration of this struct
23253         here from metadata.h and added `MonoMethod *method'.
23255         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
23256         interncall.
23258         * loader.c (mono_get_method_from_token): If we have any generic
23259         parameters, call mono_metadata_load_generic_params() to read them
23260         from the MONO_TABLE_GENERICPAR.
23262         * metadata.c (mono_metadata_load_generic_params): Added
23263         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
23265         * metadata.h (MonoMethodSignature): Replaced
23266         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
23267         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
23269         * reflection.c (mono_reflection_define_generic_parameter): Moved
23270         most of the functionality into the new
23271         mono_class_from_generic_parameter(); set the `method' field if
23272         we're a method parameter.       
23274 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
23276         * marshal.c (emit_struct_conv): if native size is 0
23277         emit no code.
23279 2003-10-14  Martin Baulig  <martin@ximian.com>
23281         * icall.c: The generics API has changed in the spec since it was
23282         added to System.Type; these modifications make it match the spec
23283         again.
23284         (ves_icall_Type_GetGenericParameters): Renamed to
23285         `ves_icall_Type_GetGenericArguments'.
23286         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
23287         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
23288         `ves_icall_MonoType_get_HasGenericArguments'.
23289         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
23290         `ves_icall_MonoType_get_IsGenericParameter'.
23291         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
23292         this is no interncall anymore.
23293         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
23294         `ves_icall_TypeBuilder_get_IsGenericParameter'.
23296 2003-10-14  Martin Baulig  <martin@ximian.com>
23298         * reflection.c (mono_reflection_bind_generic_parameters): Also
23299         inflate generic methods if we're reading the class from IL.
23301 2003-10-13  Martin Baulig  <martin@ximian.com>
23303         * reflection.c (mono_reflection_define_generic_parameter): This
23304         method isn't called directly from the icall anymore; take a
23305         `MonoReflectionAssemblyBuilder *' so we can use this for type and
23306         method generic parameters.
23307         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
23308         (method_builder_encode_signature): Encode generic parameters.
23309         (mono_image_get_method_info): Write generic params to the
23310         MONO_TABLE_GENERICPARAM table.
23312         * reflection.h (MonoReflectionMethodBuilder): Added
23313         `MonoArray *generic_params'.
23315         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
23317         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
23318         wrapper for mono_reflection_define_generic_parameter().
23319         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
23321 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
23323         * marshal.h: Add missing function to fix build.
23325         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
23326         the SetLastError pinvoke attribute.
23328         * marshal.c (mono_marshal_set_last_error): New helper function called
23329         by the generated code.
23330         
23331         * marshal.c (mono_mb_emit_branch): New helper function.
23333         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
23335         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
23336         classes as parameters and return values of delegates. Fixes #29256. 
23338 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
23340         * locales.c: use gint32 in non HAVE_ICU case
23342 2003-10-11  Martin Baulig  <martin@ximian.com>
23344         * mono-debug.c (mono_debug_add_method): Added a workaround for
23345         bug #48591.
23347 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
23349         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
23350         delegates passed to native code must use the STDCALL calling 
23351         convention. Fixes #35987.
23353 2003-10-10  Martin Baulig  <martin@ximian.com>
23355         * class.c (inflate_generic_type): If we're inflating for a generic
23356         type instance (and not for a generic method), return
23357         MONO_TYPE_MVAR unchanged.
23359 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23361         * string-icalls.c: Join ignores null strings in the source array.
23362         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
23363         * threads.c: GetAvailableTheads is slightly more accurate.
23365 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
23367         * threads.h threads.c : add mono_threads_set_default_stacksize
23368         and pass default to CreateThread calls.
23370 2003-10-09  Dick Porter  <dick@ximian.com>
23372         * icall.c:
23373         * locales.h:
23374         * locales.c: Internal calls for constructing CultureInfo and
23375         related objects from libicu (if its available.)
23377 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
23379         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
23381 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23383         * threadpool.c: added an argument to async_invoke_thread that is the
23384         item to process, pass the MonoAsyncResult to the thread start function
23385         when creating a new thread. This way we don't need to acquire any lock
23386         when we're creating a new thread. Readded a semaphore for faster
23387         response times (instead of that Sleep i added).
23389 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
23391         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
23392         get daylight change dates better on Windows, fix handling
23393         of platforms without tm_gmtoff.
23395 2003-10-06  Martin Baulig  <martin@ximian.com>
23397         * class.c (inflate_generic_method): Renamed to
23398         mono_class_inflate_generic_method() and made public.
23399         (mono_class_init): Don't inflate the generic methods here.
23400         (mono_class_from_generic): Added `gboolean inflate_methods'
23401         argument.  Inflate the methods here.
23403         * loader.c (mono_method_get_param_names): Ignore instances of
23404         generic types for the moment.
23406         * reflection.c (fixup_method): Added support for inflated methods.
23407         (mono_image_create_token): Use mono_image_get_methodref_token()
23408         for inflated methods.
23409         (mono_custom_attrs_from_param): Ignore instances of generic types
23410         for the moment.
23411         (mono_reflection_bind_generic_parameters): New public function.
23412         Moved all the functionality from
23413         ves_icall_Type_BindGenericParameters() here and added support for
23414         dynamic types.
23415         (mono_reflection_define_generic_parameter): Initialize
23416         `klass->methods' here.
23418         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
23419         functionality into mono_reflection_define_generic_parameter().
23420         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
23421         TypeBuilder, return that TypeBuilder.
23423 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23425         * appdomain.c: removed mono_delegate_semaphore.
23427         * threadpool.c:
23428         (mono_thread_pool_add): moved hash table creation inside and the thread 
23429         creation outside of the critical region.
23430         (mono_thread_pool_finish): removed obsolete code.
23431         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
23432         continue or exit the thread depending on the queue.
23434 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
23436         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
23437         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
23438         handle more bool marshalling options
23440 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
23442         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
23443         arrays of structs. Also add a more descriptive error message when
23444         a structure member is marshalled as LPArray.
23446 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
23448         * marshal.c (mono_marshal_get_native_wrapper): Add support for
23449         marshalling arrays of complex types. Fixes #29098. Also remove an
23450         usused and incomplete function.
23452 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
23454         * gc.c: report heap_size - free_bytes as total memory allocated
23455         (bug#49362).
23457 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
23459         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
23460         fix timezone handling problems on Windows.
23461         
23462         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
23463         asserts when the year is outside the range handled by ms the functions.
23465         * class.c (setup_interface_offsets): If the class is an interface,
23466         fill out its interface_offsets slot.
23468 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23470         * threadpool.c: mark threadpool threads as background.
23472 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
23474         * decimal.c - define DECINLINE to nothing if not using GCC
23476 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
23478         * assembly.c: More refcount fixes.
23480 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23482         * string-icalls.c: if we're not trimming, return the same string.
23483         When not splitting, don't create a new string.
23485 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23487         * image.c:
23488         (mono_image_open): increment the ref_count inside the critical section.
23490 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
23492         * image.c (mono_image_open): Fix reference counting bug.
23494 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
23496         * marshal.c (mono_marshal_type_size) struct alignment changed for 
23497         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
23498         64bits. Avoid leak in mono_marshal_get_native_wrapper when
23499         mono_lookup_pinvoke_call throws.        
23501 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
23503         * reflection.c (mono_reflection_parse_type): Fix #49114.
23505         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
23506         temporary workaround for cygwin header problem.
23508         * object.c (mono_object_isinst): Synchronize this with the code
23509         generated by the JIT for casts.
23511 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
23513         * reflection.c (encode_type): Fix #38332.
23515 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
23517         * marshal.c (mono_marshal_method_from_wrapper): New function to return
23518         the original method from the wrapper method.
23520 2003-09-25  Martin Baulig  <martin@ximian.com>
23522         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
23523         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
23524         (ves_icall_Type_get_IsGenericInstance): New interncall.
23526 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
23528         * object.c: fix cast warning in big endian code.
23530 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
23532         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
23533         
23534 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23536         * assembly.c: don't call check_env from mono_assembly_load. It's
23537         already done once in mono_assemblies_init and may cause headaches when
23538         multiple threads are loading assemblies.
23540 2003-09-19  Martin Baulig  <martin@ximian.com>
23542         * reflection.c (mono_reflection_define_generic_parameter): Don't
23543         allocate `klass->methods', set `klass->flags' to
23544         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
23546 2003-09-18  Martin Baulig  <martin@ximian.com>
23548         * class.c (mono_class_init): Don't create `class->methods' if it's
23549         already initialized.
23551         * metadata.c (mono_metadata_load_generic_params): Make this
23552         actually work.
23554         * reflection.c (mono_reflection_define_generic_parameter): Set
23555         parent class and interfaces from the constraints.
23557         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
23558         to keep this struct in sync with the declaration in TypeBuilder.cs.
23560 2003-09-17  Martin Baulig  <martin@ximian.com>
23562         * metadata.h (MonoType): Replaced the data's `int type_param'
23563         field with `MonoGenericParam *generic_param'.
23564         (MonoGenericParam): Added `MonoClass *klass'.
23566         * class.c (mono_class_from_gen_param): Removed the
23567         `MonoImage *image' and `int type_num' arguments.
23569         * metadata.c (mono_metadata_parse_generic_param): New static
23570         method; creates a MonoGenericParam which just contains the index.
23571         (do_mono_metadata_parse_type): Call
23572         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
23573         MONO_TYPE_MVAR.
23575         * reflection.c (mono_image_typedef_or_ref): Generic type
23576         parameters may be in the same assembly, but never use a typedef
23577         for them.
23578         (mono_reflection_define_generic_parameter): We're now creating a
23579         "real" class for the type parameter; it's now safe to call
23580         mono_class_from_mono_type() on the class'es type, it'll do the
23581         right thing.
23583 2003-09-16  Martin Baulig  <martin@ximian.com>
23585         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
23586         `symfile->range_entry_size' and `symfile->class_entry_size' here;
23587         the `symfile' data structure must be fully initialized before it
23588         gets added to the table.
23590 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
23592         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
23594         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
23595         class init trampolines.
23597 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
23599         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
23600         to the built-in profiler to turn off time and allocation profiling
23601         respectively.
23603 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
23605         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
23606         g_direct_equal.
23608         * debug-helpers.c (mono_method_full_name): Print the wrapper type
23609         in human readable form.
23611 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
23613         * reflection.c icall.c: Fixed warnings.
23615         * image.c (load_class_names): Use a temporary hash table to hold the
23616         namespaces in order to avoid doing many string comparisons.
23618         * image.h: Fix typo.
23620         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
23621         Pass NULL instead of g_direct_equal to the GHashTable constructor 
23622         since the NULL case is short-circuited inside g_hash_table_lookup, 
23623         leading to better performance.  
23625         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
23626         obtain the first custom attribute for a given index. Depends on the
23627         CustomAttribute table being sorted by the parent field.
23629         * reflection.c (mono_custom_attrs_from_index): Use the new function 
23630         for better performance.
23632 2003-09-07  Martin Baulig  <martin@ximian.com>
23634         * class.c (mono_class_init): If we're a generic instance, inflate
23635         all our methods instead of loading them from the image.
23636         (mono_class_from_generic): Set `class->methods = gklass->methods'.
23638 2003-09-07  Martin Baulig  <martin@ximian.com>
23640         * mono-debug-debugger.c: Added support for constructors.
23642 2003-09-06  Martin Baulig  <martin@ximian.com>
23644         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
23645         New interncall.
23647         * reflection.c (mono_reflection_setup_generic_class): Call
23648         ensure_runtime_vtable() to create the vtable.
23650 2003-09-05  Martin Baulig  <martin@ximian.com>
23652         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
23653         MONO_TYPE_MVAR.
23655 2003-09-04  Martin Baulig  <martin@ximian.com>
23657         * reflection.c (mono_reflection_define_generic_parameter): Generic
23658         parameters start with zero.
23660 2003-09-04  Martin Baulig  <martin@ximian.com>
23662         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
23664         * reflection.h (MonoReflectionGenericParam): New typedef.
23665         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
23666         the generic parameters from the managed TypeBuilder.
23668         * reflection.c (mono_reflection_define_generic_parameter): New function.
23669         (mono_reflection_create_runtime_class): Encode generic parameters.
23670         (mono_reflection_setup_generic_class): New function; this is
23671         called after adding adding all generic params to the TypeBuilder.
23672         (encode_type): Added MONO_TYPE_VAR.
23674 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
23676         * class.h class.c (mono_class_needs_cctor_run): Moved this method
23677         here from the JIT.
23679         * assembly.h assembly.c: Moved the AOT loading code into an assembly
23680         load hook.
23682 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
23684         * reflection.h reflection.c class.h class.c: Delete duplicate 
23685         definition of mono_type_get_name () from reflection.c and export the
23686         one in class.c.
23688         * class.c: Class loading fixes from Bernie Solomon 
23689         (bernard@ugsolutions.com).
23691         * reflection.c: Endianness fixes from Bernie Solomon 
23692         (bernard@ugsolutions.com).
23693         
23694 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
23696         * assembly.h assembly.c: Define a file format version for AOT
23697         libraries.
23698         
23699         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
23701         * appdomain.h (MonoJitInfo): New field to determine whenever the
23702         code is domain neutral.
23703         
23704 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
23706         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
23708 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
23710         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
23711         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
23712         Avoid caching the result since strings must be domain specific. Fixes
23713         #48050.
23715 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
23717         * marshal.c (mono_marshal_init): Make this callable multiple times
23718         since it is hard to find a correct place to call it.
23720         * object.c (mono_runtime_class_init): Execute static constructors in
23721         the correct appdomain.
23723         * image.c (build_guid_table): Handle the case when multiple images have
23724         the same GUID.
23726 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23728         * icall.c: added a couple of icalls for System.Web.
23730 2003-08-28  Martin Baulig  <martin@ximian.com>
23732         * icall.c (ves_icall_Type_BindGenericParameters): Use
23733         `klass->generic_inst' instead of `&klass->byval_arg' in the
23734         mono_type_get_object() call.  The returned type must be
23735         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
23737 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
23739         * NOTES: New file.
23741         * object.c (mono_class_proxy_vtable): Make it thread safe.
23743         * pedump.c: Fix warning.
23745         * object.c appdomain.h: Get rid of metadata_section. 
23746         It is no longer needed and it was causing deadlocks with domain->lock.
23748         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
23750 2003-08-26  Martin Baulig  <martin@ximian.com>
23752         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
23754 2003-08-26  Martin Baulig  <martin@ximian.com>
23756         * pedump.c (main): Call mono_metadata_init(),
23757         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
23758         and mono_loader_init().
23760 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
23762         * loader.h: Add missing include to fix build.
23764         * image.h: mono_image_load_references is no more.
23766         * assembly.c: Reworked assembly loading to make it really thread safe.
23767         After these changes, the assembly returned by mono_assembly_open is
23768         fully initialized, i.e. all its references assemblies are loaded.
23770         * assembly.c (mono_image_load_references): Renamed to 
23771         mono_assembly_load_references, and made private, since clients no
23772         longer need to call it.
23774         * class.c: Removed calls to mono_assembly_load_references, since it was
23775         a source of deadlocks.
23777         * loader.h loader.c class.h class.c: Protect data structures using a 
23778         new lock, the loader lock.
23780         * class.c (mono_class_setup_vtable): Create temporary hash tables and
23781         GPtrArrays only when needed.
23783         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
23784         into empty structures by mcs. Fixes pinvoke7.cs.
23785         
23786         * domain.c (mono_init): Call a new initialization function.
23788         * appdomain.c (mono_runtime_init): Call the new initializer function
23789         of the marshal module.
23791         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
23792         inserted into empty structures by mcs. Fixes pinvoke7.cs.
23794         * marshal.h marshal.c: Added locks around the wrapper caches to make
23795         this module thread safe.
23797         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
23798         this argument. Fixes pinvoke1.exe.
23800 2003-08-25  Lluis Sanchez <lluis@ximian.com>
23802         * object.h: Added call_type field to MonoMethodMessage and the corresponding
23803         enumeration of values. Removed fields to store remote call output values in
23804         MonoAsyncResult. Not needed any more.
23805         * object.c: Initialize call_type and async_result fields in mono_message_init.
23806         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
23807         dispatching the message.
23808         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
23809         async call to finish. To do it use a message with EndInvoke call type.
23811 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
23813         * loader.h loader.c (mono_method_hash_marhal_info): New function which
23814         determines whenever a method has marshalling info.
23816 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23818         * assembly.c: fix the build on windows.
23820 2003-08-22 Lluis Sanchez <lluis@ximian.com>
23822         * object.cs: Fixed bug #47785.
23824 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
23826         * string-icalls.c (StringReplace): If their are no occurances of
23827         the old string found return a reference to the supplied
23828         string. This saves some memory and matches MS behavoir.
23829         
23830 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23832         * socket-io.c: fixed compilation for systems that define AF_INET6
23833         and don't define SOL_IP/SOL_IPV6.
23835 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
23837         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
23838         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
23840         * rawbuffer.c rawbuffer.h: Make this module thread safe.
23842         * domain.c: Make this module thread safe.
23844         * domain.c (mono_init): Call new initialization function.
23846         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
23847         reference types too. Fixes #38812.
23849         * image.c (mono_image_init): Fixed warnings.
23851         * class.c (mono_class_from_typeref): Handle assembly load failure
23852         correctly.
23854         * appdomain.c (add_assemblies_to_domain): Handle the case when
23855         the references of an assembly are not yet loaded.
23857         * metadata.c image.c assembly.c: Moved initialization of global
23858         variables to a separate function called at startup since lazy 
23859         initialization of these variables is not thread safe.
23860         
23861         * image.c assembly.c: Made this module thread safe by adding locks in 
23862         the appropriate places.
23864         * domain.c (mono_init): Call the new initialization functions of the
23865         three modules.
23867 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
23869         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
23870           make a direct call. It is proxy's work to make the call asynchronous.
23871           mono_delegate_end_invoke(): If the targe is a proxy, just collect
23872           the return values.
23873         * object.cs: mono_method_call_message_new(): read AsyncResult and
23874           state object from parameters list, if this info is requested.
23875         * object.h: Added fields to store remote call output values in
23876           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
23878 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
23880         * object.h: add needed fields to MonoThread.
23881         * threads.c, threads.h: allow registering a function to cleanup data
23882         allocated per thread by the JIT.
23884 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23886         * loader.h: portability fix by Bernie Solomon
23887         * <bernard@ugsolutions.com>.
23889 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
23891         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
23892         return a MonoArray. This simplifies the code and also ensures that
23893         the cache allways contains an object reference as a value.
23895         * icall.c (ves_icall_get_parameter_info): Simplified using the new
23896         function.
23898 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23900         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
23901         fixes a problem with byte ordering when getting the address family for
23902         a socket.
23904 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
23906         * .cvsignore: Added monosn.
23908         * reflection.h reflection.c loader.c: Added support for parameter
23909         marshalling to dynamically created types. Fixes #47295.
23911 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
23913         * rand.c: remove useless warnings.
23915 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
23917         * class.c: implemented ldtoken for methods and fieldrefs.
23919 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23921         * threadpool.c: when mono_async_invoke was called, no one took care of
23922         monitoring the queue. So if the method invoked took some time and we
23923         got new async invoke requests after 500 ms (the thread created waited
23924         that long in WaitForSingleObject), the new async invoke was not called
23925         until the previous one finished.
23927         This is fixed now. Thanks to Totte for helping with it.
23929 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23931         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
23933 2003-08-11  Martin Baulig  <martin@ximian.com>
23935         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
23937 2003-08-06  Martin Baulig  <martin@ximian.com>
23939         * mono-debug-debugger.c: Added support for static fields,
23940         properties and methods.
23942 2003-08-06  Martin Baulig  <martin@ximian.com>
23944         * mono-debug-debugger.c: Don't store the MonoString's vtable to
23945         make this work for applications with multiple application domains.
23947 2003-08-04  Martin Baulig  <martin@ximian.com>
23949         * mono-debug-debugger.c: Completely reworked the type support; the
23950         most important thing is that we're now just using one single
23951         `MonoType' instance per type.
23953 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
23955         * mono-endian.h, mono-endian.c, icall.c: Added icall
23956         ves_icall_System_Double_AssertEndianity to assert double word endianity
23957         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
23959 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
23961         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
23962         support, icalls and fixes.
23964 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
23966         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
23967         classes that are a punctuation character in .NET is not the same a
23968         g_unichar_ispunct.
23970 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23972         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
23974 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
23976         * icall.c: Add new MemCopy internalcall.
23977         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
23978         Simplified code; It is not necessary to handle all the cases here,
23979         as the C# code takes care of it.  Only handle the case of the name
23980         resource embedded into the assembly.
23982         Changed signature to return the data pointer and the size of the
23983         data. 
23985 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
23987         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
23988         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
23990 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
23992         * socket-io.c: ignore EINTR error in select.
23994 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
23996         * class.h, class.c: removed unused subclasses field in MonoClass.
23998 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
24000         * icall.c: improve fix of get_base_definition(). If the parent class
24001           doesn't have the mehod, look at the parent of the parent.
24002         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
24003           to check if a parameter is an in or out parameter
24004           (PARAM_ATTRIBUTE_IN is not set by default).
24005           mono_method_return_message_restore(): Use mono_class_value_size to
24006           get the size of a value type. mono_type_stack_size (parameterType)
24007           does not return the correct value if parameterType is byRef.
24008           mono_load_remote_field(), mono_load_remote_field_new(),
24009           mono_store_remote_field(), mono_store_remote_field_new():
24010           raise exception if the remote call returns an exception.
24012 2003-07-28  Martin Baulig  <martin@ximian.com>
24014         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
24015         method.  This is a wrapper around mono_runtime_invoke() which
24016         boxes the instance object if neccessary.
24018 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24020         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
24021         metadata.h, row-indexes.h, verify.c: first cut of generics support.
24023 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24025         * icall.c: disable mcs bug workaround.
24027 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
24029         * object.c (mono_runtime_class_init): Take the metadata_section
24030         mutex before obtaining the domain mutex.
24032         * appdomain.h: Added definition of metadata_section mutex here. 
24034         * object.c: define metadata_mutex here.
24036 2003-07-24  Ravi Pratap  <ravi@ximian.com>
24038         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
24039         fixed.
24041 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
24043         * reflection.c: Fix bug #46669
24045 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24047         * exception.c:
24048         * exception.h:
24049         * icall.c:
24050         * object.h: fill in the type name for TypeLoadException.
24052 2003-07-23  Ravi Pratap  <ravi@ximian.com>
24054         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
24055         relationship between TypeBuilders while compiling corlib) and bug
24056         45993 (Array types returned from the runtime while compiling
24057         corlib were from the loaded corlib).
24059 2003-07-22  Martin Baulig  <martin@ximian.com>
24061         * mono-debug-debugger.c: Reworked the type support a bit more;
24062         distinguish between types and classes.
24064 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
24066         * icall.c: add IsArrayImpl icall.
24068 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
24070         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
24071         initializing real_size only once. Also fix bug #46602.
24073 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
24075         * object.c: Renamed mono_metadata_section to metadata_section.
24077 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
24079         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
24080           empty array if the type is an array. Fixed.
24081           ves_icall_MonoMethod_get_base_definition: if the base method
24082           is abstract, get the MethodInfo from the list of methods of
24083           the class.
24084         * reflection.c: ParameterInfo.PositionImpl should be zero-based
24085           and it was 1-based. Fixed in mono_param_get_objects.
24087 2003-07-20  Martin Baulig  <martin@ximian.com>
24089         * mono-debug.h: Set version number to 31.
24090         (mono_debug_init): Added `MonoDomain *' argument.
24092         * mono-debug-debugger.c: Reworked the type support; explicitly
24093         tell the debugger about builtin types; pass the `klass' address to
24094         the debugger.
24096 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
24098         * image.c: Allow new metadata tables to be loaded without a
24099         warning. Also update the warning message to give the new constant value.
24100                 
24101 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
24103         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
24104         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
24105         array type representation changes.
24107 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
24109         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
24110         on Environment.Exit () call.
24112 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
24114         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
24115         requires a matching corlib.
24117 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
24119         * Changelog: My editor decided to add a CR to each line. Sorry about that.
24120           Committed again without the CRs.
24121         
24122 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
24124         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
24125           getting it from the "this" socket instance. Did not work
24126           if the socket is a subclass of Socket.
24127           Also fixed bug #35371.
24129 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24131         * metadata.c: fixed size for TypedByRef.
24132         * loader.c: when searching for a method, consider the vararg amrker.
24133         * unicode.c, decimal.c: constify some arrays.
24135 2003-07-15  Dick Porter  <dick@ximian.com>
24137         * socket-io.c: Fixed compilation for gcc < 3.2.
24139         Fixed compilation for machines that don't have AF_INET6 (thanks to
24140         Bernie Solomon <bernard@ugsolutions.com> for that part.)
24142         Fixed compile warnings.
24143         
24144         Fixed formatting and line endings.
24146 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
24148         * socket-io.h:
24149         * socket-io.c: Added IPv6 support.
24151 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
24153         * class.c (mono_class_is_assignable_from): New function to implement
24154         the is_assignable_from logic. Used by mono_object_isinst, 
24155         Type::IsAssignableFrom () and the interpreter.
24157         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
24158         Object, even interfaces.
24159         
24160         * object.c (mono_object_isinst): Implement in terms of 
24161         is_assignable_from.
24163         * icall.c (ves_icall_type_is_assignable_from): New icall.
24165 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
24167         * domain.c (foreach_domain): fix compiler warning.
24169 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
24171         * image.c (load_metadata_ptrs): use g_strndup because strndup is
24172         not available on all plattforms
24174 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
24176         * image.h image.c: Store the metadata version string in MonoImage.
24177         * icall.c: New icall to retrieve the image version.
24178         * reflection.c (create_dynamic_image): Fill in the image version field
24179         * reflection.c (build_compressed_metadata): Use the image version
24180         from the image structure.
24182 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24184         * appdomain.c: modified comment.
24185         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
24186         That will be its last iteration when mono_gc_cleanup is called from
24187         mono_runtime_cleanup and before the domain is unloaded.
24189         Fixes bug #45962.
24191 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
24193         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
24194         attributes.
24196 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24198         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
24199         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
24200         Bernie Solomon <bernard@ugsolutions.com>.
24202 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24204         * object.c, object.h: provide mono_object_new_fast() for faster
24205         allocation in some special cases.
24207 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24209         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
24210         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
24212 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
24214         * threadpool.c: fix leaks.
24216 2003-07-01  Dick Porter  <dick@ximian.com>
24218         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
24219         using MonoGHashTables.  Fixes threadpool bug posted to list.
24221 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
24223         * image.h, image.c: added support to load an assembly from a byte array.
24224         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
24225         assembly bundle support.
24227 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
24229         * threadpool.c (mono_thread_pool_add): keep a reference to the
24230         AsyncResult to prevent GC
24232 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24234         * class.c: leak fix.
24236 2003-06-25  Dick Porter  <dick@ximian.com>
24238         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
24239         for the async object, the WaitHandle object will close the handle.
24240         Fixes bug 45321.
24242 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24244         * class.c: in mono_array_class_get (), lookup from the hash with the
24245         same type we insert: this works around a bug in
24246         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
24247         lluis. The real fix will have to wait for after the release.
24249 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24251         * icall.c: fix memory leak when getting type members.
24253 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
24255         * reflection.c: added more pubtoken special cases.
24257 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
24259         * class.c: handle field offset correctly when class size
24260         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
24262 2003-06-20  Martin Baulig  <martin@ximian.com>
24264         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
24265         *image' field.
24267 2003-06-20  Martin Baulig  <martin@ximian.com>
24269         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
24271 2003-06-20  Martin Baulig  <martin@ximian.com>
24273         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
24274         just distinguish between variables in registers and variables at
24275         an offset relative to a register.
24277 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24279         * icall.c: #ifdef out latest changes until mcs is fixed.
24281 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24283         * icall.c: return members in metadata order.
24285 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
24287         * icall.c: avoid infinite loop in GetTimeZoneData.
24289 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
24291         * icall.c: added Marshal.Prelink/All icalls.
24293 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
24295         * object.c, object.h: fix warnings and do some overflow checking
24296         when creating arrays.
24298 2003-06-17  Dick Porter  <dick@ximian.com>
24300         * file-io.h:
24301         * file-io.c: File attributes need to be tweaked slightly when
24302         passed from the managed to the w32 world.
24304 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
24305         * profiler.h profiler-private.h profiler.c: Rework last patch
24306         based on suggestion by Paolo.
24307         
24308 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
24310         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
24311         instruction level coverage data collection.
24312         * profiler.h profiler.c (: Added new callback function which can be
24313         used by the profiler to limit which functions should have coverage
24314         instrumentation.
24315         * profiler.c (mono_profiler_load): Call g_module_build_path to
24316         generate the file name of the profiler library.
24318 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24320         * profiler.c, profiler.h, profiler-private.h: added basic block 
24321         coverage profiling API.
24323 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
24325         * reflection.c (mono_reflection_create_runtime_class): Add support
24326         for events in dynamically generated code.
24328         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
24329         not allocated.
24331 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
24333         * icall.c: when getting timezone info, return reasonable values if we
24334         can't get the actual data.
24336 2003-06-14  Dick Porter  <dick@ximian.com>
24338         * threads.c (start_wrapper): Remove the reference to the thread
24339         object in the TLS data, so the thread object can be finalized.
24340         This won't be reached if the thread threw an uncaught exception,
24341         so those thread handles will stay referenced :-( (This is due to
24342         missing support for scanning thread-specific data in the Boehm GC
24343         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
24345 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
24347         * reflection.c: ensure streams and tables are first allocated with
24348         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
24350 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24352         * icall.c: fixed GetElementType for byrefs (bug# 44792).
24354 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
24356         * reflection.c (mono_reflection_create_runtime_class): Add support for
24357         properties to dynamically created classes.
24358         * reflection.c: Fix a few places where non-MonoObjects were inserted
24359         into the tokens hashtable.
24361 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24363         * object.c: some support to handle out of memory exceptions.
24365 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
24367         * marshal.c (mono_marshal_get_native_wrapper): support reference
24368         return types
24370 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24372         * object.h, object.c: more portability stuff from Bernie Solomon.
24373         Unexport mono_object_allocate(). Added mono_object_unbox ().
24374         Set exitcode when an unhandled exception is thrown.
24376 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
24378         * marshal.c (mono_marshal_get_native_wrapper): use custom
24379         marshaler for return types.
24381 2003-06-10  Dick Porter  <dick@ximian.com>
24383         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
24384         ip_mreq is available
24386 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
24388         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
24389         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
24390         by Bernie Solomon <bernard@ugsolutions.com>.
24392 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
24394         * gc.c (mono_gc_init): Avoid error message on shutdown when
24395         GC_DONT_GC=1 is used.
24397         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
24398         New icall to return the GUID of a module.
24400 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
24402         * class.c: ensure instance size always includes the parent's size
24403         even whem class size is set explicitly (fixes bug#44294).
24405 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24407         * profiler.h, profiler.c: made the simple profiler thread-safe,
24408         get more accurate timing info. Allow the loading of an
24409         externally-developed profiler module.
24411 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
24413         * marshal.c (mono_marshal_get_native_wrapper): improved
24414         class/byref arguments.
24415         (mono_marshal_get_native_wrapper): better string marshaling support.
24417 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24419         * class.c: ensure .pack and .size are handled correctly and
24420         simplified layout of static fields.
24422 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
24424         * appdomain.c
24425         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
24427         * loader.c (mono_lookup_pinvoke_call): look for modules in the
24428         current directory (fix bug 44008)
24430 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
24432         * marshal.c (mono_marshal_get_native_wrapper): started support for
24433         custom marshalers.
24434         (mono_delegate_to_ftnptr): consider marshalling specifications
24436 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24438         * reflection.c, reflection.h: emit custom marshal info.
24440 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24442         * object.c: free the GError.
24443         * icall.c: added CloseEvent_internal.
24444         * threads.[ch]:
24445         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
24446         call.
24448 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
24450         * loader.c (mono_method_get_signature): Add support for dynamic
24451         assemblies.
24453 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24455         * reflection.c: fixed bug #43905.
24457 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24459         * class.c, domain.c, icall.c, metadata.h, object.h: support for
24460         handling TypedReference and ArgIterator.
24461         * loader.c, loader.h: added function to get signature at call site.
24463 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24465         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
24466         data readonly. Buglets and warning fixes. Some MethodSpec support.
24468 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24470         * class.h, class.c, object.c: remove relative numbering support.
24472 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
24474         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
24475         free the string, until we get a chance to fix Gtk#
24477 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24479         * marshal.c: revert last patch.
24481 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
24483         * icall.c: updates for new mono_class_vtable() not calling
24484         the type constructor anymore.
24486 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24488         * object.h, object.c: separate vtable creation from type
24489         initialization. Make running the .cctor thread safe.
24491 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
24493         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
24495 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
24497         * loader.c (mono_get_method): consider calling convention
24499 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
24501         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
24502         to return the invisible global type for a module.
24504         * reflection.c (mono_image_build_metadata): Emit global fields too.
24506 2003-05-20  Peter Williams  <peterw@ximian.com>
24508         * loader.c (mono_lookup_internal_call): Add a few newlines.
24510 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
24512         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
24513         literal strings.
24515         * appdomain.c (set_domain_search_path): Recalculate search path when
24516         AppDomainSetup.PrivateBinPath changes.
24518         * object.c (mono_class_compute_gc_descriptor): It turns out some
24519         parts of the class libs (like System.Thread) holds pointers to
24520         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
24521         to treat native int a pointer type here.
24522         
24523 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
24525         * appdomain.h, domain.c: add hashtable for jump target resolution.
24527 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
24529         * reflection.h reflection.c icall.c: Added new icalls 
24530         GetManifestResourceInfoInternal, GetModulesInternal and support
24531         infrastructure.
24533 2003-05-16  Dick Porter  <dick@ximian.com>
24535         * icall.c:
24536         * file-io.h:
24537         * file-io.c: Implement System.IO.MonoIO::GetTempPath
24539 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
24541         * object.c: mono_store_remote_field: little fix to previous patch.
24543 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24545         * class.c: add constructors to array classes.
24546         * icall.c: special case array construction for InternalInvoke (),
24548 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
24550         * class.h class.c reflection.c object.c: Added support for field
24551         defaults in dynamically generated classes.
24553 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24555         * reflection.c: properly encode charset for ddlimport.
24557 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
24559         * threads.c: allow compiling without GC.
24561 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
24563         * appdomain.h, object.c, object.h, threads.c, threads.h: added
24564         handling of thread static data.
24566 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24568         * reflection.h, reflection.c: added mono_custom_attrs_free ().
24570 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
24572         * class.c (mono_array_class_get): always set the serializable flags
24573         (mono_array_class_get): always set the SEALED attribute for array types
24575 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
24577         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
24578         attributes (fix for bug 42021).
24580 2003-05-12  Dick Porter  <dick@ximian.com>
24582         * gc.c: Don't run finalizers when the finalizer thread is
24583         finishing up, because the default domain has already been
24584         destroyed.
24586 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
24588         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
24589         value is null, we should throw an exception.   This is slightly
24590         different than the other conventions used for the constructor.
24592 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24594         * socket-io.c: fixed windows build.
24596 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24598         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
24600 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
24602         * object.c (mono_string_new_wrapper): Compatibility fix for MS
24603         compilers.
24605 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
24607         * class.c (mono_class_layout_fields): Add experimental GC aware
24608         auto layout facility. Requires class library changes to work correctly.
24610         (mono_class_setup_vtable): Avoid overriding explicit interface
24611         method implementations. Fixes iface3.exe test.
24613         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
24614         object reference.
24615         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
24616         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
24618         * metadata.h: Add new type classification macro which determines
24619         whenever the type holds an object reference.
24621 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
24623         * marshal.c (mono_marshal_get_native_wrapper): cleanups
24625 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
24627         * gc.c (finalizer_thread): Work around a GC bug.
24629 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
24631         * marshal.c (emit_struct_conv): allow unions
24633         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
24635 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
24637         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
24639 2003-05-06  Martin Baulig  <martin@ximian.com>
24641         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
24643 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24645         * socket-io.c:
24646         (Select_internal): allow NULLs, don't create arrays if not needed.
24647         Coupled with Socket.cs changes.
24649         * threadpool.c:
24650         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
24651         register a finalizer for it that will close the semaphore handle. This
24652         fixes the leak and make Lupus' test run with > 4080 loops.
24654 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
24656         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
24657         Jerome Laban (bug #42287)
24659 2003-05-02  Martin Baulig  <martin@ximian.com>
24661         * debug-mono-symfile.h
24662         (MonoSymbolFile): Moved declaration into mono-debug.h.
24663         (MonoDebugMethodJitInfo): Likewise.
24664         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
24665         argument.
24666         (_mono_debug_address_from_il_offset): Take a
24667         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
24669         * mono-debug.h
24670         (MonoDebugDomainData): New struct.
24671         (mono_debug_get_domain_data): New function.
24672         (mono_debug_add_method): Take an additional `MonoDomain *'
24673         argument.
24674         (mono_debug_source_location_from_address): Likewise.
24675         (mono_debug_il_offset_from_address): Likewise.
24676         (mono_debug_address_from_il_offset): Likewise.
24678 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
24680         * reflection.c: one more check for null type in custom attrs.
24682 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24684         * reflection.c: avoid warning (comparison is always false due to limited
24685         range of data type).
24687 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24689         * icall.c: throw an exception in Type.GetField if the argument 'name'
24690         is NULL.
24692 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
24694         * reflection.c: fixed handling of enums in named arguments to custom
24695         attributes (bug #42123).
24697 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24699         * reflection.c: use the right array element type and handle
24700         a null for a Type argument, too.
24702 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
24704         * reflection.c: handle arrays as arguments to custom attributes.
24706 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
24708         * reflection.c: handle a string value in a custom attr
24709         ctor that takes an object.
24711 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
24713         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
24714         (fix bug #42063)
24716 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
24718         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
24720 2003-04-27  Martin Baulig  <martin@ximian.com>
24722         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
24723         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
24724         MONO_DEBUGGER_EVENT_BREAKPOINT.
24725         (mono_breakpoint_trampoline_code): Removed.
24726         (mono_debugger_event_handler): The last argument is now a
24727         `guint32'.
24728         (mono_debugger_insert_breakpoint_full): Removed the
24729         `use_trampoline' argument.
24730         (mono_debugger_method_has_breakpoint): Likewise.
24731         (mono_debugger_trampoline_breakpoint_callback): Renamed to
24732         mono_debugger_breakpoint_callback(); take the method and
24733         breakpoint number as arguments.
24735 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24737         * metadata.c: fix off by one when loading parameters attributes.
24739 2003-04-24  Martin Baulig  <martin@ximian.com>
24741         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
24743 2003-04-24  Martin Baulig  <martin@ximian.com>
24745         * mono-debug-debugger.c: Moved all code which interacts with the
24746         Mono Debugger here.
24748         * debug-mono-symfile.c: This code now just deals with the symbol
24749         file itself, the debugger code is now in mono-debug-debugger.c.
24751 2003-04-23  Martin Baulig  <martin@ximian.com>
24753         * mono-debug.c (mono_debug_source_location_from_il_offset):
24754         New method; like mono_debug_source_location_from_address(), but
24755         takes an IL offset instead of a machine address.
24757 2003-04-23  Martin Baulig  <martin@ximian.com>
24759         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
24760         `line' field; this is now computed by the debugger.
24762 2003-04-23  Martin Baulig  <martin@ximian.com>
24764         * mono-debug.[ch]: New files.  This is the new debugging interface.
24766         * mono-debug-debugger.[ch]: New files.  Moved all code which
24767         interacts with the Mono Debugger here.
24769 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
24771         * domain.c (mono_init): initialize mono_defaults.monitor_class
24773 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
24775         * reflection.c (method_encode_code): Add a spicy exception to help
24776         future compiler authors.
24778 2003-04-21  Martin Baulig  <martin@ximian.com>
24780         * icall.c
24781         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
24782         Make this work with relative pathnames; g_filename_to_uri() needs
24783         an absolute filename.
24785 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
24787         * icall.c: Track name changes in Object and ValueType.
24789 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
24791         * metadata.c (mono_type_stack_size): size should be a multiple of
24792         sizeof (gpointer)
24794 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24796         * gc.c:
24797         (internal_domain_finalize): moved into mono_domain_finalize. No need
24798         to create another thread because the finalizers will be run in the
24799         finalizer thread.
24800         
24801         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
24802         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
24803         to be run (MS does this too).
24805 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
24807         * object.c (mono_class_compute_gc_descriptor): Update comment.
24809         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
24811         * image.h: Add synchronized wrapper cache.
24813         * image.c (do_mono_image_open): Initialize cache.
24815         * reflection.c (create_dynamic_mono_image): Initialize cache.
24817 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24819         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
24820         ves_icall_System_Buffer_ByteLengthInternal.
24822 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24824         * reflection.c: setup klass->nested_in earlier. Allow
24825         a dash in the assembly name.
24827 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
24829         * metadata.c (mono_type_to_unmanaged): dont access
24830         type->data.klass for MONO_TYPE_OBJECT
24831         (mono_type_to_unmanaged): consider System.Delegate class
24833 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
24835         * class.c: just setup supertypes in the proper place instead of
24836         initializing the full element class for arrays.
24838 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24840         * class.c: ensure the element class of arrays is initialized.
24841         Setup the supertype info for array classes, too.
24843 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
24845         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
24847 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24849         * Makefile.am: re-added -m option when running cygpath. This way,
24850         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
24851         separator.
24852         * mono-config.c: same codepath for locating mono config file for WIN32
24853         and the rest.
24854         * assembly.c: if mono_assembly_setrootdir is called, don't override
24855         the value set.
24857 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24859         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
24860         MONO_ASSEMBLIES variable.
24862 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
24864         * icall.c: added Assembly::GetNamespaces() icall.
24866 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24868         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
24870 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
24872         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
24873         * object.c: fixed bug in the construction of vtable for proxies
24875 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
24877         * object.c (mono_array_new): Mark mono_array_new as an icall.
24879 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24881         * class.c: fixed test for public method when overriding interfaces.
24882         Closes bug #40970.
24884 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24886         * appdomain.h, domain.c: added mono_domain_foreach() to
24887         be able to access the currently loaded appdomains.
24888         * object.c: make string interning work across sppdomains.
24889         Mark some functions for use as icalls.
24891 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
24893         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
24895         * reflection.h reflection.c: Allocate long living data using 
24896         GC_MALLOC_ATOMIC so the collector does not need to scan it.
24898         * reflection.c: Double the allocation size in streams instead of
24899         increasing it, to prevent unneccesary copying on large assemblies.
24900         
24901         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
24902         creation if the assembly does not have the Run flag set.
24904 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24906         * class.h: avoid the C++ keywords in header files (Jerome Laban
24907         spotted and fixed this).
24909 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24911         * object.c:
24912         (mono_unhandled_exception): fill in the arguments for the
24913         UnhandledException event. Only trigger that event for the default
24914         domain (as MS does).
24916 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
24918         * object.c: Improve typed allocation stuff based on suggestions from
24919         Paolo. Also turn it on if the GC library supports it.
24921 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
24923         * object.c object.h class.h: Added experimental typed allocation
24924         facility using the interfaces in gc_gcj.h.
24926         * os/gc_wrapper.h: Added new include files.
24927         
24928 2003-04-03  Martin Baulig  <martin@ximian.com>
24930         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
24931         which is not yet enabled by default.
24933         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
24934         functions.
24935         (mono_gc_lock, mono_gc_unlock): New static functions.
24937         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
24938         functions; stop/start the world for the garbage collector.  This
24939         is using the windows API; we need to complete the SuspendThread()/
24940         ResumeThread() implementation in the io-layer to make this work on Unix.
24941         (mono_gc_push_all_stacks): New public function; tells the garbage
24942         collector about the stack pointers from all managed threads.
24944 2003-04-03  Martin Baulig  <martin@ximian.com>
24946         * object.h (MonoThread): Added `gpointer stack_ptr'.
24948         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
24950 2003-04-03  Martin Baulig  <martin@ximian.com>
24952         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
24954 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
24956         * reflection.c (typebuilder_setup_fields): Initialize field.first and
24957         field.last.
24959 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
24961         * loader.c (mono_lookup_internal_call): Report the corlib that is
24962         out of sync.
24964 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
24966         * icall.c (ves_icall_type_GetTypeCode): fixed check for
24967         System.DBNull (it's class not valuetype).
24969 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24971         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
24972         if the array method was already assigned a token (fixes bug#40646).
24974 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
24976         * reflection.c (mono_reflection_get_type): Attempt type resolve even
24977         if no assembly is given.
24979 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
24981         * metadata.h: Added the new tables.
24983         * row-indexes.h: Added definitions for new tables.
24985         * metadata.c: Add schemas for new tables, and add support for
24986         computing the sizes of them.
24988         * class.c: Update for handling the new type cases.
24990 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
24992         * metadata.h (MONO_TYPE_IS_VOID): new macro
24994 2003-03-31  Martin Baulig  <martin@ximian.com>
24996         * threads.h (MonoThreadCallbacks): Added `thread_created'.
24998         * threads.c (mono_thread_new_init): Call `thread_created' in the
24999         mono_thread_callbacks.
25001 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
25003         * loader.h: added marshalbyrefobject_class to mono_defaults
25004         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
25005         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
25006           generation of output parameters.
25007           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
25008         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
25009           contextbound and the target object belongs to the context of the caller.
25010         * object.h: added context and unwrapped_server variables in MonoRealProxy.
25011         * object.c: Implemented support for interfaces and abstract classes
25012           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
25013           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
25015 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
25017         * class.h class.c (mono_class_is_subclass_of): New function.
25018         
25019         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
25020         routines for most common case (calls from ArrayList::ToArray).
25022         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
25023         routine so programs which call Environment::Exit() can be profiled.
25025         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
25026         Added MONO_ARCH_SAVE_REGS.
25028         * icall.c (ves_icall_type_is_subtype_of): Use new function.
25030 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
25032         * blob.h: Add a couple of new MonoType types definitions.
25034         * tabledefs.h: Add a couple of new call convs.
25036 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
25038         * reflection.h (MonoReflectionDynamicAssembly): track changes in
25039         the layout of the class.
25041         * reflection.c (alloc_table): double the size on overflow to avoid
25042         unnecessary copying.
25044         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
25045         avoid filling out metadata tables and blobs. Also set mb->ilgen to
25046         null so it can be garbage collected.
25047         
25048 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
25050         * reflection.c (mono_reflection_get_type): Return the resolved type
25051         only if it is in the assembly we searched.
25053         * reflection.c (ensure_runtime_vtable): Initialize method slots.
25055         * class.c (mono_class_setup_vtable): Set the slot of the overriding
25056         method.
25058 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25060         * appdomain.c:
25061         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
25062         the right one is 'file:///blah', but MS allows it.
25063         * assembly.c:
25064         (mono_assembly_open): allow 'file://blah'
25066         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
25068 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
25070         * socket-io.c: fixes bug #40310.
25072 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
25074         * reflection.c (mono_reflection_parse_type): handle deeply nested
25075         types correctly.
25077         * reflection.c (mono_image_create_token): Use unique token values
25078         since they will be put into a hash table.
25080         * class.c (mono_class_setup_vtable): If a method occurs in more than
25081         one place in the vtable, and it gets overriden, then change the
25082         other occurances too.
25084         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
25085         object as return type.
25087 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
25089         * icall.c: Deleted "ToString" implementation for double and float
25090         because they are full implemented in managed code.
25092 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25094         * reflection.c, reflection.h: implemented and exported functions
25095         to retrieve info about custom attributes.
25097 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25099         * appdomain.c: moved Uri handling to assembly.c
25100         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
25101         work when using a file Uri in *nix and windows.
25103         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
25104         GetReferencedAssemblies.
25106 2003-03-18  Dick Porter  <dick@ximian.com>
25108         * icall.c: Rename a couple of internal calls
25110         * threads.c: Set the thread state to Stopped when a thread exits.
25111         Fixes bug 39377.
25113 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
25115         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
25116         New icall.
25118         * object.c (mono_class_vtable): fix warning.
25120 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
25122         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
25124         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
25125         memory.
25126         (method_encode_clauses): Create exception info structures in the right
25127         order.
25128         (mono_reflection_setup_internal_class): Initialize supertypes field.
25130         * class.c object.c: Handle interfaces which implement other interfaces 
25131         correctly.
25133         * class.h class.c: Move the supertypes array initialization code into 
25134         a separate function so it can be used for dynamic types too. Also call
25135         it earlier, in mono_class_init(), since it can be used before the
25136         type is initialized.
25138 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25140         * Makefile.am:
25141         * assembly.c:
25142         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
25144         * appdomain.c:
25145         * appdomain.h:
25146         * marshal.c:
25147         * object.c: remove warnings.
25149 2003-03-13  Martin Baulig  <martin@ximian.com>
25151         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
25152         (MonoDebugLexicalBlockEntry): New types.
25154         * debug-mono-symfile.c
25155         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
25157 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25159         * process.c: ret can be any non-zero value accroding to MS doc.
25161 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
25163         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
25164         fixing a warning for a miss-used prototype, would have cause
25165         random memory corruption.
25167 2003-03-07  Martin Baulig  <martin@ximian.com>
25169         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
25170         getting really annoying ....
25172 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
25174         * reflection.c (fixup_method): added support for array methods.
25176 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
25178         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
25179         (pointed out by Michael Adams).
25181 2003-03-04  Dick Porter  <dick@ximian.com>
25183         * icall.c: Temporarily reverted the Double and Single ToString()
25184         change, because it broke nunit.
25186 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
25188         * object.h, threads.h: make include files compatible with C++
25189         (patch by Jerome Laban <jlaban@wanadoo.fr>).
25191 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
25193         * icall.c: Erased ToString helper functions for Double and Single.
25194         Now, that implementations ar all in managed code (Double and Single
25195         Formatters).
25197 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
25199         * appdomain.c: Added method for initializing the default context of
25200         a domain. Added internal call for getting the default context.
25201         * appdomain.h: Added context variable in MonoDomain struct.
25202         * domain.c: mono_domain_set also sets the default context of the domain
25203         * icall.c: Mapped internal method InternalGetDefaultContext.
25204         * object.c: mono_object_get_virtual_method returns always a remoting
25205         wrapper if the object is a transparent proxy.
25206         mono_runtime_invoke_array: when creating an object by calling the
25207         constructor, if the created object is a proxy, then the constructor should
25208         be called using the a remoting wrapper.
25210 2003-03-03  Dick Porter  <dick@ximian.com>
25212         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
25213         variable so it compiles on solaris.  Problem spotted by
25214         Christopher Taylor <ct@cs.clemson.edu>
25216 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25218         * appdomain.c:
25219         (get_info_from_assembly_name): don't leak value.
25221         * icall.c:
25222         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
25223         result.
25225 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
25227         * assembly.c: export mono_image_load_references ().
25228         * class.c: handle function pointers. mono_class_from_name() now
25229         supports nested type names directly.
25231 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
25233         * reflection.h reflection.c: Encode already created dynamic methods 
25234         and fields correctly as a DEF instead of a REF.
25236         * reflection.c: Get rid of the force_ref argument to 
25237         mono_image_typedef_or_ref since it was wrong in the first place.
25239         * string-icalls.c: add error checking to string constructors according
25240         to the MSDN docs.
25242         * reflection.c: Emit types in the order their TypeBuilders were 
25243         created. Previously, a new table index was assigned to each type before
25244         the tables were emitted. This was wrong because the signature blob
25245         might already refer to a type by its original table index.
25247 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
25249         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
25250         change.
25251         
25252 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25254         * Makefile.am: make assemblies dir have \ instead of / on windows.
25256 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
25258         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
25259         iterate over the NESTEDCLASS table using a linear search since the
25260         table is not guaranteed to be sorted by the secondary key.
25262         * class.c (mono_class_create_from_typedef): fixed up call to
25263         mono_metadata_nesting_typedef.
25264         
25265 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
25267         * marshal.c (mono_string_to_byvalstr): clear the memory as
25268         suggested by Jerome Laban <jlaban@wanadoo.fr>
25270 2003-02-26  Dick Porter  <dick@ximian.com>
25272         * process.c: Cope with padding in .rsrc blocks
25274 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
25276         * metadata.h: reverted the filter_len change, it breaks reflection
25277         
25278 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
25280         * metadata.h: added a new field to store the filter_len
25281         
25283 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
25285         * reflection.c: handle custom attributes for types and members
25286         created with Reflection.Emit (bug#38422).
25288 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
25290         * reflection.c: define RTSpecialName automatically for constructors for
25291         compatibility with MS.NET.
25293         * reflection.c (mono_reflection_create_runtime_class): initialize
25294         nested_in field of dynamically created classes.
25296 2003-02-22  Martin Baulig  <martin@ximian.com>
25298         * debug-mono-symfile.h: Incremented version number.
25300 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
25302         * object.h icall.c process.c: fix warnings.
25304 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
25306         * appdomain.h appdomain.c:
25307         (mono_domain_try_type_resolve): split the 
25308         name_or_tb argument into a name and a tb argument.
25309         (mono_domain_has_type_resolve): new function to check whenever the
25310         application has registered a TypeResolve event handler.
25311         
25312         * icall.c reflection.h reflection.c: move the type resolve logic into
25313         mono_reflection_get_type () so it will be invoked when 
25314         Assembly::GetType () is called.
25316         * reflection.c:
25317         (mono_reflection_get_type): renamed to get_type_internal.
25318         (mono_reflection_get_type): fixed type name generation so it works 
25319         for nested types too.
25320         (mono_reflection_get_type): call has_type_resolve () to avoid the 
25321         costly type name generation if there is no resolve event handler.
25323 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25325         * class.c, image.c: load exported types from file references.
25327 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
25329         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
25330           used to cache the managed methods used to create proxies and make 
25331           remote invocation of methods.
25332         * class.h: Added in MonoVTable a flag to indicate that a class needs 
25333           to be remotely created.
25334         * object.c: Modified the method mono_class_vtable(). It now initializes 
25335           the remote flag of the vtable. Modified mono_object_new_specific(), 
25336           so now it checks the remote flag.
25337         * icall.c: Added a couple of internal methods, one for enabling instance 
25338           creation interception for a type, and one for creating objects bypassing
25339           the remote check.
25341 2003-02-18  Martin Baulig  <martin@ximian.com>
25343         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
25344         New interncall to get a method's metadata token.
25346         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
25347         New interncall for the debugger.
25349 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
25351         * class.c (mono_class_setup_vtable): allocate supertype array
25353 2003-02-18  Martin Baulig  <martin@ximian.com>
25355         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
25357 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25359         * reflection.c:
25360         (assembly_name_to_aname): jump over unknown properties (i've found
25361         something like: 'type, assembly, version=xxx, custom=null, public...',
25362         so now will ignore custom=null and still get the rest of the values).
25364 2003-02-17  Dick Porter  <dick@ximian.com>
25366         * threads.c: Have Thread.Start() wait for a semaphore to signal
25367         that the thread has set up all its local data.  This fixes bug
25368         34323, where Abort() raced the new thread's TLS data.
25370         Also removes the handle_store() call from start_wrapper, because
25371         threads are now always created suspended and there is no longer a
25372         race between the parent and child threads to store the info.
25374 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
25376         * image.c: explain the #- heap issue in a message, hopefully
25377         avoiding FAQs on mono-list.
25379 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25381         * icall.c:
25382         (GetEntryAssembly): if the domain has not invoked
25383         AppDomain.ExecuteAssembly yet, return the assembly of the default
25384         AppDomain.
25386 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
25388         * class.c (mono_ldtoken): make it work in dynamic assemblies.
25390 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
25392         * metadata.c, reflection.c: simple speedup to type hash
25393         and equals code.
25395 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
25397         * image.c, image.h, class.c, assembly.c: move module loading
25398         to MonoImage. When loading metadata, consider alignemnet from
25399         the start of metadata, not from the metadata address in memory.
25401 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
25403         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
25404         AssemblyBuilder objects. Factored out custom attribute creation into
25405         a separate function.
25406         (create_custom_attr): new function to create custom attributes.
25408 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
25410         * Makefile.am: Got tired of typing the full pathname to pedump.
25411         Until there is another option, am installing this.
25413 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
25415         * class.c (class_compute_field_layout): always set field->parent 
25416         (mono_ldtoken): use mono_defaults.fieldhandle_class;
25418 2003-02-11  Dick Porter  <dick@ximian.com>
25420         * threads-types.h:
25421         * monitor.c: Rewrote Monitor, making lock much faster and
25422         Pulse/Wait work as specified.  Also uses much fewer handles, and only
25423         creates them as needed.
25425         * exception.c: Added SynchronizationLockException
25427         * threads.c: Deleted old Monitor implementation.  The new one is
25428         in a new file.
25430 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
25432         * class.c: handled TypedReference type code. Set the correct size for
25433         class data. Setup interface_offsets for interface classes, too.
25435 2003-02-09  Martin Baulig  <martin@ximian.com>
25437         * debug-mono-symfile.h: Reflect latest symbol writer changes.
25439 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
25441         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
25442         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
25443         * object.c: fixed mono_object_get_virtual_method () for interfaces.
25444         * verify.c: check for code that runs after the end of the method.
25446 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
25448         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
25449         "System.Math::Round2".
25450         * sysmath.h: Added Floor, Round and Round2 definitions.
25451         * sysmath.c: Modified certain functions that were not 100% compliant
25452         with MS.NET (math precision) and added the implementation of Floor,
25453         Round and Round2.
25455 2003-02-07  Martin Baulig  <martin@ximian.com>
25457         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
25459 2003-02-07  Martin Baulig  <martin@ximian.com>
25461         * debug-mono-symfile.c: Reflected latest symwriter changes.
25462         (mono_debug_create_mono_symbol_file): Removed.
25463         (mono_debug_open_mono_symbol_file): Take an argument which
25464         specifies whether to create a dynamic symbol file.
25466 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
25468         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
25470 2003-02-05  Martin Baulig  <martin@ximian.com>
25472         * reflection.c (mono_image_build_metadata): Make this public,
25473         protect it against being called multiple times, don't create
25474         resources and don't build the compressed metadata here.
25475         (mono_image_create_pefile): Do this here.
25477         * icall.c
25478         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
25480 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25482         * socket-io.c: fixed bug #36322.
25484 2003-02-06  Piers Haken <piersh@friskit.com>
25486         * appdomain.[ch]:
25487         * class.h:
25488         * debug-mono-symfile.c:
25489         * icall.c:
25490         * loader.c:
25491         * mono-config.c:
25492         * monosn.c:
25493         * reflection.c:
25494         * socket-io.c: warning cleanups
25496 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
25498         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
25499         function. works like remoting invoke, but does a check for the Proxy first.
25501 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
25503         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
25505 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
25507         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
25508         array of pointers.
25509         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
25510         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
25512         * object.c (mono_store_remote_field_new): used by the new jit
25513         instead of mono_store_remote_field
25514         (mono_load_remote_field_new): used by the new jit
25515         instead of mono_load_remote_field
25517 2003-02-05  Patrik Torstensson
25519         * appdomain.c: changed unload to take the domain id instead
25520         of domain
25521         
25522         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
25525 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25527         * appdomain.c: don't look for assemblies in ApplicationBase if
25528         PrivateBinPathProbe is set.
25530 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25532         * object.c: make the first argument in main_args contain the absolute
25533         path to the assembly. Fixes bug #37511.
25535 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25537         * icall.c: get correct UTC offset for countries not using daylight
25538         time saving. Fixes bug #30030.
25540 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25542         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
25543         and 1 are the family).
25545 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
25547         * icall.c (ves_icall_InternalExecute): removed wrong assertion
25549         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
25551 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
25553         * reflection.c: added support for SignatureHelper tokens, which is
25554         needed by the Calli opcode.
25556         * reflection.h: track changes to SignatureHelper class.
25558         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
25560 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25562         * appdomain.c: fixed loading assemblies from PrivateBinPath.
25564 2003-02-03  Patrik Torstensson
25565         * appdomain.[c|h], domain.c : 
25566          - Added support for getting a domain via domain id
25567          - Support for setting and getting domain from System.AppDomain 
25568            (used in cross appdomain channel)
25569          - Added support for get/set for a MonoAppContext on a thread 
25570            (Context class in System.Runtime.Remoting.Contexts),
25571          - Removed hack in Get/SetData and ExecuteAssembly.
25572         
25573         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
25574         the managed world to get control when a proxy is created.
25576         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
25577         
25578 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
25580         * icall.c
25581         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
25582         Populate the codebase field as well.
25584 2003-02-02  Martin Baulig  <martin@ximian.com>
25586         * debug-mono-symfile.c
25587         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
25588         (mono_debug_symfile_add_method): Allow interncalls.
25590 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25592         * icall.c: throw parse exception if strtod fails or the string is empty.
25594 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
25596         * marshal.c: handle object type separately from defined
25597         class types.
25599 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
25601         * marshal.c: handle NATIVE_LPSTR for strings when it's
25602         explicitly specified.
25604 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
25606         * reflection.c, reflection.h, icall.c: setup the reflection
25607         handle cache for ModuleBuilders and AssemblyBuilders.
25609 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
25611         * reflection.c (reflection_methodbuilder_to_mono_method): set
25612         pinvoke flag
25614 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25616         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
25618 2003-01-29  Dick Porter  <dick@ximian.com>
25620         * threads.c: No need for the fake_thread kludge now that Thread
25621         doesn't run a class constructor
25622         
25623 2003-01-29  Dick Porter  <dick@ximian.com>
25625         * threads.c: Use g_direct_hash instead of the rather bogus
25626         g_int_hash
25628 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
25630         * marshal.c (mono_marshal_get_native_wrapper): add check for null
25631         (fix pinvoke12.exe)
25632         (mono_marshal_get_struct_to_ptr): generate valid IL code
25633         (mono_marshal_get_ptr_to_struct): generate valid IL code
25634         (*): correctly set sig->pinvoke, we need to memdup the signature
25635         to do that
25637 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
25639         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
25640         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
25642 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
25644         * profiler.c: provide more callers information.
25646 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
25648         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
25650         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
25652         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
25654 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
25656         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
25657         exception instead of going into an infinite loop on dates which it 
25658         can't yet handle.
25660         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
25661         out-of-range exception if needed.
25663         * class.c (mono_class_setup_vtable): allow a virtual method to provide
25664         an implementation for an interface method and to override an inherited
25665         method at the same time. 
25666         Imagine a scenario when a virtual method is used to override a
25667         virtual abstract method in a parent class, and this same method 
25668         provides an implementation for an method inherited from an interface. 
25669         In this case, the interface resolution code will set im->slot, which 
25670         means that the virtual method override pass will skip this method 
25671         which means a pointer to the abstract method inherited from the parent
25672         will remain in the vtable of this non-abstract class.
25674         * class.c: (mono_class_setup_vtable): continue search for a real 
25675         method if only an abstract method is found.     
25677 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
25679         * reflection.c: add size to encoding for ByValStr and ByValArray
25680         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
25682 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
25684         * class.c (mono_class_setup_vtable): pass the override info as an
25685         argument.
25687         * class.c (mono_class_setup_vtable): set the slot of overriding methods
25688         correctly.
25689         
25690         * reflection.c (ensure_runtime_vtable); add support for method 
25691         overrides.
25692         
25693 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
25695         * reflection.c (resolution_scope_from_image): Hack to work to work with
25696         dynamic assemblies.
25698         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
25699         added a 'force_ref' argument to force this function to allways return 
25700         a TypeRef. This is needed by mono_image_get_memberref_token ().
25701         
25702 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
25704         * reflection.c (mono_image_get_type_info): interfaces really don't have
25705         a parent.
25707         * reflection.c (mono_image_basic_init): fill out missing fields of
25708         image structure.
25710         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
25711         dynamic assemblies. This is required so dynamic assemblies show up in
25712         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
25713         Type::GetType() etc. This is consistent with MS behaviour.
25715         * image.c image.h reflection.c: add newly created classes to the name 
25716         cache so mono_class_get () will find them.      
25718 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
25720         First part of changes to get IKVM.NET running under mono.
25721         
25722         * appdomain.h, appdomain.c: added new function 
25723         mono_domain_try_type_resolve() which will emit TypeResolve events. 
25724         This function will call AppDomain::DoTypeResolve to do the actual work.
25726         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
25727         moved existing code dealing with dynamic tokens to a new function 
25728         called mono_reflection_lookup_dynamic_token (). This function will 
25729         raise TypeResolve events when appropriate. Since reflection.c is not 
25730         part of libmetadata, a new hook function called 
25731         mono_lookup_dynamic_token() is added to class.c which will call this.
25733         * assembly.h assembly.c: make the invoke_load_hook function public,
25734         so it can be called for dynamic assemblies.
25736         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
25738         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
25739         type isn't found.
25741         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
25742         MonoGHashTable, since it contains pointers to objects which the GC 
25743         needs to track.
25745         * assembly.c (search_loaded): remove unused variable.
25746         
25747 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
25749         * object.c: fixed issue exposed by gcc-generated IL programs
25750         that use RVA data for pointers.
25752 2003-01-25  Martin Baulig  <martin@ximian.com>
25754         * threads.c (start_wrapper): Moved the initialization of
25755         `start_func' above the mono_new_thread_init() call to which we
25756         pass it as argument.
25758 2003-01-24  Martin Baulig  <martin@ximian.com>
25760         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
25761         the MonoThread pointer.
25763 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
25765         * icall.c: Rename `PowImpl' to Pow.
25767 2003-01-23  Dick Porter  <dick@ximian.com>
25769         * threads.c (start_wrapper): Create a Thread object if needed, so
25770         the Main() thread can do the class initialisation in a subthread
25771         that has been set up to allow managed code execution.
25773         Pass the thread ID instead of the MonoThread pointer to the thread
25774         start and attach callbacks.  This change is required, because the
25775         jit thread start callback must be called _before_ the Thread
25776         object can be created.
25777         
25778         (mono_thread_init): Removed much object creation code that is no
25779         longer needed.  No managed code is called from here now.
25781         * object.c (mono_runtime_exec_managed_code): Create a subthread
25782         for Main, and call back to the runtime to use it.
25783         Set the exit code when Main exits.
25785         * gc.c: Make sure domain finalisation happens in a subthread.
25786         Re-enable threaded GC, fixing bug 31333 (again).
25788         * environment.c: System.Environment internall calls (so far just
25789         ExitCode is here, the others are still in icall.c)
25791         * appdomain.c (mono_runtime_cleanup): All threads running managed
25792         code should have finished before mono_runtime_cleanup() is
25793         reached, so no need to clean up threads.
25795 2003-01-22  Martin Baulig  <martin@ximian.com>
25797         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
25798         `gpointer func' arguments.      
25799         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
25800         but added `MonoThread *thread' argument.
25801         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
25803         * threads.c (mono_new_thread_init): Added `gpointer func' argument
25804         and pass it to the mono_thread_start_cb callback.
25805         (mono_install_thread_callbacks): New public function to install a
25806         set of callbacks which are set by the debugger.
25807         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
25809 2003-01-22  Martin Baulig  <martin@ximian.com>
25811         * Makefile.am: Install debug-mono-symfile.h.
25813 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
25815         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
25817 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
25819         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
25820         * class.c (mono_ptr_class_get): correctly set access levels of pointers
25821         (mono_array_class_get): correctly set access levels of arrays
25823 2003-01-20      Patrik Torstensson
25824         * image.h (MonoAssemblyName): changed major, minor, build, revision
25825         from signed to unsigned.
25827 2003-01-20  sean kasun <skasun@azstarnet.com>
25829         * reflection.c (load_cattr_value): Now this handles
25830         MONO_TYPE_SZARRAY.  Fixes bug #35629
25832 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
25834         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
25835         integer value
25837 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25839         * decimal.c: fixed bug #26056.
25841 2003-01-17  Martin Baulig  <martin@ximian.com>
25843         * gc.c: Raise an ExecutionEngineException instead of using g_error().
25845 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25847         * exception.[ch]:
25848         (mono_get_exception_type_initialization): new function.
25850         * object.c: throw a TypeInitializationException when an exception is
25851         thrown invoking the class constructor.
25853 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25855         * reflection.c: fixed attribute reading.
25857 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25859         * icall.c:
25860         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
25861         provided, look for the type in the calling assembly and then in
25862         mscorlib; if the assembly name is provided, only try that one.
25864 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
25866         * object.c: register the vtable before there is a chance it's
25867         queried again recursively.
25869 2003-01-13  Duncan Mak  <duncan@ximian.com>
25871         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
25872         gc-internal.h. 
25873         
25874 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
25876         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
25878 2003-01-11  Martin Baulig  <martin@ximian.com>
25880         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
25881         this to 20 for the release.
25883 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
25885         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
25887         * loader.c (mono_method_get_marshal_info): bug fix
25889         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
25890         structures with explicit layout
25892 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
25894         * profiler.c: made the output more readable (and sorted). 
25895         Added caller information for the allocation profiler.
25897 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
25899         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
25901 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25903         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
25904         to get value types.
25905         
25906 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
25908         * object.c, profiler.h, profiler.c, profiler-private.h:
25909         Added object allocation profiler.
25911 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
25913         * reflection.h, reflection.c: handle global methods.
25914         Compress blob entries.
25916 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
25918         * marshal.c: fix compilation.
25920 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
25922         * loader.c (mono_method_get_marshal_info): impl.
25924         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
25926 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25928         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
25929         for reference types.
25931 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
25933         * loader.c: fixed off by one error in loaded parameter names.
25935 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
25937         * marshal.c (mono_marshal_get_icall_wrapper): like
25938         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
25939         instead of a MonoMethod.
25941 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25943         * decimal.c: fixed bug #36537.
25945 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
25947         * marshal.c: throw a missing method exception if a
25948         P/Invoke method is not found.
25950 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
25952         * icall.c: allow a null this for constructors.
25954 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
25956         * icall.c: raise the proper exceptions if the arguments to the
25957         internal Invoke are incorrect.
25959 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
25961         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
25963 2003-01-03  Martin Baulig  <martin@ximian.com>
25965         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
25967 2002-12-31  Martin Baulig  <martin@ximian.com>
25969         * debug-mono-symfile.c: Completely rewrote the type section.
25970         Instead of using individual malloc()ed fields, we use one big
25971         continuous memory area and offsets into this area.
25972         See the comments in the source code for details.
25974 2002-12-30  Martin Baulig  <martin@ximian.com>
25976         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
25978 2002-12-30  Martin Baulig  <martin@ximian.com>
25980         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
25981         line number table in this data blob instead of using an external
25982         pointer.
25984 2002-12-28  Martin Baulig  <martin@ximian.com>
25986         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
25988 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
25990         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
25991         as a boxed return type.
25993 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
25995         * appdomain.c
25996         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
25997         g_build_filename to properly get separators on the filename created.
25999         * object.h: Small change, introduce MonoMarshalByRefObject to
26000         track the layout of that structure in the C# universe as we make
26001         changes there.
26003 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
26005         * object.c: removed assert to allow static fields on interfaces.
26006         * loader.c: a TypeSpec may be used for any type, not just arrays.
26008 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
26010         * class.c, class.h: added mono_class_array_element_size ().
26011         Ignore static methods in interfaces.
26013 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26015         * threads.c: fixed the build under cygwin.
26017 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
26019         * reflection.c: handle nullref constants. Allocate keys for
26020         reflection handles with the GC.
26022 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
26024         * threads.c, threads.h: added mono_thread_get_abort_signal()
26025         to get a suitable signal for thread abort.
26027 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
26029         * metadata.c: fix handling of ExportedType table.
26031 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26033         * icall.c: added WriteWindowsDebugString internal call.
26035 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26037         * reflection.h: added fields to match C# implementation.
26039 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26041         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
26043 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
26045         * gc.h, gc-internal.h: Rename header for GC internal calls to
26046         gc-internal.h from gc.h as to not clash with Boehm GC having its
26047         header installed as <gc.h> in outside include paths.
26048         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
26049         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
26051 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26053         * icall.c: assign minor, build and revision in FillName.
26055 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
26057         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
26058         Added support for running code generated by Reflection.Emit.
26060 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26062         * appdomain.c: check for NULL argument in LoadFrom.
26064 2002-12-10  Dick Porter  <dick@ximian.com>
26066         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
26068 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26070         * appdomain.c: fix buglet when building exe file name.  Handle full
26071         assembly name (needed after latest changes to AssemblyName).
26072         * image.c:
26073         (mono_image_close): free some hashtables.
26075 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
26077         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
26078         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
26079         on some systems (redhat 7.3) 
26081 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
26083         * threads.c: delete the critical section of a sync block,
26084         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
26086 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
26088         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
26090 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26092         * appdomain.[ch]: handle the assembly preload event to try loading the
26093         assemblies using the paths we have in the current domain.
26095         * assembly.[ch]: created an assembly preload hook that is called to try
26096         loading the assembly by other means that the ones provided here.
26098         * domain.c: initialize the domain search path.
26100         From now on, assemblies (TODO: except corlib and System) are loaded
26101         according to these rules when using mono_assembly_load ():
26103                 1. It tries to load the assembly from the ApplicationBase
26104                 of the current domain appending .dll and .exe (TODO: have to
26105                 try loading from name/name.dll and name/name.exe).
26107                 2. It tries the search path specified in PrivateBinPath for the
26108                 current domain (if any).
26110                 3. Previous behavior.
26112 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
26114         * icall.c: implemented GetInterfaceMap() related icall.
26115         * domain.c, loader.h: load MethodInfo in mono_defaults.
26117 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
26119         * gc.c: disable the finalizer thread for now, untill all the issues
26120         with it are resolved.
26122 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
26124         * string-icalls.c: handle embedded nulls in string ctor when the
26125         length is specified.
26127 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
26129         * class.c: look for explicit interface implementation in parent
26130         classes, too.
26132 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
26134         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
26136 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
26138         * gc.c: protect handles with a critical section.
26140 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26142         * icall.c:
26143         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
26144         parameters. If no assembly specified, try getting the type from all
26145         the assemblies in the current domain, else, load the assembly and get
26146         the type from it.
26148 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26150         * marshal.c: applied patch from Aleksey Demakov that fixes
26151         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
26153 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26155         * icall.c: fixed get_location.
26157 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
26159         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
26160         declarations to make it work with older gcc. 
26162         * loader.c (mono_get_method): set signature->pinvoke for native calls
26164 2002-11-20  Dick Porter  <dick@ximian.com>
26166         * threads.c (mono_thread_init): Set the main thread's handle
26168 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
26170         * gc.c: allow compilation without GC support. Changed to match the
26171         mono coding style.
26173 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
26175         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
26177 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
26179         * reflection.c: set a public key token on the core assemblies.
26181 2002-11-18  Dick Porter  <dick@ximian.com>
26183         * threads.c: Split out some thread initialisation so that other
26184         files can set the start callback function.
26186         * gc.c: Run finalisers in a separate thread, to avoid stack
26187         overflow.  Fixes bug 31333.
26189         * appdomain.c: Set up GC finalisation thread.
26191         * reflection.c: 
26192         * object.c: 
26193         * domain.c: Use gc.h macros for GC_malloc
26194         
26195 2002-11-15  Dick Porter  <dick@ximian.com>
26197         * threadpool.c: 
26198         * threads.c:
26199         * appdomain.c: Removed mono_runtime_init_with_attach(),
26200         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
26201         merging the extra parameter with the existing function.  Removed
26202         unneeded code in mono_thread_attach().
26204 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
26206         * image.c (mono_image_loaded_by_guid): a method to get loaded
26207         images by guid. 
26208         (load_metadata_ptrs): we store the guid as string.
26210 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
26212         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
26214         * metadata.c (mono_guid_to_string): imported method form Zoltan
26215         Varga (slightly modified)
26217         * assembly.c (mono_assembly_open): load precompiled code
26219         * loader.h (MonoMethod): we store the method token for use in the
26220         aot compiler. 
26222 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26224         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
26225         the hook function called when an assembly is loaded.
26226         
26227         * domain.c: Modified file.
26228         (mono_domain_assembly_load): removed hash table insertion of assemblies.
26230         Fixes bug #33196.
26232 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
26234         * reflection.c: Map PEFileKind to the value expected by the WinNT
26235         image loader. 
26237 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26239         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
26240         Read until the buffer is filled completely.
26242 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26244         * icall.c: implemented MonoType.InternalGetEvent ().
26246 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26248         * appdomain.c: implemented InitAppDomainSetup. Delayed
26249         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
26250         the entry_assembly.
26252         * assembly.c: base_dir is now an absolute path ending with
26253         G_DIR_SEPARATOR.
26255         * icall.c: modified get_location according to the above changes.
26257         * object.c: init AppDomain.SetupInformation for the default domain after
26258         we have the entry assembly.
26260         * domain.c: when unloading a domain, setup = NULL.
26262 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
26264         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
26266 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
26268         * object.h, object.c: introduced mono_object_get_virtual_method ()
26269         to lookup the method invoked on an object when a callvirt is done on
26270         a method.
26271         * icall.c: make MethodInfo::Invoke() always do a virtual call.
26273 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26275         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
26276         current domain when loaded an assembly and failed to load it.
26278         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
26280 2002-10-31  Dick Porter  <dick@ximian.com>
26282         * icall.c: 
26283         * file-io.h: 
26284         * file-io.c: Return the error status in a parameter, as the
26285         GetLastError() value has long since been blown away if we try and
26286         look it up in a subsequent internal call invocation.  Delete the
26287         GetLastError() internal call, because it's useless.
26289 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
26291         * class.[ch]: added cast_class to fix bug 29517
26293 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
26295         * marshal.c: create valid IL code in the filter clause:
26296         the new JIT is less forgiving:-)
26298 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26300         * icall.c: removed get_property internal call.
26302 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
26304         * appdomain.h domain.c: Added an ID to appdomains.
26305         
26306         * threads.c threads.h icall.c: Implement icall
26307         Thread:GetDomainID(), and remove unused icall 
26308         CurrentThreadDomain_internal.
26310 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26312         * icall.c: Don't recurse through the base types in GetConstructor.
26313         Fixes bug #32063. 
26315 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
26317         * mempool.h, mempool.c: added mono_mempool_empty() and
26318         mono_mempool_stats().
26320 2002-10-23  Dick Porter  <dick@ximian.com>
26322         * file-io.c: 
26323         * file-io.h: 
26324         * icall.c: Added MonoIO.GetFileType internal call
26326 2002-10-17  Dick Porter  <dick@ximian.com>
26328         * appdomain.c (mono_runtime_cleanup): Don't signal the async
26329         delegate semaphore before waiting for all threads to finish,
26330         because new threads can also call async delegates.  Fixes bug
26331         32004.
26333         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
26334         of 3 seconds, in case another async job is queued.  (This part is
26335         needed because the bug fix reintroduced the 3s exit lag.)  This
26336         makes the mono_runtime_shutdown flag superfluous.
26338 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
26340         * reflection.c: include ehader size in method section headers.
26341         Really check for suplicated modules entries.
26343 2002-10-17  Martin Baulig  <martin@gnome.org>
26345         * debug-mono-symfile.c: Added back support for locals.
26347 2002-10-14  Martin Baulig  <martin@gnome.org>
26349         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
26350         MONO_TYPE_VOID.
26352 2002-10-14  Martin Baulig  <martin@gnome.org>
26354         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
26355         mono_class_get() instead of looking in the class cache. 
26357 2002-10-13  Martin Baulig  <martin@gnome.org>
26359         * debug-mono-symfile.c: Set version number to 28, include the
26360         signature in method names.
26362 2002-10-13  Martin Baulig  <martin@gnome.org>
26364         * debug-mono-symfile.h: Set version number to 27.
26366 2002-10-11  Martin Baulig  <martin@gnome.org>
26368         * gc.c: Don't register/unregister NULL pointers as disappearing links.
26370 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26372         * metadata.c, metadata.h: added helper function to allocate signatures.
26374 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26376         * icall.c: added internal call to get the location of machine.config.
26378 2002-10-08  Martin Baulig  <martin@gnome.org>
26380         * debug-mono-symfile.c: Ignore classes with a pending init for the
26381         moment.
26383 2002-10-03  Dick Porter  <dick@ximian.com>
26385         * threads.c: Freebsd pthread_t is a pointer
26387 2002-10-03  Dick Porter  <dick@ximian.com>
26389         * socket-io.c: Implemented GetHostName_internal
26391 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26393         * mono-config.c:
26394         (mono_config_parse_file): don't leak the text.
26396 2002-10-02  Martin Baulig  <martin@gnome.org>
26398         * debug-mono-symfile.c: Added support for methods.
26400 2002-10-01  Martin Baulig  <martin@gnome.org>
26402         * debug-mono-symfile.c: Don't emit methods and line numbers for
26403         the dynamic symbol file, just write the type table.  We can easily
26404         have an external helper program which creates a symbol file for an
26405         IL file.        
26407 2002-10-01  Dick Porter  <dick@ximian.com>
26409         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
26410         Only add the handle to the cleanup array when we're about to
26411         launch the thread.  Bug 31425 deadlocked when the test was run on
26412         mono under w32.
26414 2002-10-01  Martin Baulig  <martin@gnome.org>
26416         * debug-mono-symfile.c: Added support for properties.
26418 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26420         * reflection.c: unaligned store fix from Mark Crichton
26421         <crichton@gimp.org>.
26423 2002-09-27  Martin Baulig  <martin@gnome.org>
26425         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
26426         New interncall.
26428 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
26430         * assembly.h, assembly.c: use a sane API to hook into the assembly
26431         loading process instead of a useless special-purpouse hack
26432         (ngen needs a hook, too, for example).
26434 2002-09-27  Dick Porter  <dick@ximian.com>
26436         * threads.c (mono_thread_init): Call GetCurrentProcess() so
26437         io-layer can set up some process handle info.  Not needed on w32,
26438         but doesn't hurt either.
26440         * process.c: Pass the program name in the second parameter to
26441         CreateProcess, so the path is searched.  Include the working
26442         directory. Implemented process name, process enumeration, and some
26443         process detail internal calls.
26444         
26445         * icall.c: Added internal calls for process lookup, and some
26446         process details
26448 2002-09-26  Martin Baulig  <martin@gnome.org>
26450         * assembly.c (mono_install_open_assembly_hook): New global
26451         function to install a function to be invoked each time a new
26452         assembly is loaded.
26453         (mono_assembly_open): Run this callback function if set.
26455         * debug-mono-symfile.c: Put back line numbers for the dynamic
26456         symbol file and also record the .il file as source file.  This
26457         allows us to install the temporary symbol file as `file.dbg' just
26458         like a compiler-generated one.
26460 2002-09-26  Nick Zigarovich <nick@chemlab.org>
26462         * Corrected typo in gc.c (BOHEM vs BOEHM).
26464 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26466         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
26467         GetProperties. Also avoid calling g_slist_length in GetProperties and
26468         GetMethods.
26470 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26472         * reflection.c: avoid unaligned stores (bug spotted by
26473         Mark Crichton  <crichton@gimp.org>).
26475 2002-09-25  Martin Baulig  <martin@gnome.org>
26477         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
26478         instead of guint64 for addresses and added prologue/epilogue info.
26480 2002-09-25  Martin Baulig  <martin@gnome.org>
26482         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
26483         store line number info.  For the dynamic symbol file, we only need
26484         to provide the JIT generated dynamic line number info for the dynamic
26485         symbol file.
26487 2002-09-25  Martin Baulig  <martin@gnome.org>
26489         * debug-mono-symfile.h: Incremented version number.
26491 2002-09-24  Martin Baulig  <martin@gnome.org>
26493         * class.c (mono_debugger_class_init_func): New global function
26494         pointer variable.
26495         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
26496         call it.
26498         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
26499         function.  This is called via the mono_debugger_class_init_func
26500         hook to add all types to the dynamic type table.
26501         (ves_icall_MonoDebugger_GetType): New interncall to get a class
26502         from its metadata token.
26504         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
26505         New interncall for the debugger.
26507 2002-09-24  Nick Drochak <ndrochak@gol.com>
26509         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
26510         before using it in case it is null.
26511         
26512 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26514         * metadata.c: allow custom modifiers in local var signatures
26515         (bug spotted by Zoltan Varga).
26517 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
26519         * class.c: deal with the <Module> class that may have a NULL vtable.
26520         Eliminate warnings.
26522 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26524         * image.c, image.h: more strong name helpers.
26525         * monosn.c: more work: convert pem keys to cryptoapi format.
26527 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
26529         * string-icalls.c: speedup IndexOf.
26531 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26533         * icall.c: updates from Zoltan.2.Varga@nokia.com.
26535 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
26537         * icall.c: cleanup: use mono_object_domain ().
26539 2002-09-23  Martin Baulig  <martin@gnome.org>
26541         * debug-mono-symfile.c: Improved type support.
26543 2002-09-22  Martin Baulig  <martin@gnome.org>
26545         * debug-mono-symfile.c: Added support for reference types and strings.
26547 2002-09-22  Martin Baulig  <martin@gnome.org>
26549         * debug-mono-symfile.c: Started to work on the type table.
26551 2002-09-21  Martin Baulig  <martin@gnome.org>
26553         * debug-mono-symfile.c: Largely reworked the symbol table format.
26554         The symbol table is now incrementally updated each time a new
26555         method is added.  We're now also using our own magic and version
26556         so that you don't need to recompile all your classes if the
26557         dynamic table changes.
26558         (mono_debug_update_mono_symbol_file): Removed.
26559         (mono_debug_symfile_add_method): New function to add a method.
26561 2002-09-21  Martin Baulig  <martin@gnome.org>
26563         * icall.c
26564         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
26565         New interncall.
26567         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
26568         New interncall to get a method from its metadata token.
26570 2002-09-21  Martin Baulig  <martin@gnome.org>
26572         * debug-mono-symfile.c: Create type table.
26574 2002-09-20  Martin Baulig  <martin@gnome.org>
26576         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
26578 2002-09-20  Martin Baulig  <martin@gnome.org>
26580         * debug-mono-symfile.c: Provide information about params and locals.
26582 2002-09-20  Martin Baulig  <martin@gnome.org>
26584         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
26585         New interncall.
26587         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
26588         interncall to get a method from its metadata token.
26590 2002-09-20  Martin Baulig  <martin@gnome.org>
26592         * debug-mono-symfile.c: Added a few checks for method->header
26593         being non-NULL.  This should never happen, but for the moment
26594         let's use a g_warning() rather than a g_assert().
26596 2002-09-19  Mark Crichton  <crichton@gimp.org>
26598         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
26599         even if support for it isn't present.  Added an #ifdef to fix this.
26601         * socket-io.c: Added checks back for Solaris support.
26603 2002-09-19  Martin Baulig  <martin@gnome.org>
26605         * debug-mono-symfile.c (read_string, write_string): Reflect latest
26606         changes in the symbol file format.
26608 2002-09-18  Martin Baulig  <martin@gnome.org>
26610         * debug-mono-symfile.c: Set version number to 21.
26612 2002-09-18  Dick Porter  <dick@ximian.com>
26614         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
26615         on netbsd.  Fixes bug 30051.
26617 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26619         * reflection.c:
26620         (set_version_from_string): little fix.
26622 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26624         * monosn.c, Makefile.am: added strong name utility.
26625         * reflection.h, reflection.c: implemented delayed signing,
26626         locale, version and hash id assembly attributes.
26628 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26630         * loader.c, metadata.c: load param attributes in signatures.
26632 2002-09-16  Martin Baulig  <martin@gnome.org>
26634         * debug-mono-symfile.c: Added string table with all method names.
26636 2002-09-14  Martin Baulig  <martin@gnome.org>
26638         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
26639         fast method lookup.
26641 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26643         * reflection.c: record the public key token of referenced assemblies.
26645 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26647         * image.c, image.h: added functions to get the strong name and the
26648         public key of an assembly.
26649         * pedump.c: use them.
26651 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
26653         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
26655 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
26657         * marshal.c (mono_marshal_get_managed_wrapper): Added
26658         MONO_TYPE_BOOLEAN 
26660 2002-09-11  Martin Baulig  <martin@gnome.org>
26662         * gc.c: Call GC_unregister_disappearing_link() on all links when
26663         finalizing them, this is necessary to aviod a crash in boehm's
26664         finalize handler.
26666 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26668         * gc.c: handle GetTarget for finalized objects spotted and fixed by
26669         nick@chemlab.org.
26671 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
26673         * icall.c: implemented MonoType::Module.
26674         * reflection.c, reflection.h: mono_module_get_object () from
26675         Tomi Pakarinen <tomi.pakarinen@welho.com>.
26677 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
26679         * icall.c: ignore overridden methods in GetMethods ().
26680         Fix for FieldInfo::SetValue().
26681         * object.c: handle float/double in runtime invoke.
26683 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26685         * object.c: allow a constructor to be called again on an object.
26687 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26689         * class.h, class.c: move field layout code to it's own function and
26690         export it. Get an interface id earlier. Move fields in MonoClass
26691         so they are more cache friendly and align the bitfields.
26692         * loader.c: temporary handle get_param_names() for a runtime method.
26693         * reflection.c, reflection.h: more code to handle runtime creation of
26694         types.
26696 2002-09-09  Martin Baulig  <martin@gnome.org>
26698         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
26699         signature with the pinvoke field being set for the actual call.
26701 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26703         * icall.c: removed some unused icalls. Start of map of glib charsets
26704         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
26706 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
26708         * debug-helpers.c: break infinite loop (found and fixed by
26709         Holger Arnold <harnold@gmx.de>).
26711 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26713         * icall.c: target may be null in create_delegate.
26715 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26717         * marshal.c: handle a boolean return type.
26719 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26721         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
26723 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
26725         * gc.c: fix weakreferences.
26727 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
26729         * icall.c: added icall to get default codepage.
26731 2002-09-03  Dick Porter  <dick@ximian.com>
26733         * threads.h: 
26734         * threads.c: Use MonoThread instead of MonoObject where
26735         apropriate.
26737         Store running thread objects in a hash table, so that we have all
26738         the info to hand when waiting for them to finish
26739         (means we don't need OpenThread() any more, so mingw builds should
26740         be fully functional again.)
26742         * verify.c:
26743         * object.h: Added thread ID to MonoThread
26745 2002-09-03  Martin Baulig  <martin@gnome.org>
26747         * icall.c (System.Reflection.Assembly::get_location): New interncall.
26749 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26751         * icall.c: fixed leak in get_temp_path. Thanks lupus.
26753 2002-09-03  Martin Baulig  <martin@gnome.org>
26755         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
26756         argument to store the end address of the disassembled instruction.
26758         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
26759         here from debug-symfile.h.
26760         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
26761         JIT into this struct.
26762         (MonoSymbolFile): Added `char *image_file' field.
26763         (MonoDebugGetMethodFunc): Removed.
26764         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
26765         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
26766         (mono_debug_find_method): New method.
26768         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
26769         create a full symbol file.
26770         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
26771         and static symbol files.
26772         (mono_debug_find_method): The symbol file keeps an internal method hash,
26773         call this to get a MonoDebugMethodInfo from a MonoMethod.
26775         * debug-symfile.[ch]: Removed.
26777 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
26779         * image.c (do_mono_image_open): Remove linker version check.
26781 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
26783         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
26784         wrappers for instance methods.
26785         
26786 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26788         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
26790 2002-08-28  Dick Porter  <dick@ximian.com>
26792         * Makefile.am: Export HOST_CC for w32 builds
26794 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26796         * file-io.c process.c: MonoString are null terminated, no
26797         need for mono_string_to_utf16() anymore.
26799 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26801         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
26803 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26805         * icall.c, reflection.h: speedup System.MonoType.
26807 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26809         * reflection.c: allow null as the value of a string argument in
26810         custom attributes constructors.
26812 2002-08-27  Martin Baulig  <martin@gnome.org>
26814         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
26815         `trampoline_address' field.
26817 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
26819         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
26820         check (fixes bug #29486) 
26822 2002-08-27  Martin Baulig  <martin@gnome.org>
26824         * debug-mono-symfile.c: Changed the file format in a way that allows us
26825         open it read-only and to use a specially malloced area for all the
26826         dynamic data.  We can now also generate a symbol file on-the-fly if we're
26827         debugging IL code and there is no MCS generated symbol file for it.
26829 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26831         * object.c: added a define for a good string and array
26832         creation speedup (not enabled by default because we need to deal with
26833         the synch stuff).
26835 2002-08-26  Martin Baulig  <martin@gnome.org>
26837         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
26838         function to create a dynamic symbol file.  This is used by the
26839         debugger to create a symbol file for IL code on-the-fly.
26841 2002-08-26  Martin Baulig  <martin@gnome.org>
26843         * loader.c (mono_lookup_pinvoke_call): Include the error message
26844         from g_module_error() in the error message.
26846 2002-08-24  Martin Baulig  <martin@gnome.org>
26848         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
26849         function to update the symbol file.  The symbol file is mmap()ed
26850         writable, but private.  This allows us to install the symbol file
26851         together with the assembly.
26853 2002-08-24  Martin Baulig  <martin@gnome.org>
26855         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
26856         but they can read the new symbol file format which mcs is now creating.
26858         * debug-symfile.c (mono_debug_find_source_location): Moved to
26859         debug-mono-symfile.c; this is now operating on the new symbol file.
26861 2002-08-23  Martin Baulig  <martin@gnome.org>
26863         * debug-helpers.c (mono_method_desc_from_method): New function to get
26864         a MonoMethodDesc from a MonoMethod.
26866 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
26868         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
26869         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
26871 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
26873         * string-icalls.[ch]: make helper methods static.
26875 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26877         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
26878         types to it and to SetValueInternal.
26880         * object.c: Moved handle_enum label to its proper place. This was the
26881         f... bug! ;-)
26883         This time i compiled mcs and gtk-sharp and they both work.
26885 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26887         * icall.c: reverted partially my previous patch until 
26888         object.c:set_value handles enums correcly.
26890 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26892         * icall.c:
26893         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
26894         (ves_icall_System_Environment_get_MachineName): removed warning when
26895         compiling under cygwin.
26897 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
26899         * object.c: fixed field_get_value() for reference types.
26901 2002-08-22  Dick Porter  <dick@ximian.com>
26903         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
26904         Don't free a buffer while it's still needed.  Patch from Jonathan
26905         Liger <Jonathan.liger@wanadoo.fr>
26907 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
26909         * icall.c (ves_icall_System_Environment_get_Platform): Add new
26910         internal call.
26912 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
26914         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
26915         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
26917         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
26918         we call unmanaged code which throws exceptions.
26920 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26922         * appdomain.h: added per-domain entry_assembly.
26923         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
26924         arguments.
26925         * icall.c: Assembly::GetEntryAssembly icall.
26926         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
26927         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
26929 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
26931         * appdomain.h, gc.c: added mono_domain_finalize ().
26933 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26935         * object.c:
26936         (mono_print_unhandled_exception): changed g_warning by g_printerr
26937         because g_log has a 1024 characters limit (yeah, i got a big stack
26938         trace). Don't print exception name, that should be in ToString 
26939         returned string.
26941 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26943         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
26944         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
26946 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26948         * object.c:
26949         (mono_print_unhandled_exception): after previous commit, i realized
26950         that MS calls ToString on the exception. I changed this function to
26951         do that. This way we get stack_trace for free.
26953 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26955         * object.c:
26956         (mono_print_unhandled_exception): invoke Message property instead of
26957         getting 'message' field from Exception. Don't allocate memory for
26958         'trace' and 'message' if not needed.
26960 2002-08-18  Dick Porter  <dick@ximian.com>
26962         * unicode.c: Fix asserts to match Encoder.cs checks
26964 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26966         * marshal.c: fix unaligned store issue and a few wrong
26967         opcode argument types.
26969 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26971         * icall.c: added GetUninitializedObjectInternal internal call.
26973 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
26975         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
26976         to the right domain.
26978 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
26980         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
26982         * class.c (class_compute_field_layout): set blittable to false for Strings
26984         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
26986 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26988         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
26989         first chunk of code to create types at runtime. Code to
26990         handle ReflectedType/DeclaringType. Make reflection handles
26991         domain specific.
26993 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
26995         * class.c: set correct name in arrays.
26997 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
26999         * appdomain.c (mono_domain_transfer_object): make it work with
27000         valuetypes. bug fixes.
27002 2002-08-12  Dick Porter  <dick@ximian.com>
27004         * object.h: Rename some parameters to avoid c++ keywords (Patch
27005         from Joseph Wenninger <kde@jowenn.at>)
27007 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
27009         * icall.c: added icall to implement Assembly.GetFile*.
27011 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27013         * reflection.h, reflection.c: code to embed managed resources.
27015 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
27017         * class.c: move all the type size stuff into
27018         class_compute_field_layout().
27020 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27022         * class.c: ensure enums have always the correct instance size.
27023         * unicode.c: remove wrong assert.
27025 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27027         * assembly.c: fix mem corruption issue.
27028         * image.h, image.c: added mono_image_get_resource () to access
27029         managed resources.
27030         * icall.c: implemented Assembly.EntryPoint property and some
27031         Managed Resources related internalcalls.
27034 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27036         * image.c, image.h: impemented mono_image_get_entry_point ().
27037         * appdomain.c: use mono_image_get_entry_point.
27039 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27041         * reflection.c: support the object type argument when loading
27042         custom attributes.
27044 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
27046         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
27047         String as return type.
27049 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
27051         * reflection.c: fix encoding of named args for custom attrs to match
27052         the ms implementation. Read them back when instantiating custom
27053         attributes.
27055 2002-08-02  Radek Doulik  <rodo@ximian.com>
27057         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
27058         by Dietmar as quick fix
27059         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
27060         16 as stack size, used on more places as quick fix before Dietmar
27061         will fix it properly
27063 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27065         * object.h, object.c: added accessors for fields and properties.
27067 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27069         * class.c, class.h: made mono_class_get_field_from_name ()
27070         loop on parent types.
27071         Added mono_class_get_property_from_name ().
27073 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27075         * class.c, class.h: move the code to setup the type vtable in its own
27076         function so that it can be reused also for types created at runtime.
27077         Eliminate the "class" identifier from the header file.
27078         * reflection.c: setup the vtable for enums so that we can create
27079         objects for use in SetConstant ().
27081 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
27083         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
27084         instead of the delegate itself as this pointer (bug #28383)
27086 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
27088         * marshal.c (mono_marshal_get_managed_wrapper): added return type
27089         conversions.
27091 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27093         * loader.c: don't set the pinvoke bit on icalls.
27095 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
27097         * debug-helpers.c (mono_method_full_name): only print a number to
27098         indicate wrapper type (so that the output is more readable in traces).
27100 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
27102         * class.c (mono_class_init): include method override patch from Paolo
27104 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
27106         * icall.c: fixed GetTypeCode().
27108 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
27110         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
27111         use real delegate invoke function to make it work with multicast
27112         delegates (fix bug# 28291).
27114 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27116         * object.c: load constant strings.
27118 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27120         * reflection.c: no magic numbers.
27121         * tabledefs.h: security action enum.
27123 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27125         * assembly.c: fix possible memory corruption.
27127 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
27129         * reflection.h, reflection.c: added support for linking resources.
27130         * verify.c: check we have an updated corlib.
27132 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
27134         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
27135         string arrays.
27136         (mono_marshal_string_array): null terminate unmanaged string arrays.
27137         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
27139 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27141         * icall.c: Type.GetType () can now return also types from the
27142         calling assembly.
27144 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
27146         * loader.h, loader.c: stack walking support.
27147         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
27148         GetCallingAssembly.
27150 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
27152         * marshal.c: added optimisations for blittable types 
27154         * class.c (mono_array_class_get): do not set blittable attribute on arrays
27155         (mono_class_setup_mono_type): set blittable attribute for single
27156         and double.
27158         * marshal.c (mono_string_utf8_to_builder): impl.
27159         (mono_string_builder_to_utf8): impl.
27160         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
27162 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
27164         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
27165         (mono_marshal_get_managed_wrapper): impl. byref types
27167 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27169         * icall.c:
27170         (search_method): don't display debug message. 
27172 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
27174         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
27176 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
27178         * appdomain.c: set the missing filename when throwing exception.
27180 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
27182         * metadata.c (mono_type_size): code cleanup
27183         (mono_type_stack_size): removed some test code
27185 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
27187         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
27188         mono_get_exception_file_not_found now.
27190         * exception.c (mono_exception_from_name_two_strings): New version
27191         that will call a constructor with two string arguments. 
27192         (mono_get_exception_file_not_found): New helper routine, used to
27193         report file-not-found errors.
27195 2002-07-20  Dick Porter  <dick@ximian.com>
27197         * process.h:
27198         * process.c: Pass file handles to CreateProcess
27199         
27200         * icall.c:
27201         * file-io.h:
27202         * file-io.c: Implemented CreatePipe
27204 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
27206         * metadata.c (mono_get_param_info): set alignment for value types
27208 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27210         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
27211         Constify mono_domain_assembly_open().
27212         * loader.c: handle null namespace in icalls.
27214 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
27216         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
27217         (emit_str_to_ptr_conv): marshal object as structs
27219         * metadata.c (mono_type_to_unmanaged): marshal object as structs
27221         * marshal.c (mono_marshal_get_runtime_invoke): support value types
27223 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
27225         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
27226         (mono_marshal_get_native_wrapper): we an now return value types
27228 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27230         * verify.c: more checks implemented.
27232 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
27234         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
27235         (fix bug #27695)
27236         (mono_marshal_get_native_wrapper): allow byref arguments
27237         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
27238         impl. PtrToStringXXX methods
27239         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
27240         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
27241         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
27242         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
27243         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
27245 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27247         * reflection.c: fix buglet in parsing an assembly name.
27249 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
27251         * marshal.c (emit_ptr_to_str_conv): first impl.
27253 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
27255         * object.c, class.h: cache the vtable in the class as suggested by
27256         vargaz@freemail.hu (Zoltan Varga).
27258 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27260         * class.h, loader.c: added mono_field_from_token().
27261         * verify.c: first cut of type checking code.
27263 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
27265         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
27267 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
27269         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
27270         (fix bug #27782)
27271         (mono_marshal_get_remoting_invoke): impl.
27272         (mono_delegate_begin_invoke): impl.
27273         (mono_mb_emit_save_args): impl.
27274         (mono_delegate_end_invoke): impl.
27275         (mono_marshal_get_delegate_begin_invoke):
27276         (mono_marshal_get_delegate_end_invoke):
27277         (mono_marshal_get_delegate_invoke): generate a special name for
27278         those methods (including the signature) and associate them whith
27279         the delegate class. 
27281 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
27283         * reflection.[ch]: 
27284         (mono_reflection_type_from_name): now it has a MonoImage parameter
27285         which is used as the default image to search the type in. If the image
27286         is NULL or getting the type from it fails, it defaults to corlib.
27288         * icall.c: changed 1 call to mono_reflection_type_from_name to match
27289         new parameter.
27291 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27293         * reflection.c: update the parameter table index.
27295 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27297         * domain.c: don't include the mark byte in the string hash.
27299 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27301         * icall.cs: icall for Type.GetTypeCode ().
27302         * verify: a couple of fixes and disabled local initialization checks.
27304 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
27306         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
27308         * debug-helpers.c (mono_method_full_name): print the type of the
27309         runtime wrapper
27311         * metadata.c (mono_signature_hash): a hash function for signatures
27312         (mono_signature_hash): better hash algorithm
27314         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
27316         * debug-helpers.c (mono_method_full_name): this can now generate
27317         method names with signatures
27319         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
27320         method dont have this pointers.
27322 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
27324         * reflection.c: fixup typebuilder tokens.
27325         * image.c: fix buglet.
27326         * marshal.h: remove whitespace.
27327         * metadata.h, metadata.c: reinstate code that was removed.
27328         * verify.c: handle catch directives and fix another couple of bugs.
27330 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
27332         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
27333         (mono_marshal_get_native_wrapper): make it comp. with the old code
27334         (mono_marshal_get_native_wrapper): support boolean
27335         (mono_marshal_get_managed_wrapper): support more types
27337 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
27339         * class.c (class_compute_field_layout): compute class->blittable attribute.
27341 2002-07-09  Dick Porter  <dick@ximian.com>
27343         * threads.c: Make the thread cleaning up cope with threads that
27344         call ExitThread()
27346 2002-07-08  Radek Doulik  <rodo@ximian.com>
27348         * reflection.c (method_encode_code): use non-translated values to
27349         compute finally_start, this fixes exception handling on ppc, yay!
27351         * decimal.h (struct signscale): fix endianess
27353 2002-07-07  Radek Doulik  <rodo@ximian.com>
27355         * reflection.c: swap box_val and not val
27357 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
27359         * reflection.c, reflection.h: handle full assembly info in type name.
27360         Handle Type arguments when loading custom attributes.
27361         * icall.c: updated to use new mono_reflection_type_from_name () method.
27363 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27365         * loader.c:
27366         (method_from_memberref): also print assembly name when method not found.
27368 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27370         * icall.c:
27371         (ves_icall_TypeGetProperties): fixed bug #27473. 
27373 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27375         * reflection.c: display image name and token when cannot find the
27376         .ctor for an attribute.
27378 2002-07-05  Martin Baulig  <martin@gnome.org>
27380         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
27382 2002-07-04  Dick Porter  <dick@ximian.com>
27384         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
27385         compile on mingw.  This will cause mingw builds to not wait for
27386         subthreads to terminate after the main thread does.  I've lodged a
27387         bug with the mingw developers for them to wrap OpenThread().
27389 2002-07-03  Dick Porter  <dick@ximian.com>
27391         * threads.c: Store thread IDs instead of handles, because
27392         GetCurrentThread() returns a pseudohandle and therefore stores
27393         useless values.  mono_thread_cleanup() continues checking the
27394         array of threads until it is empty, to cope with subthreads
27395         spawning new threads after the main thread has finished.
27397         * profiler.h:
27398         * profiler.c:
27399         * profiler-private.h: Pass the thread ID to thread profiler
27400         functions, instead of a handle
27402 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27404         * verify.c: fixes to make it more usable.
27405         * pedump.c: added --verify code to verify IL code in an assembly.
27407 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27409         * reflection.c: turn errors into warnings to allow compiling corlib.
27411 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
27413         * reflection.c: add special cases to compile corlib.
27415 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27417         * reflection.c: handle properties with only a set method.
27419 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27421         * opcodes.h: add enum with opcodes in opval order.
27423 2002-07-01  Dick Porter  <dick@ximian.com>
27424         
27425         * object.h:
27426         * object.c (mono_runtime_run_main): Removed unneeded argument
27428 2002-06-28  Martin Baulig  <martin@gnome.org>
27430         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
27432 2002-06-27  Dick Porter  <dick@ximian.com>
27434         * threads.c: Store the handle in both the parent thread and in the
27435         subthread, to minimise the time between starting a new thread and
27436         storing its ID.
27438 2002-06-26  Dick Porter  <dick@ximian.com>
27440         * appdomain.c (mono_runtime_cleanup): Close the socket library
27441         after all the threads have finished, not before
27443 2002-06-26  Martin Baulig  <martin@gnome.org>
27445         * debug-symfile.c (mono_debug_find_source_location): Added
27446         `guint32 *line_number' argument.  If it's not NULL, store the line number
27447         there and return the file name without the line number.
27449 2002-06-25  Dick Porter  <dick@ximian.com>
27451         * icall.c:
27452         * process.h:
27453         * process.c: Process forking and other support functions
27455 2002-06-25  Dick Porter  <dick@ximian.com>
27457         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
27458         things dont happen when the image is closed.
27459         (mono_image_lookup_resource): Walk the resource section looking
27460         for a particular entry
27462         * cil-coff.h: PE resource section decoding
27464 2002-06-25  Dick Porter  <dick@ximian.com>
27465         
27466         * assembly.h:
27467         * assembly.c: 
27468         (mono_assembly_foreach): Accessor functions to walk the list of
27469         loaded assemblies
27470         (mono_assembly_set_main):
27471         (mono_assembly_get_main): Process methods need to know which
27472         assembly is the "main" one
27474         * object.c (mono_runtime_run_main): Record the main assembly
27476         * debug-helpers.c: Fix typo
27478 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
27480         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
27481         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
27483 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27485         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
27487 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
27489         * image.c (do_mono_image_open): Initialize reference count,
27490         otherwise we leak the MonoImage.
27492 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
27494         * reflection.c: small tweak to handle self-hosting.
27496 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
27498         * reflection.c: fix type name parse code.
27500 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27502         * reflection.c: break out of the loop.
27503         * image.c: special case corlib.
27505 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27507         * reflection.c: add all the custom attrs at the end to ensure the
27508         ctors have been properly initialized when the attributes are defined
27509         in the current assembly.
27511 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27513         * reflection.c: handle correctly multiple-nested types.
27515 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
27517         * row-indexes.h: fix typos.
27518         * reflection.c: adjust for typos and fix method_def_or_ref
27519         encoding in MethodImpl table.
27521 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27523         * reflection.c: fix entry point patching (thanks Serge!).
27525 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
27527         * verify.c: add check for System.Exception
27529 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
27531         * image.c, class.c: minifix for code just c&p'ed.
27532         * reflection.c: warning fix.
27533         * object.h, loader.h, domain.c: load also StringBuilder.
27535 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27537         * marshal.h, marshal.c: some support code to handle complex marshaling.
27539 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27541         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
27542         Better signatures with vtable error dump.
27544 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
27546         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
27548 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
27550         * icall.c (ves_icall_Type_GetField): impl.
27552 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27554         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
27555         to retrieve a marshal description blob for a field or param.
27557 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27559         * reflection.h, reflection.c: change order of nested type emission
27560         to avoid table corruption. The NestedTypes table is sorted.
27561         * icall.c: change order of GetConstructor results to workaround mcs bug.
27563 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27565         * reflection.h, reflection.c: handle field and param marshal
27566         information.
27568 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27570         * icall.c, marshal.c marshal.h: more Marshal class implementation.
27572 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27574         * reflection.c: fix call convention.
27576 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27578         * reflection.h, reflection.c: mono_image_get_memberref_token()
27579         takes a type instead of a class, now. Added
27580         mono_image_get_array_token() to create tokens for the special
27581         multi-dim array methods.
27583 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27585         * assembly.c: handle modules (no assembly table). Split
27586         loading references in its own function.
27587         * class.c: handle moduleref resolution scope.
27588         * image.c, image.h: cache module name in image.
27590 2002-06-07  Martin Baulig  <martin@gnome.org>
27592         * reflection.c (mono_image_get_type_info): Only add a class layout entry
27593         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
27595 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27597         * icall.c: more signature fixes that used uint instead of int.
27599 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27601         * reflection.c: fixed signature of field refs.
27603 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27605         * class.c, reflection.c: handle typerefs of nested types
27606         (both on read and when writing files).
27608 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27610         * icall.c: fix method signatures that tried to workaround the previous
27611         typo, d'oh!
27613 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
27615         * debug-helpers.c: fix typo.
27617 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27619         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
27620         rewrote the PE/COFF writing code (our programs are understood by the
27621         ms runtime, now).
27623 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
27625         * gc.c, gc.h, icall.c: weakreference support.
27627 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27629         * Makefile.am, mono-config.c: use $(sysconfdir).
27631 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27633         * icall.c: changed default precision of Double.ToString() to 15.
27634         Fixed memory leak. Unified with Single.ToString.
27636 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
27638         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
27640 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
27642         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
27643         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
27644         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
27645         and myself.
27647 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27649         * debug-symfile.c, sysmath.c: yet more compilation fixes.
27651 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27653         * reflection.c, socket-io.c: more compilation fixes.
27655 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27657         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
27658         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
27659         unicode.c: warning and compiler compatibility fixes.
27661 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27663         * class.h, metadata.c: fixed warnings/compilation errors.
27665 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
27667         * Makefile.am, mono-config.c, mono-config.h: configuration file
27668         support routines.
27669         * loader.c, loader.h: make Dll mapping configurable at runtime in the
27670         config file. Export methods to insert and lookup mappings.
27672 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
27674         * reflection.c: handle types and boxed objects in custom attr
27675         constructors.
27677 2002-05-30  Martin Baulig  <martin@gnome.org>
27679         * debug-symfile.c
27680         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
27682 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
27684         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
27685         to lookup the implmap row for a P/Invoke method.
27686         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
27687         P/Invoke method from the runtime on an as needed basis.
27689 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
27691         * metadata.c (mono_metadata_parse_signature): impl.
27693 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27695         * class.c: handle .pack directive.
27697 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
27699         * object.c: initialize static fields with RVA data.
27701 2002-05-25  Martin Baulig  <martin@gnome.org>
27703         * debug-symfile.c
27704         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
27706 2002-05-24  Martin Baulig  <martin@gnome.org>
27708         * debug-symfile.c
27709         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
27710         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
27711         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
27713 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
27715         * object.c: special case string ctros in invoke.
27716         * gc.c: silly whitespace changes.
27718 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
27720         * threadpool.[ch]: impl. a threadpool that can
27721         be used by mint and mono.
27723 2002-05-22  Martin Baulig  <martin@gnome.org>
27725         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
27726         The first argument is now a `MonoReflectionModuleBuilder *', the return
27727         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
27728         `methods' field to get the method builder.  The `token' argument is the
27729         unfixed token.
27731         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
27732         invalid characters instead of g_assert_not_reached()ing.  This seems
27733         to be the behaviour of mscorlib.
27735 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
27737         * object.c (mono_runtime_invoke_array): applied patch from Rachel
27738         Hestilow to fix bug #25104
27740 2002-05-21  Martin Baulig  <martin@gnome.org>
27742         * debug-symfile.c (mono_debug_find_source_location): New function.
27743         Looks up an IL offset in the line number table and returns the source
27744         location as a string.
27746 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27748         * icall.c:
27749         (mono_double_ToStringImpl): changed %f by %g until we have something
27750         better.
27752 2002-05-21  Nick Drochak  <ndrochak@gol.com>
27754         * icall.c : Use different name for Math.Pow's icall.  Needed to check
27755         parameters first in C#.
27757 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27759         * icall.c, reflection.h: added icall to get info about an event.
27761 2002-05-20  Radek Doulik  <rodo@ximian.com>
27763         * object.c (mono_value_box): don't use memcpy for boxing on BIG
27764         endian
27765         (mono_value_box): don't use memcpy for small sizes on
27766         architectures with unaligned access
27768 2002-05-20  Martin Baulig  <martin@gnome.org>
27770         * reflection.c (mono_reflection_setup_internal_class): Don't crash
27771         if `tb->parent == NULL'.
27772         (mono_reflection_create_internal_class): New function.  This is
27773         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
27774         for enum types.
27776         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
27777         New interncall.
27779 2002-05-19  Martin Baulig  <martin@gnome.org>
27781         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
27782         argument to get the length, don't default to the array length.
27784 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
27786         * assembly.c (mono_assembly_setrootdir): New function used to
27787         override the MONO_ASSEMBLIES directory.
27789 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27791         * icall.c: ValueType_GetHashCode() initialize local var.
27793 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27795         * reflection.c: sort custom attributes table.
27797 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27799         * reflection.c: support named args in custom attributes (write support).
27801 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
27803         * reflection.c: fix finally position calculation.
27805 2002-05-15  Radek Doulik  <rodo@ximian.com>
27807         * reflection.c: fixed endianess at many places
27809         * icall.c (ves_icall_InitializeArray): comment out debug msg
27811 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
27813         * object.c (mono_unhandled_exception): new function to handle
27814         unhandled exceptions.
27815         (mono_unhandled_exception): call the UnhandledException event.
27816         (mono_runtime_delegate_invoke): impl.
27818 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
27820         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
27821         returns the RVA, not the direct pointer to the data. Handle the case
27822         when the class size is fixed.
27824 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
27826         * reflection.c: fix some endianess issues.
27828 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
27830         * object.c (mono_runtime_invoke): is now able to catch exceptions.
27832         * threads.c (mono_thread_init): added a callback which is invoked
27833         at thread start.
27835 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
27836         
27837         * icall.c: make GetHashCode return non-negative values.
27839 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
27841         * object.c, icall.c, gc.c: revert to address-based hashcode.
27843 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
27845         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
27847 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27849         * icall.c, class.c: special case <Module>.
27851 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
27853         * icall.c: fix bug in GetNow().
27855 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
27857         * object.c (mono_runtime_class_init): make sure that we call all
27858         static class constructors.
27860 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27862         * reflection.c: sort methodsemantics table.
27864 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27866         * reflection.h, reflection.c: honour init locals setting.
27868 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
27870         * icall.c: copied Double ToStringImpl for Single ToStringImpl
27872 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
27874         * reflection.c: support ContructorBuilders in attribute blob creation.
27876 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27878         * reflection.c: some changes to build a binary that can be run
27879         directly in windows.
27881 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
27883         * loader.c: print a big message when an icall can't be found.
27885 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27887         * string-icalls.c: fix bug 24248.
27889 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
27891         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
27892         icall.c, reflection.h: separate assembly loading by pathname and by
27893         assembly name. Use the MONO_PATH env var to search for assemblies.
27895 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27897         * assembly.c, image.h: add some support for assemblies
27898         with multiple modules.
27899         * class.c, class.h: export mono_class_from_typeref().
27900         * loader.c: remove duplicated code and use mono_class_from_typeref(),
27901         instead.
27903 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27905         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
27906         documentation says (the ECMA one is correct).
27908 2002-05-02  Dick Porter  <dick@ximian.com>
27910         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
27911         Don't name the synchronisation mutex.
27913 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
27915         * rand.c
27916         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
27917         Make the prototypes match.
27918         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
27919         Same.
27921         * icall.c
27922         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
27923         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
27924         all systems have tm.tm_zone, so use strftime() with %Z to print
27925         the timezone abreviation into a temp string.
27927         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
27928         rather than mono_array_addr() on a MonoString on Big Endian
27929         machines.
27931 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
27933         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
27934         fix bug 24041
27936 2002-04-30  Dick Porter  <dick@ximian.com>
27938         * socket-io.c: Cope with SOCKET being an integer rather than a
27939         pointer now.
27941         * threads.c: Added Thread_free_internal, to deal with thread
27942         handle cleanup.  Moved calls to handle_store() and handle_remove()
27943         to start_wrapper(), so each can only be called once.  Allocate
27944         synchronisation blocks with GC_malloc(), and use GC finalisation
27945         to close the handles.
27947         * icall.c: added System.Threading.Thread::Thread_free_internal
27949 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27951         * icall.c: support Environment.Exit, CommandLineArgs().
27953 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27955         * object.c, object.h: added mono_runtime_run_main () and
27956         mono_runtime_get_main_args () for use in System.Environment.
27958 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27960         * gc.c: fix thinko, enable actual finalization since the jit is now
27961         fixed.
27963 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27965         * gc.c, object.c: take into account that an object may be offset wrt the address
27966         returned by GC_malloc().
27968 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
27970         * image.c: handle files without entries in the assembly table (modules).
27972 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
27974         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
27975         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
27976         allowed to be null when it's System.Object class setup.
27978 2002-04-27  Martin Baulig  <martin@gnome.org>
27980         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
27981         if `tb->parent == NULL' rather than crashing.
27983 2002-04-28  Nick Drochak  <ndrochak@gol.com>
27985         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
27986         calling acos() where asin() should have been called.
27988 2002-04-26  Martin Baulig  <martin@gnome.org>
27990         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
27991         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
27992         there's a subdirectory called `System', but we don't want to read that
27993         subdirectory as an assembly.
27995 2002-04-25  Martin Baulig  <martin@gnome.org>
27997         * debug-symfile.c: Reflect latest MonoString changes.
27999 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
28001         * rand.c, rand.h: instance method icalls need to have an explicit
28002         this pointer as first argument in the C implementation.
28004 2002-04-25  Nick Drochak <ndrochak@gol.com>
28006         * icall.c: Fix typo in map for GetNonZeroBytes
28008 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
28010         * string-icalls.c : String does now passes unit tests without any 
28011         errors, the following changes has been made:
28012         
28013         Implemented replace methods.
28014         Renaming of methods to (try) follow the standard.
28015         Fixed compare ordinal
28016         Made all memory allocated directly to function instead of via icall function.
28017         Small performance fix in is_in_array function
28018                         
28019  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
28021         c (mono_string_Internal_ctor_charp_int_int):
28022         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
28023         sindex < 0, throw ArgumentOutOfRangeException instead of
28024         ArgumentNullException.
28026         Added new check for length == 0, however
28027         I need to make it return String.Empty from the C code.
28028         
28029         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
28030         that calculate the length for us here.
28031         
28032         (mono_string_Internal_ctor_sbytep_int_int): Replaced
28033         mono_string_new_utf16 with mono_string_new, since value is utf8.
28035 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28037         * object.c: register the object for finalization if needed.
28038         Allocate one more char in the string for the terminating 0 char.
28040 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28042         * class.c, class.h, image.c: check if a type implemenst a destructor.
28043         Use the proper key for array class lookups.
28044         * icall.c: register the icalls in the System.GC class.
28045         * gc.c, gc.h: GC-related functions and icalls.
28047 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28049         * icall.c:
28050         * socket-io.c:
28051         * unicode.c: free some strings gotten from mono_string_to_utf8 and
28052         changed a couple of free () by g_free ().
28054         * decimal.c: one-liner in the comments for decimal2string ().
28056 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
28058         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
28060 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
28062         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
28063         * object.c (mono_runtime_invoke_array) : handle null in params
28065 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
28067         * string-icalls.c: fixed bug in split (one off bug)
28069 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
28071         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
28072         * icalls.c: added String::Equals as internal method
28074 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
28076         * threads.c: fixed bug in the double interlocked functions
28078 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
28080         * threads.c: implemented all of the new interlocked icalls.
28081         * string-icalls.c: fix a bug in insert.
28082         * icalls.c: added the icalls for interlocked, removed old string functions.
28083         
28084 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
28086         * loader.c: fix off-by-one error when reading argument names.
28088 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28090         * profiler.c: win32 counter implementation (untested).
28091         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
28092         (the latter needs testing and more complete impl. from win32 folks).
28094 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
28096         * object.c: mono_array_new_full workaround mono_array_class_get
28097         problem.
28099 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
28101         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
28102         * object.h (mono_string_chars): Changed casting type.
28104 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
28106         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
28107                            method signatures to use gunichar2 instead of gint16.
28109 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
28111         * object.h, object.c: domain-specific versions of mono_object_new and
28112         mono_array_new.
28114 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
28116         * object.c: changed String layout
28118         * string-icalls.c (mono_string_Internal_ctor_chara): added
28119         internal string constructors.
28121 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
28123         * threads.c: pass 'this' to the thread start routine.
28125 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28127         * string-icalls.c: fix IndexOf and LastIndexOf. Now
28128         InternalCompareStr don't call twice mono_string_cmp_char for the last
28129         character. Improved performance in mono_string_cmp_char.
28131 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
28133         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
28134         code into its own library: libmonoruntime.
28136 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
28138         * object.h, object.c: changed array format so that szarrays do not
28139         require a bounds structure.
28140         * icall.c, appdomain.c: support for new szarray format.
28142 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
28144         * metadata.c: compare also the retuns type when comparing signatures:
28145         we didn't do this as an optimization since really overloaded methods
28146         must differ also in the arguments, but this doesn't work with
28147         low-level IL code (or when using explicit conversion operators: see
28148         bug#23498 for an example).
28150 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
28152         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
28154 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
28156         * icall.c: make MonoType::GetElementType its own icall.
28158 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
28160         * icall.c: remove MonoMethod_get_Name().
28161         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
28162         object.
28164 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
28166         * string-icalls.c: optimized a few methods.
28168 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
28170         * icall.c: added all new string internal calls
28171         * string-icalls.c: added, new string internal call implementation.
28172         * object.c: added mono_string_new_size for allocating a string a size
28174 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
28176         * object.c (mono_object_isinst): use the same code as in the
28177         optimized x86 version.
28179 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
28181         * profiler.c: TSC-based timer code (faster and more accurate).
28182         Not hooked up in configure, yet (set USE_X86TSC to 1).
28184 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
28186         * profiler.c, profiler.h: track time spent compiling methods.
28187         * threads.c: track thread creation/destruction.
28189 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
28191         * profiler.c, profiler.h, profiler-private.h: profiling interface
28192         and sample implementation. Moved here so that it can be used also by
28193         the jit.
28195 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
28197         * reflection.c, reflection.h: keep types and other handles separate in
28198         the hash tables for referred tokens. Add guid for modules.
28200 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
28202         * assembly.c: fix bugs found with valgrind.
28203         * metadata.h, metadata.c: added mono_metadata_guid_heap().
28205 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
28207         * threads: added icall support for getting current domain for
28208                    the thread.
28210 2002-04-13  Martin Baulig  <martin@gnome.org>
28212         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
28213         (MonoDebugVarInfo): Added `index' field for register based addresses.
28214         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
28215         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
28216         `MonoDebugVarInfo *params' and `guint32 this_offset' with
28217         `MonoDebugVarInfo *this_var'.
28219         * debug-symfile.c (relocate_variable): New static function to write
28220         a location description for a local variable or method parameter.
28222 2002-04-12  Martin Baulig  <martin@gnome.org>
28224         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
28225         stack offset and begin/end scope address of a local variable.
28226         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
28227         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
28228         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
28230         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
28231         Added new relocation types for start/end scope of a local variable.
28233 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28235         * object.h: add mono_object_domain() macro.
28236         * reflection.c: handle typespecs.
28237         * icall.c: MonoMethod::get_Name() implementation.
28239 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28241         * icall.c: String::GetHashCode() icall implementation.
28243 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28245         * icall.c: String::IndexOfAny icall.
28246         * object.c, object.h: make array->max_length more useful.
28247         Intrduced mono_object_class() and mono_string_length() macros.
28249 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28251         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
28252         instead of g_unichar_isdigit.
28254 2002-04-11  Nick Drochak  <ndrochak@gol.com>
28256         * icall.c: Implement a simple Double.ToString().
28258 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
28260         * appdomain.h: only io-layer.h is supposed to be included.
28261         * icall.c: explicitly import environ. Fix warning.
28263 2002-04-10  Nick Drochak  <ndrochak@gol.com>
28265         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
28266                 return true even if it's not Daylight Savings time.
28267                 Only return false for the case where the function isn't
28268                 implemented for a plaform (read Windows).
28270 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28272         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
28273         data with a mutex.
28275 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
28277         * mempool.c (mono_mempool_alloc): only use g_malloc when
28278         absolutely necessary.
28280 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
28282         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
28284         * class.c (mono_class_vtable): use domain mempool to allocate vtable
28285         (mono_class_proxy_vtable): use domain mempool
28287 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
28289         * appdomain.h, appdomain.c: split initialization that requires the
28290         execution engine support into mono_runtime_init().
28292 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
28294         * class.c (mono_class_init): don't include vtable inside MonoClass
28295         to save some memory, gather some statistics.
28296         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
28298 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28300         * icall.c: internalcall implementation for ValueType.Equals().
28302 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
28304         * object.c (mono_message_init): moved 
28305         (mono_runtime_exec_main): new arch. independent impl.
28306         (mono_runtime_invoke_array): new method - like
28307         mono_runtime_invoke, but you can pass an array of objects.
28308         (mono_remoting_invoke): new arch. independent impl.
28309         (mono_message_invoke): new arch. independent impl.
28310         (mono_runtime_class_init): new arch. independent impl.
28311         (mono_runtime_object_init): new arch. independent impl.
28313 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28315         * metadata.c, object.c, reflection.c: documented the exported
28316         functions.
28318 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
28320         * icall.c: simpler code to pass the assembly builder data to corlib.
28321         Implement GetNestedTypes() internalcall.
28323 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28325         * class.c: warn if a type can't be loaded.
28327 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
28329         * image.h: typedef MonoImageOpenStatus
28330         * types.h: removed unused file
28331         
28332 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
28334         * icall.c: Enum_ToObject accepts enum value arguments.
28336 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
28338         * class.c: move initialization of properties, events and nested
28339         classes, so that they happen for interfaces, too.
28341 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
28343         * icall.c: cleanup some ugly casts in Array_SetValue*.
28345 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
28347         * icall.c: the values array fro enums is of the correct type, now.
28348         Implement (correctly) getFullName instead of assQualifiedName for
28349         MonoType.
28350         * reflection.h, reflection.c: added mono_type_get_name ().
28352 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
28354         * assembly.c, image.h: for each MonoImage, record from wich assembly
28355         it was loaded.
28356         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
28357         Make Type.Assembly work.
28359 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
28361         * debug-symfile.h: use char* instead of gpointer to avoid
28362         unnecessary casts.
28364         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
28366         * icall.c (ves_icall_InternalExecute): impl. FielSetter
28367         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
28369 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
28371         * icall.c (mono_message_init): impl. (code cleanup)
28372         (ves_icall_InternalExecute): impl. FieldGetter
28374         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
28375         defined we call all (non-static)methods through the vtable. 
28377 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
28379         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
28380         finalizer even though the memory is still referenced (and the chunk of
28381         memory is not freed).
28383 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
28385         * assembly.c: fix brokeness.
28387 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
28389         * class.c: kill some warnings. Check explicit interface method
28390         implementation also without considering the namespace.
28391         Load also literal strings in static class data.
28393 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
28395         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
28396         (default_assembly_name_resolver): Make the resolver take the
28397         "base" directory where the assembly was originally defined, so we
28398         can load DLLs that are in the same directory as the assembly that
28399         is being referenced.
28401 2002-03-28  Dick Porter  <dick@ximian.com>
28403         * file-io.h: 
28404         * file-io.c:
28405         * socket-io.c: 
28406         * unicode.h: 
28407         * unicode.c: Warning cleanups
28409 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
28411         * object.h, reflection.h: use the correct type instead of MonoObject.
28413 2002-03-28  Martin Baulig  <martin@gnome.org>
28415         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
28416         (mono_debug_update_symbol_file): Initialize classes if necessary.
28418 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
28420         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
28421         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
28423 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
28425         * assembly.h: fix function prototype.
28426         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
28427         * mono-endian.h: use const cast.
28429 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
28431         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
28433 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
28435         * loader.c: don't assert when a typeref can't be loaded, give
28436         a chance to the runtime to trow an exception instead.
28437         * loader.h: fix warning.
28439 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
28441         * class.c (mono_class_proxy_vtable): added proxy support
28443 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
28445         * icall.c: removed last of PAL calls, added System.Environment
28446         * file-io.h, file-io.c: MonoIO implementation
28447         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
28449 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
28451         * appdomain.c: do not use the byte marker in ldstr table lookup.
28452         * debug-helpers.c: allow two ':' to separate class and method name.
28453         * object.c: allocate arrays bounds with the GC, too.
28454         * verify: add a few more checks.
28456 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
28458         * reflection.c: output also literal strings. Allocate parameter data
28459         with GC_malloc() (thanks, Martin, for catching this!).
28461 2002-03-26  Martin Baulig  <martin@gnome.org>
28463         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
28464         include the `this' offset in the `param_offsets'.
28466 2002-03-25  Martin Baulig  <martin@gnome.org>
28468         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
28469         mono_debug_get_class() function to get the classes. Added new
28470         relocation types for arrays and strings.
28471         (mono_debug_get_class): New static function to search in all
28472         referenced assemblies for a metadata token.
28474         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
28476 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
28478         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
28479         hold gc-allocated objects. Make the string heap a stream like the
28480         others. Removed duplicated code when writing stream info.
28481         Added asserts to catch possible buffer overflows. Set the sorted map
28482         for tables that need sorting. Added some documentation.
28484 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
28486         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
28487         for interned strings and vtables.
28489 2002-03-24  Martin Baulig  <martin@gnome.org>
28491         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
28492         it in the array since it was created with g_slist_prepend().
28494 2002-03-24  Martin Baulig  <martin@gnome.org>
28496         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
28497         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
28498         (mono_debug_method_from_token): Renamed to
28499         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
28500         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
28502         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
28503         relocation types.
28505         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
28507 2002-03-24  Martin Baulig  <martin@gnome.org>
28509         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
28510         (mono_debug_method_from_token): New func.
28512         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
28513         New interncall, calls mono_debug_local_type_from_signature().
28514         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
28515         calls mono_debug_method_from_token().
28517 2002-03-23  Martin Baulig  <martin@gnome.org>
28519         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
28520         specifies the number of bytes to be converted, not the array size.
28521         Return the number of chars, not the number of bytes.
28522         (ves_icall_iconv_get_chars): The `byteCount' argument
28523         specifies the number of bytes to be converted, not the array size.
28525 2002-03-23  Martin Baulig  <martin@gnome.org>
28527         * reflection.h (MonoReflectionSigHelper): New type.
28529         * reflection.c (mono_reflection_sighelper_get_signature_local),
28530         (mono_reflection_sighelper_get_signature_local): New functions.
28532         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
28533         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
28534         interncalls.
28536 2002-03-23  Martin Baulig  <martin@gnome.org>
28538         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
28539         is_writeable is set.
28540         (mono_raw_buffer_update): New function to write the modified map
28541         back to disk.
28543         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
28545         * debug-symfile.c (mono_debug_update_symbol_file): Call
28546         mono_raw_buffer_update() when done writing.
28548 2002-03-23  Martin Baulig  <martin@gnome.org>
28550         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
28552         * debug-symfile.c: Added support for arguments and local variables.
28554 2002-03-23  Dick Porter  <dick@ximian.com>
28556         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
28557         protected by ifdefs, hence breaking the w32 build.
28559 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28561         * object.c: implement is_interned() the right way.
28563 2002-03-21  Martin Baulig  <martin@gnome.org>
28565         * debug-symfile.[ch]: New files to handle debugging information
28566         files. There's also support to dynamically update these symbol
28567         files to include machine dependent information.
28569 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
28571         * threads.c (mono_thread_create): new function to create thread
28572         from C
28574 2002-03-20  Martin Baulig  <martin@gnome.org>
28576         * icall.c (ves_icall_InternalInvoke): Create a new object if the
28577         method is a constructor.
28578         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
28579         points to ves_icall_InternalInvoke().
28581 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
28583         * file-io.c: Flush shouldn't throw exceptions.
28585 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
28587         * file-io.c: FileStream flush support; FileSetLength now
28588         restores file pointer.
28590 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
28592         * class.c: set image for pointer classes.
28594 2002/03/19  Nick Drochak <ndrochak@gol.com>
28596         * sysmath.c: Forgot one.
28598 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
28600         * sysmath.c: Avoid redefining existing names.
28602 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
28604         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
28605         handled by runtime as icall rather than dllimport from libm.so
28606         * file-io.c, file-io.h: fixed handle argument type.
28608 2002-03-18  Dick Porter  <dick@ximian.com>
28610         * reflection.c (mono_image_get_type_info): rename interface to
28611         iface, because of "#define interface struct" on windows.
28613 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
28615         * class.c, class.h: rename and export mono_ptr_class_get().
28616         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
28617         * reflection.c, reflection.h, icall.c: better/saner type name
28618         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
28619         method signatures.
28621 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
28623         * class.c (mono_class_init): removed hardcoded GHC_SLOT
28625         * icall.c (ves_icall_InternalInvoke): impl.
28627 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
28629         * reflection.c: output the interface map table, too.
28631 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
28633         * class.c (class_compute_field_layout): separate computation of 
28634         static field layout
28636 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
28638         * icall.c: added System.Buffer support.
28639         * file-io.c: moved file icalls from PAL to FileStream.
28641 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
28643         * icall.c (ves_icall_System_Object_GetHashCode): impl.
28645 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
28647         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
28649 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
28651         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
28653 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28655         * debug-helpers.{c,h}: moved here from monograph some useful functions
28656         to locate a method by name/signature in a class or image. Included
28657         also a small and flexible IL disassembler.
28659 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28661         * reflection.c: fixup tokens in methods with small header size, too.
28663 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
28665         * object.c (mono_string_to_utf8): remove assert(!error), instead
28666         print a warning. 
28668 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
28670         * icall.c: update to the new mono_Array_class_get interface.
28672 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
28674         * appdomain.c, object.c: Boehm-GC enable.
28675         * icall.c: make get_data_chunk() support split data requests.
28676         Ensure a class is initialized in more cases. Return only the first
28677         property found in GetProperties() or the compiler gets confused. 
28678         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
28679         * reflection.h, reflection.c: add fixup mechanism for field and method
28680         tokens. Initialize assembly->typeref in a single place. Output
28681         properties after events. Support custom attributes for events, too.
28682         Typo fix for paramter custom attrs.
28684 2002-03-07  Martin Baulig  <martin@gnome.org>
28686         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
28688 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
28690         * class.c (mono_array_class_get): fix. for multi. dim. arrays
28692 2002-03-06  Martin Baulig  <martin@gnome.org>
28694         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
28695         non-zero lower bounds. See testcases #F10-#F13.
28697 2002-03-05  Martin Baulig  <martin@gnome.org>
28699         * exception.c (mono_get_exception_argument_out_of_range): New exception.
28701         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
28702         ves_icall_System_Array_GetValue(), only calculate the absolute array position
28703         here.
28704         (ves_icall_System_Array_SetValue): Likewise.
28705         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
28706         as argument and does the actual work. This function is used when copying a
28707         multi-dimensional array.
28708         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
28709         now do all the widening conversions of value types.
28710         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
28712 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28714         * class.c: remove some magic numbers and use the smbolic names,
28715         instead. Added init_events() to load event info at class init time.
28716         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
28717         and mono_metadata_methods_from_event().
28718         * reflection.h, reflection.c: added support for writing out the evnets
28719         related information.
28721 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
28723         * reflection.h, icall.c: use a different method (GetInterfaces)
28724         to gather interface info and add isbyref, isprimitive and
28725         ispointer to the ves_icall_get_type_info() return value.
28727 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
28729         * class.h: stared adding support for events.
28730         * icall.c: split find_members implementation. Added debug icall to get
28731         the address of an object.
28732         * reflection.c: handle TypeBuilders in mono_type_get_object().
28734 2002-03-01  Martin Baulig  <martin@gnome.org>
28736         * icall.c (ves_icall_System_Array_GetLength): This must throw an
28737         ArgumentOutOfRangeException(), not an ArgumentException().
28738         (ves_icall_System_Array_GetLowerBound): Likewise.
28739         (ves_icall_System_Array_GetValue): Improved argument checking.
28740         (ves_icall_System_Array_SetValue): Improved argument checking.
28742 2002-03-01  Martin Baulig  <martin@gnome.org>
28744         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
28745         called with invalid arguments rather than just dying with g_assert().
28746         (ves_icall_System_Array_SetValue): Likewise.
28747         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
28748         raise a NotImplementedException instead.
28749         (ves_icall_System_Array_GetLength): Added argument checking.
28750         (ves_icall_System_Array_GetLowerBound): Added argument checking.
28752 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
28754         * object.h (mono_assert): new macros mono_assert and
28755         mono_assert_not_reached
28757 2002-02-28  Martin Baulig  <martin@gnome.org>
28759         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
28760         and "System::String::IsInterned" to "System::String::_IsInterned".
28762 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
28764         * icall.c: remove hacks for typebuilder. Added icall to create a
28765         modified type from a tybebuilder.
28766         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
28767         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
28768         to create a backing MonoClass for a TypeBuilder.
28770 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
28772         * class.c, class.h: more refactoring of class init.
28773         Export mono_class_setup_mono_type() and mono_class_setup_parent().
28775 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
28777         * marshal.c, marshal.h: start of marshaling interface.
28779 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
28781         * icall.c: fix order in assembly qualified name icall.
28783 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
28785         * class.c: do not free str, since we store it in the hash table.
28786         * reflection.h: add label field to MonoILExceptionInfo.
28787         * reflection.c: handle references to more than one assembly. Handle
28788         case when there isn't a module created in the assembly.
28790 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
28792         * class.c: Fix typo. Start refactoring of class init code.
28794 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
28796         * appdomain.c: exit with 1 on error.
28797         * class.c: we already have the name in MonoClassField.
28798         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
28799         MonoStreamHeader instead of an offset of image->raw_metadata.
28801 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
28803         * appdomain.c (mono_init): Be even more descriptive about the error.
28805 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
28807         * appdomain.c: give the user an informative message when corlib can't
28808         be loaded.
28810 2002-02-26  Martin Baulig  <martin@gnome.org>
28812         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
28813         New icall to get the time zone data.
28815 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
28817         * reflection.c: set virtual and raw size of section correctly.
28818         * threads.c: transfer domain information to newly created threads.
28820 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
28822         * class.c: when instancing a class in a domain, load the default
28823         vaules for static fields from the constant table. Fix System.Enum to
28824         not be an enum.
28825         * icall.c: implement Object::GetType() internalcall. Implemented
28826         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
28827         Fixed checking of binding flags in find_members().
28828         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
28829         * reflection.c: handle enumerations when writing to the constant
28830         table. Use a different object cache for types.
28833 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
28835         * object.c (mono_object_isinst): fix for arrays
28837         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
28839 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
28841         * object.c: don't use mprotect ()  and fix intern pool hash table
28842         lookup for big endian systems.
28844 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28846         * icall.c: change type_is_subtype_of () signature.
28848 2002-02-21  Mark Crichton  <crichton@gimp.org>
28850         * rand.c, rand.h: Added random number generator for
28851         System.Security.Cryptography classes.
28853         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
28855         * icall.c: Added System.Security.Cryptography calls.
28857 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
28859         * class.c, icall.c, metadata.c: better support for pointer types.
28860         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
28861         * reflection.c: Add support for getting custom attrs for properties
28862         and simplify some code.
28864 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
28866         * icall.c: change getToken () and add custom attribute GetBlob()helper
28867         method.
28868         * reflection.h: add custom attrs array to the reflection builder structures.
28869         * reflection.c: encode and emit custom attributes for all the relevant
28870         reflection objects. Cache fieldref and methodref tokens. Change
28871         mono_image_create_token() interface to take a MonoDynamicAssembly.
28872         More complete custom attributes decoder. Load custom attributes for
28873         Assembly, Field, Method and Constructor objects, too. Make the
28874         returned array an Attribute[] one, not object[]. Added
28875         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
28876         custom attribute constructor.
28878 2002-02-20  Dick Porter  <dick@ximian.com>
28880         * icall.c:
28881         * rawbuffer.c:
28882         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
28883         problem code out for now).
28885 2002-02-19  Radek Doulik  <rodo@ximian.com>
28887         * object.c (mono_ldstr): use hash table to avoid multiple swapping
28889 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
28891         * icall.c: register the GetCustomAttributes method.
28892         * object.c, object.h: add mono_string_new_len ().
28893         * reflection.h, reflection.c: added mono_runtime_invoke(),
28894         mono_install_runtime_invoke(). Added
28895         mono_reflection_get_custom_attrs () to load custom attributes and
28896         create the attribute objects.
28898 2002-02-19  Dick Porter  <dick@ximian.com>
28899         * threads-dummy-types.c:
28900         * threads-dummy-types.h:
28901         * threads-dummy.c:
28902         * threads-dummy.h:
28903         * threads-pthread-types.c:
28904         * threads-pthread-types.h:
28905         * threads-pthread.c:
28906         * threads-pthread.h:  Deleted obsolete files
28908 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
28910         * class.c (mono_class_vtable): runtime init the class when we
28911         allocate static class data.
28913         * icall.c (ves_icall_System_Array_SetValue): check for null values.
28915         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
28916         and String - but we will need generic marshalling support in the
28917         future. 
28918         (mono_init): set the domain name in a ms compatible way
28920         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
28921         String[].
28923 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
28925         * object.c (mono_array_clone): use alloca() instead of g_malloc  
28926         for sizes
28928         * appdomain.c (mono_domain_unload): impl.
28930 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
28932         * appdomain.c, object.c: fix intern pool implementation.
28933         * class.c: fix alignment code.
28935 2002-02-16  Radek Doulik  <rodo@ximian.com>
28937         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
28938         and s2 > s1, just copy lower bytes to be compatible with little
28939         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
28940         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
28942         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
28943         force big_endian to be 1 for big endian machines 
28944         (ves_icall_iconv_new_decoder): ditto
28946 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
28948         * socket-io.c (convert_sockopt_level_and_name): If the system
28949         doesn't define SOL_IP or SOL_TCP, get them by hand using
28950         getprotobyname() and caching the values (because this could be a
28951         slow operation).
28952         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
28953         Use the appropriate struct when the system does support it. Ie,
28954         not all systems have struct ip_mreqn so use struct ip_mreq when
28955         appropriate.
28957 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
28959         * reflection.c: handle finally clauses.
28961 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
28963         * socket-io.c: use g_snprintf() instead of snprintf.
28965 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
28967         * reflection.c (mono_param_get_objects): Cast second argument to
28968         mono_method_get_param_names to a const char** to silence the
28969         compiler warning.
28971         * appdomain.c (mono_domain_assembly_open): Put parens around the
28972         truth statement in the for-loop.
28974         * unicode.c (iconv_convert): Got rid of a compiler warning about
28975         int i being unused when the system has a new iconv.
28976         (iconv_get_length): Same.
28978         * image.c (load_class_names): Cast the second argument to
28979         g_hash_table_insert() to char* to hush compiler warnings about the
28980         arg being a const.
28981         (mono_image_open): Same here.
28983         * socket-io.c: Don't conditionally include sys/filio.h or
28984         sys/sockio.h here anymore since we now get them from
28985         io-layer/io-layer.h
28986         (inet_pton): If the system doesn't support inet_aton, implement
28987         using inet_addr and also #define INADDR_NONE if it isn't defined
28988         by the system.
28990 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
28992         * metadata.c, metadata.h: added function to get packing and size info
28993         of a typedef.
28994         * reflection.h, reflection.c: handle field RVA data. Save info about
28995         the table layout if needed. Assign typedef indexes to all the types
28996         before dumping the info about them to avoid forward reference problems.
28998 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
29000         * socket-io.c (convert_sockopt_level_and_name): ifdef
29001         SO_ACCEPTCONN because it is not defined on my system (old debian)
29003 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
29005         * opcode.c: use stddef.h to get NULL.
29007 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
29009         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
29010         for FIONBIO, FIONREAD and SIOCATMARK.
29011         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
29012         define INADDR_NONE and besides, inet_addr() is deprecated and
29013         should not be used. Use inet_pton() instead - it also has the
29014         added bonus that it can easily handle IPv6 addresses as well.
29015         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
29017 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
29019         * decimal.c: remove _MSC_VER conditional.
29021 2002-02-13  Dick Porter  <dick@ximian.com>
29023         * socket-io.c: 
29024         * icall.c: Internal calls for Blocking, Select, Shutdown,
29025         GetSocketOption and SetSocketOption
29027 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29029         * assembly.cs: better resolver: use it instead of some kludgy
29030         code.
29032 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
29034         * reflection.c: the best way to speed-up the compiler is to avoid
29035         infinite loops.
29037 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
29039         * class.c (mono_class_vtable): changed the object layout
29040         (obj->vtable->class). 
29041         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
29043 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29045         * assembly.c: look for assemblies in the assembly dir, too.
29047 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29049         * class.c: fix thinko in mono_class_from_type().
29051 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29053         * exception.h, exception.c: added TypeLoadException.
29054         * object.h, object.c: added mono_array_clone ().
29055         * icall.c: handle throwOnError in AssemblyGetType().
29056         Added Array.Clone().
29057         * opcode.h, opcode.c: use a single value for the opcode val.
29058         Compile fix for non-gcc compilers.
29060 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
29062         * opcodes.c, opcodes.h: export interesting info about opcodes.
29064 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
29066         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
29067         icalls. 
29069         * class.c (class_compute_field_layout): set element_class for enums
29070         (mono_class_create_from_typedef): set element_class for normal classes
29072         * icall.c (ves_icall_System_Enum_get_value): impl.
29074         * class.c (mono_class_create_from_typedef): do not set valuetype
29075         flag for System.ValueType and System.Enum
29077 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
29079         * unicode.c (iconv_convert): fix big endian problem.
29081 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
29083         * class.c: add asserts if we are ever going to scribble over memory.
29084         * socket-io.c: not all systems have AF_IRDA defined.
29086 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
29088         * class.c (class_compute_field_layout): do not consider static
29089         fields to compute alignment
29091 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
29093         * appdomain.c (mono_appdomain_get): impl.
29094         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
29096 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
29098         * icall.c: ignore "file://" prefix when loading an assembly.
29100 2002-01-23  Dick Porter  <dick@ximian.com>
29102         * socket-io.c:
29103         * icall.c:
29104         * Makefile.am: Added socket support
29106 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
29108         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
29109         code back.  This should return the assemblies that are loaded by
29110         the runtime on behalf of an application domain. 
29112         The current implementation is still broken, it just returns every
29113         assembly loaded, but until we get real applications domain this
29114         will do.
29116 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
29118         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
29119         AppDomain object.
29121 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
29123         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
29124         the mono_class_from_name lookup.
29125         (ves_icall_get_parameter_info): ditto.
29126         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
29127         method.
29128         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
29130 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
29132         * class.c: load also nested classes on class init.
29133         System.ValueType instance methods gets passed boxed
29134         values, unless methods in derived classed that get a pointer to the
29135         data.
29136         * icall.c: use better name parsing code in GetType().
29137         * image.c, image.h: add mono_image_loaded ().
29138         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
29139         * reflection.c, reflection.h: added mono_reflection_parse_type().
29141 2002-01-22  Veronica De Santis <veron78@interfree.it>
29143         * icall.c : Added mapping of internal calls for Manual and Auto reset events
29144         * threads.c : Added the implementation of internal calls for events
29145         * threads.h : Added prototypes of internal calls for events
29146         
29147 2002-01-21  Radek Doulik  <rodo@ximian.com>
29149         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
29151 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
29153         * class.c (mono_class_init): set min_align to 1 (instead of 0)
29154         (mono_class_value_size): use min_align
29156 2002-01-20  Dick Porter  <dick@ximian.com>
29158         * threads.h:
29159         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
29160         so it compiles on w32.
29162 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
29164         * metadata.c (mono_type_stack_size): impl.
29166         * class.c (mono_class_get_field): impl. memberref token
29168 2002-01-16 Veronica De Santis <veron78@@interfree.it>
29170         * icall.h : Added the internal calls mapping for CreateMutex_internal
29171                     and ReleaseMutex_internal.
29172         * threads.h : Added the prototype of mutexes internal calls.
29173         * threads.c : Added the implementations of mutexes internal calls.
29175 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
29177         * metaparse.h: removed unused file.
29178         * reflection.c, reflection.h: added stream_data_align () function 
29179         to align data in streams and keep stream aligned. Add support for
29180         exception support in method headers.
29182 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
29184         * unicode.c: make iconv_convert () return the number of bytess written
29185         in the output buffer.
29187 2002-01-15  Dick Porter  <dick@ximian.com>
29188         * threads.c: Make the runtime's idea of infinite timeouts coincide
29189         with the class library's
29191         Fix a particularly egregious bug in mono_thread_cleanup(). That
29192         code was so utterly bogus it must have been written on a Monday.
29194 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
29196         * reflection.h: add subtypes field to TypeBuilder.
29197         * reflection.c: encode constants for literal fields.
29198         Handle subtypes. Fix user string token (and add a zero byte)
29199         at the end.
29200         
29201 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
29203         * class.c (mono_class_init): bug fix: assign slot numbers for
29204         abstract methods.
29206 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29208         * reflection.c: don't try to output a code RVA for abstract methods.
29209         Small fixes for method header format. Output parameter info to the
29210         ParamDef table. Save method overriding info to MethodImpl table.
29211         Fix property support. Allow typedef.extends to be a type in the
29212         building assembly.
29213         * verify.c: fix off-by-one error.
29215 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
29217         * class.c: fix mono_class_from_mono_type () for szarray types.
29218         Remove unused cache check in mono_class_from_type_spec().
29219         * icall.c: *type_from_name () functions handle simple arrays and byref.
29220         * reflection.c: handle byref and szarray types. Handle methods without
29221         body (gets P/Invoke compilation working). Handle types and fields in
29222         get_token ().
29223         * reflection.h: add rank to MonoTypeInfo.
29225 2002-01-10  Dick Porter  <dick@ximian.com>
29227         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
29228         internal calls
29230 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
29232         * icall.c: initialize class in type_from_handle ().
29233         Loop also in parent classes for get_method ().
29234         * reflection.c: properly encode class and valuetype types.
29235         Start on encoding TypeBuilder types. Handle fieldrefs.
29236         Use correct length when registering a user string.
29237         Handle ConstructorBuilder and MonoMethod in get_token ().
29238         Make mono_type_get_object () aware of cached types.
29239         * object.c: back out change to mono_string_new ().
29241 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
29242         * object.c: mono_string_new should return a NULL when the string 
29243         passed in is NULL -- not try to deference it.
29244         
29245 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
29247         * icall.c: hack to make IsSubType work for TypeBuilders.
29248         * reflection.c: emit constructors before methods.
29249         Retrieve param names in mono_param_get_objects().
29251 2002/01/05  Nick Drochak  <ndrochak@gol.com>
29253         * Makefile.am: fix list of headers and sources so automake 1.5
29254         doesn't complain. Removed \# at end of list.
29256 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
29258         * reflection.c: get token for a method ref. Set return type of
29259         constructor to void.
29260         * loader.c: debug message.
29261         * class.c: typo fix.
29263 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
29265         * icall.c: fix array init with rank > 1. FindMembers
29266         loops in parent class as well.
29267         * image.c: do not insert nested types in name cache.
29268         * reflection.c: warning fix.
29269         * reflection.h: add override method (for interface impl).
29271 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
29273         * metadata.c: fix customattr decoding.
29275 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29277         * rawbuffer.cs: Added native Win32 implementation, avoids using
29278         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
29280 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
29282         * class.c: make the low-level routines handle the cache.
29284 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
29286         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
29288 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
29290         * class.c: fix mono_array_element_size() for objects.
29291         * class.h, class.c: add properties to MonoClass and load them
29292         at init time.
29293         * icall.c: check with isinst() when assigning a value to an array
29294         instead of requiring the classes to match exactly.
29295         Implemented icall for System.Type::GetType().
29296         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
29297         enums. Handle bindingflags when looking for methods and fields.
29298         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
29299         and mono_metadata_methods_from_property().
29300         * reflection.h, reflection.c: added structures for propreties,
29301         parameters and enums. Implemented mono_property_get_object() and
29302         mono_param_get_objects().
29304 2001-12-18  Dick Porter  <dick@ximian.com>
29306         * file-io.c: Use mono_string_to_utf16() instead of
29307         mono_string_chars()
29309         * object.c: Added mono_string_to_utf16(), which copies the non
29310         NULL-terminated MonoString into a new double-null-terminated
29311         buffer.
29313 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
29315         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
29317 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
29319         * file-io.c: raise exceptions if handle is invalid.
29321 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
29323         * assembly.c: yet another check for mscorlib.
29324         * class.c, class.h: load nesting info for classes.
29325         * icall.c: many new functions to support the Reflection classes.
29326         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
29327         * reflection.h, reflection.c: mono_image_create_token(),
29328         mono_assembly_get_object(), mono_type_get_object(),
29329         mono_method_get_object(), mono_field_get_object(): methods to return
29330         objects that parallel the C representation of assemblies, types,
29331         methods, fields.
29333 2001-12-11  Dick Porter  <dick@ximian.com>
29335         * icall.c:
29336         * file-io.c: Internal calls for file IO.
29338 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
29340         * tabledefs.h: missing FileAttributes.
29341         * verify.h, verify.c: use is_valid_string () to simplify and check for
29342         valid strings more correctly. Fix warnings and speeling.
29343         Check more tables: Filed, File, ModuleRef, StandAloneSig.
29344         Check code: branches, maxstack, method calls.
29346 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
29348         * object.c (mono_object_allocate): removed static, so that the jit
29349         can allocate value types.
29351         * icall.c (ves_icall_System_DateTime_GetNow): impl.
29353 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29355         * class.c: init enum types right away and register the
29356         token->MonoClass map in mono_class_create_from_typedef ().
29357         * verify.h, verify.c: first cut of the verifier.
29358         * pedump.c: add --verify switch to verify metadata tables.
29359         * tabledefs.h: add some missing enums.
29361 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
29363         * class.c (mono_install_runtime_class_init): impl.
29364         (mono_class_init): renamed mono_class_metadata_init to
29365         mono_class_init, also removed the metadata_inited flag
29367         * object.c (mono_object_isinst): use faster algorithm
29369 2001-11-30  Radek Doulik  <rodo@ximian.com>
29371         * mono-endian.h: reverted last change
29372         added function prototypes
29374         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
29375         add mono-endian.c back
29377         * mono-endian.c: returned back, as Paolo pointed out, it's needed
29378         for unaligned access, I've mistaked it with endianess. I am
29379         sorry.
29380         (mono_read16): fix reverted endianess
29381         (mono_read64): ditto
29382         (mono_read32): ditto
29384 2001-11-30  Dick Porter  <dick@ximian.com>
29386         * exception.c: Implement mono_exception_from_name()
29388 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
29390         * metadata.h, metadata.c: remove params_size and locals_size and their
29391         calculation from the metadata code: they are only usefult to the
29392         interp.
29394 2001-11-29  Radek Doulik  <rodo@ximian.com>
29396         * object.c (mono_ldstr): swap bytes here, it's probably not the
29397         best place, but works for me now, I'll redo it once I know mono
29398         better, also note that I add PROT_WRITE and don't reset back, also
29399         note that it's only affects big endians, so x86 should be OK
29401         * mono-endian.h (read16): use just glib macros for both endians
29403         * mono-endian.c: removed as glib macros are used in in
29404         mono-endian.h so we don't need to care about endianess for read
29405         macros as glib does that for us already
29407 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
29409         * class.h, class.h: take minimum alignment into consideration so
29410         that the fields of a class remain aligned also when in an array.
29412 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29414         * loader.h, loader.c: add mono_method_get_param_names().
29415         * class.c: 0-init class fields.
29417 2001-11-26  Dick Porter  <dick@ximian.com>
29419         * icall.c:
29420         * threads-types.h:
29421         * threads.c: New file that handles System.Threading on all platforms
29423         * object.c: 
29424         * object.h: Remove the synchronisation struct from MonoObject,
29425         replace it with a pointer that gets initialised on demand
29427         * Makefile.am: Replace all the system-specific threading code with
29428         a single file that uses the new wrapper library
29430 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
29432         * class.c, class.h: add mono_install_trampoline() so that the runtime
29433         can register a function to create a trampoline: removes the ugly
29434         requirement that a runtime needed to export arch_create_jit_trampoline.
29435         * object.h, object.c: added mono_install_handler() so that the runtime
29436         can install an handler for exceptions generated in C code (with
29437         mono_raise_exception()). Added C struct for System.Delegate.
29438         * pedump.c: removed arch_create_jit_trampoline.
29439         * reflection.c: some cleanups to allow registering user strings and
29440         later getting a token for methodrefs and fieldrefs before the assembly
29441         is built.
29442         * row-indexes.h: updates and fixes from the new ECMA specs.
29444 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
29446         * class.h, class.c: add enum_basetype field to MonoClass.
29447         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
29448         to get index in the constant table reated to a field, param or
29449         property.
29450         * reflection.h, reflection.c: handle constructors. Set public-key and
29451         version number of the built assembly to 0.
29452         * row-indexes.h: update from new ECMA spec.
29454 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
29456         * class.h, class.c: add a max_interface_id to MonoClass.
29457         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
29458         since it's used to do that. Added mono_type_type_from_obj().
29459         Make GetType() return NULL instead of segfaulting if the type was not
29460         found. Handle simple arrays in assQualifiedName.
29461         * object.h: add a struct to represent an Exception.
29462         * reflection.c: output call convention in method signature.
29463         Add code to support P/Invoke methods and fixed offsets for fields.
29465 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
29467         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
29468         the value.
29469         * icall.c: use mono_array_addr instead of array->vector: fixes the
29470         reflection image writing.
29471         * reflection.c: init call convention byte to 0 in method signature.
29472         Encode the property signature. Don't output property-related methods
29473         twice. Really process the properties for a type (don't cast a field to
29474         a property, my mom always told me that).
29475         Fix 64 bit issues in pointer alignment in a different and more
29476         readable way.
29478 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
29480         * loader.h: Removed type class from MonoDefaults, added monotype
29482         * loader.c: Loaded MonoType, removed loading of Type
29484         * icall.c (my_mono_new_object): Now returns a System.MonoType,
29485         and fills in System.Type._impl with a RuntimeTypeHandle rather
29486         than the actual MonoClass *
29488         (ves_icall_type_from_handle): change from type_class to
29489         monotype_class
29491         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
29492         implemented
29494         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
29495         implemented
29497         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
29499         (ves_icall_System_Reflection_Assembly_GetType): implemented
29501         (ves_icall_System_MonoType_assQualifiedName): implemented
29503         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
29505 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
29507         * assembly.c (mono_assembly_open): Implement a cache for the
29508         assemblies. 
29510         (mono_assembly_close): only destroy the assembly when the last
29511         reference is gone.
29512         
29513 2001-11-09  Dick Porter  <dick@ximian.com>
29515         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
29517 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
29519         * class.c (mono_class_metadata_init): bug fix: compute the right slot
29521 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
29523         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
29524         from Martin Weindel.
29525         * object.h: add mono_string_chars ().
29527 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
29529         * reflection.c (build_compressed_metadata): Eliminates warnings
29530         and uses 64-bit clean code.
29532         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
29533         (mono_type_equal): Change signature to eliminate warnings.
29535 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
29537         * icall.c, loader.c: remove the internalcall array constructors.
29538         Changes to match the new MonoArray structure.
29539         * object.h, object.c: an array object doesn't allocate an extra
29540         vector. Add mono_array_new_full () to create jagged arrays easily.
29542 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
29544         * metadata.h, metadata.c: add mono_metadata_field_info () to
29545         retreive all the info about a field from vairous tables.
29546         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
29547         * class.h, class.c: augment MonoClassField with more info.
29548         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
29549         policy and load a field's RVA if needed.
29551 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
29553         * class.c (mono_class_metadata_init): create a trampoline for all
29554         virtual functions instead of actually compiling them.
29556 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
29558         * class.h, class.c: include name in MonoClassField.
29559         * class.c: fix fundamental type of System.Object and System.String.
29560         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
29561         tokens in ldtoken.
29562         * icall.c: remove internalcalls for the Reflection stuff that is now
29563         done in C# code.
29564         * loader.c: mono_field_from_memberref () implementation.
29565         * mono-endian.c: thinko (s/struct/union/g).
29566         * object.c, object.h: make the mono_string_* prototypes actually use
29567         MonoString instead of MonoObject.
29568         * reflection.c, reflection.h: updates for changes in the reflection
29569         code in corlib: we use C structures that map to the actual C# classes.
29570         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
29571         fat method header if needed and use the info from the ILGenerator for
29572         methods. Handle fields in types. Misc fixes.
29574 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
29576         * class.c (mono_class_metadata_init): bug fix: always allocate
29577         space for static class data
29579 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
29581         * class.c (mono_compute_relative_numbering): use relative
29582         numbering to support fast runtime type checks.
29584 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
29586         * class.c (mono_class_create_from_typeref): added debugging output
29587         to print class name when MonoDummy is returned instead of real class
29589 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
29591         * class.c (mono_class_metadata_init): interface offset table now
29592         contains pointers into the vtable - this is more efficient for the jit
29594 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
29596         * class.c (mono_class_metadata_init): use a temporary vtable (the
29597         old algorithm only worked for the interpreter, but not for the jit)
29599 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
29601         * loader.c (method_from_memberref): use mono_class_get to get the
29602         class of an array instead of using System.Array directly.
29603         (mono_get_method): also add MEMBERREF methods to the method cache
29604         which usefull for arrays.
29606 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
29608         * pedump.c (arch_compile_method): added to compute vtable entry
29610         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
29611         number of interfaces.
29612         
29613         * class.h: merged MonoArrayClass into MonoClass
29615         * class.c (mono_class_create_from_typedef): compute the vtable size and
29616         allocate space to include the vtable inside MonoClass
29617         (mono_class_metadata_init): initialize the vtable
29619 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
29621         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
29622         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
29623         * image.c: endian fixes by Laurent Rioux.
29624         * object.h, object.c: rename MonoStringObject to MonoString and
29625         MonoArrayObject to MonoArray. Change some function names to conform to
29626         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
29627         guint16* as first argument, so don't use char*.
29628         Provide macros to do the interesting things on arrays in a portable way.
29629         * threads-pthread.c: updates for the API changes and #include <sched.h>
29630         (required for sched_yield()).
29631         * icall.c: updates for the API changes above.
29632         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
29633         platforms that need them.
29635 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
29637         * class.c: set the correct type for all the fundamental
29638         type when loading the class.
29640 2001-10-05  Dick Porter  <dick@ximian.com>
29642         * threads-pthread.c (pthread_mutex_timedlock): Simple
29643         compatibility version for C libraries that lack this call.
29645 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29647         * class.c: MonoTypes stored in MonoClass are stored as
29648         fundamental MonoTypes when the class represents a
29649         fundamental type (System.Int32, ...).
29650         The TypeHandle return by ldtoken is a MonoType*.
29651         * icall.c: ves_icall_get_data_chunk () write out all the
29652         PE/COFF stuff. Implement ves_icall_define_method (),
29653         ves_icall_set_method_body (), ves_icall_type_from_handle ().
29654         * image.c: properly skip unknown streams.
29655         * loader.h, loader.c: add type_class to mono_defaults.
29656         * metadata.c, metadata.h: export compute_size () as
29657         mono_metadata_compute_size () with a better interface.
29658         Typo and C&P fixes.
29659         * pedump.c: don't try to print the entry point RVA if there is no entry point.
29660         * reflection.c, reflection.h: many cleanups, fixes, output method
29661         signatures and headers, typedef and typeref info, compress the metadata
29662         tables, output all the heap streams, cli header etc.
29663         * row-indexes.h: typo fixes.
29665 2001-10-04  Dick Porter  <dick@ximian.com>
29667         * object.h: Add a synchronisation mutex struct to MonoObject
29669         * object.c (mono_new_object): Initialise the object
29670         synchronisation mutexes
29672         * icall.c: System.Threading.Monitor internal calls
29673         
29674         * threads-pthread.h:
29675         * threads-pthread.c: System.Threading.Monitor internal calls
29677         * threads-types.h: New file, includes the system-specific thread
29678         structures
29679         
29680         * threads-pthread-types.h:
29681         * threads-pthread-types.c: New files, handle pthread-specific
29682         synchronisation types
29684         * threads-dummy-types.h: 
29685         * threads-dummy-types.c: New files of dummy support for
29686         thread-specific types
29688         * metadata.c:
29689         * image.c:
29690         * pedump.c: include mono-endian.h not endian.h
29691         
29692         * Makefile.am: More threads files.
29693         Name mono-endian.h not endian.h
29695 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
29697         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
29698         stuff and implement a few more bits.
29699         * icall.c: a field needs to be dereferenced twice. Do not use the same
29700         name for two variables in the same scope.
29701         * image.c, image.h: cleanups.
29703 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
29705         * class.c (mono_class_metadata_init): bug fix: compute the right size
29707 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
29709         * icall.c: implemented some of the Reflection internalcalls.
29710         * image.c, image.h: start writing out the PE/COFF image.
29711         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
29712         that does the reverse than decode_blob_size ().
29713         * object.c: use mono_metadata_encode_value (). Move here
29714         temporary implementation of mono_string_to_utf8 ().
29715         * rawbuffer.c: make malloc_map static.
29717 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29719         * metadata.c: fix type comparison for arrays.
29720         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
29721         Added a couple of new classes to monodefaults.
29722         * icall.c: added a couple of Reflection-related internalcalls.
29723         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
29724         Added a byval_arg MonoType to MonoClass.
29726 2001-09-28  Dick Porter  <dick@ximian.com>
29728         * icall.c:
29729         * threads-pthread.h: 
29730         * threads-pthread.c: Implemented internal calls for
29731         LocalDataStoreSlot operations.  Applied mutexes around all shared
29732         data.  Reworked the thread creation and Start() operations to
29733         avoid a race condition.
29734         
29735         * threads-dummy.h:
29736         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
29738 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
29740         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
29742 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
29744         * class.c, loader.c: warn and return NULL instead of erroring out.
29745         * icall.c: added System.AppDomain::getCurDomain().
29746         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
29748 2001-09-25  Dick Porter  <dick@ximian.com>
29750         * threads-pthread.h:
29751         * threads-pthread.c: Implemented timed thread joining and added
29752         System.Threading.Thread::Join_internal internal call
29754         * icall.c: Added System.Threading.Thread::Join_internal internal call
29756         * threads-dummy.h:
29757         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
29759 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
29761         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
29762         mono_string_intern () to implement the semantics of the ldstr opcode
29763         and the interning of System.Strings.
29764         * icall.c: provide hooks to make String::IsIntern and String::Intern
29765         internalcalls.
29767 2001-09-23  Dick Porter  <dick@ximian.com>
29769         * threads-dummy.c: 
29770         * threads-dummy.h: New files of dummy threading routines
29772         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
29773         support code based on system specifics
29775         Rename PTHREAD_LIBS to THREAD_LIBS
29776         
29777 2001-09-23  Dick Porter  <dick@ximian.com>
29779         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
29780         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
29781         internal calls.
29782         (mono_thread_init): Set up a Thread object instance to return when
29783         the main thread calls Thread.CurrentThread
29784         (mono_thread_cleanup): Wait for all subthreads to exit
29786         * icall.c: New internal calls for System.Threading.Thread::Sleep
29787         (including Schedule) and CurrentThread
29789         * threads.h: New file, to insulate thread-specific stuff from the
29790         rest of the code
29792 2001-09-21  Dick Porter  <dick@ximian.com>
29794         * threads-pthread.h: 
29795         * threads-pthread.c: New file, for handling pthreads-style
29796         threading support.  Start() now starts a new thread and executes
29797         the ThreadStart delegate instance.
29799         * icall.c: Added the internalcall for
29800         System.Threading.Thread::Start_internal
29802         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
29804 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
29806         * loader.c: work around the different signatures for delegates
29807         constructors csc generates in compiled code vs the ones compiled in mscorlib.
29809 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
29811         * class.h, class.c: add mono_class_get_field_from_name ().
29812         * *: Fix C comments and other ANSI C issues.
29814 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
29816         * endian.h, assembly.c: fix some endianness issues.
29818 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
29820         * loader.h, load.c: add delegate_class to mono_defaults.
29821         Handle runtime provided methods in mono_get_method ().
29823 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
29825         * loader.c (mono_get_method): use pinvoke for internal call
29827         * icall.c: use pinvoke for internal call
29829         * loader.c (method_from_memberref): set the method name
29831 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
29833         * metadata.c: help the compiler generate better code for
29834         mono_class_from_mono_type ().
29836 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
29838         * class.c (mono_class_metadata_init): delayed computing of the
29839         class size to mono_class_metadata_init ()
29841 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
29843         * class.c, class.h: add an interfaces member to MonoClass.
29844         * image.c, image.h: add assembly_name field to MonoImage
29845         from the assembly table.
29846         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
29848 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
29850         * class.c: Handle Array in mono_class_from_mono_type ().
29851         * metadata.c, pedump.c: some endian fixes.
29853 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
29855         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
29856         * metadata.c: fix small problem introduced with the latest commit.
29858 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
29860         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
29861         We don't need a MonoMetadata pointer anymore to compare signatures in
29862         mono_metadata_signature_equal (), update callers.
29863         Reduced memory usage an number of allocations for MonoMethodHeader and
29864         MonoMethodSignature.
29866 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
29868         * metadata.c: added compare for szarray.
29870 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
29872         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
29873         and add a couple more types to it and mono_defaults. Give an hint on
29874         classes that need implementing in our corlib and are referenced
29875         in mscorlib.
29877 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
29879         * class.h, class.c: keep track if a class is also an Enum.
29880         * loader.c: Implement a couple more types for use in libffi
29881         marshalling. Gives better diagnostics when failing to dlopen
29882         a library. Set method->klass for P/Invoke methods, too.
29884 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
29886         * class.c, class.h: add a MonoType this_arg to MonoClass that
29887         represents a pointer to an object of the class' type that
29888         can be used by the interpreter and later the type cache.
29889         Add best guess alignment info for valuetype objects.
29891 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
29893         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
29894         into MonoType: one less level of indirection and allocation and
29895         simplifies quite a bit of code. Added cache for MonoTypes that are
29896         used frequently, so that we don't need to allocate them all the time.
29898 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
29900         * class.c (mono_class_create_from_typedef): System.Enum is also a
29901         value type, although it does not derive from System.ValueType
29902         (maybe a bug in the ms compiler?)
29904         * metadata.c (mono_type_size): return the right size for value types
29906         * loader.c (mono_get_method): only initialize method header if not abstract
29908         * class.c (mono_class_from_mono_type): use mono_default values. 
29910 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
29912         * *: use MonoClass pointers instead of <type_tokens>
29913         
29914         * class.h: new flag: metadata_inited.
29916         * class.c (mono_class_metadata_init): impl.
29917         (mono_class_instance_size): impl.
29918         (mono_class_data_size): impl.
29920 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
29922         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
29923         MonoClass now has the name and name_space fields. 
29924         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
29925         mono_get_method () takes and optional MonoClass as argument.
29926         Removed mono_typedef_from_name() and added mono_class_token_from_name()
29927         instead that takes advantage of a map from class names to typedef
29928         tokens in MonoImage.
29930 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
29932         * metadata.c: zero is not a valid alignment boundary.
29933         Merge MONO_TYPE_VOID in default decoding code.
29935 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
29937         * image.h: merged MonoMetadata into MonoImage
29939         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
29940         identify the type of elements.
29942 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
29944         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
29945         * cil-coff.h: split MonoMSDOSHeader and add size info.
29946         * image.c: add some consistency checks.
29947         * metadata.c: fix row size computation: one programmer
29948         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
29949         add explanation for the locator routine.
29950         Fix decoding of size in method header.
29951         
29952 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
29954         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
29955         (g_concat_dir_and_file): Bring g_concat_dir_and_file
29956         function from gnome-libs.  This uses the right path separator
29957         based on the OS, and also works around a bug in some systems where
29958         a double slash is not allowed. 
29959         (default_assembly_name_resolver): Use g_concat_dir_and_file
29960         (mono_assembly_open): ditto.
29962 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
29964         * metadata.c (mono_metadata_signature_equal): impl.
29966         * *: void is now a realy MonoType (instead of using NULL)
29967         
29968         * metadata.c (do_mono_metadata_parse_type): use
29969         mono_metadata_parse_type to parse void value.
29971 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
29973         * metadata.c, metadata.h: in the signature and method header store
29974         only the space required for holding the loca vars and incoming arguments.
29976 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
29978         * metadata.c (do_mono_metadata_parse_type): treat void like any
29979         other type (instead of assigning NULL);
29981 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
29983         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
29985 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
29987         * image.c (do_mono_image_open): added a cache for arrays.
29989 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
29991         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
29992         decode a single column from a row in a metadata table and changes
29993         to take advantage of it in the typedef locator (gives a nice speed up).
29994         Store offset info for function params.
29996 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
29998         * image.h (MONO_IMAGE_IS_CORLIB): removed 
30000 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
30002         * assembly.c: how could mono_assembly_close () had ever worked?
30003         * metadata.c, metadata.h: provide offset info for local vars.
30004         Implement mono_type_size () to take care of alignment as well
30005         as size (it was mono_field_type_size in cli/class.c before).
30007 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
30009         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
30011         * assembly.h (CORLIB_NAME): set to corlib.dll
30013         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
30015 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
30017         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
30018         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
30019         tokentype.h: massive namespace cleanup.
30021 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
30023         * metadata.h, metadata.c: decode exception clauses when parsing method header.
30025 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
30027         * metadata.c (mono_metadata_free_type): added check for type !=
30028         NULL (void) before calling mono_metadata_free_type()
30030 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
30032         * metadata.h, row_indexes.h: added header with enumerations to use
30033         to index in the columns from tables in metadata and to decode coded
30034         tokens: we should start using this instead of embedding magic numbers
30035         all over the code.
30037 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
30039         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
30040         Move metadata_t info from cli_image_info_t to MonoImage, where
30041         it's easily accessible. Changed all the uses accordingly.
30042         Added the method and class caches to MonoImage.
30043         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
30044         and mono_metadata_decode_value () signature to be more consistent
30045         with the other parse functions (and simplify code). Taken advantage
30046         of zero-length array allocation with GCC. Removed reduntant (and
30047         wrong) MonoFieldType struct and use MonoParam instead. Changed
30048         mono_metadata_parse_field_type () to use common code for parsing.
30049         Added mono_metadata_typedef_from_field () and
30050         mono_metadata_typedef_from_method () to lookup a typedef index from a
30051         field or method token.
30052         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
30054 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
30056         * metadata.c (mono_metadata_parse_field_type): Implement. 
30057         (do_mono_metadata_parse_type): Split engine from
30058         mono_metadata_parse_type, so that we can create smaller structures
30059         for things that just have one pointer to the MonoType (look at
30060         the MonoFieldType)
30062 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
30064         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
30065         as Jan Gray found out, it is incorrect. 
30067 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
30069         * assembly.c: Implement asssembly loading.  This loads an image
30070         and loads all the referenced assemblies.  Come to think of it, we
30071         could always do lazy loading of the assemblies. 
30073         * image.c (mono_image_open): Keep loaded images in a hashtable.
30075         * image.h (MonoImage): Add reference count.
30077 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
30079         * assembly.c (mono_assembly_open): Keep track of the file name in
30080         case the assembly has no ASSEMBLY table.
30082         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
30083         from get.c here.
30085 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
30087         * metadata.c, metadata.h: decode local vars in method header
30088         parse function. Change callers accordingly.
30090 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
30092         * metadata.h, cil-coff.h: protect against multiple inclusion.
30093         Added some new structures to hold information decoded from metadata:
30094         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
30095         and relevant decoding/free functions.
30096         * metadata.c: implement decoding functions. Add warning for out of bounds
30097         index in mono_metadata_locate(). Implement mono_get_method () to retreive
30098         all the info about a method signature and invocation. Remove check on
30099         uninitialized local var in parse_mh() and fix memory leak.
30101 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
30103         * metadata.h: More macros.
30105         * tokentype.h: New file.
30107 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
30109         * assembly.c: added a consistency check and initialize
30110         some structures with g_new0().
30111         * metadata.c: fixed a couple more bugs in table size computation
30112         and add other checks for out-of bound access to metadata.
30114 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
30116         * metatada.c: fix bugs computing table sizes. Spew a
30117         warning when index in string heap is out of bounds.
30119 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
30121         * metadata.h: Add a couple of macros to manipulate tokens. 
30123 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
30125         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
30126         cli_section_tables).
30128 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
30130         * metadata.c (mono_metadata_user_string): New function, provides
30131         access to the UserString heap. 
30133 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
30135         * metadata.c: Add inline documentation.
30137 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
30139         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
30140         files. 
30142 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
30144         * typeattr.h: New file, TypeAttribute flags. 
30146 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
30148         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
30149         mono_assembly_ensure_section): Section loading code.
30150         (load_section_tables): Load the sections.
30152         * mono/metadata/metadata.c (mono_metadata_locate_token,
30153         mono_metadata_locate): Functions to locate the information
30154         definition given a token or a table and an index.
30155         (mono_metadata_compute_table_bases): New.
30156         (compute_size): New function to compute the sizes of the various
30157         tables.
30159         * mono/metadata/metadata.h: Finish listing the different index
30160         types. 
30162         * mono/metadata/pedump.c: Improve to dump new information.
30164 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
30166         * mono/metadata/metadata.c: Entered all the tables matching
30167         Beta2. 
30169         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2